@memoized-dom/runtime 0.0.5 → 0.0.7

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 (59) hide show
  1. package/README.md +15 -2
  2. package/dist/access.d.ts +10 -10
  3. package/dist/access.d.ts.map +1 -1
  4. package/dist/async-storage.d.ts +9 -0
  5. package/dist/async-storage.d.ts.map +1 -0
  6. package/dist/chunks/access-CMv8a6Cm.js +1 -0
  7. package/dist/chunks/jsx-dom-C2FcLSgz.js +1 -0
  8. package/dist/chunks/mount-COP9U3A-.js +1 -0
  9. package/dist/chunks/src-CMZZbF4X.js +0 -0
  10. package/dist/cleanup.d.ts +3 -0
  11. package/dist/cleanup.d.ts.map +1 -1
  12. package/dist/cond.d.ts +1 -1
  13. package/dist/cond.d.ts.map +1 -1
  14. package/dist/dirty-reasons.d.ts +12 -5
  15. package/dist/dirty-reasons.d.ts.map +1 -1
  16. package/dist/effect.d.ts.map +1 -1
  17. package/dist/environment.d.ts +60 -0
  18. package/dist/environment.d.ts.map +1 -0
  19. package/dist/events.d.ts +3 -7
  20. package/dist/events.d.ts.map +1 -1
  21. package/dist/hot.d.ts +14 -0
  22. package/dist/hot.d.ts.map +1 -0
  23. package/dist/hot.js +1 -0
  24. package/dist/hydrate.d.ts +19 -0
  25. package/dist/hydrate.d.ts.map +1 -0
  26. package/dist/hydrate.js +1 -0
  27. package/dist/hydration-error.d.ts +8 -0
  28. package/dist/hydration-error.d.ts.map +1 -0
  29. package/dist/hydration.d.ts +123 -0
  30. package/dist/hydration.d.ts.map +1 -0
  31. package/dist/index.d.ts +15 -7
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +1 -1
  34. package/dist/jsx-dom.d.ts.map +1 -1
  35. package/dist/kernel.d.ts +88 -40
  36. package/dist/kernel.d.ts.map +1 -1
  37. package/dist/list-keys.d.ts +40 -0
  38. package/dist/list-keys.d.ts.map +1 -0
  39. package/dist/list-update.d.ts +6 -0
  40. package/dist/list-update.d.ts.map +1 -0
  41. package/dist/list.d.ts +3 -7
  42. package/dist/list.d.ts.map +1 -1
  43. package/dist/mount.d.ts +32 -0
  44. package/dist/mount.d.ts.map +1 -0
  45. package/dist/props.d.ts.map +1 -1
  46. package/dist/refs.d.ts +3 -0
  47. package/dist/refs.d.ts.map +1 -1
  48. package/dist/server.d.ts +2 -0
  49. package/dist/server.d.ts.map +1 -0
  50. package/dist/server.js +1 -0
  51. package/dist/setters.d.ts +2 -0
  52. package/dist/setters.d.ts.map +1 -1
  53. package/dist/state-cells.d.ts +51 -0
  54. package/dist/state-cells.d.ts.map +1 -0
  55. package/dist/testing.d.ts +1 -0
  56. package/dist/testing.d.ts.map +1 -1
  57. package/dist/testing.js +1 -1
  58. package/package.json +55 -28
  59. package/dist/chunks/chunk-BRFV3POR.js +0 -1
package/README.md CHANGED
@@ -4,13 +4,26 @@ Dependency-free registry, scheduling, optional dirty-reason batching, access
4
4
  routing, keyed regions, props boxes, cleanup/ref ownership, and DOM value helpers
5
5
  for memoized-dom compiler output.
6
6
 
7
- Application source does not need to import reactive primitives. Generated
8
- modules import this package as one namespace:
7
+ Application source does not need to import reactive primitives. The ordinary
8
+ browser entry imports only the mounting boundary:
9
+
10
+ ```ts
11
+ import { mount } from '@memoized-dom/runtime';
12
+ import { App } from './App';
13
+
14
+ mount('root', App);
15
+ ```
16
+
17
+ Generated modules import this package as one namespace:
9
18
 
10
19
  ```js
11
20
  import * as MD from '@memoized-dom/runtime';
12
21
  ```
13
22
 
23
+ `mount()` resolves string targets with `document.getElementById()`, owns only
24
+ the nodes produced by the compiled root, returns an idempotent `unmount()`
25
+ handle, and keeps the compiler's private factory ABI out of authored code.
26
+
14
27
  The package is independently buildable:
15
28
 
