@jqhtml/core 2.3.35 → 2.3.54

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;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,CA6apD"}
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;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,CAwgBpD"}
@@ -26,11 +26,9 @@ export declare class LifecycleManager {
26
26
  * Boot a component - run its full lifecycle
27
27
  * Called when component is created
28
28
  *
29
- * Supports lifecycle skip flags:
30
- * - skip_render_and_ready: Skip first render/on_render and skip on_ready entirely.
31
- * Component reports ready after on_load completes.
32
- * - skip_ready: Skip on_ready only.
33
- * Component reports ready after on_render completes (after potential re-render from on_load).
29
+ * Supports lifecycle truncation flags:
30
+ * - _load_only: on_create + on_load only. No render, no children, no on_render, no on_loaded, no on_ready.
31
+ * - _load_render_only: on_create + render + on_load + re-render. No on_render, no on_loaded, no on_ready.
34
32
  */
35
33
  boot_component(component: Jqhtml_Component): Promise<void>;
36
34
  /**
@@ -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;;;;;;;;;OASG;IACG,cAAc,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IA0IhE;;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;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"}
@@ -23,6 +23,23 @@ import type { Jqhtml_Component } from './component.js';
23
23
  export interface InvocationKeyResult {
24
24
  key: string | null;
25
25
  uncacheable_property?: string;
26
+ /** Why the property could not be keyed - 'function', 'circular', 'too-large', ... */
27
+ uncacheable_reason?: string;
28
+ }
29
+ export interface InvocationKeyOptions {
30
+ /**
31
+ * Allow a plain-data object/array arg with no author-supplied cache id to be
32
+ * keyed by DETERMINISTIC CONTENT.
33
+ *
34
+ * The CACHE passes true: two structurally equal args should hit the same
35
+ * cache entry, and a wrong key there is corrected by stale-while-revalidate.
36
+ *
37
+ * DEDUPLICATION passes false (the default), deliberately. A deduplicated
38
+ * follower never runs on_load() at all and adopts the leader's data with no
39
+ * revalidation, so a key that is wrong there is permanently wrong data.
40
+ * Redundant concurrent requests are cheaper than that risk.
41
+ */
42
+ allow_content_serialization?: boolean;
26
43
  }
