@barefootjs/jsx 0.31.8 → 0.31.10

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 (43) hide show
  1. package/dist/analyzer.d.ts.map +1 -1
  2. package/dist/expression-parser.d.ts +20 -0
  3. package/dist/expression-parser.d.ts.map +1 -1
  4. package/dist/index.js +226 -66
  5. package/dist/ir-to-client-js/collect-elements.d.ts.map +1 -1
  6. package/dist/ir-to-client-js/control-flow/stringify/loop-child-arm.d.ts.map +1 -1
  7. package/dist/ir-to-client-js/control-flow/stringify/loop.d.ts.map +1 -1
  8. package/dist/ir-to-client-js/control-flow/stringify/template-parse.d.ts +66 -38
  9. package/dist/ir-to-client-js/control-flow/stringify/template-parse.d.ts.map +1 -1
  10. package/dist/ir-to-client-js/emit-registration.d.ts.map +1 -1
  11. package/dist/ir-to-client-js/html-template.d.ts +15 -1
  12. package/dist/ir-to-client-js/html-template.d.ts.map +1 -1
  13. package/dist/ir-to-client-js/imports.d.ts +2 -2
  14. package/dist/ir-to-client-js/imports.d.ts.map +1 -1
  15. package/dist/ssr-defaults.d.ts +10 -0
  16. package/dist/ssr-defaults.d.ts.map +1 -1
  17. package/dist/ssr-seed-plan.d.ts.map +1 -1
  18. package/package.json +2 -2
  19. package/src/__tests__/__snapshots__/doc-examples.test.ts.snap +210 -210
  20. package/src/__tests__/aliased-destructured-prop-csr.test.ts +8 -2
  21. package/src/__tests__/csr-template-loop-shadowing.test.ts +5 -2
  22. package/src/__tests__/date-lowering.test.ts +1 -1
  23. package/src/__tests__/env-signal-template-prelude.test.ts +4 -2
  24. package/src/__tests__/inner-loop-mathml-namespace.test.ts +135 -0
  25. package/src/__tests__/markup-prop-brand.test.ts +161 -0
  26. package/src/__tests__/mathml-mapArray-namespace.test.ts +230 -0
  27. package/src/__tests__/props-destructuring.test.ts +40 -3
  28. package/src/__tests__/ssr-defaults.test.ts +230 -0
  29. package/src/__tests__/ssr-seed-plan.test.ts +72 -0
  30. package/src/__tests__/text-slot-escaping.test.ts +21 -12
  31. package/src/analyzer.ts +83 -26
  32. package/src/expression-parser.ts +10 -1
  33. package/src/ir-to-client-js/collect-elements.ts +38 -5
  34. package/src/ir-to-client-js/control-flow/stringify/inner-loop.ts +10 -10
  35. package/src/ir-to-client-js/control-flow/stringify/loop-child-arm.ts +3 -4
  36. package/src/ir-to-client-js/control-flow/stringify/loop.ts +18 -14
  37. package/src/ir-to-client-js/control-flow/stringify/template-parse.ts +142 -78
  38. package/src/ir-to-client-js/emit-registration.ts +5 -1
  39. package/src/ir-to-client-js/html-template.ts +103 -12
  40. package/src/ir-to-client-js/imports.ts +4 -0
  41. package/src/ir-to-client-js/index.ts +6 -1
  42. package/src/ssr-defaults.ts +171 -6
  43. package/src/ssr-seed-plan.ts +82 -2
