@jqhtml/core 2.3.74 → 2.3.76

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.
Files changed (41) hide show
  1. package/dist/cache-key-serializer.d.ts.map +1 -1
  2. package/dist/component-cache.d.ts +33 -8
  3. package/dist/component-cache.d.ts.map +1 -1
  4. package/dist/component-events.d.ts +6 -2
  5. package/dist/component-events.d.ts.map +1 -1
  6. package/dist/component-queue.d.ts +91 -36
  7. package/dist/component-queue.d.ts.map +1 -1
  8. package/dist/component-registry.d.ts +20 -1
  9. package/dist/component-registry.d.ts.map +1 -1
  10. package/dist/component.d.ts +245 -29
  11. package/dist/component.d.ts.map +1 -1
  12. package/dist/data-proxy.d.ts +32 -10
  13. package/dist/data-proxy.d.ts.map +1 -1
  14. package/dist/debug.d.ts +1 -1
  15. package/dist/debug.d.ts.map +1 -1
  16. package/dist/index.cjs +2387 -953
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +2387 -953
  21. package/dist/index.js.map +1 -1
  22. package/dist/instruction-processor.d.ts +4 -4
  23. package/dist/instruction-processor.d.ts.map +1 -1
  24. package/dist/jqhtml-core.esm.js +2388 -954
  25. package/dist/jqhtml-core.esm.js.map +1 -1
  26. package/dist/jqhtml-debug.esm.js +9 -2
  27. package/dist/jqhtml-debug.esm.js.map +1 -1
  28. package/dist/jquery-plugin.d.ts.map +1 -1
  29. package/dist/lifecycle-manager.d.ts +9 -5
  30. package/dist/lifecycle-manager.d.ts.map +1 -1
  31. package/dist/load-coordinator.d.ts +5 -3
  32. package/dist/load-coordinator.d.ts.map +1 -1
  33. package/dist/local-storage.d.ts +70 -6
  34. package/dist/local-storage.d.ts.map +1 -1
  35. package/dist/markup.d.ts +49 -0
  36. package/dist/markup.d.ts.map +1 -0
  37. package/dist/style-merge.d.ts +44 -0
  38. package/dist/style-merge.d.ts.map +1 -0
  39. package/dist/viewport.d.ts +2 -1
  40. package/dist/viewport.d.ts.map +1 -1
  41. package/package.json +3 -4
@@ -169,9 +169,16 @@ function isSequentialProcessing() {
169
169
  return jqhtml?.debug?.sequentialProcessing || false;
170
170
  }
171
171
  // Error handling with break on error
