@barefootjs/jsx 0.39.5 → 0.39.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 (129) hide show
  1. package/dist/adapters/array-method.d.ts +93 -0
  2. package/dist/adapters/array-method.d.ts.map +1 -0
  3. package/dist/adapters/attr-plan.d.ts +142 -0
  4. package/dist/adapters/attr-plan.d.ts.map +1 -0
  5. package/dist/adapters/boolean-result.d.ts +84 -9
  6. package/dist/adapters/boolean-result.d.ts.map +1 -1
  7. package/dist/adapters/callback-method.d.ts +153 -0
  8. package/dist/adapters/callback-method.d.ts.map +1 -0
  9. package/dist/adapters/component-props.d.ts +99 -0
  10. package/dist/adapters/component-props.d.ts.map +1 -0
  11. package/dist/adapters/component-tree.d.ts +25 -0
  12. package/dist/adapters/component-tree.d.ts.map +1 -0
  13. package/dist/adapters/computed-const.d.ts +52 -0
  14. package/dist/adapters/computed-const.d.ts.map +1 -0
  15. package/dist/adapters/dangerous-inner-html.d.ts +10 -0
  16. package/dist/adapters/dangerous-inner-html.d.ts.map +1 -1
  17. package/dist/adapters/element-shell.d.ts +44 -0
  18. package/dist/adapters/element-shell.d.ts.map +1 -0
  19. package/dist/adapters/interface.d.ts +2 -0
  20. package/dist/adapters/interface.d.ts.map +1 -1
  21. package/dist/adapters/literal-value.d.ts +22 -0
  22. package/dist/adapters/literal-value.d.ts.map +1 -0
  23. package/dist/adapters/loop-plan.d.ts +53 -0
  24. package/dist/adapters/loop-plan.d.ts.map +1 -0
  25. package/dist/adapters/prop-classes.d.ts +37 -0
  26. package/dist/adapters/prop-classes.d.ts.map +1 -0
  27. package/dist/analyzer.d.ts.map +1 -1
  28. package/dist/augment-inherited-props.d.ts +7 -0
  29. package/dist/augment-inherited-props.d.ts.map +1 -1
  30. package/dist/expression-parser.d.ts +38 -0
  31. package/dist/expression-parser.d.ts.map +1 -1
  32. package/dist/fold-render-reassignments.d.ts +43 -0
  33. package/dist/fold-render-reassignments.d.ts.map +1 -0
  34. package/dist/free-refs.d.ts +9 -0
  35. package/dist/free-refs.d.ts.map +1 -1
  36. package/dist/index.d.ts +23 -5
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +3954 -2401
  39. package/dist/ir-to-client-js/compute-inlinability.d.ts.map +1 -1
  40. package/dist/ir-to-client-js/csr-substitute.d.ts +0 -13
  41. package/dist/ir-to-client-js/csr-substitute.d.ts.map +1 -1
  42. package/dist/ir-to-client-js/emit-registration.d.ts.map +1 -1
  43. package/dist/ir-to-client-js/html-template.d.ts +9 -10
  44. package/dist/ir-to-client-js/html-template.d.ts.map +1 -1
  45. package/dist/ir-to-client-js/index.d.ts.map +1 -1
  46. package/dist/ir-to-client-js/plan/declaration-emit.d.ts +5 -0
  47. package/dist/ir-to-client-js/plan/declaration-emit.d.ts.map +1 -1
  48. package/dist/ir-to-client-js/prop-handling.d.ts +11 -12
  49. package/dist/ir-to-client-js/prop-handling.d.ts.map +1 -1
  50. package/dist/ir-to-client-js/utils.d.ts +13 -0
  51. package/dist/ir-to-client-js/utils.d.ts.map +1 -1
  52. package/dist/jsx-to-ir.d.ts +465 -1
  53. package/dist/jsx-to-ir.d.ts.map +1 -1
  54. package/dist/nullable-signal-attr.d.ts +22 -2
  55. package/dist/nullable-signal-attr.d.ts.map +1 -1
  56. package/dist/props-binding.d.ts +34 -5
  57. package/dist/props-binding.d.ts.map +1 -1
  58. package/dist/relocate.d.ts +16 -0
  59. package/dist/relocate.d.ts.map +1 -1
  60. package/dist/ssr-seed-plan.d.ts +0 -6
  61. package/dist/ssr-seed-plan.d.ts.map +1 -1
  62. package/dist/types.d.ts +54 -2
  63. package/dist/types.d.ts.map +1 -1
  64. package/package.json +2 -2
  65. package/src/__tests__/__snapshots__/doc-examples.test.ts.snap +1 -1
  66. package/src/__tests__/action-accessor.test.ts +6 -24
  67. package/src/__tests__/array-method-catalogue.test.ts +99 -0
  68. package/src/__tests__/attr-plan.test.ts +121 -0
  69. package/src/__tests__/binding-scope-ratchet.test.ts +12 -12
  70. package/src/__tests__/block-memo-type.test.ts +51 -0
  71. package/src/__tests__/boolean-result-expr.test.ts +106 -0
  72. package/src/__tests__/boolean-result.test.ts +34 -1
  73. package/src/__tests__/callback-method.test.ts +264 -0
  74. package/src/__tests__/client-only-date-lowering.test.ts +2 -2
  75. package/src/__tests__/component-props.test.ts +148 -0
  76. package/src/__tests__/computed-const.test.ts +101 -0
  77. package/src/__tests__/delegated-handler-preamble.test.ts +4 -4
  78. package/src/__tests__/dsl-shared-helpers.test.ts +166 -0
  79. package/src/__tests__/element-shell.test.ts +78 -0
  80. package/src/__tests__/fold-render-reassignments.test.ts +96 -0
  81. package/src/__tests__/inlinable-local-method-call.test.ts +81 -0
  82. package/src/__tests__/issue-3240-nested-static-map-event-delegation.test.ts +1 -1
  83. package/src/__tests__/loop-plan.test.ts +104 -0
  84. package/src/__tests__/map-call-decisions.test.ts +521 -0
  85. package/src/__tests__/memo-body-expr.test.ts +120 -0
  86. package/src/__tests__/nullable-signal-attr.test.ts +45 -0
  87. package/src/__tests__/prop-handling.test.ts +35 -16
  88. package/src/__tests__/props-alias-const.test.ts +65 -0
  89. package/src/__tests__/signal-prop-seed.test.ts +90 -0
  90. package/src/__tests__/ssr-seed-plan.test.ts +54 -1
  91. package/src/__tests__/static-template-reachability.test.ts +137 -0
  92. package/src/adapters/array-method.ts +193 -0
  93. package/src/adapters/attr-plan.ts +228 -0
  94. package/src/adapters/boolean-result.ts +208 -12
  95. package/src/adapters/callback-method.ts +363 -0
  96. package/src/adapters/component-props.ts +144 -0
  97. package/src/adapters/component-tree.ts +118 -0
  98. package/src/adapters/computed-const.ts +185 -0
  99. package/src/adapters/dangerous-inner-html.ts +33 -0
  100. package/src/adapters/element-shell.ts +160 -0
  101. package/src/adapters/interface.ts +8 -0
  102. package/src/adapters/literal-value.ts +36 -0
  103. package/src/adapters/loop-plan.ts +88 -0
  104. package/src/adapters/prop-classes.ts +73 -0
  105. package/src/analyzer.ts +271 -82
  106. package/src/augment-inherited-props.ts +12 -0
  107. package/src/expression-parser.ts +537 -374
  108. package/src/fold-render-reassignments.ts +314 -0
  109. package/src/free-refs.ts +49 -0
  110. package/src/index.ts +61 -3
  111. package/src/ir-to-client-js/compute-inlinability.ts +93 -17
  112. package/src/ir-to-client-js/control-flow/stringify/event-delegation.ts +9 -7
  113. package/src/ir-to-client-js/csr-substitute.ts +13 -35
  114. package/src/ir-to-client-js/emit-registration.ts +3 -2
  115. package/src/ir-to-client-js/html-template.ts +26 -70
  116. package/src/ir-to-client-js/index.ts +3 -2
  117. package/src/ir-to-client-js/init-declarations.ts +1 -1
  118. package/src/ir-to-client-js/plan/build-declaration-emit.ts +25 -51
  119. package/src/ir-to-client-js/plan/declaration-emit.ts +5 -0
  120. package/src/ir-to-client-js/prop-handling.ts +13 -54
  121. package/src/ir-to-client-js/rewrite-destructured-props.ts +6 -5
  122. package/src/ir-to-client-js/stringify/declaration-emit.ts +1 -1
  123. package/src/ir-to-client-js/utils.ts +11 -0
  124. package/src/jsx-to-ir.ts +1346 -1022
  125. package/src/nullable-signal-attr.ts +85 -4
  126. package/src/props-binding.ts +100 -5
  127. package/src/relocate.ts +40 -8
  128. package/src/ssr-seed-plan.ts +18 -6
  129. package/src/types.ts +50 -2
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Component-tree analysis shared by the DSL template adapters (#3475).
3
+ *
4
+ * Pure functions over the IR; they read no adapter instance state.
5
+ * `collectImportedLoopChildComponentErrors` returns its diagnostics instead
6
+ * of pushing onto an adapter's error list, so the adapter stays the sole
7
+ * owner of `errors`.
8
+ */
9
+ import type { ComponentIR, CompilerError } from '../types.ts';
10
+ /**
11
+ * Whether the component needs the client runtime — it owns reactive state
12
+ * (signals / effects / onMount) or the analyzer flagged it as needing init.
13
+ */
14
+ export declare function hasClientInteractivity(ir: ComponentIR): boolean;
15
+ /**
16
+ * Build a `BF103` diagnostic for every component reference inside a loop body
17
+ * whose name is imported from a relative-path module. A DSL template backend
18
+ * renders such a child as a cross-template call, so the child's compiled
19
+ * template must be registered with the backend's loader alongside the
20
+ * parent at render time. `adapterName` is the display name the message
21
+ * uses ("The Jinja adapter emits …", "the resulting Jinja template").
22
+ * Returns the diagnostics so the caller pushes them onto its own error list.
23
+ */
24
+ export declare function collectImportedLoopChildComponentErrors(ir: ComponentIR, componentName: string, adapterName: string): CompilerError[];
25
+ //# sourceMappingURL=component-tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-tree.d.ts","sourceRoot":"","sources":["../../src/adapters/component-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,WAAW,EAUX,aAAa,EACd,MAAM,aAAa,CAAA;AAEpB;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAO/D;AAED;;;;;;;;GAQG;AACH,wBAAgB,uCAAuC,CACrD,EAAE,EAAE,WAAW,EACf,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,GAClB,aAAa,EAAE,CAsBjB"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * A component- or module-scope `const` computed from props, signals or other
3
+ * consts (`const cls = 'btn ' + variant`, `const twice = props.n * 2`) has no
4
+ * binding in a template: the backend receives the props, not the
5
+ * component's locals. Every template adapter read such a const as a template
6
+ * variable nothing defines, so it rendered empty, a prop of the same name, or
7
+ * failed the render (#3494).
8
+ *
9
+ * `inlineComputedConsts` substitutes each such read with the const's
10
+ * initializer tree, exactly as if the source had written the expression in
11
+ * place; the adapter then lowers it like any other expression, refusing what
12
+ * it cannot lower (`Object.keys(labels)` has no template form, BF101) instead
13
+ * of reading an unbound name. The substitution is structural
14
+ * (`inlineBinding`), so precedence, string literals and callback params that
15
+ * shadow the name are respected.
16
+ */
17
+ import { type ParsedExpr } from '../expression-parser.ts';
18
+ import type { ExpressionAttr, IRMetadata } from '../types.ts';
19
+ export interface ComputedConstContext {
20
+ constants: IRMetadata['localConstants'] | undefined;
21
+ /** Signal getters and memo names: the zero-arg calls a template reads as values. */
22
+ getters: ReadonlySet<string>;
23
+ /** Context consumers (`const theme = useContext(ThemeContext)`), which the adapter seeds itself. */
24
+ contextConsumers: ReadonlySet<string>;
25
+ /** Consts a props destructure binds, which the adapter binds as props params. */
26
+ propsBindings: ReadonlySet<string>;
27
+ /** Whether a loop row or callback binds `name` where the expression is read. */
28
+ isShadowed(name: string): boolean;
29
+ /** Whether the adapter binds the const `name` itself, so a read of it stays as written. */
30
+ isAdapterBound(name: string): boolean;
31
+ /**
32
+ * Whether `name` read where the expression is read is a JavaScript global:
33
+ * bound by neither the component nor its module (`componentBindings`), nor
34
+ * the rest props, nor an enclosing loop or callback.
35
+ */
36
+ isGlobal(name: string): boolean;
37
+ }
38
+ /** The {@link ComputedConstContext} fields that come from the component's metadata. */
39
+ export declare function computedConstContext(metadata: IRMetadata, isShadowed: (name: string) => boolean, isAdapterBound?: (name: string) => boolean): ComputedConstContext;
40
+ /**
41
+ * `expr` with each read of a computed const replaced by its initializer,
42
+ * repeated so a const read inside an initializer is replaced too.
43
+ */
44
+ export declare function inlineComputedConsts(expr: ParsedExpr, ctx: ComputedConstContext | null): ParsedExpr;
45
+ /**
46
+ * An `{expr}` attribute value read through {@link inlineComputedConsts}, so
47
+ * the attribute's own plan (a nullable prop read drops the attribute) sees
48
+ * the const's initializer, not its name: `title={label}` with
49
+ * `const label = props.label ?? 'Default'` is not a bare read of `label`.
50
+ */
51
+ export declare function inlineComputedConstAttr(value: ExpressionAttr, ctx: ComputedConstContext | null): ExpressionAttr;
52
+ //# sourceMappingURL=computed-const.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"computed-const.d.ts","sourceRoot":"","sources":["../../src/adapters/computed-const.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAwE,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAC/H,OAAO,KAAK,EAAgB,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAG3E,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,UAAU,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAAA;IACnD,oFAAoF;IACpF,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC5B,oGAAoG;IACpG,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACrC,iFAAiF;IACjF,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAClC,gFAAgF;IAChF,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;IACjC,2FAA2F;IAC3F,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;IACrC;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;CAChC;AAED,uFAAuF;AACvF,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,UAAU,EACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,EACrC,cAAc,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAqB,GACtD,oBAAoB,CAWtB;AA8BD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,oBAAoB,GAAG,IAAI,GAAG,UAAU,CASnG;AAcD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,oBAAoB,GAAG,IAAI,GAAG,cAAc,CAQ/G"}
@@ -102,4 +102,14 @@ export declare function dangerousInnerHtmlMetacharViolation(html: string, adapte
102
102
  * reaches here — it is lowered through the adapter's raw-output sink (#2319).
103
103
  */
104
104
  export declare function dangerousInnerHtmlDiagnostic(expr: string, loc: SourceLocation, reason?: string): CompilerError;
105
+ /**
106
+ * The children `element`'s `dangerouslySetInnerHTML` renders in place of
107
+ * its own, or `null` when it has none. A refusal is pushed onto `errors`
108
+ * and renders as `''`. `rawSink` writes a dynamic value through the
109
+ * adapter's raw-output sink; the runtime evaluates the expression, so no
110
+ * template-metachar guard applies, and the element already carries its
111
+ * hydration slot marker (#2319). A static literal is spliced as trusted
112
+ * template text after the `adapterId` metachar guard.
113
+ */
114
+ export declare function renderDangerousInnerHtml(element: IRElement, errors: CompilerError[], adapterId: string, rawSink: (valueExpr: string, valueParsed: ParsedExpr, loc: SourceLocation) => string): string | null;
105
115
  //# sourceMappingURL=dangerous-inner-html.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dangerous-inner-html.d.ts","sourceRoot":"","sources":["../../src/adapters/dangerous-inner-html.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACxF,OAAO,EAAwC,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAI/F,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAEnE;AAED,MAAM,MAAM,4BAA4B,GAIpC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAahC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,cAAc,CAAA;CAAE,GAKpF;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,cAAc,CAAA;CAAE,CAAA;AAE9D;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,SAAS,GAAG,4BAA4B,GAAG,IAAI,CAyBjG;AAyED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mCAAmC,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,G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,EAAE,MAAM,GACd,aAAa,CAcf;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,aAAa,EAAE,EACvB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,EAAE,cAAc,KAAK,MAAM,GACnF,MAAM,GAAG,IAAI,CAiBf"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * The HTML element every template adapter writes the same way (#3475): its
3
+ * attributes, its hydration markers, its children, and the void-element
4
+ * form. The adapter supplies how each value is spelled in its template
5
+ * language; the order and the conditions live here once.
6
+ */
7
+ import type { IRElement, IRFragment, IRNode } from '../types.ts';
8
+ import { type AttrValueEmitter } from './attr-value-emitter.ts';
9
+ /**
10
+ * The element's own attributes, each lowered through `emitter`, as a
11
+ * leading-space list (`''` when none renders).
12
+ */
13
+ export declare function renderElementAttributes(element: IRElement, emitter: AttrValueEmitter): string;
14
+ /** How one adapter spells the parts of an element {@link renderElementShell} writes. */
15
+ export interface ElementShellSpelling {
16
+ /** Lowers each attribute value, the row key included. */
17
+ attrEmitter: AttrValueEmitter;
18
+ /** The element's `dangerouslySetInnerHTML` content, or `null` when it has none. */
19
+ renderDangerousInnerHtml(element: IRElement): string | null;
20
+ renderChildren(children: IRNode[]): string;
21
+ renderScopeMarker(instanceIdExpr: string): string;
22
+ renderSlotMarker(slotId: string): string;
23
+ /**
24
+ * The raw print of the runtime's `data-key` attribute, for a render root
25
+ * that carries whatever key its own caller supplies (the `bf` instance's
26
+ * `data_key` field).
27
+ */
28
+ dataKeyRelay: string;
29
+ /** The escaped print of this instance's scope id, the `bf-po` value. */
30
+ scopeIdValue: string;
31
+ /** Sends an SSR-portal element to the `bf.portals()` outlet instead of placing it inline. */
32
+ wrapSsrPortalElement(rendered: string): string;
33
+ }
34
+ /** The element, from its open tag to its close tag. */
35
+ export declare function renderElementShell(element: IRElement, spelling: ElementShellSpelling): string;
36
+ /**
37
+ * A fragment's children. A component-root fragment has no element of its
38
+ * own to carry the scope, so `wrapScopeComment` brackets the children with
39
+ * the comment-based scope marker pair; its end marker bounds the scope's
40
+ * sibling range, or queries from the fragment scope leak onto later
41
+ * siblings owned by the parent (#2289).
42
+ */
43
+ export declare function renderFragmentScope(fragment: IRFragment, renderChildren: (children: IRNode[]) => string, wrapScopeComment: (rendered: string) => string): string;
44
+ //# sourceMappingURL=element-shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-shell.d.ts","sourceRoot":"","sources":["../../src/adapters/element-shell.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAChE,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAQ9E;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,GAAG,MAAM,CA+B7F;AAED,wFAAwF;AACxF,MAAM,WAAW,oBAAoB;IACnC,yDAAyD;IACzD,WAAW,EAAE,gBAAgB,CAAA;IAC7B,mFAAmF;IACnF,wBAAwB,CAAC,OAAO,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAAA;IAC3D,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;IAC1C,iBAAiB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAAA;IACjD,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACxC;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB,wEAAwE;IACxE,YAAY,EAAE,MAAM,CAAA;IACpB,6FAA6F;IAC7F,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;CAC/C;AAED,uDAAuD;AACvD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,oBAAoB,GAAG,MAAM,CAmE7F;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,UAAU,EACpB,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,MAAM,EAC9C,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAC7C,MAAM,CAGR"}
@@ -341,6 +341,8 @@ export declare abstract class BaseAdapter implements TemplateAdapter {
341
341
  abstract renderSlotMarker(slotId: string): string;
342
342
  abstract renderCondMarker(condId: string): string;
343
343
  renderChildren(children: IRNode[]): string;
344
+ /** `null` for a `null` / `undefined` expression, which renders nothing; otherwise the node. */
345
+ protected renderNodeOrNull(node: IRNode): string | null;
344
346
  /** Default: render fallback + children inline (no streaming). Override for streaming support. */
345
347
  renderAsync(node: IRAsync): string;
346
348
  }
@@ -1 +1 @@
1
- {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../src/adapters/interface.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,MAAM,EACN,SAAS,EACT,YAAY,EACZ,aAAa,EACb,MAAM,EACN,WAAW,EACX,OAAO,EACR,MAAM,aAAa,CAAA;AAEpB,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;;;;;;;OASG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAA;CACxC;AAED,MAAM,WAAW,aAAa;IAC5B,sFAAsF;IACtF,QAAQ,EAAE,MAAM,CAAA;IAChB;0EACsE;IACtE,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,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AG,MAAM,CAEzC;IAED,+FAA+F;IAC/F,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKtD;IAED,iGAAiG;IACjG,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAEjC;CACF"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Literal-value predicates shared by the DSL template adapters (#3475).
3
+ *
4
+ * Pure functions over analyzer type info and parsed expressions. Every DSL
5
+ * adapter classifies string-typed signals, props and constants with
6
+ * {@link isStringTypeInfo} / {@link isBareStringLiteral}, and tells a
7
+ * literal index from a variable one with {@link isLiteralIndex}.
8
+ */
9
+ import type { ParsedExpr } from '../expression-parser.ts';
10
+ import type { TypeInfo } from '../types.ts';
11
+ /** True when `type` is the `string` primitive. */
12
+ export declare function isStringTypeInfo(type: TypeInfo | undefined): boolean;
13
+ /** True when `initialValue` is a bare string-literal expression. */
14
+ export declare function isBareStringLiteral(initialValue: string | undefined): boolean;
15
+ /**
16
+ * True when a parsed index is a numeric or string literal (`arr[0]`,
17
+ * `m['k']`). The spread lowerings refuse (BF101) an indexed spread value
18
+ * they could not inline only when its index is NOT a literal: a
19
+ * variable-index record access (`sizeMap[size]`) has no static answer.
20
+ */
21
+ export declare function isLiteralIndex(index: ParsedExpr): boolean;
22
+ //# sourceMappingURL=literal-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"literal-value.d.ts","sourceRoot":"","sources":["../../src/adapters/literal-value.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,kDAAkD;AAClD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,CAEpE;AAED,oEAAoE;AACpE,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAI7E;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAKzD"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * The decisions behind a DSL adapter's `renderLoop` (#3473), as data.
3
+ *
4
+ * Every DSL adapter decides the same things about a `.map()` loop before it
5
+ * spells a line of template: whether its destructure pattern lowers (BF104),
6
+ * whether the source is a static literal, whether it names a computed const
7
+ * no template binds (BF101), how its `.sort` comparator lowers, and which
8
+ * filter captures need an alias. {@link planLoop} makes those decisions once,
9
+ * against the scope outside the loop. The adapter keeps the spelling: the
10
+ * loop header, the row bindings, the diagnostics' wording, and the order it
11
+ * emits them in.
12
+ */
13
+ import type { BindingScope } from '../scope/binding-scope.ts';
14
+ import type { ConstantInfo, IRLoop } from '../types.ts';
15
+ import { type CallbackLoweringOptions, type CallbackPlan } from './callback-method.ts';
16
+ export interface LoopPlanContext<Spelled> {
17
+ /** The scope outside the loop. */
18
+ scope: BindingScope;
19
+ localConstants: readonly ConstantInfo[];
20
+ /** The adapter's literal-const resolution: a literal const inlines at its use site. */
21
+ resolveLiteralConst(name: string): unknown;
22
+ callbackLowering: CallbackLoweringOptions;
23
+ /** The adapter's spelling of a static source's items, or `null` when the backend cannot represent one. */
24
+ spellStatic(items: unknown[]): Spelled | null;
25
+ }
26
+ export interface LoopPlan<Spelled> {
27
+ /**
28
+ * The loop param's destructure pattern: none, one the adapter lowers to
29
+ * per-binding accessors, or one no template binds (BF104).
30
+ */
31
+ destructure: 'none' | 'lowerable' | 'unlowerable';
32
+ /**
33
+ * The source spelled as a template literal, when it is an inline literal or
34
+ * an unshadowed static const whose items the backend can represent.
35
+ */
36
+ staticSource: Spelled | null;
37
+ /**
38
+ * The const the source names when it is not spelled statically and no
39
+ * template binds it as a literal (BF101). A loop binding that shadows the
40
+ * name is the row's value, not the const (#3473).
41
+ */
42
+ unresolvableConst: ConstantInfo | null;
43
+ /** The `.sort` / `.toSorted` comparator's lowering, or `null` without one. */
44
+ sort: CallbackPlan | null;
45
+ /** The filter predicate's captures that a row binding would shadow, each with its alias. */
46
+ captureAliases: Array<{
47
+ name: string;
48
+ alias: string;
49
+ }>;
50
+ }
51
+ /** Plan a loop against the scope outside it. */
52
+ export declare function planLoop<Spelled>(loop: IRLoop, ctx: LoopPlanContext<Spelled>): LoopPlan<Spelled>;
53
+ //# sourceMappingURL=loop-plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loop-plan.d.ts","sourceRoot":"","sources":["../../src/adapters/loop-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,KAAK,uBAAuB,EAAE,KAAK,YAAY,EAAuB,MAAM,sBAAsB,CAAA;AAG3G,MAAM,WAAW,eAAe,CAAC,OAAO;IACtC,kCAAkC;IAClC,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,SAAS,YAAY,EAAE,CAAA;IACvC,uFAAuF;IACvF,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;IAC1C,gBAAgB,EAAE,uBAAuB,CAAA;IACzC,0GAA0G;IAC1G,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,GAAG,IAAI,CAAA;CAC9C;AAED,MAAM,WAAW,QAAQ,CAAC,OAAO;IAC/B;;;OAGG;IACH,WAAW,EAAE,MAAM,GAAG,WAAW,GAAG,aAAa,CAAA;IACjD;;;OAGG;IACH,YAAY,EAAE,OAAO,GAAG,IAAI,CAAA;IAC5B;;;;OAIG;IACH,iBAAiB,EAAE,YAAY,GAAG,IAAI,CAAA;IACtC,8EAA8E;IAC9E,IAAI,EAAE,YAAY,GAAG,IAAI,CAAA;IACzB,4FAA4F;IAC5F,cAAc,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACvD;AAED,gDAAgD;AAChD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAYhG"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Prop classification shared by the DSL template adapters (#3475).
3
+ *
4
+ * Pure functions over `ir.metadata` that derive per-compile prop sets an
5
+ * adapter consults during lowering; no adapter instance state.
6
+ */
7
+ import type { ComponentIR } from '../types.ts';
8
+ /**
9
+ * Props whose declared TS type is boolean. A bare binding of one
10
+ * (`data-active={props.isActive}`) must stringify as JS `String(boolean)`
11
+ * ("true"/"false"), not the host language's own boolean text (Python's
12
+ * `True`, Perl's `1` / `''`) (#1897, pagination's data-active).
13
+ */
14
+ export declare function collectBooleanTypedProps(ir: ComponentIR): Set<string>;
15
+ /**
16
+ * Props whose presence is uncertain: no default, and non-primitive typed OR
17
+ * declared optional (#2259, e.g. textarea's `rows`). A bare reference to one
18
+ * is absent (`None` / `nil` / `null` / `undef`) when the caller omits it, so
19
+ * each adapter guards it with its own presence test before rendering.
20
+ */
21
+ export declare function collectNullableOptionalProps(ir: ComponentIR): Set<string>;
22
+ export interface BooleanTypedPropContext {
23
+ /** The SolidJS-style props identifier (`function C(props: P)`), if any. */
24
+ propsObjectName: string | null;
25
+ /** Props typed `boolean` (`collectBooleanTypedProps`). */
26
+ booleanTypedProps: ReadonlySet<string>;
27
+ /** A binding at the read site shadows `name`. */
28
+ isBound(name: string): boolean;
29
+ }
30
+ /**
31
+ * Whether `expr` is a bare read of a boolean-typed prop (`open`,
32
+ * `props.open`), which renders through `bool_str`. Inside a `.map()`
33
+ * callback, a param that shares the prop's name is the row binding, not the
34
+ * prop (#2488).
35
+ */
36
+ export declare function isBooleanTypedPropRef(expr: string, ctx: BooleanTypedPropContext): boolean;
37
+ //# sourceMappingURL=prop-classes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-classes.d.ts","sourceRoot":"","sources":["../../src/adapters/prop-classes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,CAMrE;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,CAkBzE;AAED,MAAM,WAAW,uBAAuB;IACtC,2EAA2E;IAC3E,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,0DAA0D;IAC1D,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACtC,iDAAiD;IACjD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;CAC/B;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,uBAAuB,GAAG,OAAO,CAQzF"}
@@ -1 +1 @@
1
- {"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../src/analyzer.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,YAAY,CAAA;AAI3B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAInE,OAAO,EACL,KAAK,eAAe,EAUrB,MAAM,uBAAuB,CAAA;AAuB9B;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gCAAgC,CAAC,EAAE,EAAE,EAAE,CAAC,UAAU,GAAG,OAAO,CAc3E;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAK/D;AA8BD;;;;;;;;;;;;;;;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CAAC,KAAK,GAAG,OAAO,CA6BpE;AA4LD;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,CAuCzE;AAuDD;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CAelE;AAsxCD;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA6B3F;AA4HD,eAAO,MAAM,wBAAwB,aAMnC,CAAA;AAqBF;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,MAAM,EAAE,CAUV;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,iBAAiB;IAChC,mFAAmF;IACnF,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,2DAA2D;IAC3D,oBAAoB,EAAE,MAAM,EAAE,CAAA;CAC/B;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAarF;AAkED,eAAO,MAAM,mBAAmB,aAG9B,CAAA;AAi5CF;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI,CA+EvE;AAybD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAA"}
@@ -55,6 +55,13 @@ export interface ContextConsumer {
55
55
  * consumes no context. Single source of truth for the SSR-context adapters.
56
56
  */
57
57
  export declare function collectContextConsumers(metadata: IRMetadata): ContextConsumer[];
58
+ /**
59
+ * The SSR seed of a component's context consumers: one `line` per consumer,
60
+ * each binding the local to the active provider value (or the
61
+ * `createContext` default), newline-terminated; `''` when it consumes no
62
+ * context (#1297).
63
+ */
64
+ export declare function contextConsumerSeed(metadata: IRMetadata, line: (consumer: ContextConsumer) => string): string;
58
65
  /**
59
66
  * (#checkbox) Enumerate inherited-attribute accesses for the SolidJS
60
67
  * props-object pattern.
@@ -1 +1 @@
1
- {"version":3,"file":"augment-inherited-props.d.ts","sourceRoot":"","sources":["../src/augment-inherited-props.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAA+B,MAAM,YAAY,CAAA;AAGtF;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,qEAAqE;IACrE,SAAS,EAAE,MAAM,CAAA;IACjB,iEAAiE;IACjE,WAAW,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;IAC9C;;;;;;;;;;;;;;;;;OAiBG;IACH,WAAW,CAAC,EAAE,QAAQ,CAAA;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,UAAU,GAAG,eAAe,EAAE,CA6B/E;AA0CD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,CAmNlE;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAapE;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,MAAM,GAAG,IAAI,CAiBf;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,UAAU,CAAC,gBAAgB,CAAC,GAAG,SAAS,GAClD,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAoBrB;AAED;;;;;;;;;;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,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,gEAAgE;AAChE,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE;QAAE,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CACnD;AAED,+EAA+E;AAC/E,MAAM,WAAW,iBAAiB;IAChC,kFAAkF;IAClF,aAAa,EAAE,MAAM,CAAA;IACrB,oFAAoF;IACpF,OAAO,EAAE,gBAAgB,EAAE,CAAA;IAC3B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,EAAE,CAAC,UAAU,EAClB,cAAc,EAAE,SAAS,UAAU,EAAE,EACrC,WAAW,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAC5C;;;;;GAKG;AACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAClF,iBAAiB,GAAG,IAAI,CA2D1B"}
@@ -341,6 +341,27 @@ export declare function tsNodeToParsedExpr(node: ts.Node): ParsedExpr;
341
341
  * (e.g. `tags.map(t => \`#${t}\`).join(' ')`) lowers via `map_eval` (#2073).
342
342
  */
343
343
  export declare const CALLBACK_METHODS: ReadonlySet<string>;
344
+ /**
345
+ * Who binds a callback's params. `'template'`: the adapter lowers the call to
346
+ * an evaluator helper (`map_eval`, `sort_eval`, …) or a native form. In
347
+ * `'evaluator'`: the call sits inside such a callback's body, and the runtime
348
+ * evaluator runs it itself, binding a nested `.map` / `.filter` callback's
349
+ * `(item, index)` (`eval-reference.ts`, #2094).
350
+ */
351
+ export type CallbackScope = 'template' | 'evaluator';
352
+ /**
353
+ * The first callback param past {@link evaluatorBoundParamCount} that the
354
+ * callback body reads (`items.map((x, i) => i)` → `'i'`), or `null` when the
355
+ * body reads none of them. A DSL adapter would otherwise resolve such a name
356
+ * from the enclosing SSR scope, or leave it undefined, instead of the index /
357
+ * array the JS reference binds. A body this walk cannot analyze counts as
358
+ * reading the first extra param, so the check fails safe.
359
+ */
360
+ export declare function unboundCallbackParamRead(method: string, arrow: Extract<ParsedExpr, {
361
+ kind: 'arrow';
362
+ }>, scope?: CallbackScope): string | null;
363
+ /** The refusal reason for {@link unboundCallbackParamRead}'s finding. */
364
+ export declare function unboundCallbackParamReason(method: string, name: string): string;
344
365
  /**
345
366
  * A recognised higher-order callback method call: `<object>.<method>(<arrow>,
346
367
  * …rest)` where `method ∈` {@link CALLBACK_METHODS} and the first argument is a
@@ -660,6 +681,23 @@ export declare function renameFreeIdentifiers(expr: ParsedExpr, renames: Readonl
660
681
  * assume nothing is free.
661
682
  */
662
683
  export declare function freeIdentifiers(expr: ParsedExpr): Set<string> | null;
684
+ /**
685
+ * Whether `expr` calls something a DSL predicate emitter has no lowering for:
686
+ * a call that is neither an evaluator builtin (`String(x)`, `Math.abs(x)`), a
687
+ * zero-arg signal getter (`limit()`), nor a higher-order callback method. A
688
+ * filter emitter lowers such a call to a read of its callee
689
+ * (`x.localeCompare('m')` → `x.localeCompare`, `isOk(x)` → `isOk`), so the
690
+ * native predicate fallback must not take it (#3477).
691
+ */
692
+ export declare function hasOpaqueCall(expr: ParsedExpr): boolean;
693
+ /**
694
+ * Whether a callback nested anywhere in `expr` reads a param past the one a
695
+ * native form binds (`row.filter((x, i) => i > 0)`): Ruby blocks and Perl
696
+ * `grep` bind the element only, while the runtime evaluator also binds a
697
+ * nested `.map` / `.filter` index (`CallbackScope`). A predicate that does
698
+ * must not take a native form.
699
+ */
700
+ export declare function readsNestedCallbackIndex(expr: ParsedExpr): boolean;
663
701
  /**
664
702
  * Extract the textual identifier path from a parsed expression's
665
703
  * callee — `{kind:'identifier', name:'String'}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DrD;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAkE5D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,UAAU,CA4D/F;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAGnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAuFtF;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAqBxG;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,CA6DpE;AAwCD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CA6BvD;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAiBlE;AA2LD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAOhE"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Fold render-time reassignments of a component-scope `let` into its
3
+ * initializer (#3501).
4
+ *
5
+ * A template evaluates a binding's value, never the statements that follow
6
+ * its declaration, so a `let` reassigned before the component returns had
7
+ * no value a template could read:
8
+ *
9
+ * let label = props.label ?? 'Default'
10
+ * if (!label) label = 'Fallback'
11
+ *
12
+ * This pre-pass rewrites that to the single value the binding holds at
13
+ * render time, binding each intermediate value once, and removes the
14
+ * reassigning statements:
15
+ *
16
+ * const label_1 = props.label ?? 'Default'; let label = ((!(label_1)) ? ('Fallback') : (label_1))
17
+ *
18
+ * Every later stage (the analyzer, the CSR template, the template adapters,
19
+ * the client init body) then sees ordinary bindings with one value each, so
20
+ * they agree by construction.
21
+ *
22
+ * The rewrite only applies where it cannot change behaviour:
23
+ * - the reassigning statements directly follow the declaration, and each
24
+ * is an assignment to the binding (`x = e`, `x += e`, `x ??= e`, …), an
25
+ * `if`/`else` whose branches are such assignments, or a block of them;
26
+ * - the initializer, every assigned value and every condition is free of
27
+ * side effects (no calls, no assignments, no functions);
28
+ * - every expression is evaluated exactly as often, and in the same order,
29
+ * as the original statements evaluate it, since a member read may run a
30
+ * getter. Each statement's incoming value is a binding (a read of it is
31
+ * unobservable) or a literal, a conditional evaluates only the branch it
32
+ * takes, and inside a statement a computed value may only flow into a
33
+ * compound assignment (see `foldStatement`).
34
+ * Anything else leaves the binding as it is (and `markMutatedConstants`
35
+ * flags it as before).
36
+ */
37
+ /**
38
+ * The source with each foldable `let` folded, or `null` when nothing was
39
+ * folded. Line count is preserved where possible (removed statements are
40
+ * blanked rather than deleted), so later source locations stay valid.
41
+ */
42
+ export declare function foldRenderReassignmentsInSource(source: string, filePath: string): string | null;
43
+ //# sourceMappingURL=fold-render-reassignments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fold-render-reassignments.d.ts","sourceRoot":"","sources":["../src/fold-render-reassignments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAaH;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAW/F"}
@@ -57,4 +57,13 @@ export interface BindingEnvironment {
57
57
  */
58
58
  export declare function isNameBound(name: string, env: BindingEnvironment): boolean;
59
59
  export declare function resolveFreeRefs(node: ts.Node, env: BindingEnvironment): FreeReference[];
60
+ /**
61
+ * Replace the free references to a helper's parameters, inside the IR built
62
+ * from its inlined body, with the references of the call's arguments
63
+ * (#3509). `argRefs` maps each parameter name to its argument's resolved
64
+ * references. Rewrites `origin.freeRefs` (expressions, conditions, and any
65
+ * other node carrying an origin) and attribute `freeIdentifiers` in place,
66
+ * anywhere in the subtree.
67
+ */
68
+ export declare function rebindHelperParamRefs(root: unknown, argRefs: ReadonlyMap<string, readonly FreeReference[]>): void;
60
69
  //# sourceMappingURL=free-refs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"free-refs.d.ts","sourceRoot":"","sources":["../src/free-refs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,KAAK,EAEV,aAAa,EAEb,UAAU,EACV,UAAU,EACV,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,YAAY,EACb,MAAM,YAAY,CAAA;AAInB;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAA;IAC9B,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAA;IAC1B,WAAW,EAAE,SAAS,SAAS,EAAE,CAAA;IACjC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,cAAc,EAAE,SAAS,YAAY,EAAE,CAAA;IACvC,cAAc,EAAE,SAAS,YAAY,EAAE,CAAA;IACvC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAA;IAC9B,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACnC;;;;;;;;;OASG;IACH,mBAAmB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACzC,OAAO,EAAE,EAAE,CAAC,WAAW,GAAG,IAAI,CAAA;CAC/B;AA2VD;;;;;GA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b,GAAG,EAAE,kBAAkB,GACtB,aAAa,EAAE,CAEjB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,aAAa,EAAE,CAAC,GAAG,IAAI,CAiBjH"}
package/dist/index.d.ts CHANGED
@@ -32,10 +32,26 @@ export type { ParsedExprEmitter, LoweringEmitter, HigherOrderMethod, ArrayMethod
32
32
  export { collectLoopBoundNames } from './adapters/loop-bound-names.ts';
33
33
  export { filterCaptureCollisions } from './adapters/filter-capture-collisions.ts';
34
34
  export { templateNameCollisionErrors } from './adapters/template-name-collisions.ts';
35
- export { isBooleanResultParsed, stringifyBooleanTernaryBranches } from './adapters/boolean-result.ts';
35
+ export { collectBooleanValueNames, isAriaBooleanAttr, isBooleanResultExpr, isBooleanResultParsed, isExplicitStringCall, stringifyBooleanTernaryBranches, } from './adapters/boolean-result.ts';
36
+ export { isBareStringLiteral, isLiteralIndex, isStringTypeInfo } from './adapters/literal-value.ts';
37
+ export { collectBooleanTypedProps, collectNullableOptionalProps, isBooleanTypedPropRef } from './adapters/prop-classes.ts';
38
+ export type { BooleanTypedPropContext } from './adapters/prop-classes.ts';
39
+ export { collectImportedLoopChildComponentErrors, hasClientInteractivity } from './adapters/component-tree.ts';
40
+ export { ARRAY_METHOD_CATALOGUE, emitArrayMethod, lowerArrayMethod, prefixedArrayMethodSpelling, } from './adapters/array-method.ts';
41
+ export { emitCallbackEval, isPredicateMethod, lowerCallbackMethod, nestedCallbackRefusal, isUnloweredCall, unloweredCallRefusal, sortEvalPlan, sortRefusal, } from './adapters/callback-method.ts';
42
+ export type { CallbackEvalHelper, CallbackEvalOperand, CallbackEvalPlan, CallbackEvalSpelling, CallbackLoweringOptions, CallbackPlan, PredicateMethod, } from './adapters/callback-method.ts';
43
+ export type { ArrayMethodArg, ArrayMethodDefault, ArrayMethodEntry, ArrayMethodHelper, ArrayMethodParam, ArrayMethodPlan, ArrayMethodSpelling, } from './adapters/array-method.ts';
36
44
  export { derivesScopeFromSlot } from './adapters/child-scope.ts';
45
+ export { childTemplateName, componentPropKey, isEmptyComponentProps, planComponentProps, spellComponentProps } from './adapters/component-props.ts';
46
+ export type { ComponentPropEntry, ComponentPropSegment, ComponentPropSpelling, ComponentPropsOptions, SpelledComponentPropSegment } from './adapters/component-props.ts';
47
+ export { parseUndefinedAlternateTernary, planAttrExpression, planSpreadAttr, unsupportedAttrExpression, unsupportedAttrExpressionError } from './adapters/attr-plan.ts';
48
+ export type { AttrExpressionPlan, AttrPlanContext, SpreadAttrPlan, SpreadPlanContext, UndefinedAlternateTernary } from './adapters/attr-plan.ts';
49
+ export { planLoop } from './adapters/loop-plan.ts';
50
+ export { computedConstContext, inlineComputedConstAttr, inlineComputedConsts } from './adapters/computed-const.ts';
51
+ export type { ComputedConstContext } from './adapters/computed-const.ts';
52
+ export type { LoopPlan, LoopPlanContext } from './adapters/loop-plan.ts';
37
53
  export { evaluateStaticLiteral, isFullyStaticLiteral, resolveStaticLoopSource } from './static-literal.ts';
38
- export { arithmeticOperandIsNull, arithmeticOperandIsUndefined, bareGetterCallName, attrValueMayBeNullish, collectNullableSignalGetters, collectNullishAttrContext, isNullableSignal, isNullishLiteral, NULL_COERCING_ARITHMETIC_OPS, nullableSignalAttrGetter, type NullishAttrContext, } from './nullable-signal-attr.ts';
54
+ export { arithmeticOperandIsNull, arithmeticOperandIsUndefined, arithmeticOperandCoercion, bareGetterCallName, attrValueMayBeNullish, collectNullableSignalGetters, collectNullishAttrContext, isNullableSignal, isNullishLiteral, NULL_COERCING_ARITHMETIC_OPS, nullableSignalAttrGetter, type NullishAttrContext, type ArithmeticCoercion, } from './nullable-signal-attr.ts';
39
55
  export { importsSearchParams, searchParamsLocalNames, envSignalLocalNames, envSignalReaderFor, ENV_SIGNAL_READERS, queryHrefLocalNames, matchSearchParamsMethodCall } from './adapters/env-signal.ts';
40
56
  export type { EnvSignalReader } from './adapters/env-signal.ts';
41
57
  export { matchQueryHrefCall, queryHrefArgs, type QueryHrefCall, type QueryHrefTriple } from './query-href-lowering.ts';
@@ -46,7 +62,9 @@ export type { IRNodeEmitter, EmitIRNode } from './adapters/ir-node-emitter.ts';
46
62
  export { emitAttrValue } from './adapters/attr-value-emitter.ts';
47
63
  export type { AttrValueEmitter } from './adapters/attr-value-emitter.ts';
48
64
  export { escapeLineStatementSigil } from './adapters/line-statement-text.ts';
49
- export { isDangerousInnerHtmlAttr, resolveDangerousInnerHtml, dangerousInnerHtmlMetacharViolation, dangerousInnerHtmlDiagnostic, } from './adapters/dangerous-inner-html.ts';
65
+ export { isDangerousInnerHtmlAttr, resolveDangerousInnerHtml, dangerousInnerHtmlMetacharViolation, dangerousInnerHtmlDiagnostic, renderDangerousInnerHtml, } from './adapters/dangerous-inner-html.ts';
66
+ export { renderElementAttributes, renderElementShell, renderFragmentScope } from './adapters/element-shell.ts';
67
+ export type { ElementShellSpelling } from './adapters/element-shell.ts';
50
68
  export type { DangerousInnerHtmlResolution } from './adapters/dangerous-inner-html.ts';
51
69
  export { generateClientJs, generateClientJsWithSourceMap, analyzeClientNeeds } from './ir-to-client-js/index.ts';
52
70
  export type { ClientJsResult } from './ir-to-client-js/index.ts';
@@ -100,7 +118,7 @@ export { applyCssLayerPrefix } from './css-layer-prefixer.ts';
100
118
  export { enableCompilerInstrumentation, disableCompilerInstrumentation, resetCompilerCounters, getCompilerCounters, type CompilerCounters, } from './instrumentation.ts';
101
119
  export { ErrorCodes, createError, formatError, generateCodeFrame } from './errors.ts';
102
120
  export { isValueReferenceIdentifier, collectValueReferencedNames } from './value-references.ts';
103
- export { parseExpression, tsNodeToParsedExpr, asCallbackMethodCall, CALLBACK_METHODS, sortComparatorFromArrow, serializeParsedExpr, freeVarsInBody, freeIdentifiers, renameFreeIdentifiers, materializeGetterCalls, isSupported, isSupportedValue, exprToString, stringifyParsedExpr, identifierPath, parseBlockBody, parseBlockBodyTolerant, foldBlockToExpr, predicateTernaryToLogical, containsHigherOrder, extractArrowBodyExpression, parseStyleObjectEntries, hasUnsafeStyleValue, parseProviderObjectLiteral, isFunctionShapedExpression, type ProviderObjectMember, type FoldBlockOptions } from './expression-parser.ts';
121
+ export { parseExpression, tsNodeToParsedExpr, asCallbackMethodCall, hasOpaqueCall, unboundCallbackParamRead, unboundCallbackParamReason, CALLBACK_METHODS, sortComparatorFromArrow, serializeParsedExpr, freeVarsInBody, freeIdentifiers, renameFreeIdentifiers, materializeGetterCalls, isSupported, isSupportedValue, exprToString, stringifyParsedExpr, identifierPath, parseBlockBody, parseBlockBodyTolerant, foldBlockToExpr, predicateTernaryToLogical, containsHigherOrder, extractArrowBodyExpression, parseStyleObjectEntries, hasUnsafeStyleValue, parseProviderObjectLiteral, isFunctionShapedExpression, type ProviderObjectMember, type FoldBlockOptions } from './expression-parser.ts';
104
122
  export type { StyleObjectEntry } from './expression-parser.ts';
105
123
  export { literalMemberIndex } from './literal-member-index.ts';
106
124
  export { PARSED_EXPR_KINDS, ARRAY_METHOD_NAMES, SORT_KEY_TYPES, SORT_KEY_TARGETS, SORT_KEY_DIRECTIONS } from './expression-parser.ts';
@@ -120,7 +138,7 @@ export { buildReactiveProfile, buildProfileFromGraph, diffProfiles, formatSingle
120
138
  export type { ComponentProfile, ComponentProfileMetrics, ProfileFinding, ProfileDiff, ProfileDiffEntry, } from './debug-profile.ts';
121
139
  export { BOOLEAN_ATTRS, isBooleanAttr } from './html-constants.ts';
122
140
  export { USE_CLIENT_DIRECTIVE, CLIENT_EXPRESSION_DIRECTIVE } from './directives.ts';
123
- export { augmentInheritedPropAccesses, parseRecordIndexAccess, evalStringArrayJoin, collectModuleStringConsts, lookupStaticRecordLiteral, lookupLiteralConst, collectContextConsumers } from './augment-inherited-props.ts';
141
+ export { augmentInheritedPropAccesses, parseRecordIndexAccess, evalStringArrayJoin, collectModuleStringConsts, lookupStaticRecordLiteral, lookupLiteralConst, collectContextConsumers, contextConsumerSeed } from './augment-inherited-props.ts';
124
142
  export type { RecordIndexAccess, RecordIndexEntry, ContextConsumer } from './augment-inherited-props.ts';
125
143
  export type { TargetedEvent, TargetedInputEvent, TargetedFocusEvent, TargetedKeyboardEvent, TargetedMouseEvent, InputEventHandler, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, ChangeEventHandler, BaseEventAttributes, HTMLBaseAttributes, HTMLAttributeFormEnctype, HTMLAttributeFormMethod, HTMLAttributeAnchorTarget, ButtonHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes, FormHTMLAttributes, AnchorHTMLAttributes, ImgHTMLAttributes, LabelHTMLAttributes, OptionHTMLAttributes, SVGSVGAttributes, } from './html-types.ts';
126
144
  //# sourceMappingURL=index.d.ts.map