@jqhtml/core 2.3.67 → 2.3.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +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;AAElD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AASpE,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,CA8gBpD"}
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;AAElD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AASpE,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,CAqiBpD"}
@@ -35,9 +35,5 @@ export declare class LifecycleManager {
35
35
  * Unregister a component (called on destroy)
36
36
  */
37
37
  unregister_component(component: Jqhtml_Component): void;
38
- /**
39
- * Wait for all active components to reach ready state
40
- */
41
- wait_for_ready(): Promise<void>;
42
38
  }
43
39
  //# sourceMappingURL=lifecycle-manager.d.ts.map
@@ -1 +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;;;;;;;OAOG;IACG,cAAc,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IA2JhE;;OAEG;IACH,oBAAoB,CAAC,SAAS,EAAE,gBAAgB,GAAG,IAAI;IAIvD;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;CAetC"}
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;AAGvD,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;;;;;;;OAOG;IACG,cAAc,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAiLhE;;OAEG;IACH,oBAAoB,CAAC,SAAS,EAAE,gBAAgB,GAAG,IAAI;CAGxD"}
@@ -61,26 +61,31 @@ export declare class Load_Coordinator {
61
61
  /**
62
62
  * Check if a component should execute on_load() or wait for existing request
63
63
  * Returns true if component should execute (is leader), false if should wait (is follower)
64
+ *
65
+ * @param key - The dedup key the caller captured for this load. Every coordinator
66
+ * method takes it, because args may legally change during on_load()
67
+ * and a recomputed key would address a different (or no) entry.
64
68
  */
65
- static should_execute_on_load(component: Jqhtml_Component): boolean;
69
+ static should_execute_on_load(component: Jqhtml_Component, key: string): boolean;
66
70
  /**
67
71
  * Register a leader component that will execute on_load()
68
72
  * Creates coordination entry and returns a function to call when data is ready
69
73
  *
74
+ * @param key - The dedup key captured by the caller (see should_execute_on_load)
70
75
  * @returns A function that accepts the final data and completes coordination
71
76
  */
72
- static register_leader(component: Jqhtml_Component, on_load_promise: Promise<void>): (final_data: Record<string, any>) => void;
77
+ static register_leader(component: Jqhtml_Component, key: string): (final_data: Record<string, any>) => void;
73
78
  /**
74
79
  * Get the coordination promise for a follower component
75
- * Returns a promise that resolves when the leader completes
80
+ * Returns a promise that resolves when the leader completes, or rejects if it failed
76
81
  */
77
- static get_coordination_promise(component: Jqhtml_Component): Promise<void> | null;
82
+ static get_coordination_promise(key: string): Promise<void> | null;
78
83
  /**
79
84
  * Complete coordination after leader's on_load() finishes
80
85
  * Stores leader's data, marks entry as completed, and resolves the promise.
81
86
  * Followers retrieve the data themselves via get_leader_data().
82
87
  *
83
- * @param key - The coordination key
88
+ * @param key - The coordination key captured at registration
84
89
  * @param leader - The leader component
85
90
  * @param final_data - The final data after on_load and normalization
86
91
  * @private
@@ -89,14 +94,18 @@ export declare class Load_Coordinator {
89
94
  /**
90
95
  * Get leader's data for a follower component
91
96
  * Called by follower after coordination promise resolves
92
- * Returns the data and cleans up if this is the last follower
97
+ * Returns a freshly parsed copy and cleans up if this is the last follower
98
+ *
99
+ * @param key - The dedup key captured by the follower before it began waiting
93
100
  */
94
- static get_leader_data(component: Jqhtml_Component): Record<string, any> | null;
101
+ static get_leader_data(component: Jqhtml_Component, key: string): Record<string, any> | null;
95
102
  /**
96
103
  * Handle leader on_load() error
97
- * Propagates error to all followers and cleans up entry
104
+ * Rejects every waiting follower and clears the entry so the next component retries
105
+ *
106
+ * @param key - The dedup key captured at registration
98
107
  */
99
- static handle_leader_error(component: Jqhtml_Component, error: Error): void;
108
+ static handle_leader_error(key: string, error: Error): void;
100
109
  /**
101
110
  * Get current registry state (for debugging)
102
111
  */
@@ -1 +1 @@
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;AAavD,MAAM,WAAW,mBAAmB;IAChC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qFAAqF;IACrF,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACjC;;;;;;;;;;;OAWG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACzC;AAED,qBAAa,gBAAgB;IACzB,OAAO,CAAC,MAAM,CAAC,SAAS,CA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C,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACjC;;;;;;;;;;;OAWG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACzC;AAED,qBAAa,gBAAgB;IACzB,OAAO,CAAC,MAAM,CAAC,SAAS,CAA6C;IAErE;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,uBAAuB,CAC1B,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,GAAG,EACT,OAAO,GAAE,oBAAyB,GACnC,mBAAmB;IAkGtB;;;;;;;OAOG;IACH,MAAM,CAAC,sBAAsB,CAAC,SAAS,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO;IAmBhF;;;;;;OAMG;IACH,MAAM,CAAC,eAAe,CAClB,SAAS,EAAE,gBAAgB,EAC3B,GAAG,EAAE,MAAM,GACZ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI;IA6B5C;;;OAGG;IACH,MAAM,CAAC,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAUlE;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAkCrC;;;;;;OAMG;IACH,MAAM,CAAC,eAAe,CAAC,SAAS,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IAsC5F;;;;;OAKG;IACH,MAAM,CAAC,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IA8B3D;;OAEG;IACH,MAAM,CAAC,kBAAkB,IAAI,GAAG;IAahC;;OAEG;IACH,MAAM,CAAC,SAAS,IAAI,IAAI;CAG3B"}
@@ -66,6 +66,31 @@
66
66
  * - Transient UI state (convenience, not required)
67
67
  *
68
68
  * @internal This class is not exposed in the public API
69
+ *
70
+ * ---------------------------------------------------------------------------
71
+ * REPORTING WHAT WAS DROPPED
72
+ *
73
+ * `this.data` is always the serialized copy this file produces - in EVERY cache
74
+ * mode, including 'none' (see component.ts `_apply_load_result`). Whatever the
75
+ * serializer cannot express is therefore not merely missing from the cache, it
76
+ * is missing from `this.data`, and an author needs to be told once rather than
77
+ * discover it on the next cache hit.
78
+ *
79
+ * Two small optional parameters carry that:
80
+ *
81
+ * process_for_serialization(value, verbose, seen, path, collector?)
82
+ * `collector(path, kind)` is invoked for every value that is dropped or
83
+ * degraded. `path` is a dotted/bracketed path from the root the caller
84
+ * named; `kind` is one of Strip_Kind. Paths are only BUILT when a
85
+ * collector is present, so the no-collector path costs nothing.
86
+ *
87
+ * Jqhtml_Local_Storage.normalize_for_cache(value, component_name?)
88
+ * With a component name, and only in development mode, each dropped path
89
+ * prints exactly ONE console.warn for the life of the page (keyed
90
+ * `${component_name}:${path}`, the same once-only shape as
91
+ * warn_uncacheable_args in component-cache.ts). Production converts
92
+ * silently. Neither ever throws.
93
+ * ---------------------------------------------------------------------------
69
94
  */
70
95
  /**
71
96
  * Register a class for cache serialization/deserialization.
@@ -79,6 +104,13 @@ export declare function register_cache_class(klass: new (...args: any[]) => any)
79
104
  * Check if a class is registered for caching
80
105
  */
81
106
  export declare function is_cache_class_registered(class_name: string): boolean;
107
+ /**
108
+ * What kind of value the serializer had to drop or degrade. Reported to a
109
+ * collector; each kind maps to one piece of advice in strip_advice().
110
+ */
111
+ export type Strip_Kind = 'function' | 'promise' | 'dom-node' | 'jquery' | 'component' | 'symbol' | 'bigint' | 'circular' | 'unregistered-class';
112
+ /** Called once per dropped/degraded value with its path and what it was. */
113
+ export type Strip_Collector = (path: string, kind: Strip_Kind, detail?: string) => void;
82
114
  /**
83
115
  * Cache mode determines how component data is cached and restored.
84
116
  *
@@ -185,17 +217,18 @@ export declare class Jqhtml_Local_Storage {
185
217
  /**
186
218
  * Perform a serialize/deserialize round-trip on a value.
187
219
  *
188
- * This ensures "hot" data (fresh from on_load) behaves identically to "cold" data
189
- * (restored from cache). Unregistered class instances will be converted to plain
190
- * objects, exactly as they would be if restored from cache.
191
- *
192
- * Use this to normalize data after on_load() so developers catch missing class
193
- * registrations immediately rather than only after a page reload.
220
+ * The result is ALWAYS jqhtml's own copy: nothing of the caller's object graph
221
+ * is aliased through, and a value the serializer cannot express is dropped
222
+ * rather than smuggled out. That is what makes `this.data` identical whether it
223
+ * came from on_load() or from a cache hit - the old "on failure return the
224
+ * original" branch broke exactly that promise, and only on the hard cases.
194
225
  *
195
226
  * @param {any} value - The value to normalize
196
- * @returns {any} The value after serialize/deserialize round-trip, or original if serialization fails
227
+ * @param {string} [component_name] - Names the component in development warnings.
228
+ * Omit to convert silently (the unit tests and non-component callers).
229
+ * @returns {any} The round-tripped value. Never the original object.
197
230
  */
198
- static normalize_for_cache(value: any): any;
231
+ static normalize_for_cache(value: any, component_name?: string): any;
199
232
  /**
200
233
  * Internal set implementation with scope validation and quota handling
201
234
  * @param {string} key
@@ -1 +1 @@
1
- {"version":3,"file":"local-storage.d.ts","sourceRoot":"","sources":["../src/local-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AAgBH;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,IAAI,CAK7E;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAErE;AAoTD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAExC,qBAAa,oBAAoB;IAC7B,OAAO,CAAC,MAAM,CAAC,UAAU,CAAuB;IAChD,2FAA2F;IAC3F,OAAO,CAAC,MAAM,CAAC,aAAa,CAAuB;IACnD,OAAO,CAAC,MAAM,CAAC,WAAW,CAA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AAC,qBAAqB;IAYpC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IAI1B;;;;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;;;;;;;;OAQG;IACH,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAkDzC;;;;;;;OAOG;IACH,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,GAAG,IAAI;IAoCnC;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAQhC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,mBAAmB,CAAC,KAAK,EAAE,GAAG,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,GAAG;IA4BpE;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;IA+BxB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;CAS9B"}
@@ -11,6 +11,14 @@ export interface PreloadEntry {
11
11
  component: string;
12
12
  args: Record<string, any>;
13
13
  data: Record<string, any>;
14
+ /**
15
+ * The exact cache key the capturing component was keyed under (from
16
+ * generate_cache_key()). Emitted by get_captured_data() and honoured by
17
+ * set_preload_data(). Without it a cache_id() component could never match:
18
+ * its key is `<name>::<cache_id()>`, a shape no amount of arg serialization
19
+ * on the client can reproduce. Absent when the component had no key.
20
+ */
21
+ key?: string;
14
22
  }
