@barefootjs/jsx 0.39.8 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/dist/adapters/attr-plan.d.ts +1 -20
  2. package/dist/adapters/attr-plan.d.ts.map +1 -1
  3. package/dist/adapters/callback-method.d.ts +19 -7
  4. package/dist/adapters/callback-method.d.ts.map +1 -1
  5. package/dist/adapters/dsl-template-adapter.d.ts +79 -1
  6. package/dist/adapters/dsl-template-adapter.d.ts.map +1 -1
  7. package/dist/adapters/loop-plan.d.ts +173 -9
  8. package/dist/adapters/loop-plan.d.ts.map +1 -1
  9. package/dist/adapters/parsed-expr-emitter.d.ts +20 -3
  10. package/dist/adapters/parsed-expr-emitter.d.ts.map +1 -1
  11. package/dist/analyzer.d.ts.map +1 -1
  12. package/dist/assignment-target.d.ts +26 -0
  13. package/dist/assignment-target.d.ts.map +1 -0
  14. package/dist/augment-inherited-props.d.ts.map +1 -1
  15. package/dist/css-layer-prefixer.d.ts.map +1 -1
  16. package/dist/debug.d.ts.map +1 -1
  17. package/dist/errors.d.ts +1 -0
  18. package/dist/errors.d.ts.map +1 -1
  19. package/dist/index.d.ts +6 -6
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +2566 -2007
  22. package/dist/ir-to-client-js/compute-inlinability.d.ts.map +1 -1
  23. package/dist/ir-to-client-js/control-flow/plan/build-component-loop.d.ts.map +1 -1
  24. package/dist/ir-to-client-js/control-flow/plan/loop.d.ts +24 -1
  25. package/dist/ir-to-client-js/control-flow/plan/loop.d.ts.map +1 -1
  26. package/dist/ir-to-client-js/control-flow/shared.d.ts +16 -1
  27. package/dist/ir-to-client-js/control-flow/shared.d.ts.map +1 -1
  28. package/dist/ir-to-client-js/control-flow/stringify/component-loop.d.ts +6 -1
  29. package/dist/ir-to-client-js/control-flow/stringify/component-loop.d.ts.map +1 -1
  30. package/dist/ir-to-client-js/csr-substitute.d.ts +13 -2
  31. package/dist/ir-to-client-js/csr-substitute.d.ts.map +1 -1
  32. package/dist/ir-to-client-js/emit-registration.d.ts.map +1 -1
  33. package/dist/ir-to-client-js/html-template.d.ts.map +1 -1
  34. package/dist/ir-to-client-js/phases/props-extraction.d.ts +5 -3
  35. package/dist/ir-to-client-js/phases/props-extraction.d.ts.map +1 -1
  36. package/dist/ir-to-client-js/plan/static-array-child-init.d.ts +8 -0
  37. package/dist/ir-to-client-js/plan/static-array-child-init.d.ts.map +1 -1
  38. package/dist/ir-to-client-js/rewrite-props-object.d.ts.map +1 -1
  39. package/dist/ir-to-client-js/stringify/static-array-child-init.d.ts +1 -0
  40. package/dist/ir-to-client-js/stringify/static-array-child-init.d.ts.map +1 -1
  41. package/dist/ir-to-client-js/utils.d.ts +1 -1
  42. package/dist/ir-to-client-js/utils.d.ts.map +1 -1
  43. package/dist/jsx-to-ir.d.ts.map +1 -1
  44. package/dist/module-exports.d.ts.map +1 -1
  45. package/dist/prop-rewrite.d.ts +17 -8
  46. package/dist/prop-rewrite.d.ts.map +1 -1
  47. package/dist/props-binding.d.ts +57 -0
  48. package/dist/props-binding.d.ts.map +1 -1
  49. package/dist/scope/binding-scope.d.ts +32 -2
  50. package/dist/scope/binding-scope.d.ts.map +1 -1
  51. package/dist/scope/lexical-scope-walk.d.ts +26 -0
  52. package/dist/scope/lexical-scope-walk.d.ts.map +1 -0
  53. package/dist/template-parts.d.ts +1 -1
  54. package/dist/template-parts.d.ts.map +1 -1
  55. package/dist/types.d.ts +30 -2
  56. package/dist/types.d.ts.map +1 -1
  57. package/package.json +2 -2
  58. package/src/__tests__/arithmetic-lowering.test.ts +5 -1
  59. package/src/__tests__/attr-plan.test.ts +1 -14
  60. package/src/__tests__/binding-scope.test.ts +29 -0
  61. package/src/__tests__/client-template-escape-soundness.test.ts +17 -4
  62. package/src/__tests__/client-template-static-delimiters.test.ts +57 -0
  63. package/src/__tests__/create-query.test.ts +1 -1
  64. package/src/__tests__/dsl-template-adapter.test.ts +70 -0
  65. package/src/__tests__/emit-to-string-call.test.ts +58 -0
  66. package/src/__tests__/extract-function-params.test.ts +37 -0
  67. package/src/__tests__/issue-2960-multi-root-cond-same-tag.test.ts +18 -0
  68. package/src/__tests__/jsx-text-linebreak-whitespace.test.ts +11 -0
  69. package/src/__tests__/loop-param-accessor-key-member-safety.test.ts +90 -31
  70. package/src/__tests__/loop-plan.test.ts +196 -1
  71. package/src/__tests__/loop-row-child-children-handler.test.ts +129 -0
  72. package/src/__tests__/loop-row-child-children-inner-loop-shadow.test.ts +74 -0
  73. package/src/__tests__/loop-row-child-children-ref.test.ts +117 -0
  74. package/src/__tests__/props-alias-const.test.ts +60 -1
  75. package/src/__tests__/props-named-callback-param.test.ts +256 -0
  76. package/src/__tests__/renamed-body-destructure-template.test.ts +86 -0
  77. package/src/__tests__/rewrite-props-object.test.ts +90 -0
  78. package/src/__tests__/template-parts-literal-boundary.test.ts +22 -0
  79. package/src/__tests__/written-binding-substitution.test.ts +430 -0
  80. package/src/adapters/attr-plan.ts +2 -54
  81. package/src/adapters/callback-method.ts +25 -10
  82. package/src/adapters/dsl-template-adapter.ts +155 -2
  83. package/src/adapters/loop-plan.ts +267 -14
  84. package/src/adapters/parsed-expr-emitter.ts +37 -4
  85. package/src/analyzer.ts +283 -2
  86. package/src/assignment-target.ts +79 -0
  87. package/src/augment-inherited-props.ts +5 -9
  88. package/src/css-layer-prefixer.ts +4 -5
  89. package/src/debug.ts +1 -0
  90. package/src/errors.ts +11 -0
  91. package/src/index.ts +23 -4
  92. package/src/ir-to-client-js/compute-inlinability.ts +7 -4
  93. package/src/ir-to-client-js/control-flow/plan/build-component-loop.ts +21 -5
  94. package/src/ir-to-client-js/control-flow/plan/loop.ts +25 -1
  95. package/src/ir-to-client-js/control-flow/shared.ts +41 -3
  96. package/src/ir-to-client-js/control-flow/stringify/component-loop.ts +23 -3
  97. package/src/ir-to-client-js/csr-substitute.ts +70 -22
  98. package/src/ir-to-client-js/emit-reactive.ts +2 -2
  99. package/src/ir-to-client-js/emit-registration.ts +6 -1
  100. package/src/ir-to-client-js/html-template.ts +70 -52
  101. package/src/ir-to-client-js/phases/props-extraction.ts +26 -5
  102. package/src/ir-to-client-js/plan/build-static-array-child-init.ts +7 -0
  103. package/src/ir-to-client-js/plan/static-array-child-init.ts +8 -0
  104. package/src/ir-to-client-js/rewrite-destructured-props.ts +2 -2
  105. package/src/ir-to-client-js/rewrite-props-object.ts +14 -8
  106. package/src/ir-to-client-js/stringify/static-array-child-init.ts +4 -1
  107. package/src/ir-to-client-js/utils.ts +41 -97
  108. package/src/jsx-to-ir.ts +65 -32
  109. package/src/loop-destructure.ts +4 -1
  110. package/src/module-exports.ts +13 -21
  111. package/src/prop-rewrite.ts +31 -72
  112. package/src/props-binding.ts +73 -1
  113. package/src/rich-type-refusal.ts +3 -1
  114. package/src/scope/binding-scope.ts +39 -3
  115. package/src/scope/lexical-scope-walk.ts +167 -0
  116. package/src/template-parts.ts +4 -2
  117. package/src/template-position-walk.ts +3 -1
  118. package/src/types.ts +27 -2