16
29
  ```bash
package/dist/access.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  /**
2
- * @file access.ts
3
- * M3 — The static access table: compile-time read/write knowledge.
2
+ * access.ts — M3 — The static access table: compile-time read/write knowledge.
4
3
  *
5
4
  * In the real pipeline (M5) the COMPILER emits this table per app by analyzing
6
5
  * component bodies. In the bootstrap we hand-write it — we are the compiler.
@@ -18,6 +17,11 @@
18
17
  * HONEST LIMITATION: ordinary 'Row[*]' readers over-approximate and dirty all
19
18
  * matching live rows. Parametrized payload patterns can narrow this when the
20
19
  * compiler has a precise target; otherwise guarded writes absorb the slack.
20
+ *
21
+ * SSR Slice 1.1b — all resolver state lives on the active application
22
+ * runtime. Installed fragments and their derived matcher caches are
23
+ * request-scoped: two concurrent server renders maintain completely separate
24
+ * tables, and a runtime's registry listener mutates only its own expansions.
21
25
  */
22
26
  import { type EntityId } from './kernel';
23
27
  export interface AccessTable {
@@ -28,13 +32,9 @@ export interface AccessTable {
28
32
  pattern: string;
29
33
  }[]>;
30
34
  }
31
- /**
32
- * Install a table fragment. Fragments MERGE app-wide (spec §4.6): every
33
- * compiled module installs its own fragment at init, and readers from all
34
- * of them must stay live — a write in module A can target a component
35
- * declared in module B. Re-installing the same fragment is idempotent.
36
- */
37
- export declare function installAccessTable(table: AccessTable, root: EntityId): void;
35
+ export declare function installAccessTable(table: AccessTable, root: EntityId, owner?: string): void;
36
+ /** Remove one compiler module's analysis fragment during hot replacement. */
37
+ export declare function uninstallAccessTable(owner: string): void;
38
38
  /** Clear every installed fragment — test isolation, not app code. */
39
39
  export declare function resetAccessTable(): void;
40
40
  export declare function isOpaque(variable: string): boolean;
@@ -57,5 +57,5 @@ export declare function resolveStaticWrites(writes: readonly string[]): EntityId
57
57
  *
58
58
  * Returns 'root-subtree' when any write is opaque — the Imba fallback.
59
59
  */
60
- export declare function resolveWrites(writes: readonly string[], _liveIds: readonly EntityId[], payload?: Record<string, any>): EntityId[] | 'root-subtree';
60
+ export declare function resolveWrites(writes: readonly string[], _liveIds: readonly EntityId[], payload?: Record<string, unknown>): EntityId[] | 'root-subtree';
61
61
  //# sourceMappingURL=access.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../src/access.ts"],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AAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC,CAAC;CACzD;AAmKD,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,QAAQ,EACd,KAAK,SAAsC,GAC1C,IAAI,CAON;AAyBD,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAKxD;AAED,qEAAqE;AACrE,wBAAgB,gBAAgB,IAAI,IAAI,CAKvC;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAElD;AAED,wBAAgB,SAAS,IAAI,QAAQ,CAEpC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,MAAM,EAAE,GACxB,QAAQ,EAAE,GAAG,cAAc,CAG7B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,QAAQ,EAAE,SAAS,QAAQ,EAAE,EAC7B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,QAAQ,EAAE,GAAG,cAAc,CAgE7B"}
@@ -0,0 +1,9 @@
1
+ export interface StorageShim<T> {
2
+ getStore(): T | undefined;
3
+ run<R>(store: T, callback: () => R): R;
4
+ }
5
+ export type StorageFactory = <T>() => StorageShim<T>;
6
+ /** Configure the host-specific scoped-storage implementation. */
7
+ export declare function setStorageFactory(factory: StorageFactory): void;
8
+ export declare function createStorage<T>(name?: string): StorageShim<T>;
9
+ //# sourceMappingURL=async-storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async-storage.d.ts","sourceRoot":"","sources":["../src/async-storage.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,QAAQ,IAAI,CAAC,GAAG,SAAS,CAAC;IAC1B,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;CACxC;AAED,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC;AAKrD,iEAAiE;AACjE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAE/D;AAoBD,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,SAAY,GAAG,WAAW,CAAC,CAAC,CAAC,CAyBjE"}
@@ -0,0 +1 @@
1
+ import{_ as e,h as t,l as n,m as r}from"./jsx-dom-C2FcLSgz.js";const i=/^[A-Za-z0-9._~-]+$/;function a(e){if(i.test(e))return e;let t=``;for(let n of e)if(i.test(n))t+=n;else try{t+=encodeURIComponent(n)}catch{return null}return t}function o(e){let t=typeof e;if(t===`number`){if(Number.isNaN(e))return null;let t=a(String(e));return t===null?null:`n:${t}`}if(t===`string`){let t=a(e);return t===null?null:`s:${t}`}if(t===`bigint`){let t=a(e.toString());return t===null?null:`g:${t}`}return t===`boolean`?e?`t`:`f`:null}function s(e){if(!e.includes(`%`))return e;try{return decodeURIComponent(e)}catch{return null}}function c(e){if(e===`t`)return!0;if(e===`f`)return!1;if(e.startsWith(`n:`)){let t=s(e.slice(2));return t===null||t===``||Number.isNaN(Number(t))?void 0:Number(t)}if(e.startsWith(`g:`)){let t=s(e.slice(2));return t===null||!/^-?\d+$/.test(t)?void 0:BigInt(t)}if(e.startsWith(`s:`)){let t=s(e.slice(2));return t===null?void 0:t}}function l(){return{rootId:``,exactReaders:new Map,wildReaders:new Map,paramReaders:new Map,opaqueVars:new Set,fragments:new Map,allKeysCache:[],wildMatched:new Map,resVersion:0,matchKeysCache:new Map,resolutionCache:new Map}}function u(){return n(`access`,l)}function d(t,n=e()){t.wildMatched=new Map;for(let[e,r]of t.wildReaders){let i=new Set;for(let e of r)for(let t of n)e.test(t)&&i.add(t);t.wildMatched.set(e,i)}}r((e,t)=>{let n=u();if(n.wildReaders.size===0)return;let r=!1;if(t===`add`)for(let[t,i]of n.wildReaders){let a=n.wildMatched.get(t);if(a){for(let t of i)if(t.test(e)){a.add(e),r=!0;break}}}else for(let t of n.wildMatched.values())t.delete(e)&&(r=!0);r&&n.resVersion++});function f(e){if(!e.includes(`*`))return null;let t=e.split(`**`).map(e=>e.split(`*`).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`[^/]*`)).join(`.*`);return RegExp(`^${t}$`)}function p(t=u(),n=e()){t.rootId=``,t.exactReaders=new Map,t.wildReaders=new Map,t.paramReaders=new Map,t.opaqueVars=new Set;for(let{table:e,root:n}of t.fragments.values()){t.rootId=n;for(let[n,r]of Object.entries(e.readers))for(let e of r){let r=f(e);if(r===null){let r=t.exactReaders.get(n)??[];r.includes(e)||r.push(e),t.exactReaders.set(n,r)}else{let e=t.wildReaders.get(n)??[];e.some(e=>e.source===r.source)||e.push(r),t.wildReaders.set(n,e)}}for(let[n,r]of Object.entries(e.params??{})){let e=t.paramReaders.get(n)??[];for(let t of r)e.includes(t.pattern)||e.push(t.pattern);t.paramReaders.set(n,e)}for(let n of e.opaque??[])t.opaqueVars.add(n)}t.allKeysCache=[...new Set([...t.exactReaders.keys(),...t.wildReaders.keys()])],t.matchKeysCache.clear(),t.resolutionCache.clear(),d(t,n),t.resVersion++}function m(e,t,n=`${t}\0${JSON.stringify(e)}`){u().fragments.set(n,{table:e,root:t}),h.set(n,{table:e,root:t}),p()}const h=new Map;t(e=>{if(h.size===0)return;let t=e.state.extensions,n=t.get(`access`);n===void 0&&(n=l(),t.set(`access`,n));for(let[e,t]of h)n.fragments.set(e,{table:t.table,root:t.root});p(n,e.state.registry.keys())});function g(e){u().fragments.delete(e)&&(h.delete(e),p())}function _(){u().fragments.clear(),h.clear(),p()}function v(e){return u().opaqueVars.has(e)}function y(){return u().rootId}function b(e){return e.some(v)?`root-subtree`:S(e)}function x(e,t,n){if(e.some(v))return`root-subtree`;if(n){let t=new Set,r=!0;for(let i of e){let e=u().paramReaders.get(i);if(e===void 0||e.length===0){r=!1;break}for(let i of e){let e=!1,a=i.replace(/\{([^}]+)\}/g,(t,r)=>{let i=r.trim();if(!i.startsWith(`payload.`))return e=!0,``;let a=n;for(let t of i.slice(8).split(`.`)){if(typeof a!=`object`||!a)return e=!0,``;a=a[t]}if(a==null)return e=!0,``;let s=o(a);return s===null?(e=!0,``):s});if(e){r=!1;break}t.add(a)}if(!r)break;for(let e of u().exactReaders.get(i)??[])t.add(e)}if(r&&t.size>0)return[...t]}return S(e)}function S(e){let t=u(),n=e.length===1?e[0]:e.join(` `),r=t.resolutionCache.get(n);if(r!==void 0&&r.v===t.resVersion)return r.result;let i=new Set,a=new Set;for(let n of e){let e=t.matchKeysCache.get(n);if(e===void 0){e=[];for(let r of t.allKeysCache)(r===n||r.startsWith(`${n}.`)||n.startsWith(`${r}.`))&&e.push(r);t.matchKeysCache.set(n,e)}for(let t of e)a.add(t)}for(let e of a){for(let n of t.exactReaders.get(e)??[])i.add(n);for(let n of t.wildMatched.get(e)??[])i.add(n)}let o=[...i];return t.resolutionCache.set(n,{v:t.resVersion,result:o}),o}export{b as a,c,_ as i,o as l,m as n,x as o,v as r,g as s,y as t};
@@ -0,0 +1 @@
1
+ let e=n;function t(t){e=t}function n(){let e;return{getStore(){return e},run(t,n){let r=e;e=t;try{return n()}finally{e=r}}}}function r(t=`default`){let n=globalThis,r=n.__MMD_ASYNC_STORAGE__??=new Map,i=r.get(t);if(i!==void 0)return i;let a,o={getStore(){return a??=e(),a.getStore()},run(t,n){return a??=e(),a.run(t,n)}};return r.set(t,o),o}function i(){return new Map}function a(e,t,n,r){if(r===void 0||Array.isArray(r)&&r.length===0){e.size!==0&&e.delete(t);return}if(!n){typeof r==`number`||typeof r==`string`?e.set(t,r):r.length===1?e.set(t,r[0]):e.set(t,new Set(r));return}let i=e.get(t);if(i===void 0)return;let a=typeof r==`number`||typeof r==`string`?[r]:r;if(!(i instanceof Set)){a.some(e=>e!==i)&&e.set(t,new Set([i,...a]));return}for(let e of a)i.add(e)}function o(e,t){if(e.size===0)return null;let n=e.get(t)??null;return e.delete(t),n}function s(e,t){e.size!==0&&e.delete(t)}function c(){if(typeof document>`u`)throw Error(`[memo-dom] no document available - server environments must inject a DocumentLike into their application runtime`);return document}function l(){return typeof requestAnimationFrame==`function`?requestAnimationFrame.bind(globalThis):null}function u(){return{mode:`client-create`,get document(){return c()},get schedule(){return l()},effects:`run`,refs:`run`}}function d(e){let t=u();return e===void 0?t:{mode:e.mode??t.mode,document:e.document??t.document,schedule:e.schedule===void 0?t.schedule:e.schedule,effects:e.effects??t.effects,refs:e.refs??t.refs,hydration:e.hydration}}const f=typeof queueMicrotask==`function`?queueMicrotask.bind(globalThis):e=>Promise.resolve().then(e);function p(e){return{registry:new Map,dirty:new Set,volatile:new Set,dirtyReasons:i(),cells:new Map,idsCache:null,generation:0,scheduler:f,volatileFrameScheduled:!1,scheduled:!1,inCommit:!1,renderingEntity:null,renderCounts:null,markedBy:null,extensions:new Map,environment:d(e)}}let m=0;function h(e=`runtime-${++m}`,t){let n=p(t),r={id:e,state:n,dispose(){let e=[...n.registry.keys()];for(let t of e)z(n,t);n.dirty.clear(),n.dirtyReasons.clear(),n.cells.clear(),n.volatile.clear(),n.idsCache=null,n.scheduled=!1,n.inCommit=!1,n.renderingEntity=null,n.renderCounts=null,n.markedBy=null,n.extensions.clear(),v===r&&(v=g)}};for(let e of b)e(r);return r}const g={id:`browser-default`,state:p(),dispose(){throw Error(`[memo-dom] the default browser runtime cannot be disposed`)}},_=r(`runtime`);let v=g;function y(){return _.getStore()??v}const b=[];function x(e){return b.push(e),()=>{let t=b.indexOf(e);t>=0&&b.splice(t,1)}}function S(e){let t=v;return v=e,t}function C(e,t){let n=v;return _.run(e,()=>{v=e;try{return t()}finally{v=n}})}function w(e){y().state.scheduler=e}function T(){return y().state.environment}function E(){return y().state.environment.hydration===void 0}function D(e,t){let n=y().state,r=n.environment;n.environment={mode:e.mode??r.mode,document:e.document??r.document,schedule:e.schedule===void 0?r.schedule:e.schedule,effects:e.effects??r.effects,refs:e.refs??r.refs,hydration:e.hydration??r.hydration};try{return t()}finally{n.environment=r}}function O(e,t){let n=y().state.extensions,r=n.get(e);if(r!==void 0)return r;let i=t();return n.set(e,i),i}function k(){y().state.scheduler=f}const A=[],j=[];function M(e){j.includes(e)||j.push(e)}function N(e){A.push(e)}function P(e,t){for(let n of A)n(e,t)}function F(e){let t=0;for(let n=0;n<e.length;n++)e.charCodeAt(n)===47&&t++;return t}function I(e){if(e.volatileFrameScheduled||e.volatile.size===0)return;let t=e.environment.schedule;t!==null&&(e.volatileFrameScheduled=!0,t(()=>{if(e.volatileFrameScheduled=!1,e.environment.document.hidden!==!0)for(let t of e.volatile)G(t,-1);I(e)}))}function L(e){let t=y().state,n=e.parent===null?void 0:t.registry.get(e.parent);e.depth=e.depth??(n&&n.depth!==void 0?n.depth+1:F(e.id)),t.registry.set(e.id,e),e.volatile===!0?t.volatile.add(e.id):t.volatile.delete(e.id),n&&(n.children??=new Set).add(e.id),t.idsCache=null,t.generation++,P(e.id,`add`),I(t)}function R(e){z(y().state,e)}function z(e,t){let n=e.registry.get(t);if(!n)return;n.parent!==null&&e.registry.get(n.parent)?.children?.delete(t);let r=[t],i=[],a=[];for(;r.length>0;){let t=r.pop(),n=e.registry.get(t);if(n&&(i.push(t),n.children))for(let e of n.children)r.push(e)}i.reverse();for(let t of i)e.registry.delete(t),e.dirty.delete(t),e.volatile.delete(t),s(e.dirtyReasons,t),P(t,`remove`);for(let e of i)for(let t of j){let n=t(e);n!==void 0&&a.push(...n)}if(e.idsCache=null,e.generation++,a.length===1)throw a[0];if(a.length>1)throw AggregateError(a,`[memo-dom] ${a.length} cleanup disposers failed while unregistering '${t}'`)}function B(e){R(e)}function V(e){return y().state.registry.has(e)}function H(e){return y().state.registry.get(e)}function U(e){let t=y().state,n=e=>{if(e.children!==void 0)for(let r of e.children){let e=t.registry.get(r);e!==void 0&&(e.phase!==`effect`&&(e.render(),K(r)),n(e))}},r=e=>{if(e.children!==void 0)for(let n of e.children){let e=t.registry.get(n);e!==void 0&&(e.phase===`effect`&&(e.render(),K(n)),r(e))}},i=t.registry.get(e);i!==void 0&&(n(i),r(i))}function W(){let e=y().state;return e.idsCache??=[...e.registry.keys()],e.idsCache}function G(e,t){let n=y().state;if(!n.registry.has(e))return;n.inCommit&&n.markedBy!==null&&n.renderingEntity!==null&&n.markedBy.set(e,n.renderingEntity);let r=n.dirty.has(e);(t!==void 0||r)&&a(n.dirtyReasons,e,r,t),n.dirty.add(e),J(n)}function K(e){let t=y().state;t.dirty.size!==0&&t.dirty.delete(e)&&s(t.dirtyReasons,e)}function q(e){let t=y().state,n=e+`/`,r=!1;for(let i of t.registry.keys())(i===e||i.startsWith(n))&&(t.dirty.add(i),s(t.dirtyReasons,i),r=!0);r&&J(t)}function J(e){e.scheduled||e.inCommit||(e.scheduled=!0,e.scheduler(Y))}function Y(){let e=y().state;if(e.scheduled=!1,!e.inCommit){e.inCommit=!0,e.renderCounts??=new Map,e.markedBy??=new Map;try{for(let t=0;t<100&&e.dirty.size>0;t++){let t=[];for(let n of e.dirty){let r=e.registry.get(n);r?t.push(r):(e.dirty.delete(n),s(e.dirtyReasons,n))}let n=t.some(e=>e.phase!==`effect`)?t.filter(e=>e.phase!==`effect`):t;n.sort((e,t)=>(e.depth??0)-(t.depth??0));for(let t of n)if(e.dirty.delete(t.id)){let n=(e.renderCounts.get(t.id)??0)+1;if(e.renderCounts.set(t.id,n),n>12){let r=new Map;for(let[n,i]of e.markedBy){let a=e.renderCounts.get(n)??0;(n===t.id||a>1)&&r.set(i,(r.get(i)??0)+1)}let i=[...r].sort((e,t)=>t[1]-e[1]).slice(0,5).map(([e,t])=>`${e} (${t} marks)`).join(`, `);throw Error(`[memo-dom] entity '${t.id}' rendered ${n} times within a single commit — a render cycle involves it. Entities that marked it or its participants during this commit: ${i||`unknown`}. An effect likely writes state its own owner's update re-reads.`)}e.renderingEntity=t.id;try{t.render(o(e.dirtyReasons,t.id))}finally{e.renderingEntity=null}}}if(e.dirty.size>0)throw Error(`[memo-dom] commit cascade exceeded 100 passes — an update is dirtying its own readers (cycle)`)}finally{e.inCommit=!1,e.renderingEntity=null,e.renderCounts=null,e.markedBy=null}}}function X(){let e=y().state;return{registry:e.registry,dirtySet:e.dirty,volatileSet:e.volatile}}function Z(e){if(e.nodeType!==11)return[e];if(typeof e==`object`&&e&&`__mmdAdoptedChildren`in e){let t=e;if(t.__mmdAdoptedChildren!==void 0)return[...t.__mmdAdoptedChildren]}return Array.from(e.childNodes)}export{w as C,r as D,R as E,t as O,S,B as T,W as _,h as a,C as b,H as c,G as d,q as f,L as g,x as h,Y as i,O as l,N as m,X as n,y as o,M as p,E as r,T as s,Z as t,V as u,U as v,K as w,D as x,k as y};
@@ -0,0 +1 @@
1
+ import{E as e,l as t,s as n,t as r}from"./jsx-dom-C2FcLSgz.js";var i=class extends Error{boundary;expected;actual;constructor(e,t,n){super(`memoized-dom: hydration mismatch in '${e}': expected ${t}, found ${n}`),this.name=`HydrationMismatchError`,this.boundary=e,this.expected=t,this.actual=n}};const a=new WeakMap;function o(){return t(`mount`,()=>({mountedHosts:new WeakMap,mountedRoots:new Map}))}function s(e,t){a.set(e,t)}function c(e){for(let t of e)t.parentNode?.removeChild(t)}function l(e){if(typeof e!=`string`)return e;let t=n().document.getElementById(e);if(t===null)throw Error(`memoized-dom: mount target '#${e}' was not found`);return t}function u(t,n){let i=l(t);if(o().mountedHosts.has(i))throw Error(`memoized-dom: mount target already owns an application`);let s=a.get(n);if(s===void 0)throw Error(`memoized-dom: mount received a component that is not a compiled application root`);if(o().mountedRoots.has(s.id))throw Error(`memoized-dom: root entity '${s.id}' is already mounted`);if(o().mountedRoots.size>0)throw Error(`memoized-dom: the runtime currently supports one mounted application`);let u;try{u=s.create({mode:`create`,host:i})}catch(t){throw e(s.id),t}let d=r(u);try{i.appendChild(u)}catch(t){throw e(s.id),c(d),t}let f=!0,p={host:i,rootId:s.id,nodes:d,get mounted(){return f},unmount(){if(f){f=!1,o().mountedHosts.delete(i),o().mountedRoots.delete(s.id);try{e(s.id)}finally{c(d)}}}};return o().mountedHosts.set(i,p),o().mountedRoots.set(s.id,p),p}function d(e){return a.get(e)}export{l as a,c as i,o as n,d as o,s as r,i as s,u as t};
Binary file
package/dist/cleanup.d.ts CHANGED
@@ -5,6 +5,9 @@
5
5
  * `cleanup(componentId, disposer)`. Registrations may happen before the
