Fix code quality violations and enhance ROUTE-EXISTS-01 rule

Implement JQHTML function cache ID system and fix bundle compilation
Implement underscore prefix for system tables
Fix JS syntax linter to support decorators and grant exception to Task system
SPA: Update planning docs and wishlists with remaining features
SPA: Document Navigation API abandonment and future enhancements
Implement SPA browser integration with History API (Phase 1)
Convert contacts view page to SPA action
Convert clients pages to SPA actions and document conversion procedure
SPA: Merge GET parameters and update documentation
Implement SPA route URL generation in JavaScript and PHP
Implement SPA bootstrap controller architecture
Add SPA routing manual page (rsx:man spa)
Add SPA routing documentation to CLAUDE.md
Phase 4 Complete: Client-side SPA routing implementation
Update get_routes() consumers for unified route structure
Complete SPA Phase 3: PHP-side route type detection and is_spa flag
Restore unified routes structure and Manifest_Query class
Refactor route indexing and add SPA infrastructure
Phase 3 Complete: SPA route registration in manifest
Implement SPA Phase 2: Extract router code and test decorators
Rename Jqhtml_Component to Component and complete SPA foundation setup

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-11-19 17:48:15 +00:00
parent 77b4d10af8
commit 9ebcc359ae
4360 changed files with 37751 additions and 18578 deletions

View File