@@ -10,27 +10,8 @@
10
10
  * hash literal.
11
11
  */
12
12
  import { type ParsedExpr } from '../expression-parser.ts';
13
- import type { LoweringMatcher } from '../lowering-registry.ts';
14
13
  import { type NullishAttrContext } from '../nullable-signal-attr.ts';
15
- import type { CompilerError, ConstantInfo, ExpressionAttr, SpreadAttr } from '../types.ts';
16
- /**
17
- * Whether an attribute value is a shape no template lowers: a JS object
18
- * literal (`style={{…}}` aside, which the adapter lowers first) or a
19
- * tagged template literal (`cn\`base ${tone()}\``). Returns the refusal, with
20
- * the support gate's reason when it gives one, or `null` when the value
21
- * goes on to {@link planAttrExpression}. The adapter reports BF101 in its own
22
- * words. A value starting with neither shape is never parsed here.
23
- */
24
- export declare function unsupportedAttrExpression(expr: string, loweringMatchers: readonly LoweringMatcher[]): {
25
- reason: string | undefined;
26
- } | null;
27
- /**
28
- * The BF101 for an attribute value {@link unsupportedAttrExpression}
29
- * refuses, worded for one adapter (`adapterLabel`, e.g. `Mojo`) and its
30
- * template language (`languageLabel`, e.g. `Embedded Perl`); `null` when the
31
- * value goes on to {@link planAttrExpression}.
32
- */
33
- export declare function unsupportedAttrExpressionError(expr: string, attrName: string, loweringMatchers: readonly LoweringMatcher[], componentName: string, adapterLabel: string, languageLabel: string): CompilerError | null;
14
+ import type { ConstantInfo, ExpressionAttr, SpreadAttr } from '../types.ts';
34
15
  /**
35
16
  * The emission of an `{expr}` attribute value.
36
17
  *
@@ -1 +1 @@
1
- {"version":3,"file":"attr-plan.d.ts","sourceRoot":"","sources":["../../src/adapters/attr-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAA8C,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACrG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,EAAmD,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACrH,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAK1F;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,gBAAgB,EAAE,SAAS,eAAe,EAAE,GAC3C;IAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,IAAI,CAUvC;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,SAAS,eAAe,EAAE,EAC5C,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,GACpB,aAAa,GAAG,IAAI,CAatB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO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AAC;IAAC,UAAU,EAAE,KAAK,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;CAAE,CAAA;AAEhE,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,WAAW,EAAE,aAAa,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC5C,cAAc,EAAE,SAAS,YAAY,EAAE,CAAA;IACvC,mDAAmD;IACnD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;CAC/B;AAED,sCAAsC;AACtC,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,iBAAiB,GAAG,cAAc,CASxF"}
@@ -50,23 +50,29 @@ export interface CallbackEvalPlan {
50
50
  operands: CallbackEvalOperand[];
51
51
  captured: string[];
52
52
  }
53
- /** A lowered callback method call, as data. */
54
- export type CallbackPlan = CallbackEvalPlan
53
+ /**
54
+ * A lowered `.sort` / `.toSorted` comparator: the evaluator call, the
55
+ * structured `{keys: …}` descriptor for a comparator the evaluator cannot
56
+ * model, or BF101.
57
+ */
58
+ export type SortPlan = CallbackEvalPlan
55
59
  /** A comparator the evaluator cannot model but the `{keys: …}` descriptor can. */