6
6
  * component enters the entity registry; unregistering the entity owns and
7
7
  * synchronously drains its disposers.
8
+ *
9
+ * Disposer storage lives on the active application runtime, so concurrent
10
+ * server requests never drain each other's teardowns.
8
11
  */
9
12
  import { type EntityId } from './kernel';
10
13
  export type CleanupDisposer = () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"cleanup.d.ts","sourceRoot":"","sources":["../src/cleanup.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAmB,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC;AAYzC,mEAAmE;AACnE,wBAAgB,OAAO,CACrB,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,eAAe,GACxB,eAAe,CAiBjB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,EAAE,CAmB/D"}
1
+ {"version":3,"file":"cleanup.d.ts","sourceRoot":"","sources":["../src/cleanup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAsC,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE7E,MAAM,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC;AAsBzC,mEAAmE;AACnE,wBAAgB,OAAO,CACrB,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,eAAe,GACxB,eAAe,CAkBjB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,EAAE,CAoB/D"}
package/dist/cond.d.ts CHANGED
@@ -15,7 +15,7 @@
15
15
  * - A swap destroys branch-local DOM state (focus, scroll); module state
16
16
  * survives, so re-mounting a branch reflects current state.
17
17
  */
18
- import type { EntityId } from './kernel';
18
+ import { type EntityId } from './kernel';
19
19
  export interface CondEntry {
20
20
  /** Root nodes of the mounted branch (elements or fragment children). */
21
21
  nodes: Node[];
@@ -1 +1 @@
1
- {"version":3,"file":"cond.d.ts","sourceRoot":"","sources":["../src/cond.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,WAAW,SAAS;IACxB,wEAAwE;IACxE,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,2CAA2C;IAC3C,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,UAAU;IACzB,2EAA2E;IAC3E,MAAM,IAAI,IAAI,CAAC;IACf,sCAAsC;IACtC,KAAK,IAAI,MAAM,CAAC;IAChB,6DAA6D;IAC7D,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,IAAI,EACZ,EAAE,EAAE,QAAQ,EACZ,IAAI,EAAE,MAAM,MAAM,EAClB,QAAQ,EAAE,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,EAAE,GAC9C,UAAU,CA8CZ"}
1
+ {"version":3,"file":"cond.d.ts","sourceRoot":"","sources":["../src/cond.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAwB,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE/D,MAAM,WAAW,SAAS;IACxB,wEAAwE;IACxE,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,2CAA2C;IAC3C,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,UAAU;IACzB,2EAA2E;IAC3E,MAAM,IAAI,IAAI,CAAC;IACf,sCAAsC;IACtC,KAAK,IAAI,MAAM,CAAC;IAChB,6DAA6D;IAC7D,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,IAAI,EACZ,EAAE,EAAE,QAAQ,EACZ,IAAI,EAAE,MAAM,MAAM,EAClB,QAAQ,EAAE,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,EAAE,GAC9C,UAAU,CAqFZ"}
@@ -1,14 +1,21 @@
1
1
  /**
2
2
  * Batches exact numeric causes for dirty entities until their next render.
3
+ *
4
+ * The pending store lives on the active application runtime so concurrent
5
+ * server renders never observe each other's reasons.
3
6
  */
4
- export type DirtyReasonInput = number | readonly number[];
5
- export type DirtyReasons = number | ReadonlySet<number> | null;
7
+ export type DirtyReason = number | string;
8
+ export type DirtyReasonInput = DirtyReason | readonly DirtyReason[];
9
+ export type DirtyReasons = DirtyReason | ReadonlySet<DirtyReason> | null;
6
10
  type EntityId = string;
11
+ /** Per-runtime cause storage; owned by the kernel's application runtime. */
12
+ export type DirtyReasonStore = Map<EntityId, DirtyReason | Set<DirtyReason>>;
13
+ export declare function createDirtyReasonStore(): DirtyReasonStore;
7
14
  /** Merge an exact cause, or clear causes when the update must be full. */
8
- export declare function mergeDirtyReasons(id: EntityId, wasDirty: boolean, reason: DirtyReasonInput | undefined): void;
15
+ export declare function mergeDirtyReasons(store: DirtyReasonStore, id: EntityId, wasDirty: boolean, reason: DirtyReasonInput | undefined): void;
9
16
  /** Consume pending causes; absence is the full-update sentinel. */
10
- export declare function takeDirtyReasons(id: EntityId): DirtyReasons;
17
+ export declare function takeDirtyReasons(store: DirtyReasonStore, id: EntityId): DirtyReasons;
11
18
  /** Discard causes for an update that was cancelled or became conservative. */
12
- export declare function clearDirtyReasons(id: EntityId): void;
19
+ export declare function clearDirtyReasons(store: DirtyReasonStore, id: EntityId): void;
13
20
  export {};
14
21
  //# sourceMappingURL=dirty-reasons.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dirty-reasons.d.ts","sourceRoot":"","sources":["../src/dirty-reasons.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE/D,KAAK,QAAQ,GAAG,MAAM,CAAC;AAGvB,0EAA0E;AAC1E,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,QAAQ,EACZ,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,gBAAgB,GAAG,SAAS,GACnC,IAAI,CA8BN;AAED,mEAAmE;AACnE,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,QAAQ,GAAG,YAAY,CAK3D;AAED,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAEpD"}
1
+ {"version":3,"file":"dirty-reasons.d.ts","sourceRoot":"","sources":["../src/dirty-reasons.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;AAC1C,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,SAAS,WAAW,EAAE,CAAC;AACpE,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC,GAAG,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+ {"version":3,"file":"effect.d.ts","sourceRoot":"","sources":["../src/effect.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAW,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAML,KAAK,QAAQ,EACd,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,cAAc,GAAG,MAAM,IAAI,GAAG,eAAe,CAAC;AAC1D,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,CAAC;AAE5C,wBAAgB,cAAc,CAC5B,EAAE,EAAE,QAAQ,EACZ,MAAM,EAAE,QAAQ,GAAG,IAAI,EACvB,QAAQ,EAAE,cAAc,GACvB,IAAI,CA0CN;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,EAAE,EAAE,QAAQ,EACZ,MAAM,EAAE,QAAQ,GAAG,IAAI,EACvB,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,cAAc,GACvB,IAAI,CA+BN"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * environment.ts - Phase 1.2 capability descriptor.
3
+ *
4
+ * Runtime behavior must be selected by explicit capabilities, not inferred
5
+ * from `typeof window` probes scattered across modules. The active
6
+ * application runtime carries one RenderEnvironment; the browser default
7
+ * resolves lazily against ambient globals so existing imports behave
8
+ * identically.
9
+ *
10
+ * Modes map to proposal phases:
11
+ * client-create ordinary browser mounting (today's only path)
12
+ * server-dom Phase 1.4 LinkeDOM reference rendering
13
+ * server-string Phase 4 string writer
14
+ * hydrate Phase 3 adoption
15
+ */
16
+ import type { HydrationController } from './hydration';
17
+ export type RenderMode = 'client-create' | 'server-dom' | 'server-string' | 'hydrate';
18
+ /**
19
+ * Lifecycle capabilities. 'defer' is reserved for hydration (Phase 3):
20
+ * recorded now, executed after adoption. Until then it behaves like
21
+ * 'disabled'.
22
+ */
23
+ export type Capability = 'run' | 'defer' | 'disabled';
24
+ /**
25
+ * The node operations the RUNTIME itself performs (structural anchors,
26
+ * fragments, range removal, host lookup). Compiled element creation goes
27
+ * through the same document in server-dom mode once Phase 1.4 lands; the
28
+ * string tier replaces it in Phase 4.
29
+ */
30
+ export interface DocumentLike {
31
+ readonly hidden?: boolean;
32
+ createComment(data: string): Comment;
33
+ createElement(tagName: string): Element;
34
+ createElementNS(namespaceURI: string, qualifiedName: string): Element;
35
+ createTextNode(data: string): Text;
36
+ createDocumentFragment(): DocumentFragment;
37
+ createRange?(): Range;
38
+ getElementById(id: string): Element | null;
39
+ }
40
+ export interface RenderEnvironment {
41
+ mode: RenderMode;
42
+ /**
43
+ * Node source for runtime-owned structure. Defaults to the ambient
44
+ * document in client-create mode; server modes must inject one.
45
+ */
46
+ document: DocumentLike;
47
+ /**
48
+ * Driver for conservative volatile-pull frames. null disables pulling
49
+ * entirely (servers render synchronously; nothing keeps ticking).
50
+ */
51
+ schedule: ((fn: () => void) => void) | null;
52
+ effects: Capability;
53
+ refs: Capability;
54
+ hydration?: HydrationController;
55
+ }
56
+ /** Browser default: ambient document, rAF pulls, everything runs. */
57
+ export declare function clientEnvironment(): RenderEnvironment;
58
+ /** Merge partial overrides over the client default. */
59
+ export declare function resolveEnvironment(overrides?: Partial<RenderEnvironment>): RenderEnvironment;
60
+ //# sourceMappingURL=environment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,MAAM,UAAU,GAClB,eAAe,GACf,YAAY,GACZ,eAAe,GACf,SAAS,CAAC;AAEd;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACrC,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IACxC,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC;IACtE,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,sBAAsB,IAAI,gBAAgB,CAAC;IAC3C,WAAW,CAAC,IAAI,KAAK,CAAC;IACtB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;CAC5C;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,UAAU,CAAC;IACjB;;;OAGG;IACH,QAAQ,EAAE,YAAY,CAAC;IACvB;;;OAGG;IACH,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IAC5C,OAAO,EAAE,UAAU,CAAC;IACpB,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAiBD,qEAAqE;AACrE,wBAAgB,iBAAiB,IAAI,iBAAiB,CAarD;AAED,uDAAuD;AACvD,wBAAgB,kBAAkB,CAChC,SAAS,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GACrC,iBAAiB,CAYnB"}
package/dist/events.d.ts CHANGED
@@ -23,14 +23,10 @@ export interface EventRecord {
23
23
  /** Provenance for every routed event — devtools, tests, debugging. */
24
24
  export declare function getEventLog(): readonly EventRecord[];
25
25
  export declare function clearEventLog(): void;
26
- /**
27
- * Route exact or bounded effects through the static access table and dirty
28
- * their readers.
29
- * This is THE invalidation entry point — handlers and programmatic sources
30
- * share it, so there is exactly one routing code path in the runtime.
31
- */
32
26
  export declare function commitWrites(writes: readonly string[]): void;
27
+ /** Route a compiler-proven structure-only collection write. */
28
+ export declare function commitStructuralWrites(writes: readonly string[]): void;
33
29
  /** Route an L2 payload through parameterized access patterns. */
34
- export declare function commitWritesWithPayload(writes: readonly string[], payload: Record<string, any>): void;
30
+ export declare function commitWritesWithPayload(writes: readonly string[], payload: Record<string, unknown>): void;
35
31
  export declare function handle<T extends Event>(origin: EntityId, writes: readonly string[], fn: (ev: T) => void): (ev: T) => void;
36
32
  //# sourceMappingURL=events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAA+B,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGtE,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,EAAE,EAAE,MAAM,CAAC;CACZ;AAKD,sEAAsE;AACtE,wBAAgB,WAAW,IAAI,SAAS,WAAW,EAAE,CAEpD;AAED,wBAAgB,aAAa,IAAI,IAAI,CAEpC;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAO5D;AAED,iEAAiE;AACjE,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC3B,IAAI,CAON;AAED,wBAAgB,MAAM,CAAC,CAAC,SAAS,KAAK,EACpC,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,GAClB,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,CASjB"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAA+B,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAYtE,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,EAAE,EAAE,MAAM,CAAC;CACZ;AAKD,sEAAsE;AACtE,wBAAgB,WAAW,IAAI,SAAS,WAAW,EAAE,CAEpD;AAED,wBAAgB,aAAa,IAAI,IAAI,CAEpC;AAoBD,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAE5D;AAED,+DAA+D;AAC/D,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CActE;AAED,iEAAiE;AACjE,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,IAAI,CAON;AAED,wBAAgB,MAAM,CAAC,CAAC,SAAS,KAAK,EACpC,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,GAClB,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,CASjB"}
package/dist/hot.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ /** Dev-only ownership and replacement for compiler-emitted component roots. */
2
+ import { type EntityId } from './kernel';
3
+ export type HotComponentFactory = (id: string, parent: string | null, props?: unknown[]) => Node;
4
+ export type HotComponentUpdate = readonly [
5
+ previous: HotComponentFactory,
6
+ next: HotComponentFactory | undefined,
7
+ lightweight: boolean
8
+ ];
9
+ export declare function registerHotComponent(factory: HotComponentFactory, id: EntityId, parent: EntityId | null, nodes: Node[], props: unknown[] | null): void;
10
+ /** Apply one accepted Vite module update to its live component instances. */
11
+ export declare function applyHotUpdate(updates: readonly HotComponentUpdate[], rootId: EntityId): void;
12
+ /** Remove stale module-owned singleton entities and analysis before reevaluation. */
13
+ export declare function disposeHotModule(moduleId: string, rootId: EntityId): void;
14
+ //# sourceMappingURL=hot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hot.d.ts","sourceRoot":"","sources":["../src/hot.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,OAAO,EAKL,KAAK,QAAQ,EACd,MAAM,UAAU,CAAC;AAIlB,MAAM,MAAM,mBAAmB,GAAG,CAChC,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,KAAK,CAAC,EAAE,OAAO,EAAE,KACd,IAAI,CAAC;AAUV,MAAM,MAAM,kBAAkB,GAAG,SAAS;IACxC,QAAQ,EAAE,mBAAmB;IAC7B,IAAI,EAAE,mBAAmB,GAAG,SAAS;IACrC,WAAW,EAAE,OAAO;CACrB,CAAC;AAyBF,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,mBAAmB,EAC5B,EAAE,EAAE,QAAQ,EACZ,MAAM,EAAE,QAAQ,GAAG,IAAI,EACvB,KAAK,EAAE,IAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,GACtB,IAAI,CASN;AAuDD,6EAA6E;AAC7E,wBAAgB,cAAc,CAC5B,OAAO,EAAE,SAAS,kBAAkB,EAAE,EACtC,MAAM,EAAE,QAAQ,GACf,IAAI,CAYN;AAED,qFAAqF;AACrF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,CAUzE"}
package/dist/hot.js ADDED
@@ -0,0 +1 @@
1
+ import{E as e,_ as t,f as n,p as r,t as i}from"./chunks/jsx-dom-C2FcLSgz.js";import{s as a}from"./chunks/access-CMv8a6Cm.js";const o=new Map,s=new Map;let c=!1;function l(e){s.delete(e.id);let t=o.get(e.factory);t?.delete(e),t?.size===0&&o.delete(e.factory)}function u(){c||(c=!0,r(e=>{let t=s.get(e);t!==void 0&&l(t)}))}function d(e,t,n,r,i){u();let a=s.get(t);a!==void 0&&l(a);let c={factory:e,id:t,parent:n,nodes:r,props:i};s.set(t,c);let d=o.get(e)??new Set;d.add(c),o.set(e,d)}function f(t,n){if(s.get(t.id)!==t)return;let r=t.nodes.find(e=>e.parentNode!==null),a=r?.parentNode,o=(r?.ownerDocument)?.createComment(`memoized-dom-hmr`);r!==void 0&&a!=null&&o!==void 0&&a.insertBefore(o,r),e(t.id);for(let e of t.nodes)e.parentNode?.removeChild(e);try{let e=t.props===null?n(t.id,t.parent):n(t.id,t.parent,t.props),r=i(e);if(o?.parentNode!==null&&o?.parentNode!==void 0){let e=o.parentNode;for(let t of r)e.insertBefore(t,o);e.removeChild(o)}}catch{o?.parentNode?.removeChild(o),m()}}function p(e,t){let n=[...o.get(e)??[]];for(let e of n)f(e,t);return n.length}function m(){let e=[...s.values()].filter(e=>e.parent===null);for(let t of e)f(t,t.factory)}function h(e,t){if(e.some(([,e,t])=>e===void 0||t)){m();return}let r=0;for(let[t,n]of e)n!==void 0&&(r+=p(t,n));r===0&&n(t)}function g(n,r){a(n);let i=encodeURIComponent(n),o=`${r}/$computed/${i}#`,s=`${r}/$module-effects/${i}/`;for(let n of[...t()])(n.startsWith(o)||n.startsWith(s))&&e(n)}export{h as applyHotUpdate,g as disposeHotModule,d as registerHotComponent};
@@ -0,0 +1,19 @@
1
+ import { HydrationMismatchError } from './hydration';
2
+ import { type MountableComponent, type MountTarget, type MountedApplication } from './mount';
3
+ export interface HydrationPayloadDelivery {
4
+ readonly version: 1;
5
+ readonly state?: unknown;
6
+ }
7
+ export interface HydrateOptions {
8
+ /** Recover a root mismatch by discarding server markup and mounting fresh. */
9
+ recover?: boolean;
10
+ /** Called when a mismatch is recovered. */
11
+ onRecover?: (error: HydrationMismatchError) => void;
12
+ /** DOM-embedded payload lookup, an explicit payload, or no restoration. */
13
+ payload?: 'auto' | 'none' | HydrationPayloadDelivery;
14
+ }
15
+ /** Adopt server-rendered DOM within the compiled application root boundary. */
16
+ export declare function hydrate(target: MountTarget, component: MountableComponent, options?: HydrateOptions): MountedApplication;
17
+ export { createHydrationCursor, HydrationDocument, HydrationMismatchError, HydrationMarkerIndex, HydrationNodePlan, LocalHydrationCursor, parseHydrationMarker, } from './hydration';
18
+ export type { ClaimedHydrationRange, HydrationCloseMarker, HydrationController, HydrationMarker, HydrationMarkerKind, HydrationNodeExpectation, HydrationOpenMarker, PairedHydrationMarkerKind, } from './hydration';
19
+ //# sourceMappingURL=hydrate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hydrate.d.ts","sourceRoot":"","sources":["../src/hydrate.ts"],"names":[],"mappings":"AAUA,OAAO,EAGL,sBAAsB,EACvB,MAAM,aAAa,CAAC;AAErB,OAAO,EAML,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACxB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACpB,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,8EAA8E;IAC9E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACpD,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,wBAAwB,CAAC;CACtD;AAED,+EAA+E;AAC/E,wBAAgB,OAAO,CACrB,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,kBAAkB,EAC7B,OAAO,GAAE,cAAmB,GAC3B,kBAAkB,CAuEpB;AAkCD,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ import{E as e,l as t,s as n,t as r,x as i}from"./chunks/jsx-dom-C2FcLSgz.js";import{a,i as o,n as s,o as c,s as l,t as u}from"./chunks/mount-COP9U3A-.js";const d=new Set([`r`,`c`,`g`,`l`]);function f(e){if(e===`/mmd`)return{type:`close`};if(!e.startsWith(`mmd:`)||e.length<7)return null;let t=e[4];if(e[5]!==`:`||t!==`r`&&t!==`c`&&t!==`g`&&t!==`l`&&t!==`w`&&t!==`d`)return null;let n=e.slice(6),r=n.indexOf(` @ `),i=r===-1?n:n.slice(0,r);if(i.length===0||i.includes(`>`))return null;let a=r===-1?void 0:n.slice(r+3);return{type:`open`,kind:t,identity:i,...a===void 0?{}:{attribute:a}}}function p(e){return e?.nodeType===8?f(e.data):null}function m(e){return e===null?`the end of the boundary`:e.nodeType===8?`comment <!--${e.data}-->`:e.nodeType===1?`element <${e.localName}>`:e.nodeType===3?`a text node`:`node type ${e.nodeType}`}function h(e,t,n){let r=0;for(let n=e.nextSibling;n!==t&&n!==null;n=n?.nextSibling??null){let e=p(n);if(e?.type===`open`&&d.has(e.kind)){r++;continue}if(e?.type===`close`){if(r===0)return n;r--}}throw new l(n,`a matching <!--/mmd--> close`,m(t))}function g(e,t,n,r){let i=p(e);if(i?.type!==`open`||i.kind!==t||i.identity!==n)throw new l(r,`<!--mmd:${t}:${n}-->`,m(e));return e}var _=class e{boundary;end;#e;constructor(e,t,n){this.boundary=e,this.#e=t,this.end=n}get nextNode(){return this.#e===this.end?null:this.#e}get done(){return this.#e===this.end}claimNode(e){let t=this.nextNode;if(t===null)throw new l(this.boundary,v(e),m(null));if(p(t)!==null||t.nodeType!==e.nodeType)throw new l(this.boundary,v(e),m(t));if(t.nodeType===1){let n=t;if(e.tagName!==void 0&&n.localName!==e.tagName.toLowerCase()||e.namespaceURI!==void 0&&n.namespaceURI!==e.namespaceURI)throw new l(this.boundary,v(e),m(t))}return this.#e=t.nextSibling,t}claimRange(t,n){let r=g(this.nextNode,t,n,this.boundary),i=h(r,this.end,n);return this.#e=i.nextSibling,{kind:t,identity:n,open:r,end:i,cursor:new e(n,r.nextSibling,i)}}claimRow(t,n){let r=`${t}:${n}`,i=g(this.nextNode,`w`,r,this.boundary),a=0,o=this.end;for(let e=i.nextSibling;e!==this.end&&e!==null;e=e?.nextSibling??null){let t=p(e);if(t?.type===`open`){if(a===0&&t.kind===`w`){o=e;break}d.has(t.kind)&&a++}else t?.type===`close`&&a>0&&a--}return this.#e=o,{kind:`w`,identity:r,open:i,end:o,cursor:new e(r,i.nextSibling,o)}}expectDone(){if(!this.done)throw new l(this.boundary,`the end of the boundary`,m(this.nextNode))}};function v(e){if(e.nodeType===1){let t=e.tagName??`*`,n=e.namespaceURI===void 0?``:` in namespace ${String(e.namespaceURI)}`;return`element <${t.toLowerCase()}>${n}`}return e.nodeType===3?`a text node`:e.nodeType===8?`a comment node`:`node type ${e.nodeType}`}function y(e,t){let n=null;for(let r=e.firstChild;r!==null;r=r.nextSibling){let e=p(r);if(e?.type===`open`&&e.kind===`r`&&e.identity===t){if(n!==null)throw new l(t,`one application-root marker`,`multiple matching application-root markers`);n=r}}if(n===null)throw new l(t,`<!--mmd:r:${t}-->`,`no matching application-root marker`);let r=h(n,null,t);return{kind:`r`,identity:t,open:n,end:r,cursor:new _(t,n.nextSibling,r)}}var b=class{boundary;#e;#t=0;constructor(e){this.boundary=e.identity,this.#e=[],x(e.open.nextSibling,e.end,this.#e)}get remaining(){return this.#e.length-this.#t}get done(){return this.#t===this.#e.length}claimNode(e){let t=this.#e[this.#t]??null;if(t===null||t.nodeType!==e.nodeType)throw new l(this.boundary,v(e),m(t));if(t.nodeType===1){let n=t;if(e.tagName!==void 0&&n.localName!==e.tagName.toLowerCase()||e.namespaceURI!==void 0&&n.namespaceURI!==e.namespaceURI)throw new l(this.boundary,v(e),m(t))}return this.#t++,t}expectDone(){if(!this.done)throw new l(this.boundary,`the end of the creation plan`,`${this.remaining} unclaimed server node(s)`)}};function x(e,t,n){let r=e;for(;r!==null&&r!==t;){let e=p(r);if(e?.type===`open`){r=e.kind===`w`?S(r,t):h(r,t,e.identity).nextSibling;continue}if(e?.type===`close`){r=r.nextSibling;continue}x(r.firstChild,null,n),n.push(r),r=r.nextSibling}}function S(e,t){let n=0;for(let r=e.nextSibling;r!==null&&r!==t;r=r.nextSibling){let e=p(r);if(e?.type===`open`){if(n===0&&e.kind===`w`)return r;d.has(e.kind)&&n++}else if(e?.type===`close`){if(n===0)return r;n--}}return t}var C=class{#e=new Map;constructor(e){this.#n(e.open.nextSibling,e.end)}get size(){return this.#e.size}claimRange(e,t){return this.#t(e,t)}claimRow(e,t){return this.#t(`w`,`${e}:${t}`)}get unclaimed(){let e=0;for(let t of this.#e.values())t.claimed||e++;return e}#t(e,t){let n=this.#e.get(t);if(n===void 0)throw new l(t,`<!--mmd:${e}:${t}-->`,`no matching marker in the server stream`);if(n.kind!==e)throw new l(t,`<!--mmd:${e}:${t}-->`,`<!--mmd:${n.kind}:${t}-->`);if(n.claimed)throw new l(t,`one structural claim`,`the range was already claimed`);return n.claimed=!0,{kind:e,identity:t,open:n.open,end:n.end,cursor:new _(t,n.open.nextSibling,n.end)}}#n(e,t){let n=e;for(;n!==null&&n!==t;){let e=p(n);if(e?.type!==`open`){n.nodeType===1&&this.#n(n.firstChild,null),n=n.nextSibling;continue}if(e.kind===`d`){n=n.nextSibling;continue}let r;if(r=e.kind===`w`?S(n,t)??t??n:h(n,t,e.identity),this.#e.has(e.identity))throw new l(e.identity,`one marker identity`,`a duplicate identity in the server stream`);this.#e.set(e.identity,{kind:e.kind,open:n,end:r,claimed:!1}),this.#n(n.nextSibling,r),n=r===t?t:e.kind===`w`&&r.nodeType===8&&p(r)?.type===`open`?r:r.nextSibling}}},w=class{#e;#t;#n;constructor(e,t){this.#e=e,this.#t=new C(t),this.#n=[new b(t)]}claimRange(e,t){return this.#t.claimRange(e,t)}claimRow(e,t){return this.#t.claimRow(e,t)}pushRange(e){this.#n.push(new b(e))}popRange(){if(this.#n.length===1)throw Error(`memoized-dom: cannot pop the hydration root plan`);this.#n.at(-1).expectDone(),this.#n.pop()}createElement(e){return this.#r().claimNode({nodeType:1,tagName:e})}createElementNS(e,t){return this.#r().claimNode({nodeType:1,tagName:t,namespaceURI:e})}createTextNode(e){return this.#r().claimNode({nodeType:3})}createComment(e){return this.#e.createComment(e)}createDocumentFragment(){let e=this.#e.createDocumentFragment(),t=[];return Object.defineProperty(e,"__mmdAdoptedChildren",{value:t,configurable:!0}),e.appendChild=e=>(t.push(e),e),e}createRange(){if(this.#e.createRange===void 0)throw Error(`memoized-dom: active hydration document does not support Range`);return this.#e.createRange()}getElementById(e){return this.#e.getElementById(e)}expectDone(){if(this.#n.length!==1)throw new l(this.#n[0].boundary,`the root plan only`,`${this.#n.length-1} open structural plan(s)`);if(this.#r().expectDone(),this.#t.unclaimed>0)throw new l(this.#r().boundary,`every structural range claimed`,`${this.#t.unclaimed} unclaimed structural range(s)`)}#r(){return this.#n.at(-1)}};function T(t,d,f={}){let p=a(t),m=s();if(m.mountedHosts.has(p))throw Error(`memoized-dom: mount target already owns an application`);let h=c(d);if(h===void 0)throw Error(`memoized-dom: hydrate received a component that is not a compiled application root`);if(m.mountedRoots.has(h.id)||m.mountedRoots.size>0)throw Error(`memoized-dom: root entity '${h.id}' is already mounted`);E(h.id,f.payload);let g=y(p,h.id),_=new w(n().document,g),v;try{v=i({mode:`hydrate`,document:_,hydration:_},()=>h.create({mode:`hydrate`,host:p})),_.expectDone()}catch(n){if(e(h.id),f.recover&&n instanceof l)return f.onRecover?.(n),p.innerHTML=``,u(t,d);throw n}let b=r(v),x=!0,S={host:p,rootId:h.id,nodes:b,get mounted(){return x},unmount(){if(x){x=!1,m.mountedHosts.delete(p),m.mountedRoots.delete(h.id);try{e(h.id)}finally{o(b),g.open.parentNode?.removeChild(g.open),g.end.parentNode?.removeChild(g.end)}}}};return m.mountedHosts.set(p,S),m.mountedRoots.set(h.id,S),S}function E(e,n){if(n===`none`)return;let r=typeof n==`object`?n:void 0;if(r===void 0&&globalThis.document!==void 0){let t=globalThis.document.querySelector(`script[type="application/mmd+json"][data-mmd-root="${e}"]`);if(t?.textContent)try{r=JSON.parse(t.textContent)}catch{}}typeof r==`object`&&r&&`state`in r&&r.state!==void 0&&t(`mmd:data-runtime-active`,()=>({})).restoreState?.(r.state)}export{w as HydrationDocument,C as HydrationMarkerIndex,l as HydrationMismatchError,b as HydrationNodePlan,_ as LocalHydrationCursor,y as createHydrationCursor,T as hydrate,f as parseHydrationMarker};
@@ -0,0 +1,8 @@
1
+ /** Structural skew between server markup and the compiled client tree. */
2
+ export declare class HydrationMismatchError extends Error {
3
+ readonly boundary: string;
4
+ readonly expected: string;
5
+ readonly actual: string;
6
+ constructor(boundary: string, expected: string, actual: string);
7
+ }
8
+ //# sourceMappingURL=hydration-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hydration-error.d.ts","sourceRoot":"","sources":["../src/hydration-error.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,YAAY,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAQ7D;CACF"}
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Phase 3 hydration cursor — read-only adoption over the v0.2 marker stream.
3
+ *
4
+ * The cursor never creates, moves, or removes nodes. It validates and claims
5
+ * the server tree in compiler-defined order. Mutation/recovery belongs to the
6
+ * mount integration layer; keeping this primitive read-only makes failed
7
+ * adoption safe and independently testable.
8
+ */
9
+ import type { DocumentLike } from './environment';
10
+ export { HydrationMismatchError } from './hydration-error';
11
+ export type HydrationMarkerKind = 'r' | 'c' | 'g' | 'l' | 'w' | 'd';
12
+ export type PairedHydrationMarkerKind = 'r' | 'c' | 'g' | 'l';
13
+ export interface HydrationOpenMarker {
14
+ readonly type: 'open';
15
+ readonly kind: HydrationMarkerKind;
16
+ readonly identity: string;
17
+ readonly attribute?: string;
18
+ }
19
+ export interface HydrationCloseMarker {
20
+ readonly type: 'close';
21
+ }
22
+ export type HydrationMarker = HydrationOpenMarker | HydrationCloseMarker;
23
+ export interface HydrationController {
24
+ claimRange(kind: Exclude<PairedHydrationMarkerKind, 'r'>, identity: string): ClaimedHydrationRange;
25
+ claimRow(listId: string, encodedKey: string): ClaimedHydrationRange;
26
+ pushRange(range: ClaimedHydrationRange): void;
27
+ popRange(): void;
28
+ }
29
+ export interface HydrationNodeExpectation {
30
+ readonly nodeType: number;
31
+ readonly tagName?: string;
32
+ readonly namespaceURI?: string | null;
33
+ }
34
+ export interface ClaimedHydrationRange {
35
+ readonly kind: PairedHydrationMarkerKind | 'w';
36
+ readonly identity: string;
37
+ readonly open: Comment;
38
+ /** Exclusive end: the pair close, next row marker, or enclosing list close. */
39
+ readonly end: Node;
40
+ readonly cursor: LocalHydrationCursor;
41
+ }
42
+ /** Parse one protocol comment body. Unrelated comments return null. */
43
+ export declare function parseHydrationMarker(data: string): HydrationMarker | null;
44
+ /** A deterministic sibling cursor bounded by one structural owner. */
45
+ export declare class LocalHydrationCursor {
46
+ #private;
47
+ readonly boundary: string;
48
+ readonly end: Node;
49
+ constructor(boundary: string, first: Node | null, end: Node);
50
+ get nextNode(): Node | null;
51
+ get done(): boolean;
52
+ /** Claim one ordinary node and validate kind/tag/namespace in place. */
53
+ claimNode(expectation: HydrationNodeExpectation): Node;
54
+ /** Claim the next paired component/conditional/list region. */
55
+ claimRange(kind: Exclude<PairedHydrationMarkerKind, 'r'>, identity: string): ClaimedHydrationRange;
56
+ /**
57
+ * Claim one v0.2 single-opening row. Its exclusive end is the next row
58
+ * marker at list depth zero or the enclosing list close.
59
+ */
60
+ claimRow(listId: string, encodedKey: string): ClaimedHydrationRange;
61
+ expectDone(): void;
62
+ }
63
+ /** Locate and validate one application-root marker pair inside a host. */
64
+ export declare function createHydrationCursor(host: Element, rootId: string): ClaimedHydrationRange;
65
+ /**
66
+ * Compiler creation order for one claimed range.
67
+ *
68
+ * JSX emission creates descendants before their host (`text → button →
69
+ * section`), while DOM order stores hosts before descendants. This plan
70
+ * performs one marker-aware post-order walk and then validates each factory
71
+ * claim without creating or moving nodes. Nested structural ranges are
72
+ * skipped: their cond/list/row primitive owns a separate plan.
73
+ */
74
+ export declare class HydrationNodePlan {
75
+ #private;
76
+ readonly boundary: string;
77
+ constructor(range: ClaimedHydrationRange);
78
+ get remaining(): number;
79
+ get done(): boolean;
80
+ /** Claim the next node in compiler creation order and validate its shape. */
81
+ claimNode(expectation: HydrationNodeExpectation): Node;
82
+ expectDone(): void;
83
+ }
84
+ /**
85
+ * One-time identity index for nested structural marker ranges.
86
+ *
87
+ * Compiler creation order and DOM marker order are independent. The node
88
+ * plan serves ordinary nodes in post-order; this index locates `c/g/l/w`
89
+ * owners by their compiler-canonical identity regardless of when a factory
90
+ * reaches them. It validates pair nesting while building and permits exactly
91
+ * one claim per identity.
92
+ */
93
+ export declare class HydrationMarkerIndex {
94
+ #private;
95
+ constructor(root: ClaimedHydrationRange);
96
+ get size(): number;
97
+ claimRange(kind: Exclude<PairedHydrationMarkerKind, 'r'>, identity: string): ClaimedHydrationRange;
98
+ claimRow(listId: string, encodedKey: string): ClaimedHydrationRange;
99
+ get unclaimed(): number;
100
+ }
101
+ /**
102
+ * Adoption document backed by one compiler-order node plan per structural
103
+ * range. Runtime primitives claim their marker range through the controller
104
+ * surface, push it for the initial factory, then pop after all ordinary
105
+ * nodes were served.
106
+ */
107
+ export declare class HydrationDocument implements DocumentLike, HydrationController {
108
+ #private;
109
+ constructor(fallback: DocumentLike, range: ClaimedHydrationRange);
110
+ claimRange(kind: Exclude<PairedHydrationMarkerKind, 'r'>, identity: string): ClaimedHydrationRange;
111
+ claimRow(listId: string, encodedKey: string): ClaimedHydrationRange;
112
+ pushRange(range: ClaimedHydrationRange): void;
113
+ popRange(): void;
114
+ createElement(tagName: string): Element;
115
+ createElementNS(namespaceURI: string, qualifiedName: string): Element;
116
+ createTextNode(_data: string): Text;
117
+ createComment(data: string): Comment;
118
+ createDocumentFragment(): DocumentFragment;
119
+ createRange(): Range;
120
+ getElementById(id: string): Element | null;
121
+ expectDone(): void;
122
+ }
123
+ //# sourceMappingURL=hydration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hydration.d.ts","sourceRoot":"","sources":["../src/hydration.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,MAAM,MAAM,mBAAmB,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AACpE,MAAM,MAAM,yBAAyB,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAE9D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAAG,oBAAoB,CAAC;AAGzE,MAAM,WAAW,mBAAmB;IAClC,UAAU,CACR,IAAI,EAAE,OAAO,CAAC,yBAAyB,EAAE,GAAG,CAAC,EAC7C,QAAQ,EAAE,MAAM,GACf,qBAAqB,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,U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qBAAqB,GAAG,IAAI,CAE5C;IAED,QAAQ,IAAI,IAAI,CAMf;IAED,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAKtC;IAED,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAMpE;IAED,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAElC;IAED,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnC;IAED,sBAAsB,IAAI,gBAAgB,CAYzC;IAED,WAAW,IAAI,KAAK,CAOnB;IAED,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAEzC;IAED,UAAU,IAAI,IAAI,CAgBjB;CAKF"}
package/dist/index.d.ts CHANGED
@@ -3,26 +3,34 @@
3
3
  *
4
4
  * The compiler emits `import * as MD from '<runtimePath>'` and calls every
5
5
  * primitive through the `MD.` namespace, so this barrel must re-export the
6
- * full runtime surface. User code never imports from here directly; only
7
- * compiler-emitted modules do.
6
+ * full runtime surface. Ordinary browser entries additionally import mount;
7
+ * reactive and emission primitives remain compiler-owned.
8
8
  */
9
- export { register, unregister, unregisterSubtree, registeredIds, has, markDirty, undirty, markDirtySubtree, commit, setScheduler, resetScheduler, getEntity, renderDescendants, } from './kernel';
10
- export type { DirtyReasonInput, DirtyReasons, Entity, EntityId, } from './kernel';
9
+ export { register, unregister, unregisterSubtree, registeredIds, has, markDirty, undirty, markDirtySubtree, commit, setScheduler, resetScheduler, getEntity, renderDescendants, createApplicationRuntime, getActiveApplicationRuntime, getExtensionStore, setActiveApplicationRuntime, runWithApplicationRuntime, getActiveEnvironment, canReuseTemplate, runWithRenderEnvironment, } from './kernel';
10
+ export { createStorage, type StorageShim } from './async-storage';
11
+ export type { ApplicationRuntime, DirtyReasonInput, DirtyReasons, Entity, } from './kernel';
12
+ export type { Capability, DocumentLike, RenderEnvironment, RenderMode, } from './environment';
13
+ export { defineStateCell, readCell, setCell, updateCell, } from './state-cells';
14
+ export type { StateCell } from './state-cells';
11
15
  export { cleanup } from './cleanup';
12
16
  export type { CleanupDisposer } from './cleanup';
13
17
  export { mountRef } from './refs';
14
18
  export type { RefCallback, RefValue } from './refs';
15
19
  export { registerConditionalEffect, registerEffect } from './effect';
16
20
  export type { EffectCallback, EffectCondition } from './effect';
17
- export { setText, setClassName, setClass, setAttr, setProp, setStyle, computedChanged, } from './setters';
21
+ export { setText, setClassName, setClass, setAttr, setProp, setStyle, computedChanged, effectAssignmentChanged, } from './setters';
18
22
  export type { SlotCache } from './setters';
19
- export { installAccessTable, resetAccessTable, resolveWrites, resolveStaticWrites, isOpaque, getRootId, } from './access';
23
+ export { installAccessTable, resetAccessTable, uninstallAccessTable, resolveWrites, resolveStaticWrites, isOpaque, getRootId, } from './access';
20
24
  export type { AccessTable } from './access';
21
- export { commitWrites, commitWritesWithPayload, handle, getEventLog, clearEventLog, } from './events';
25
+ export { commitStructuralWrites, commitWrites, commitWritesWithPayload, handle, getEventLog, clearEventLog, } from './events';
22
26
  export type { EventRecord } from './events';
23
27
  export { createListRegion } from './list';
24
28
  export type { ListRegion, ListEntry, KeyFn } from './list';
29
+ export { isStructuralListUpdate } from './list-update';
25
30
  export { rootNodes } from './jsx-dom';
31
+ export { decodeListKey, encodeListKey } from './list-keys';
32
+ export { mount, registerRootFactory } from './mount';
33
+ export type { MountableComponent, MountTarget, MountedApplication, RootMountContext, } from './mount';
26
34
  export { createDelegatedEventBinding, setDelegatedEvent, type DelegatedEventBinding, } from './delegated-events';
27
35
  export { patchDomProps, setDomValue } from './dom-props';
28
36
  export { classValue, setClassValue, setStyleValue } from './dom-values';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,SAAS,EACT,OAAO,EACP,gBAAgB,EAChB,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O,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAClD,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC"}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{A as z,B as A,C as B,D as C,E as D,F as E,G as F,H as G,I as H,J as I,K as J,L as K,M as L,N as M,O as N,P as O,Q as P,R as Q,S as R,T as S,U as T,V as U,a,b,c,d,e,f,g,h,i,j,k,l,m,o as n,p as o,q as p,r as q,s as r,t as s,u as t,v as u,w as v,x as w,y as x,z as y}from"./chunks/chunk-BRFV3POR.js";export{N as classValue,n as cleanup,F as clearEventLog,m as commit,G as commitWrites,H as commitWritesWithPayload,x as computedChanged,S as createCondRegion,M as createDelegatedEventBinding,J as createListRegion,g as getEntity,E as getEventLog,B as getRootId,I as handle,f as has,y as installAccessTable,A as isOpaque,j as markDirty,l as markDirtySubtree,o as mountRef,Q as patchDomProps,c as register,q as registerConditionalEffect,p as registerEffect,T as registerProps,i as registeredIds,h as renderDescendants,z as resetAccessTable,b as resetScheduler,C as resolveStaticWrites,D as resolveWrites,K as rootNodes,u as setAttr,t as setClass,s as setClassName,O as setClassValue,L as setDelegatedEvent,R as setDomValue,v as setProp,U as setProps,a as setScheduler,w as setStyle,P as setStyleValue,r as setText,k as undirty,e as unregister,d as unregisterSubtree};
1
+ import{C as e,D as t,E as n,S as r,T as i,_ as a,a as o,b as s,c,d as l,f as u,g as d,i as f,l as p,o as m,r as h,s as g,t as _,u as v,v as y,w as b,x,y as S}from"./chunks/jsx-dom-C2FcLSgz.js";import{a as C,c as w,i as T,l as E,n as D,o as O,r as k,s as A,t as j}from"./chunks/access-CMv8a6Cm.js";import{A as M,C as N,D as P,E as F,F as I,M as L,N as R,O as z,P as B,S as V,T as H,_ as U,a as W,b as G,c as K,d as q,f as J,g as Y,h as X,i as Z,j as Q,k as $,l as ee,m as te,n as ne,o as re,p as ie,r as ae,s as oe,u as se,v as ce,w as le,x as ue,y as de}from"./chunks/src-CMZZbF4X.js";import{r as fe,t as pe}from"./chunks/mount-COP9U3A-.js";export{h as canReuseTemplate,oe as classValue,le as cleanup,$ as clearEventLog,f as commit,M as commitStructuralWrites,Q as commitWrites,L as commitWritesWithPayload,ie as computedChanged,o as createApplicationRuntime,Z as createCondRegion,se as createDelegatedEventBinding,J as createListRegion,t as createStorage,w as decodeListKey,H as defineStateCell,te as effectAssignmentChanged,E as encodeListKey,m as getActiveApplicationRuntime,g as getActiveEnvironment,c as getEntity,R as getEventLog,p as getExtensionStore,j as getRootId,B as handle,v as has,D as installAccessTable,k as isOpaque,I as isStructuralListUpdate,l as markDirty,u as markDirtySubtree,pe as mount,N as mountRef,W as patchDomProps,F as readCell,d as register,ue as registerConditionalEffect,V as registerEffect,ne as registerProps,fe as registerRootFactory,a as registeredIds,y as renderDescendants,T as resetAccessTable,S as resetScheduler,C as resolveStaticWrites,O as resolveWrites,_ as rootNodes,s as runWithApplicationRuntime,x as runWithRenderEnvironment,r as setActiveApplicationRuntime,X as setAttr,P as setCell,Y as setClass,U as setClassName,K as setClassValue,q as setDelegatedEvent,re as setDomValue,ce as setProp,ae as setProps,e as setScheduler,de as setStyle,ee as setStyleValue,G as setText,b as undirty,A as uninstallAccessTable,i as unregister,n as unregisterSubtree,z as updateCell};
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-dom.d.ts","sourceRoot":"","sources":["../src/jsx-dom.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,CAI5C"}
1
+ {"version":3,"file":"jsx-dom.d.ts","sourceRoot":"","sources":["../src/jsx-dom.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,CAa5C"}