@@ -1 +1 @@
1
- {"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../../../../src/ir-to-client-js/control-flow/stringify/loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAWH,OAAO,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEpG;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,EAAE,SAAS,mBAAmB,EAAE,EACpC,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,OAAO,CAAC;IAAC,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GAClH,IAAI,CAaN;AAED;;;;;;;;;;GAUG;AAEH;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,CAoBnE;AAYD,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,EAAE,aAAa,EACnB,SAAS,GAAE,MAAa,GACvB,IAAI,CA+KN;AAoDD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,cAAc,GAAG,IAAI,CAkH/E"}
1
+ {"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../../../../src/ir-to-client-js/control-flow/stringify/loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAWH,OAAO,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEpG;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,EAAE,SAAS,mBAAmB,EAAE,EACpC,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,OAAO,CAAC;IAAC,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GAClH,IAAI,CAaN;AAED;;;;;;;;;;GAUG;AAEH;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,CAoBnE;AAYD,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,EAAE,aAAa,EACnB,SAAS,GAAE,MAAa,GACvB,IAAI,CA+KN;AAoDD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,cAAc,GAAG,IAAI,CAsH/E"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Helpers for emitting code that parses a template literal into a DOM
3
- * element clone, while preserving the SVG namespace when the loop body
4
- * root is an SVG element.
3
+ * element clone, while preserving the SVG/MathML namespace when the loop
4
+ * body root is a foreign-content element.
5
5
  *
6
6
  * Background (#135): the standard pattern
7
7
  * `const __tpl = document.createElement('template')`
@@ -14,60 +14,87 @@
14
14
  * Editor block when a new edge `<path>` was appended via mapArray and
15
15
  * never showed up on the canvas.
16
16
  *
17
- * Fix: when the template's root tag is an SVG element, wrap the parsed
18
- * markup in a synthetic `<svg>` so the HTML5 parser walks into SVG
19
- * foreign content and assigns the correct namespace, then descend one
20
- * extra level to get the real root.
17
+ * Fix: when the template's root tag is an SVG (or, #1096, MathML) element,
18
+ * wrap the parsed markup in the matching synthetic namespace root
19
+ * (`<svg>` / `<math>`) so the HTML5 parser walks into foreign content and
20
+ * assigns the correct namespace, then descend one extra level to get the
21
+ * real root. The two namespaces share every byte of this machinery —
22
+ * only the wrap tag name differs — so `detectRootNamespaceWrapTag` and
23
+ * `namespaceWrapForTemplate` below are the single door every emitter
24
+ * (in this file and its consumers) reads the wrap decision through.
21
25
  */
26
+ /** Namespaces whose root tags need the synthetic-wrap parser nudge. */
27
+ export type NamespaceWrapTag = 'svg' | 'math';
22
28
  /**
23
- * Decide whether a template literal needs SVG-context parsing.
24
- * Looks at the first opening tag in the literal. The check is purely
25
- * lexical so that interpolations inside attribute values do not
26
- * confuse it.
29
+ * Decide whether a template literal needs foreign-content (SVG or MathML)
30
+ * parsing, and which. Looks at the first opening tag in the literal. The
31
+ * check is purely lexical so that interpolations inside attribute values
32
+ * do not confuse it.
27
33
  *
28
34
  * Three shapes are recognised:
29
- * 1. Direct element root — `<circle .../>`
35
+ * 1. Direct element root — `<circle .../>` / `<mrow>...</mrow>`
30
36
  * 2. Conditional body (#1088) — `${cond ? `<circle .../>` : `<rect .../>`}`
31
- * where every result-position template literal starts with an SVG
32
- * tag. The compiler emits this shape for `.map(s => cond ? <a/> : <b/>)`
33
- * bodies; without the wrap the cloned element ends up in the xhtml
34
- * namespace and renders nothing.
37
+ * where every result-position template literal (recursively) resolves
38
+ * to the SAME namespace. The compiler emits this shape for
39
+ * `.map(s => cond ? <a/> : <b/>)` bodies; without the wrap the cloned
40
+ * element ends up in the xhtml namespace and renders nothing.
35
41
  * 3. Reactive-conditional body — a branch wrapped in `<!--bf-cond-start:sX-->`
36
42
  * / `<!--bf-cond-end:sX-->` markers (emitted for nested reactive
37
43
  * conditionals). The check skips leading HTML comments and recurses
38
44
  * into the inner `${...}`.
39
45
  *
40
- * Mixed-namespace branches (one HTML, one SVG) intentionally fall through
41
- * to no-wrap so the user sees the same broken output as before instead of
42
- * a silent over-wrap into a `<foreignObject>`-style mismatch.
46
+ * Mixed-namespace branches (HTML+SVG, HTML+MathML, or SVG+MathML)
47
+ * intentionally fall through to no-wrap so the user sees the same broken
48
+ * output as before instead of a silent over-wrap that would drag one
49
+ * branch into the wrong foreign-content namespace.
43
50
  */
44
- export declare function templateRootIsSvg(template: string): boolean;
51
+ export declare function detectRootNamespaceWrapTag(template: string): NamespaceWrapTag | null;
45
52
  /**
46
53
  * Wrap decision for MULTI-ROOT (fragment) templates, where the synthetic
47
- * `<svg>` wrap swallows every sibling root at once (#2233 Copilot review).
54
+ * namespace wrap swallows every sibling root at once (#2233 Copilot
55
+ * review, generalised to MathML in #1096).
48
56
  *
49
- * `templateRootIsSvg` inspects only the FIRST root tag. For single-root
50
- * templates that's exact, but a fragment whose first root is an `<svg>`
51
- * CONTAINER (`<><svg/><span/></>`) doesn't need the wrap at all — the
52
- * HTML parser enters foreign content at `<svg>` on its own and wrapping
53
- * would drag the HTML siblings into the SVG namespace (`<span>` becomes an
54
- * SVGUnknownElement, silently undrawn). So `<svg>`-first fragments skip
55
- * the wrap; only leaf-rooted fragments (`<line>`, `<circle>`, ...) get it.
57
+ * `detectRootNamespaceWrapTag` inspects only the FIRST root tag. For
58
+ * single-root templates that's exact, but a fragment whose first root is
59
+ * the namespace CONTAINER itself (`<><svg/><span/></>`, `<><math/><span/></>`)
60
+ * doesn't need the wrap at all the HTML parser enters foreign content at
61
+ * `<svg>`/`<math>` on its own and wrapping would drag the HTML siblings
62
+ * into the foreign namespace (`<span>` becomes an SVGUnknownElement/etc.,
63
+ * silently undrawn). So container-first fragments skip the wrap; only
64
+ * leaf-rooted fragments (`<line>`, `<circle>`, `<mrow>`, ...) get it.
56
65
  *
57
- * Known edge (degenerate, pre-existing): an `<svg>`-first fragment with
58
- * SVG-LEAF siblings (`<><svg/><line/></>`) leaves the bare leaf siblings
59
- * in the HTML namespace — exactly the pre-#2219 behavior. Deciding that
60
- * shape correctly needs a scan of every top-level root tag; not worth the
61
- * parser until a real component hits it.
66
+ * Known edge (degenerate, pre-existing): a container-first fragment with
67
+ * LEAF siblings of the same namespace (`<><svg/><line/></>`) leaves the
68
+ * bare leaf siblings in the HTML namespace — exactly the pre-#2219
69
+ * behavior. Deciding that shape correctly needs a scan of every top-level
70
+ * root tag; not worth the parser until a real component hits it.
62
71
  */
63
- export declare function multiRootTemplateNeedsSvgWrap(template: string): boolean;
72
+ export declare function multiRootTemplateNeedsNamespaceWrap(template: string): NamespaceWrapTag | null;
73
+ /**
74
+ * Single door for the "wrap tag + descent path" pair every namespace-aware
75
+ * clone site needs. Consumers outside this file (`inner-loop.ts`,
76
+ * `loop-child-arm.ts`, `loop.ts`) read the wrap decision through this
77
+ * function instead of re-deriving `isSvg ? '<svg>' : ...` locally — keeps
78
+ * the SVG/MathML wrap code path in exactly one place (#1096).
79
+ */
80
+ export declare function namespaceWrapForTemplate(template: string): {
81
+ wrapTag: NamespaceWrapTag | null;
82
+ childPath: string;
83
+ };
84
+ /** `namespaceWrapForTemplate`, but for the multi-root fragment predicate. */
85
+ export declare function multiRootNamespaceWrapForTemplate(template: string): {
86
+ wrapTag: NamespaceWrapTag | null;
87
+ childPath: string;
88
+ };
89
+ /** Wrap `html` in the namespace's synthetic root tag, or return it as-is. */
90
+ export declare function wrapHtmlForNamespace(html: string, wrapTag: NamespaceWrapTag | null): string;
64
91
  /**
65
92
  * Build the inline template-clone expression as one line.
66
93
  *
67
94
  * ` const __tpl = document.createElement('template'); __tpl.innerHTML = \`${template}\`; return __tpl.content.firstElementChild.cloneNode(true) `
68
95
  *
69
- * For SVG roots, the `innerHTML` is wrapped in `<svg>...</svg>` and the
70
- * traversal descends one extra level.
96
+ * For SVG/MathML roots, the `innerHTML` is wrapped in the matching
97
+ * namespace root tag and the traversal descends one extra level.
71
98
  */
72
99
  export declare function emitTemplateCloneInline(template: string): string;
73
100
  /**
@@ -78,9 +105,10 @@ export declare function emitTemplateCloneInline(template: string): string;
78
105
  * STATIC-ONLY skeleton produced by `buildLoopSkeletonTemplate` (dynamic attrs
79
106
  * omitted, text markers empty) — never the per-row interpolated `template`.
80
107
  *
81
- * SVG namespace wrap mirrors `emitTemplateCloneLines` (#135 / #1088):
82
- * `templateRootIsSvg` is re-checked against the skeleton (same root tag as
83
- * the interpolated template, so the same wrap decision applies).
108
+ * Namespace wrap mirrors `emitTemplateCloneLines` (#135 / #1088 / #1096):
109
+ * `detectRootNamespaceWrapTag` is re-checked against the skeleton (same
110
+ * root tag as the interpolated template, so the same wrap decision
111
+ * applies).
84
112
  */
85
113
  export declare function emitHoistedTemplateDecl(lines: string[], indent: string, tplVar: string, skeletonTemplate: string): void;
86
114
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"template-parse.d.ts","sourceRoot":"","sources":["../../../../src/ir-to-client-js/control-flow/stringify/template-parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAkBH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAsB3D;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAIvE;AAkDD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKhE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAKvH;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAIjF;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAajF;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,EAAE;IACJ,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,OAAO,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,sFAAsF;IACtF,gBAAgB,EAAE,QAAQ,GAAG,WAAW,CAAA;IACxC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GACA,IAAI,CA4BN;AAED;;;;;;;;;GASG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,MAAM,EAAE,CAeV"}
1
+ {"version":3,"file":"template-parse.d.ts","sourceRoot":"","sources":["../../../../src/ir-to-client-js/control-flow/stringify/template-parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAkCH,uEAAuE;AACvE,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,MAAM,CAAA;AAe7C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAsBpF;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mCAAmC,CAAC,QAAQ,EAA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ACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GACA,IAAI,CA4BN;AAED;;;;;;;;;GASG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,MAAM,EAAE,CAeV"}
@@ -1 +1 @@
1
- {"version":3,"file":"emit-registration.d.ts","sourceRoot":"","sources":["../../src/ir-to-client-js/emit-registration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,EAAE,eAAe,EAAc,MAAM,aAAa,CAAA;AAC/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAMjD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAmD9G;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,eAAe,EACpB,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,MAAM,GACb;IACD,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACvC,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC9B,CAGA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,eAAe,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAMtF;AAkDD,4EAA4E;AAC5E;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,MAAM,EAAE,EACf,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,eAAe;AACtB;;;;;;GAMG;AACH,YAAY,CAAC,EAAE;IAAE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C,CAAA;CAAE,GACxF,MAAM,CAyFR"}
@@ -323,6 +323,20 @@ export interface TemplateOptions {
323
323
  * the template phase agree on which children defer (dropped-prop fix).
324
324
  */
325
325
  deferredChildSlots?: ReadonlySet<string>;
326
+ /**
327
+ * Slot ids of top-level, non-conditional dynamic expressions
328
+ * (`ctx.dynamicElements`, populated by `collectElements` — the exact set
329
+ * `emit-reactive.ts`'s `emitDynamicTextUpdates` claims `kind: 'markup'`
330
+ * for on the REACTIVE side, #2651). When a text-marker expression's
331
+ * `slotId` is a member, `escapeTextSlotExpr` emits `escapeTextOrMarkup`
332
+ * instead of `escapeText` so a `bfMarkup()`-branded prop value (a JSX
333
+ * element passed at a non-`children` component prop position) reaches
334
+ * the initial-render template raw, matching what the reactive writer
335
+ * already does via `escapeTextOrNode`. Computed once per component from
336
+ * `ctx.dynamicElements` by `irToComponentTemplate` / `generateCsrTemplate`
337
+ * — never re-derived here.
338
+ */
339
+ markupSlotIds?: ReadonlySet<string>;
326
340
  }
327
341
  /**
328
342
  * Generate HTML template for registerTemplate().
@@ -333,7 +347,7 @@ export interface TemplateOptions {
333
347
  * - Local constant references are inlined with their resolved values (#343)
334
348
  * - bf markers ARE included so client code can find elements
335
349
  */
336
- export declare function irToComponentTemplate(node: IRNode, inlinableConstants?: Map<string, string>, restSpreadNames?: Set<string>, propsObjectName?: string | null): string;
350
+ export declare function irToComponentTemplate(node: IRNode, inlinableConstants?: Map<string, string>, restSpreadNames?: Set<string>, propsObjectName?: string | null, markupSlotIds?: ReadonlySet<string>): string;
337
351
  /**
338
352
  * Check if a component can have a simple static template generated.
339
353
  * Returns false if the component has:
@@ -1 +1 @@
1
- {"version":3,"file":"html-template.d.ts","sourceRoot":"","sources":["../../src/ir-to-client-js/html-template.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAe,MAAM,EAAU,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAG/G,OAAO,KAAK,EAA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EACpB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,EAC7B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,EAC/B,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,EAC9B,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GACvC,MAAM,CAuBR;AAuHD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,eAAe,EACpB,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EACnD,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,EACjD,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,GAC9B,GAAG,CAAC,MAAM,CAAC,CAoDb;AAqXD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,OAAO,CAiBpF"}
@@ -2,9 +2,9 @@
2
2
  * Import detection and DOM import management.
3
3
  */
4
4
  import type { ComponentIR } from '../types.ts';
5
- export declare const RUNTIME_IMPORT_CANDIDATES: readonly ['createSignal', 'createMemo', 'createEffect', 'onCleanup', 'onMount', 'hydrate', 'insert', 'getLoopChildren', 'getLoopNodes', 'mapArray', 'mapArrayAnchored', 'mapArrayLazy', 'patchLeaf', 'createDisposableEffect', 'createComponent', 'renderChild', 'registerComponent', 'registerTemplate', 'initChild', 'upsertChild', 'mountRowRoot', 'createPortal', 'provideContext', 'createContext', 'useContext', 'forwardProps', 'applyRestAttrs', 'splitProps', 'spreadAttrs', 'styleToCss', 'escapeAttr', 'escapeText', 'escapeTextOrNode', 'qsa', 'qsaItem', 'qsaChildScope', 'qsaChildScopes', 'upsertChildItem', '__slot', '__bfSlot', '__bfText', 'claimSlots', 'lazySlots', 'lazyClaimSlots', 'textOrNode', 'beginTurn', 'endTurn', 'date', 'formatDate'];
5
+ export declare const RUNTIME_IMPORT_CANDIDATES: readonly ['createSignal', 'createMemo', 'createEffect', 'onCleanup', 'onMount', 'hydrate', 'insert', 'getLoopChildren', 'getLoopNodes', 'mapArray', 'mapArrayAnchored', 'mapArrayLazy', 'patchLeaf', 'createDisposableEffect', 'createComponent', 'renderChild', 'registerComponent', 'registerTemplate', 'initChild', 'upsertChild', 'mountRowRoot', 'createPortal', 'provideContext', 'createContext', 'useContext', 'forwardProps', 'applyRestAttrs', 'splitProps', 'spreadAttrs', 'styleToCss', 'escapeAttr', 'escapeText', 'escapeTextOrNode', 'bfMarkup', 'escapeTextOrMarkup', 'qsa', 'qsaItem', 'qsaChildScope', 'qsaChildScopes', 'upsertChildItem', '__slot', '__bfSlot', '__bfText', 'claimSlots', 'lazySlots', 'lazyClaimSlots', 'textOrNode', 'beginTurn', 'endTurn', 'date', 'formatDate'];
6
6
  /** @deprecated Use RUNTIME_IMPORT_CANDIDATES */
7
- export declare const DOM_IMPORT_CANDIDATES: readonly ["createSignal", "createMemo", "createEffect", "onCleanup", "onMount", "hydrate", "insert", "getLoopChildren", "getLoopNodes", "mapArray", "mapArrayAnchored", "mapArrayLazy", "patchLeaf", "createDisposableEffect", "createComponent", "renderChild", "registerComponent", "registerTemplate", "initChild", "upsertChild", "mountRowRoot", "createPortal", "provideContext", "createContext", "useContext", "forwardProps", "applyRestAttrs", "splitProps", "spreadAttrs", "styleToCss", "escapeAttr", "escapeText", "escapeTextOrNode", "qsa", "qsaItem", "qsaChildScope", "qsaChildScopes", "upsertChildItem", "__slot", "__bfSlot", "__bfText", "claimSlots", "lazySlots", "lazyClaimSlots", "textOrNode", "beginTurn", "endTurn", "date", "formatDate"];
7
+ export declare const DOM_IMPORT_CANDIDATES: readonly ["createSignal", "createMemo", "createEffect", "onCleanup", "onMount", "hydrate", "insert", "getLoopChildren", "getLoopNodes", "mapArray", "mapArrayAnchored", "mapArrayLazy", "patchLeaf", "createDisposableEffect", "createComponent", "renderChild", "registerComponent", "registerTemplate", "initChild", "upsertChild", "mountRowRoot", "createPortal", "provideContext", "createContext", "useContext", "forwardProps", "applyRestAttrs", "splitProps", "spreadAttrs", "styleToCss", "escapeAttr", "escapeText", "escapeTextOrNode", "bfMarkup", "escapeTextOrMarkup", "qsa", "qsaItem", "qsaChildScope", "qsaChildScopes", "upsertChildItem", "__slot", "__bfSlot", "__bfText", "claimSlots", "lazySlots", "lazyClaimSlots", "textOrNode", "beginTurn", "endTurn", "date", "formatDate"];
8
8
  export declare const RUNTIME_MODULE = "@barefootjs/client/runtime";
9
9
  export declare const IMPORT_PLACEHOLDER = "/* __BAREFOOTJS_DOM_IMPORTS__ */";
10
10
  export declare const MODULE_CONSTANTS_PLACEHOLDER = "/* __MODULE_LEVEL_CONSTANTS__ */";
@@ -1 +1 @@
1
- {"version":3,"file":"imports.d.ts","sourceRoot":"","sources":["../../src/ir-to-client-js/imports.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAU,MAAM,aAAa,CAAA;AAMtD,eAAO,MAAM,yBAAyB,YACpC,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EACpE,SAAS,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,WAAW,EAAE,wBAAwB,EAC7I,iBAAiB,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,WAAW,EAAE,aAAa,EAKrG,cAAc,EACd,cAAc,EACd,gBAAgB,EAAE,eAAe,EAAE,YAAY,EAC/C,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAC3H,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAUxG,YAAY,EAAE,WAAW,EAAE,gB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,EAAE,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAI3H,UAAU,EAAE,oBAAoB,EAChC,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAUxG,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAEzD,WAAW,EAAE,SAAS,EAItB,MAAM,EAIN,YAAY,CACJ,CAAA;AAEV,gDAAgD;AAChD,eAAO,MAAM,qBAAqB,0wBAA4B,CAAA;AAE9D,eAAO,MAAM,cAAc,+BAA+B,CAAA;AAE1D,eAAO,MAAM,kBAAkB,qCAAqC,CAAA;AACpE,eAAO,MAAM,4BAA4B,qCAAqC,CAAA;AAE9E;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAqB3D;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,EAAE,CAoB/D;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAWxF;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,EAAE,mBAAmB,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAsCvH"}
@@ -19,6 +19,16 @@ export interface SsrDefault {
19
19
  * (`{ variant = 'default' }`) where the template variable maps 1:1
20
20
  * to a caller-supplied prop. Omitted for signal / memo entries that
21
21
  * are internal to the component.
22
+ *
23
+ * Invariant (#2669): a signal / memo entry carries `propName` IF AND
24
+ * ONLY IF it's a self-derivation collision — the signal/memo's own
25
+ * template variable shares a name with the prop its initializer
26
+ * derives from (`const [label] = createSignal(props.label ?? 'x')`).
27
+ * Every OTHER signal/memo entry is `propName`-less. Consumers (e.g.
28
+ * every template-stash adapter's conformance harness, `test-render.ts`)
29
+ * rely on this to know a signal/memo's stash seed must defer to the
30
+ * already-derived prop value rather than re-seeding from its own
31
+ * evaluated initial — see `extractSsrDefaults`'s signal/memo loops.
22
32
  */
23
33
  propName?: string;
24
34
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-defaults.d.ts","sourceRoot":"","sources":["../src/ssr-defaults.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;OAKG;IACH,KAAK,EAAE,OAAO,CAAA;IACd;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EACpC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAuBzB;AAkBD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,SAAS,CA8G/F"}
1
+ {"version":3,"file":"ssr-defaults.d.ts","sourceRoot":"","sources":["../src/ssr-defaults.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;OAKG;IACH,KAAK,EAAE,OAAO,CAAA;IACd;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,EAA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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barefootjs/jsx",
3
- "version": "0.31.8",
3
+ "version": "0.31.10",
4
4
  "description": "JSX compiler for BarefootJS - transforms JSX to server HTML + client JS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -49,7 +49,7 @@
49
49
  "directory": "packages/jsx"
50
50
  },
51
51
  "dependencies": {
52
- "@barefootjs/shared": "0.31.8"
52
+ "@barefootjs/shared": "0.31.10"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@barefootjs/client": ">=0.2.0",