@@ -20,6 +20,7 @@ export declare class Jqhtml_Component {
$: any;
args: Record<string, any>;
data: Record<string, any>;
state: Record<string, any>;
_cid: string;
_ready_state: number;
private _lifecycle_manager;
@@ -35,12 +36,22 @@ export declare class Jqhtml_Component {
private __loading;
private _did_first_render;
private _render_count;
private _args_on_last_render;
private _data_on_last_render;
private __initial_data_snapshot;
private __data_frozen;
private _reload_debounced?;
private next_reload_force_refresh;
constructor(element?: any, args?: Record<string, any>);
/**
* Boot - Start the full component lifecycle
* Called immediately after construction by instruction processor
*/
boot(): Promise<void>;
/**
* Internal boot method - starts component lifecycle
* @private
*/
_boot(): Promise<void>;
/**
* Internal render phase - Create DOM structure
* Called top-down (parent before children) when part of lifecycle
@@ -79,11 +90,25 @@ export declare class Jqhtml_Component {
* Load phase - Fetch data from APIs
* Called bottom-up, fully parallel
* NO DOM MODIFICATIONS ALLOWED IN THIS PHASE
* @private - Internal lifecycle method, not for external use
*/
load(): Promise<void>;
_load(): Promise<void>;
/**
* Ready phase - Component fully initialized
* Called bottom-up (children before parent)
* @private
*/
_ready(): Promise<void>;
/**
* Public API: Wait for component to be fully ready
* Returns a promise that resolves when the component reaches ready state
*
* @example
* await component.ready(); // Wait for component initialization
*
* @example
* const child = this.id('child_component');
* await child.ready(); // Wait for child to be ready
*/
ready(): Promise<void>;
/**
@@ -93,15 +118,60 @@ export declare class Jqhtml_Component {
*/
private _wait_for_children_ready;
/**
* Reinitialize the component - full reset and re-initialization
* Wipes the innerHTML, resets data to empty, and runs full lifecycle
* Reload component - re-fetch data and re-render (debounced)
*
* This is the public API that automatically debounces calls to _reload()
* Multiple rapid calls to reload() will be coalesced into a single execution
*
* @param always_render - If true (default), always re-render after on_load().
* If false, only re-render if data actually changed.
*/
reinitialize(): Promise<void>;
reload(always_render?: boolean): Promise<void>;
/**
* Reload component - re-fetch data and re-render
* Re-runs on_load(), always renders, and calls on_ready()
* Refresh component - re-fetch data and re-render only if data changed (debounced)
*
* Similar to reload() but only re-renders if the data actually changed after on_load().
* Useful for checking server for updates without forcing unnecessary re-renders.
*
* Uses the same debouncing as reload() and plays nice with it - if reload() is called
* while refresh() is queued, reload() takes precedence and will always render.
*/
reload(): Promise<void>;
refresh(): Promise<void>;
/**
* Internal reload implementation - re-fetch data and re-render
*
* COMPLETE RELOAD PROCESS (Source of Truth):
*
* STEP 1: Cache check (if args changed since last render)
* - Generate cache key from component name + current args
* - If cached data exists and is non-empty:
* - Unfreeze this.data (temporarily)
* - Hydrate this.data with cached data
* - Re-freeze this.data
* - Render immediately (stale-while-revalidate)
* - Set rendered_from_cache flag
*
* STEP 2: Call on_load() to fetch fresh data
* - Unfreeze this.data
* - Restore this.data to on_create() snapshot
* - Call on_load() directly (no _load() wrapper)
* - Freeze this.data after completion
* - If data changed and non-empty: write to cache
*
* STEP 3: Conditionally re-render
* - If didn't render from cache yet, OR data changed after on_load():
* - Call render() to update DOM
*
* STEP 3.5: Wait for all children to be ready
* - Bottom-up ordering (children ready before parent)
* - Same as main lifecycle
*
* STEP 4: Call on_ready()
* - Always call on_ready() after reload completes
*
* @private - Use reload() instead (debounced wrapper)
*/
_reload(): Promise<void>;
/**
* Destroy the component and cleanup
* Called automatically by MutationObserver when component is removed from DOM
@@ -122,26 +192,27 @@ export declare class Jqhtml_Component {
on_create(): void | Promise<void>;
on_load(): Promise<void>;
on_ready(): Promise<void>;
on_destroy(): void | Promise<void>;
on_stop(): void | Promise<void>;
/**
* Should component re-render after load?
* By default, only re-renders if data has changed
* Override to control re-rendering behavior
*/
should_rerender(): boolean;
/**
* Internal method to determine if component should re-render after on_load()
* @private
*/
_should_rerender(): boolean;
/**
* Get component name for debugging
*/
component_name(): string;
/**
* Emit a jQuery event from component root
*/
emit(event_name: string, data?: any): void;
/**
* Register lifecycle event callback
* Allowed events: 'render', 'create', 'load', 'ready', 'destroy'
* Callbacks fire after the lifecycle method completes
* If the event has already occurred, the callback fires immediately AND registers for future occurrences
* Register event callback
* Supports lifecycle events ('render', 'create', 'load', 'ready', 'stop') and custom events
* Lifecycle event callbacks fire after the lifecycle method completes
* If a lifecycle event has already occurred, the callback fires immediately AND registers for future occurrences
* Custom events only fire when explicitly triggered via .trigger()
*/
on(event_name: string, callback: (component: Jqhtml_Component) => void): this;
/**
@@ -221,5 +292,21 @@ export declare class Jqhtml_Component {
private _get_dom_children;
private _log_lifecycle;
private _log_debug;
/**
* Creates a debounced function with exclusivity and promise fan-in
*
* When invoked, immediately runs the callback exclusively.
* For subsequent invocations, applies a delay before running the callback exclusively again.
* The delay starts after the current asynchronous operation resolves.
*
* If delay is 0, the function only prevents enqueueing multiple executions,
* but will still run them immediately in an exclusive sequential manner.
*
* The most recent invocation's parameters are used when the function executes.
* Returns a promise that resolves when the next exclusive execution completes.
*
* @private
*/
private _create_debounced_function;
}
//# sourceMappingURL=component.d.ts.map

View File

@@ -1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IACH,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAK3C;;;;;;;;;;;;;;;OAeG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG;IAgB1B;;;;;;;;;;;;OAYG;IACH,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAgB7C;;;OAGG;IACH,YAAY,IAAI,gBAAgB,GAAG,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"}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -25,6 +25,10 @@ import { process_instructions, extract_slots } from './instruction-processor.js'
import { render_template, escape_html } from './template-renderer.js';
import { DebugOverlay } from './debug-overlay.js';
import './jquery-plugin.js';
import { Jqhtml_Local_Storage } from './local-storage.js';
export { Jqhtml_Local_Storage };
import { Load_Coordinator } from './load-coordinator.js';
export { Load_Coordinator };
export declare const version = "__VERSION__";
export interface DebugSettings {
verbose?: boolean;
@@ -81,6 +85,7 @@ declare const jqhtml: {
installGlobals(): void;
_version(): any;
version(): string;
set_cache_key(cache_key: string): void;
};
export default jqhtml;
//# sourceMappingURL=index.d.ts.map

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,wBAAwB,EACxB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG1G,OAAO,EACL,oBAAoB,EACpB,aAAa,EACd,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,eAAe,EAChB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EACL,eAAe,EACf,WAAW,EACZ,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,WAAW,EACX,cAAc,EACd,aAAa,EACb,sBAAsB,EACtB,oBAAoB,EACpB,OAAO,EACR,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAM9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAG9B,wBAAgB,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,IAAI,CAUvC;AAID,OAAO,EAAE,gBAAgB,IAAI,uBAAuB,EAAE,MAAM,wBAAw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C,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;AAGD,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;WA8BL,aAAa,GAAG;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE;+BAGhC,aAAa;4BAIjB,OAAO,GAAG,MAAM;;+BAmBZ,GAAG;;;;;;6BA+CL,MAAM;CAGhC,CAAC;AAmBF,eAAe,MAAM,CAAC"}

1469
node_modules/@jqhtml/core/dist/index.js generated vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -12,7 +12,7 @@ export interface RawTagInstruction {
rawtag: [string, Record<string, any>, string];
}
export interface ComponentInstruction {
comp: [string, Record<string, any>] | [string, Record<string, any>, (context: any) => [any[], Jqhtml_Component]];
comp: [string, Record<string, any>] | [string, Record<string, any>, ((context: any) => [any[], Jqhtml_Component]) | Record<string, (context: any) => [any[], Jqhtml_Component]>];
}
export interface SlotInstruction {
slot: [string, Record<string, any>, (context: any) => [any[], Jqhtml_Component]];

View File

@@ -1 +1 @@
{"version":3,"file":"instruction-processor.d.ts","sourceRoot":"","sources":["../src/instruction-processor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIlD,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,GAAG,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC;CAClH;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,GAAG,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC;CAClF;AAED,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,eAAe,GAAG,MAAM,CAAC;AAoB/G,wBAAgB,GAAG,IAAI,MAAM,CA2C5B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,WAAW,EAAE,EAC3B,MAAM,EAAE,GAAG,EACX,OAAO,EAAE,gBAAgB,EACzB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GACtC,IAAI,CAwCN;AA8bD;;GAEG;AACH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CAClC,YAAY,EAAE,WAAW,EAAE,EAC3B,MAAM,EAAE,GAAG,EACX,OAAO,EAAE,gBAAgB,EACzB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GACtC,IAAI,CAwCN;AA8cD;;GAEG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAW1F"}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

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,CA2WpD"}
{"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"}

View File

@@ -7,7 +7,7 @@
* Lifecycle order:
* 1. create() - Calls on_create() BEFORE first render
* 2. render() - Creates DOM, instantiates child components, calls on_render()
* 3. load() - Calls on_load(), may trigger re-render if this.data changes
* 3. _load() - Calls on_load(), may trigger re-render if this.data changes
* 4. ready() - Waits for children to be ready, calls on_ready()
*/
import type { Jqhtml_Component } from './component.js';

View File

@@ -1 +1 @@
{"version":3,"file":"lifecycle-manager.d.ts","sourceRoot":"","sources":["../src/lifecycle-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;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;;;OAGG;IACG,cAAc,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAyDhE;;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;;;;;;;;;;;GAWG;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;;;OAGG;IACG,cAAc,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAsDhE;;OAEG;IACH,oBAAoB,CAAC,SAAS,EAAE,gBAAgB,GAAG,IAAI;IAIvD;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;CAetC"}

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

@@ -0,0 +1,79 @@
/**
* Load Coordinator - Request deduplication for component on_load() calls
*
* Coordinates parallel component loading to prevent duplicate requests.
* When multiple components with identical names and args load simultaneously,
* only the first (leader) executes on_load(). Others (followers) wait for
* the leader's result.
*
* Key Concepts:
* - **INVOCATION_KEY**: Unique identifier for component name + args combination
* - **Leader**: First component to reach on_load() for a given INVOCATION_KEY
* - **Follower**: Subsequent components that wait for leader's result
*
* Lifecycle:
* 1. Leader reaches on_load() → create coordination entry
* 2. Followers reach on_load() → join waiting queue
* 3. Leader completes → distribute data to all followers
* 4. Clear coordination entry (no caching)
*
* @internal This class is not exposed in the public API
*/
import type { Jqhtml_Component } from './component.js';
export interface InvocationKeyResult {
key: string | null;
uncacheable_property?: string;
}
export declare class Load_Coordinator {
private static _registry;
/**
* Generate INVOCATION_KEY from component name and args
* Uses deterministic JSON serialization (sorted keys)
* Excludes internal properties (those starting with _)
*
* For functions/objects:
* - Checks for ._jqhtml_cache_id property (assigned by RSpade)
* - Falls back to .jqhtml_cache_id() method if property doesn't exist
* - If neither exists, marks property as uncacheable
*
* Returns object with:
* - key: Cache key string, or null if uncacheable
* - uncacheable_property: Name of first property that prevented caching (for debugging)
*/
static generate_invocation_key(component_name: string, args: any): InvocationKeyResult;
/**
* Check if a component should execute on_load() or wait for existing request
* Returns true if component should execute (is leader), false if should wait (is follower)
*/
static should_execute_on_load(component: Jqhtml_Component): boolean;
/**
* Register a leader component that will execute on_load()
* Creates coordination entry and returns a function to call when on_load() completes
*/
static register_leader(component: Jqhtml_Component, on_load_promise: Promise<void>): () => void;
/**
* Get the coordination promise for a follower component
* Returns a promise that resolves when the leader completes
*/
static get_coordination_promise(component: Jqhtml_Component): Promise<void> | null;
/**
* Complete coordination after leader's on_load() finishes
* Distributes data to all waiting followers and cleans up entry
* @private
*/
private static _complete_coordination;
/**
* Handle leader on_load() error
* Propagates error to all followers and cleans up entry
*/
static handle_leader_error(component: Jqhtml_Component, error: Error): void;
/**
* Get current registry state (for debugging)
*/
static get_registry_state(): any;
/**
* Clear all coordination entries (for testing/debugging)
*/
static clear_all(): void;
}
//# sourceMappingURL=load-coordinator.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"load-coordinator.d.ts","sourceRoot":"","sources":["../src/load-coordinator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAWvD,MAAM,WAAW,mBAAmB;IAChC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,qBAAa,gBAAgB;IACzB,OAAO,CAAC,MAAM,CAAC,SAAS,CAA6C;IAErE;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,uBAAuB,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,mBAAmB;IAqEtF;;;OAGG;IACH,MAAM,CAAC,sBAAsB,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO;IAoBnE;;;OAGG;IACH,MAAM,CAAC,eAAe,CAClB,SAAS,EAAE,gBAAgB,EAC3B,eAAe,EAAE,OAAO,CAAC,IAAI,CAAC,GAC/B,MAAM,IAAI;IAkBb;;;OAGG;IACH,MAAM,CAAC,wBAAwB,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAWlF;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IA8CrC;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAuC3E;;OAEG;IACH,MAAM,CAAC,kBAAkB,IAAI,GAAG;IAahC;;OAEG;IACH,MAAM,CAAC,SAAS,IAAI,IAAI;CAG3B"}

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

@@ -0,0 +1,147 @@
/**
* Jqhtml_Local_Storage - Scoped local storage for JQHTML component caching
*
* Provides safe, scoped access to localStorage with automatic handling of
* unavailable storage, quota exceeded errors, and scope invalidation.
*
* Key Features:
* - **Manual scoping**: Cache key must be set via set_cache_key() before use
* - **Graceful degradation**: Returns null when storage unavailable or cache key not set
* - **Quota management**: Auto-clears storage when full and retries operation
* - **Scope validation**: Clears storage when cache key changes
* - **Developer-friendly keys**: Scoped suffix allows easy inspection in dev tools
*
* Scoping Strategy:
* Storage is scoped by a user-provided cache key (typically a session identifier,
* user ID, or combination of relevant scope factors). This scope is stored in
* `_jqhtml_cache_key`. If the cache key changes between page loads, all JQHTML
* storage is cleared to prevent stale data from different sessions/users.
*
* Key Format:
* Keys are stored as: `jqhtml::developer_key::cache_key`
* Example: `jqhtml::User_Profile_data::user_123`
*
* The `jqhtml::` prefix identifies JQHTML keys, allowing safe clearing of only our keys
* without affecting other JavaScript libraries. This enables transparent coexistence
* with third-party libraries that also use browser storage.
*
* Quota Exceeded Handling:
* When storage quota is exceeded during a set operation, only JQHTML keys (prefixed with
* `jqhtml::`) are cleared, preserving other libraries' data. The operation is then retried
* once. This ensures the application continues functioning even when storage is full.
*
* Usage:
* // Must set cache key first (typically done once on page load)
* Jqhtml_Local_Storage.set_cache_key('user_123');
*
* // Then use storage normally
* Jqhtml_Local_Storage.set('cached_component', {html: '...', timestamp: Date.now()});
* const cached = Jqhtml_Local_Storage.get('cached_component');
* Jqhtml_Local_Storage.remove('cached_component');
*
* IMPORTANT - Volatile Storage:
* Storage can be cleared at any time due to:
* - User clearing browser data
* - Private browsing mode restrictions
* - Quota exceeded errors
* - Cache key changes
* - Browser storage unavailable
*
* Therefore, NEVER store critical data. Only use for:
* - Cached component HTML (performance optimization)
* - Transient UI state (convenience, not required)
*
* @internal This class is not exposed in the public API
*/
export declare class Jqhtml_Local_Storage {
private static _cache_key;
private static _storage_available;
private static _initialized;
/**
* Set the cache key and initialize storage
* Must be called before any get/set operations
* @param {string} cache_key - Unique identifier for this cache scope
*/
static set_cache_key(cache_key: string): void;
/**
* Check if cache key has been set
* @returns {boolean} True if cache key is configured
*/
static has_cache_key(): boolean;
/**
* Initialize storage system and validate scope
* Called automatically after cache key is set
* @private
*/
private static _init;
/**
* Check if localStorage is available
* @returns {boolean}
* @private
*/
private static _is_storage_available;
/**
* Validate storage scope and clear JQHTML keys if cache key changed
* Only clears keys prefixed with 'jqhtml::' to preserve other libraries' data
* @private
*/
private static _validate_scope;
/**
* Clear only JQHTML keys from storage (keys starting with 'jqhtml::')
* Preserves keys from other libraries
* @private
*/
private static _clear_jqhtml_keys;
/**
* Build scoped key with JQHTML namespace prefix
* @param {string} key - Developer-provided key
* @returns {string}
* @private
*/
private static _build_key;
/**
* Check if storage is ready for use
* @returns {boolean}
* @private
*/
private static _is_ready;
/**
* Set item in localStorage
* @param {string} key - Storage key
* @param {*} value - Value to store (will be JSON serialized)
*/
static set(key: string, value: any): void;
/**
* Get item from localStorage
* @param {string} key - Storage key
* @returns {*|null} Parsed value or null if not found/unavailable
*/
static get(key: string): any | null;
/**
* Remove item from localStorage
* @param {string} key - Storage key
*/
static remove(key: string): void;
/**
* Internal set implementation with scope validation and quota handling
* @param {string} key
* @param {*} value - Original value (not used, kept for clarity)
* @param {string} serialized - Pre-serialized JSON string
* @private
*/
private static _set_item;
/**
* Internal get implementation
* @param {string} key
* @returns {*|null}
* @private
*/
private static _get_item;
/**
* Internal remove implementation
* @param {string} key
* @private
*/
private static _remove_item;
}
//# sourceMappingURL=local-storage.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"local-storage.d.ts","sourceRoot":"","sources":["../src/local-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,qBAAa,oBAAoB;IAC7B,OAAO,CAAC,MAAM,CAAC,UAAU,CAAuB;IAChD,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAwB;IACzD,OAAO,CAAC,MAAM,CAAC,YAAY,CAAkB;IAE7C;;;;OAIG;IACH,MAAM,CAAC,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAK7C;;;OAGG;IACH,MAAM,CAAC,aAAa,IAAI,OAAO;IAI/B;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,KAAK;IAepB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,qBAAqB;IAYpC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IA4B9B;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IA2BjC;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU;IAIzB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;IAIxB;;;;OAIG;IACH,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAqBzC;;;;OAIG;IACH,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,GAAG,IAAI;IAQnC;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAQhC;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;IA4BxB;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;IAexB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;CAS9B"}

View File

@@ -1 +1 @@
{"version":3,"file":"template-renderer.d.ts","sourceRoot":"","sources":["../src/template-renderer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AA2EvD;;;GAGG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,gBAAgB,EAC3B,WAAW,CAAC,EAAE,QAAQ,GACrB,OAAO,CAAC,IAAI,CAAC,CAqDf;AA8KD;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI/C"}
{"version":3,"file":"template-renderer.d.ts","sourceRoot":"","sources":["../src/template-renderer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AA2EvD;;;GAGG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,gBAAgB,EAC3B,WAAW,CAAC,EAAE,QAAQ,GACrB,OAAO,CAAC,IAAI,CAAC,CAqDf;AA6KD;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI/C"}

View File

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