@vmz/core 0.1.31 → 0.2.0

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 (63) hide show
  1. package/dist/{client-nav.d.ts → browser/client-nav.d.ts} +4 -13
  2. package/dist/{client-nav.js → browser/client-nav.js} +16 -74
  3. package/dist/browser/direct-api.types.d.ts +58 -0
  4. package/dist/browser/direct-api.types.js +4 -0
  5. package/dist/browser/direct-host-box.d.ts +11 -0
  6. package/dist/{direct-host-box.js → browser/direct-host-box.js} +2 -18
  7. package/dist/browser/dom-core.d.ts +246 -0
  8. package/dist/browser/dom-core.js +2453 -0
  9. package/dist/browser/dom-core.types.d.ts +138 -0
  10. package/dist/browser/dom-core.types.js +4 -0
  11. package/dist/{position-context.js → browser/position-context.js} +1 -1
  12. package/dist/browser/unknown-component.d.ts +14 -0
  13. package/dist/{unknown-component.js → browser/unknown-component.js} +4 -28
  14. package/dist/{dom.browser.d.ts → faces/dom.browser.d.ts} +2 -2
  15. package/dist/{dom.browser.js → faces/dom.browser.js} +2 -3
  16. package/dist/faces/dom.client.d.ts +4 -0
  17. package/dist/faces/dom.client.js +4 -0
  18. package/dist/faces/dom.d.ts +6 -0
  19. package/dist/faces/dom.js +6 -0
  20. package/dist/{http.d.ts → faces/http.d.ts} +1 -1
  21. package/dist/{http.js → faces/http.js} +1 -2
  22. package/dist/{server.d.ts → faces/server.d.ts} +8 -25
  23. package/dist/{server.js → faces/server.js} +25 -155
  24. package/dist/{vmz-dom.d.ts → faces/vmz-dom.d.ts} +1 -1
  25. package/dist/{vmz-dom.js → faces/vmz-dom.js} +1 -2
  26. package/dist/{vmz-runtime.d.ts → faces/vmz-runtime.d.ts} +1 -1
  27. package/dist/{vmz-runtime.js → faces/vmz-runtime.js} +1 -2
  28. package/dist/host/deployment-registry.d.ts +16 -0
  29. package/dist/{deployment-registry.js → host/deployment-registry.js} +1 -68
  30. package/dist/host/list-client-components.d.ts +14 -0
  31. package/dist/{list-client-components.js → host/list-client-components.js} +0 -37
  32. package/dist/{localize-body-links.js → host/localize-body-links.js} +0 -1
  33. package/dist/host/native-addon.d.ts +6 -0
  34. package/dist/{native-addon.js → host/native-addon.js} +0 -20
  35. package/dist/host/render-host.d.ts +20 -0
  36. package/dist/{render-host.js → host/render-host.js} +0 -16
  37. package/dist/{serve-host.d.ts → host/serve-host.d.ts} +3 -3
  38. package/dist/{serve-host.mjs → host/serve-host.mjs} +47 -185
  39. package/dist/shared/host.types.d.ts +67 -0
  40. package/dist/shared/host.types.js +4 -0
  41. package/dist/shared/server.types.d.ts +39 -0
  42. package/dist/shared/server.types.js +4 -0
  43. package/dist/{dom-ssr.d.ts → ssr/dom-ssr.d.ts} +8 -37
  44. package/dist/{dom-ssr.js → ssr/dom-ssr.js} +162 -219
  45. package/package.json +34 -34
  46. package/dist/deployment-registry.d.ts +0 -70
  47. package/dist/direct-host-box.d.ts +0 -26
  48. package/dist/dom-core.d.ts +0 -402
  49. package/dist/dom-core.js +0 -4813
  50. package/dist/dom.client.d.ts +0 -4
  51. package/dist/dom.client.js +0 -5
  52. package/dist/dom.d.ts +0 -6
  53. package/dist/dom.js +0 -7
  54. package/dist/list-client-components.d.ts +0 -62
  55. package/dist/native-addon.d.ts +0 -12
  56. package/dist/render-host.d.ts +0 -32
  57. package/dist/unknown-component.d.ts +0 -40
  58. /package/dist/{position-context.d.ts → browser/position-context.d.ts} +0 -0
  59. /package/dist/{index.d.ts → faces/index.d.ts} +0 -0
  60. /package/dist/{index.js → faces/index.js} +0 -0
  61. /package/dist/{localize-body-links.d.ts → host/localize-body-links.d.ts} +0 -0
  62. /package/dist/{route-layout-chain.d.ts → host/route-layout-chain.d.ts} +0 -0
  63. /package/dist/{route-layout-chain.js → host/route-layout-chain.js} +0 -0
