Use rendered() for SPA layout chain, add jqhtml lifecycle docs
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
0
node_modules/@jqhtml/core/dist/boot.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/boot.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/boot.d.ts.map
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/boot.d.ts.map
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/component-registry.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/component-registry.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/component-registry.d.ts.map
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/component-registry.d.ts.map
generated
vendored
Normal file → Executable file
19
node_modules/@jqhtml/core/dist/component.d.ts
generated
vendored
Normal file → Executable file
19
node_modules/@jqhtml/core/dist/component.d.ts
generated
vendored
Normal file → Executable file
@@ -53,6 +53,7 @@ export declare class Jqhtml_Component {
|
||||
private _use_cached_data_hit;
|
||||
private _skip_render_and_ready;
|
||||
private _skip_ready;
|
||||
private _has_rendered;
|
||||
constructor(element?: any, args?: Record<string, any>);
|
||||
/**
|
||||
* Protect lifecycle methods from manual invocation
|
||||
@@ -157,6 +158,24 @@ export declare class Jqhtml_Component {
|
||||
* @param callback Optional callback to execute when ready
|
||||
*/
|
||||
ready(callback?: () => void): Promise<void>;
|
||||
/**
|
||||
* Returns a promise that resolves when the component has completed its
|
||||
* synchronous render chain (after on_load's re-render if applicable,
|
||||
* or after first render if no on_load override).
|
||||
*
|
||||
* This fires BEFORE on_ready() and before children are waited on.
|
||||
* Use this when you need to know the component's DOM is stable but
|
||||
* don't need to wait for the full async ready phase.
|
||||
*
|
||||
* The 'rendered' event fires exactly once per component lifecycle.
|
||||
*
|
||||
* @example
|
||||
* await component.rendered();
|
||||
* // DOM is now stable, on_render has completed
|
||||
*
|
||||
* @param callback Optional callback to execute when rendered
|
||||
*/
|
||||
rendered(callback?: () => void): Promise<void>;
|
||||
/**
|
||||
* Wait for all child components to reach ready state
|
||||
* Ensures bottom-up ordering (children ready before parent)
|
||||
|
||||
2
node_modules/@jqhtml/core/dist/component.d.ts.map
generated
vendored
Normal file → Executable file
2
node_modules/@jqhtml/core/dist/component.d.ts.map
generated
vendored
Normal file → Executable file
@@ -1 +1 @@
|
||||
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgBH,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,kBAAkB,UAAQ;IACjC,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,CAA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G;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"}
|
||||
0
node_modules/@jqhtml/core/dist/debug-entry.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/debug-entry.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/debug-entry.d.ts.map
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/debug-entry.d.ts.map
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/debug.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/debug.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/debug.d.ts.map
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/debug.d.ts.map
generated
vendored
Normal file → Executable file
37
node_modules/@jqhtml/core/dist/index.cjs
generated
vendored
Normal file → Executable file
37
node_modules/@jqhtml/core/dist/index.cjs
generated
vendored
Normal file → Executable file
@@ -98,6 +98,12 @@ class LifecycleManager {
|
||||
if (component._stopped)
|
||||
return;
|
||||
}
|
||||
// Fire 'rendered' event - component has completed its synchronous render chain
|
||||
// This happens once, after the final on_render (whether from first render or re-render after on_load)
|
||||
if (!component._has_rendered) {
|
||||
component._has_rendered = true;
|
||||
component.trigger('rendered');
|
||||
}
|
||||
// Check if this render is still current before proceeding to ready
|
||||
// If _render_count changed, another render happened and we should skip ready
|
||||
if (component._render_count !== render_id) {
|
||||
@@ -2129,6 +2135,9 @@ class Jqhtml_Component {
|
||||
// skip_ready feature - skip on_ready only
|
||||
// Component reports ready after on_render completes
|
||||
this._skip_ready = false;
|
||||
// rendered event - fires once after the synchronous render chain completes
|
||||
// (after on_load's re-render if applicable, or after first render if no on_load)
|
||||
this._has_rendered = false;
|
||||
this._cid = this._generate_cid();
|
||||
this._lifecycle_manager = LifecycleManager.get_instance();
|
||||
// Create or wrap element
|
||||
@@ -3117,6 +3126,32 @@ class Jqhtml_Component {
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the component has completed its
|
||||
* synchronous render chain (after on_load's re-render if applicable,
|
||||
* or after first render if no on_load override).
|
||||
*
|
||||
* This fires BEFORE on_ready() and before children are waited on.
|
||||
* Use this when you need to know the component's DOM is stable but
|
||||
* don't need to wait for the full async ready phase.
|
||||
*
|
||||
* The 'rendered' event fires exactly once per component lifecycle.
|
||||
*
|
||||
* @example
|
||||
* await component.rendered();
|
||||
* // DOM is now stable, on_render has completed
|
||||
*
|
||||
* @param callback Optional callback to execute when rendered
|
||||
*/
|
||||
rendered(callback) {
|
||||
return new Promise((resolve) => {
|
||||
this.on('rendered', () => {
|
||||
if (callback)
|
||||
callback();
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Wait for all child components to reach ready state
|
||||
* Ensures bottom-up ordering (children ready before parent)
|
||||
@@ -4782,7 +4817,7 @@ function init(jQuery) {
|
||||
}
|
||||
}
|
||||
// Version - will be replaced during build with actual version from package.json
|
||||
const version = '2.3.19';
|
||||
const version = '2.3.20';
|
||||
// Default export with all functionality
|
||||
const jqhtml = {
|
||||
// Core
|
||||
|
||||
2
node_modules/@jqhtml/core/dist/index.cjs.map
generated
vendored
Normal file → Executable file
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
0
node_modules/@jqhtml/core/dist/index.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/index.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/index.d.ts.map
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/index.d.ts.map
generated
vendored
Normal file → Executable file
37
node_modules/@jqhtml/core/dist/index.js
generated
vendored
Normal file → Executable file
37
node_modules/@jqhtml/core/dist/index.js
generated
vendored
Normal file → Executable file
@@ -94,6 +94,12 @@ class LifecycleManager {
|
||||
if (component._stopped)
|
||||
return;
|
||||
}
|
||||
// Fire 'rendered' event - component has completed its synchronous render chain
|
||||
// This happens once, after the final on_render (whether from first render or re-render after on_load)
|
||||
if (!component._has_rendered) {
|
||||
component._has_rendered = true;
|
||||
component.trigger('rendered');
|
||||
}
|
||||
// Check if this render is still current before proceeding to ready
|
||||
// If _render_count changed, another render happened and we should skip ready
|
||||
if (component._render_count !== render_id) {
|
||||
@@ -2125,6 +2131,9 @@ class Jqhtml_Component {
|
||||
// skip_ready feature - skip on_ready only
|
||||
// Component reports ready after on_render completes
|
||||
this._skip_ready = false;
|
||||
// rendered event - fires once after the synchronous render chain completes
|
||||
// (after on_load's re-render if applicable, or after first render if no on_load)
|
||||
this._has_rendered = false;
|
||||
this._cid = this._generate_cid();
|
||||
this._lifecycle_manager = LifecycleManager.get_instance();
|
||||
// Create or wrap element
|
||||
@@ -3113,6 +3122,32 @@ class Jqhtml_Component {
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the component has completed its
|
||||
* synchronous render chain (after on_load's re-render if applicable,
|
||||
* or after first render if no on_load override).
|
||||
*
|
||||
* This fires BEFORE on_ready() and before children are waited on.
|
||||
* Use this when you need to know the component's DOM is stable but
|
||||
* don't need to wait for the full async ready phase.
|
||||
*
|
||||
* The 'rendered' event fires exactly once per component lifecycle.
|
||||
*
|
||||
* @example
|
||||
* await component.rendered();
|
||||
* // DOM is now stable, on_render has completed
|
||||
*
|
||||
* @param callback Optional callback to execute when rendered
|
||||
*/
|
||||
rendered(callback) {
|
||||
return new Promise((resolve) => {
|
||||
this.on('rendered', () => {
|
||||
if (callback)
|
||||
callback();
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Wait for all child components to reach ready state
|
||||
* Ensures bottom-up ordering (children ready before parent)
|
||||
@@ -4778,7 +4813,7 @@ function init(jQuery) {
|
||||
}
|
||||
}
|
||||
// Version - will be replaced during build with actual version from package.json
|
||||
const version = '2.3.19';
|
||||
const version = '2.3.20';
|
||||
// Default export with all functionality
|
||||
const jqhtml = {
|
||||
// Core
|
||||
|
||||
2
node_modules/@jqhtml/core/dist/index.js.map
generated
vendored
Normal file → Executable file
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
0
node_modules/@jqhtml/core/dist/instruction-processor.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/instruction-processor.d.ts.map
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/instruction-processor.d.ts.map
generated
vendored
Normal file → Executable file
39
node_modules/@jqhtml/core/dist/jqhtml-core.esm.js
generated
vendored
Normal file → Executable file
39
node_modules/@jqhtml/core/dist/jqhtml-core.esm.js
generated
vendored
Normal file → Executable file
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* JQHTML Core v2.3.19
|
||||
* JQHTML Core v2.3.20
|
||||
* (c) 2025 JQHTML Team
|
||||
* Released under the MIT License
|
||||
*/
|
||||
@@ -99,6 +99,12 @@ class LifecycleManager {
|
||||
if (component._stopped)
|
||||
return;
|
||||
}
|
||||
// Fire 'rendered' event - component has completed its synchronous render chain
|
||||
// This happens once, after the final on_render (whether from first render or re-render after on_load)
|
||||
if (!component._has_rendered) {
|
||||
component._has_rendered = true;
|
||||
component.trigger('rendered');
|
||||
}
|
||||
// Check if this render is still current before proceeding to ready
|
||||
// If _render_count changed, another render happened and we should skip ready
|
||||
if (component._render_count !== render_id) {
|
||||
@@ -2130,6 +2136,9 @@ class Jqhtml_Component {
|
||||
// skip_ready feature - skip on_ready only
|
||||
// Component reports ready after on_render completes
|
||||
this._skip_ready = false;
|
||||
// rendered event - fires once after the synchronous render chain completes
|
||||
// (after on_load's re-render if applicable, or after first render if no on_load)
|
||||
this._has_rendered = false;
|
||||
this._cid = this._generate_cid();
|
||||
this._lifecycle_manager = LifecycleManager.get_instance();
|
||||
// Create or wrap element
|
||||
@@ -3118,6 +3127,32 @@ class Jqhtml_Component {
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the component has completed its
|
||||
* synchronous render chain (after on_load's re-render if applicable,
|
||||
* or after first render if no on_load override).
|
||||
*
|
||||
* This fires BEFORE on_ready() and before children are waited on.
|
||||
* Use this when you need to know the component's DOM is stable but
|
||||
* don't need to wait for the full async ready phase.
|
||||
*
|
||||
* The 'rendered' event fires exactly once per component lifecycle.
|
||||
*
|
||||
* @example
|
||||
* await component.rendered();
|
||||
* // DOM is now stable, on_render has completed
|
||||
*
|
||||
* @param callback Optional callback to execute when rendered
|
||||
*/
|
||||
rendered(callback) {
|
||||
return new Promise((resolve) => {
|
||||
this.on('rendered', () => {
|
||||
if (callback)
|
||||
callback();
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Wait for all child components to reach ready state
|
||||
* Ensures bottom-up ordering (children ready before parent)
|
||||
@@ -4783,7 +4818,7 @@ function init(jQuery) {
|
||||
}
|
||||
}
|
||||
// Version - will be replaced during build with actual version from package.json
|
||||
const version = '2.3.19';
|
||||
const version = '2.3.20';
|
||||
// Default export with all functionality
|
||||
const jqhtml = {
|
||||
// Core
|
||||
|
||||
2
node_modules/@jqhtml/core/dist/jqhtml-core.esm.js.map
generated
vendored
Normal file → Executable file
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
0
node_modules/@jqhtml/core/dist/jqhtml-debug.esm.js
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/jqhtml-debug.esm.js
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/jqhtml-debug.esm.js.map
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/jqhtml-debug.esm.js.map
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/jquery-plugin.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/jquery-plugin.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/jquery-plugin.d.ts.map
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/jquery-plugin.d.ts.map
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/lifecycle-manager.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/lifecycle-manager.d.ts
generated
vendored
Normal file → Executable file
2
node_modules/@jqhtml/core/dist/lifecycle-manager.d.ts.map
generated
vendored
Normal file → Executable file
2
node_modules/@jqhtml/core/dist/lifecycle-manager.d.ts.map
generated
vendored
Normal file → Executable file
@@ -1 +1 @@
|
||||
{"version":3,"file":"lifecycle-manager.d.ts","sourceRoot":"","sources":["../src/lifecycle-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAEpE,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAmB;IAC1C,OAAO,CAAC,iBAAiB,CAAoC;IAE7D,MAAM,CAAC,YAAY,IAAI,gBAAgB;;IAevC;;;;;;;;;OASG;IACG,cAAc,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAwGhE;;OAEG;IACH,oBAAoB,CAAC,SAAS,EAAE,gBAAgB,GAAG,IAAI;IAIvD;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;CAetC"}
|
||||
{"version":3,"file":"lifecycle-manager.d.ts","sourceRoot":"","sources":["../src/lifecycle-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAEpE,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAmB;IAC1C,OAAO,CAAC,iBAAiB,CAAoC;IAE7D,MAAM,CAAC,YAAY,IAAI,gBAAgB;;IAevC;;;;;;;;;OASG;IACG,cAAc,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IA+GhE;;OAEG;IACH,oBAAoB,CAAC,SAAS,EAAE,gBAAgB,GAAG,IAAI;IAIvD;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;CAetC"}
|
||||
0
node_modules/@jqhtml/core/dist/load-coordinator.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/load-coordinator.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/load-coordinator.d.ts.map
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/load-coordinator.d.ts.map
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/local-storage.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/local-storage.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/local-storage.d.ts.map
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/local-storage.d.ts.map
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/template-renderer.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/template-renderer.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/template-renderer.d.ts.map
generated
vendored
Normal file → Executable file
0
node_modules/@jqhtml/core/dist/template-renderer.d.ts.map
generated
vendored
Normal file → Executable file
2
node_modules/@jqhtml/core/package.json
generated
vendored
Normal file → Executable file
2
node_modules/@jqhtml/core/package.json
generated
vendored
Normal file → Executable file
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@jqhtml/core",
|
||||
"version": "2.3.19",
|
||||
"version": "2.3.20",
|
||||
"description": "Core runtime library for JQHTML",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
Reference in New Issue
Block a user