172
- function handleComponentError(component, phase, error) {
172
+ function handleComponentError(component, phase, error, already_printed = false) {
173
173
  const jqhtml = getJqhtml();
174
- console.error(`[JQHTML Error] ${component.constructor.name}#${component._cid} failed in ${phase}:`, error);
174
+ if (already_printed) {
175
+ // The base on_load_error() printed this error a moment ago: name the failure, but
176
+ // do not print the same error twice.
177
+ console.error(`[JQHTML Error] ${component.constructor.name}#${component._cid} failed in ${phase}: on_load() error (printed above)`);
178
+ }
179
+ else {
180
+ console.error(`[JQHTML Error] ${component.constructor.name}#${component._cid} failed in ${phase}:`, error);
181
+ }
175
182
  if (jqhtml?.debug?.breakOnError) {
176
183
  debugger; // This will pause execution in dev tools
177
184
  }
@@ -1 +1 @@
1
- {"version":3,"file":"jqhtml-debug.esm.js","sources":["../src/debug.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;AAIG;AAKH;AAEA,IAAI,kBAAkB,GAAqB,IAAI,GAAG,EAAE;AAGpD;;;AAGG;AACG,SAAU,OAAO,CAAC,OAAe,EAAA;;IAErC,IAAI,OAAO,MAAM,KAAK,WAAW,IAAK,MAAc,CAAC,wBAAwB,EAAE;QAC7E;IACF;;AAGA,IAAA,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;QAC1F;IACF;AAEA,IAAA,OAAO,CAAC,IAAI,CAAC,wBAAwB,OAAO,CAAA,CAAE,CAAC;AACjD;AAEA;AACA,SAAS,SAAS,GAAA;IAChB,IAAI,OAAO,MAAM,KAAK,WAAW,IAAK,MAAc,CAAC,MAAM,EAAE;QAC3D,OAAQ,MAAc,CAAC,MAAM;IAC/B;;IAEA,IAAI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AAC,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,CA0hBpD"}
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;AAYD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CA2jBpD"}
@@ -1,13 +1,17 @@
1
1
  /**
2
2
  * JQHTML v2 Lifecycle Manager
3
3
  *
4
- * Simple lifecycle orchestration - no queues, no batching.
5
- * Components boot when created. That's it.
4
+ * Components boot when created. Boot is the first entry on the component's lifecycle
5
+ * queue (component-queue.ts): it holds the component's lock from boot start through the
6
+ * end of its on_ready(), so a render()/load()/reload()/refresh() made meanwhile -
7
+ * on_ready() included - waits and runs after it. When calls are waiting as boot ends,
8
+ * 'ready' fires once they have run (the queue is idle).
6
9
  *
7
10
  * Lifecycle order:
8
11
  * 1. create() - SYNC - Calls on_create() BEFORE first render
9
12
  * 2. render() - SYNC - Creates DOM, instantiates child components, calls on_render()
10
- * 3. _load() - ASYNC - Calls on_load() if overridden, may trigger re-render if this.data changes
13
+ * 3. _load() - ASYNC - Calls on_load() if overridden, may trigger re-render if this.data changes.
14
+ * Every component then gets on_loaded() and 'loaded' (without on_load(), at this point).
11
15
  * 4. ready() - ASYNC - Waits for children to be ready, calls on_ready()
12
16
  *
13
17
  * Key insight: create/render/on_render are synchronous. If a component doesn't
@@ -26,8 +30,8 @@ export declare class LifecycleManager {
26
30
  * Called when component is created
27
31
  *
28
32
  * Supports lifecycle truncation flags:
29
- * - _load_only: on_create + on_load only. No render, no children, no on_render, no on_loaded, no on_ready.
30
- * - _load_render_only: on_create + render + on_load + re-render. No on_render, no on_loaded, no on_ready.
33
+ * - _load_only: on_create + on_load only. No render, no children, no on_render, no on_loaded/'loaded', no on_ready.
34
+ * - _load_render_only: on_create + render + on_load + re-render. No on_render, no on_loaded/'loaded', no on_ready.
31
35
  */
32
36
  boot_component(component: Jqhtml_Component): Promise<void>;
33
37
  }
@@ -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;AAGvD,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAEpE,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAmB;IAE1C,MAAM,CAAC,YAAY,IAAI,gBAAgB;;IAqBvC;;;;;;;OAOG;IACG,cAAc,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CA8KjE"}
1
+ {"version":3,"file":"lifecycle-manager.d.ts","sourceRoot":"","sources":["../src/lifecycle-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;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;IAE1C,MAAM,CAAC,YAAY,IAAI,gBAAgB;;IAqBvC;;;;;;;OAOG;IACG,cAAc,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CAuMjE"}
@@ -83,7 +83,7 @@ export declare class Load_Coordinator {
83
83
  * @param key - The dedup key captured by the caller (see should_execute_on_load)
84
84
  * @returns A function that accepts the final data and completes coordination
85
85
  */
86
- static register_leader(component: Jqhtml_Component, key: string): (final_data: Record<string, any>) => void;
86
+ static register_leader(component: Jqhtml_Component, key: string): (final_text: string | null) => void;
87
87
  /**
88
88
  * Get the coordination promise for a follower component
89
89
  * Returns a promise that resolves when the leader completes, or rejects if it failed
@@ -96,7 +96,8 @@ export declare class Load_Coordinator {
96
96
  *
97
97
  * @param key - The coordination key captured at registration
98
98
  * @param leader - The leader component
99
- * @param final_data - The final data after on_load and normalization
99
+ * @param final_text - The leader's final this.data as Jqhtml_Local_Storage.serialize()
100
+ * text - the text the leader already holds for change detection
100
101
  * @private
101
102
  */
102
103
  private static _complete_coordination;
@@ -109,7 +110,8 @@ export declare class Load_Coordinator {
109
110
  */
110
111
  static get_leader_data(component: Jqhtml_Component, key: string): Record<string, any> | null;
111
112
  /**
112
- * Handle leader on_load() error
113
+ * Handle a failed leader load: on_load() threw, or applying its result failed
114
+ * (non-object this.data, or on_loaded() threw).
113
115
  * Rejects every waiting follower and clears the entry so the next component retries
114
116
  *
115
117
  * @param key - The dedup key captured at registration
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,IAAI,CAAC,GAAG,IAAI;IAUlE;;;;;;;;;;OAUG;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;IAuC5F;;;;;;OAMG;IACH,MAAM,CAAC,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAmC3D;;OAEG;IACH,MAAM,CAAC,kBAAkB,IAAI,GAAG;IAahC;;OAEG;IACH,MAAM,CAAC,SAAS,IAAI,IAAI;CAG3B"}
@@ -34,11 +34,18 @@
34
34
  * Storage is scoped by a user-provided cache key (typically a session identifier,
35
35
  * user ID, or combination of relevant scope factors). This scope is stored in
36
36
  * `_jqhtml_cache_key`. If the cache key changes between page loads, all JQHTML
37
- * storage is cleared to prevent stale data from different sessions/users.
37
+ * storage is cleared to prevent stale data from different sessions/users. The check
38
+ * runs once, in set_cache_key(), not on every write: entry keys already carry the
39
+ * jqhtml version and the cache key, so tabs with different scopes (or different
40
+ * jqhtml versions) can write side by side without reading each other's entries.
38
41
  *
39
42
  * Key Format:
40
- * Keys are stored as: `jqhtml::developer_key::cache_key`
41
- * Example: `jqhtml::User_Profile_data::user_123`
43
+ * Keys are stored as: `jqhtml::<developer_key>::<jqhtml_version>::<cache_key>`
44
+ * Example: `jqhtml::User_Profile::{"id":5}::2.3.75::user_123`
45
+ * The part after the developer key is exactly the scope marker stored in
46
+ * `_jqhtml_cache_key` (`<jqhtml_version>::<cache_key>`), so the version appears once.
47
+ * Entries in the older `jqhtml::<developer_key>::<cache_key>` format are never read
48
+ * (their key never matches); the scope check or the quota cleanup removes them.
42
49
  *
43
50
  * The `jqhtml::` prefix identifies JQHTML keys, allowing safe clearing of only our keys
44
51
  * without affecting other JavaScript libraries. This enables transparent coexistence
@@ -138,6 +145,11 @@ export interface Cache_Class_Options<T = any> {
138
145
  * without the from_plain that undoes it
139
146
  */
140
147
  export declare function register_cache_class(klass: new (...args: any[]) => any, options?: Cache_Class_Options): void;
148
+ /**
149
+ * True when `value` is an instance of a class the cache restores as itself: Date, Map,
150
+ * Set or a class passed to register_cache_class().
151
+ */
152
+ export declare function is_registered_cache_class_instance(value: any): boolean;
141
153
  /**
142
154
  * Check if a class is registered for caching
143
155
  */
@@ -164,7 +176,7 @@ export type Strip_Collector = (path: string, kind: Strip_Kind, detail?: string)
164
176
  export type CacheMode = 'data' | 'html';
165
177
  export declare class Jqhtml_Local_Storage {
166
178
  private static _cache_key;
167
- /** Versioned scope identity - compared in _validate_scope() to clear on a core upgrade. */
179
+ /** Versioned scope identity `<version>::<cache_key>` - compared in _validate_scope() to clear on a core upgrade, and the suffix of every entry key (_build_key()). */
168
180
  private static _scope_marker;
169
181
  private static _cache_mode;
170
182
  private static _storage_available;
@@ -206,6 +218,10 @@ export declare class Jqhtml_Local_Storage {
206
218
  /**
207
219
  * Validate storage scope and clear JQHTML keys if cache key changed
208
220
  * Only clears keys prefixed with 'jqhtml::' to preserve other libraries' data
221
+ *
222
+ * Runs once per set_cache_key(), never per write. The clear here is what bounds
223
+ * storage: entries of scopes no longer in use are removed the next time any tab sets
224
+ * a different scope. A tab still using such a scope simply re-caches.
209
225
  * @private
210
226
  */
211
227
  private static _validate_scope;
@@ -216,7 +232,9 @@ export declare class Jqhtml_Local_Storage {
216
232
  */
217
233
  private static _clear_jqhtml_keys;
218
234
  /**
219
- * Build scoped key with JQHTML namespace prefix
235
+ * Build scoped key with JQHTML namespace prefix:
236
+ * `jqhtml::<developer_key>::<jqhtml_version>::<cache_key>`.
237
+ * The suffix is the scope marker, so the version is in the key exactly once.
220
238
  * @param {string} key - Developer-provided key
221
239
  * @returns {string}
222
240
  * @private
@@ -238,6 +256,16 @@ export declare class Jqhtml_Local_Storage {
238
256
  * @param {*} value - Value to store (primitives, objects, arrays, or registered class instances)
239
257
  */
240
258
  static set(key: string, value: any): void;
259
+ /**
260
+ * Store text that serialize() (or normalize()) already produced - the write
261
+ * set() performs, without serializing a second time. A component's freshly
262
+ * loaded data is written this way: the text it was normalized through IS the
263
+ * cache entry.
264
+ *
265
+ * @param {string} key - Storage key
266
+ * @param {string|null} serialized - serialize() output; null removes the entry
267
+ */
268
+ static set_serialized(key: string, serialized: string | null): void;
241
269
  /**
242
270
  * Get item from localStorage with class-aware deserialization.
243
271
  *
@@ -287,7 +315,43 @@ export declare class Jqhtml_Local_Storage {
287
315
  */
288
316
  static normalize_for_cache(value: any, component_name?: string): any;
289
317
  /**
290
- * Internal set implementation with scope validation and quota handling
318
+ * normalize_for_cache(), also returning the serialized text the value went
319
+ * through. The text IS the value's serialized form - what serialize() of the
320
+ * result produces and what the cache stores - so a component keeps it as the
321
+ * snapshot of its new this.data (change detection, the cache write, the
322
+ * coordinator hand-off) instead of serializing the same data again.
323
+ *
324
+ * @returns {{value: any, text: string}} The round-tripped value and its text.
325
+ */
326
+ static normalize(value: any, component_name?: string): {
327
+ value: any;
328
+ text: string;
329
+ };
330
+ /**
331
+ * Serialize the on_create() state of this.data for restore_snapshot().
332
+ *
333
+ * The cache serializer, so Date, Map, Set and register_cache_class() instances
334
+ * come back as themselves, plus one thing the cache never stores: a key holding
335
+ * `undefined` keeps its key. Functions, DOM nodes and the like are dropped, as
336
+ * the JSON copy this replaces dropped them.
337
+ *
338
+ * @param component_name - Names the component in the development warning for each
339
+ * dropped value, as normalize() does. Omit to drop silently.
340
+ * @returns The snapshot text, or null when the value cannot be expressed at all.
341
+ */
342
+ static snapshot(value: any, component_name?: string): string | null;
343
+ /**
344
+ * Rebuild a fresh copy of the value snapshot() serialized. Every call returns a
345
+ * new object graph, so each on_load() starts from its own copy.
346
+ */
347
+ static restore_snapshot(text: string): any;
348
+ /**
349
+ * Internal set implementation with quota handling.
350
+ *
351
+ * Does NOT validate the scope: that happens once, in set_cache_key(). Entry keys
352
+ * already carry the jqhtml version and the cache key, so tabs with different scopes write disjoint keys and
353
+ * coexist. Re-checking the shared `_jqhtml_cache_key` marker here made two such tabs
354
+ * clear every jqhtml key on each other's every write.
291
355
  * @param {string} key
292
356
  * @param {string} serialized - Pre-serialized JSON string
293
357
  * @private
@@ -1 +1 @@
1
- {"version":3,"file":"local-storage.d.ts","sourceRoot":"","sources":["../src/local-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyGG;AAQH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,mBAAmB,CAAC,CAAC,GAAG,GAAG;IACxC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,GAAG,CAAC;IAChC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,CAAC,CAAC;CAClC;AAkBD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAChC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAClC,OAAO,GAAE,mBAAwB,GAClC,IAAI,CAaN;AAkCD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAErE;AAMD;;;GAGG;AACH,MAAM,MAAM,UAAU,GAChB,UAAU,GACV,SAAS,GACT,UAAU,GACV,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,oBAAoB,GACpB,gBAAgB,CAAC;AAEvB,4EAA4E;AAC5E,MAAM,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AAibxF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAExC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AG,IAAI;IA+CnE;;;;;;;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;;;;;;;;;;OAUG;IACH,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,GAAG,IAAI;IAI3C;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG;IAIrC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,mBAAmB,CAAC,KAAK,EAAE,GAAG,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,GAAG;IAIpE;;;;;;;;OAQG;IACH,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,GAAG,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;IA4BnF;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IASnE;;;OAGG;IACH,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG;IAI1C;;;;;;;;;;OAUG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;IA4BxB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;CAS9B"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * JQHTML v2 Markup Buffer
3
+ *
4
+ * What every compiled render function, content function and slot function
5
+ * returns: the instructions it produced, and the component whose template
6
+ * wrote them (the definer).
7
+ *
8
+ * The compiler emits one buffer per function invocation:
9
+ *
10
+ * let _output = new jqhtml.Markup(this); ... _output.p(...); ... return _output;
11
+ *
12
+ * and never stores it on a component - a slot body runs as a closure over its
13
+ * definer while the receiving component is mid-render, so shared component
14
+ * state could interleave two buffers.
15
+ *
16
+ * `<%= %>`, `<%!= %>` and `<%br= %>` splice a buffer (content(), a slot) into
17
+ * the enclosing one; the instruction processor renders it in its definer, so
18
+ * `this` in handler attributes, id= scoping and instantiator() agree with
19
+ * `<%= %>` and `$sid`, which are closures over the definer already. Being a
20
+ * buffer is the ONLY thing that splices: any other array prints "(Array)".
21
+ */
22
+ export declare class Jqhtml_Markup {
23
+ /** The instructions, in output order. */
24
+ readonly instructions: any[];
25
+ /** The component whose template wrote these instructions. */
26
+ readonly definer: any;
27
+ /**
28
+ * Append instructions. The compiler merges consecutive appends on one line into
29
+ * one call, so this takes any number of arguments. It is the instruction
30
+ * array's own native push, bound once per buffer: measured against a method
31
+ * looping over `arguments` it removes a 3-7% slowdown on a 1000-row table
32
+ * render (tests_benchmark load_table_*), and allocates nothing per call.
33
+ */
34
+ readonly p: (...instructions: any[]) => number;
35
+ constructor(definer: any);
36
+ }
37
+ /**
38
+ * Whether a buffer emits anything: an element, a component, or text that is not
39
+ * only HTML whitespace (space, tab, LF, FF, CR - a non-breaking space is content).
40
+ * A spliced buffer counts by what it emits itself, so a slot that only forwards
41
+ * an empty slot is empty too. A component counts even if it later renders
42
+ * nothing; that is not knowable without booting it.
43
+ *
44
+ * content() returns '' for a buffer without content: a caller cannot omit a
45
+ * <Slot:> tag conditionally, so writing it empty is how a caller says "nothing
46
+ * here", and it must test falsy like an absent slot.
47
+ */
48
+ export declare function markup_has_content(markup: Jqhtml_Markup): boolean;
49
+ //# sourceMappingURL=markup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markup.d.ts","sourceRoot":"","sources":["../src/markup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,qBAAa,aAAa;IACxB,yCAAyC;IACzC,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE,CAAM;IAElC,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC;IAEtB;;;;;;OAMG;IACH,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,YAAY,EAAE,GAAG,EAAE,KAAK,MAAM,CAAC;gBAEnC,OAAO,EAAE,GAAG;CAIzB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAWjE"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Merging two inline `style` strings, declaration by declaration.
3
+ *
4
+ * The split follows the CSS Syntax Level 3 tokenizer far enough to find the
5
+ * declaration boundaries a browser finds:
6
+ * - a `;` ends a declaration only at the top level - not inside a "..." or '...'
7
+ * string, a comment, or a (...), [...] or {...} block, so `url(a;b)`,
8
+ * `url("data:image/png;base64,...")` and `var(--x, url(a;b))` stay whole;
9
+ * - a declaration is split at its FIRST top-level `:`, so a value such as
10
+ * `url(http://x/y.png)` keeps every later colon;
11
+ * - a backslash escapes the next code point everywhere (`\;`, `\"`), and inside a
12
+ * string a backslash before a newline is a line continuation; an unescaped
13
+ * newline ends a string (the tokenizer's bad-string), as it does in a browser;
14
+ * - comments are dropped from property names; values are kept verbatim.
15
+ *
16
+ * This works on the attribute's value - the text after HTML character references
17
+ * are resolved - so it is the CSS layer only.
18
+ *
19
+ * Property names compare ASCII case-insensitively (`COLOR` overrides `color`);
20
+ * custom properties (`--name`) compare case-sensitively, as CSS defines them. A
21
+ * declaration with no name or no colon is dropped, as a browser drops it; an
22
+ * empty value is dropped too, except for a custom property, where it is valid.
23
+ * The value, including any `!important`, is carried as written.
24
+ */
25
+ interface Style_Declaration {
26
+ name: string;
27
+ value: string;
28
+ }
29
+ /** The declarations of an inline style string, in order. */
30
+ export declare function parse_style_declarations(style: string): Style_Declaration[];
31
+ /**
32
+ * `base` merged with `extra`, declaration by declaration, as one style string.
33
+ * Where both set a property, `extra` wins when `extra_wins` is true, otherwise
34
+ * `base` does. The result reads as the browser reads the two strings written
35
+ * loser-then-winner:
36
+ * - the losing side's remaining declarations come first and the winner's after
37
+ * them, so a losing shorthand (`background`) cannot reset a longhand the winner
38
+ * set (`background-image`);
39
+ * - a later declaration replaces an earlier one of the same property, except that
40
+ * a normal declaration does not replace an `!important` one.
41
+ */
42
+ export declare function merge_style(base: string, extra: string, extra_wins: boolean): string;
43
+ export {};
44
+ //# sourceMappingURL=style-merge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style-merge.d.ts","sourceRoot":"","sources":["../src/style-merge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AA4DD,4DAA4D;AAC5D,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAY3E;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,GAAG,MAAM,CAepF"}
@@ -23,7 +23,8 @@ export declare function get_viewport_width(): number;
23
23
  * Call on_viewport_resize(width) on every component currently in the document.
24
24
  *
25
25
  * Walks $('.Component') in document order (parents before children). Elements
26
- * with no component instance and stopped components are skipped. A component
26
+ * with no component instance, stopped components, and components whose hook is
27
+ * still the base no-op (no override on the class or the instance) are skipped. A component
27
28
  * that throws is logged and the walk continues - one bad handler must not stop
28
29
  * the rest of the page from resizing.
29
30
  */
@@ -1 +1 @@
1
- {"version":3,"file":"viewport.d.ts","sourceRoot":"","sources":["../src/viewport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,oEAAoE;AACpE,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAK9C;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CAiB1D;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CAYtD"}
1
+ {"version":3,"file":"viewport.d.ts","sourceRoot":"","sources":["../src/viewport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,oEAAoE;AACpE,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAK9C;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CAkB1D;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CAYtD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jqhtml/core",
3
- "version": "2.3.74",
3
+ "version": "2.3.76",
4
4
  "description": "Core runtime library for JQHTML",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -53,7 +53,7 @@
53
53
  ],
54
54
  "author": "JQHTML Team",
55
55
  "license": "MIT",
56
- "dependencies": {
56
+ "devDependencies": {
57
57
  "@rollup/plugin-node-resolve": "^16.0.1",
58
58
  "@rollup/plugin-replace": "^6.0.2",
59
59
  "@rollup/plugin-terser": "^0.4.4",
@@ -62,7 +62,7 @@
62
62
  "@types/jquery": "^3.5.32",
63
63
  "esbuild": "^0.25.9",
64
64
  "jest": "^29.5.0",
65
- "jsdom": "^26.1.0",
65
+ "jsdom": "^27.0.0",
66
66
  "playwright": "^1.53.2",
67
67
  "rollup": "^4.49.0",
68
68
  "rollup-plugin-dts": "^6.2.3",
@@ -71,7 +71,6 @@
71
71
  "tslib": "^2.8.1",
72
72
  "typescript": "^5.9.2"
73
73
  },
74
- "devDependencies": null,
75
74
  "repository": {
76
75
  "type": "git",
77
76
  "url": "git+https://github.com/jqhtml/jqhtml.git"