Add SPA session validation and buglist, update migration docs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-12-03 21:28:08 +00:00
parent 9be3dfc14e
commit cff287e870
24169 changed files with 10223 additions and 7120 deletions

0
node_modules/@jqhtml/core/dist/boot.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/core/dist/boot.d.ts.map generated vendored Normal file → Executable file
View File

10
node_modules/@jqhtml/core/dist/component-registry.d.ts generated vendored Normal file → Executable file
View File

@@ -61,4 +61,14 @@ export declare function list_components(): Record<string, {
has_class: boolean;
has_template: boolean;
}>;
/**
* Unified registration function - auto-detects source type and delegates
*
* Accepts either:
* - A compiled JQHTML template (has __jqhtml_template: true)
* - A component class extending Jqhtml_Component (has static __jqhtml_component: true and static component_name)
*
* @param source - Compiled template or component class
*/
export declare function register(source: TemplateDefinition | ComponentConstructor): void;
//# sourceMappingURL=component-registry.d.ts.map

2
node_modules/@jqhtml/core/dist/component-registry.d.ts.map generated vendored Normal file → Executable file
View File

@@ -1 +1 @@
{"version":3,"file":"component-registry.d.ts","sourceRoot":"","sources":["../src/component-registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGlD,MAAM,MAAM,gBAAgB,GAAG,CAC7B,IAAI,EAAE,gBAAgB,EACtB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,OAAO,EAAE,GAAG,KACT,CAAC,GAAG,EAAE,EAAE,gBAAgB,CAAC,CAAC;AAG/B,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,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H,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,oBAAoB,GAAG,kBAAkB,CAwB/F;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,GAAG,EACb,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAC7B,gBAAgB,CAGlB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAE9C;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,EAAE,CAEnD;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAAC,MAAM,EAAE;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,OAAO,CAAA;CAAE,CAAC,CAsB/F;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,kBAAkB,GAAG,oBAAoB,GAAG,IAAI,CA0ChF"}

21
node_modules/@jqhtml/core/dist/component.d.ts generated vendored Normal file → Executable file
View File

@@ -16,6 +16,7 @@ declare global {
}
}
export declare class Jqhtml_Component {
static __jqhtml_component: boolean;
static template?: any;
$: any;
args: Record<string, any>;
@@ -42,7 +43,27 @@ export declare class Jqhtml_Component {
private __data_frozen;
private _reload_debounced?;
private next_reload_force_refresh;
private __lifecycle_authorized;
constructor(element?: any, args?: Record<string, any>);
/**
* Protect lifecycle methods from manual invocation
* Stores original implementations in WeakMap, replaces with guarded wrappers
* @private
*/
private _protect_lifecycle_methods;
/**
* Call a lifecycle method with authorization (async)
* Framework calls this to invoke lifecycle methods, bypassing the protection wrapper.
* The flag is set momentarily for the wrapper check, then reset BEFORE user code runs.
* This ensures any nested lifecycle calls from user code will fail the flag check.
* @private
*/
private _call_lifecycle;
/**
* Call a lifecycle method with authorization (sync version for sync methods like on_stop)
* @private
*/
private _call_lifecycle_sync;
/**
* Boot - Start the full component lifecycle
* Called immediately after construction by instruction processor

2
node_modules/@jqhtml/core/dist/component.d.ts.map generated vendored Normal file → Executable file
View File

@@ -1 +1 @@
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,YAAY,CAAC,EAAE;YACb,GAAG,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;YACjF,UAAU,EAAE,MAAM,IAAI,CAAC;SACxB,CAAC;KACH;CACF;AAED,qBAAa,gBAAgB;IAE3B,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC;IAGtB,CAAC,EAAE,GAAG,CAAC;IACP,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAK;IAGzB,OAAO,CAAC,kBAAkB,CAAmB;IAC7C,OAAO,CAAC,aAAa,CAAiC;IACtD,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,aAAa,CAAoC;IACzD,OAAO,CAAC,iBAAiB,CAAkB;IAC3C,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,mBAAmB,CAAuB;IAClD,OAAO,CAAC,oBAAoB,CAAwE;IACpG,OAAO,CAAC,iBAAiB,CAA0B;IACnD,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,iBAAiB,CAAkB;IAC3C,OAAO,CAAC,aAAa,CA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AAG,IAAI;IAIvC;;OAEG;IACH,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,EAAE;IAa1C;;OAEG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAoBlD;;OAEG;IACH,MAAM,CAAC,mBAAmB,IAAI,MAAM,EAAE;IA0CtC,OAAO,CAAC,aAAa;IAIrB;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAkB7B,OAAO,CAAC,kBAAkB;IA4B1B,OAAO,CAAC,yBAAyB;IAuHjC,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,gBAAgB;IAcxB;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IA+BzB,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,UAAU;IAUlB;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,0BAA0B;CAqEnC"}

34
node_modules/@jqhtml/core/dist/debug-entry.d.ts generated vendored Normal file → Executable file
View File

@@ -1,36 +1,8 @@
/**
* JQHTML Debug Module
* JQHTML Debug Bundle Entry Point
*
* Optional debugging utilities for development
* Import separately to keep production bundles small:
*
* import { showDebugOverlay } from '@jqhtml/core/debug';
* Exports debug utilities for development use.
* This is a separate bundle that can be optionally included.
*/
export { DebugOverlay, showDebugOverlay, hideDebugOverlay } from './debug-overlay.js';
export type { DebugOverlayOptions } from './debug-overlay.js';
export { logLifecycle, applyDebugDelay, logDispatch, logInstruction, logDataChange, isSequentialProcessing, handleComponentError, devWarn } from './debug.js';
export interface DebugSettings {
verbose?: boolean;
logCreationReady?: boolean;
logFullLifecycle?: boolean;
logDispatch?: boolean;
logDispatchVerbose?: boolean;
delayAfterComponent?: number;
delayAfterRender?: number;
delayAfterRerender?: number;
sequentialProcessing?: boolean;
flashComponents?: boolean;
flashDuration?: number;
flashColors?: {
create?: string;
render?: string;
ready?: string;
};
showComponentTree?: boolean;
profilePerformance?: boolean;
breakOnError?: boolean;
traceDataFlow?: boolean;
logInstructionProcessing?: boolean;
highlightSlowRenders?: number;
}
//# sourceMappingURL=debug-entry.d.ts.map

2
node_modules/@jqhtml/core/dist/debug-entry.d.ts.map generated vendored Normal file → Executable file
View File

@@ -1 +1 @@
{"version":3,"file":"debug-entry.d.ts","sourceRoot":"","sources":["../src/debug-entry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,EACL,YAAY,EACZ,eAAe,EACf,WAAW,EACX,cAAc,EACd,aAAa,EACb,sBAAsB,EACtB,oBAAoB,EACpB,OAAO,EACR,MAAM,YAAY,CAAC;AAGpB,MAAM,WAAW,aAAa;IAE5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAG7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAG/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE;QACZ,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IAGF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B"}
{"version":3,"file":"debug-entry.d.ts","sourceRoot":"","sources":["../src/debug-entry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,YAAY,EACZ,eAAe,EACf,WAAW,EACX,cAAc,EACd,aAAa,EACb,sBAAsB,EACtB,oBAAoB,EACpB,OAAO,EACR,MAAM,YAAY,CAAC"}

View File

@@ -1,61 +0,0 @@
/**
* JQHTML Debug Overlay
*
* Independent debug controls using pure jQuery DOM manipulation.
* Does NOT use JQHTML components so it works even when components are broken.
*/
export interface DebugOverlayOptions {
position?: 'top' | 'bottom';
theme?: 'dark' | 'light';
compact?: boolean;
showStatus?: boolean;
autoHide?: boolean;
}
export declare class DebugOverlay {
private static instance;
private $container;
private $statusIndicator;
private options;
private $;
constructor(options?: DebugOverlayOptions);
/**
* Static method to show debug overlay (singleton pattern)
*/
static show(options?: DebugOverlayOptions): DebugOverlay;
/**
* Static method to hide debug overlay
*/
static hide(): void;
/**
* Static method to toggle debug overlay visibility
*/
static toggle(): void;
/**
* Static method to destroy debug overlay
*/
static destroy(): void;
/**
* Display the debug overlay
*/
private display;
/**
* Hide the debug overlay
*/
hide(): void;
/**
* Remove the debug overlay completely
*/
destroy(): void;
/**
* Update the status indicator
*/
updateStatus(mode: string): void;
private createOverlay;
private createStatusIndicator;
private addStyles;
private toggle;
private executeAction;
}
export declare function showDebugOverlay(options?: DebugOverlayOptions): DebugOverlay;
export declare function hideDebugOverlay(): void;
//# sourceMappingURL=debug-overlay.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"debug-overlay.d.ts","sourceRoot":"","sources":["../src/debug-overlay.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA8BH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA6B;IACpD,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,gBAAgB,CAAa;IACrC,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,CAAC,CAAM;gBAEH,OAAO,GAAE,mBAAwB;IAgB7C;;OAEG;IACH,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,YAAY;IAQxD;;OAEG;IACH,MAAM,CAAC,IAAI,IAAI,IAAI;IAMnB;;OAEG;IACH,MAAM,CAAC,MAAM,IAAI,IAAI;IAYrB;;OAEG;IACH,MAAM,CAAC,OAAO,IAAI,IAAI;IAOtB;;OAEG;IACH,OAAO,CAAC,OAAO;IAYf;;OAEG;IACH,IAAI,IAAI,IAAI;IASZ;;OAEG;IACH,OAAO,IAAI,IAAI;IAWf;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAOhC,OAAO,CAAC,aAAa;IAiDrB,OAAO,CAAC,qBAAqB;IAqB7B,OAAO,CAAC,SAAS;IAoGjB,OAAO,CAAC,MAAM;IAed,OAAO,CAAC,aAAa;CAoEtB;AAGD,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,YAAY,CAE5E;AAED,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC"}

0
node_modules/@jqhtml/core/dist/debug.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/core/dist/debug.d.ts.map generated vendored Normal file → Executable file
View File

604
node_modules/@jqhtml/core/dist/index.cjs generated vendored Normal file → Executable file
View File

@@ -355,6 +355,50 @@ function list_components() {
}
return result;
}
/**
* Unified registration function - auto-detects source type and delegates
*
* Accepts either:
* - A compiled JQHTML template (has __jqhtml_template: true)
* - A component class extending Jqhtml_Component (has static __jqhtml_component: true and static component_name)
*
* @param source - Compiled template or component class
*/
function register(source) {
// Check for template (compiled .jqhtml file)
if (source && typeof source === 'object' && '__jqhtml_template' in source && source.__jqhtml_template === true) {
register_template(source);
return;
}
// Check for component class (extends Jqhtml_Component)
if (source && typeof source === 'function' && '__jqhtml_component' in source && source.__jqhtml_component === true) {
const component_name = source.component_name;
if (!component_name || typeof component_name !== 'string') {
throw new Error('[JQHTML] Component class must define static component_name property.\n\n' +
'Example:\n' +
' class My_Component extends Jqhtml_Component {\n' +
' static component_name = "My_Component";\n' +
' // ...\n' +
' }\n\n' +
'Alternatively, use register_component(name, class) to specify the name explicitly:\n' +
' jqhtml.register_component("My_Component", My_Component);');
}
register_component(component_name, source);
return;
}
// Unknown type - provide helpful error
throw new Error('[JQHTML] register() requires a compiled JQHTML template or a component class.\n\n' +
'For templates:\n' +
' import My_Template from "./my_component.jqhtml";\n' +
' jqhtml.register(My_Template);\n\n' +
'For classes (with static component_name):\n' +
' class My_Component extends Jqhtml_Component {\n' +
' static component_name = "My_Component";\n' +
' }\n' +
' jqhtml.register(My_Component);\n\n' +
'For classes (without static component_name):\n' +
' jqhtml.register_component("My_Component", My_Component);');
}
/**
* JQHTML v2 Instruction Processor
@@ -883,7 +927,7 @@ function devWarn(message) {
console.warn(`[JQHTML Dev Warning] ${message}`);
}
// Get global jqhtml object
function getJqhtml$1() {
function getJqhtml() {
if (typeof window !== 'undefined' && window.jqhtml) {
return window.jqhtml;
}
@@ -896,7 +940,7 @@ function getJqhtml$1() {
}
// Visual flash effect
function flashComponent(component, eventType) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug?.flashComponents)
return;
const duration = jqhtml.debug.flashDuration || 500;
@@ -918,7 +962,7 @@ function flashComponent(component, eventType) {
}
// Log lifecycle event
function logLifecycle(component, phase, status) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug)
return;
const shouldLog = jqhtml.debug.logFullLifecycle ||
@@ -964,7 +1008,7 @@ function logLifecycle(component, phase, status) {
}
// Apply delays based on lifecycle phase
function applyDebugDelay(phase) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug)
return;
let delayMs = 0;
@@ -985,14 +1029,14 @@ function applyDebugDelay(phase) {
}
// Log instruction processing
function logInstruction(type, data) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug?.logInstructionProcessing)
return;
console.log(`[JQHTML Instruction] ${type}:`, data);
}
// Log data changes
function logDataChange(component, property, oldValue, newValue) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug?.traceDataFlow)
return;
console.log(`[JQHTML Data] ${component.constructor.name}#${component._cid}.data.${property}:`, { old: oldValue, new: newValue });
@@ -1005,7 +1049,7 @@ function updateComponentTree() {
}
// Router dispatch logging
function logDispatch(url, route, params, verbose = false) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug)
return;
const shouldLog = jqhtml.debug.logDispatch || jqhtml.debug.logDispatchVerbose;
@@ -1027,12 +1071,12 @@ function logDispatch(url, route, params, verbose = false) {
}
// Check if sequential processing is enabled
function isSequentialProcessing() {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
return jqhtml?.debug?.sequentialProcessing || false;
}
// Error handling with break on error
function handleComponentError(component, phase, error) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
console.error(`[JQHTML Error] ${component.constructor.name}#${component._cid} failed in ${phase}:`, error);
if (jqhtml?.debug?.breakOnError) {
debugger; // This will pause execution in dev tools
@@ -1060,6 +1104,9 @@ function handleComponentError(component, phase, error) {
* - Scoped IDs using _cid pattern
* - Event emission and CSS class hierarchy
*/
// WeakMap storage for protected lifecycle method implementations (Option 2)
// See docs/internal/lifecycle-method-protection.md for design details
const lifecycle_impls = new WeakMap();
class Jqhtml_Component {
constructor(element, args = {}) {
this._ready_state = 0; // 0=created, 1=init, 2=loaded, 3=rendered, 4=ready
@@ -1080,6 +1127,7 @@ class Jqhtml_Component {
this.__initial_data_snapshot = null; // Snapshot of this.data after on_create() for restoration before on_load()
this.__data_frozen = false; // Track if this.data is currently frozen
this.next_reload_force_refresh = null; // State machine for reload()/refresh() debounce precedence
this.__lifecycle_authorized = false; // Flag for lifecycle method protection
this._cid = this._generate_cid();
this._lifecycle_manager = LifecycleManager.get_instance();
// Create or wrap element
@@ -1193,6 +1241,63 @@ class Jqhtml_Component {
this.state = {};
this._log_lifecycle('construct', 'complete');
}
/**
* Protect lifecycle methods from manual invocation
* Stores original implementations in WeakMap, replaces with guarded wrappers
* @private
*/
_protect_lifecycle_methods() {
const methods = {
on_create: 'Called automatically during creation.',
on_render: 'Use render() to trigger a re-render.',
on_load: 'Use reload() to refresh data.',
on_ready: 'Called automatically when ready.',
on_stop: 'Use stop() to stop the component.'
};
const impls = {};
const self = this;
for (const [name, help] of Object.entries(methods)) {
const original = this[name];
// Skip if using base class default (empty method)
if (original === Jqhtml_Component.prototype[name])
continue;
impls[name] = original;
// Create wrapper with same function name (for stack traces)
this[name] = {
[name](...args) {
if (!self.__lifecycle_authorized) {
throw new Error(`[JQHTML] ${name}() cannot be called manually. ${help}\n` +
`Component: ${self.component_name()} (_cid: ${self._cid})`);
}
return lifecycle_impls.get(self)[name].apply(self, args);
}
}[name];
}
lifecycle_impls.set(this, impls);
}
/**
* Call a lifecycle method with authorization (async)
* Framework calls this to invoke lifecycle methods, bypassing the protection wrapper.
* The flag is set momentarily for the wrapper check, then reset BEFORE user code runs.
* This ensures any nested lifecycle calls from user code will fail the flag check.
* @private
*/
async _call_lifecycle(name, context) {
// Get the original implementation (bypasses wrapper entirely)
const impl = lifecycle_impls.get(this)?.[name] || this[name];
// Call original directly - no flag needed since we bypass the wrapper
return await impl.call(context || this);
}
/**
* Call a lifecycle method with authorization (sync version for sync methods like on_stop)
* @private
*/
_call_lifecycle_sync(name) {
// Get the original implementation (bypasses wrapper entirely)
const impl = lifecycle_impls.get(this)?.[name] || this[name];
// Call original directly - no flag needed since we bypass the wrapper
return impl.call(this);
}
/**
* Boot - Start the full component lifecycle
* Called immediately after construction by instruction processor
@@ -1206,6 +1311,8 @@ class Jqhtml_Component {
if (this._booted)
return;
this._booted = true;
// Protect lifecycle methods from manual invocation (must happen after subclass constructor)
this._protect_lifecycle_methods();
await this._lifecycle_manager.boot_component(this);
}
// -------------------------------------------------------------------------
@@ -1416,9 +1523,9 @@ class Jqhtml_Component {
// Don't update ready state here - let phases complete in order
this._update_debug_attrs();
this._log_lifecycle('render', 'complete');
// Call on_render() immediately after render completes
// Call on_render() with authorization (sync) immediately after render completes
// This ensures event handlers are always re-attached after DOM updates
const renderResult = this.on_render();
const renderResult = this._call_lifecycle_sync('on_render');
if (renderResult && typeof renderResult.then === 'function') {
console.warn(`[JQHTML] Component "${this.component_name()}" returned a Promise from on_render(). ` +
`on_render() must be synchronous code. Remove 'async' from the function declaration.`);
@@ -1483,8 +1590,8 @@ class Jqhtml_Component {
if (this._render_count !== render_id) {
return; // Stale render, don't call on_ready
}
// Call on_ready hook
await this.on_ready();
// Call on_ready hook with authorization
await this._call_lifecycle('on_ready');
// Trigger ready event
await this.trigger('ready');
})();
@@ -1504,8 +1611,8 @@ class Jqhtml_Component {
if (this._stopped || this._ready_state >= 1)
return;
this._log_lifecycle('create', 'start');
// Call on_create() and validate it's synchronous
const result = this.on_create();
// Call on_create() with authorization and validate it's synchronous
const result = await this._call_lifecycle('on_create');
if (result && typeof result.then === 'function') {
console.warn(`[JQHTML] Component "${this.component_name()}" returned a Promise from on_create(). ` +
`on_create() must be synchronous code. Remove 'async' from the function declaration.`);
@@ -1620,8 +1727,8 @@ class Jqhtml_Component {
if (window.jqhtml?.debug?.verbose) {
console.log(`[Cache] Component ${this._cid} (${this.component_name()}) has non-serializable args - load deduplication and caching disabled`, { uncacheable_property });
}
// Execute on_load() without deduplication or caching
await this.on_load();
// Execute on_load() with authorization, without deduplication or caching
await this._call_lifecycle('on_load');
this.__data_frozen = true;
return;
}
@@ -1730,7 +1837,7 @@ class Jqhtml_Component {
// - Should errors reset state machine flags (next_reload_force_refresh)?
// - Should partial data be preserved or rolled back?
// - Should followers be notified differently based on error type?
await this.on_load.call(restricted_this);
await this._call_lifecycle('on_load', restricted_this);
}
catch (error) {
// Handle error and notify coordinator
@@ -1802,7 +1909,7 @@ class Jqhtml_Component {
this._log_lifecycle('ready', 'start');
// Wait for all children to reach ready state (bottom-up execution)
await this._wait_for_children_ready();
await this.on_ready();
await this._call_lifecycle('on_ready');
this._ready_state = 4;
this._update_debug_attrs();
this._log_lifecycle('ready', 'complete');
@@ -2018,7 +2125,7 @@ class Jqhtml_Component {
this.data = JSON.parse(JSON.stringify(this.__initial_data_snapshot));
}
try {
await this.on_load();
await this._call_lifecycle('on_load');
}
finally {
// Freeze this.data after on_load() completes
@@ -2094,7 +2201,7 @@ class Jqhtml_Component {
// STEP 3.5 & 4: Wait for children and call on_ready (only if we rendered)
if (rendered_from_cache || should_render) {
await this._wait_for_children_ready();
await this.on_ready();
await this._call_lifecycle('on_ready');
}
this._log_lifecycle('reload', 'complete');
}
@@ -2128,16 +2235,14 @@ class Jqhtml_Component {
this.$.addClass('_Component_Stopped');
// Unregister from lifecycle manager
this._lifecycle_manager.unregister_component(this);
// Call user's on_stop() hook
const stopResult = this.on_stop();
// Call user's on_stop() hook with authorization (sync)
const stopResult = this._call_lifecycle_sync('on_stop');
if (stopResult && typeof stopResult.then === 'function') {
console.warn(`[JQHTML] Component "${this.component_name()}" returned a Promise from on_stop(). ` +
`on_stop() must be synchronous code. Remove 'async' from the function declaration.`);
}
// Fire registered destroy callbacks
this.trigger('destroy');
// Trigger jQuery destroy event
this.$.trigger('destroy');
// Fire registered stop callbacks
this.trigger('stop');
// Remove from DOM parent's children
if (this._dom_parent) {
this._dom_parent._dom_children.delete(this);
@@ -2700,6 +2805,8 @@ class Jqhtml_Component {
};
}
}
// Static properties
Jqhtml_Component.__jqhtml_component = true; // Marker for unified register() detection
/**
* JQHTML v2 Template Renderer
@@ -3095,388 +3202,6 @@ function hydrateElement($element, jQ) {
}
}
/**
* JQHTML Debug Overlay
*
* Independent debug controls using pure jQuery DOM manipulation.
* Does NOT use JQHTML components so it works even when components are broken.
*/
// Get global jQuery
function getJQuery() {
if (typeof window !== 'undefined' && window.$) {
return window.$;
}
if (typeof window !== 'undefined' && window.jQuery) {
return window.jQuery;
}
throw new Error('FATAL: jQuery is not defined. jQuery must be loaded before using JQHTML. ' +
'Add <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script> before loading JQHTML.');
}
// Get global jqhtml object
function getJqhtml() {
if (typeof window !== 'undefined' && window.jqhtml) {
return window.jqhtml;
}
if (typeof globalThis !== 'undefined' && globalThis.jqhtml) {
return globalThis.jqhtml;
}
throw new Error('FATAL: window.jqhtml is not defined. The JQHTML runtime must be loaded before using JQHTML components. ' +
'Ensure @jqhtml/core is imported and initialized before attempting to use debug features.');
}
class DebugOverlay {
constructor(options = {}) {
this.$container = null;
this.$statusIndicator = null;
this.$ = getJQuery();
if (!this.$) {
throw new Error('jQuery is required for DebugOverlay');
}
this.options = {
position: 'bottom',
theme: 'dark',
compact: false,
showStatus: true,
autoHide: false,
...options
};
}
/**
* Static method to show debug overlay (singleton pattern)
*/
static show(options) {
if (!DebugOverlay.instance) {
DebugOverlay.instance = new DebugOverlay(options);
}
DebugOverlay.instance.display();
return DebugOverlay.instance;
}
/**
* Static method to hide debug overlay
*/
static hide() {
if (DebugOverlay.instance) {
DebugOverlay.instance.hide();
}
}
/**
* Static method to toggle debug overlay visibility
*/
static toggle() {
if (DebugOverlay.instance && DebugOverlay.instance.$container) {
if (DebugOverlay.instance.$container.is(':visible')) {
DebugOverlay.hide();
}
else {
DebugOverlay.instance.display();
}
}
else {
DebugOverlay.show();
}
}
/**
* Static method to destroy debug overlay
*/
static destroy() {
if (DebugOverlay.instance) {
DebugOverlay.instance.destroy();
DebugOverlay.instance = null;
}
}
/**
* Display the debug overlay
*/
display() {
if (this.$container) {
this.$container.show();
return;
}
this.createOverlay();
if (this.options.showStatus) {
this.createStatusIndicator();
}
}
/**
* Hide the debug overlay
*/
hide() {
if (this.$container) {
this.$container.hide();
}
if (this.$statusIndicator) {
this.$statusIndicator.hide();
}
}
/**
* Remove the debug overlay completely
*/
destroy() {
if (this.$container) {
this.$container.remove();
this.$container = null;
}
if (this.$statusIndicator) {
this.$statusIndicator.remove();
this.$statusIndicator = null;
}
}
/**
* Update the status indicator
*/
updateStatus(mode) {
if (!this.$statusIndicator)
return;
this.$statusIndicator.text('Debug: ' + mode);
this.$statusIndicator.attr('class', 'jqhtml-debug-status' + (mode !== 'Off' ? ' active' : ''));
}
createOverlay() {
// Add styles first
this.addStyles();
// Create container using jQuery
this.$container = this.$('<div>')
.addClass(`jqhtml-debug-overlay ${this.options.theme} ${this.options.position}`);
// Create content structure
const $content = this.$('<div>').addClass('jqhtml-debug-content');
const $controls = this.$('<div>').addClass('jqhtml-debug-controls');
// Add title
const $title = this.$('<span>')
.addClass('jqhtml-debug-title')
.html('<strong>🐛 JQHTML Debug:</strong>');
$controls.append($title);
// Create buttons
const buttons = [
{ text: 'Slow Motion + Flash', action: 'enableSlowMotionDebug', class: 'success' },
{ text: 'Basic Debug', action: 'enableBasicDebug', class: '' },
{ text: 'Full Debug', action: 'enableFullDebug', class: '' },
{ text: 'Sequential', action: 'enableSequentialMode', class: '' },
{ text: 'Clear Debug', action: 'clearAllDebug', class: 'danger' },
{ text: 'Settings', action: 'showDebugInfo', class: '' }
];
buttons.forEach(btn => {
const $button = this.$('<button>')
.text(btn.text)
.addClass('jqhtml-debug-btn' + (btn.class ? ` ${btn.class}` : ''))
.on('click', () => this.executeAction(btn.action));
$controls.append($button);
});
// Add minimize/close button
const $toggleBtn = this.$('<button>')
.text(this.options.compact ? '▼' : '▲')
.addClass('jqhtml-debug-toggle')
.on('click', () => this.toggle());
$controls.append($toggleBtn);
// Assemble and add to page
$content.append($controls);
this.$container.append($content);
this.$('body').append(this.$container);
}
createStatusIndicator() {
this.$statusIndicator = this.$('<div>')
.addClass('jqhtml-debug-status')
.text('Debug: Off')
.css({
position: 'fixed',
top: '10px',
right: '10px',
background: '#2c3e50',
color: 'white',
padding: '5px 10px',
borderRadius: '4px',
fontSize: '0.75rem',
zIndex: '10001',
opacity: '0.8',
fontFamily: 'monospace'
});
this.$('body').append(this.$statusIndicator);
}
addStyles() {
// Check if styles already exist
if (this.$('#jqhtml-debug-styles').length > 0)
return;
// Create and inject CSS using jQuery - concatenated strings for better minification
const $style = this.$('<style>')
.attr('id', 'jqhtml-debug-styles')
.text('.jqhtml-debug-overlay {' +
'position: fixed;' +
'left: 0;' +
'right: 0;' +
'z-index: 10000;' +
'font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;' +
'font-size: 0.8rem;' +
'box-shadow: 0 2px 10px rgba(0,0,0,0.2);' +
'}' +
'.jqhtml-debug-overlay.top {' +
'top: 0;' +
'}' +
'.jqhtml-debug-overlay.bottom {' +
'bottom: 0;' +
'}' +
'.jqhtml-debug-overlay.dark {' +
'background: #34495e;' +
'color: #ecf0f1;' +
'}' +
'.jqhtml-debug-overlay.light {' +
'background: #f8f9fa;' +
'color: #333;' +
'border-bottom: 1px solid #dee2e6;' +
'}' +
'.jqhtml-debug-content {' +
'padding: 0.5rem 1rem;' +
'}' +
'.jqhtml-debug-controls {' +
'display: flex;' +
'flex-wrap: wrap;' +
'gap: 8px;' +
'align-items: center;' +
'}' +
'.jqhtml-debug-title {' +
'margin-right: 10px;' +
'font-weight: bold;' +
'}' +
'.jqhtml-debug-btn {' +
'padding: 4px 8px;' +
'border: none;' +
'border-radius: 3px;' +
'background: #3498db;' +
'color: white;' +
'cursor: pointer;' +
'font-size: 0.75rem;' +
'transition: background 0.2s;' +
'}' +
'.jqhtml-debug-btn:hover {' +
'background: #2980b9;' +
'}' +
'.jqhtml-debug-btn.success {' +
'background: #27ae60;' +
'}' +
'.jqhtml-debug-btn.success:hover {' +
'background: #229954;' +
'}' +
'.jqhtml-debug-btn.danger {' +
'background: #e74c3c;' +
'}' +
'.jqhtml-debug-btn.danger:hover {' +
'background: #c0392b;' +
'}' +
'.jqhtml-debug-toggle {' +
'padding: 4px 8px;' +
'border: none;' +
'border-radius: 3px;' +
'background: #7f8c8d;' +
'color: white;' +
'cursor: pointer;' +
'font-size: 0.75rem;' +
'margin-left: auto;' +
'}' +
'.jqhtml-debug-toggle:hover {' +
'background: #6c7b7d;' +
'}' +
'.jqhtml-debug-status.active {' +
'background: #27ae60 !important;' +
'}' +
'@media (max-width: 768px) {' +
'.jqhtml-debug-controls {' +
'flex-direction: column;' +
'align-items: flex-start;' +
'}' +
'.jqhtml-debug-title {' +
'margin-bottom: 5px;' +
'}' +
'}');
this.$('head').append($style);
}
toggle() {
// Toggle between compact and full view
this.options.compact = !this.options.compact;
const $toggleBtn = this.$container.find('.jqhtml-debug-toggle');
$toggleBtn.text(this.options.compact ? '▼' : '▲');
const $buttons = this.$container.find('.jqhtml-debug-btn');
if (this.options.compact) {
$buttons.hide();
}
else {
$buttons.show();
}
}
executeAction(action) {
const jqhtml = getJqhtml();
if (!jqhtml) {
console.warn('JQHTML not available - make sure it\'s loaded and exposed globally');
return;
}
switch (action) {
case 'enableSlowMotionDebug':
jqhtml.setDebugSettings({
logFullLifecycle: true,
sequentialProcessing: true,
delayAfterComponent: 150,
delayAfterRender: 200,
delayAfterRerender: 250,
flashComponents: true,
flashDuration: 800,
flashColors: {
create: '#3498db',
render: '#27ae60',
ready: '#9b59b6'
},
profilePerformance: true,
highlightSlowRenders: 30,
logDispatch: true
});
this.updateStatus('Slow Motion');
console.log('🐛 Slow Motion Debug Mode Enabled');
break;
case 'enableBasicDebug':
jqhtml.enableDebugMode('basic');
this.updateStatus('Basic');
console.log('🐛 Basic Debug Mode Enabled');
break;
case 'enableFullDebug':
jqhtml.enableDebugMode('full');
this.updateStatus('Full');
console.log('🐛 Full Debug Mode Enabled');
break;
case 'enableSequentialMode':
jqhtml.setDebugSettings({
logCreationReady: true,
sequentialProcessing: true,
flashComponents: true,
profilePerformance: true
});
this.updateStatus('Sequential');
console.log('🐛 Sequential Processing Mode Enabled');
break;
case 'clearAllDebug':
jqhtml.clearDebugSettings();
this.updateStatus('Off');
console.log('🐛 All Debug Modes Disabled');
break;
case 'showDebugInfo':
const settings = JSON.stringify(jqhtml.debug, null, 2);
console.log('🐛 Current Debug Settings:', settings);
alert('Debug settings logged to console:\n\n' + (Object.keys(jqhtml.debug).length > 0 ? settings : 'No debug settings active'));
break;
}
}
}
DebugOverlay.instance = null;
// Simplified global convenience functions that use static methods
function showDebugOverlay(options) {
return DebugOverlay.show(options);
}
function hideDebugOverlay() {
DebugOverlay.hide();
}
// Auto-initialize if debug query parameter is present
if (typeof window !== 'undefined') {
const urlParams = new URLSearchParams(window.location.search);
if (urlParams.get('debug') === 'true' || urlParams.get('jqhtml-debug') === 'true') {
document.addEventListener('DOMContentLoaded', () => {
DebugOverlay.show();
});
}
}
/**
* JQHTML v2 jQuery Plugin
*
@@ -3673,47 +3398,6 @@ function init_jquery_plugin(jQuery) {
// Return the jQuery element to enable chaining (fluent interface pattern)
return targetElement;
};
// Store original jQuery methods for overriding
const _jqhtml_jquery_overrides = {};
// EXPERIMENTAL: Override DOM manipulation methods to support component instances as arguments
// and to trigger ready() when components are added to the DOM
// NOTE: This feature needs thorough testing in production scenarios
const dom_insertion_methods = ['append', 'prepend', 'before', 'after', 'replaceWith'];
for (const fnname of dom_insertion_methods) {
_jqhtml_jquery_overrides[fnname] = jQuery.fn[fnname];
jQuery.fn[fnname] = function (...args) {
// Resolve all component instances into jQuery elements
const resolvedArgs = args.map(arg => {
if (arg && typeof arg === 'object' && arg instanceof Jqhtml_Component) {
return arg.$;
}
return arg;
});
// Make a list of all jQuery elements in the arguments
const $elements = resolvedArgs.filter((arg) => arg instanceof jQuery);
// Call the original jQuery method with resolved arguments
const ret = _jqhtml_jquery_overrides[fnname].apply(this, resolvedArgs);
// For each jQuery element that is now in the DOM and hasn't triggered ready yet,
// find any uninitialized components and boot them
for (const $e of $elements) {
// Check if element is in the DOM
if ($e.closest('html').length > 0) {
// Find any components that haven't been initialized yet
$e.find('.Component').addBack('.Component').each(function () {
const $comp = jQuery(this);
const component = $comp.data('_component');
// If component exists and hasn't been booted yet, boot it
if (component && !component._ready_state) {
component._boot();
}
});
}
}
return ret;
};
}
// Note: Component destruction is handled automatically by MutationObserver
// in lifecycle-manager.ts. No jQuery method overrides needed for cleanup.
/**
* shallowFind - Find nearest descendants matching selector
*
@@ -4375,16 +4059,17 @@ function init(jQuery) {
}
}
// Version - will be replaced during build with actual version from package.json
const version = '2.3.4';
const version = '2.3.9';
// Default export with all functionality
const jqhtml = {
// Core
Jqhtml_Component,
LifecycleManager,
// Registry
register,
register_component,
get_component_class,
register_template,
get_component_class,
get_template,
get_template_by_class,
create_component,
@@ -4399,6 +4084,8 @@ const jqhtml = {
escape_html,
// Version property - internal
__version: version,
// state facts
tombstone: 'pepperoni and cheese',
// Debug settings
debug: {
enabled: false,
@@ -4425,15 +4112,6 @@ const jqhtml = {
clearDebugSettings() {
this.debug = {};
},
// Debug overlay methods
showDebugOverlay(options) {
return DebugOverlay.show(options);
},
hideDebugOverlay() {
return DebugOverlay.hide();
},
// Export DebugOverlay class for direct access
DebugOverlay,
// Install globals function
installGlobals() {
if (typeof window !== 'undefined') {
@@ -4487,7 +4165,6 @@ if (typeof window !== 'undefined' && !window.jqhtml) {
}
}
exports.DebugOverlay = DebugOverlay;
exports.Jqhtml_Component = Jqhtml_Component;
exports.Jqhtml_LifecycleManager = LifecycleManager;
exports.Jqhtml_Local_Storage = Jqhtml_Local_Storage;
@@ -4507,7 +4184,6 @@ exports.get_template = get_template;
exports.get_template_by_class = get_template_by_class;
exports.handleComponentError = handleComponentError;
exports.has_component = has_component;
exports.hideDebugOverlay = hideDebugOverlay;
exports.init = init;
exports.init_jquery_plugin = init_jquery_plugin;
exports.isSequentialProcessing = isSequentialProcessing;
@@ -4517,9 +4193,9 @@ exports.logDispatch = logDispatch;
exports.logInstruction = logInstruction;
exports.logLifecycle = logLifecycle;
exports.process_instructions = process_instructions;
exports.register = register;
exports.register_component = register_component;
exports.register_template = register_template;
exports.render_template = render_template;
exports.showDebugOverlay = showDebugOverlay;
exports.version = version;
//# sourceMappingURL=index.cjs.map

2
node_modules/@jqhtml/core/dist/index.cjs.map generated vendored Normal file → Executable file

File diff suppressed because one or more lines are too long

14
node_modules/@jqhtml/core/dist/index.d.ts generated vendored Normal file → Executable file
View File

@@ -6,26 +6,23 @@
export { Jqhtml_Component } from './component.js';
export { LifecycleManager } from './lifecycle-manager.js';
export type { LifecyclePhase } from './lifecycle-manager.js';
export { register_component, get_component_class, register_template, get_template, get_template_by_class, create_component, has_component, get_component_names, get_registered_templates, list_components } from './component-registry.js';
export { register, register_component, register_template, get_component_class, get_template, get_template_by_class, create_component, has_component, get_component_names, get_registered_templates, list_components } from './component-registry.js';
export type { ComponentConstructor, TemplateFunction, TemplateDefinition } from './component-registry.js';
export { process_instructions, extract_slots } from './instruction-processor.js';
export type { Instruction, TagInstruction, ComponentInstruction, SlotInstruction } from './instruction-processor.js';
export { render_template, escape_html } from './template-renderer.js';
export { boot } from './boot.js';
export { logLifecycle, applyDebugDelay, logDispatch, logInstruction, logDataChange, isSequentialProcessing, handleComponentError, devWarn } from './debug.js';
export { DebugOverlay, showDebugOverlay, hideDebugOverlay } from './debug-overlay.js';
export type { DebugOverlayOptions } from './debug-overlay.js';
import { init_jquery_plugin } from './jquery-plugin.js';
export { init_jquery_plugin };
export declare function init(jQuery?: any): void;
export { LifecycleManager as Jqhtml_LifecycleManager } from './lifecycle-manager.js';
import { Jqhtml_Component } from './component.js';
import { LifecycleManager } from './lifecycle-manager.js';
import { register_component, get_component_class, register_template, get_template, get_template_by_class, create_component, has_component, get_component_names, get_registered_templates, list_components } from './component-registry.js';
import { register, register_component, register_template, get_component_class, get_template, get_template_by_class, create_component, has_component, get_component_names, get_registered_templates, list_components } from './component-registry.js';
import { process_instructions, extract_slots } from './instruction-processor.js';
import { render_template, escape_html } from './template-renderer.js';
import { boot } from './boot.js';
import { DebugOverlay } from './debug-overlay.js';
import './jquery-plugin.js';
import { Jqhtml_Local_Storage } from './local-storage.js';
export { Jqhtml_Local_Storage };
@@ -59,9 +56,10 @@ export interface DebugSettings {
declare const jqhtml: {
Jqhtml_Component: typeof Jqhtml_Component;
LifecycleManager: typeof LifecycleManager;
register: typeof register;
register_component: typeof register_component;
get_component_class: typeof get_component_class;
register_template: typeof register_template;
get_component_class: typeof get_component_class;
get_template: typeof get_template;
get_template_by_class: typeof get_template_by_class;
create_component: typeof create_component;
@@ -74,6 +72,7 @@ declare const jqhtml: {
render_template: typeof render_template;
escape_html: typeof escape_html;
__version: string;
tombstone: string;
debug: DebugSettings & {
enabled: boolean;
verbose: boolean;
@@ -81,9 +80,6 @@ declare const jqhtml: {
setDebugSettings(settings: DebugSettings): void;
enableDebugMode(level?: "basic" | "full"): void;
clearDebugSettings(): void;
showDebugOverlay(options?: any): DebugOverlay;
hideDebugOverlay(): void;
DebugOverlay: typeof DebugOverlay;
installGlobals(): void;
_version(): any;
version(): string;

2
node_modules/@jqhtml/core/dist/index.d.ts.map generated vendored Normal file → Executable file
View File

@@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,wBAAw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C;IAG/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE;QACZ,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IAGF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAGD,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;WAkCL,aAAa,GAAG;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE;+BAGhC,aAAa;4BAIjB,OAAO,GAAG,MAAM;;;;;6BAsDd,MAAM;;CAMhC,CAAC;AAmBF,eAAe,MAAM,CAAC"}

602
node_modules/@jqhtml/core/dist/index.js generated vendored Normal file → Executable file
View File

@@ -351,6 +351,50 @@ function list_components() {
}
return result;
}
/**
* Unified registration function - auto-detects source type and delegates
*
* Accepts either:
* - A compiled JQHTML template (has __jqhtml_template: true)
* - A component class extending Jqhtml_Component (has static __jqhtml_component: true and static component_name)
*
* @param source - Compiled template or component class
*/
function register(source) {
// Check for template (compiled .jqhtml file)
if (source && typeof source === 'object' && '__jqhtml_template' in source && source.__jqhtml_template === true) {
register_template(source);
return;
}
// Check for component class (extends Jqhtml_Component)
if (source && typeof source === 'function' && '__jqhtml_component' in source && source.__jqhtml_component === true) {
const component_name = source.component_name;
if (!component_name || typeof component_name !== 'string') {
throw new Error('[JQHTML] Component class must define static component_name property.\n\n' +
'Example:\n' +
' class My_Component extends Jqhtml_Component {\n' +
' static component_name = "My_Component";\n' +
' // ...\n' +
' }\n\n' +
'Alternatively, use register_component(name, class) to specify the name explicitly:\n' +
' jqhtml.register_component("My_Component", My_Component);');
}
register_component(component_name, source);
return;
}
// Unknown type - provide helpful error
throw new Error('[JQHTML] register() requires a compiled JQHTML template or a component class.\n\n' +
'For templates:\n' +
' import My_Template from "./my_component.jqhtml";\n' +
' jqhtml.register(My_Template);\n\n' +
'For classes (with static component_name):\n' +
' class My_Component extends Jqhtml_Component {\n' +
' static component_name = "My_Component";\n' +
' }\n' +
' jqhtml.register(My_Component);\n\n' +
'For classes (without static component_name):\n' +
' jqhtml.register_component("My_Component", My_Component);');
}
/**
* JQHTML v2 Instruction Processor
@@ -879,7 +923,7 @@ function devWarn(message) {
console.warn(`[JQHTML Dev Warning] ${message}`);
}
// Get global jqhtml object
function getJqhtml$1() {
function getJqhtml() {
if (typeof window !== 'undefined' && window.jqhtml) {
return window.jqhtml;
}
@@ -892,7 +936,7 @@ function getJqhtml$1() {
}
// Visual flash effect
function flashComponent(component, eventType) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug?.flashComponents)
return;
const duration = jqhtml.debug.flashDuration || 500;
@@ -914,7 +958,7 @@ function flashComponent(component, eventType) {
}
// Log lifecycle event
function logLifecycle(component, phase, status) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug)
return;
const shouldLog = jqhtml.debug.logFullLifecycle ||
@@ -960,7 +1004,7 @@ function logLifecycle(component, phase, status) {
}
// Apply delays based on lifecycle phase
function applyDebugDelay(phase) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug)
return;
let delayMs = 0;
@@ -981,14 +1025,14 @@ function applyDebugDelay(phase) {
}
// Log instruction processing
function logInstruction(type, data) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug?.logInstructionProcessing)
return;
console.log(`[JQHTML Instruction] ${type}:`, data);
}
// Log data changes
function logDataChange(component, property, oldValue, newValue) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug?.traceDataFlow)
return;
console.log(`[JQHTML Data] ${component.constructor.name}#${component._cid}.data.${property}:`, { old: oldValue, new: newValue });
@@ -1001,7 +1045,7 @@ function updateComponentTree() {
}
// Router dispatch logging
function logDispatch(url, route, params, verbose = false) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug)
return;
const shouldLog = jqhtml.debug.logDispatch || jqhtml.debug.logDispatchVerbose;
@@ -1023,12 +1067,12 @@ function logDispatch(url, route, params, verbose = false) {
}
// Check if sequential processing is enabled
function isSequentialProcessing() {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
return jqhtml?.debug?.sequentialProcessing || false;
}
// Error handling with break on error
function handleComponentError(component, phase, error) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
console.error(`[JQHTML Error] ${component.constructor.name}#${component._cid} failed in ${phase}:`, error);
if (jqhtml?.debug?.breakOnError) {
debugger; // This will pause execution in dev tools
@@ -1056,6 +1100,9 @@ function handleComponentError(component, phase, error) {
* - Scoped IDs using _cid pattern
* - Event emission and CSS class hierarchy
*/
// WeakMap storage for protected lifecycle method implementations (Option 2)
// See docs/internal/lifecycle-method-protection.md for design details
const lifecycle_impls = new WeakMap();
class Jqhtml_Component {
constructor(element, args = {}) {
this._ready_state = 0; // 0=created, 1=init, 2=loaded, 3=rendered, 4=ready
@@ -1076,6 +1123,7 @@ class Jqhtml_Component {
this.__initial_data_snapshot = null; // Snapshot of this.data after on_create() for restoration before on_load()
this.__data_frozen = false; // Track if this.data is currently frozen
this.next_reload_force_refresh = null; // State machine for reload()/refresh() debounce precedence
this.__lifecycle_authorized = false; // Flag for lifecycle method protection
this._cid = this._generate_cid();
this._lifecycle_manager = LifecycleManager.get_instance();
// Create or wrap element
@@ -1189,6 +1237,63 @@ class Jqhtml_Component {
this.state = {};
this._log_lifecycle('construct', 'complete');
}
/**
* Protect lifecycle methods from manual invocation
* Stores original implementations in WeakMap, replaces with guarded wrappers
* @private
*/
_protect_lifecycle_methods() {
const methods = {
on_create: 'Called automatically during creation.',
on_render: 'Use render() to trigger a re-render.',
on_load: 'Use reload() to refresh data.',
on_ready: 'Called automatically when ready.',
on_stop: 'Use stop() to stop the component.'
};
const impls = {};
const self = this;
for (const [name, help] of Object.entries(methods)) {
const original = this[name];
// Skip if using base class default (empty method)
if (original === Jqhtml_Component.prototype[name])
continue;
impls[name] = original;
// Create wrapper with same function name (for stack traces)
this[name] = {
[name](...args) {
if (!self.__lifecycle_authorized) {
throw new Error(`[JQHTML] ${name}() cannot be called manually. ${help}\n` +
`Component: ${self.component_name()} (_cid: ${self._cid})`);
}
return lifecycle_impls.get(self)[name].apply(self, args);
}
}[name];
}
lifecycle_impls.set(this, impls);
}
/**
* Call a lifecycle method with authorization (async)
* Framework calls this to invoke lifecycle methods, bypassing the protection wrapper.
* The flag is set momentarily for the wrapper check, then reset BEFORE user code runs.
* This ensures any nested lifecycle calls from user code will fail the flag check.
* @private
*/
async _call_lifecycle(name, context) {
// Get the original implementation (bypasses wrapper entirely)
const impl = lifecycle_impls.get(this)?.[name] || this[name];
// Call original directly - no flag needed since we bypass the wrapper
return await impl.call(context || this);
}
/**
* Call a lifecycle method with authorization (sync version for sync methods like on_stop)
* @private
*/
_call_lifecycle_sync(name) {
// Get the original implementation (bypasses wrapper entirely)
const impl = lifecycle_impls.get(this)?.[name] || this[name];
// Call original directly - no flag needed since we bypass the wrapper
return impl.call(this);
}
/**
* Boot - Start the full component lifecycle
* Called immediately after construction by instruction processor
@@ -1202,6 +1307,8 @@ class Jqhtml_Component {
if (this._booted)
return;
this._booted = true;
// Protect lifecycle methods from manual invocation (must happen after subclass constructor)
this._protect_lifecycle_methods();
await this._lifecycle_manager.boot_component(this);
}
// -------------------------------------------------------------------------
@@ -1412,9 +1519,9 @@ class Jqhtml_Component {
// Don't update ready state here - let phases complete in order
this._update_debug_attrs();
this._log_lifecycle('render', 'complete');
// Call on_render() immediately after render completes
// Call on_render() with authorization (sync) immediately after render completes
// This ensures event handlers are always re-attached after DOM updates
const renderResult = this.on_render();
const renderResult = this._call_lifecycle_sync('on_render');
if (renderResult && typeof renderResult.then === 'function') {
console.warn(`[JQHTML] Component "${this.component_name()}" returned a Promise from on_render(). ` +
`on_render() must be synchronous code. Remove 'async' from the function declaration.`);
@@ -1479,8 +1586,8 @@ class Jqhtml_Component {
if (this._render_count !== render_id) {
return; // Stale render, don't call on_ready
}
// Call on_ready hook
await this.on_ready();
// Call on_ready hook with authorization
await this._call_lifecycle('on_ready');
// Trigger ready event
await this.trigger('ready');
})();
@@ -1500,8 +1607,8 @@ class Jqhtml_Component {
if (this._stopped || this._ready_state >= 1)
return;
this._log_lifecycle('create', 'start');
// Call on_create() and validate it's synchronous
const result = this.on_create();
// Call on_create() with authorization and validate it's synchronous
const result = await this._call_lifecycle('on_create');
if (result && typeof result.then === 'function') {
console.warn(`[JQHTML] Component "${this.component_name()}" returned a Promise from on_create(). ` +
`on_create() must be synchronous code. Remove 'async' from the function declaration.`);
@@ -1616,8 +1723,8 @@ class Jqhtml_Component {
if (window.jqhtml?.debug?.verbose) {
console.log(`[Cache] Component ${this._cid} (${this.component_name()}) has non-serializable args - load deduplication and caching disabled`, { uncacheable_property });
}
// Execute on_load() without deduplication or caching
await this.on_load();
// Execute on_load() with authorization, without deduplication or caching
await this._call_lifecycle('on_load');
this.__data_frozen = true;
return;
}
@@ -1726,7 +1833,7 @@ class Jqhtml_Component {
// - Should errors reset state machine flags (next_reload_force_refresh)?
// - Should partial data be preserved or rolled back?
// - Should followers be notified differently based on error type?
await this.on_load.call(restricted_this);
await this._call_lifecycle('on_load', restricted_this);
}
catch (error) {
// Handle error and notify coordinator
@@ -1798,7 +1905,7 @@ class Jqhtml_Component {
this._log_lifecycle('ready', 'start');
// Wait for all children to reach ready state (bottom-up execution)
await this._wait_for_children_ready();
await this.on_ready();
await this._call_lifecycle('on_ready');
this._ready_state = 4;
this._update_debug_attrs();
this._log_lifecycle('ready', 'complete');
@@ -2014,7 +2121,7 @@ class Jqhtml_Component {
this.data = JSON.parse(JSON.stringify(this.__initial_data_snapshot));
}
try {
await this.on_load();
await this._call_lifecycle('on_load');
}
finally {
// Freeze this.data after on_load() completes
@@ -2090,7 +2197,7 @@ class Jqhtml_Component {
// STEP 3.5 & 4: Wait for children and call on_ready (only if we rendered)
if (rendered_from_cache || should_render) {
await this._wait_for_children_ready();
await this.on_ready();
await this._call_lifecycle('on_ready');
}
this._log_lifecycle('reload', 'complete');
}
@@ -2124,16 +2231,14 @@ class Jqhtml_Component {
this.$.addClass('_Component_Stopped');
// Unregister from lifecycle manager
this._lifecycle_manager.unregister_component(this);
// Call user's on_stop() hook
const stopResult = this.on_stop();
// Call user's on_stop() hook with authorization (sync)
const stopResult = this._call_lifecycle_sync('on_stop');
if (stopResult && typeof stopResult.then === 'function') {
console.warn(`[JQHTML] Component "${this.component_name()}" returned a Promise from on_stop(). ` +
`on_stop() must be synchronous code. Remove 'async' from the function declaration.`);
}
// Fire registered destroy callbacks
this.trigger('destroy');
// Trigger jQuery destroy event
this.$.trigger('destroy');
// Fire registered stop callbacks
this.trigger('stop');
// Remove from DOM parent's children
if (this._dom_parent) {
this._dom_parent._dom_children.delete(this);
@@ -2696,6 +2801,8 @@ class Jqhtml_Component {
};
}
}
// Static properties
Jqhtml_Component.__jqhtml_component = true; // Marker for unified register() detection
/**
* JQHTML v2 Template Renderer
@@ -3091,388 +3198,6 @@ function hydrateElement($element, jQ) {
}
}
/**
* JQHTML Debug Overlay
*
* Independent debug controls using pure jQuery DOM manipulation.
* Does NOT use JQHTML components so it works even when components are broken.
*/
// Get global jQuery
function getJQuery() {
if (typeof window !== 'undefined' && window.$) {
return window.$;
}
if (typeof window !== 'undefined' && window.jQuery) {
return window.jQuery;
}
throw new Error('FATAL: jQuery is not defined. jQuery must be loaded before using JQHTML. ' +
'Add <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script> before loading JQHTML.');
}
// Get global jqhtml object
function getJqhtml() {
if (typeof window !== 'undefined' && window.jqhtml) {
return window.jqhtml;
}
if (typeof globalThis !== 'undefined' && globalThis.jqhtml) {
return globalThis.jqhtml;
}
throw new Error('FATAL: window.jqhtml is not defined. The JQHTML runtime must be loaded before using JQHTML components. ' +
'Ensure @jqhtml/core is imported and initialized before attempting to use debug features.');
}
class DebugOverlay {
constructor(options = {}) {
this.$container = null;
this.$statusIndicator = null;
this.$ = getJQuery();
if (!this.$) {
throw new Error('jQuery is required for DebugOverlay');
}
this.options = {
position: 'bottom',
theme: 'dark',
compact: false,
showStatus: true,
autoHide: false,
...options
};
}
/**
* Static method to show debug overlay (singleton pattern)
*/
static show(options) {
if (!DebugOverlay.instance) {
DebugOverlay.instance = new DebugOverlay(options);
}
DebugOverlay.instance.display();
return DebugOverlay.instance;
}
/**
* Static method to hide debug overlay
*/
static hide() {
if (DebugOverlay.instance) {
DebugOverlay.instance.hide();
}
}
/**
* Static method to toggle debug overlay visibility
*/
static toggle() {
if (DebugOverlay.instance && DebugOverlay.instance.$container) {
if (DebugOverlay.instance.$container.is(':visible')) {
DebugOverlay.hide();
}
else {
DebugOverlay.instance.display();
}
}
else {
DebugOverlay.show();
}
}
/**
* Static method to destroy debug overlay
*/
static destroy() {
if (DebugOverlay.instance) {
DebugOverlay.instance.destroy();
DebugOverlay.instance = null;
}
}
/**
* Display the debug overlay
*/
display() {
if (this.$container) {
this.$container.show();
return;
}
this.createOverlay();
if (this.options.showStatus) {
this.createStatusIndicator();
}
}
/**
* Hide the debug overlay
*/
hide() {
if (this.$container) {
this.$container.hide();
}
if (this.$statusIndicator) {
this.$statusIndicator.hide();
}
}
/**
* Remove the debug overlay completely
*/
destroy() {
if (this.$container) {
this.$container.remove();
this.$container = null;
}
if (this.$statusIndicator) {
this.$statusIndicator.remove();
this.$statusIndicator = null;
}
}
/**
* Update the status indicator
*/
updateStatus(mode) {
if (!this.$statusIndicator)
return;
this.$statusIndicator.text('Debug: ' + mode);
this.$statusIndicator.attr('class', 'jqhtml-debug-status' + (mode !== 'Off' ? ' active' : ''));
}
createOverlay() {
// Add styles first
this.addStyles();
// Create container using jQuery
this.$container = this.$('<div>')
.addClass(`jqhtml-debug-overlay ${this.options.theme} ${this.options.position}`);
// Create content structure
const $content = this.$('<div>').addClass('jqhtml-debug-content');
const $controls = this.$('<div>').addClass('jqhtml-debug-controls');
// Add title
const $title = this.$('<span>')
.addClass('jqhtml-debug-title')
.html('<strong>🐛 JQHTML Debug:</strong>');
$controls.append($title);
// Create buttons
const buttons = [
{ text: 'Slow Motion + Flash', action: 'enableSlowMotionDebug', class: 'success' },
{ text: 'Basic Debug', action: 'enableBasicDebug', class: '' },
{ text: 'Full Debug', action: 'enableFullDebug', class: '' },
{ text: 'Sequential', action: 'enableSequentialMode', class: '' },
{ text: 'Clear Debug', action: 'clearAllDebug', class: 'danger' },
{ text: 'Settings', action: 'showDebugInfo', class: '' }
];
buttons.forEach(btn => {
const $button = this.$('<button>')
.text(btn.text)
.addClass('jqhtml-debug-btn' + (btn.class ? ` ${btn.class}` : ''))
.on('click', () => this.executeAction(btn.action));
$controls.append($button);
});
// Add minimize/close button
const $toggleBtn = this.$('<button>')
.text(this.options.compact ? '▼' : '▲')
.addClass('jqhtml-debug-toggle')
.on('click', () => this.toggle());
$controls.append($toggleBtn);
// Assemble and add to page
$content.append($controls);
this.$container.append($content);
this.$('body').append(this.$container);
}
createStatusIndicator() {
this.$statusIndicator = this.$('<div>')
.addClass('jqhtml-debug-status')
.text('Debug: Off')
.css({
position: 'fixed',
top: '10px',
right: '10px',
background: '#2c3e50',
color: 'white',
padding: '5px 10px',
borderRadius: '4px',
fontSize: '0.75rem',
zIndex: '10001',
opacity: '0.8',
fontFamily: 'monospace'
});
this.$('body').append(this.$statusIndicator);
}
addStyles() {
// Check if styles already exist
if (this.$('#jqhtml-debug-styles').length > 0)
return;
// Create and inject CSS using jQuery - concatenated strings for better minification
const $style = this.$('<style>')
.attr('id', 'jqhtml-debug-styles')
.text('.jqhtml-debug-overlay {' +
'position: fixed;' +
'left: 0;' +
'right: 0;' +
'z-index: 10000;' +
'font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;' +
'font-size: 0.8rem;' +
'box-shadow: 0 2px 10px rgba(0,0,0,0.2);' +
'}' +
'.jqhtml-debug-overlay.top {' +
'top: 0;' +
'}' +
'.jqhtml-debug-overlay.bottom {' +
'bottom: 0;' +
'}' +
'.jqhtml-debug-overlay.dark {' +
'background: #34495e;' +
'color: #ecf0f1;' +
'}' +
'.jqhtml-debug-overlay.light {' +
'background: #f8f9fa;' +
'color: #333;' +
'border-bottom: 1px solid #dee2e6;' +
'}' +
'.jqhtml-debug-content {' +
'padding: 0.5rem 1rem;' +
'}' +
'.jqhtml-debug-controls {' +
'display: flex;' +
'flex-wrap: wrap;' +
'gap: 8px;' +
'align-items: center;' +
'}' +
'.jqhtml-debug-title {' +
'margin-right: 10px;' +
'font-weight: bold;' +
'}' +
'.jqhtml-debug-btn {' +
'padding: 4px 8px;' +
'border: none;' +
'border-radius: 3px;' +
'background: #3498db;' +
'color: white;' +
'cursor: pointer;' +
'font-size: 0.75rem;' +
'transition: background 0.2s;' +
'}' +
'.jqhtml-debug-btn:hover {' +
'background: #2980b9;' +
'}' +
'.jqhtml-debug-btn.success {' +
'background: #27ae60;' +
'}' +
'.jqhtml-debug-btn.success:hover {' +
'background: #229954;' +
'}' +
'.jqhtml-debug-btn.danger {' +
'background: #e74c3c;' +
'}' +
'.jqhtml-debug-btn.danger:hover {' +
'background: #c0392b;' +
'}' +
'.jqhtml-debug-toggle {' +
'padding: 4px 8px;' +
'border: none;' +
'border-radius: 3px;' +
'background: #7f8c8d;' +
'color: white;' +
'cursor: pointer;' +
'font-size: 0.75rem;' +
'margin-left: auto;' +
'}' +
'.jqhtml-debug-toggle:hover {' +
'background: #6c7b7d;' +
'}' +
'.jqhtml-debug-status.active {' +
'background: #27ae60 !important;' +
'}' +
'@media (max-width: 768px) {' +
'.jqhtml-debug-controls {' +
'flex-direction: column;' +
'align-items: flex-start;' +
'}' +
'.jqhtml-debug-title {' +
'margin-bottom: 5px;' +
'}' +
'}');
this.$('head').append($style);
}
toggle() {
// Toggle between compact and full view
this.options.compact = !this.options.compact;
const $toggleBtn = this.$container.find('.jqhtml-debug-toggle');
$toggleBtn.text(this.options.compact ? '▼' : '▲');
const $buttons = this.$container.find('.jqhtml-debug-btn');
if (this.options.compact) {
$buttons.hide();
}
else {
$buttons.show();
}
}
executeAction(action) {
const jqhtml = getJqhtml();
if (!jqhtml) {
console.warn('JQHTML not available - make sure it\'s loaded and exposed globally');
return;
}
switch (action) {
case 'enableSlowMotionDebug':
jqhtml.setDebugSettings({
logFullLifecycle: true,
sequentialProcessing: true,
delayAfterComponent: 150,
delayAfterRender: 200,
delayAfterRerender: 250,
flashComponents: true,
flashDuration: 800,
flashColors: {
create: '#3498db',
render: '#27ae60',
ready: '#9b59b6'
},
profilePerformance: true,
highlightSlowRenders: 30,
logDispatch: true
});
this.updateStatus('Slow Motion');
console.log('🐛 Slow Motion Debug Mode Enabled');
break;
case 'enableBasicDebug':
jqhtml.enableDebugMode('basic');
this.updateStatus('Basic');
console.log('🐛 Basic Debug Mode Enabled');
break;
case 'enableFullDebug':
jqhtml.enableDebugMode('full');
this.updateStatus('Full');
console.log('🐛 Full Debug Mode Enabled');
break;
case 'enableSequentialMode':
jqhtml.setDebugSettings({
logCreationReady: true,
sequentialProcessing: true,
flashComponents: true,
profilePerformance: true
});
this.updateStatus('Sequential');
console.log('🐛 Sequential Processing Mode Enabled');
break;
case 'clearAllDebug':
jqhtml.clearDebugSettings();
this.updateStatus('Off');
console.log('🐛 All Debug Modes Disabled');
break;
case 'showDebugInfo':
const settings = JSON.stringify(jqhtml.debug, null, 2);
console.log('🐛 Current Debug Settings:', settings);
alert('Debug settings logged to console:\n\n' + (Object.keys(jqhtml.debug).length > 0 ? settings : 'No debug settings active'));
break;
}
}
}
DebugOverlay.instance = null;
// Simplified global convenience functions that use static methods
function showDebugOverlay(options) {
return DebugOverlay.show(options);
}
function hideDebugOverlay() {
DebugOverlay.hide();
}
// Auto-initialize if debug query parameter is present
if (typeof window !== 'undefined') {
const urlParams = new URLSearchParams(window.location.search);
if (urlParams.get('debug') === 'true' || urlParams.get('jqhtml-debug') === 'true') {
document.addEventListener('DOMContentLoaded', () => {
DebugOverlay.show();
});
}
}
/**
* JQHTML v2 jQuery Plugin
*
@@ -3669,47 +3394,6 @@ function init_jquery_plugin(jQuery) {
// Return the jQuery element to enable chaining (fluent interface pattern)
return targetElement;
};
// Store original jQuery methods for overriding
const _jqhtml_jquery_overrides = {};
// EXPERIMENTAL: Override DOM manipulation methods to support component instances as arguments
// and to trigger ready() when components are added to the DOM
// NOTE: This feature needs thorough testing in production scenarios
const dom_insertion_methods = ['append', 'prepend', 'before', 'after', 'replaceWith'];
for (const fnname of dom_insertion_methods) {
_jqhtml_jquery_overrides[fnname] = jQuery.fn[fnname];
jQuery.fn[fnname] = function (...args) {
// Resolve all component instances into jQuery elements
const resolvedArgs = args.map(arg => {
if (arg && typeof arg === 'object' && arg instanceof Jqhtml_Component) {
return arg.$;
}
return arg;
});
// Make a list of all jQuery elements in the arguments
const $elements = resolvedArgs.filter((arg) => arg instanceof jQuery);
// Call the original jQuery method with resolved arguments
const ret = _jqhtml_jquery_overrides[fnname].apply(this, resolvedArgs);
// For each jQuery element that is now in the DOM and hasn't triggered ready yet,
// find any uninitialized components and boot them
for (const $e of $elements) {
// Check if element is in the DOM
if ($e.closest('html').length > 0) {
// Find any components that haven't been initialized yet
$e.find('.Component').addBack('.Component').each(function () {
const $comp = jQuery(this);
const component = $comp.data('_component');
// If component exists and hasn't been booted yet, boot it
if (component && !component._ready_state) {
component._boot();
}
});
}
}
return ret;
};
}
// Note: Component destruction is handled automatically by MutationObserver
// in lifecycle-manager.ts. No jQuery method overrides needed for cleanup.
/**
* shallowFind - Find nearest descendants matching selector
*
@@ -4371,16 +4055,17 @@ function init(jQuery) {
}
}
// Version - will be replaced during build with actual version from package.json
const version = '2.3.4';
const version = '2.3.9';
// Default export with all functionality
const jqhtml = {
// Core
Jqhtml_Component,
LifecycleManager,
// Registry
register,
register_component,
get_component_class,
register_template,
get_component_class,
get_template,
get_template_by_class,
create_component,
@@ -4395,6 +4080,8 @@ const jqhtml = {
escape_html,
// Version property - internal
__version: version,
// state facts
tombstone: 'pepperoni and cheese',
// Debug settings
debug: {
enabled: false,
@@ -4421,15 +4108,6 @@ const jqhtml = {
clearDebugSettings() {
this.debug = {};
},
// Debug overlay methods
showDebugOverlay(options) {
return DebugOverlay.show(options);
},
hideDebugOverlay() {
return DebugOverlay.hide();
},
// Export DebugOverlay class for direct access
DebugOverlay,
// Install globals function
installGlobals() {
if (typeof window !== 'undefined') {
@@ -4483,5 +4161,5 @@ if (typeof window !== 'undefined' && !window.jqhtml) {
}
}
export { DebugOverlay, Jqhtml_Component, LifecycleManager as Jqhtml_LifecycleManager, Jqhtml_Local_Storage, LifecycleManager, Load_Coordinator, applyDebugDelay, boot, create_component, jqhtml as default, devWarn, escape_html, extract_slots, get_component_class, get_component_names, get_registered_templates, get_template, get_template_by_class, handleComponentError, has_component, hideDebugOverlay, init, init_jquery_plugin, isSequentialProcessing, list_components, logDataChange, logDispatch, logInstruction, logLifecycle, process_instructions, register_component, register_template, render_template, showDebugOverlay, version };
export { Jqhtml_Component, LifecycleManager as Jqhtml_LifecycleManager, Jqhtml_Local_Storage, LifecycleManager, Load_Coordinator, applyDebugDelay, boot, create_component, jqhtml as default, devWarn, escape_html, extract_slots, get_component_class, get_component_names, get_registered_templates, get_template, get_template_by_class, handleComponentError, has_component, init, init_jquery_plugin, isSequentialProcessing, list_components, logDataChange, logDispatch, logInstruction, logLifecycle, process_instructions, register, register_component, register_template, render_template, version };
//# sourceMappingURL=index.js.map

2
node_modules/@jqhtml/core/dist/index.js.map generated vendored Normal file → Executable file

File diff suppressed because one or more lines are too long

0
node_modules/@jqhtml/core/dist/instruction-processor.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/core/dist/instruction-processor.d.ts.map generated vendored Normal file → Executable file
View File

604
node_modules/@jqhtml/core/dist/jqhtml-core.esm.js generated vendored Normal file → Executable file
View File

@@ -1,5 +1,5 @@
/**
* JQHTML Core v2.3.4
* JQHTML Core v2.3.9
* (c) 2025 JQHTML Team
* Released under the MIT License
*/
@@ -356,6 +356,50 @@ function list_components() {
}
return result;
}
/**
* Unified registration function - auto-detects source type and delegates
*
* Accepts either:
* - A compiled JQHTML template (has __jqhtml_template: true)
* - A component class extending Jqhtml_Component (has static __jqhtml_component: true and static component_name)
*
* @param source - Compiled template or component class
*/
function register(source) {
// Check for template (compiled .jqhtml file)
if (source && typeof source === 'object' && '__jqhtml_template' in source && source.__jqhtml_template === true) {
register_template(source);
return;
}
// Check for component class (extends Jqhtml_Component)
if (source && typeof source === 'function' && '__jqhtml_component' in source && source.__jqhtml_component === true) {
const component_name = source.component_name;
if (!component_name || typeof component_name !== 'string') {
throw new Error('[JQHTML] Component class must define static component_name property.\n\n' +
'Example:\n' +
' class My_Component extends Jqhtml_Component {\n' +
' static component_name = "My_Component";\n' +
' // ...\n' +
' }\n\n' +
'Alternatively, use register_component(name, class) to specify the name explicitly:\n' +
' jqhtml.register_component("My_Component", My_Component);');
}
register_component(component_name, source);
return;
}
// Unknown type - provide helpful error
throw new Error('[JQHTML] register() requires a compiled JQHTML template or a component class.\n\n' +
'For templates:\n' +
' import My_Template from "./my_component.jqhtml";\n' +
' jqhtml.register(My_Template);\n\n' +
'For classes (with static component_name):\n' +
' class My_Component extends Jqhtml_Component {\n' +
' static component_name = "My_Component";\n' +
' }\n' +
' jqhtml.register(My_Component);\n\n' +
'For classes (without static component_name):\n' +
' jqhtml.register_component("My_Component", My_Component);');
}
/**
* JQHTML v2 Instruction Processor
@@ -884,7 +928,7 @@ function devWarn(message) {
console.warn(`[JQHTML Dev Warning] ${message}`);
}
// Get global jqhtml object
function getJqhtml$1() {
function getJqhtml() {
if (typeof window !== 'undefined' && window.jqhtml) {
return window.jqhtml;
}
@@ -897,7 +941,7 @@ function getJqhtml$1() {
}
// Visual flash effect
function flashComponent(component, eventType) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug?.flashComponents)
return;
const duration = jqhtml.debug.flashDuration || 500;
@@ -919,7 +963,7 @@ function flashComponent(component, eventType) {
}
// Log lifecycle event
function logLifecycle(component, phase, status) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug)
return;
const shouldLog = jqhtml.debug.logFullLifecycle ||
@@ -965,7 +1009,7 @@ function logLifecycle(component, phase, status) {
}
// Apply delays based on lifecycle phase
function applyDebugDelay(phase) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug)
return;
let delayMs = 0;
@@ -986,14 +1030,14 @@ function applyDebugDelay(phase) {
}
// Log instruction processing
function logInstruction(type, data) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug?.logInstructionProcessing)
return;
console.log(`[JQHTML Instruction] ${type}:`, data);
}
// Log data changes
function logDataChange(component, property, oldValue, newValue) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug?.traceDataFlow)
return;
console.log(`[JQHTML Data] ${component.constructor.name}#${component._cid}.data.${property}:`, { old: oldValue, new: newValue });
@@ -1006,7 +1050,7 @@ function updateComponentTree() {
}
// Router dispatch logging
function logDispatch(url, route, params, verbose = false) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
if (!jqhtml?.debug)
return;
const shouldLog = jqhtml.debug.logDispatch || jqhtml.debug.logDispatchVerbose;
@@ -1028,12 +1072,12 @@ function logDispatch(url, route, params, verbose = false) {
}
// Check if sequential processing is enabled
function isSequentialProcessing() {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
return jqhtml?.debug?.sequentialProcessing || false;
}
// Error handling with break on error
function handleComponentError(component, phase, error) {
const jqhtml = getJqhtml$1();
const jqhtml = getJqhtml();
console.error(`[JQHTML Error] ${component.constructor.name}#${component._cid} failed in ${phase}:`, error);
if (jqhtml?.debug?.breakOnError) {
debugger; // This will pause execution in dev tools
@@ -1061,6 +1105,9 @@ function handleComponentError(component, phase, error) {
* - Scoped IDs using _cid pattern
* - Event emission and CSS class hierarchy
*/
// WeakMap storage for protected lifecycle method implementations (Option 2)
// See docs/internal/lifecycle-method-protection.md for design details
const lifecycle_impls = new WeakMap();
class Jqhtml_Component {
constructor(element, args = {}) {
this._ready_state = 0; // 0=created, 1=init, 2=loaded, 3=rendered, 4=ready
@@ -1081,6 +1128,7 @@ class Jqhtml_Component {
this.__initial_data_snapshot = null; // Snapshot of this.data after on_create() for restoration before on_load()
this.__data_frozen = false; // Track if this.data is currently frozen
this.next_reload_force_refresh = null; // State machine for reload()/refresh() debounce precedence
this.__lifecycle_authorized = false; // Flag for lifecycle method protection
this._cid = this._generate_cid();
this._lifecycle_manager = LifecycleManager.get_instance();
// Create or wrap element
@@ -1194,6 +1242,63 @@ class Jqhtml_Component {
this.state = {};
this._log_lifecycle('construct', 'complete');
}
/**
* Protect lifecycle methods from manual invocation
* Stores original implementations in WeakMap, replaces with guarded wrappers
* @private
*/
_protect_lifecycle_methods() {
const methods = {
on_create: 'Called automatically during creation.',
on_render: 'Use render() to trigger a re-render.',
on_load: 'Use reload() to refresh data.',
on_ready: 'Called automatically when ready.',
on_stop: 'Use stop() to stop the component.'
};
const impls = {};
const self = this;
for (const [name, help] of Object.entries(methods)) {
const original = this[name];
// Skip if using base class default (empty method)
if (original === Jqhtml_Component.prototype[name])
continue;
impls[name] = original;
// Create wrapper with same function name (for stack traces)
this[name] = {
[name](...args) {
if (!self.__lifecycle_authorized) {
throw new Error(`[JQHTML] ${name}() cannot be called manually. ${help}\n` +
`Component: ${self.component_name()} (_cid: ${self._cid})`);
}
return lifecycle_impls.get(self)[name].apply(self, args);
}
}[name];
}
lifecycle_impls.set(this, impls);
}
/**
* Call a lifecycle method with authorization (async)
* Framework calls this to invoke lifecycle methods, bypassing the protection wrapper.
* The flag is set momentarily for the wrapper check, then reset BEFORE user code runs.
* This ensures any nested lifecycle calls from user code will fail the flag check.
* @private
*/
async _call_lifecycle(name, context) {
// Get the original implementation (bypasses wrapper entirely)
const impl = lifecycle_impls.get(this)?.[name] || this[name];
// Call original directly - no flag needed since we bypass the wrapper
return await impl.call(context || this);
}
/**
* Call a lifecycle method with authorization (sync version for sync methods like on_stop)
* @private
*/
_call_lifecycle_sync(name) {
// Get the original implementation (bypasses wrapper entirely)
const impl = lifecycle_impls.get(this)?.[name] || this[name];
// Call original directly - no flag needed since we bypass the wrapper
return impl.call(this);
}
/**
* Boot - Start the full component lifecycle
* Called immediately after construction by instruction processor
@@ -1207,6 +1312,8 @@ class Jqhtml_Component {
if (this._booted)
return;
this._booted = true;
// Protect lifecycle methods from manual invocation (must happen after subclass constructor)
this._protect_lifecycle_methods();
await this._lifecycle_manager.boot_component(this);
}
// -------------------------------------------------------------------------
@@ -1417,9 +1524,9 @@ class Jqhtml_Component {
// Don't update ready state here - let phases complete in order
this._update_debug_attrs();
this._log_lifecycle('render', 'complete');
// Call on_render() immediately after render completes
// Call on_render() with authorization (sync) immediately after render completes
// This ensures event handlers are always re-attached after DOM updates
const renderResult = this.on_render();
const renderResult = this._call_lifecycle_sync('on_render');
if (renderResult && typeof renderResult.then === 'function') {
console.warn(`[JQHTML] Component "${this.component_name()}" returned a Promise from on_render(). ` +
`on_render() must be synchronous code. Remove 'async' from the function declaration.`);
@@ -1484,8 +1591,8 @@ class Jqhtml_Component {
if (this._render_count !== render_id) {
return; // Stale render, don't call on_ready
}
// Call on_ready hook
await this.on_ready();
// Call on_ready hook with authorization
await this._call_lifecycle('on_ready');
// Trigger ready event
await this.trigger('ready');
})();
@@ -1505,8 +1612,8 @@ class Jqhtml_Component {
if (this._stopped || this._ready_state >= 1)
return;
this._log_lifecycle('create', 'start');
// Call on_create() and validate it's synchronous
const result = this.on_create();
// Call on_create() with authorization and validate it's synchronous
const result = await this._call_lifecycle('on_create');
if (result && typeof result.then === 'function') {
console.warn(`[JQHTML] Component "${this.component_name()}" returned a Promise from on_create(). ` +
`on_create() must be synchronous code. Remove 'async' from the function declaration.`);
@@ -1621,8 +1728,8 @@ class Jqhtml_Component {
if (window.jqhtml?.debug?.verbose) {
console.log(`[Cache] Component ${this._cid} (${this.component_name()}) has non-serializable args - load deduplication and caching disabled`, { uncacheable_property });
}
// Execute on_load() without deduplication or caching
await this.on_load();
// Execute on_load() with authorization, without deduplication or caching
await this._call_lifecycle('on_load');
this.__data_frozen = true;
return;
}
@@ -1731,7 +1838,7 @@ class Jqhtml_Component {
// - Should errors reset state machine flags (next_reload_force_refresh)?
// - Should partial data be preserved or rolled back?
// - Should followers be notified differently based on error type?
await this.on_load.call(restricted_this);
await this._call_lifecycle('on_load', restricted_this);
}
catch (error) {
// Handle error and notify coordinator
@@ -1803,7 +1910,7 @@ class Jqhtml_Component {
this._log_lifecycle('ready', 'start');
// Wait for all children to reach ready state (bottom-up execution)
await this._wait_for_children_ready();
await this.on_ready();
await this._call_lifecycle('on_ready');
this._ready_state = 4;
this._update_debug_attrs();
this._log_lifecycle('ready', 'complete');
@@ -2019,7 +2126,7 @@ class Jqhtml_Component {
this.data = JSON.parse(JSON.stringify(this.__initial_data_snapshot));
}
try {
await this.on_load();
await this._call_lifecycle('on_load');
}
finally {
// Freeze this.data after on_load() completes
@@ -2095,7 +2202,7 @@ class Jqhtml_Component {
// STEP 3.5 & 4: Wait for children and call on_ready (only if we rendered)
if (rendered_from_cache || should_render) {
await this._wait_for_children_ready();
await this.on_ready();
await this._call_lifecycle('on_ready');
}
this._log_lifecycle('reload', 'complete');
}
@@ -2129,16 +2236,14 @@ class Jqhtml_Component {
this.$.addClass('_Component_Stopped');
// Unregister from lifecycle manager
this._lifecycle_manager.unregister_component(this);
// Call user's on_stop() hook
const stopResult = this.on_stop();
// Call user's on_stop() hook with authorization (sync)
const stopResult = this._call_lifecycle_sync('on_stop');
if (stopResult && typeof stopResult.then === 'function') {
console.warn(`[JQHTML] Component "${this.component_name()}" returned a Promise from on_stop(). ` +
`on_stop() must be synchronous code. Remove 'async' from the function declaration.`);
}
// Fire registered destroy callbacks
this.trigger('destroy');
// Trigger jQuery destroy event
this.$.trigger('destroy');
// Fire registered stop callbacks
this.trigger('stop');
// Remove from DOM parent's children
if (this._dom_parent) {
this._dom_parent._dom_children.delete(this);
@@ -2701,6 +2806,8 @@ class Jqhtml_Component {
};
}
}
// Static properties
Jqhtml_Component.__jqhtml_component = true; // Marker for unified register() detection
/**
* JQHTML v2 Template Renderer
@@ -3096,388 +3203,6 @@ function hydrateElement($element, jQ) {
}
}
/**
* JQHTML Debug Overlay
*
* Independent debug controls using pure jQuery DOM manipulation.
* Does NOT use JQHTML components so it works even when components are broken.
*/
// Get global jQuery
function getJQuery() {
if (typeof window !== 'undefined' && window.$) {
return window.$;
}
if (typeof window !== 'undefined' && window.jQuery) {
return window.jQuery;
}
throw new Error('FATAL: jQuery is not defined. jQuery must be loaded before using JQHTML. ' +
'Add <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script> before loading JQHTML.');
}
// Get global jqhtml object
function getJqhtml() {
if (typeof window !== 'undefined' && window.jqhtml) {
return window.jqhtml;
}
if (typeof globalThis !== 'undefined' && globalThis.jqhtml) {
return globalThis.jqhtml;
}
throw new Error('FATAL: window.jqhtml is not defined. The JQHTML runtime must be loaded before using JQHTML components. ' +
'Ensure @jqhtml/core is imported and initialized before attempting to use debug features.');
}
class DebugOverlay {
constructor(options = {}) {
this.$container = null;
this.$statusIndicator = null;
this.$ = getJQuery();
if (!this.$) {
throw new Error('jQuery is required for DebugOverlay');
}
this.options = {
position: 'bottom',
theme: 'dark',
compact: false,
showStatus: true,
autoHide: false,
...options
};
}
/**
* Static method to show debug overlay (singleton pattern)
*/
static show(options) {
if (!DebugOverlay.instance) {
DebugOverlay.instance = new DebugOverlay(options);
}
DebugOverlay.instance.display();
return DebugOverlay.instance;
}
/**
* Static method to hide debug overlay
*/
static hide() {
if (DebugOverlay.instance) {
DebugOverlay.instance.hide();
}
}
/**
* Static method to toggle debug overlay visibility
*/
static toggle() {
if (DebugOverlay.instance && DebugOverlay.instance.$container) {
if (DebugOverlay.instance.$container.is(':visible')) {
DebugOverlay.hide();
}
else {
DebugOverlay.instance.display();
}
}
else {
DebugOverlay.show();
}
}
/**
* Static method to destroy debug overlay
*/
static destroy() {
if (DebugOverlay.instance) {
DebugOverlay.instance.destroy();
DebugOverlay.instance = null;
}
}
/**
* Display the debug overlay
*/
display() {
if (this.$container) {
this.$container.show();
return;
}
this.createOverlay();
if (this.options.showStatus) {
this.createStatusIndicator();
}
}
/**
* Hide the debug overlay
*/
hide() {
if (this.$container) {
this.$container.hide();
}
if (this.$statusIndicator) {
this.$statusIndicator.hide();
}
}
/**
* Remove the debug overlay completely
*/
destroy() {
if (this.$container) {
this.$container.remove();
this.$container = null;
}
if (this.$statusIndicator) {
this.$statusIndicator.remove();
this.$statusIndicator = null;
}
}
/**
* Update the status indicator
*/
updateStatus(mode) {
if (!this.$statusIndicator)
return;
this.$statusIndicator.text('Debug: ' + mode);
this.$statusIndicator.attr('class', 'jqhtml-debug-status' + (mode !== 'Off' ? ' active' : ''));
}
createOverlay() {
// Add styles first
this.addStyles();
// Create container using jQuery
this.$container = this.$('<div>')
.addClass(`jqhtml-debug-overlay ${this.options.theme} ${this.options.position}`);
// Create content structure
const $content = this.$('<div>').addClass('jqhtml-debug-content');
const $controls = this.$('<div>').addClass('jqhtml-debug-controls');
// Add title
const $title = this.$('<span>')
.addClass('jqhtml-debug-title')
.html('<strong>🐛 JQHTML Debug:</strong>');
$controls.append($title);
// Create buttons
const buttons = [
{ text: 'Slow Motion + Flash', action: 'enableSlowMotionDebug', class: 'success' },
{ text: 'Basic Debug', action: 'enableBasicDebug', class: '' },
{ text: 'Full Debug', action: 'enableFullDebug', class: '' },
{ text: 'Sequential', action: 'enableSequentialMode', class: '' },
{ text: 'Clear Debug', action: 'clearAllDebug', class: 'danger' },
{ text: 'Settings', action: 'showDebugInfo', class: '' }
];
buttons.forEach(btn => {
const $button = this.$('<button>')
.text(btn.text)
.addClass('jqhtml-debug-btn' + (btn.class ? ` ${btn.class}` : ''))
.on('click', () => this.executeAction(btn.action));
$controls.append($button);
});
// Add minimize/close button
const $toggleBtn = this.$('<button>')
.text(this.options.compact ? '▼' : '▲')
.addClass('jqhtml-debug-toggle')
.on('click', () => this.toggle());
$controls.append($toggleBtn);
// Assemble and add to page
$content.append($controls);
this.$container.append($content);
this.$('body').append(this.$container);
}
createStatusIndicator() {
this.$statusIndicator = this.$('<div>')
.addClass('jqhtml-debug-status')
.text('Debug: Off')
.css({
position: 'fixed',
top: '10px',
right: '10px',
background: '#2c3e50',
color: 'white',
padding: '5px 10px',
borderRadius: '4px',
fontSize: '0.75rem',
zIndex: '10001',
opacity: '0.8',
fontFamily: 'monospace'
});
this.$('body').append(this.$statusIndicator);
}
addStyles() {
// Check if styles already exist
if (this.$('#jqhtml-debug-styles').length > 0)
return;
// Create and inject CSS using jQuery - concatenated strings for better minification
const $style = this.$('<style>')
.attr('id', 'jqhtml-debug-styles')
.text('.jqhtml-debug-overlay {' +
'position: fixed;' +
'left: 0;' +
'right: 0;' +
'z-index: 10000;' +
'font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;' +
'font-size: 0.8rem;' +
'box-shadow: 0 2px 10px rgba(0,0,0,0.2);' +
'}' +
'.jqhtml-debug-overlay.top {' +
'top: 0;' +
'}' +
'.jqhtml-debug-overlay.bottom {' +
'bottom: 0;' +
'}' +
'.jqhtml-debug-overlay.dark {' +
'background: #34495e;' +
'color: #ecf0f1;' +
'}' +
'.jqhtml-debug-overlay.light {' +
'background: #f8f9fa;' +
'color: #333;' +
'border-bottom: 1px solid #dee2e6;' +
'}' +
'.jqhtml-debug-content {' +
'padding: 0.5rem 1rem;' +
'}' +
'.jqhtml-debug-controls {' +
'display: flex;' +
'flex-wrap: wrap;' +
'gap: 8px;' +
'align-items: center;' +
'}' +
'.jqhtml-debug-title {' +
'margin-right: 10px;' +
'font-weight: bold;' +
'}' +
'.jqhtml-debug-btn {' +
'padding: 4px 8px;' +
'border: none;' +
'border-radius: 3px;' +
'background: #3498db;' +
'color: white;' +
'cursor: pointer;' +
'font-size: 0.75rem;' +
'transition: background 0.2s;' +
'}' +
'.jqhtml-debug-btn:hover {' +
'background: #2980b9;' +
'}' +
'.jqhtml-debug-btn.success {' +
'background: #27ae60;' +
'}' +
'.jqhtml-debug-btn.success:hover {' +
'background: #229954;' +
'}' +
'.jqhtml-debug-btn.danger {' +
'background: #e74c3c;' +
'}' +
'.jqhtml-debug-btn.danger:hover {' +
'background: #c0392b;' +
'}' +
'.jqhtml-debug-toggle {' +
'padding: 4px 8px;' +
'border: none;' +
'border-radius: 3px;' +
'background: #7f8c8d;' +
'color: white;' +
'cursor: pointer;' +
'font-size: 0.75rem;' +
'margin-left: auto;' +
'}' +
'.jqhtml-debug-toggle:hover {' +
'background: #6c7b7d;' +
'}' +
'.jqhtml-debug-status.active {' +
'background: #27ae60 !important;' +
'}' +
'@media (max-width: 768px) {' +
'.jqhtml-debug-controls {' +
'flex-direction: column;' +
'align-items: flex-start;' +
'}' +
'.jqhtml-debug-title {' +
'margin-bottom: 5px;' +
'}' +
'}');
this.$('head').append($style);
}
toggle() {
// Toggle between compact and full view
this.options.compact = !this.options.compact;
const $toggleBtn = this.$container.find('.jqhtml-debug-toggle');
$toggleBtn.text(this.options.compact ? '▼' : '▲');
const $buttons = this.$container.find('.jqhtml-debug-btn');
if (this.options.compact) {
$buttons.hide();
}
else {
$buttons.show();
}
}
executeAction(action) {
const jqhtml = getJqhtml();
if (!jqhtml) {
console.warn('JQHTML not available - make sure it\'s loaded and exposed globally');
return;
}
switch (action) {
case 'enableSlowMotionDebug':
jqhtml.setDebugSettings({
logFullLifecycle: true,
sequentialProcessing: true,
delayAfterComponent: 150,
delayAfterRender: 200,
delayAfterRerender: 250,
flashComponents: true,
flashDuration: 800,
flashColors: {
create: '#3498db',
render: '#27ae60',
ready: '#9b59b6'
},
profilePerformance: true,
highlightSlowRenders: 30,
logDispatch: true
});
this.updateStatus('Slow Motion');
console.log('🐛 Slow Motion Debug Mode Enabled');
break;
case 'enableBasicDebug':
jqhtml.enableDebugMode('basic');
this.updateStatus('Basic');
console.log('🐛 Basic Debug Mode Enabled');
break;
case 'enableFullDebug':
jqhtml.enableDebugMode('full');
this.updateStatus('Full');
console.log('🐛 Full Debug Mode Enabled');
break;
case 'enableSequentialMode':
jqhtml.setDebugSettings({
logCreationReady: true,
sequentialProcessing: true,
flashComponents: true,
profilePerformance: true
});
this.updateStatus('Sequential');
console.log('🐛 Sequential Processing Mode Enabled');
break;
case 'clearAllDebug':
jqhtml.clearDebugSettings();
this.updateStatus('Off');
console.log('🐛 All Debug Modes Disabled');
break;
case 'showDebugInfo':
const settings = JSON.stringify(jqhtml.debug, null, 2);
console.log('🐛 Current Debug Settings:', settings);
alert('Debug settings logged to console:\n\n' + (Object.keys(jqhtml.debug).length > 0 ? settings : 'No debug settings active'));
break;
}
}
}
DebugOverlay.instance = null;
// Simplified global convenience functions that use static methods
function showDebugOverlay(options) {
return DebugOverlay.show(options);
}
function hideDebugOverlay() {
DebugOverlay.hide();
}
// Auto-initialize if debug query parameter is present
if (typeof window !== 'undefined') {
const urlParams = new URLSearchParams(window.location.search);
if (urlParams.get('debug') === 'true' || urlParams.get('jqhtml-debug') === 'true') {
document.addEventListener('DOMContentLoaded', () => {
DebugOverlay.show();
});
}
}
/**
* JQHTML v2 jQuery Plugin
*
@@ -3674,47 +3399,6 @@ function init_jquery_plugin(jQuery) {
// Return the jQuery element to enable chaining (fluent interface pattern)
return targetElement;
};
// Store original jQuery methods for overriding
const _jqhtml_jquery_overrides = {};
// EXPERIMENTAL: Override DOM manipulation methods to support component instances as arguments
// and to trigger ready() when components are added to the DOM
// NOTE: This feature needs thorough testing in production scenarios
const dom_insertion_methods = ['append', 'prepend', 'before', 'after', 'replaceWith'];
for (const fnname of dom_insertion_methods) {
_jqhtml_jquery_overrides[fnname] = jQuery.fn[fnname];
jQuery.fn[fnname] = function (...args) {
// Resolve all component instances into jQuery elements
const resolvedArgs = args.map(arg => {
if (arg && typeof arg === 'object' && arg instanceof Jqhtml_Component) {
return arg.$;
}
return arg;
});
// Make a list of all jQuery elements in the arguments
const $elements = resolvedArgs.filter((arg) => arg instanceof jQuery);
// Call the original jQuery method with resolved arguments
const ret = _jqhtml_jquery_overrides[fnname].apply(this, resolvedArgs);
// For each jQuery element that is now in the DOM and hasn't triggered ready yet,
// find any uninitialized components and boot them
for (const $e of $elements) {
// Check if element is in the DOM
if ($e.closest('html').length > 0) {
// Find any components that haven't been initialized yet
$e.find('.Component').addBack('.Component').each(function () {
const $comp = jQuery(this);
const component = $comp.data('_component');
// If component exists and hasn't been booted yet, boot it
if (component && !component._ready_state) {
component._boot();
}
});
}
}
return ret;
};
}
// Note: Component destruction is handled automatically by MutationObserver
// in lifecycle-manager.ts. No jQuery method overrides needed for cleanup.
/**
* shallowFind - Find nearest descendants matching selector
*
@@ -4376,16 +4060,17 @@ function init(jQuery) {
}
}
// Version - will be replaced during build with actual version from package.json
const version = '2.3.4';
const version = '2.3.9';
// Default export with all functionality
const jqhtml = {
// Core
Jqhtml_Component,
LifecycleManager,
// Registry
register,
register_component,
get_component_class,
register_template,
get_component_class,
get_template,
get_template_by_class,
create_component,
@@ -4400,6 +4085,8 @@ const jqhtml = {
escape_html,
// Version property - internal
__version: version,
// state facts
tombstone: 'pepperoni and cheese',
// Debug settings
debug: {
enabled: false,
@@ -4426,15 +4113,6 @@ const jqhtml = {
clearDebugSettings() {
this.debug = {};
},
// Debug overlay methods
showDebugOverlay(options) {
return DebugOverlay.show(options);
},
hideDebugOverlay() {
return DebugOverlay.hide();
},
// Export DebugOverlay class for direct access
DebugOverlay,
// Install globals function
installGlobals() {
if (typeof window !== 'undefined') {
@@ -4488,5 +4166,5 @@ if (typeof window !== 'undefined' && !window.jqhtml) {
}
}
export { DebugOverlay, Jqhtml_Component, LifecycleManager as Jqhtml_LifecycleManager, Jqhtml_Local_Storage, LifecycleManager, Load_Coordinator, applyDebugDelay, boot, create_component, jqhtml as default, devWarn, escape_html, extract_slots, get_component_class, get_component_names, get_registered_templates, get_template, get_template_by_class, handleComponentError, has_component, hideDebugOverlay, init, init_jquery_plugin, isSequentialProcessing, list_components, logDataChange, logDispatch, logInstruction, logLifecycle, process_instructions, register_component, register_template, render_template, showDebugOverlay, version };
export { Jqhtml_Component, LifecycleManager as Jqhtml_LifecycleManager, Jqhtml_Local_Storage, LifecycleManager, Load_Coordinator, applyDebugDelay, boot, create_component, jqhtml as default, devWarn, escape_html, extract_slots, get_component_class, get_component_names, get_registered_templates, get_template, get_template_by_class, handleComponentError, has_component, init, init_jquery_plugin, isSequentialProcessing, list_components, logDataChange, logDispatch, logInstruction, logLifecycle, process_instructions, register, register_component, register_template, render_template, version };
//# sourceMappingURL=jqhtml-core.esm.js.map

2
node_modules/@jqhtml/core/dist/jqhtml-core.esm.js.map generated vendored Normal file → Executable file

File diff suppressed because one or more lines are too long

384
node_modules/@jqhtml/core/dist/jqhtml-debug.esm.js generated vendored Normal file → Executable file
View File

@@ -1,385 +1,3 @@
/**
* JQHTML Debug Overlay
*
* Independent debug controls using pure jQuery DOM manipulation.
* Does NOT use JQHTML components so it works even when components are broken.
*/
// Get global jQuery
function getJQuery() {
if (typeof window !== 'undefined' && window.$) {
return window.$;
}
if (typeof window !== 'undefined' && window.jQuery) {
return window.jQuery;
}
throw new Error('FATAL: jQuery is not defined. jQuery must be loaded before using JQHTML. ' +
'Add <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script> before loading JQHTML.');
}
// Get global jqhtml object
function getJqhtml$1() {
if (typeof window !== 'undefined' && window.jqhtml) {
return window.jqhtml;
}
if (typeof globalThis !== 'undefined' && globalThis.jqhtml) {
return globalThis.jqhtml;
}
throw new Error('FATAL: window.jqhtml is not defined. The JQHTML runtime must be loaded before using JQHTML components. ' +
'Ensure @jqhtml/core is imported and initialized before attempting to use debug features.');
}
class DebugOverlay {
constructor(options = {}) {
this.$container = null;
this.$statusIndicator = null;
this.$ = getJQuery();
if (!this.$) {
throw new Error('jQuery is required for DebugOverlay');
}
this.options = {
position: 'bottom',
theme: 'dark',
compact: false,
showStatus: true,
autoHide: false,
...options
};
}
/**
* Static method to show debug overlay (singleton pattern)
*/
static show(options) {
if (!DebugOverlay.instance) {
DebugOverlay.instance = new DebugOverlay(options);
}
DebugOverlay.instance.display();
return DebugOverlay.instance;
}
/**
* Static method to hide debug overlay
*/
static hide() {
if (DebugOverlay.instance) {
DebugOverlay.instance.hide();
}
}
/**
* Static method to toggle debug overlay visibility
*/
static toggle() {
if (DebugOverlay.instance && DebugOverlay.instance.$container) {
if (DebugOverlay.instance.$container.is(':visible')) {
DebugOverlay.hide();
}
else {
DebugOverlay.instance.display();
}
}
else {
DebugOverlay.show();
}
}
/**
* Static method to destroy debug overlay
*/
static destroy() {
if (DebugOverlay.instance) {
DebugOverlay.instance.destroy();
DebugOverlay.instance = null;
}
}
/**
* Display the debug overlay
*/
display() {
if (this.$container) {
this.$container.show();
return;
}
this.createOverlay();
if (this.options.showStatus) {
this.createStatusIndicator();
}
}
/**
* Hide the debug overlay
*/
hide() {
if (this.$container) {
this.$container.hide();
}
if (this.$statusIndicator) {
this.$statusIndicator.hide();
}
}
/**
* Remove the debug overlay completely
*/
destroy() {
if (this.$container) {
this.$container.remove();
this.$container = null;
}
if (this.$statusIndicator) {
this.$statusIndicator.remove();
this.$statusIndicator = null;
}
}
/**
* Update the status indicator
*/
updateStatus(mode) {
if (!this.$statusIndicator)
return;
this.$statusIndicator.text('Debug: ' + mode);
this.$statusIndicator.attr('class', 'jqhtml-debug-status' + (mode !== 'Off' ? ' active' : ''));
}
createOverlay() {
// Add styles first
this.addStyles();
// Create container using jQuery
this.$container = this.$('<div>')
.addClass(`jqhtml-debug-overlay ${this.options.theme} ${this.options.position}`);
// Create content structure
const $content = this.$('<div>').addClass('jqhtml-debug-content');
const $controls = this.$('<div>').addClass('jqhtml-debug-controls');
// Add title
const $title = this.$('<span>')
.addClass('jqhtml-debug-title')
.html('<strong>🐛 JQHTML Debug:</strong>');
$controls.append($title);
// Create buttons
const buttons = [
{ text: 'Slow Motion + Flash', action: 'enableSlowMotionDebug', class: 'success' },
{ text: 'Basic Debug', action: 'enableBasicDebug', class: '' },
{ text: 'Full Debug', action: 'enableFullDebug', class: '' },
{ text: 'Sequential', action: 'enableSequentialMode', class: '' },
{ text: 'Clear Debug', action: 'clearAllDebug', class: 'danger' },
{ text: 'Settings', action: 'showDebugInfo', class: '' }
];
buttons.forEach(btn => {
const $button = this.$('<button>')
.text(btn.text)
.addClass('jqhtml-debug-btn' + (btn.class ? ` ${btn.class}` : ''))
.on('click', () => this.executeAction(btn.action));
$controls.append($button);
});
// Add minimize/close button
const $toggleBtn = this.$('<button>')
.text(this.options.compact ? '▼' : '▲')
.addClass('jqhtml-debug-toggle')
.on('click', () => this.toggle());
$controls.append($toggleBtn);
// Assemble and add to page
$content.append($controls);
this.$container.append($content);
this.$('body').append(this.$container);
}
createStatusIndicator() {
this.$statusIndicator = this.$('<div>')
.addClass('jqhtml-debug-status')
.text('Debug: Off')
.css({
position: 'fixed',
top: '10px',
right: '10px',
background: '#2c3e50',
color: 'white',
padding: '5px 10px',
borderRadius: '4px',
fontSize: '0.75rem',
zIndex: '10001',
opacity: '0.8',
fontFamily: 'monospace'
});
this.$('body').append(this.$statusIndicator);
}
addStyles() {
// Check if styles already exist
if (this.$('#jqhtml-debug-styles').length > 0)
return;
// Create and inject CSS using jQuery - concatenated strings for better minification
const $style = this.$('<style>')
.attr('id', 'jqhtml-debug-styles')
.text('.jqhtml-debug-overlay {' +
'position: fixed;' +
'left: 0;' +
'right: 0;' +
'z-index: 10000;' +
'font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;' +
'font-size: 0.8rem;' +
'box-shadow: 0 2px 10px rgba(0,0,0,0.2);' +
'}' +
'.jqhtml-debug-overlay.top {' +
'top: 0;' +
'}' +
'.jqhtml-debug-overlay.bottom {' +
'bottom: 0;' +
'}' +
'.jqhtml-debug-overlay.dark {' +
'background: #34495e;' +
'color: #ecf0f1;' +
'}' +
'.jqhtml-debug-overlay.light {' +
'background: #f8f9fa;' +
'color: #333;' +
'border-bottom: 1px solid #dee2e6;' +
'}' +
'.jqhtml-debug-content {' +
'padding: 0.5rem 1rem;' +
'}' +
'.jqhtml-debug-controls {' +
'display: flex;' +
'flex-wrap: wrap;' +
'gap: 8px;' +
'align-items: center;' +
'}' +
'.jqhtml-debug-title {' +
'margin-right: 10px;' +
'font-weight: bold;' +
'}' +
'.jqhtml-debug-btn {' +
'padding: 4px 8px;' +
'border: none;' +
'border-radius: 3px;' +
'background: #3498db;' +
'color: white;' +
'cursor: pointer;' +
'font-size: 0.75rem;' +
'transition: background 0.2s;' +
'}' +
'.jqhtml-debug-btn:hover {' +
'background: #2980b9;' +
'}' +
'.jqhtml-debug-btn.success {' +
'background: #27ae60;' +
'}' +
'.jqhtml-debug-btn.success:hover {' +
'background: #229954;' +
'}' +
'.jqhtml-debug-btn.danger {' +
'background: #e74c3c;' +
'}' +
'.jqhtml-debug-btn.danger:hover {' +
'background: #c0392b;' +
'}' +
'.jqhtml-debug-toggle {' +
'padding: 4px 8px;' +
'border: none;' +
'border-radius: 3px;' +
'background: #7f8c8d;' +
'color: white;' +
'cursor: pointer;' +
'font-size: 0.75rem;' +
'margin-left: auto;' +
'}' +
'.jqhtml-debug-toggle:hover {' +
'background: #6c7b7d;' +
'}' +
'.jqhtml-debug-status.active {' +
'background: #27ae60 !important;' +
'}' +
'@media (max-width: 768px) {' +
'.jqhtml-debug-controls {' +
'flex-direction: column;' +
'align-items: flex-start;' +
'}' +
'.jqhtml-debug-title {' +
'margin-bottom: 5px;' +
'}' +
'}');
this.$('head').append($style);
}
toggle() {
// Toggle between compact and full view
this.options.compact = !this.options.compact;
const $toggleBtn = this.$container.find('.jqhtml-debug-toggle');
$toggleBtn.text(this.options.compact ? '▼' : '▲');
const $buttons = this.$container.find('.jqhtml-debug-btn');
if (this.options.compact) {
$buttons.hide();
}
else {
$buttons.show();
}
}
executeAction(action) {
const jqhtml = getJqhtml$1();
if (!jqhtml) {
console.warn('JQHTML not available - make sure it\'s loaded and exposed globally');
return;
}
switch (action) {
case 'enableSlowMotionDebug':
jqhtml.setDebugSettings({
logFullLifecycle: true,
sequentialProcessing: true,
delayAfterComponent: 150,
delayAfterRender: 200,
delayAfterRerender: 250,
flashComponents: true,
flashDuration: 800,
flashColors: {
create: '#3498db',
render: '#27ae60',
ready: '#9b59b6'
},
profilePerformance: true,
highlightSlowRenders: 30,
logDispatch: true
});
this.updateStatus('Slow Motion');
console.log('🐛 Slow Motion Debug Mode Enabled');
break;
case 'enableBasicDebug':
jqhtml.enableDebugMode('basic');
this.updateStatus('Basic');
console.log('🐛 Basic Debug Mode Enabled');
break;
case 'enableFullDebug':
jqhtml.enableDebugMode('full');
this.updateStatus('Full');
console.log('🐛 Full Debug Mode Enabled');
break;
case 'enableSequentialMode':
jqhtml.setDebugSettings({
logCreationReady: true,
sequentialProcessing: true,
flashComponents: true,
profilePerformance: true
});
this.updateStatus('Sequential');
console.log('🐛 Sequential Processing Mode Enabled');
break;
case 'clearAllDebug':
jqhtml.clearDebugSettings();
this.updateStatus('Off');
console.log('🐛 All Debug Modes Disabled');
break;
case 'showDebugInfo':
const settings = JSON.stringify(jqhtml.debug, null, 2);
console.log('🐛 Current Debug Settings:', settings);
alert('Debug settings logged to console:\n\n' + (Object.keys(jqhtml.debug).length > 0 ? settings : 'No debug settings active'));
break;
}
}
}
DebugOverlay.instance = null;
// Simplified global convenience functions that use static methods
function showDebugOverlay(options) {
return DebugOverlay.show(options);
}
function hideDebugOverlay() {
DebugOverlay.hide();
}
// Auto-initialize if debug query parameter is present
if (typeof window !== 'undefined') {
const urlParams = new URLSearchParams(window.location.search);
if (urlParams.get('debug') === 'true' || urlParams.get('jqhtml-debug') === 'true') {
document.addEventListener('DOMContentLoaded', () => {
DebugOverlay.show();
});
}
}
/**
* JQHTML Debug Module
*
@@ -571,5 +189,5 @@ function handleComponentError(component, phase, error) {
// 9. Performance Budgets - Warn when components exceed size/time limits
// 10. Accessibility Auditing - Check for missing ARIA attributes
export { DebugOverlay, applyDebugDelay, devWarn, handleComponentError, hideDebugOverlay, isSequentialProcessing, logDataChange, logDispatch, logInstruction, logLifecycle, showDebugOverlay };
export { applyDebugDelay, devWarn, handleComponentError, isSequentialProcessing, logDataChange, logDispatch, logInstruction, logLifecycle };
//# sourceMappingURL=jqhtml-debug.esm.js.map

2
node_modules/@jqhtml/core/dist/jqhtml-debug.esm.js.map generated vendored Normal file → Executable file

File diff suppressed because one or more lines are too long

0
node_modules/@jqhtml/core/dist/jquery-plugin.d.ts generated vendored Normal file → Executable file
View File

2
node_modules/@jqhtml/core/dist/jquery-plugin.d.ts.map generated vendored Normal file → Executable file
View File

@@ -1 +1 @@
{"version":3,"file":"jquery-plugin.d.ts","sourceRoot":"","sources":["../src/jquery-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAQpE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd;;WAEG;QACH,SAAS,IAAI,gBAAgB,GAAG,IAAI,CAAC;QACrC,SAAS,CAAC,cAAc,EAAE,oBAAoB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC;QAC9F,SAAS,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC;QAE/E;;;;;;;WAOG;QACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;KACvC;CACF;AAGD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CA6XpD"}
{"version":3,"file":"jquery-plugin.d.ts","sourceRoot":"","sources":["../src/jquery-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAQpE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd;;WAEG;QACH,SAAS,IAAI,gBAAgB,GAAG,IAAI,CAAC;QACrC,SAAS,CAAC,cAAc,EAAE,oBAAoB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC;QAC9F,SAAS,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC;QAE/E;;;;;;;WAOG;QACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;KACvC;CACF;AAGD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CA0UpD"}

0
node_modules/@jqhtml/core/dist/lifecycle-manager.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/core/dist/lifecycle-manager.d.ts.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/core/dist/load-coordinator.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/core/dist/load-coordinator.d.ts.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/core/dist/local-storage.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/core/dist/local-storage.d.ts.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/core/dist/template-renderer.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/core/dist/template-renderer.d.ts.map generated vendored Normal file → Executable file
View File

2
node_modules/@jqhtml/core/package.json generated vendored Normal file → Executable file
View File

@@ -1,6 +1,6 @@
{
"name": "@jqhtml/core",
"version": "2.3.4",
"version": "2.3.9",
"description": "Core runtime library for JQHTML",
"type": "module",
"main": "./dist/index.js",

0
node_modules/@jqhtml/parser/dist/ast.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/ast.d.ts.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/ast.js generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/ast.js.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/codegen.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/codegen.d.ts.map generated vendored Normal file → Executable file
View File

2
node_modules/@jqhtml/parser/dist/codegen.js generated vendored Normal file → Executable file
View File

@@ -1348,7 +1348,7 @@ export class CodeGenerator {
for (const [name, component] of this.components) {
code += `// Component: ${name}\n`;
code += `jqhtml_components.set('${name}', {\n`;
code += ` _jqhtml_version: '2.3.4',\n`; // Version will be replaced during build
code += ` _jqhtml_version: '2.3.9',\n`; // Version will be replaced during build
code += ` name: '${name}',\n`;
code += ` tag: '${component.tagName}',\n`;
code += ` defaultAttributes: ${this.serializeAttributeObject(component.defaultAttributes)},\n`;

0
node_modules/@jqhtml/parser/dist/codegen.js.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/compiler.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/compiler.d.ts.map generated vendored Normal file → Executable file
View File

53
node_modules/@jqhtml/parser/dist/compiler.js generated vendored Normal file → Executable file
View File

@@ -97,6 +97,7 @@ function formatOutput(componentInfo, componentName, format, version) {
const name = componentInfo.name;
// Build the component definition
let componentDef = `{
__jqhtml_template: true,
_jqhtml_version: '${version}',
name: '${componentInfo.name}',
tag: '${componentInfo.tagName}',
@@ -115,58 +116,39 @@ function formatOutput(componentInfo, componentName, format, version) {
let output;
switch (format) {
case 'iife':
// Self-executing function that auto-registers with window.jqhtml
// Variable assignment - no auto-registration
// Consumer must call jqhtml.register_template() explicitly
output = `// Compiled from: ${componentName}.jqhtml
(function() {
'use strict';
const template_${name} = ${componentDef};
// Self-register with jqhtml runtime
// Must use window.jqhtml since we're in bundle scope
if (!window.jqhtml) {
throw new Error('FATAL: window.jqhtml is not defined. The jqhtml runtime must be loaded before registering templates.');
}
// Auto-register following standard jqhtml pattern
window.jqhtml.register_template(template_${name});
})();`;
var template_${name} = ${componentDef};`;
break;
case 'esm':
// ES Module export with auto-registration
// ES Module export - no auto-registration
// Consumer must call jqhtml.register_template() explicitly
output = `// ES Module: ${name}
import jqhtml from '@jqhtml/core';
const template_${name} = ${componentDef};
// Auto-register following standard jqhtml pattern
jqhtml.register_template(template_${name});
export { template_${name} };
export default template_${name};`;
break;
case 'cjs':
// CommonJS export with auto-registration
// CommonJS export - no auto-registration
// Consumer must call jqhtml.register_template() explicitly
output = `// CommonJS Module: ${name}
'use strict';
const template_${name} = ${componentDef};
// Auto-register if jqhtml is available
if (typeof window !== 'undefined' && window.jqhtml) {
window.jqhtml.register_template(template_${name});
}
module.exports = template_${name};
module.exports.default = template_${name};
module.exports.template_${name} = template_${name};`;
break;
case 'umd':
// Universal Module Definition with auto-registration
// Universal Module Definition - no auto-registration
// Consumer must call jqhtml.register_template() explicitly
output = `(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD
define(['@jqhtml/core'], factory);
define([], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS
module.exports = factory();
@@ -174,19 +156,10 @@ module.exports.template_${name} = template_${name};`;
// Browser global
root.template_${name} = factory();
}
}(typeof self !== 'undefined' ? self : this, function (jqhtml) {
}(typeof self !== 'undefined' ? self : this, function () {
'use strict';
const template_${name} = ${componentDef};
// Auto-register with jqhtml runtime
if (typeof window !== 'undefined' && window.jqhtml) {
window.jqhtml.register_template(template_${name});
} else if (jqhtml) {
jqhtml.register_template(template_${name});
}
return template_${name};
return ${componentDef};
}));`;
break;
default:

2
node_modules/@jqhtml/parser/dist/compiler.js.map generated vendored Normal file → Executable file

File diff suppressed because one or more lines are too long

0
node_modules/@jqhtml/parser/dist/errors.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/errors.d.ts.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/errors.js generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/errors.js.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/index.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/index.d.ts.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/index.js generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/index.js.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/integration.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/integration.d.ts.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/integration.js generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/integration.js.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/lexer.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/lexer.d.ts.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/lexer.js generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/lexer.js.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/parser.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/parser.d.ts.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/parser.js generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/parser.js.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/runtime.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/runtime.d.ts.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/runtime.js generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/parser/dist/runtime.js.map generated vendored Normal file → Executable file
View File

2
node_modules/@jqhtml/parser/package.json generated vendored Normal file → Executable file
View File

@@ -1,6 +1,6 @@
{
"name": "@jqhtml/parser",
"version": "2.3.4",
"version": "2.3.9",
"description": "JQHTML template parser - converts templates to JavaScript",
"type": "module",
"main": "dist/index.js",

0
node_modules/@jqhtml/router/dist/index.cjs generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/router/dist/index.cjs.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/router/dist/index.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/router/dist/index.d.ts.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/router/dist/index.js generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/router/dist/index.js.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/router/dist/jqhtml-router.esm.js generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/router/dist/jqhtml-router.esm.js.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/router/dist/layout.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/router/dist/layout.d.ts.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/router/dist/route.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/router/dist/route.d.ts.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/router/dist/router.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/router/dist/router.d.ts.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/router/dist/spa.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/router/dist/spa.d.ts.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/router/dist/types.d.ts generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/router/dist/types.d.ts.map generated vendored Normal file → Executable file
View File

View File

@@ -1 +1 @@
2.3.4
2.3.9

0
node_modules/@jqhtml/vscode-extension/blade-language-configuration.json generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/vscode-extension/out/blade_component_provider.js generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/vscode-extension/out/blade_component_provider.js.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/vscode-extension/out/blade_language_config.js generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/vscode-extension/out/blade_language_config.js.map generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/vscode-extension/out/blade_spacer.js generated vendored Normal file → Executable file
View File

0
node_modules/@jqhtml/vscode-extension/out/blade_spacer.js.map generated vendored Normal file → Executable file
View File

2
node_modules/@jqhtml/vscode-extension/package.json generated vendored Normal file → Executable file
View File

@@ -2,7 +2,7 @@
"name": "@jqhtml/vscode-extension",
"displayName": "JQHTML",
"description": "Syntax highlighting and language support for JQHTML template files",
"version": "2.3.4",
"version": "2.3.9",
"publisher": "jqhtml",
"license": "MIT",
"publishConfig": {

Some files were not shown because too many files have changed in this diff Show More