56
60
  | {
57
61
  kind: 'structured-sort';
58
62
  comparator: SortComparator;
59
- }
63
+ } | {
64
+ kind: 'refuse';
65
+ message: string;
66
+ suggestion: string;
67
+ };
68
+ /** A lowered callback method call, as data. */
69
+ export type CallbackPlan = SortPlan
60
70
  /** A predicate for the adapter's own native form (see `nativePredicate`). */
61
71
  | {
62
72
  kind: 'native-predicate';
63
73
  method: PredicateMethod;
64
74
  param: string;
65
75
  predicate: ParsedExpr;
66
- } | {
67
- kind: 'refuse';
68
- message: string;
69
- suggestion: string;
70
76
  }
71
77
  /** A method outside `CALLBACK_METHODS`; unreachable, as the parser recognises only those. */
72
78
  | {
@@ -85,6 +91,12 @@ export interface CallbackLoweringOptions {
85
91
  }
86
92
  /** Lower `<recv>.<method>(arrow, ...restArgs)`. */
87
93
  export declare function lowerCallbackMethod(method: string, arrow: Arrow, restArgs: readonly ParsedExpr[], options: CallbackLoweringOptions): CallbackPlan;
94
+ /**
95
+ * Lower a `.sort` / `.toSorted` comparator: the evaluator first, then the
96
+ * structured `{keys: …}` descriptor, otherwise BF101. A loop source's sort
97
+ * (`planLoop`) and `.sort(cmp)` at an expression position decide the same.
98
+ */
99
+ export declare function lowerSortComparator(method: 'sort' | 'toSorted', arrow: Arrow, adapterName: string): SortPlan;
88
100
  /**
89
101
  * The evaluator plan for a sort comparator, or `null` when the body is
90
102
  * outside the evaluator surface (a `localeCompare` comparator) or the arrow
@@ -1 +1 @@
1
- {"version":3,"file":"callback-method.d.ts","sourceRoot":"","sources":["../../src/adapters/callback-method.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAOL,KAAK,UAAU,EACf,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAA;AAEhC,KAAK,KAAK,GAAG,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC,CAAA;AAEnD,mDAAmD;AACnD,MAAM,MAAM,eAAe,GACvB,QAAQ,GACR,OAAO,GACP,MAAM,GACN,MAAM,GACN,WAAW,GACX,UAAU,GACV,eAAe,CAAA;AAYnB,+DAA+D;AAC/D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,eAAe,CAE3E;AAED,oFAAoF;AACpF,MAAM,MAAM,kBAAkB,GAC1B,WAAW,GACX,aAAa,GACb,aAAa,GACb,YAAY,GACZ,WAAW,GACX,WAAW,GACX,iBAAiB,GACjB,eAAe,GACf,UAAU,CAAA;AAEd,uEAAuE;AACvE,MAAM,MAAM,mBAAmB,GAC3B;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE;AACnC,sCAAsC;GACpC;IAAE,IAAI,EAAE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AAI,EAAE,MAAM,KAAK,OAAO,GAClC,OAAO,CAMT;AAcD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,SAAS,UAAU,EAAE,EAC3B,WAAW,EAAE,MAAM,GAClB;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAQzC;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAKvH;AAED,4EAA4E;AAC5E,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAKvH;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAKlH"}
@@ -7,9 +7,10 @@
7
7
  import { type LoweringMatcher } from '../lowering-registry.ts';
8
8
  import { type NullishAttrContext } from '../nullable-signal-attr.ts';
9
9
  import { BindingScope } from '../scope/binding-scope.ts';
10
- import type { CompilerError, ComponentIR, IRIfStatement, IRMetadata } from '../types.ts';
10
+ import type { CompilerError, ComponentIR, ConstantInfo, IRIfStatement, IRLoop, IRMetadata, PreambleValueDeclaration } from '../types.ts';
11
11
  import { type ComputedConstContext } from './computed-const.ts';
12
12
  import { BaseAdapter, type AdapterGenerateOptions, type AdapterOutput } from './interface.ts';
13
+ import { type LoopPlan, type LoopPlanContext } from './loop-plan.ts';
13
14
  /**
14
15
  * How an adapter that renames reserved names spells a source identifier as
15
16
  * a template variable, and the engine name its collision diagnostic uses.
@@ -20,6 +21,52 @@ export interface TemplateIdentifierSpelling {
20
21
  /** The engine name in the diagnostic ("Jinja", "MiniJinja", …). */
21
22
  label: string;
22
23
  }
