@memoized-dom/compiler 0.0.4 → 0.0.6

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 (190) hide show
  1. package/README.md +106 -28
  2. package/dist/analysis/access-table.d.ts +1 -1
  3. package/dist/analysis/access-table.d.ts.map +1 -1
  4. package/dist/analysis/component-graph.d.ts +16 -1
  5. package/dist/analysis/component-graph.d.ts.map +1 -1
  6. package/dist/analysis/component-reads.d.ts +1 -1
  7. package/dist/analysis/component-reads.d.ts.map +1 -1
  8. package/dist/analysis/computed.d.ts +9 -5
  9. package/dist/analysis/computed.d.ts.map +1 -1
  10. package/dist/analysis/instance-control-flow.d.ts +1 -1
  11. package/dist/analysis/instance-control-flow.d.ts.map +1 -1
  12. package/dist/analysis/instance.d.ts +3 -4
  13. package/dist/analysis/instance.d.ts.map +1 -1
  14. package/dist/analysis/module-discovery.d.ts +27 -0
  15. package/dist/analysis/module-discovery.d.ts.map +1 -0
  16. package/dist/analysis/opaque-volatility.d.ts +7 -0
  17. package/dist/analysis/opaque-volatility.d.ts.map +1 -0
  18. package/dist/analysis/runtime-pattern.d.ts +3 -4
  19. package/dist/analysis/runtime-pattern.d.ts.map +1 -1
  20. package/dist/analysis/type-candidates.d.ts +15 -3
  21. package/dist/analysis/type-candidates.d.ts.map +1 -1
  22. package/dist/analysis.d.ts +7 -4
  23. package/dist/analysis.d.ts.map +1 -1
  24. package/dist/ast/builders.d.ts +108 -0
  25. package/dist/ast/builders.d.ts.map +1 -0
  26. package/dist/ast/compiler-types.d.ts +196 -0
  27. package/dist/ast/compiler-types.d.ts.map +1 -0
  28. package/dist/ast/factory.d.ts +139 -0
  29. package/dist/ast/factory.d.ts.map +1 -0
  30. package/dist/ast/index.d.ts +15 -0
  31. package/dist/ast/index.d.ts.map +1 -0
  32. package/dist/ast/mutate.d.ts +17 -0
  33. package/dist/ast/mutate.d.ts.map +1 -0
  34. package/dist/ast/normalize.d.ts +9 -0
  35. package/dist/ast/normalize.d.ts.map +1 -0
  36. package/dist/ast/parser.d.ts +72 -0
  37. package/dist/ast/parser.d.ts.map +1 -0
  38. package/dist/ast/printer.d.ts +23 -0
  39. package/dist/ast/printer.d.ts.map +1 -0
  40. package/dist/ast/scope.d.ts +44 -0
  41. package/dist/ast/scope.d.ts.map +1 -0
  42. package/dist/ast/strip-typescript.d.ts +9 -0
  43. package/dist/ast/strip-typescript.d.ts.map +1 -0
  44. package/dist/ast/transform.d.ts +21 -0
  45. package/dist/ast/transform.d.ts.map +1 -0
  46. package/dist/ast/tsrx/frontend.d.ts +8 -0
  47. package/dist/ast/tsrx/frontend.d.ts.map +1 -0
  48. package/dist/ast/tsrx/index.d.ts +5 -0
  49. package/dist/ast/tsrx/index.d.ts.map +1 -0
  50. package/dist/ast/tsrx/lower.d.ts +8 -0
  51. package/dist/ast/tsrx/lower.d.ts.map +1 -0
  52. package/dist/ast/tsrx/style.d.ts +8 -0
  53. package/dist/ast/tsrx/style.d.ts.map +1 -0
  54. package/dist/ast/tsrx/types.d.ts +50 -0
  55. package/dist/ast/tsrx/types.d.ts.map +1 -0
  56. package/dist/ast/types.d.ts +478 -0
  57. package/dist/ast/types.d.ts.map +1 -0
  58. package/dist/ast/walk.d.ts +22 -0
  59. package/dist/ast/walk.d.ts.map +1 -0
  60. package/dist/cells.d.ts +10 -0
  61. package/dist/cells.d.ts.map +1 -0
  62. package/dist/compile.d.ts +30 -14
  63. package/dist/compile.d.ts.map +1 -1
  64. package/dist/component-linker.d.ts +5 -1
  65. package/dist/component-linker.d.ts.map +1 -1
  66. package/dist/components/callback-props.d.ts +1 -1
  67. package/dist/components/callback-props.d.ts.map +1 -1
  68. package/dist/components/calls.d.ts +1 -1
  69. package/dist/components/calls.d.ts.map +1 -1
  70. package/dist/components/children.d.ts +5 -3
  71. package/dist/components/children.d.ts.map +1 -1
  72. package/dist/components/declarations.d.ts +10 -3
  73. package/dist/components/declarations.d.ts.map +1 -1
  74. package/dist/components/jsx-values.d.ts +2 -4
  75. package/dist/components/jsx-values.d.ts.map +1 -1
  76. package/dist/components/local-derived.d.ts +1 -1
  77. package/dist/components/local-derived.d.ts.map +1 -1
  78. package/dist/components/manifest.d.ts +2 -3
  79. package/dist/components/manifest.d.ts.map +1 -1
  80. package/dist/components/prop-effects.d.ts.map +1 -1
  81. package/dist/components/prop-linker.d.ts.map +1 -1
  82. package/dist/components/prop-origins.d.ts +2 -0
  83. package/dist/components/prop-origins.d.ts.map +1 -1
  84. package/dist/components/prop-projections.d.ts.map +1 -1
  85. package/dist/components/prop-shape.d.ts +11 -0
  86. package/dist/components/prop-shape.d.ts.map +1 -0
  87. package/dist/components/props.d.ts +9 -1
  88. package/dist/components/props.d.ts.map +1 -1
  89. package/dist/components/ref-props.d.ts.map +1 -1
  90. package/dist/components/render-callbacks.d.ts +9 -5
  91. package/dist/components/render-callbacks.d.ts.map +1 -1
  92. package/dist/components/render-functions.d.ts +1 -0
  93. package/dist/components/render-functions.d.ts.map +1 -1
  94. package/dist/components/render-prelude.d.ts +1 -1
  95. package/dist/components/render-prelude.d.ts.map +1 -1
  96. package/dist/components/return-plan.d.ts +13 -7
  97. package/dist/components/return-plan.d.ts.map +1 -1
  98. package/dist/conds.d.ts +6 -3
  99. package/dist/conds.d.ts.map +1 -1
  100. package/dist/context/ast.d.ts +18 -5
  101. package/dist/context/ast.d.ts.map +1 -1
  102. package/dist/context/model.d.ts +146 -13
  103. package/dist/context/model.d.ts.map +1 -1
  104. package/dist/data-sources.d.ts +78 -0
  105. package/dist/data-sources.d.ts.map +1 -0
  106. package/dist/diagnostics.d.ts +20 -0
  107. package/dist/diagnostics.d.ts.map +1 -0
  108. package/dist/effects.d.ts +13 -5
  109. package/dist/effects.d.ts.map +1 -1
  110. package/dist/emission/component.d.ts +3 -3
  111. package/dist/emission/component.d.ts.map +1 -1
  112. package/dist/emission/conditional-region.d.ts +6 -5
  113. package/dist/emission/conditional-region.d.ts.map +1 -1
  114. package/dist/emission/dom-template.d.ts.map +1 -1
  115. package/dist/emission/list-region.d.ts +6 -4
  116. package/dist/emission/list-region.d.ts.map +1 -1
  117. package/dist/emission/node-emitter.d.ts +4 -3
  118. package/dist/emission/node-emitter.d.ts.map +1 -1
  119. package/dist/emission/render-callback.d.ts +4 -3
  120. package/dist/emission/render-callback.d.ts.map +1 -1
  121. package/dist/emission/route-region.d.ts +10 -0
  122. package/dist/emission/route-region.d.ts.map +1 -0
  123. package/dist/emission/scope.d.ts +14 -2
  124. package/dist/emission/scope.d.ts.map +1 -1
  125. package/dist/emit.d.ts +5 -4
  126. package/dist/emit.d.ts.map +1 -1
  127. package/dist/errors.d.ts +15 -0
  128. package/dist/errors.d.ts.map +1 -0
  129. package/dist/handler-commits.d.ts +6 -1
  130. package/dist/handler-commits.d.ts.map +1 -1
  131. package/dist/handler-origin.d.ts +1 -1
  132. package/dist/handler-origin.d.ts.map +1 -1
  133. package/dist/handlers/analyze.d.ts +1 -1
  134. package/dist/handlers/analyze.d.ts.map +1 -1
  135. package/dist/handlers/local-calls.d.ts +2 -2
  136. package/dist/handlers/local-calls.d.ts.map +1 -1
  137. package/dist/handlers.d.ts +6 -5
  138. package/dist/handlers.d.ts.map +1 -1
  139. package/dist/helper-summaries.d.ts +2 -3
  140. package/dist/helper-summaries.d.ts.map +1 -1
  141. package/dist/identifiers.d.ts +15 -8
  142. package/dist/identifiers.d.ts.map +1 -1
  143. package/dist/index.d.ts +6 -2
  144. package/dist/index.d.ts.map +1 -1
  145. package/dist/index.js +3 -1
  146. package/dist/jsx/attributes.d.ts +1 -1
  147. package/dist/jsx/attributes.d.ts.map +1 -1
  148. package/dist/jsx/children.d.ts +3 -2
  149. package/dist/jsx/children.d.ts.map +1 -1
  150. package/dist/jsx/conditional-directives.d.ts +21 -0
  151. package/dist/jsx/conditional-directives.d.ts.map +1 -0
  152. package/dist/jsx/dom-attributes.d.ts +1 -1
  153. package/dist/jsx/dom-attributes.d.ts.map +1 -1
  154. package/dist/jsx/dynamic-tags.d.ts +9 -15
  155. package/dist/jsx/dynamic-tags.d.ts.map +1 -1
  156. package/dist/jsx/events.d.ts +2 -3
  157. package/dist/jsx/events.d.ts.map +1 -1
  158. package/dist/jsx/refs.d.ts +5 -4
  159. package/dist/jsx/refs.d.ts.map +1 -1
  160. package/dist/jsx/svg.d.ts +2 -2
  161. package/dist/jsx/svg.d.ts.map +1 -1
  162. package/dist/jsx-types.d.ts +42 -0
  163. package/dist/jsx-types.d.ts.map +1 -0
  164. package/dist/lifecycle.d.ts +10 -5
  165. package/dist/lifecycle.d.ts.map +1 -1
  166. package/dist/linker.d.ts +56 -5
  167. package/dist/linker.d.ts.map +1 -1
  168. package/dist/lists/calculated-sources.d.ts +1 -1
  169. package/dist/lists/calculated-sources.d.ts.map +1 -1
  170. package/dist/lists/map-site.d.ts +16 -8
  171. package/dist/lists/map-site.d.ts.map +1 -1
  172. package/dist/lists/source-shapes.d.ts +12 -3
  173. package/dist/lists/source-shapes.d.ts.map +1 -1
  174. package/dist/lists/static-derived.d.ts +37 -0
  175. package/dist/lists/static-derived.d.ts.map +1 -0
  176. package/dist/lists/targeted-refresh.d.ts +9 -2
  177. package/dist/lists/targeted-refresh.d.ts.map +1 -1
  178. package/dist/lists.d.ts +1 -0
  179. package/dist/lists.d.ts.map +1 -1
  180. package/dist/module-control-flow.d.ts +7 -6
  181. package/dist/module-control-flow.d.ts.map +1 -1
  182. package/dist/mutation-analysis.d.ts +22 -8
  183. package/dist/mutation-analysis.d.ts.map +1 -1
  184. package/dist/plugin.d.ts +15 -14
  185. package/dist/plugin.d.ts.map +1 -1
  186. package/dist/router.d.ts +32 -0
  187. package/dist/router.d.ts.map +1 -0
  188. package/dist/server-functions.d.ts +49 -0
  189. package/dist/server-functions.d.ts.map +1 -0
  190. package/package.json +34 -30