27
44
  export declare class Load_Coordinator {
28
45
  private static _registry;
@@ -40,7 +57,7 @@ export declare class Load_Coordinator {
40
57
  * - key: Cache key string, or null if uncacheable
41
58
  * - uncacheable_property: Name of first property that prevented caching (for debugging)
42
59
  */
43
- static generate_invocation_key(component_name: string, args: any): InvocationKeyResult;
60
+ static generate_invocation_key(component_name: string, args: any, options?: InvocationKeyOptions): InvocationKeyResult;
44
61
  /**
45
62
  * Check if a component should execute on_load() or wait for existing request
46
63
  * Returns true if component should execute (is leader), false if should wait (is follower)
@@ -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;AAYvD,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;IA0EtF;;;OAGG;IACH,MAAM,CAAC,sBAAsB,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO;IAoBnE;;;;;OAKG;IACH,MAAM,CAAC,eAAe,CAClB,SAAS,EAAE,gBAAgB,EAC3B,eAAe,EAAE,OAAO,CAAC,IAAI,CAAC,GAC/B,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI;IAyB5C;;;OAGG;IACH,MAAM,CAAC,wBAAwB,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAWlF;;;;;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,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI;IA8B5C;;;OAGG;IACH,MAAM,CAAC,wBAAwB,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAWlF;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAgCrC;;;;OAIG;IACH,MAAM,CAAC,eAAe,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IAyC/E;;;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"}
@@ -94,6 +94,8 @@ export declare function is_cache_class_registered(class_name: string): boolean;
94
94
  export type CacheMode = 'data' | 'html';
95
95
  export declare class Jqhtml_Local_Storage {
96
96
  private static _cache_key;
97
+ /** Versioned scope identity - compared in _validate_scope() to clear on a core upgrade. */
98
+ private static _scope_marker;
97
99
  private static _cache_mode;
98
100
  private static _storage_available;
99
101
  private static _initialized;
@@ -1 +1 @@
1
- {"version":3,"file":"local-storage.d.ts","sourceRoot":"","sources":["../src/local-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AAaH;;;;;;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;AAySD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,SAAS,GAAG,M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H,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;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,mBAAmB,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG;IAiC3C;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;IA4BxB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;CAS9B"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * JQHTML SSR Preload Data System
3
+ *
4
+ * Captures component data during SSR rendering and replays it on the client
5
+ * to skip redundant on_load() calls during hydration.
6
+ *
7
+ * Server-side: start_data_capture() → render → get_captured_data()
8
+ * Client-side: set_preload_data(entries) → components boot with preloaded data → clear_preload_data()
9
+ */
10
+ export interface PreloadEntry {
11
+ component: string;
12
+ args: Record<string, any>;
13
+ data: Record<string, any>;
14
+ }
15
+ /**
16
+ * Enable data capture mode. After this call, every component that completes
17
+ * on_load() has its final this.data recorded.
18
+ *
19
+ * Idempotent — calling twice is fine.
20
+ */
21
+ export declare function start_data_capture(): void;
22
+ /**
23
+ * Record a component's data after on_load() completes.
24
+ * Called internally from _apply_load_result().
25
+ *
26
+ * @param component_name - Component name
27
+ * @param args - Component args at time of on_load()
28
+ * @param data - this.data after on_load() completed
29
+ * @param cache_key - The cache key for deduplication (null = always capture)
30
+ */
31
+ export declare function capture_component_data(component_name: string, args: Record<string, any>, data: Record<string, any>, cache_key: string | null): void;
32
+ /**
33
+ * Returns all captured component data and resets the capture buffer.
34
+ * One-shot: calling clears the buffer.
35
+ */
36
+ export declare function get_captured_data(): PreloadEntry[];
37
+ /**
38
+ * Check if data capture is currently enabled.
39
+ */
40
+ export declare function is_capture_enabled(): boolean;
41
+ /**
42
+ * Stop data capture and clear all state.
43
+ */
44
+ export declare function stop_data_capture(): void;
45
+ /**
46
+ * Seed the preload cache with SSR-captured data.
47
+ * Must be called before any component _load() runs.
48
+ *
49
+ * @param entries - Array of { component, args, data } entries from get_captured_data()
50
+ */
51
+ export declare function set_preload_data(entries: PreloadEntry[] | null): void;
52
+ /**
53
+ * Check if preloaded data exists for a given cache key.
54
+ * If found, returns the data and removes the entry (one-shot).
55
+ *
56
+ * @param cache_key - The cache key (same format as Load Coordinator)
57
+ * @returns The preloaded data, or null if no match
58
+ */
59
+ export declare function consume_preload_data(cache_key: string): Record<string, any> | null;
60
+ /**
61
+ * Clear any remaining unconsumed preload entries.
62
+ * Call after initial page hydration is complete.
63
+ */
64
+ export declare function clear_preload_data(): void;
65
+ /**
66
+ * Check if any preload data is available (for fast early exit in _load).
67
+ */
68
+ export declare function has_preload_data(): boolean;
69
+ //# sourceMappingURL=preload-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preload-data.d.ts","sourceRoot":"","sources":["../src/preload-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC3B;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,CA4BN;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,CAYrE;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"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * JQHTML Viewport Resize Dispatch
3
+ *
4
+ * One framework-owned, debounced window 'resize' listener fans out to every live
5
+ * component in the document by calling on_viewport_resize(viewport_width).
6
+ *
7
+ * Components never bind their own window listener, so there is nothing to unbind
8
+ * in on_stop() - a component that is stopped or removed from the document simply
9
+ * stops being found by the dispatcher.
10
+ */
11
+ /** Trailing-edge debounce applied to the window resize listener. */
12
+ export declare const VIEWPORT_RESIZE_DEBOUNCE_MS = 30;
13
+ /**
14
+ * Current viewport width in CSS pixels.
15
+ *
16
+ * window.innerWidth is used (not $(window).width()) because it matches the width
17
+ * CSS media queries resolve against. It includes the scrollbar gutter.
18
+ *
19
+ * Returns 0 outside a browser (SSR).
20
+ */
21
+ export declare function get_viewport_width(): number;
22
+ /**
23
+ * Call on_viewport_resize(width) on every component currently in the document.
24
+ *
25
+ * Walks $('.Component') in document order (parents before children). Elements
26
+ * with no component instance and stopped components are skipped. A component
27
+ * that throws is logged and the walk continues - one bad handler must not stop
28
+ * the rest of the page from resizing.
29
+ */
30
+ export declare function dispatch_viewport_resize(jQuery: any): void;
31
+ /**
32
+ * Install the single window resize listener. Idempotent - repeated init() calls
33
+ * and non-browser environments are no-ops.
34
+ */
35
+ export declare function init_viewport_resize(jQuery: any): void;
36
+ //# sourceMappingURL=viewport.d.ts.map
@@ -0,0 +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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jqhtml/core",
3
- "version": "2.3.35",
3
+ "version": "2.3.54",
4
4
  "description": "Core runtime library for JQHTML",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -23,9 +23,14 @@
23
23
  "build": "rollup -c",
24
24
  "build:tsc": "tsc",
25
25
  "watch": "rollup -c -w",
26
- "test": "jest",
26
+ "test": "NODE_OPTIONS=--experimental-vm-modules jest",
27
27
  "clean": "rm -rf dist"
28
28
  },
29
+ "jest": {
30
+ "setupFiles": [
31
+ "<rootDir>/test/jest.setup.js"
32
+ ]
33
+ },
29
34
  "peerDependencies": {
30
35
  "jquery": "^3.7.0"
31
36
  },
@@ -65,5 +70,13 @@
65
70
  "tslib": "^2.8.1",
66
71
  "typescript": "^5.9.2"
67
72
  },
68
- "devDependencies": null
73
+ "devDependencies": null,
74
+ "repository": {
75
+ "type": "git",
76
+ "url": "git+https://github.com/jqhtml/jqhtml.git"
77
+ },
78
+ "bugs": {
79
+ "url": "https://github.com/jqhtml/jqhtml/issues"
80
+ },
81
+ "homepage": "https://github.com/jqhtml/jqhtml#readme"
69
82
  }