@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
package/package.json CHANGED
@@ -1,56 +1,56 @@
1
1
  {
2
2
  "name": "@vmz/core",
3
- "version": "0.1.31",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "description": "VMZ production runtime core — DOM / SSR / HTTP / WriteBarrier (no compiler)",
6
6
  "exports": {
7
7
  ".": {
8
- "types": "./dist/index.d.ts",
9
- "default": "./dist/server.js"
8
+ "types": "./dist/faces/index.d.ts",
9
+ "default": "./dist/faces/server.js"
10
10
  },
11
11
  "./dom": {
12
- "types": "./dist/dom.d.ts",
13
- "default": "./dist/dom.js"
12
+ "types": "./dist/faces/dom.d.ts",
13
+ "default": "./dist/faces/dom.js"
14
14
  },
15
15
  "./dom/client": {
16
- "types": "./dist/dom.client.d.ts",
17
- "default": "./dist/dom.client.js"
16
+ "types": "./dist/faces/dom.client.d.ts",
17
+ "default": "./dist/faces/dom.client.js"
18
18
  },
19
19
  "./dom/browser": {
20
- "types": "./dist/dom.browser.d.ts",
21
- "default": "./dist/dom.browser.js"
20
+ "types": "./dist/faces/dom.browser.d.ts",
21
+ "default": "./dist/faces/dom.browser.js"
22
22
  },
23
23
  "./server": {
24
- "types": "./dist/server.d.ts",
25
- "default": "./dist/server.js"
24
+ "types": "./dist/faces/server.d.ts",
25
+ "default": "./dist/faces/server.js"
26
26
  },
27
27
  "./http": {
28
- "types": "./dist/http.d.ts",
29
- "default": "./dist/http.js"
28
+ "types": "./dist/faces/http.d.ts",
29
+ "default": "./dist/faces/http.js"
30
30
  },
31
31
  "./client-nav": {
32
- "types": "./dist/client-nav.d.ts",
33
- "default": "./dist/client-nav.js"
32
+ "types": "./dist/browser/client-nav.d.ts",
33
+ "default": "./dist/browser/client-nav.js"
34
34
  },
35
35
  "./component-registry": {
36
- "types": "./dist/list-client-components.d.ts",
37
- "default": "./dist/list-client-components.js"
36
+ "types": "./dist/host/list-client-components.d.ts",
37
+ "default": "./dist/host/list-client-components.js"
38
38
  },
39
39
  "./render-host": {
40
- "types": "./dist/render-host.d.ts",
41
- "default": "./dist/render-host.js"
40
+ "types": "./dist/host/render-host.d.ts",
41
+ "default": "./dist/host/render-host.js"
42
42
  },
43
43
  "./route-layout-chain": {
44
- "types": "./dist/route-layout-chain.d.ts",
45
- "default": "./dist/route-layout-chain.js"
44
+ "types": "./dist/host/route-layout-chain.d.ts",
45
+ "default": "./dist/host/route-layout-chain.js"
46
46
  },
47
47
  "./localize-body-links": {
48
- "types": "./dist/localize-body-links.d.ts",
49
- "default": "./dist/localize-body-links.js"
48
+ "types": "./dist/host/localize-body-links.d.ts",
49
+ "default": "./dist/host/localize-body-links.js"
50
50
  },
51
51
  "./position-context": {
52
- "types": "./dist/position-context.d.ts",
53
- "default": "./dist/position-context.js"
52
+ "types": "./dist/browser/position-context.d.ts",
53
+ "default": "./dist/browser/position-context.js"
54
54
  }
55
55
  },
56
56
  "files": [
@@ -61,21 +61,21 @@
61
61
  "vmz",
62
62
  "runtime"
63
63
  ],
64
- "main": "./dist/server.js",
65
- "types": "./dist/index.d.ts",
64
+ "main": "./dist/faces/server.js",
65
+ "types": "./dist/faces/index.d.ts",
66
66
  "scripts": {
67
- "build": "tsc -p tsconfig.json && node ../../../scripts/build/copy-serve-host-mjs.mjs"
67
+ "build": "node ../../../scripts/build/clean-package-dist.mjs packages/runtimes/vmz-runtime/dist && tsc -p tsconfig.json && node ../../../scripts/build/copy-serve-host-mjs.mjs"
68
68
  },
69
69
  "dependencies": {
70
70
  "linkedom": "^0.18.13"
71
71
  },
72
72
  "optionalDependencies": {
73
- "@vmz/vmz-win32-x64": "0.1.31",
74
- "@vmz/vmz-win32-arm64": "0.1.31",
75
- "@vmz/vmz-darwin-x64": "0.1.31",
76
- "@vmz/vmz-darwin-arm64": "0.1.31",
77
- "@vmz/vmz-linux-x64": "0.1.31",
78
- "@vmz/vmz-linux-arm64": "0.1.31"
73
+ "@vmz/vmz-win32-x64": "0.2.0",
74
+ "@vmz/vmz-win32-arm64": "0.2.0",
75
+ "@vmz/vmz-darwin-x64": "0.2.0",
76
+ "@vmz/vmz-darwin-arm64": "0.2.0",
77
+ "@vmz/vmz-linux-x64": "0.2.0",
78
+ "@vmz/vmz-linux-arm64": "0.2.0"
79
79
  },
80
80
  "publishConfig": {
81
81
  "access": "public"
@@ -1,70 +0,0 @@
1
- /**
2
- * Deployment graph → component registry bootstrap (shared by all SSR/DOM hosts).
3
- * Parse/validate and graph queries delegate to Rust vmz-artifacts via N-API.
4
- */
5
- export declare const DEPLOYMENT_SCHEMA = "vmz.deployment.v0";
6
- /**
7
- * @param {string} distDir
8
- * @param {{ strict?: boolean }} [opts]
9
- * @returns {any | null}
10
- */
11
- export declare function readDeploymentDocument(distDir: any, opts?: {}): any;
12
- /**
13
- * @param {any} deployment
14
- * @returns {Array<{ chunkId: string, name: string, entry: string, source: string }>}
15
- */
16
- export declare function componentEntriesFromDeployment(deployment: any): any;
17
- /**
18
- * @param {any} deployment
19
- * @param {string[]} rootChunkIds
20
- * @returns {Set<string>}
21
- */
22
- export declare function collectDependsOnClosure(deployment: any, rootChunkIds: any): Set<unknown>;
23
- /**
24
- * Resolve tag conflicts; strict mode throws, dev mode warns and keeps last chunkId.
25
- * @param {Array<{ chunkId: string, name: string, entry: string, source?: string }>} entries
26
- * @param {{ strict?: boolean }} [opts]
27
- * @returns {Array<{ chunkId: string, name: string, entry: string, source?: string }>}
28
- */
29
- export declare function dedupeComponentEntriesByTag(entries: any, opts?: {}): any[];
30
- /**
31
- * @param {Array<{ chunkId: string, name: string, entry: string, source?: string }>} entries
32
- * @param {Record<string, string> | undefined} explicit name → chunkId (no .client.js)
33
- * @returns {Array<{ chunkId: string, name: string, entry: string, source?: string }>}
34
- */
35
- export declare function mergeExplicitComponentEntries(entries: any, explicit: any): unknown[];
36
- /**
37
- * @param {string} distDir
38
- * @param {{
39
- * strict?: boolean,
40
- * closureRoots?: string[],
41
- * explicit?: Record<string, string>,
42
- * }} [opts]
43
- * @returns {Promise<Array<{ chunkId: string, name: string, entry: string, source?: string }>>}
44
- */
45
- export declare function loadComponentEntries(distDir: any, opts?: {}): Promise<any[]>;
46
- /**
47
- * @param {string} distDir
48
- * @param {Array<{ chunkId: string, name: string, entry: string }>} entries
49
- * @param {(map: Record<string, unknown>) => void} registerComponents
50
- * @param {{
51
- * cacheBust?: string | number,
52
- * loaded?: Set<string>,
53
- * }} [opts]
54
- * @returns {Promise<Record<string, unknown>>}
55
- */
56
- export declare function importAndRegisterComponentEntries(distDir: any, entries: any, registerComponents: any, opts?: {}): Promise<{}>;
57
- /**
58
- * Bootstrap component registry from deployment (all or closure — no directory fallback).
59
- * @param {string} distDir
60
- * @param {(map: Record<string, unknown>) => void} registerComponents
61
- * @param {{
62
- * strict?: boolean,
63
- * closureRoots?: string[],
64
- * explicit?: Record<string, string>,
65
- * cacheBust?: string | number,
66
- * loaded?: Set<string>,
67
- * preload?: 'all' | 'closure' | 'none',
68
- * }} [opts]
69
- */
70
- export declare function bootstrapComponentRegistry(distDir: any, registerComponents: any, opts?: {}): Promise<{}>;
@@ -1,26 +0,0 @@
1
- /**
2
- * Direct host box model (`ui-direct-host-box`).
3
- * Chip hosts opt into `display: contents`; block surfaces keep a real layout box.
4
- */
5
- /** @type {ReadonlySet<string>} */
6
- export declare const INLINE_HOST_CONTENTS: Set<string>;
7
- /**
8
- * @param {string} name
9
- * @param {{ __vmzHostBox?: string } | null | undefined} Ctor
10
- * @returns {'contents' | 'block'}
11
- */
12
- export declare function resolveDirectHostBox(name: any, Ctor: any): any;
13
- /**
14
- * Apply host box to a live DOM element (create / hydrate / resume).
15
- * @param {HTMLElement} host
16
- * @param {string} name
17
- * @param {{ __vmzHostBox?: string } | null | undefined} Ctor
18
- */
19
- export declare function applyDirectHostBox(host: any, name: any, Ctor: any): void;
20
- /**
21
- * SSR attrs fragment for host box (only when contents).
22
- * @param {string} name
23
- * @param {{ __vmzHostBox?: string } | null | undefined} Ctor
24
- * @returns {string | null}
25
- */
26
- export declare function directHostBoxStyleAttr(name: any, Ctor: any): string;
@@ -1,402 +0,0 @@
1
- /**
2
- * VMZ DOM client runtime — precise patches, no VDOM diff (SSR lives in dom-ssr).
3
- *
4
- *
5
- * Direct components expose `__vmzCreate` / `__vmzSerialize` / `__vmzPlan`.
6
- * Mount and client patches run that same schedule (SSR/hydrate/resume in dom-ssr).
7
- * Field writes only run registered dep patches — never re-create structure.
8
- */
9
- export { applyDirectHostBox, INLINE_HOST_CONTENTS, resolveDirectHostBox } from './direct-host-box.js';
10
- export { createUnknownComponentElement, markUnknownComponentHost, serializeUnknownComponentNode, UNKNOWN_COMPONENT_ERROR, } from './unknown-component.js';
11
- /** @param {boolean} [on] */
12
- export declare function __vmzPrecisionEnable(on?: boolean): void;
13
- /** @param {boolean} [on] */
14
- export declare function __vmzTraceEnable(on?: boolean): void;
15
- export declare function __vmzPrecisionReset(): void;
16
- export declare function __vmzTraceReset(): void;
17
- /**
18
- * StableId event snapshot (`vmz.dx.trace.v0` shape without schema stamp —
19
- * host may wrap via ingestRuntimeTrace).
20
- * @returns {{ schema: string, events: typeof traceBuf.events, status: string }}
21
- */
22
- export declare function __vmzTraceSnapshot(): {
23
- schema: string;
24
- events: any[];
25
- status: string;
26
- };
27
- /** @returns {typeof precision} */
28
- export declare function __vmzPrecisionSnapshot(): {
29
- enabled: boolean;
30
- writes: number;
31
- bindingEvals: number;
32
- patchExecs: number;
33
- domCreates: number;
34
- domMoves: number;
35
- domRemoves: number;
36
- componentExecs: number;
37
- writesByRoot: any;
38
- bindingEvalsByDep: any;
39
- patchesByDep: any;
40
- bindingEvalsByBinding: any;
41
- patchesByBinding: any;
42
- };
43
- export declare function noteDomCreate(): void;
44
- /** @param {Record<string, any>} map — Prefer createRenderHost().ensureComponents(); process-global registry. */
45
- export declare function registerComponents(map: any): void;
46
- /** Sync registry lookup (SSR serialize / client). */
47
- export declare function getRegisteredComponent(name: any): any;
48
- /**
49
- * Lazy component loader for EventEntry mixed packs (set by entry-client / entry-event).
50
- * @param {string} name
51
- * @returns {Promise<any>}
52
- */
53
- export declare function resolveComponent(name: any): Promise<any>;
54
- /**
55
- * Mount once; later updates are dep patches only (never re-run structure).
56
- * Requires compiler `__vmzCreate` (production Direct emit — no blueprint fallback).
57
- * @param {new (props?: object) => any} Component
58
- * @param {Element} container
59
- * @param {object} [props]
60
- */
61
- export declare function mount(Component: any, container: any, props?: {}): Promise<any>;
62
- /**
63
- * Nested Direct `component` schedules child onMount asynchronously; drain before return
64
- * so SSR/hydrate callers see post-mount DOM (e.g. UserCard Ada, not Loading…).
65
- * @param {object} inst
66
- */
67
- export declare function settlePendingChildMounts(inst: any): Promise<void>;
68
- /**
69
- * @param {new (props?: object) => any} Component
70
- * @param {object} inst
71
- */
72
- export declare function runDirectCreate(Component: any, inst: any): any;
73
- /** Host API for compiler-emitted `__vmzCreate` (direct path, Program IR B). */
74
- /**
75
- * First default `<slot>` owned by this component tree — skip nested `[data-vmz]`
76
- * hosts (Button/Link/Empty label slots). `querySelector('slot')` steals those and
77
- * projects parent siblings into the wrong host (commercial Drawer into Create btn).
78
- * @param {Element | null | undefined} root
79
- * @returns {Element | null}
80
- */
81
- export declare function findOwnedDefaultSlot(root: any): any;
82
- export declare const directApi: {
83
- /** @type {object | null} */
84
- _inst: any;
85
- /** @type {Array<{ deps: string[], fn: => any, bindingId?: number|string|null }> | null} */
86
- _branchBinds: any;
87
- /** @type {Array< => void> | null} */
88
- _itemPatches: any;
89
- /**
90
- * Active keyed-each context (/): item binds + event delegation.
91
- * @type {null | {
92
- * noteItemBind: (bindingId: number|string|null, deps: string[], fn: => void) => void,
93
- * needDelegate: (type: string) => void,
94
- * }}
95
- */
96
- _eachCtx: any;
97
- /** @type {null | {
98
- * el: (tag: string) => Element,
99
- * text: (value?: any) => Text,
100
- * componentHost?: (name: string) => HTMLElement | null,
101
- * enter?: (node: Element) => boolean,
102
- * leave?: () => void,
103
- * scopeDepth?: () => number,
104
- * rewindScope?: (depth: number) => void,
105
- * beginBranchScope?: () => () => void,
106
- * }} */
107
- _resumeAdopt: any;
108
- el(tag: any): any;
109
- text(value: any): any;
110
- /** Push adopted node's private resume pool for depth-first child create. */
111
- adoptEnter(node: any): any;
112
- adoptLeave(): void;
113
- frag(): DocumentFragment;
114
- attr(el: any, name: any, value: any): void;
115
- on(el: any, type: any, handler: any): void;
116
- /**
117
- * Bind a named instance method (no arrow / Function#toString).
118
- * Learns `skipFlush` after a sync invocation that schedules no dirty work
119
- * (stride / transpose self-apply DOM).
120
- * @param {Element} el
121
- * @param {string} type
122
- * @param {string} methodName
123
- * @param {{ skipFlush?: boolean } | null | undefined} [opts]
124
- */
125
- onMethod(el: any, type: any, methodName: any, opts: any): void;
126
- /**
127
- * @param {object} inst
128
- * @param {number|string|null} bindingId
129
- * @param {string[]} deps
130
- * @param {() => any} get
131
- * @param {Text} textNode
132
- * @param {{ stable: string[], branches: Array<{ cond?: => any, deps: string[] }> } | null | undefined} [cf]
133
- */
134
- bindText(inst: any, bindingId: any, deps: any, get: any, textNode: any, cf: any): void;
135
- /**
136
- * @param {object} inst
137
- * @param {number|string|null} bindingId
138
- * @param {string[]} deps
139
- * @param {() => any} get
140
- * @param {Element} el
141
- * @param {string} name
142
- * @param {{ stable: string[], branches: Array<{ cond?: => any, deps: string[] }> } | null | undefined} [cf]
143
- */
144
- bindAttr(inst: any, bindingId: any, deps: any, get: any, el: any, name: any, cf: any): void;
145
- /**
146
- * Specialized single-field attr bind (0.1.29): compile-time field name, no generic get closure in artifact.
147
- * @param {object} inst
148
- * @param {number|string|null} bindingId
149
- * @param {string} fieldName
150
- * @param {Element} el
151
- * @param {string} name
152
- */
153
- specFieldAttr(inst: any, bindingId: any, fieldName: any, el: any, name: any): void;
154
- /**
155
- * Specialized single-field text bind (0.1.29): compile-time field name in generated artifact.
156
- * @param {object} inst
157
- * @param {number|string|null} bindingId
158
- * @param {string} fieldName
159
- * @param {Text} textNode
160
- */
161
- specFieldText(inst: any, bindingId: any, fieldName: any, textNode: any): void;
162
- setHtml(el: any, value: any): void;
163
- /**
164
- * Trusted HTML binding (`html={expr}`). Author/plugin responsibility.
165
- * @param {object} inst
166
- * @param {number|string|null} bindingId
167
- * @param {string[]} deps
168
- * @param {() => any} get
169
- * @param {Element} el
170
- * @param {{ stable: string[], branches: Array<{ cond?: => any, deps: string[] }> } | null | undefined} [cf]
171
- */
172
- bindHtml(inst: any, bindingId: any, deps: any, get: any, el: any, cf: any): void;
173
- /**
174
- * Nested component (sync Direct child or island schedule).
175
- * @param {object} hostInst
176
- * @param {string} name
177
- * @param {Record<string, any>} props
178
- * @param {string | null} client
179
- */
180
- component(hostInst: any, name: any, props: any, client: any): any;
181
- /**
182
- * Subscribe to a child component event (`@submit` → event name `submit`).
183
- * Orthogonal to function props (`:on-submit` → prop `onSubmit`).
184
- * @param {HTMLElement} hostEl
185
- * @param {string} eventName
186
- * @param {(ev?: any, ...rest: any[]) => any} handler
187
- */
188
- onComponentEvent(hostEl: any, eventName: any, handler: any): void;
189
- /**
190
- * Keep nested Direct child props live with parent field writes.
191
- * @param {object} hostInst
192
- * @param {HTMLElement} hostEl
193
- * @param {string} propName
194
- * @param {string[]} deps
195
- * @param {() => any} get
196
- */
197
- bindComponentProp(hostInst: any, hostEl: any, propName: any, deps: any, get: any): void;
198
- /**
199
- * Project parent children into nested Direct component default `<slot>`.
200
- * Uses {@link findOwnedDefaultSlot} so nested Button/Link slots are not stolen.
201
- * @param {HTMLElement} hostEl
202
- * @param {Node} node
203
- */
204
- projectDefaultSlot(hostEl: any, node: any): void;
205
- /**
206
- * Direct if/else — comment anchors (no empty `span[data-vmz-if]` layout box).
207
- * @param {object} inst
208
- * @param {number|string|null} bindingId
209
- * @param {string[]} deps
210
- * @param {Array<{ cond?: => any, create: (api: typeof directApi) => Node }>} branches
211
- * @param {number|string|null} [regionId]
212
- */
213
- ifBlock(inst: any, bindingId: any, deps: any, branches: any, regionId?: any): DocumentFragment;
214
- /**
215
- * Direct keyed each — no blueprint `kind: "each"` dispatch.
216
- * /: Set/Map + Fragment batch insert; item-local binds; host field dispatch; event delegate.
217
- * @param {object} inst
218
- * @param {number|string|null} bindingId
219
- * @param {string[]} deps
220
- * @param {{ as?: string, list: => any, key?: (box: {item:any,index:number}) => any, createItem: (api: typeof directApi, box: {item:any,index:number}) => Node }} spec
221
- * @param {number|string|null} [regionId]
222
- */
223
- eachBlock(inst: any, bindingId: any, deps: any, spec: any, regionId?: any): DocumentFragment;
224
- };
225
- /**
226
- * Function prop wire: only `onXxx` camelCase is a handler prop.
227
- * Component `@event` must never normalize here — that channel is `onComponentEvent`.
228
- * @param {unknown} name
229
- * @returns {string | null}
230
- */
231
- export declare function eventPropHandlerName(name: any): string;
232
- /**
233
- * Dispatch a component event to parent subscribers registered via `onComponentEvent`.
234
- * Installed on every Direct instance as `inst.emit`.
235
- * @param {object} inst
236
- * @param {string} eventName
237
- * @param {...any} payload
238
- */
239
- export declare function emitComponentEvent(inst: any, eventName: any, ...payload: any[]): void;
240
- export declare function isEventPropName(name: any): boolean;
241
- /** HTML boolean attributes: presence means true; `false`/`null` must remove the attr. */
242
- export declare const BOOLEAN_HTML_ATTRS: Set<string>;
243
- /**
244
- * @param {Element} el
245
- * @param {string} name
246
- * @param {any} value
247
- */
248
- export declare function applyDomAttr(el: any, name: any, value: any): void;
249
- export declare function stripFns(obj: any): {};
250
- /**
251
- * Snapshot plain state/prop field values for Island HMR (session).
252
- * @param {object} inst
253
- * @returns {Record<string, unknown> | null}
254
- */
255
- export declare function snapshotInstanceState(inst: any): {};
256
- /**
257
- * @param {object} inst
258
- * @param {Record<string, unknown> | null | undefined} state
259
- */
260
- export declare function applyPreservedState(inst: any, state: any): void;
261
- /**
262
- * Tear down binders and stop patches. Safe to call more than once.
263
- * Field writes after destroy no longer update DOM (values may still change).
264
- *: also dispose owned DOM trees (child __vmzInst / region __vmzDispose).
265
- * @param {object} inst
266
- */
267
- export declare function destroy(inst: any): void;
268
- /**
269
- *: walk a DOM subtree and run lifetime dispose hooks + nested instance destroy.
270
- * Does not mark the *calling* parent destroyed; safe from destroy(inst).
271
- * @param {Node | null | undefined} root
272
- */
273
- export declare function disposeDomTree(root: any): void;
274
- export declare function scheduleClient(strategy: any, fn: any): void;
275
- /** @param {string} strategy */
276
- export declare function isEventEntryStrategy(strategy: any): boolean;
277
- export declare function scheduleClientOn(el: any, strategy: any, fn: any): void;
278
- /**
279
- * AsyncTask cancel protocol (first slice): keyed generation + AbortSignal.
280
- * Superseded runs and `destroy(inst)` abort prior work; stale results must not apply.
281
- * @param {object} inst
282
- * @param {string} key
283
- * @param {(signal: AbortSignal, meta: { generation: number }) => any | Promise<any>} fn
284
- * @returns {Promise<any>}
285
- */
286
- export declare function __vmzRunTask(inst: any, key: any, fn: any): Promise<any>;
287
- /** Abort all keyed tasks on an instance (also called from destroy). */
288
- export declare function __vmzCancelTasks(inst: any): void;
289
- /** @returns {'pending'|'success'|'error'|'cancelled'|null} */
290
- export declare function __vmzTaskStatus(inst: any, key: any): any;
291
- export declare function createInstance(Component: any, props?: {}): any;
292
- /**
293
- * Mark a plain object as intentionally shared across ownership boundaries.
294
- * @param {any} value
295
- */
296
- export declare function __vmzAllowShared(value: any): any;
297
- /**
298
- * Take exclusive ownership intent: clear multi-owner registry for this object.
299
- * Subsequent field assigns re-register from the assigning instance only.
300
- * @param {any} value
301
- */
302
- export declare function __vmzTakeShared(value: any): any;
303
- /**
304
- * @returns {Array<{ kind: string, message: string }>}
305
- */
306
- export declare function __vmzSharedCrossComponentDiagnostics(): any[];
307
- export declare function __vmzSharedCrossComponentDiagnosticsReset(): void;
308
- /**
309
- * Read a nested path under a field root (for compound / update expansion).
310
- * @param {any} inst
311
- * @param {string} root
312
- * @param {string[]} segs
313
- */
314
- export declare function __vmzReadPath(inst: any, root: any, segs: any): any;
315
- /**
316
- * Short-circuit logical path assign (`||=` / `&&=` / `??=`).
317
- * @param {any} inst
318
- * @param {string} root
319
- * @param {string[]} segs
320
- * @param {'||'|'&&'|'??'} kind
321
- * @param {any} rhs
322
- */
323
- export declare function __vmzWritePathLogical(inst: any, root: any, segs: any, kind: any, rhs: any): any;
324
- export declare function __vmzWritePath(inst: any, root: any, segs: any, value: any): any;
325
- /**
326
- * Array-item leaf write without segs array alloc (`rows[i].label = v`).
327
- * @param {any} inst
328
- * @param {string} root
329
- * @param {string|number} idx
330
- * @param {string} leaf
331
- * @param {any} value
332
- */
333
- export declare function __vmzWritePathItem(inst: any, root: any, idx: any, leaf: any, value: any): any;
334
- /**
335
- * In-place two-index swap on an owned list field (WriteBarrier Slice 5).
336
- * Prefers eachBlock O(1) DOM transpose hook; otherwise schedules a list replace.
337
- * @param {any} inst
338
- * @param {string} root
339
- * @param {number|string} ia
340
- * @param {number|string} ib
341
- */
342
- export declare function __vmzListTranspose(inst: any, root: any, ia: any, ib: any): void;
343
- /**
344
- * Compound leaf write (`rows[i].label += x`) — one item touch, no separate ReadPath.
345
- * @param {any} inst
346
- * @param {string} root
347
- * @param {string[]} segs
348
- * @param {string} op
349
- * @param {any} rhs
350
- */
351
- export declare function __vmzWritePathCompound(inst: any, root: any, segs: any, op: any, rhs: any): any;
352
- /**
353
- * Array-item compound without segs array alloc (`rows[i].label += x`).
354
- * @param {any} inst
355
- * @param {string} root
356
- * @param {string|number} idx
357
- * @param {string} leaf
358
- * @param {string} op
359
- * @param {any} rhs
360
- */
361
- export declare function __vmzWritePathCompoundItem(inst: any, root: any, idx: any, leaf: any, op: any, rhs: any): any;
362
- /**
363
- * Stride compound over an owned array (`for (i=start; i<n; i+=step) arr[i].leaf op= rhs`).
364
- * Mutates + applies DOM in one pass when eachBlock leaf hook is installed (update-every-Nth).
365
- * @param {any} inst
366
- * @param {string} root
367
- * @param {string} leaf
368
- * @param {string} op
369
- * @param {any} rhs
370
- * @param {number|string} start
371
- * @param {number|string} step
372
- */
373
- export declare function __vmzArrayItemCompoundStride(inst: any, root: any, leaf: any, op: any, rhs: any, start: any, step: any): void;
374
- /**
375
- * Compiler-inserted array mutator barrier (push/pop/splice/…).
376
- * Applies the mutator on the plain array and schedules a structural notice
377
- * at `root` + `baseSegs` (empty baseSegs → field replace).
378
- *
379
- * @param {any} inst
380
- * @param {string} root
381
- * @param {string[]} baseSegs
382
- * @param {string} method
383
- * @param {any[]} args
384
- */
385
- export declare function __vmzArrayMutate(inst: any, root: any, baseSegs: any, method: any, args: any): any;
386
- /**
387
- * WriteBarrier: true when value is an owned plain object with path barriers (no Proxy).
388
- * @param {any} value
389
- */
390
- export declare function __vmzIsWriteBarrierOwned(value: any): boolean;
391
- /**
392
- * True when value is the Proxy wrapper from array (or residual) reactive wrap.
393
- * @param {any} value
394
- */
395
- export declare function __vmzIsReactiveProxy(value: any): boolean;
396
- /** @param {object} inst */
397
- export declare function flushPending(inst: any): any;
398
- /**
399
- * True when the container already has meaningful DOM (SSR / resume shell).
400
- * @param {Element} el
401
- */
402
- export declare function hasMeaningfulChild(el: any): boolean;