@barefootjs/go-template 0.18.4 → 0.18.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.
- package/dist/adapter/analysis/static-child-loop-bake.d.ts +61 -0
- package/dist/adapter/analysis/static-child-loop-bake.d.ts.map +1 -0
- package/dist/adapter/analysis/static-element-loop-bake.d.ts +83 -0
- package/dist/adapter/analysis/static-element-loop-bake.d.ts.map +1 -0
- package/dist/adapter/go-template-adapter.d.ts +151 -3
- package/dist/adapter/go-template-adapter.d.ts.map +1 -1
- package/dist/adapter/index.js +500 -52
- package/dist/adapter/lib/compile-state.d.ts +15 -0
- package/dist/adapter/lib/compile-state.d.ts.map +1 -1
- package/dist/adapter/lib/constants.d.ts.map +1 -1
- package/dist/adapter/memo/memo-compute.d.ts.map +1 -1
- package/dist/adapter/props/prop-classes.d.ts +40 -0
- package/dist/adapter/props/prop-classes.d.ts.map +1 -0
- package/dist/adapter/props/prop-types.d.ts.map +1 -1
- package/dist/adapter/type/type-codegen.d.ts +5 -1
- package/dist/adapter/type/type-codegen.d.ts.map +1 -1
- package/dist/adapter/value/value-lowering.d.ts.map +1 -1
- package/dist/build.js +500 -52
- package/dist/conformance-pins.d.ts.map +1 -1
- package/dist/index.js +503 -79
- package/dist/render-divergences.d.ts.map +1 -1
- package/dist/test-render.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/go-template-adapter.test.ts +708 -4
- package/src/adapter/analysis/static-child-loop-bake.ts +119 -0
- package/src/adapter/analysis/static-element-loop-bake.ts +211 -0
- package/src/adapter/go-template-adapter.ts +661 -34
- package/src/adapter/lib/compile-state.ts +17 -0
- package/src/adapter/lib/constants.ts +1 -0
- package/src/adapter/memo/memo-compute.ts +37 -9
- package/src/adapter/props/prop-classes.ts +70 -0
- package/src/adapter/props/prop-types.ts +69 -1
- package/src/adapter/type/type-codegen.ts +19 -2
- package/src/adapter/value/value-lowering.ts +27 -2
- package/src/conformance-pins.ts +30 -36
- package/src/render-divergences.ts +12 -30
- package/src/test-render.ts +131 -13
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compile-time baking for a static-array `.map()` loop whose body is a
|
|
3
|
+
* single child component with a plain-value (non-JSX) prop set (#2208).
|
|
4
|
+
*
|
|
5
|
+
* `NewXxxProps`'s existing `staticWithoutBody` path (see
|
|
6
|
+
* `go-template-adapter.ts`'s `generateNewPropsFunction`) populates a static
|
|
7
|
+
* loop's child slices from `in.<Name>s` — data the CALLER (handler) must
|
|
8
|
+
* supply. When the loop's array source is itself a fully-static literal
|
|
9
|
+
* (`const items = [{ label: 'Alpha' }, ...]`, #2208), there is no caller
|
|
10
|
+
* input to wait for: every per-item prop value is already known at compile
|
|
11
|
+
* time. `analyzeBakeableStaticChildLoop` resolves that data — the resolved
|
|
12
|
+
* Go literal for each item's input fields, plus its `data-key` — so the
|
|
13
|
+
* constructor can emit `New<Name>Props(<Name>Input{ Field: "value", ... })`
|
|
14
|
+
* directly per item instead of ranging over `in.<Name>s`.
|
|
15
|
+
*
|
|
16
|
+
* Deliberately narrow: only scalar (string/number/boolean) prop values are
|
|
17
|
+
* baked. Anything else (an unresolvable expression, a destructured loop
|
|
18
|
+
* param, a JSX-valued prop) returns `null` so the caller keeps the existing
|
|
19
|
+
* `in.<Name>s`-driven path (or BF101 refusal) unchanged.
|
|
20
|
+
*/
|
|
21
|
+
import { type ConstantInfo, type IRProp, type ParsedExpr } from '@barefootjs/jsx';
|
|
22
|
+
export interface BakedStaticChildItem {
|
|
23
|
+
inputFields: Array<{
|
|
24
|
+
goField: string;
|
|
25
|
+
goValue: string;
|
|
26
|
+
}>;
|
|
27
|
+
dataKey: string | null;
|
|
28
|
+
}
|
|
29
|
+
export interface BakedStaticChildLoop {
|
|
30
|
+
items: BakedStaticChildItem[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Render a compile-time-known JS scalar as a Go template literal (a quoted
|
|
34
|
+
* string / bare number / `true`/`false`), or `null` for anything else
|
|
35
|
+
* (object, array, `null`, `undefined`) — those have no bare-literal Go
|
|
36
|
+
* template form at this layer. Exported for reuse by
|
|
37
|
+
* `static-element-loop-bake.ts` (#2224), which bakes item field values into
|
|
38
|
+
* a plain-element loop body's text/attr positions the same way this module
|
|
39
|
+
* bakes them into a child component's `Input{...}` constructor call.
|
|
40
|
+
*/
|
|
41
|
+
export declare function scalarToGoLiteral(value: unknown): string | null;
|
|
42
|
+
/**
|
|
43
|
+
* Analyze one nested static child-component loop for bakeability. `props`
|
|
44
|
+
* are the child's JSX attrs (`IRLoopChildComponent.props`); `loopArrayParsed`
|
|
45
|
+
* / `loopParam` / `loopKey` come from the same `NestedComponentInfo` the
|
|
46
|
+
* caller already carries. Returns `null` when the shape isn't (yet)
|
|
47
|
+
* bakeable — the caller falls back to its existing behavior unchanged.
|
|
48
|
+
*/
|
|
49
|
+
export declare function analyzeBakeableStaticChildLoop(nested: {
|
|
50
|
+
props: ReadonlyArray<{
|
|
51
|
+
name: string;
|
|
52
|
+
value: IRProp['value'];
|
|
53
|
+
isEventHandler: boolean;
|
|
54
|
+
}>;
|
|
55
|
+
loopArrayParsed?: ParsedExpr;
|
|
56
|
+
loopParam?: string;
|
|
57
|
+
loopKey?: string;
|
|
58
|
+
}, localConstants: ReadonlyArray<ConstantInfo>, opts?: {
|
|
59
|
+
isNameShadowed?: (name: string) => boolean;
|
|
60
|
+
}): BakedStaticChildLoop | null;
|
|
61
|
+
//# sourceMappingURL=static-child-loop-bake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-child-loop-bake.d.ts","sourceRoot":"","sources":["../../../src/adapter/analysis/static-child-loop-bake.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAmE,KAAK,YAAY,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAIlJ,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACxD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,oBAAoB,EAAE,CAAA;CAC9B;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAK/D;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE;IACN,KAAK,EAAE,aAAa,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAAC,cAAc,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;IACvF,eAAe,CAAC,EAAE,UAAU,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,EACD,cAAc,EAAE,aAAa,CAAC,YAAY,CAAC,EAC3C,IAAI,CAAC,EAAE;IAAE,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;CAAE,GACpD,oBAAoB,GAAG,IAAI,CAgC7B"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compile-time UNROLL for a static-array `.map()` loop whose body is a
|
|
3
|
+
* PLAIN ELEMENT TREE (no child component) — go-only follow-up to #2208
|
|
4
|
+
* (#2224 shape 1). `html/template` has no slice/map literal syntax, so
|
|
5
|
+
* unlike the other 7 template adapters (which splice a serialized literal
|
|
6
|
+
* straight into the loop header — #2208), Go can't bind a compile-time-only
|
|
7
|
+
* array as a `{{range}}` source at all. Rather than synthesizing a Go struct
|
|
8
|
+
* type for the item shape (a materially bigger lift — see the #2224 issue
|
|
9
|
+
* body's "suggested fix direction"), this module verifies the loop body is
|
|
10
|
+
* fully foldable against every item and lets the caller
|
|
11
|
+
* (`go-template-adapter.ts`'s `renderLoop`) render the body once PER ITEM
|
|
12
|
+
* with every item-derived value substituted as a compile-time-known Go
|
|
13
|
+
* literal — no `{{range}}`, no struct, no field lookup, so no hidden runtime
|
|
14
|
+
* failure mode either (`html/template` resolves struct fields at EXECUTE
|
|
15
|
+
* time, not Go compile time).
|
|
16
|
+
*
|
|
17
|
+
* ACCEPTANCE CRITERIA — `analyzeBakeableStaticElementLoop` returns `null`
|
|
18
|
+
* (caller keeps today's BF101 refusal) unless ALL of the following hold:
|
|
19
|
+
*
|
|
20
|
+
* - The loop has no child component (that shape is #2208's own baking
|
|
21
|
+
* path — `analyzeBakeableStaticChildLoop`).
|
|
22
|
+
* - Not a `.flatMap()` (`method: 'flatMap'` / `flatMapCallback` set) — an
|
|
23
|
+
* item can fold to 0+ elements there, and a complex callback carries its
|
|
24
|
+
* body out-of-band rather than in `children`; out of scope.
|
|
25
|
+
* - The loop array resolves via `resolveStaticLoopSource` (a fully-static
|
|
26
|
+
* array literal, inline or a named function-scope const;
|
|
27
|
+
* `isNameShadowed`-checked — the SAME resolution #2208 already trusts
|
|
28
|
+
* for the child-component shape).
|
|
29
|
+
* - The callback param is a simple identifier (no array/object destructure
|
|
30
|
+
* pattern).
|
|
31
|
+
* - The callback does NOT bind an index parameter (`.map((item, i) =>
|
|
32
|
+
* ...)`, or `.entries()`/`.keys()`/`Object.entries()`-style pre-map
|
|
33
|
+
* iteration) — deliberately excluded from the evaluator surface even
|
|
34
|
+
* though the index value is technically knowable at unroll time, to
|
|
35
|
+
* keep the per-item binding set identical to #2208's (item-only).
|
|
36
|
+
* - No `.filter()` / `.sort()` chained onto the `.map()` — out of scope.
|
|
37
|
+
* - The body is neither multi-root (`bodyIsMultiRoot`) nor a whole-item
|
|
38
|
+
* conditional (`bodyIsItemConditional`) — those need anchor-marker
|
|
39
|
+
* machinery this pass doesn't attempt to reproduce per item.
|
|
40
|
+
* - Every node anywhere in the body's IR tree is an `element`, `text`, or
|
|
41
|
+
* `expression` — a nested `loop`, `conditional`, `component`, `slot`,
|
|
42
|
+
* `fragment`, `if-statement`, `provider`, or `async` bails the WHOLE
|
|
43
|
+
* loop (no partial unroll; a loud refusal beats silently wrong output).
|
|
44
|
+
* - Every element attribute is `literal` / `boolean-attr` /
|
|
45
|
+
* `boolean-shorthand`, or a plain `expression` whose parsed kind is one
|
|
46
|
+
* of `identifier` / `member` / `index-access` / `literal`. An attribute
|
|
47
|
+
* `template-literal` or `conditional` bypasses the Go adapter's normal
|
|
48
|
+
* `convertExpressionToGo` emission path in its own attribute emitter
|
|
49
|
+
* (it calls `renderParsedExpr` directly and splices the result assuming
|
|
50
|
+
* adapter-specific self-wrapping conventions) — baking those would need
|
|
51
|
+
* separate handling, deferred. `spread` / `jsx-children` attrs bail.
|
|
52
|
+
* - Every dynamic text `expression` node (any parsed kind, INCLUDING
|
|
53
|
+
* `template-literal` — text always funnels through
|
|
54
|
+
* `convertExpressionToGo` uniformly, no bypass) resolves via
|
|
55
|
+
* `evaluateStaticLiteral(expr.parsed, itemBindings)` to a scalar
|
|
56
|
+
* (string/number/boolean) for EVERY item. A signal/memo call, a
|
|
57
|
+
* reference to any non-item-static local (props, outer consts, an
|
|
58
|
+
* enclosing loop's own param), an unresolvable nested method chain, or
|
|
59
|
+
* a non-scalar (array/object) result bails the whole loop.
|
|
60
|
+
*
|
|
61
|
+
* Analysis only (mirrors `static-child-loop-bake.ts`): this module never
|
|
62
|
+
* emits Go syntax. `go-template-adapter.ts`'s `renderLoop` re-runs the SAME
|
|
63
|
+
* `evaluateStaticLiteral` call per item through its own
|
|
64
|
+
* `convertExpressionToGo` override once this analysis has cleared the whole
|
|
65
|
+
* loop, so the two passes can never disagree — this pass is pure validation,
|
|
66
|
+
* with no adapter-state side effects to roll back if it can't clear a loop.
|
|
67
|
+
*/
|
|
68
|
+
import { type ConstantInfo, type IRLoop } from '@barefootjs/jsx';
|
|
69
|
+
export interface BakedStaticElementLoop {
|
|
70
|
+
items: unknown[];
|
|
71
|
+
}
|
|
72
|
+
type LoopShape = Pick<IRLoop, 'childComponent' | 'param' | 'index' | 'arrayParsed' | 'children' | 'filterPredicate' | 'sortComparator' | 'bodyIsMultiRoot' | 'bodyIsItemConditional' | 'paramBindings' | 'iterationShape' | 'objectIteration' | 'method' | 'flatMapCallback'>;
|
|
73
|
+
/**
|
|
74
|
+
* Analyze a `.map()` loop with a plain-element (non-component) body for
|
|
75
|
+
* static unrolling. Returns the resolved item values (ready for the caller
|
|
76
|
+
* to render the body once per item) or `null` when the shape isn't (yet)
|
|
77
|
+
* bakeable this way — see the acceptance criteria in the module docstring.
|
|
78
|
+
*/
|
|
79
|
+
export declare function analyzeBakeableStaticElementLoop(loop: LoopShape, localConstants: ReadonlyArray<ConstantInfo>, opts?: {
|
|
80
|
+
isNameShadowed?: (name: string) => boolean;
|
|
81
|
+
}): BakedStaticElementLoop | null;
|
|
82
|
+
export {};
|
|
83
|
+
//# sourceMappingURL=static-element-loop-bake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-element-loop-bake.d.ts","sourceRoot":"","sources":["../../../src/adapter/analysis/static-element-loop-bake.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AAEH,OAAO,EAGL,KAAK,YAAY,EAEjB,KAAK,MAAM,EAGZ,MAAM,iBAAiB,CAAA;AAGxB,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,OAAO,EAAE,CAAA;CACjB;AASD,KAAK,SAAS,GAAG,IAAI,CACnB,MAAM,EACJ,gBAAgB,GAChB,OAAO,GACP,OAAO,GACP,aAAa,GACb,UAAU,GACV,iBAAiB,GACjB,gBAAgB,GAChB,iBAAiB,GACjB,uBAAuB,GACvB,eAAe,GACf,gBAAgB,GAChB,iBAAiB,GACjB,QAAQ,GACR,iBAAiB,CACpB,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,SAAS,EACf,cAAc,EAAE,aAAa,CAAC,YAAY,CAAC,EAC3C,IAAI,CAAC,EAAE;IAAE,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;CAAE,GACpD,sBAAsB,GAAG,IAAI,CAuB/B"}
|
|
@@ -41,7 +41,32 @@ export declare class GoTemplateAdapter extends BaseAdapter implements ParsedExpr
|
|
|
41
41
|
/** Diagnostics from the current compile (backed by `CompileState`); `generate()` also merges these into `ir.errors`. */
|
|
42
42
|
get errors(): CompilerError[];
|
|
43
43
|
private inLoop;
|
|
44
|
+
/**
|
|
45
|
+
* Memoized `analyzeBakeableStaticChildLoop` result per loop marker id
|
|
46
|
+
* (#2208). Consulted from three sites that all need the SAME verdict for
|
|
47
|
+
* the SAME loop — the `renderLoop` gate, the Input struct's field list,
|
|
48
|
+
* and the constructor's per-item construction. `renderLoop`'s gate runs
|
|
49
|
+
* during `generate()`'s render pass; the other two run during
|
|
50
|
+
* `generateTypes()`'s constructor-generation pass, which `generate()`
|
|
51
|
+
* also invokes internally partway through — so this cache is reset (in
|
|
52
|
+
* `primeCompileState`, not here) between those two passes too. Agreement
|
|
53
|
+
* across all three sites is therefore guaranteed by `analyzeBakeable-
|
|
54
|
+
* StaticChildLoop` being a deterministic pure function of the (re-primed)
|
|
55
|
+
* per-compile state, not by one shared memo spanning every read; the
|
|
56
|
+
* cache's value is avoiding redundant recomputation WITHIN the pass that
|
|
57
|
+
* populated it, not correctness across passes.
|
|
58
|
+
*/
|
|
59
|
+
private bakedStaticChildLoopCache;
|
|
44
60
|
private loopParamStack;
|
|
61
|
+
/**
|
|
62
|
+
* Stack of `IRLoop.depth` values (innermost last), pushed/popped around
|
|
63
|
+
* `renderChildren(loop.children)` in `renderLoop`. `renderAttributes`
|
|
64
|
+
* reads the top of this stack to derive the `key` → `data-key`/
|
|
65
|
+
* `data-key-N` suffix — the depth is IR-computed (jsx-to-ir.ts), not
|
|
66
|
+
* re-derived here; this stack only threads that value down to the
|
|
67
|
+
* loop body's root element (#2168 nested-loop-outer-binding).
|
|
68
|
+
*/
|
|
69
|
+
private loopKeyDepthStack;
|
|
45
70
|
/**
|
|
46
71
|
* Per-loop: true when the body renders the bare range value (scalar-item
|
|
47
72
|
* inline-literal loop), so the `bf_tmpl` companion is fed `.BfLoopItem` (the
|
|
@@ -78,6 +103,30 @@ export declare class GoTemplateAdapter extends BaseAdapter implements ParsedExpr
|
|
|
78
103
|
* alone (#2087 Phase B).
|
|
79
104
|
*/
|
|
80
105
|
private loopRestExcludeStack;
|
|
106
|
+
/**
|
|
107
|
+
* Active per-item static bindings for a #2224 unrolled plain-element loop
|
|
108
|
+
* (`renderUnrolledStaticElementLoop`) — innermost last, so a nested static
|
|
109
|
+
* unroll inside another one resolves against its own item, not an outer
|
|
110
|
+
* one's. When non-empty, `convertExpressionToGo`'s top-of-function check
|
|
111
|
+
* resolves EVERY expression against the innermost entry's item via
|
|
112
|
+
* `evaluateStaticLiteral` and returns a literal Go value instead of
|
|
113
|
+
* descending into the normal `.Field`-style dot-context lowering — there
|
|
114
|
+
* is no real `{{range}}` establishing that context during an unroll, so
|
|
115
|
+
* `identifier()`'s `currentLoopParam → '.'` branch would otherwise resolve
|
|
116
|
+
* against the WRONG (enclosing) dot context. `analyzeBakeableStaticElementLoop`
|
|
117
|
+
* has already verified every expression in the body resolves this way for
|
|
118
|
+
* every item, so the fallback failure branch below is a defensive
|
|
119
|
+
* invariant check, not a real code path.
|
|
120
|
+
*/
|
|
121
|
+
private staticLoopItemStack;
|
|
122
|
+
/**
|
|
123
|
+
* Set by the `convertExpressionToGo` override above when a
|
|
124
|
+
* `staticLoopItemStack` entry is active but the current expression fails
|
|
125
|
+
* to resolve against it — should never happen (see that check's comment),
|
|
126
|
+
* but `renderUnrolledStaticElementLoop` asserts this stays `false` after
|
|
127
|
+
* every item render rather than silently shipping a `""` sentinel.
|
|
128
|
+
*/
|
|
129
|
+
private staticLoopBakeFailed;
|
|
81
130
|
/**
|
|
82
131
|
* Cross-component child shapes, keyed by child component name. Populated via
|
|
83
132
|
* `registerChildComponentShape` before the parent's `generateTypes`, so the
|
|
@@ -357,6 +406,13 @@ export declare class GoTemplateAdapter extends BaseAdapter implements ParsedExpr
|
|
|
357
406
|
emitProvider(node: IRProvider, _ctx: GoRenderCtx, _emit: EmitIRNode<GoRenderCtx>): string;
|
|
358
407
|
emitAsync(node: IRAsync, _ctx: GoRenderCtx, _emit: EmitIRNode<GoRenderCtx>): string;
|
|
359
408
|
renderElement(element: IRElement): string;
|
|
409
|
+
/**
|
|
410
|
+
* `dangerouslySetInnerHTML={{ __html: '...' }}` (#2207) — see the Blade
|
|
411
|
+
* adapter's identical helper for the full rationale. `null` means the
|
|
412
|
+
* attribute is absent (caller falls through to normal `renderChildren`);
|
|
413
|
+
* a non-`null` string (possibly `''`) replaces the children outright.
|
|
414
|
+
*/
|
|
415
|
+
private renderDangerousInnerHtml;
|
|
360
416
|
renderExpression(expr: IRExpression): string;
|
|
361
417
|
/**
|
|
362
418
|
* Whether a lowered Go string already carries its own `{{...}}` actions and so
|
|
@@ -455,9 +511,34 @@ export declare class GoTemplateAdapter extends BaseAdapter implements ParsedExpr
|
|
|
455
511
|
private resolveModuleNumericConst;
|
|
456
512
|
literal(value: string | number | boolean | null, literalType: LiteralType): string;
|
|
457
513
|
call(callee: ParsedExpr, args: ParsedExpr[], emit: (e: ParsedExpr) => string): string;
|
|
458
|
-
member(object: ParsedExpr, property: string, _computed: boolean, emit: (e: ParsedExpr) => string): string;
|
|
514
|
+
member(object: ParsedExpr, property: string, _computed: boolean, optional: boolean, emit: (e: ParsedExpr) => string): string;
|
|
459
515
|
indexAccess(object: ParsedExpr, index: ParsedExpr, emit: (e: ParsedExpr) => string): string;
|
|
460
516
|
binary(op: string, left: ParsedExpr, right: ParsedExpr, emit: (e: ParsedExpr) => string): string;
|
|
517
|
+
/**
|
|
518
|
+
* JS `+` with a string-typed operand is CONCATENATION, not addition — Go's
|
|
519
|
+
* `bf_add` coerces both sides through `toFloat64` (#2168
|
|
520
|
+
* string-concat-plus: `'Hello, ' + name` rendered "0", since a string
|
|
521
|
+
* operand's `toFloat64` is 0). `html/template` has no infix `+` at all, so
|
|
522
|
+
* both directions are a runtime call; route through `bf_concat_str` when
|
|
523
|
+
* either operand is string-typed.
|
|
524
|
+
*
|
|
525
|
+
* Shared by all THREE `case '+':` sites in this file (`binary()` here, the
|
|
526
|
+
* filter-predicate emitter's own `binary` case, and the condition-
|
|
527
|
+
* expression emitter's own `binary` case) — each recurses over its own
|
|
528
|
+
* `ParsedExpr` tree with its own rendered-operand strings, but the
|
|
529
|
+
* string-vs-numeric decision itself must stay identical everywhere so the
|
|
530
|
+
* three never drift out of sync (a Copilot review comment on #2197 flagged
|
|
531
|
+
* exactly this risk when they were three independent inline checks).
|
|
532
|
+
* Callers pass their own `leftExpr`/`rightExpr` (the raw `ParsedExpr` nodes
|
|
533
|
+
* `isStringConcatBinary` inspects) and `leftRendered`/`rightRendered` (the
|
|
534
|
+
* already-emitted, already-wrapped/parenthesised operand text for THIS
|
|
535
|
+
* call site's Go form).
|
|
536
|
+
*/
|
|
537
|
+
private _emitPlus;
|
|
538
|
+
/** Whether `name` (a signal getter or prop) holds a string value — drives
|
|
539
|
+
* `isStringConcatBinary`'s string-vs-numeric `+` decision (#2168
|
|
540
|
+
* string-concat-plus). */
|
|
541
|
+
private _isStringValueName;
|
|
461
542
|
unary(op: string, argument: ParsedExpr, emit: (e: ParsedExpr) => string): string;
|
|
462
543
|
logical(op: '&&' | '||' | '??', left: ParsedExpr, right: ParsedExpr, emit: (e: ParsedExpr) => string): string;
|
|
463
544
|
conditional(test: ParsedExpr, consequent: ParsedExpr, alternate: ParsedExpr, emit: (e: ParsedExpr) => string): string;
|
|
@@ -557,7 +638,12 @@ export declare class GoTemplateAdapter extends BaseAdapter implements ParsedExpr
|
|
|
557
638
|
private renderFilterLengthExpr;
|
|
558
639
|
/**
|
|
559
640
|
* Render a predicate for use in Go template `{{if}}` conditions, substituting
|
|
560
|
-
* the loop parameter (e.g. `t` in `t.done`) with dot notation.
|
|
641
|
+
* the loop parameter (e.g. `t` in `t.done`) with dot notation. `datumField`
|
|
642
|
+
* (#2228) is the wrapper struct's datum-carrying field name (e.g. `"Todo"`)
|
|
643
|
+
* for a loop whose body is a child component — see `wrapperDatumField` — so
|
|
644
|
+
* `t.done` qualifies through it (`.Todo.Done`) instead of the bare `.Done`
|
|
645
|
+
* `html/template` can't resolve on the wrapper Props struct. `undefined` for
|
|
646
|
+
* a non-wrapper (plain-element-body) loop, where `.` already IS the datum.
|
|
561
647
|
*/
|
|
562
648
|
private renderPredicateCondition;
|
|
563
649
|
/** Whether an expression needs parentheses when used in and/or. */
|
|
@@ -574,7 +660,13 @@ export declare class GoTemplateAdapter extends BaseAdapter implements ParsedExpr
|
|
|
574
660
|
* Render a filter predicate expression (`t => !t.done`, or a block body
|
|
575
661
|
* normalized to one — #2040). `localVarMap` is a vestigial empty default kept
|
|
576
662
|
* on the recursion; block-body locals are now inlined upstream, so no caller
|
|
577
|
-
* populates it.
|
|
663
|
+
* populates it. `datumField` (#2228) qualifies a bare `param` reference (and
|
|
664
|
+
* `param.xxx` member/call access) through the wrapper struct's
|
|
665
|
+
* datum-carrying field — see `wrapperDatumField` — for a loop whose `.` is a
|
|
666
|
+
* child-component wrapper Props struct rather than the raw datum itself.
|
|
667
|
+
* `undefined` for every other caller (non-loop `.filter()`/`.find()`/etc.,
|
|
668
|
+
* or a plain-element-body loop), which keeps emitting the bare `.`/`.Field`
|
|
669
|
+
* this method always has.
|
|
578
670
|
*/
|
|
579
671
|
private renderFilterExpr;
|
|
580
672
|
private renderFilterExprNode;
|
|
@@ -607,6 +699,17 @@ export declare class GoTemplateAdapter extends BaseAdapter implements ParsedExpr
|
|
|
607
699
|
private needsParensInGoTemplate;
|
|
608
700
|
/** Convert a JS expression to Go template syntax. */
|
|
609
701
|
private convertExpressionToGo;
|
|
702
|
+
/**
|
|
703
|
+
* Whether `name` at the CURRENT emission position is bound by an enclosing
|
|
704
|
+
* loop callback — its item param (`loopParamStack` top), an outer loop's
|
|
705
|
+
* range variable, a hoisted loop var, or a destructured binding name
|
|
706
|
+
* (`loopBindingStack`, which is the ONLY place destructured callbacks
|
|
707
|
+
* record their names; they push `''` onto `loopParamStack`). Shared by the
|
|
708
|
+
* string-keyed fast paths (#2236, #2242 Copilot review) that resolve raw
|
|
709
|
+
* `jsExpr` text before `identifier()`'s own guards can see it. Mirrors the
|
|
710
|
+
* checks in `resolveModuleStringConst` / `resolveModuleNumericConst`.
|
|
711
|
+
*/
|
|
712
|
+
private isLoopShadowedName;
|
|
610
713
|
/**
|
|
611
714
|
* Resolve `IDENT['key']` / `IDENT["key"]` where `IDENT` is a module-scope
|
|
612
715
|
* object-literal const and the key is a string literal — a compile-time-static
|
|
@@ -666,7 +769,52 @@ export declare class GoTemplateAdapter extends BaseAdapter implements ParsedExpr
|
|
|
666
769
|
/** Innermost-first lookup mirroring `loopBindingStack`'s search in
|
|
667
770
|
* `identifier()`, but over the object-rest exclude-key side table. */
|
|
668
771
|
private lookupRestExclude;
|
|
772
|
+
/**
|
|
773
|
+
* #2228: the Go field name on the wrapper Props struct that carries the
|
|
774
|
+
* loop datum, for a loop whose body IS a child component (`loop.childComponent`,
|
|
775
|
+
* e.g. `.TodoItems` ranging over `TodoItemProps`). `{{range}}`'s dot context
|
|
776
|
+
* for such a loop is the WHOLE wrapper struct (`TodoItemProps{ Todo Todo,
|
|
777
|
+
* OnToggle ..., ... }`), not the raw per-item datum — so a filter predicate
|
|
778
|
+
* (`t => !t.done`) referencing the loop param can't lower `t.done` straight
|
|
779
|
+
* to `.Done` (no such top-level field; `html/template` fails at execute time
|
|
780
|
+
* with `can't evaluate field Done in type TodoItemProps`). The datum lives
|
|
781
|
+
* nested under whichever child prop was PASSED the loop param verbatim
|
|
782
|
+
* (`todo={todo}` → field `Todo`, from `capitalizeFieldName('todo')` — the
|
|
783
|
+
* SAME derivation `generateInputStruct`/`generatePropsStruct` use for every
|
|
784
|
+
* other prop-to-field mapping, so this never invents a field name the
|
|
785
|
+
* generated struct doesn't actually have). Returns `null` for a non-wrapper
|
|
786
|
+
* loop, or when no prop's value is a bare reference to the loop param (the
|
|
787
|
+
* datum isn't forwarded at all — nothing to qualify through).
|
|
788
|
+
*/
|
|
789
|
+
private wrapperDatumField;
|
|
790
|
+
/**
|
|
791
|
+
* Memoized bakeability check for a static-array loop whose body is a
|
|
792
|
+
* single child component (#2208) — see `analyzeBakeableStaticChildLoop`'s
|
|
793
|
+
* docstring. Accepts either an `IRLoop` (the `renderLoop` gate) or a
|
|
794
|
+
* `NestedComponentInfo` (`generateNewPropsFunction`/Input-struct sites) —
|
|
795
|
+
* both carry the same `loopArrayParsed`/`loopParam`/`loopKey`/props data,
|
|
796
|
+
* just under different field names, so this normalizes to one shape and
|
|
797
|
+
* caches by marker id so all three call sites agree.
|
|
798
|
+
*/
|
|
799
|
+
private getBakedStaticChildLoop;
|
|
669
800
|
renderLoop(loop: IRLoop): string;
|
|
801
|
+
/**
|
|
802
|
+
* #2224 shape 1: render a static-array, plain-element-body loop's per-item
|
|
803
|
+
* markup ONCE PER ITEM at template-generation time instead of a Go
|
|
804
|
+
* `{{range}}` — `analyzeBakeableStaticElementLoop` has already verified
|
|
805
|
+
* every expression in `loop.children` resolves against each item. Keeps
|
|
806
|
+
* the SAME `<!--bf-loop:id--> ... <!--/bf-loop:id-->` marker pair a
|
|
807
|
+
* dynamic loop emits (so the CSR-side static `forEach` wiring, compiled by
|
|
808
|
+
* the separate `ir-to-client-js.ts` pass and untouched by this change,
|
|
809
|
+
* still finds the same DOM range), and pushes `loop.param` /
|
|
810
|
+
* `loop.depth` onto the SAME stacks `renderLoop`'s `{{range}}` path uses,
|
|
811
|
+
* so `data-key`/`data-key-N` attribute-name derivation
|
|
812
|
+
* (`renderAttributes`) is unaffected by which path rendered the loop. No
|
|
813
|
+
* `itemMarker` (`loopItemMarker`) call: the analysis gate already refused
|
|
814
|
+
* `bodyIsMultiRoot` / `bodyIsItemConditional` bodies, so it would always
|
|
815
|
+
* return `''` here anyway.
|
|
816
|
+
*/
|
|
817
|
+
private renderUnrolledStaticElementLoop;
|
|
670
818
|
/**
|
|
671
819
|
* Per-item `<!--bf-loop-i-->` / `<!--bf-loop-i:KEY-->` start marker emitted
|
|
672
820
|
* inside a `{{range}}` body. Multi-root Fragment items get the bare anchor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"go-template-adapter.d.ts","sourceRoot":"","sources":["../../src/adapter/go-template-adapter.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAIpE,OAAO,KAAK,EACV,WAAW,EACX,MAAM,EACN,SAAS,EACT,MAAM,EACN,YAAY,EACZ,aAAa,EACb,MAAM,EAEN,WAAW,EACX,UAAU,EACV,MAAM,EAKN,aAAa,EAEb,UAAU,EACV,qBAAqB,EAGrB,SAAS,EACT,YAAY,EACZ,aAAa,EACb,UAAU,EACV,OAAO,EAEP,yBAAyB,EAE1B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAE3B,KAAK,iBAAiB,EAEtB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"go-template-adapter.d.ts","sourceRoot":"","sources":["../../src/adapter/go-template-adapter.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAIpE,OAAO,KAAK,EACV,WAAW,EACX,MAAM,EACN,SAAS,EACT,MAAM,EACN,YAAY,EACZ,aAAa,EACb,MAAM,EAEN,WAAW,EACX,UAAU,EACV,MAAM,EAKN,aAAa,EAEb,UAAU,EACV,qBAAqB,EAGrB,SAAS,EACT,YAAY,EACZ,aAAa,EACb,UAAU,EACV,OAAO,EAEP,yBAAyB,EAE1B,MAAM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