@@ -1,4 +0,0 @@
1
- /**
2
- * Browser / client-only DOM entry — tree-shakeable (no SSR serialize/hydrate).
3
- */
4
- export * from './dom-core.js';
@@ -1,5 +0,0 @@
1
- // @ts-nocheck
2
- /**
3
- * Browser / client-only DOM entry — tree-shakeable (no SSR serialize/hydrate).
4
- */
5
- export * from './dom-core.js';
package/dist/dom.d.ts DELETED
@@ -1,6 +0,0 @@
1
- /**
2
- * VMZ DOM / SSR runtime — precise patches, no VDOM diff.
3
- * Compat barrel for `@vmz/core/dom` (full client + SSR).
4
- */
5
- export * from './dom-core.js';
6
- export * from './dom-ssr.js';
package/dist/dom.js DELETED
@@ -1,7 +0,0 @@
1
- // @ts-nocheck
2
- /**
3
- * VMZ DOM / SSR runtime — precise patches, no VDOM diff.
4
- * Compat barrel for `@vmz/core/dom` (full client + SSR).
5
- */
6
- export * from './dom-core.js';
7
- export * from './dom-ssr.js';
@@ -1,62 +0,0 @@
1
- /**
2
- * Discover compiled client component modules from Deployment Plan only.
3
- * Shared by serve-host SSR, static emit, and test hosts (plan-only host).
4
- */
5
- export { DEPLOYMENT_SCHEMA, readDeploymentDocument, componentEntriesFromDeployment, collectDependsOnClosure, dedupeComponentEntriesByTag, mergeExplicitComponentEntries, loadComponentEntries, importAndRegisterComponentEntries, bootstrapComponentRegistry, } from './deployment-registry.js';
6
- export { createRenderHost } from './render-host.js';
7
- /**
8
- * @param {string} dir
9
- * @param {{ strict?: boolean }} [opts]
10
- * @returns {Promise<Array<{ name: string, entry: string, chunkId?: string }>>}
11
- */
12
- export declare function listClientComponents(dir: any, opts?: {}): Promise<{
13
- name: any;
14
- entry: any;
15
- chunkId: any;
16
- }[]>;
17
- /**
18
- * Sync variant for callers that already use fs sync (legacy static-emit helpers).
19
- * @param {string} dir
20
- * @param {{ strict?: boolean }} [opts]
21
- * @returns {Array<{ name: string, entry: string, chunkId?: string }>}
22
- */
23
- export declare function listClientComponentsSync(dir: any, opts?: {}): {
24
- name: any;
25
- entry: any;
26
- chunkId: any;
27
- }[];
28
- /**
29
- * @param {Array<{ name: string, entry: string, chunkId?: string }>} entries
30
- * @param {Record<string, string> | undefined} explicit
31
- * @returns {Array<{ name: string, entry: string, chunkId?: string }>}
32
- */
33
- export declare function mergeComponentEntries(entries: any, explicit: any): {
34
- name: any;
35
- entry: any;
36
- chunkId: any;
37
- }[];
38
- /**
39
- * @param {string} distDir
40
- * @param {Record<string, string> | undefined} [explicit]
41
- * @param {{ strict?: boolean, closureRoots?: string[] }} [opts]
42
- * @returns {Promise<Array<{ name: string, entry: string, chunkId?: string }>>}
43
- */
44
- export declare function resolveComponentEntries(distDir: any, explicit: any, opts?: {}): Promise<{
45
- name: any;
46
- entry: any;
47
- chunkId: any;
48
- }[]>;
49
- /**
50
- * Import all (or filtered) client components and register for SSR / static emit / test hosts.
51
- * @param {string} distDir
52
- * @param {(map: Record<string, unknown>) => void} registerComponents
53
- * @param {{
54
- * cacheBust?: string | number,
55
- * include?: (entry: { name: string, entry: string, chunkId?: string }) => boolean,
56
- * explicit?: Record<string, string>,
57
- * strict?: boolean,
58
- * closureRoots?: string[],
59
- * preload?: 'all' | 'closure' | 'none',
60
- * }} [opts]
61
- */
62
- export declare function preloadComponentRegistry(distDir: any, registerComponents: any, opts?: {}): Promise<{}>;
@@ -1,12 +0,0 @@
1
- /**
2
- * Discover and load the vmz N-API addon (same contract as `@vmz/vmz` loadNative).
3
- */
4
- /**
5
- * @returns {any}
6
- */
7
- export declare function loadNativeAddon(): any;
8
- /**
9
- * @param {string} fnName
10
- * @returns {any}
11
- */
12
- export declare function requireNativeFn(fnName: any): any;
@@ -1,32 +0,0 @@
1
- /**
2
- * Unified SSR/DOM render host — explicit deployment bootstrap before renderToString/stream/mount.
3
- * Hosts must not call renderToString until ensureComponents() has run for the active closure.
4
- */
5
- /**
6
- * @param {string} distDir
7
- * @param {{
8
- * strictDeployment?: boolean,
9
- * strict?: boolean,
10
- * explicit?: Record<string, string>,
11
- * cacheBust?: string | number,
12
- * preload?: 'all' | 'closure' | 'none',
13
- * closureRoots?: string[],
14
- * }} [opts]
15
- */
16
- export declare function createRenderHost(distDir: any, opts?: {}): Promise<{
17
- distDir: any;
18
- deployment: any;
19
- dom: any;
20
- loadedChunkIds: Set<unknown>;
21
- ensureComponents: (rootChunkIds: any) => Promise<{}>;
22
- closureChunkIds: (rootChunkIds: any) => Set<unknown>;
23
- renderToString: any;
24
- renderToStream: any;
25
- mount: any;
26
- hydrate: any;
27
- resume: any;
28
- destroy: any;
29
- flushPending: any;
30
- /** @deprecated Prefer ensureComponents via createRenderHost; low-level escape hatch. */
31
- registerComponents: any;
32
- }>;
@@ -1,40 +0,0 @@
1
- /**
2
- * Unknown Direct component resilience (`ssr-unknown-component-error-node`).
3
- * Leaf failure → subtree error node; do not throw out of document SSR.
4
- */
5
- /** @type {string} */
6
- export declare const UNKNOWN_COMPONENT_ERROR = "unknown-component";
7
- /**
8
- * Append a leaf diagnostic for tooling (does not replace the error node).
9
- * @param {string} name
10
- * @param {string} [via]
11
- */
12
- export declare function noteUnknownComponent(name: any, via?: string): void;
13
- /**
14
- * SSR serialize-tree error node (keeps document HTTP 200).
15
- * @param {string} name
16
- */
17
- export declare function serializeUnknownComponentNode(name: any): {
18
- __kind: string;
19
- tag: string;
20
- attrs: {
21
- 'data-vmz-error': string;
22
- 'data-vmz-component': string;
23
- };
24
- children: any[];
25
- appendChild(c: any): void;
26
- };
27
- /**
28
- * Live DOM error host (client create / schedule).
29
- * @param {string} name
30
- * @param {string} [via]
31
- * @returns {HTMLElement}
32
- */
33
- export declare function createUnknownComponentElement(name: any, via?: string): HTMLDivElement;
34
- /**
35
- * Mark an existing island host as unknown (resume / EventEntry).
36
- * @param {HTMLElement} el
37
- * @param {string} name
38
- * @param {string} [via]
39
- */
40
- export declare function markUnknownComponentHost(el: any, name: any, via?: string): void;
File without changes
File without changes