@@ -5,7 +5,7 @@
5
5
  * overrides. This module converts attributes into one object expression while
6
6
  * delegating explicit event instrumentation to the owning emitter.
7
7
  */
8
- import * as t from '@babel/types';
8
+ import type * as t from '../ast/compiler-types';
9
9
  export interface OrderedAttributes {
10
10
  expression: t.ObjectExpression;
11
11
  sources: t.Expression[];
@@ -1 +1 @@
1
- {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../src/jsx/attributes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAElC,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,CAAC,CAAC,gBAAgB,CAAC;IAC/B,OAAO,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC;IACxB,8EAA8E;IAC9E,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU,CAAC;IACjE,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU,CAAC;IACrE,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;CAC9B;AAED,yEAAyE;AACzE,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,kBAAkB,CAAC,EAAE,EAC9D,OAAO,EAAE,uBAAuB,GAC/B,iBAAiB,CA8CnB;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC,iBAAiB,GAC1C,MAAM,CAIR"}
1
+ {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../src/jsx/attributes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAOhD,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,CAAC,CAAC,gBAAgB,CAAC;IAC/B,OAAO,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC;IACxB,8EAA8E;IAC9E,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU,CAAC;IACjE,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU,CAAC;IACrE,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;CAC9B;AAED,yEAAyE;AACzE,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,kBAAkB,CAAC,EAAE,EAC9D,OAAO,EAAE,uBAAuB,GAC/B,iBAAiB,CA8CnB;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC,iBAAiB,GAC1C,MAAM,CAIR"}
@@ -5,15 +5,16 @@
5
5
  * classifies text, nodes, lists, conditional regions, and forwarded slots
6
6
  * without deciding when the eventual parent node is created.
7
7
  */
8
- import * as t from '@babel/types';
8
+ import type * as t from '../ast/compiler-types';
9
9
  import { type JsxChild } from '../components/children';
10
+ import { type MapCallExpression } from '../lists';
10
11
  export type JsxNode = t.JSXElement | t.JSXFragment;
11
12
  export type DirectChildOperation = {
12
13
  type: 'node';
13
14
  variable: string;
14
15
  } | {
15
16
  type: 'list';
16
- expression: t.CallExpression;
17
+ expression: MapCallExpression;
17
18
  } | {
18
19
  type: 'condition';
19
20
  expression: t.ConditionalExpression | t.LogicalExpression;
@@ -1 +1 @@
1
- {"version":3,"file":"children.d.ts","sourceRoot":"","sources":["../../src/jsx/children.ts"],"names":[],"mapp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AAiB,EAAE,MAAM,UAAU,CAAC;AAEhE,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,WAAW,CAAC;AAEnD,MAAM,MAAM,oBAAoB,GAC5B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,iBAAiB,CAAA;CAAE,GAC/C;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,UAAU,EAAE,CAAC,CAAC,qBAAqB,GAAG,CAAC,CAAC,iBAAiB,CAAC;CAC3D,GACD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,CAAC,CAAC,UAAU,CAAA;CAAE,CAAC;AAE/C,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC,UAAU,GAAG,MAAM,CAAC;IAC3C,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IAChC,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC,UAAU,GAAG,OAAO,CAAC;IAC/C,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;CAC9B;AA2BD,wEAAwE;AACxE,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,SAAS,QAAQ,EAAE,EAC7B,QAAQ,EAAE,mBAAmB,GAC5B,oBAAoB,EAAE,CAkExB"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Normalize compiler-owned `if`, `else-if`, and `else` JSX directives.
3
+ *
4
+ * Sibling chains become the ordinary JSX-bearing conditional expressions that
5
+ * the structural-region pipeline already understands. Formatting whitespace
6
+ * and JSX comments do not interrupt a chain.
7
+ */
8
+ import type * as t from '../ast/compiler-types';
9
+ interface ErrorPath {
10
+ buildCodeFrameError(message: string): Error;
11
+ }
12
+ interface ProgramContainer extends ErrorPath {
13
+ node: t.Program;
14
+ scope?: {
15
+ crawl(): void;
16
+ };
17
+ }
18
+ /** Lower conditional JSX directives before route and reactivity analysis. */
19
+ export declare function normalizeConditionalJsxDirectives(programPath: ProgramContainer): void;
20
+ export {};
21
+ //# sourceMappingURL=conditional-directives.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditional-directives.d.ts","sourceRoot":"","sources":["../../src/jsx/conditional-directives.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAShD,UAAU,SAAS;IACjB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;CAC7C;AAED,UAAU,gBAAiB,SAAQ,SAAS;IAC1C,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE;QAAE,KAAK,IAAI,IAAI,CAAA;KAAE,CAAC;CAC3B;AAoLD,6EAA6E;AAC7E,wBAAgB,iCAAiC,CAC/C,WAAW,EAAE,gBAAgB,GAC5B,IAAI,CA0CN"}
@@ -5,7 +5,7 @@
5
5
  * dynamic. Explicit HTML properties and mapped attributes can instead become
6
6
  * direct DOM operations, avoiding unrelated runtime style/SVG machinery.
7
7
  */
8
- import * as t from '@babel/types';
8
+ import type * as t from '../ast/compiler-types';
9
9
  export declare function domPropertyName(name: string, elementIsSvg: boolean): string | null;
10
10
  export declare function isMappedDomAttribute(name: string, elementIsSvg: boolean): boolean;
11
11
  export declare function domPropertyWrite(varName: string, name: string, value: t.Expression): t.Statement;
@@ -1 +1 @@
1
- {"version":3,"file":"dom-attributes.d.ts","sourceRoot":"","sources":["../../src/jsx/dom-attributes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AA0BlC,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,OAAO,GACpB,MAAM,GAAG,IAAI,CAEf;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,OAAO,GACpB,OAAO,CAET;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,CAAC,CAAC,UAAU,GAClB,CAAC,CAAC,SAAS,CAiDb;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,CAAC,CAAC,UAAU,GAClB,CAAC,CAAC,SAAS,CA2Cb"}
1
+ {"version":3,"file":"dom-attributes.d.ts","sourceRoot":"","sources":["../../src/jsx/dom-attributes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AA4BhD,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,OAAO,GACpB,MAAM,GAAG,IAAI,CAEf;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,OAAO,GACpB,OAAO,CAET;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,CAAC,CAAC,UAAU,GAClB,CAAC,CAAC,SAAS,CAiDb;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,CAAC,CAAC,UAAU,GAClB,CAAC,CAAC,SAAS,CA2Cb"}
@@ -1,20 +1,14 @@
1
- /**
2
- * Finite dynamic JSX tag lowering.
3
- *
4
- * Known string/component candidates become ordinary JSX branches selected by
5
- * the authored binding value. Existing conditional regions then own identity,
6
- * updates, and teardown without a runtime virtual-node representation.
7
- */
8
- import type { NodePath } from '@babel/traverse';
9
- import * as t from '@babel/types';
1
+ /** Finite dynamic JSX tag lowering over parser-neutral AST metadata. */
2
+ import type * as t from '../ast/compiler-types';
10
3
  import { type Ctx } from '../context';
11
- /**
12
- * Install finite linked component candidates before ordinary import
13
- * validation and generated-identifier allocation.
14
- */
15
- export declare function installLinkedDynamicComponentImports(ctx: Ctx, programPath: NodePath<t.Program>): void;
4
+ interface ProgramContainer {
5
+ node: t.Program;
6
+ }
7
+ /** Install finite linked component candidates before ordinary import analysis. */
8
+ export declare function installLinkedDynamicComponentImports(ctx: Ctx, programPath: ProgramContainer): void;
16
9
  /** Discover local component registries/helper returns before tag lowering. */
17
- export declare function scanLocalDynamicComponentCandidates(ctx: Ctx, programPath: NodePath<t.Program>): void;
10
+ export declare function scanLocalDynamicComponentCandidates(ctx: Ctx, programPath: ProgramContainer): void;
18
11
  /** Lower dynamic identifier/member JSX names before component validation. */
19
12
  export declare function normalizeDynamicTags(ctx: Ctx): void;
13
+ export {};
20
14
  //# sourceMappingURL=dynamic-tags.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dynamic-tags.d.ts","sourceRoot":"","sources":["../../src/jsx/dynamic-tags.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAKL,KAAK,GAAG,EACT,MAAM,YAAY,CAAC;AA0BpB;;;GAGG;AACH,wBAAgB,oCAAoC,CAClD,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,GAC/B,IAAI,CAyEN;AA2LD,8EAA8E;AAC9E,wBAAgB,mCAAmC,CACjD,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,GAC/B,IAAI,CA2CN;AAmND,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAkHnD"}
1
+ {"version":3,"file":"dynamic-tags.d.ts","sourceRoot":"","sources":["../../src/jsx/dynamic-tags.ts"],"names":[],"mappings":"AAAA,wEAAwE;AAExE,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAahD,OAAO,EAOL,KAAK,GAAG,EACT,MAAM,YAAY,CAAC;AAQpB,UAAU,gBAAgB;IACxB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC;CACjB;AAmED,kFAAkF;AAClF,wBAAgB,oCAAoC,CAClD,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,gBAAgB,GAC5B,IAAI,CAkEN;AAuMD,8EAA8E;AAC9E,wBAAgB,mCAAmC,CACjD,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,gBAAgB,GAC5B,IAAI,CAkCN;AA2ND,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAkHnD"}
@@ -1,5 +1,4 @@
1
1
  /** Shared host-event shape facts used by analysis, linking, and emission. */
2
- import * as t from '@babel/types';
3
- export declare function hostJsxEventNames(body: t.Node): string[];
4
- export declare function hasHostJsxEvent(body: t.Node): boolean;
2
+ import { type BaseNode } from '../ast';
3
+ export declare function hostJsxEventNames(body: BaseNode): string[];
5
4
  //# sourceMappingURL=events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/jsx/events.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAE7E,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAGlC,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,GAAG,MAAM,EAAE,CAiBxD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,GAAG,OAAO,CAErD"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/jsx/events.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAE7E,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAwBhD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,EAAE,CAoB1D"}
@@ -4,12 +4,13 @@
4
4
  * Assignable source expressions are sinks, not reads. They become ordinary
5
5
  * callback adapters so forwarding needs no public ref wrapper or special key.
6
6
  */
7
- import type { NodePath } from '@babel/traverse';
8
- import * as t from '@babel/types';
9
- import type { Ctx } from '../context';
7
+ import type * as t from '../ast/compiler-types';
8
+ import { type Ctx } from '../context';
10
9
  import type { EmitScope } from '../emission/scope';
10
+ type ComponentPath = Ctx['compPaths'] extends Map<string, infer TPath> ? TPath : never;
11
11
  /** Compile one source ref into callback/array values understood by mountRef. */
12
- export declare function compileRefValue(ctx: Ctx, componentPath: NodePath<t.FunctionDeclaration>, componentName: string, expression: t.Expression): t.Expression;
12
+ export declare function compileRefValue(ctx: Ctx, componentPath: ComponentPath, componentName: string, expression: t.Expression): t.Expression;
13
13
  /** Emit one mount operation and attach its disposer to this scope's policy. */
14
14
  export declare function emitRefMount(ctx: Ctx, scope: EmitScope, node: t.Expression, ownerId: t.Expression, value: t.Expression): void;
15
+ export {};
15
16
  //# sourceMappingURL=refs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"refs.d.ts","sourceRoot":"","sources":["../../src/jsx/refs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAGtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,gFAAgF;AAChF,wBAAgB,eAAe,CAC7B,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,EAC9C,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,CAAC,CAAC,UAAU,GACvB,CAAC,CAAC,UAAU,CA8Bd;AAED,+EAA+E;AAC/E,wBAAgB,YAAY,CAC1B,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,CAAC,CAAC,UAAU,EAClB,OAAO,EAAE,CAAC,CAAC,UAAU,EACrB,KAAK,EAAE,CAAC,CAAC,UAAU,GAClB,IAAI,CAyBN"}
1
+ {"version":3,"file":"refs.d.ts","sourceRoot":"","sources":["../../src/jsx/refs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAIhD,OAAO,EAAgB,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAGpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,KAAK,aAAa,GAAG,GAAG,CAAC,WAAW,CAAC,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,CAAC,GAClE,KAAK,GACL,KAAK,CAAC;AAEV,gFAAgF;AAChF,wBAAgB,eAAe,CAC7B,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,CAAC,CAAC,UAAU,GACvB,CAAC,CAAC,UAAU,CA8Bd;AAED,+EAA+E;AAC/E,wBAAgB,YAAY,CAC1B,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,CAAC,CAAC,UAAU,EAClB,OAAO,EAAE,CAAC,CAAC,UAAU,EACrB,KAAK,EAAE,CAAC,CAAC,UAAU,GAClB,IAAI,CAyBN"}
package/dist/jsx/svg.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * imported icon component can return `<path>` without receiving a runtime
6
6
  * namespace argument through the component ABI.
7
7
  */
8
- import * as t from '@babel/types';
8
+ import type * as t from '../ast/compiler-types';
9
9
  export declare function isSvgElement(tag: string, parentIsSvg: boolean): boolean;
10
- export declare function createElementExpression(tag: string, svg: boolean): t.CallExpression;
10
+ export declare function createElementExpression(document: t.Expression, tag: string, svg: boolean): t.CallExpression;
11
11
  //# sourceMappingURL=svg.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../../src/jsx/svg.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAgElC,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,OAAO,CAEvE;AAED,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,OAAO,GACX,CAAC,CAAC,cAAc,CAgBlB"}
1
+ {"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../../src/jsx/svg.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAkEhD,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,OAAO,CAEvE;AAED,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,CAAC,CAAC,UAAU,EACtB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,OAAO,GACX,CAAC,CAAC,cAAc,CAgBlB"}
@@ -0,0 +1,42 @@
1
+ export {};
2
+ declare global {
3
+ /**
4
+ * Register synchronous teardown owned by the current compiled component.
5
+ * The compiler supplies the component identity in generated output.
6
+ */
7
+ function cleanup(disposer: () => void): () => void;
8
+ /**
9
+ * Run a compiler-tracked side effect after DOM updates. At component scope,
10
+ * teardown follows the owner; at module scope the effect is a singleton.
11
+ */
12
+ function effect(callback: () => void | (() => void)): void;
13
+ /** Minimal global JSX declarations for compiler-authored source. */
14
+ namespace JSX {
15
+ type RouteValue = `/${string}`;
16
+ interface RouteToDestination {
17
+ path: RouteValue;
18
+ params?: Record<string, string | number | boolean | bigint>;
19
+ query?: Record<string, string | number | boolean | bigint | null | undefined | readonly (string | number | boolean | bigint | null | undefined)[]>;
20
+ hash?: string;
21
+ replace?: boolean;
22
+ }
23
+ interface ElementChildrenAttribute {
24
+ children: unknown;
25
+ }
26
+ interface IntrinsicAttributes {
27
+ key?: unknown;
28
+ if?: boolean;
29
+ 'else-if'?: boolean;
30
+ else?: true;
31
+ suspend?: true;
32
+ route?: RouteValue;
33
+ 'route-to'?: RouteValue | RouteToDestination;
34
+ }
35
+ interface IntrinsicElements {
36
+ [name: string]: {
37
+ [attribute: string]: unknown;
38
+ };
39
+ }
40
+ }
41
+ }
42
+ //# sourceMappingURL=jsx-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsx-types.d.ts","sourceRoot":"","sources":["../src/jsx-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AAEV,OAAO,CAAC,MAAM,CAAC;IACb;;;OAGG;IACH,SAAS,OAAO,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;IAEnD;;;OAGG;IACH,SAAS,MAAM,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;IAE3D,oEAAoE;IACpE,UAAU,GAAG,CAAC;QACZ,KAAK,UAAU,GAAG,IAAI,MAAM,EAAE,CAAC;QAE/B,UAAU,kBAAkB;YAC1B,IAAI,EAAE,UAAU,CAAC;YACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;YAC5D,KAAK,CAAC,EAAE,MAAM,CACZ,MAAM,EACJ,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,IAAI,GACJ,SAAS,GACT,SAAS,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,CACrE,CAAC;YACF,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,OAAO,CAAC,EAAE,OAAO,CAAC;SACnB;QAED,UAAU,wBAAwB;YAChC,QAAQ,EAAE,OAAO,CAAC;SACnB;QAED,UAAU,mBAAmB;YAC3B,GAAG,CAAC,EAAE,OAAO,CAAC;YACd,EAAE,CAAC,EAAE,OAAO,CAAC;YACb,SAAS,CAAC,EAAE,OAAO,CAAC;YACpB,IAAI,CAAC,EAAE,IAAI,CAAC;YACZ,OAAO,CAAC,EAAE,IAAI,CAAC;YACf,KAAK,CAAC,EAAE,UAAU,CAAC;YACnB,UAAU,CAAC,EAAE,UAAU,GAAG,kBAAkB,CAAC;SAC9C;QAED,UAAU,iBAAiB;YACzB,CAAC,IAAI,EAAE,MAAM,GAAG;gBACd,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;aAC9B,CAAC;SACH;KACF;CACF"}
@@ -6,19 +6,23 @@
6
6
  * deliberately API-agnostic: any function passed from factory setup receives
7
7
  * its own normal-exit invalidation when it writes reactive state.
8
8
  */
9
- import type { NodePath } from '@babel/traverse';
10
- import * as t from '@babel/types';
9
+ import type * as t from './ast/compiler-types';
11
10
  import { type Ctx, type RowCtx } from './context';
11
+ type ComponentPath = Ctx['compPaths'] extends Map<string, infer TPath> ? TPath : never;
12
+ interface ProgramContainer {
13
+ node: t.Program;
14
+ buildCodeFrameError(message: string): Error;
15
+ }
12
16
  /**
13
17
  * Lower direct cleanup registrations and instrument callbacks retained by
14
18
  * setup calls. Callback liveness is automatic; cancellation remains explicit.
15
19
  */
16
- export declare function transformComponentLifecycle(ctx: Ctx, compPath: NodePath<t.FunctionDeclaration>, compName: string, factoryId: string, rowCtx?: RowCtx): void;
20
+ export declare function transformComponentLifecycle(ctx: Ctx, compPath: ComponentPath, compName: string, factoryId: string, rowCtx?: RowCtx): void;
17
21
  /**
18
22
  * Instrument callbacks retained by module initialization. They have no
19
23
  * component owner, so writes route through canonical access-table keys.
20
24
  */
21
- export declare function transformProgramCallbacks(ctx: Ctx, programPath: NodePath<t.Program>): void;
25
+ export declare function transformProgramCallbacks(ctx: Ctx, programPath: ProgramContainer): void;
22
26
  /**
23
27
  * Async module helpers own their normal-completion commit because callers
24
28
  * cannot represent writes that occur after the returned promise suspends.
@@ -27,5 +31,6 @@ export declare function transformProgramCallbacks(ctx: Ctx, programPath: NodePat
27
31
  */
28
32
  export declare function transformSharedAsyncHelpers(ctx: Ctx): void;
29
33
  /** Reject cleanup syntax outside a component instead of leaving a runtime trap. */
30
- export declare function rejectUnownedCleanup(programPath: NodePath<t.Program>): void;
34
+ export declare function rejectUnownedCleanup(ctx: Ctx, programPath: ProgramContainer): void;
35
+ export {};
31
36
  //# sourceMappingURL=lifecycle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../src/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAc,KAAK,GAAG,EAAE,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AA0H9D;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,EACzC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GACd,IAAI,CA4DN;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,GAC/B,IAAI,CA8BN;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAI1D;AAED,mFAAmF;AACnF,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,IAAI,CAa3E"}
1
+ {"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../src/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,KAAK,CAAC,MAAM,sBAAsB,CAAC;AAG/C,OAAO,EAGL,KAAK,GAAG,EACR,KAAK,MAAM,EACZ,MAAM,WAAW,CAAC;AASnB,KAAK,aAAa,GAAG,GAAG,CAAC,WAAW,CAAC,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,CAAC,GAClE,KAAK,GACL,KAAK,CAAC;AAEV,UAAU,gBAAgB;IACxB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC;IAChB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;CAC7C;AAoID;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GACd,IAAI,CA8FN;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,gBAAgB,GAC5B,IAAI,CAyCN;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAI1D;AAED,mFAAmF;AACnF,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,gBAAgB,GAC5B,IAAI,CAeN"}
package/dist/linker.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- import { type MemoDomOptions } from './context';
1
+ import { type EstreeFrontend } from './ast';
2
+ import { type CompilerSourceMap } from './compile';
3
+ import { type MemoDomOptions, type ParameterWrite, type StateKind, type TransparentSourceMethod } from './context';
2
4
  export interface CompileModulesOptions extends Omit<MemoDomOptions, 'moduleId' | 'linkedImports' | 'linkedComponentPaths' | 'linkedComponentRows' | 'linkedComponentPropSources' | 'linkedComponentRenderProps'> {
3
5
  /**
4
6
  * Bundler-style import aliases. Prefixes match on a segment boundary, so
@@ -10,10 +12,59 @@ export interface CompileModulesOptions extends Omit<MemoDomOptions, 'moduleId' |
10
12
  * undefined to continue with aliases and normal relative resolution.
11
13
  */
12
14
  resolveImport?: (specifier: string, importer: string) => string | undefined;
15
+ /**
16
+ * Preserve imported state/component identity but replace imported function
17
+ * summaries with an unbounded effect. This is an evaluation ablation for
18
+ * measuring the contribution of cross-module effect-summary propagation.
19
+ * Defaults to true.
20
+ */
21
+ linkFunctionSummaries?: boolean;
22
+ /** Parser router used for every module; the default selects by extension. */
23
+ frontend?: EstreeFrontend;
24
+ }
25
+ export interface CompiledComponentExport {
26
+ exported: string;
27
+ local: string;
28
+ listLightweight: boolean;
29
+ }
30
+ export interface CompiledStateExport {
31
+ exported: string;
32
+ kind: StateKind;
33
+ key: string;
34
+ }
35
+ export interface CompiledFunctionExport {
36
+ exported: string;
37
+ transparentSourceFactory?: boolean;
38
+ transparentSourceMethod?: TransparentSourceMethod;
39
+ reads: string[];
40
+ writes: string[];
41
+ boundedWrites: string[];
42
+ parameterWrites: ParameterWrite[];
43
+ unbounded: boolean;
44
+ }
45
+ export interface CompiledModuleMetadata {
46
+ componentExports: CompiledComponentExport[];
47
+ /** Canonical state identities exposed for evaluation and tooling. */
48
+ stateExports: CompiledStateExport[];
49
+ /** Fixed-point function summaries exposed for evaluation and tooling. */
50
+ functionExports: CompiledFunctionExport[];
51
+ /** Canonical read key -> statically selected runtime entity patterns. */
52
+ readers: Record<string, string[]>;
53
+ }
54
+ export interface CompiledApplicationRoot {
55
+ key: string;
56
+ moduleId: string;
57
+ mountModuleId: string;
58
+ local: string;
59
+ rootId: string;
60
+ }
61
+ export interface CompiledModules {
62
+ output: Record<string, string>;
63
+ maps: Record<string, CompilerSourceMap>;
64
+ metadata: Record<string, CompiledModuleMetadata>;
65
+ css?: Record<string, string>;
66
+ applicationRoot?: CompiledApplicationRoot;
13
67
  }
14
- /**
15
- * Compile a connected set of TS/TSX modules with canonical cross-file state
16
- * keys. Record keys are source module ids; returned keys are preserved.
17
- */
68
+ export declare function compileModulesDetailed(modules: Readonly<Record<string, string>>, options?: CompileModulesOptions): CompiledModules;
18
69
  export declare function compileModules(modules: Readonly<Record<string, string>>, options?: CompileModulesOptions): Record<string, string>;
19
70
  //# sourceMappingURL=linker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"linker.d.ts","sourceRoot":"","sources":["../src/linker.ts"],"names":[],"mappings":"AA+BA,OAAO,EASL,KAAK,cAAc,EAGpB,MAAM,WAAW,CAAC;AAMnB,MAAM,WAAW,qBACf,SAAQ,IAAI,CACV,cAAc,EACZ,UAAU,GACV,eAAe,GACf,sBAAsB,GACtB,qBAAqB,GACrB,4BAA4B,GAC5B,4BAA4B,CAC/B;IACD;;;OAGG;IACH,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC3C;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CAC7E;AAwsBD;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACzC,OAAO,GAAE,qBAA0B,GAClC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAwIxB"}
1
+ {"version":3,"file":"linker.d.ts","sourceRoot":"","sources":["../src/linker.ts"],"names":[],"mappings":"AAWA,OAAO,EAML,KAAK,cAAc,EAEpB,MAAM,OAAO,CAAC;AAEf,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,WAAW,CAAC;AAiBnB,OAAO,EAWL,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,uBAAuB,EAC7B,MAAM,WAAW,CAAC;AAqBnB,MAAM,WAAW,qBACf,SAAQ,IAAI,CACV,cAAc,EACZ,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C;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACxC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;IACjD,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,eAAe,CAAC,EAAE,uBAAuB,CAAC;CAC3C;AA+1CD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACzC,OAAO,GAAE,qBAA0B,GAClC,eAAe,CAEjB;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACzC,OAAO,GAAE,qBAA0B,GAClC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAExB"}
@@ -1,4 +1,4 @@
1
- import type { Ctx } from '../context';
1
+ import { type Ctx } from '../context';
2
2
  /**
3
3
  * Hoist calculated roots of structural `.map()` calls into generated const
4
4
  * derivations consumed by the existing R14/R7 pipeline. Method behavior and
@@ -1 +1 @@
1
- {"version":3,"file":"calculated-sources.d.ts","sourceRoot":"","sources":["../../src/lists/calculated-sources.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AA2CtC;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CA2D7D"}
1
+ {"version":3,"file":"calculated-sources.d.ts","sourceRoot":"","sources":["../../src/lists/calculated-sources.ts"],"names":[],"mappings":"AAaA,OAAO,EAEL,KAAK,GAAG,EAET,MAAM,YAAY,CAAC;AAiCpB;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAuF7D"}
@@ -2,16 +2,24 @@
2
2
  * R7 list-site analysis. Emission remains separate from this source-shape
3
3
  * validation and deterministic identity planning.
4
4
  */
5
- import type { NodePath } from '@babel/traverse';
6
- import * as t from '@babel/types';
7
- import { type RuntimeBindingPattern } from '../analysis/runtime-pattern';
8
- import { type Ctx } from '../context';
5
+ import type * as t from '../ast/compiler-types';
6
+ import { type BaseNode } from '../ast';
7
+ import { type Ctx, type MapCallExpression } from '../context';
8
+ interface ErrorPath {
9
+ buildCodeFrameError(message: string): Error;
10
+ }
11
+ interface NodeHolder {
12
+ node: BaseNode;
13
+ }
14
+ type RuntimeBindingPattern = t.Identifier | t.ObjectPattern | t.ArrayPattern;
9
15
  type ParentRow = Pick<MapSite, 'itemParam' | 'sourceKey' | 'sourceLocal'>;
10
16
  export interface MapSite {
11
17
  /** Reactive source key (e.g. 'items' or 'store.todos'). */
12
18
  sourceKey: string;
13
19
  /** Ordered source expression, cloned into the reconcile calls. */
14
20
  sourceExpr: t.Expression;
21
+ /** Optional-chain maps render no rows while their source is nullish. */
22
+ optional: boolean;
15
23
  /** Instance roots invalidate their owner directly, not an access table. */
16
24
  sourceLocal: boolean;
17
25
  /** Runtime callback target, including supported destructuring patterns. */
@@ -37,14 +45,14 @@ export interface MapSite {
37
45
  /** Unique site key '<owner>/<suffix>'. */
38
46
  prefix: string;
39
47
  }
40
- /** Is this expression a `.map(...)` call? */
41
- export declare function matchMapCall(expr: t.Node): t.CallExpression | null;
48
+ /** Is this expression a `.map(...)` call, including optional chains? */
49
+ export declare function matchMapCall(expr: t.Node): MapCallExpression | null;
42
50
  /** Does a subtree contain JSX? */
43
- export declare function containsJsx(path: NodePath): boolean;
51
+ export declare function containsJsx(input: BaseNode | NodeHolder): boolean;
44
52
  /**
45
53
  * Validate and describe a map site. Analysis and emission walk sites in the
46
54
  * same source order so their deterministic suffixes remain identical.
47
55
  */
48
- export declare function analyzeMapSite(ctx: Ctx, call: t.CallExpression, errorAt: Pick<NodePath, 'buildCodeFrameError'>, ownerName: string, usedPrefixes: Map<string, number>, parentRow?: ParentRow): MapSite;
56
+ export declare function analyzeMapSite(ctx: Ctx, call: MapCallExpression, errorAt: ErrorPath, ownerName: string, usedPrefixes: Map<string, number>, parentRow?: ParentRow): MapSite;
49
57
  export {};
50
58
  //# sourceMappingURL=map-site.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"map-site.d.ts","sourceRoot":"","sources":["../../src/lists/map-site.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAIL,KAAK,GAAG,EACT,MAAM,YAAY,CAAC;AAIpB,KAAK,SAAS,GAAG,IAAI,CACnB,OAAO,EACP,WAAW,GAAG,WAAW,GAAG,aAAa,CAC1C,CAAC;AAEF,MAAM,WAAW,OAAO;IACtB,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC;IACzB,2EAA2E;IAC3E,WAAW,EAAE,OAAO,CAAC;IACrB,2EAA2E;IAC3E,WAAW,EAAE,qBAAqB,CAAC;IACnC,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,wDAAwD;IACxD,OAAO,EAAE,CAAC,CAAC,UAAU,GAAG,IAAI,CAAC;IAC7B,+DAA+D;IAC/D,GAAG,EAAE,C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G,OAAO,CAajE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,SAAS,EAClB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACjC,SAAS,CAAC,EAAE,SAAS,GACpB,OAAO,CAsCT"}
@@ -1,6 +1,15 @@
1
- import * as t from '@babel/types';
1
+ import type { BaseNode } from '../ast';
2
2
  /** Remove transparent TypeScript wrappers around a collection expression. */
3
- export declare function transparentListExpression(expression: t.Expression): t.Expression;
3
+ export declare function transparentListExpression<TExpression extends BaseNode>(expression: TExpression): TExpression;
4
4
  /** A literal primitive list has stable value identity and no mutable source. */
5
- export declare function isStaticPrimitiveList(expression: t.Expression): boolean;
5
+ export declare function isStaticPrimitiveList(expression: BaseNode): boolean;
6
+ /**
7
+ * A structural method chain rooted at a primitive array literal. The chain
8
+ * shape is recognized structurally: any method name is accepted, because
9
+ * the value is fixed at creation regardless of how it was computed. Every
10
+ * argument must be self-contained (inline functions or literals): a
11
+ * reference to an outside binding would make the chain's result depend on
12
+ * mutable state, which requires the reactive derivation path instead.
13
+ */
14
+ export declare function isStaticListExpression(expression: BaseNode, seen?: Set<BaseNode>): boolean;
6
15
  //# sourceMappingURL=source-shapes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"source-shapes.d.ts","sourceRoot":"","sources":["../../src/lists/source-shapes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAElC,6EAA6E;AAC7E,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,CAAC,CAAC,UAAU,GACvB,CAAC,CAAC,UAAU,CAUd;AAED,gFAAgF;AAChF,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,CAAC,CAAC,UAAU,GACvB,OAAO,CAeT"}
1
+ {"version":3,"file":"source-shapes.d.ts","sourceRoot":"","sources":["../../src/lists/source-shapes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAGvC,6EAA6E;AAC7E,wBAAgB,yBAAyB,CAAC,WAAW,SAAS,QAAQ,EACpE,UAAU,EAAE,WAAW,GACtB,WAAW,CAEb;AA+CD,gFAAgF;AAChF,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,QAAQ,GAAG,OAAO,CAanE;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,QAAQ,EACpB,IAAI,GAAE,GAAG,CAAC,QAAQ,CAAa,GAC9B,OAAO,CAyBT"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * static-derived.ts - frozen derived values over static list literals.
3
+ *
4
+ * A `const` whose initializer is a static list expression (rooted at a
5
+ * primitive array literal through self-contained transforms) is a FROZEN
6
+ * derived value: it can never change, so any later mutation attempt is a
7
+ * compile error - mutating it could never be observed by reactivity.
8
+ *
9
+ * Because the value never changes, the rule applies at module scope as well
10
+ * as component scope.
11
+ */
12
+ import type { BaseNode } from '../ast';
13
+ import type { Ctx } from '../context';
14
+ /**
15
+ * Find the initializer of a binding declared at module scope or in the
16
+ * component body.
17
+ */
18
+ export declare function findConstInitializer(ctx: Ctx, name: string, compName?: string | null): BaseNode | null;
19
+ /**
20
+ * True when the initializer is a DERIVED chain: at least one method transform
21
+ * applied to a primitive array literal root (`[...].filter(fn)`). A plain
22
+ * array literal (`[...]`) is NOT derived - it is ordinary reactive state.
23
+ */
24
+ export declare function isStaticDerivedChain(expression: BaseNode): boolean;
25
+ /**
26
+ * True when `name` is bound to a static-derived value: a method chain rooted
27
+ * at a primitive array literal. The DECLARATION KEYWORD is irrelevant -
28
+ * `let arr = [...].filter(fn)` is exactly as frozen as the const form,
29
+ * because the initializer derives from a static source that can never
30
+ * change. Mutation attempts on such bindings are compile errors.
31
+ *
32
+ * Reactive machinery keeps priority for everything else: plain array
33
+ * literals remain reactive state, and state-derived/prop/opaque bindings
34
+ * follow their own rules.
35
+ */
36
+ export declare function isStaticDerivedListConst(ctx: Ctx, name: string, compName?: string | null): boolean;
37
+ //# sourceMappingURL=static-derived.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static-derived.d.ts","sourceRoot":"","sources":["../../src/lists/static-derived.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AA4BtC;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GACvB,QAAQ,GAAG,IAAI,CA4BjB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,QAAQ,GAAG,OAAO,CAOlE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GACvB,OAAO,CAIT"}
@@ -1,8 +1,15 @@
1
- import type { MapSite } from './map-site';
1
+ import { type BaseNode } from '../ast';
2
+ interface TargetedListSite {
3
+ jsx: BaseNode | null;
4
+ keyExpr: BaseNode | null;
5
+ sourceLocal: boolean;
6
+ sourceExpr: BaseNode;
7
+ }
2
8
  /**
3
9
  * Finds instance-state values that affect exactly the row keyed by that value.
4
10
  * Every visual reference must be an equality comparison with the authored key;
5
11
  * mixed/general uses are rejected and retain full-list reconciliation.
6
12
  */
7
- export declare function findTargetedListDependencies(site: MapSite, instanceState: ReadonlySet<string>): string[];
13
+ export declare function findTargetedListDependencies(site: TargetedListSite, instanceState: ReadonlySet<string>): string[];
14
+ export {};
8
15
  //# sourceMappingURL=targeted-refresh.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"targeted-refresh.d.ts","sourceRoot":"","sources":["../../src/lists/targeted-refresh.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAoC1C;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,OAAO,EACb,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,GACjC,MAAM,EAAE,CAqCV"}
1
+ {"version":3,"file":"targeted-refresh.d.ts","sourceRoot":"","sources":["../../src/lists/targeted-refresh.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,QAAQ,EAEd,MAAM,QAAQ,CAAC;AAsBhB,UAAU,gBAAgB;IACxB,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,QAAQ,CAAC;CACtB;AAoHD;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,gBAAgB,EACtB,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,GACjC,MAAM,EAAE,CAqCV"}
package/dist/lists.d.ts CHANGED
@@ -4,4 +4,5 @@
4
4
  */
5
5
  export { analyzeMapSite, containsJsx, matchMapCall, } from './lists/map-site';
6
6
  export type { MapSite } from './lists/map-site';
7
+ export type { MapCallExpression } from './context';
7
8
  //# sourceMappingURL=lists.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../src/lists.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,cAAc,EACd,WAAW,EACX,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../src/lists.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,cAAc,EACd,WAAW,EACX,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC"}
@@ -1,8 +1,9 @@
1
- /**
2
- * Pure exhaustive module-level if/switch derivations.
3
- */
4
- import type { NodePath } from '@babel/traverse';
5
- import * as t from '@babel/types';
1
+ import type { BaseNode } from './ast';
6
2
  import { type ComputedAnalysis, type Ctx } from './context';
7
- export declare function scanModuleControlFlow(ctx: Ctx, programPath: NodePath<t.Program>, analyze: (ctx: Ctx, expression: t.Node) => ComputedAnalysis): void;
3
+ interface ProgramContainer {
4
+ node: BaseNode;
5
+ buildCodeFrameError(message: string): Error;
6
+ }
7
+ export declare function scanModuleControlFlow(ctx: Ctx, programPath: ProgramContainer, analyze: (ctx: Ctx, expression: BaseNode) => ComputedAnalysis): void;
8
+ export {};
8
9
  //# sourceMappingURL=module-control-flow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module-control-flow.d.ts","sourceRoot":"","sources":["../src/module-control-flow.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,GAAG,EACT,MAAM,WAAW,CAAC;AA6GnB,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,EAChC,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC,IAAI,KAAK,gBAAgB,GAC1D,IAAI,CA6FN"}
1
+ {"version":3,"file":"module-control-flow.d.ts","sourceRoot":"","sources":["../src/module-control-flow.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,GAAG,EACT,MAAM,WAAW,CAAC;AAEnB,UAAU,gBAAgB;IACxB,IAAI,EAAE,QAAQ,CAAC;IACf,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;CAC7C;AAmHD,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,gBAAgB,EAC7B,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,QAAQ,KAAK,gBAAgB,GAC5D,IAAI,CAyFN"}