15
23
  /**
16
24
  * Enable data capture mode. After this call, every component that completes
@@ -1 +1 @@
1
- {"version":3,"file":"preload-data.d.ts","sourceRoot":"","sources":["../src/preload-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,M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C1B;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AASD;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAIzC;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,SAAS,EAAE,MAAM,GAAG,IAAI,GACvB,IAAI,CAgCN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,YAAY,EAAE,CAKlD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAE5C;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAIxC;AAMD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,IAAI,GAAG,IAAI,CAsBrE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CASlF;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jqhtml/core",
3
- "version": "2.3.67",
3
+ "version": "2.3.68",
4
4
  "description": "Core runtime library for JQHTML",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,22 +0,0 @@
1
- /**
2
- * JQHTML v2 Template Renderer
3
- *
4
- * Connects compiled templates to components
5
- * Processes instruction arrays and handles bindings
6
- */
7
- import type { Jqhtml_Component } from './component.js';
8
- /**
9
- * Render a template for a component
10
- * Templates are functions that return [instructions, context] tuples
11
- */
12
- export declare function render_template(component: Jqhtml_Component, template_fn?: Function): Promise<void>;
13
- /**
14
- * Helper to escape HTML for safe output
15
- */
16
- export declare function escape_html(str: string): string;
17
- /**
18
- * Helper to escape HTML and convert newlines to <br /> tags
19
- * Used by <%br= %> syntax for displaying user-entered text with line breaks
20
- */
21
- export declare function escape_html_nl2br(str: string): string;
22
- //# sourceMappingURL=template-renderer.d.ts.map
@@ -1 +0,0 @@
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;AA6KD;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI/C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKrD"}