24
+ /**
25
+ * An adapter's spelling of a loop row's window ({@link DslTemplateAdapter.renderLoopRow}).
26
+ * Each hook runs under the row's scope.
27
+ */
28
+ export interface LoopRowSpelling {
29
+ /** Runs first, before anything in the row renders: the adapter's own per-row bookkeeping. */
30
+ enter?(row: BindingScope, outside: BindingScope): void;
31
+ /** A `.map()` preamble declaration as a per-row local (#2447). */
32
+ preamble(declaration: PreambleValueDeclaration): string;
33
+ /** The whole-item-conditional `<!--bf-loop-i:KEY-->` anchor for the key expression `key`. */
34
+ keyAnchor(key: string): string;
35
+ }
36
+ /** A loop row rendered under its own scope. */
37
+ export interface LoopRow {
38
+ /** The scope outside the loop, current again once the row is rendered. */
39
+ outside: BindingScope;
40
+ /** `outside.enterLoopRow(loop)`: the scope the row rendered under. */
41
+ row: BindingScope;
42
+ /** The props the row's bindings newly shadow, each with its root alias (#3314). */
43
+ rootAliases: {
44
+ name: string;
45
+ alias: string;
46
+ }[];
47
+ /** One spelled local per preamble declaration, in source order. */
48
+ preamble: string[];
49
+ /** The children, after the key anchor of a whole-item-conditional body. */
50
+ body: string;
51
+ }
52
+ /** The parts of a {@link LoopPlanContext} each adapter spells. */
53
+ export type LoopPlanSpelling<Spelled> = Pick<LoopPlanContext<Spelled>, 'resolveLiteralConst' | 'callbackLowering' | 'spellStatic'>;
54
+ /**
55
+ * An adapter's wording of the refusals a {@link LoopPlan} decides
56
+ * ({@link DslTemplateAdapter.recordLoopPlanRefusals}).
57
+ */
58
+ export interface LoopRefusalSpelling {
59
+ /** The BF104 message for a destructure pattern `param` that no template binds. */
60
+ destructureMessage(param: string): string;
61
+ /** The BF104 suggestion. */
62
+ destructureSuggestion: string;
63
+ /**
64
+ * BF101 for a source naming a const no template binds: the engine name
65
+ * the shared wording uses ("Jinja", "MiniJinja", …), or the adapter's own
66
+ * recording of it.
67
+ */
68
+ unresolvableConst: string | ((constant: ConstantInfo) => void);
69
+ }
23
70
  export declare abstract class DslTemplateAdapter extends BaseAdapter {
24
71
  protected componentName: string;
25
72
  /** Diagnostics collected while rendering, merged into `ir.errors` at the end. */
@@ -112,6 +159,12 @@ export declare abstract class DslTemplateAdapter extends BaseAdapter {
112
159
  protected importAliases: Map<string, string>;
113
160
  /** Numbers the children captures of a child component that has no slot id. */
114
161
  protected childrenCaptureCounter: number;
162
+ /**
163
+ * True while a loop row's children render ({@link renderLoopRow}): a
164
+ * component inside takes the loop-child naming, and a child prop that
165
+ * needs a per-instance value has none to read.
166
+ */
167
+ protected inLoop: boolean;
115
168
  /** The adapter's name in the BF103 imported-loop-child diagnostic ("The Jinja adapter emits …"). */
116
169
  protected abstract readonly loopChildDiagnosticName: string;
117
170
  /**
@@ -127,6 +180,31 @@ export declare abstract class DslTemplateAdapter extends BaseAdapter {
127
180
  * above and before any diagnostic or rendering.
128
181
  */
129
182
  protected resetAdapterState(_ir: ComponentIR): void;
183
+ /** `render()` under `scope`, the current scope restored afterwards. */
184
+ protected renderInScope<T>(scope: BindingScope, render: () => T): T;
185
+ /** {@link planLoop} against the current scope and the component's constants. */
186
+ protected loopPlanFor<Spelled>(loop: IRLoop, spelling: LoopPlanSpelling<Spelled>): LoopPlan<Spelled>;
187
+ /**
188
+ * Record the refusals `plan` decided for `loop`, at the loop's location:
189
+ * BF104 for a destructure pattern no template binds, then BF101 for a
190
+ * source naming a computed const no template binds (#3473). The plan
191
+ * decides; the adapter only words them.
192
+ */
193
+ protected recordLoopPlanRefusals(loop: IRLoop, plan: LoopPlan<unknown>, spelling: LoopRefusalSpelling): void;
194
+ /**
195
+ * A loop row's window (#3473): the row's scope entered around everything
196
+ * that evaluates per row (the preamble locals' initializers, the children,
197
+ * the whole-item-conditional key anchor) and the outer scope restored
198
+ * after. The children render under `inLoop`; the key anchor, after them,
199
+ * does not. The preamble converts first, so a later initializer sees an
200
+ * earlier local, as in the source block.
201
+ *
202
+ * What sits outside the window stays the adapter's: the loop header, the
203
+ * sort, and the filter predicate, which a filter callback's own frame
204
+ * scopes rather than the `.map()` row.
205
+ */
206
+ protected renderLoopRow(loop: IRLoop, spelling: LoopRowSpelling): LoopRow;
207
+ private renderInLoop;
130
208
  /** The root `if` statement of a component with conditional returns. */
131
209
  protected abstract renderIfStatement(ifStmt: IRIfStatement): string;
132
210
  /** The script registrations the template starts with. */
@@ -1 +1 @@
1
- {"version":3,"file":"dsl-template-adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/dsl-template-adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAA2B,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACvF,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAExD,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExF,OAAO,EAAwB,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAErF,OAAO,EAAE,WAAW,EAAE,KAAK,sBAAsB,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAI7F;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,6DAA6D;IAC7D,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAA;CACd;AAED,8BAAsB,kBAAmB,SAAQ,WAAW;IAK1D,SAAS,CAAC,aAAa,EAAE,MAAM,CAAK;IACpC,iFAAiF;IACjF,SAAS,CAAC,MAAM,EAAE,aAAa,EAAE,CAAK;IACtC;;;OAGG;IACH,SAAS,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAO;IAC/C;;;;;;;OAOG;IACH,SAAS,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAO;IA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G;IACH,SAAS,CAAC,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CA4B3G;IAED;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,GAAG,OAAO,CAUxE;IAED,OAAO,CAAC,YAAY;IAUpB,uEAAuE;IACvE,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAAA;IACnE,yDAAyD;IACzD,SAAS,CAAC,QAAQ,CAAC,2BAA2B,CAC5C,EAAE,EAAE,WAAW,EACf,cAAc,CAAC,EAAE,MAAM,EACvB,YAAY,CAAC,EAAE,MAAM,EAAE,EACvB,aAAa,CAAC,EAAE,MAAM,EAAE,GACvB,MAAM,CAAA;IACT;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAAA;IAC/D;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAAA;IAE3D,QAAQ,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,aAAa,CA4BzE;IAED,OAAO,CAAC,iBAAiB;IA8BzB,OAAO,CAAC,oBAAoB;CAgB7B"}
@@ -4,15 +4,19 @@
4
4
  * Every DSL adapter decides the same things about a `.map()` loop before it
5
5
  * spells a line of template: whether its destructure pattern lowers (BF104),
6
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.
7
+ * no template binds (BF101), how its `.sort` comparator lowers, which filter
8
+ * captures need an alias, how the filter predicate reads on the row, and
9
+ * which locals the row binds for its index and its destructure bindings.
10
+ * {@link planLoop} makes those decisions once, against the scope outside the
11
+ * loop; {@link savedLoopBindings} decides, against the row's scope, which
12
+ * row bindings a backend without loop-scoped `set` saves and restores. The adapter keeps the spelling:
13
+ * the loop header, the row bindings, the diagnostics' wording, and the order
14
+ * it emits them in.
12
15
  */
16
+ import { type ParsedExpr, type SortComparator } from '../expression-parser.ts';
13
17
  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';
18
+ import type { ConstantInfo, IRLoop, LoopBindingPathSegment } from '../types.ts';
19
+ import { type CallbackEvalSpelling, type CallbackLoweringOptions, type SortPlan } from './callback-method.ts';
16
20
  export interface LoopPlanContext<Spelled> {
17
21
  /** The scope outside the loop. */
18
22
  scope: BindingScope;
@@ -40,14 +44,174 @@ export interface LoopPlan<Spelled> {
40
44
  * name is the row's value, not the const (#3473).
41
45
  */
42
46
  unresolvableConst: ConstantInfo | null;
43
- /** The `.sort` / `.toSorted` comparator's lowering, or `null` without one. */
44
- sort: CallbackPlan | null;
47
+ /**
48
+ * The `.sort` / `.toSorted` comparator's lowering, or `null` without one:
49
+ * the evaluator, the structured `{keys: …}` descriptor, or BF101, the same
50
+ * chain as `.sort(cmp)` at an expression position.
51
+ */
52
+ sort: SortPlan | null;
45
53
  /** The filter predicate's captures that a row binding would shadow, each with its alias. */
46
54
  captureAliases: Array<{
47
55
  name: string;
48
56
  alias: string;
49
57
  }>;
58
+ /** The `.filter()` predicate of a `.filter().map()` loop, or `null` without one. */
59
+ filter: LoopFilterPlan | null;
60
+ /**
61
+ * The for-target of an array iteration: the param itself, or the synthetic
62
+ * `__bf_item` when the param is not the item (a `.keys()` iteration, whose
63
+ * param is the index, or a lowered destructure, whose bindings read off it).
64
+ */
65
+ itemVar: string;
66
+ /**
67
+ * The name a local binds to the row's 0-based index in an array iteration:
68
+ * a `.keys()` iteration's param, else the explicit index param. `null` for
69
+ * an object iteration, whose key the header binds.
70
+ */
71
+ indexLocal: string | null;
72
+ /** One local per binding of a lowered destructure, in pattern order. */
73
+ destructureLocals: Array<{
74
+ name: string;
75
+ value: DestructureValue;
76
+ }>;
77
+ }
78
+ /**
79
+ * What a lowered destructure binding reads off the row item: the value at
80
+ * `segments`, or for a rest binding the residual of the value there (the
81
+ * array from `from` on, or the object without the `exclude` keys).
82
+ */
83
+ export type DestructureValue = {
84
+ kind: 'path';
85
+ segments: readonly LoopBindingPathSegment[];
86
+ } | {
87
+ kind: 'slice';
88
+ segments: readonly LoopBindingPathSegment[];
89
+ from: number;
90
+ } | {
91
+ kind: 'omit';
92
+ segments: readonly LoopBindingPathSegment[];
93
+ exclude: readonly string[];
94
+ };
95
+ /** An adapter's spelling of a {@link DestructureValue}. */
96
+ export interface DestructureSpelling {
97
+ /** The value at `segments` off `item`. */
98
+ accessor(item: string, segments: readonly LoopBindingPathSegment[]): string;
99
+ /** The array `parent` from index `from` on. */
100
+ slice(parent: string, from: number): string;
101
+ /** The object `parent` without the `keys`. */
102
+ omit(parent: string, keys: readonly string[]): string;
103
+ }
104
+ /** Spell each destructure local's value off the row item `item`. */
105
+ export declare function spellDestructureLocals(plan: Pick<LoopPlan<unknown>, 'destructureLocals'>, item: string, spelling: DestructureSpelling): Array<{
106
+ name: string;
107
+ value: string;
108
+ }>;
109
+ /** An adapter's spelling of a {@link SortPlan} over the loop source. */
110
+ export interface LoopSortSpelling {
111
+ /** A captured name's SSR value, for the evaluator's env. */
112
+ emit(e: ParsedExpr): string;
113
+ /** The evaluator call. */
114
+ eval: CallbackEvalSpelling;
115
+ /** The structured `bf.sort` call over `recv` with the `{keys: …}` descriptor. */
116
+ structured(recv: string, comparator: SortComparator): string;
117
+ /** Record the refusal of a comparator neither form models (BF101). */
118
+ refuse(message: string, suggestion: string): void;
119
+ }
120
+ /**
121
+ * The loop source `recv` sorted by the loop's comparator, or `recv` itself
122
+ * without one. A refused comparator is recorded and leaves `recv` unsorted,
123
+ * so the template stays valid.
124
+ */
125
+ export declare function spellSortedSource(sort: SortPlan | null, recv: string, spelling: LoopSortSpelling): string;
126
+ /**
127
+ * The names a loop's for-header binds: the key and the value of an
128
+ * `entries` object iteration, the param of a `keys` / `values` one, and the
129
+ * item var of an array iteration when it is the param itself. A backend
130
+ * whose for-header scopes its targets to the loop passes these to
131
+ * {@link savedLoopBindings} as names it restores itself.
132
+ */
133
+ export declare function loopHeaderTargets(loop: IRLoop, plan: Pick<LoopPlan<unknown>, 'itemVar'>): string[];
134
+ /** Where a loop row sits, for {@link savedLoopBindings}. */
135
+ export interface LoopRowScopes {
136
+ /** The scope outside the loop. */
137
+ outside: BindingScope;
138
+ /** `outside.enterLoopRow(loop)`. */
139
+ row: BindingScope;
140
+ /** The template-level names: signals, memos, props and constants. */
141
+ templateLevelNames: ReadonlySet<string>;
142
+ }
143
+ /** A row binding a loop saves before its header and restores after its end. */
144
+ export interface SavedLoopBinding {
145
+ name: string;
146
+ /** The template variable that holds the outer value across the loop. */
147
+ temporary: string;
148
+ }
149
+ /**
150
+ * The row bindings a backend whose `set` is not loop-scoped (Pebble, Twig,
151
+ * Blade) saves before the loop and restores after it (#3386, #3391): each
152
+ * name the row binds that already means something outside it, an enclosing
153
+ * row's binding or a template-level name. JS scopes the callback's bindings
154
+ * to the row; without the restore the last row's value leaks past the loop.
155
+ * They come in the order a row binds them in a template: the for-header's
156
+ * item, the index local, each destructure local, each preamble local.
157
+ *
158
+ * `skip` names the bindings the backend restores itself: those its
159
+ * for-header scopes to the loop ({@link loopHeaderTargets}), or a root prop
160
+ * it restores through its alias. `temporary` spells the holder of the
161
+ * `ordinal`-th saved name; a holder that collides with a row binding or a
162
+ * template-level name gets `_` appended until it does not.
163
+ */
164
+ export declare function savedLoopBindings(scopes: LoopRowScopes, skip: Iterable<string>, temporary: (name: string, ordinal: number) => string): SavedLoopBinding[];
165
+ /**
166
+ * The `.filter()` predicate a `.filter().map()` loop tests on each row: the
167
+ * predicate with the names it reads renamed for the row, or the refusal of a
168
+ * filter whose predicate never reached the IR (BF101, #3534).
169
+ */
170
+ export type LoopFilterPlan = LoopFilterPredicate | {
171
+ kind: 'refuse';
172
+ message: string;
173
+ suggestion: string;
174
+ };
175
+ export interface LoopFilterPredicate {
176
+ kind: 'predicate';
177
+ /** The filter callback's own param. */
178
+ param: string;
179
+ /** The predicate as written. */
180
+ predicate: ParsedExpr;
181
+ /**
182
+ * The predicate with each capture a row binding would shadow renamed to
183
+ * its alias (`captureAliases`), for an emitter that maps the filter param
184
+ * itself (#3402).
185
+ */
186
+ captured: ParsedExpr;
187
+ /**
188
+ * `captured` with the filter param renamed to the loop param too: the
189
+ * predicate read off the row item. The tree is renamed, not the rendered
190
+ * text, so a string literal or a property key of the same spelling stays
191
+ * (#3404).
192
+ */
193
+ onRow: ParsedExpr;
194
+ /** Each capture alias and the enclosing name it keeps, for the scope the predicate renders under. */
195
+ aliases: ReadonlyMap<string, string>;
196
+ }
197
+ /** An adapter's spelling of a {@link LoopFilterPlan}. */
198
+ export interface LoopFilterSpelling {
199
+ /** The row's condition for a predicate. */
200
+ condition(filter: LoopFilterPredicate): string;
201
+ /** Record the refusal of a filter without a predicate. */
202
+ refuse(message: string, suggestion: string): void;
203
+ /** The condition that stands in for a refused predicate, so the template stays valid. */
204
+ refused: string;
205
+ /** The guard's opening line. */
206
+ open(condition: string): string;
207
+ /** The guard's closing line. */
208
+ close: string;
50
209
  }
210
+ /**
211
+ * The lines of a loop row: `row` itself, or with a filter `row` inside the
212
+ * guard on the filter's condition.
213
+ */
214
+ export declare function spellFilteredRow(filter: LoopFilterPlan | null, row: readonly string[], spelling: LoopFilterSpelling): string[];
51
215
  /** Plan a loop against the scope outside it. */
52
216
  export declare function planLoop<Spelled>(loop: IRLoop, ctx: LoopPlanContext<Spelled>): LoopPlan<Spelled>;
53
217
  //# sourceMappingURL=loop-plan.d.ts.map
@@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,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAA;AAE1G,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,WAAW,CAAA;IACjB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,gCAAgC;IAChC,SAAS,EAAE,UAAU,CAAA;IACrB;;;;OAIG;IACH,QAAQ,EAAE,UAAU,CAAA;IACpB;;;;;OAKG;IACH,KAAK,EAAE,UAAU,CAAA;IACjB,qGAAqG;IACrG,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACrC;AAED,yDAAyD;AACzD,MAAM,WAAW,kBAAkB;IACjC,2CAA2C;IAC3C,SAAS,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM,CAAA;IAC9C,0DAA0D;IAC1D,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACjD,yFAAyF;IACzF,OAAO,EAAE,MAAM,CAAA;IACf,gCAAgC;IAChC,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,EAAE,GAAG,EAAE,SAAS,MAAM,EAAE,EAAE,QAAQ,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAG9H;AA6BD,gDAAgD;AAChD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAkBhG"}
@@ -144,13 +144,17 @@ export declare function isStringConcatBinary(op: string, left: ParsedExpr, right
144
144
  export declare function isNumericArithmeticResult(expr: ParsedExpr | null | undefined, isStringName: (n: string, componentProperty?: boolean) => boolean): boolean;
145
145
  /** A runtime helper of the template-helper catalogue (`spec/template-helpers.md`)
146
146
  * that a binary arithmetic operator lowers to. */
147
- export type ArithmeticHelper = 'mod';
147
+ export type ArithmeticHelper = 'mod' | 'div';
148
148
  /**
149
149
  * The runtime helper a JS binary arithmetic operator lowers to on every
150
150
  * template backend, or `null` when the backend spells the operator itself
151
151
  * (#3474). The adapter only spells the call, in its own syntax
152
- * (`bf.mod(a, b)`, `$bf->mod(a, b)`, `bf_mod a b`), over operands already
153
- * coerced (`arithmeticOperandCoercion`) and grouped ({@link groupBinaryOperand}).
152
+ * (`bf.mod(a, b)`, `$bf->mod(a, b)`, `bf_mod a b`), and the helper's name
153
+ * where its runtime names it differently (Perl's `divide`), over operands
154
+ * already coerced (`arithmeticOperandCoercion`) and grouped
155
+ * ({@link groupBinaryOperand}). Where the adapter leaves the `null`
156
+ * coercion unspelled because the engine's native operator reads nil as `0`
157
+ * (PHP, Perl), the helper reads nil as `0` too.
154
158
  *
155
159
  * `%` is JS's truncated remainder: the result takes the dividend's sign
156
160
  * (`-7 % 2` is `-1`, `7 % -2` is `1`), keeps a fraction (`7.5 % 2` is `1.5`),
@@ -159,6 +163,11 @@ export type ArithmeticHelper = 'mod';
159
163
  * quotient (`-7 % 2` is `1`), MiniJinja takes the Euclidean remainder, PHP,
160
164
  * Perl and Kolon convert the operands to integers first (`NaN % 2` is `0`),
161
165
  * and an integer zero divisor raises in Java, PHP and MiniJinja (#3574).
166
+ *
167
+ * `/` is IEEE division: the quotient keeps its fraction (`7 / 2` is `3.5`),
168
+ * and a zero divisor gives an infinity signed by both operands (`1 / -0` is
169
+ * `-Infinity`) or `NaN` (`0 / 0`). Ruby's `/` on two integers truncates, and
170
+ * Python's and PHP's raise on a zero divisor.
162
171
  */
163
172
  export declare function arithmeticHelper(op: string): ArithmeticHelper | null;
164
173
  /**
@@ -206,6 +215,14 @@ export declare function groupUnaryOperand(operand: ParsedExpr, emitted: string):
206
215
  export declare function groupObjectLiteralSegments(properties: readonly ObjectLiteralProperty[], literalOf: (run: ReadonlyArray<Extract<ObjectLiteralProperty, {
207
216
  kind: 'prop';
208
217
  }>>) => string, emit: (e: ParsedExpr) => string): string[];
218
+ /**
219
+ * The receiver of a zero-arg, non-optional `recv.toString()` call, which
220
+ * stringifies as `String(recv)` does; `null` for any other expression. A
221
+ * radix argument (`n.toString(16)`) and an optional call (`x?.toString()`,
222
+ * `undefined` for a nullish receiver where `String` gives `'undefined'`)
223
+ * are not this shape.
224
+ */
225
+ export declare function asToStringCall(expr: ParsedExpr): ParsedExpr | null;
209
226
  /**
210
227
  * Single point of dispatch from `ParsedExpr.kind` to the adapter's
211
228
  * method. Adapters call this once at their entry point; the recursion
@@ -1 +1 @@
1
- {"version":3,"file":"parsed-expr-emitter.d.ts","sourceRoot":"","sources":["../../src/adapters/parsed-expr-emitter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAEzG,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAE5E,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,eAAe,CAAA;AAEjH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,UAAU,GACV,SAAS,GACT,aAAa,GACb,IAAI,GACJ,QAAQ,GACR,OAAO,GACP,SAAS,GACT,YAAY,GACZ,aAAa,GACb,aAAa,GACb,MAAM,GACN,WAAW,GACX,SAAS,GACT,SAAS,GACT,OAAO,GACP,YAAY,GACZ,UAAU,GACV,SAAS,GACT,YAAY,GACZ,QAAQ,GACR,UAAU,GACV,QAAQ,CAAA;AAEZ;;;;;GAKG;AACH,MAAM,MAAM,UAAU,G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,EACd,aAAa,UAAQ,GACpB,sBAAsB,GAAG,IAAI,CA+J/B;AAsGD;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,EAAE,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;AAo2CD;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA6B3F;AAmZD,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"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Whether an identifier is WRITTEN by the expression that contains it.
3
+ *
4
+ * Every substitution the compiler performs over a parsed expression (a
5
+ * destructured prop's live read `_p.x ?? d`, a constant's inlined value, a
6
+ * signal's initial value in the client template) replaces a READ of a
7
+ * binding with an expression that produces its value. A write position
8
+ * cannot take that replacement: `++nextId` becomes `++(0)` and `start += 1`
9
+ * becomes `(_p.start ?? 0) += 1`, both a SyntaxError that breaks the whole
10
+ * client module. The substitution walks ask this predicate first and leave
11
+ * a written identifier alone; the caller then decides what a write to the
12
+ * binding means in its scope (a local in the init body, a template slot
13
+ * left to init).
14
+ *
15
+ * Needs a tree built with parent pointers (`setParentNodes`).
16
+ */
17
+ import ts from 'typescript';
18
+ /**
19
+ * True when `id` is the target of an assignment (`x = …`, `x += …`), an
20
+ * update (`++x`, `x--`), a destructuring assignment (`[x, y] = …`,
21
+ * `({ x } = …)`, `[x = 1] = …`) or a `for (x of …)` / `for (x in …)` head.
22
+ * A member write (`x.a = 1`, `x[i]++`) writes the object, not the binding,
23
+ * so `x` there is a read.
24
+ */
25
+ export declare function isAssignmentTargetIdentifier(id: ts.Identifier): boolean;
26
+ //# sourceMappingURL=assignment-target.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assignment-target.d.ts","sourceRoot":"","sources":["../src/assignment-target.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,MAAM,YAAY,CAAA;AAgC3B;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,EAAE,CAAC,UAAU,GAAG,OAAO,CAsBvE"}
@@ -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;IACn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