@barefootjs/xslate 0.32.0 → 0.33.1

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.
@@ -89,8 +89,11 @@ export interface XslateMemoContext {
89
89
  * re-parsing `expr` — mirrors go-template's
90
90
  * `convertExpressionToGo(jsExpr, out?, preParsed?)`. With `preParsed` set,
91
91
  * `expr` is unused for parsing (the converter derives any diagnostic text
92
- * from the tree), so callers may pass `''`.
92
+ * from the tree), so callers may pass `''`. `pos` (default `'rendered'`)
93
+ * must be `'value'` for a derived-seed RHS — an assignment, not a render —
94
+ * so the internal support gate matches the `isSupportedValue`
95
+ * classification the seed plan already used.
93
96
  */
94
- convertExpressionToKolon(expr: string, preParsed?: ParsedExpr): string;
97
+ convertExpressionToKolon(expr: string, preParsed?: ParsedExpr, pos?: 'rendered' | 'value'): string;
95
98
  }
96
99
  //# sourceMappingURL=emit-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"emit-context.d.ts","sourceRoot":"","sources":["../../src/adapter/emit-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5E,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,CAAC,mBAAmB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAEzC;;;OAGG;IACH,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAEtD,oFAAoF;IACpF,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAEjD;;;OAGG;IACH,2BAA2B,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAE3E,uEAAuE;IACvE,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,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,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAEjD;;;OAGG;IACH,2BAA2B,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAE3E,uEAAuE;IACvE,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;IAEzC,wDAAwD;IACxD,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAExD,yEAAyE;IACzE,4BAA4B,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CACtE;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,uDAAuD;IACvD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAE9B,kEAAkE;IAClE,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,CAAA;IAEhC,0EAA0E;IAC1E,QAAQ,CAAC,cAAc,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAA;IAErD,sEAAsE;IACtE,QAAQ,CAAC,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAExC;;;;;;;;;OASG;IACH,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,UAAU,GAAG,MAAM,CAAA;CACvE;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;;;;;;;OAYG;IACH,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,UAAU,EAAE,GAAG,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,MAAM,CAAA;CACnG"}
@@ -95,6 +95,6 @@ export declare class XslateTopLevelEmitter implements ParsedExprEmitter {
95
95
  arrow(_params: string[], _body: ParsedExpr): string;
96
96
  regex(_raw: string): string;
97
97
  unsupported(_raw: string, _reason: string): string;
98
- objectLiteral(properties: ObjectLiteralProperty[], _raw: string, _emit: (e: ParsedExpr) => string): string;
98
+ objectLiteral(properties: ObjectLiteralProperty[], _raw: string, emit: (e: ParsedExpr) => string): string;
99
99
  }
100
100
  //# sourceMappingURL=emitters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"emitters.d.ts","sourceRoot":"","sources":["../../../src/adapter/expr/emitters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAEL,KAAK,iBAAiB,EAEtB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,YAAY,EAIlB,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAgC3D;;;;;;;;;;GAUG;AACH,qBAAa,mBAAoB,YAAW,iBAAiB;IAS3D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAQ;IAC9B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IACjD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAwB;IAIrD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAA4C;IAE3E,YACE,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,YAAY,GAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAqB,EAClD,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,EAM3D;IAED,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAK/B;IAED,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,EAAE,WAAW,EAAE,WAAW,GAAG,MAAM,CAKjF;IAED,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,SA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tB,SAAS,EAAE,UAAU,EACrB,IAAI,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,MAAM,GAC9B,MAAM,CAER;IAED,eAAe,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,MAAM,GAAG,MAAM,CAoB9E;IAED,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,CAKlD;IAED,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG1B;IAED,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjD;IAED,aAAa,CAAC,UAAU,EAAE,qBAAqB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,MAAM,GAAG,MAAM,CAoBxG;CACF"}
@@ -187297,6 +187297,7 @@ import {
187297
187297
  parseProviderObjectLiteral,
187298
187298
  parseStyleObjectEntries,
187299
187299
  isSupported,
187300
+ isSupportedValue,
187300
187301
  emitParsedExpr,
187301
187302
  emitIRNode,
187302
187303
  emitAttrValue,
@@ -187667,6 +187668,7 @@ function staticValueToKolon(value) {
187667
187668
  // src/adapter/expr/emitters.ts
187668
187669
  import {
187669
187670
  groupBinaryOperand,
187671
+ groupObjectLiteralSegments,
187670
187672
  isStringConcatBinary,
187671
187673
  identifierPath,
187672
187674
  matchSearchParamsMethodCall,
@@ -188009,8 +188011,15 @@ class XslateTopLevelEmitter {
188009
188011
  unsupported(_raw, _reason) {
188010
188012
  return "''";
188011
188013
  }
188012
- objectLiteral(properties, _raw, _emit) {
188013
- return properties.length === 0 ? "{}" : "''";
188014
+ objectLiteral(properties, _raw, emit) {
188015
+ if (properties.length === 0)
188016
+ return "{}";
188017
+ const literalOf = (run) => `{ ${run.map((p) => `'${escapeKolonSingleQuoted(p.key)}' => ${emit(p.value)}`).join(", ")} }`;
188018
+ if (!properties.some((p) => p.kind === "spread")) {
188019
+ return literalOf(properties);
188020
+ }
188021
+ const segments = groupObjectLiteralSegments(properties, literalOf, emit);
188022
+ return segments.reduce((acc, seg) => `${acc}.merge(${seg})`);
188014
188023
  }
188015
188024
  }
188016
188025
 
@@ -188124,6 +188133,8 @@ function objectLiteralExprToKolonHashref(ctx, expr) {
188124
188133
  function objectLiteralToKolonHashref(ctx, obj) {
188125
188134
  const entries = [];
188126
188135
  for (const prop of obj.properties) {
188136
+ if (prop.kind === "spread")
188137
+ return null;
188127
188138
  if (prop.shorthand)
188128
188139
  return null;
188129
188140
  if (prop.keyKind === "numeric")
@@ -188195,7 +188206,7 @@ function generateDerivedMemoSeed(ctx, ir) {
188195
188206
  for (const step of plan.steps) {
188196
188207
  if (step.kind !== "derived")
188197
188208
  continue;
188198
- const kolon = ctx.convertExpressionToKolon(step.expr, step.parsed);
188209
+ const kolon = ctx.convertExpressionToKolon(step.expr, step.parsed, "value");
188199
188210
  if (kolon === "" || !/\$[A-Za-z_]\w*/.test(kolon))
188200
188211
  continue;
188201
188212
  if (new RegExp(`\\$${step.name}\\b`).test(kolon)) {
@@ -189026,9 +189037,9 @@ ${reason}` : "";
189026
189037
  };
189027
189038
  }
189028
189039
  get memoCtx() {
189029
- return { convertExpressionToKolon: (e, preParsed) => this.convertExpressionToKolon(e, preParsed) };
189040
+ return { convertExpressionToKolon: (e, preParsed, pos) => this.convertExpressionToKolon(e, preParsed, pos) };
189030
189041
  }
189031
- convertExpressionToKolon(expr, preParsed) {
189042
+ convertExpressionToKolon(expr, preParsed, pos = "rendered") {
189032
189043
  let parsed;
189033
189044
  if (preParsed) {
189034
189045
  parsed = preParsed;
@@ -189051,7 +189062,7 @@ ${reason}` : "";
189051
189062
  }
189052
189063
  }
189053
189064
  }
189054
- const support = isSupported(parsed);
189065
+ const support = pos === "value" ? isSupportedValue(parsed) : isSupported(parsed);
189055
189066
  if (!support.supported) {
189056
189067
  this.errors.push({
189057
189068
  code: "BF101",
@@ -1 +1 @@
1
- {"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../../../src/adapter/memo/seed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,eAAe,EAGrB,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,sEAAsE;AACtE,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,eAAe,GAAG,MAAM,CAM9D;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAWnE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,iBAAiB,EAAE,EAAE,EAAE,WAAW,GAAG,MAAM,CA4BvF"}
1
+ {"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../../../src/adapter/memo/seed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,eAAe,EAGrB,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,sEAAsE;AACtE,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,eAAe,GAAG,MAAM,CAM9D;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAWnE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,iBAAiB,EAAE,EAAE,EAAE,WAAW,GAAG,MAAM,CA6BvF"}
@@ -1 +1 @@
1
- {"version":3,"file":"spread-codegen.d.ts","sourceRoot":"","sources":["../../../src/adapter/spread/spread-codegen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAIH,OAAO,KAAK,EAAE,UAA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;;;OAKG;IACH;;;;OAIG;IACH,8BAA8B,CAC5B,IAAI,EAAE,MAAM,GACX;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAgBlD;IAED,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAW3C;IAED,8EAA8E;IAC9E,OAAO,CAAC,eAAe;IAIvB;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,oBAAoB;IAW5B;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,2BAA2B;IAQnC,OAAO,CAAC,yBAAyB;IASjC,OAAO,CAAC,gBAAgB;IAcxB,iFAAiF;IACjF,OAAO,CAAC,4BAA4B;CAGrC;AAED,eAAO,MAAM,aAAa,eAAsB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"conformance-pins.d.ts","sourceRoot":"","sources":["../src/conformance-pins.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,eAAO,MAAM,eAAe,EAAE,eA+C7B,CAAA"}
1
+ {"version":3,"file":"conformance-pins.d.ts","sourceRoot":"","sources":["../src/conformance-pins.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,eAAO,MAAM,eAAe,EAAE,eAsD7B,CAAA"}
package/dist/index.js CHANGED
@@ -187297,6 +187297,7 @@ import {
187297
187297
  parseProviderObjectLiteral,
187298
187298
  parseStyleObjectEntries,
187299
187299
  isSupported,
187300
+ isSupportedValue,
187300
187301
  emitParsedExpr,
187301
187302
  emitIRNode,
187302
187303
  emitAttrValue,
@@ -187667,6 +187668,7 @@ function staticValueToKolon(value) {
187667
187668
  // src/adapter/expr/emitters.ts
187668
187669
  import {
187669
187670
  groupBinaryOperand,
187671
+ groupObjectLiteralSegments,
187670
187672
  isStringConcatBinary,
187671
187673
  identifierPath,
187672
187674
  matchSearchParamsMethodCall,
@@ -188009,8 +188011,15 @@ class XslateTopLevelEmitter {
188009
188011
  unsupported(_raw, _reason) {
188010
188012
  return "''";
188011
188013
  }
188012
- objectLiteral(properties, _raw, _emit) {
188013
- return properties.length === 0 ? "{}" : "''";
188014
+ objectLiteral(properties, _raw, emit) {
188015
+ if (properties.length === 0)
188016
+ return "{}";
188017
+ const literalOf = (run) => `{ ${run.map((p) => `'${escapeKolonSingleQuoted(p.key)}' => ${emit(p.value)}`).join(", ")} }`;
188018
+ if (!properties.some((p) => p.kind === "spread")) {
188019
+ return literalOf(properties);
188020
+ }
188021
+ const segments = groupObjectLiteralSegments(properties, literalOf, emit);
188022
+ return segments.reduce((acc, seg) => `${acc}.merge(${seg})`);
188014
188023
  }
188015
188024
  }
188016
188025
 
@@ -188124,6 +188133,8 @@ function objectLiteralExprToKolonHashref(ctx, expr) {
188124
188133
  function objectLiteralToKolonHashref(ctx, obj) {
188125
188134
  const entries = [];
188126
188135
  for (const prop of obj.properties) {
188136
+ if (prop.kind === "spread")
188137
+ return null;
188127
188138
  if (prop.shorthand)
188128
188139
  return null;
188129
188140
  if (prop.keyKind === "numeric")
@@ -188195,7 +188206,7 @@ function generateDerivedMemoSeed(ctx, ir) {
188195
188206
  for (const step of plan.steps) {
188196
188207
  if (step.kind !== "derived")
188197
188208
  continue;
188198
- const kolon = ctx.convertExpressionToKolon(step.expr, step.parsed);
188209
+ const kolon = ctx.convertExpressionToKolon(step.expr, step.parsed, "value");
188199
188210
  if (kolon === "" || !/\$[A-Za-z_]\w*/.test(kolon))
188200
188211
  continue;
188201
188212
  if (new RegExp(`\\$${step.name}\\b`).test(kolon)) {
@@ -189026,9 +189037,9 @@ ${reason}` : "";
189026
189037
  };
189027
189038
  }
189028
189039
  get memoCtx() {
189029
- return { convertExpressionToKolon: (e, preParsed) => this.convertExpressionToKolon(e, preParsed) };
189040
+ return { convertExpressionToKolon: (e, preParsed, pos) => this.convertExpressionToKolon(e, preParsed, pos) };
189030
189041
  }
189031
- convertExpressionToKolon(expr, preParsed) {
189042
+ convertExpressionToKolon(expr, preParsed, pos = "rendered") {
189032
189043
  let parsed;
189033
189044
  if (preParsed) {
189034
189045
  parsed = preParsed;
@@ -189051,7 +189062,7 @@ ${reason}` : "";
189051
189062
  }
189052
189063
  }
189053
189064
  }
189054
- const support = isSupported(parsed);
189065
+ const support = pos === "value" ? isSupportedValue(parsed) : isSupported(parsed);
189055
189066
  if (!support.supported) {
189056
189067
  this.errors.push({
189057
189068
  code: "BF101",
@@ -189188,14 +189199,12 @@ var conformancePins = {
189188
189199
  ],
189189
189200
  "filter-nested-find-predicate": [{ code: "BF101", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2320" }],
189190
189201
  "date-method-uncatalogued": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2356" }],
189191
- "rich-prop-client-read": [{ code: "BF049", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2648" }]
189202
+ "rich-prop-client-read": [{ code: "BF049", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2648" }],
189203
+ "jsx-element-prop-ternary": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2667" }],
189204
+ "jsx-element-prop-array": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2667" }]
189192
189205
  };
189193
189206
  // src/render-divergences.ts
189194
- var renderDivergences = {
189195
- "todo-app": "the `todos` signal seeds from `(props.initialTodos ?? []).map(t => ({ ...t, editing: false }))` — a different-prop-derived `.map()` chain `extractSsrDefaults` cannot statically resolve, and `computeSsrSeedPlan` classifies it opaque (no in-template recompute), so it seeds `undef`; the non-`/* @client */`-marked `{todos().length > 0 && ...}` toggle-all block SSRs as if there are zero todos regardless of `initialTodos` (https://github.com/piconic-ai/barefootjs/issues/2696)",
189196
- "todo-app-ssr": "same root cause as `todo-app` (https://github.com/piconic-ai/barefootjs/issues/2696); this fixture's todo-list loop carries no `/* @client */` marker, but Kolon's `for` iterates an undef list as empty rather than raising, so it SSRs an empty `<ul class=\"todo-list\">` with the toggle-all controls also absent, regardless of `initialTodos`",
189197
- "callback-param-shadows-prop": "the `first` signal seeds from `[{ a: 'p' }].map((title) => title.a).join(',')` — a constant expression `extractSsrDefaults` still cannot statically resolve (`.map()` is unsupported for any receiver) and, unlike the sibling `joined` memo's structurally similar chain, gets no in-template recompute (`computeSsrSeedPlan` classifies it opaque too); `<span>{first()}</span>` SSRs empty instead of `p` (https://github.com/piconic-ai/barefootjs/issues/2696)"
189198
- };
189207
+ var renderDivergences = {};
189199
189208
  export {
189200
189209
  xslateAdapter,
189201
189210
  renderDivergences,
@@ -1 +1 @@
1
- {"version":3,"file":"render-divergences.d.ts","sourceRoot":"","sources":["../src/render-divergences.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AASxD,eAAO,MAAM,iBAAiB,EAAE,iBAO/B,CAAA"}
1
+ {"version":3,"file":"render-divergences.d.ts","sourceRoot":"","sources":["../src/render-divergences.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAexD,eAAO,MAAM,iBAAiB,EAAE,iBAAsB,CAAA"}
package/dist/vite.js CHANGED
@@ -263,7 +263,7 @@ function convertNode(node, raw) {
263
263
  }
264
264
  if (n === undefined || Number.isNaN(n)) {
265
265
  const parsedDepth = convertNode(depthNode, raw);
266
- if (checkSupport(parsedDepth).supported) {
266
+ if (checkSupport(parsedDepth, "rendered").supported) {
267
267
  depthExpr = parsedDepth;
268
268
  flatDepth = 1;
269
269
  } else {
@@ -357,10 +357,12 @@ function convertNode(node, raw) {
357
357
  const k = objectLiteralKeyName(prop.name);
358
358
  if (k === null)
359
359
  return { kind: "unsupported", raw, reason: `Unsupported syntax: ${ts.SyntaxKind[node.kind]}` };
360
- properties.push({ key: k.key, keyKind: k.keyKind, shorthand: false, value: convertNode(prop.initializer, raw) });
360
+ properties.push({ kind: "prop", key: k.key, keyKind: k.keyKind, shorthand: false, value: convertNode(prop.initializer, raw) });
361
361
  } else if (ts.isShorthandPropertyAssignment(prop)) {
362
362
  const key = prop.name.text;
363
- properties.push({ key, keyKind: "identifier", shorthand: true, value: { kind: "identifier", name: key } });
363
+ properties.push({ kind: "prop", key, keyKind: "identifier", shorthand: true, value: { kind: "identifier", name: key } });
364
+ } else if (ts.isSpreadAssignment(prop)) {
365
+ properties.push({ kind: "spread", expr: convertNode(prop.expression, raw) });
364
366
  } else {
365
367
  return { kind: "unsupported", raw, reason: `Unsupported syntax: ${ts.SyntaxKind[node.kind]}` };
366
368
  }
@@ -1040,14 +1042,26 @@ function getUnaryOperatorString(op) {
1040
1042
  }
1041
1043
  }
1042
1044
  function isSupported(expr) {
1043
- return checkSupport(expr);
1045
+ return checkSupport(expr, "rendered");
1044
1046
  }
1045
- function checkSupport(expr) {
1047
+ function isSupportedValue(expr) {
1048
+ return checkSupport(expr, "value");
1049
+ }
1050
+ function checkSupport(expr, pos) {
1046
1051
  switch (expr.kind) {
1047
1052
  case "unsupported":
1048
1053
  return { supported: false, reason: expr.reason };
1049
- case "object-literal":
1050
- return { supported: false, reason: "Unsupported syntax: ObjectLiteralExpression" };
1054
+ case "object-literal": {
1055
+ if (pos !== "value") {
1056
+ return { supported: false, reason: "Unsupported syntax: ObjectLiteralExpression" };
1057
+ }
1058
+ for (const prop of expr.properties) {
1059
+ const propSupport = checkSupport(prop.kind === "spread" ? prop.expr : prop.value, pos);
1060
+ if (!propSupport.supported)
1061
+ return propSupport;
1062
+ }
1063
+ return { supported: true, level: "L2" };
1064
+ }
1051
1065
  case "identifier":
1052
1066
  return { supported: true, level: "L1" };
1053
1067
  case "literal":
@@ -1057,7 +1071,7 @@ function checkSupport(expr) {
1057
1071
  return { supported: false, reason: "Standalone arrow functions / regex literals are not supported" };
1058
1072
  case "array-literal": {
1059
1073
  for (const el of expr.elements) {
1060
- const elSupport = checkSupport(el);
1074
+ const elSupport = checkSupport(el, pos);
1061
1075
  if (!elSupport.supported)
1062
1076
  return elSupport;
1063
1077
  }
@@ -1070,16 +1084,16 @@ function checkSupport(expr) {
1070
1084
  reason: `String.prototype.${expr.method} supports only a string pattern + string replacement (the regex form is deferred); use a string pattern or wrap the expression in /* @client */`
1071
1085
  };
1072
1086
  }
1073
- const objSupport = checkSupport(expr.object);
1087
+ const objSupport = checkSupport(expr.object, pos);
1074
1088
  if (!objSupport.supported)
1075
1089
  return objSupport;
1076
1090
  for (const arg of expr.args) {
1077
- const argSupport = checkSupport(arg);
1091
+ const argSupport = checkSupport(arg, pos);
1078
1092
  if (!argSupport.supported)
1079
1093
  return argSupport;
1080
1094
  }
1081
1095
  if (expr.method === "flat" && expr.depthExpr) {
1082
- const depthSupport = checkSupport(expr.depthExpr);
1096
+ const depthSupport = checkSupport(expr.depthExpr, pos);
1083
1097
  if (!depthSupport.supported)
1084
1098
  return depthSupport;
1085
1099
  }
@@ -1088,10 +1102,10 @@ function checkSupport(expr) {
1088
1102
  case "call": {
1089
1103
  const cb = asCallbackMethodCall(expr);
1090
1104
  if (cb) {
1091
- const objSupport = checkSupport(cb.object);
1105
+ const objSupport = checkSupport(cb.object, pos);
1092
1106
  if (!objSupport.supported)
1093
1107
  return objSupport;
1094
- const bodySupport = checkSupport(cb.arrow.body);
1108
+ const bodySupport = checkSupport(cb.arrow.body, pos);
1095
1109
  if (!bodySupport.supported) {
1096
1110
  return {
1097
1111
  supported: false,
@@ -1100,13 +1114,13 @@ function checkSupport(expr) {
1100
1114
  };
1101
1115
  }
1102
1116
  for (const rest of cb.args) {
1103
- const restSupport = checkSupport(rest);
1117
+ const restSupport = checkSupport(rest, pos);
1104
1118
  if (!restSupport.supported)
1105
1119
  return restSupport;
1106
1120
  }
1107
1121
  return { supported: true, level: "L5" };
1108
1122
  }
1109
- const calleeSupport = checkSupport(expr.callee);
1123
+ const calleeSupport = checkSupport(expr.callee, pos);
1110
1124
  if (!calleeSupport.supported) {
1111
1125
  return calleeSupport;
1112
1126
  }
@@ -1125,7 +1139,7 @@ function checkSupport(expr) {
1125
1139
  return { supported: true, level: "L1" };
1126
1140
  }
1127
1141
  for (const arg of expr.args) {
1128
- const argSupport = checkSupport(arg);
1142
+ const argSupport = checkSupport(arg, pos);
1129
1143
  if (!argSupport.supported) {
1130
1144
  return argSupport;
1131
1145
  }
@@ -1133,7 +1147,7 @@ function checkSupport(expr) {
1133
1147
  return { supported: true, level: "L2" };
1134
1148
  }
1135
1149
  case "member": {
1136
- const objSupport = checkSupport(expr.object);
1150
+ const objSupport = checkSupport(expr.object, pos);
1137
1151
  if (!objSupport.supported) {
1138
1152
  return objSupport;
1139
1153
  }
@@ -1143,19 +1157,19 @@ function checkSupport(expr) {
1143
1157
  return { supported: true, level: "L2" };
1144
1158
  }
1145
1159
  case "index-access": {
1146
- const objSupport = checkSupport(expr.object);
1160
+ const objSupport = checkSupport(expr.object, pos);
1147
1161
  if (!objSupport.supported)
1148
1162
  return objSupport;
1149
- const indexSupport = checkSupport(expr.index);
1163
+ const indexSupport = checkSupport(expr.index, pos);
1150
1164
  if (!indexSupport.supported)
1151
1165
  return indexSupport;
1152
1166
  return { supported: true, level: "L2" };
1153
1167
  }
1154
1168
  case "binary": {
1155
- const leftSupport = checkSupport(expr.left);
1169
+ const leftSupport = checkSupport(expr.left, pos);
1156
1170
  if (!leftSupport.supported)
1157
1171
  return leftSupport;
1158
- const rightSupport = checkSupport(expr.right);
1172
+ const rightSupport = checkSupport(expr.right, pos);
1159
1173
  if (!rightSupport.supported)
1160
1174
  return rightSupport;
1161
1175
  if (["===", "==", "!==", "!=", ">", "<", ">=", "<="].includes(expr.op)) {
@@ -1167,7 +1181,7 @@ function checkSupport(expr) {
1167
1181
  return { supported: false, reason: `Unknown operator: ${expr.op}` };
1168
1182
  }
1169
1183
  case "unary": {
1170
- const argSupport = checkSupport(expr.argument);
1184
+ const argSupport = checkSupport(expr.argument, pos);
1171
1185
  if (!argSupport.supported)
1172
1186
  return argSupport;
1173
1187
  if (expr.op === "!") {
@@ -1179,25 +1193,25 @@ function checkSupport(expr) {
1179
1193
  return { supported: false, reason: `Unsupported unary operator: ${expr.op}` };
1180
1194
  }
1181
1195
  case "logical": {
1182
- const leftSupport = checkSupport(expr.left);
1196
+ const leftSupport = checkSupport(expr.left, pos);
1183
1197
  if (!leftSupport.supported)
1184
1198
  return leftSupport;
1185
1199
  if (expr.op === "??" && expr.right.kind === "object-literal" && expr.right.properties.length === 0) {
1186
1200
  return { supported: true, level: "L4" };
1187
1201
  }
1188
- const rightSupport = checkSupport(expr.right);
1202
+ const rightSupport = checkSupport(expr.right, pos);
1189
1203
  if (!rightSupport.supported)
1190
1204
  return rightSupport;
1191
1205
  return { supported: true, level: "L4" };
1192
1206
  }
1193
1207
  case "conditional": {
1194
- const testSupport = checkSupport(expr.test);
1208
+ const testSupport = checkSupport(expr.test, pos);
1195
1209
  if (!testSupport.supported)
1196
1210
  return testSupport;
1197
- const consSupport = checkSupport(expr.consequent);
1211
+ const consSupport = checkSupport(expr.consequent, pos);
1198
1212
  if (!consSupport.supported)
1199
1213
  return consSupport;
1200
- const altSupport = checkSupport(expr.alternate);
1214
+ const altSupport = checkSupport(expr.alternate, pos);
1201
1215
  if (!altSupport.supported)
1202
1216
  return altSupport;
1203
1217
  return { supported: true, level: "L4" };
@@ -1205,7 +1219,7 @@ function checkSupport(expr) {
1205
1219
  case "template-literal": {
1206
1220
  for (const part of expr.parts) {
1207
1221
  if (part.type === "expression") {
1208
- const partSupport = checkSupport(part.expr);
1222
+ const partSupport = checkSupport(part.expr, pos);
1209
1223
  if (!partSupport.supported)
1210
1224
  return partSupport;
1211
1225
  }
@@ -1321,7 +1335,7 @@ function isPureInit(e, pureCallNames) {
1321
1335
  case "array-literal":
1322
1336
  return e.elements.every(pure);
1323
1337
  case "object-literal":
1324
- return e.properties.every((p) => pure(p.value));
1338
+ return e.properties.every((p) => pure(p.kind === "spread" ? p.expr : p.value));
1325
1339
  case "call":
1326
1340
  return e.callee.kind === "identifier" && e.args.length === 0 && pureCallNames !== undefined && pureCallNames.has(e.callee.name);
1327
1341
  case "array-method":
@@ -1375,7 +1389,7 @@ function usesPerPath(name, expr) {
1375
1389
  }
1376
1390
  return add(walk(e.object), sum(e.args));
1377
1391
  case "object-literal":
1378
- return sum(e.properties.map((p) => p.value));
1392
+ return sum(e.properties.map((p) => p.kind === "spread" ? p.expr : p.value));
1379
1393
  case "arrow":
1380
1394
  return walk(e.body).max > 0 ? { min: 0, max: Number.POSITIVE_INFINITY } : { min: 0, max: 0 };
1381
1395
  }
@@ -1441,7 +1455,7 @@ function inlineBinding(expr, name, value) {
1441
1455
  case "object-literal":
1442
1456
  return {
1443
1457
  kind: "object-literal",
1444
- properties: e.properties.map((p) => ({ ...p, value: walk(p.value, enclosing) })),
1458
+ properties: e.properties.map((p) => p.kind === "spread" ? { ...p, expr: walk(p.expr, enclosing) } : { ...p, value: walk(p.value, enclosing) }),
1445
1459
  raw: e.raw
1446
1460
  };
1447
1461
  case "literal":
@@ -1657,7 +1671,7 @@ function freeVarsInBody(body, params) {
1657
1671
  return;
1658
1672
  case "object-literal":
1659
1673
  for (const p of e.properties)
1660
- visit(p.value, bound);
1674
+ visit(p.kind === "spread" ? p.expr : p.value, bound);
1661
1675
  return;
1662
1676
  case "array-method":
1663
1677
  if (e.method === "includes" || e.method === "join") {
@@ -1732,7 +1746,7 @@ function freeIdentifiers(expr) {
1732
1746
  return true;
1733
1747
  case "object-literal":
1734
1748
  for (const p of e.properties)
1735
- if (!visit(p.value, bound))
1749
+ if (!visit(p.kind === "spread" ? p.expr : p.value, bound))
1736
1750
  return false;
1737
1751
  return true;
1738
1752
  case "arrow": {
@@ -1879,10 +1893,17 @@ function toEvalNode(e) {
1879
1893
  case "object-literal": {
1880
1894
  const properties = [];
1881
1895
  for (const p of e.properties) {
1896
+ if (p.kind === "spread") {
1897
+ const spreadExpr = toEvalNode(p.expr);
1898
+ if (!spreadExpr)
1899
+ return null;
1900
+ properties.push({ kind: "spread", expr: spreadExpr });
1901
+ continue;
1902
+ }
1882
1903
  const value = toEvalNode(p.value);
1883
1904
  if (!value)
1884
1905
  return null;
1885
- properties.push({ key: p.key, value });
1906
+ properties.push({ kind: "prop", key: p.key, value });
1886
1907
  }
1887
1908
  return { kind: "object-literal", properties };
1888
1909
  }
@@ -2252,6 +2273,7 @@ var ErrorCodes = {
2252
2273
  MISSING_KEY_IN_LIST: "BF023",
2253
2274
  MISSING_KEY_IN_NESTED_LIST: "BF024",
2254
2275
  UNSUPPORTED_DESTRUCTURE_REST: "BF025",
2276
+ RETURN_VALUE_NOT_JSX: "BF027",
2255
2277
  PROPS_DESTRUCTURING: "BF043",
2256
2278
  SIGNAL_GETTER_NOT_CALLED: "BF044",
2257
2279
  JSX_IN_LOCAL_FUNCTION: "BF045",
@@ -2283,6 +2305,7 @@ var errorMessages = {
2283
2305
  [ErrorCodes.MISSING_KEY_IN_LIST]: "Missing key attribute in list rendering. Add a key prop for efficient updates",
2284
2306
  [ErrorCodes.MISSING_KEY_IN_NESTED_LIST]: "Nested .map() loop requires key attribute for event delegation. Add a key prop to elements in the inner loop",
2285
2307
  [ErrorCodes.UNSUPPORTED_DESTRUCTURE_REST]: "Computed property key in .map() callback destructure is not supported. Rewrite the callback to destructure explicit bindings (e.g., `({ a, b }) => ...`) so the compiler can rewrite references to per-item signal accessors.",
2308
+ [ErrorCodes.RETURN_VALUE_NOT_JSX]: "Component's return value is not recognized as JSX — return the JSX expression directly instead of binding it to a local variable first.",
2286
2309
  [ErrorCodes.PROPS_DESTRUCTURING]: "Props destructuring in function parameters breaks reactivity. Use props object directly.",
2287
2310
  [ErrorCodes.SIGNAL_GETTER_NOT_CALLED]: "Signal/memo getter passed without calling it. Use getter() to read the value.",
2288
2311
  [ErrorCodes.JSX_IN_LOCAL_FUNCTION]: "Local function returns JSX but cannot be inlined. Extract it as a top-level PascalCase component or use a single return statement.",
@@ -2915,6 +2938,8 @@ function matchToLocaleDateStringCall(callee, args, metadata) {
2915
2938
  let tz = null;
2916
2939
  const probeOptions = {};
2917
2940
  for (const prop of options.properties) {
2941
+ if (prop.kind === "spread")
2942
+ return null;
2918
2943
  if (prop.value.kind !== "literal" || prop.value.literalType !== "string")
2919
2944
  return null;
2920
2945
  const value = String(prop.value.value);
@@ -3905,7 +3930,7 @@ function parseRecordIndexAccess(val, localConstants, propsParams, resolveKey) {
3905
3930
 
3906
3931
  // ../jsx/src/ssr-seed-plan.ts
3907
3932
  function classify(name, origin, expr, parsed, available) {
3908
- if (!isSupported(parsed).supported)
3933
+ if (!isSupportedValue(parsed).supported)
3909
3934
  return { kind: "opaque", name, origin };
3910
3935
  const frees = freeIdentifiers(parsed);
3911
3936
  if (frees === null)
@@ -3968,7 +3993,7 @@ function computeSsrSeedPlan(metadata) {
3968
3993
  }
3969
3994
  }
3970
3995
  const expr = signal.initialValue.trim();
3971
- steps.push(expr === "" ? { kind: "opaque", name: signal.getter, origin: "signal" } : classify(signal.getter, "signal", expr, resolveThroughLocalConsts(parseExpression(expr), localConsts), available));
3996
+ steps.push(expr === "" ? { kind: "opaque", name: signal.getter, origin: "signal" } : classify(signal.getter, "signal", expr, resolveThroughLocalConsts(signal.parsed ?? parseExpression(`(${expr})`), localConsts), available));
3972
3997
  available.add(signal.getter);
3973
3998
  }
3974
3999
  for (const memo of metadata.memos) {
@@ -4595,6 +4620,26 @@ function isStringConcatBinary(op, left, right, isStringName) {
4595
4620
  function groupBinaryOperand(operand, emitted) {
4596
4621
  return operand.kind === "binary" || operand.kind === "logical" || operand.kind === "conditional" ? `(${emitted})` : emitted;
4597
4622
  }
4623
+ function groupObjectLiteralSegments(properties, literalOf, emit) {
4624
+ const segments = [];
4625
+ let run = [];
4626
+ const flushRun = () => {
4627
+ if (run.length > 0) {
4628
+ segments.push(literalOf(run));
4629
+ run = [];
4630
+ }
4631
+ };
4632
+ for (const p of properties) {
4633
+ if (p.kind === "spread") {
4634
+ flushRun();
4635
+ segments.push(emit(p.expr));
4636
+ } else {
4637
+ run.push(p);
4638
+ }
4639
+ }
4640
+ flushRun();
4641
+ return segments;
4642
+ }
4598
4643
  function emitParsedExpr(expr, emitter) {
4599
4644
  const emit = (child) => emitParsedExpr(child, emitter);
4600
4645
  switch (expr.kind) {
@@ -4741,6 +4786,17 @@ function evaluateStaticLiteral(expr, bindings) {
4741
4786
  case "object-literal": {
4742
4787
  const out = {};
4743
4788
  for (const prop of expr.properties) {
4789
+ if (prop.kind === "spread") {
4790
+ const resolved2 = evaluateStaticLiteral(prop.expr, bindings);
4791
+ if (!resolved2)
4792
+ return null;
4793
+ if (resolved2.value === null || resolved2.value === undefined)
4794
+ continue;
4795
+ if (typeof resolved2.value !== "object" || Array.isArray(resolved2.value))
4796
+ return null;
4797
+ Object.assign(out, resolved2.value);
4798
+ continue;
4799
+ }
4744
4800
  const resolved = evaluateStaticLiteral(prop.value, bindings);
4745
4801
  if (!resolved)
4746
4802
  return null;
@@ -4807,6 +4863,8 @@ function matchQueryHrefCall(callee, args, localNames) {
4807
4863
  return null;
4808
4864
  const triples = [];
4809
4865
  for (const p of obj.properties) {
4866
+ if (p.kind === "spread")
4867
+ return null;
4810
4868
  const v = p.value;
4811
4869
  if (v.kind === "conditional" && isOmitBranch(v.alternate)) {
4812
4870
  triples.push({ guard: v.test, key: p.key, value: v.consequent });
@@ -4994,6 +5052,8 @@ function htmlPropValue(parsed) {
4994
5052
  if (parsed.properties.length !== 1)
4995
5053
  return null;
4996
5054
  const [prop] = parsed.properties;
5055
+ if (prop.kind === "spread")
5056
+ return null;
4997
5057
  if (prop.key !== "__html")
4998
5058
  return null;
4999
5059
  return prop.value;
@@ -5853,8 +5913,15 @@ class XslateTopLevelEmitter {
5853
5913
  unsupported(_raw, _reason) {
5854
5914
  return "''";
5855
5915
  }
5856
- objectLiteral(properties, _raw, _emit) {
5857
- return properties.length === 0 ? "{}" : "''";
5916
+ objectLiteral(properties, _raw, emit) {
5917
+ if (properties.length === 0)
5918
+ return "{}";
5919
+ const literalOf = (run) => `{ ${run.map((p) => `'${escapeKolonSingleQuoted(p.key)}' => ${emit(p.value)}`).join(", ")} }`;
5920
+ if (!properties.some((p) => p.kind === "spread")) {
5921
+ return literalOf(properties);
5922
+ }
5923
+ const segments = groupObjectLiteralSegments(properties, literalOf, emit);
5924
+ return segments.reduce((acc, seg) => `${acc}.merge(${seg})`);
5858
5925
  }
5859
5926
  }
5860
5927
 
@@ -5967,6 +6034,8 @@ function objectLiteralExprToKolonHashref(ctx, expr) {
5967
6034
  function objectLiteralToKolonHashref(ctx, obj) {
5968
6035
  const entries = [];
5969
6036
  for (const prop of obj.properties) {
6037
+ if (prop.kind === "spread")
6038
+ return null;
5970
6039
  if (prop.shorthand)
5971
6040
  return null;
5972
6041
  if (prop.keyKind === "numeric")
@@ -6034,7 +6103,7 @@ function generateDerivedMemoSeed(ctx, ir) {
6034
6103
  for (const step of plan.steps) {
6035
6104
  if (step.kind !== "derived")
6036
6105
  continue;
6037
- const kolon = ctx.convertExpressionToKolon(step.expr, step.parsed);
6106
+ const kolon = ctx.convertExpressionToKolon(step.expr, step.parsed, "value");
6038
6107
  if (kolon === "" || !/\$[A-Za-z_]\w*/.test(kolon))
6039
6108
  continue;
6040
6109
  if (new RegExp(`\\$${step.name}\\b`).test(kolon)) {
@@ -6861,9 +6930,9 @@ ${reason}` : "";
6861
6930
  };
6862
6931
  }
6863
6932
  get memoCtx() {
6864
- return { convertExpressionToKolon: (e, preParsed) => this.convertExpressionToKolon(e, preParsed) };
6933
+ return { convertExpressionToKolon: (e, preParsed, pos) => this.convertExpressionToKolon(e, preParsed, pos) };
6865
6934
  }
6866
- convertExpressionToKolon(expr, preParsed) {
6935
+ convertExpressionToKolon(expr, preParsed, pos = "rendered") {
6867
6936
  let parsed;
6868
6937
  if (preParsed) {
6869
6938
  parsed = preParsed;
@@ -6886,7 +6955,7 @@ ${reason}` : "";
6886
6955
  }
6887
6956
  }
6888
6957
  }
6889
- const support = isSupported(parsed);
6958
+ const support = pos === "value" ? isSupportedValue(parsed) : isSupported(parsed);
6890
6959
  if (!support.supported) {
6891
6960
  this.errors.push({
6892
6961
  code: "BF101",
@@ -1,5 +1,5 @@
1
1
  package BarefootJS::Backend::Xslate;
2
- our $VERSION = "0.31.10";
2
+ our $VERSION = "0.33.0";
3
3
  use strict;
4
4
  use warnings;
5
5
  use utf8;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barefootjs/xslate",
3
- "version": "0.32.0",
3
+ "version": "0.33.1",
4
4
  "description": "Text::Xslate (Kolon) adapter for BarefootJS — compiles IR to .tx templates and ships the Xslate rendering backend; runs under any PSGI/Plack app",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -55,7 +55,7 @@
55
55
  "directory": "packages/adapter-xslate"
56
56
  },
57
57
  "dependencies": {
58
- "@barefootjs/shared": "0.32.0"
58
+ "@barefootjs/shared": "0.33.1"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@barefootjs/jsx": ">=0.2.0",
@@ -72,9 +72,9 @@
72
72
  },
73
73
  "devDependencies": {
74
74
  "@barefootjs/adapter-tests": "0.1.0",
75
- "@barefootjs/jsx": "0.32.0",
76
- "@barefootjs/vite": "0.32.0",
77
- "@barefootjs/client": "0.32.0",
75
+ "@barefootjs/jsx": "0.33.1",
76
+ "@barefootjs/vite": "0.33.1",
77
+ "@barefootjs/client": "0.33.1",
78
78
  "typescript": "^5.0.0",
79
79
  "vite": "^6.0.0"
80
80
  }
@@ -101,7 +101,10 @@ export interface XslateMemoContext {
101
101
  * re-parsing `expr` — mirrors go-template's
102
102
  * `convertExpressionToGo(jsExpr, out?, preParsed?)`. With `preParsed` set,
103
103
  * `expr` is unused for parsing (the converter derives any diagnostic text
104
- * from the tree), so callers may pass `''`.
104
+ * from the tree), so callers may pass `''`. `pos` (default `'rendered'`)
105
+ * must be `'value'` for a derived-seed RHS — an assignment, not a render —
106
+ * so the internal support gate matches the `isSupportedValue`
107
+ * classification the seed plan already used.
105
108
  */
106
- convertExpressionToKolon(expr: string, preParsed?: ParsedExpr): string
109
+ convertExpressionToKolon(expr: string, preParsed?: ParsedExpr, pos?: 'rendered' | 'value'): string
107
110
  }
@@ -12,6 +12,7 @@
12
12
  */
13
13
 
14
14
  import { groupBinaryOperand,
15
+ groupObjectLiteralSegments,
15
16
  isStringConcatBinary,
16
17
  type ParsedExprEmitter,
17
18
  type HigherOrderMethod,
@@ -28,6 +29,7 @@ import { groupBinaryOperand,
28
29
 
29
30
  import type { XslateEmitContext } from '../emit-context.ts'
30
31
  import { XSLATE_TEMPLATE_PRIMITIVES } from '../lib/constants.ts'
32
+ import { escapeKolonSingleQuoted } from '../lib/kolon-naming.ts'
31
33
  import {
32
34
  renderArrayMethod,
33
35
  renderSortMethod,
@@ -590,16 +592,25 @@ export class XslateTopLevelEmitter implements ParsedExprEmitter {
590
592
  return "''"
591
593
  }
592
594
 
593
- objectLiteral(properties: ObjectLiteralProperty[], _raw: string, _emit: (e: ParsedExpr) => string): string {
594
- // The shared `isSupported` gate only ever lets this dispatcher see an
595
- // object literal as the EMPTY (`?? {}`) fallback operand of `??`
596
- // (expression-parser.ts, `logical` case) any other object literal is
597
- // refused before reaching here. Emit Kolon's real empty hashref
598
- // literal, matching the `'{}'` convention `objectLiteralToKolonHashref`
599
- // already uses for the zero-property case in the spread path. A
600
- // populated literal is structurally unreachable given the gate, but
601
- // still degrades safely to the pre-existing empty-string sentinel
602
- // rather than silently dropping keys.
603
- return properties.length === 0 ? '{}' : "''"
595
+ objectLiteral(properties: ObjectLiteralProperty[], _raw: string, emit: (e: ParsedExpr) => string): string {
596
+ // Reachable here in VALUE position (a `.map()` receiver/callback body, an
597
+ // array-literal element, …) since `isSupportedValue` admits an object
598
+ // literal whose every property value is itself supported
599
+ // (expression-parser.ts, `checkSupport`'s `pos` parameter). Emit a Kolon
600
+ // hashref literal, quoted the same way `objectLiteralToKolonHashref`
601
+ // quotes the spread-path literal.
602
+ if (properties.length === 0) return '{}'
603
+ const literalOf = (run: readonly Extract<ObjectLiteralProperty, { kind: 'prop' }>[]) =>
604
+ `{ ${run.map(p => `'${escapeKolonSingleQuoted(p.key)}' => ${emit(p.value)}`).join(', ')} }`
605
+ if (!properties.some(p => p.kind === 'spread')) {
606
+ return literalOf(properties as Extract<ObjectLiteralProperty, { kind: 'prop' }>[])
607
+ }
608
+ // Spread (`{ ...t, editing: false }`, #2696 Step 2): Kolon's builtin
609
+ // `$hashref.merge($v)` method (Text::Xslate::Manual::Builtin) returns a
610
+ // new hashref of the receiver overridden by `$v`'s keys — chaining it
611
+ // across every segment folds ANY interleaving of `prop`/`spread`
612
+ // entries left-to-right, later segments winning, matching JS spread.
613
+ const segments = groupObjectLiteralSegments(properties, literalOf, emit)
614
+ return segments.reduce((acc, seg) => `${acc}.merge(${seg})`)
604
615
  }
605
616
  }
@@ -75,7 +75,8 @@ export function generateDerivedMemoSeed(ctx: XslateMemoContext, ir: ComponentIR)
75
75
  const lines: string[] = []
76
76
  for (const step of plan.steps) {
77
77
  if (step.kind !== 'derived') continue
78
- const kolon = ctx.convertExpressionToKolon(step.expr, step.parsed)
78
+ // `'value'` this RHS is an assignment, not a render (#2696 review).
79
+ const kolon = ctx.convertExpressionToKolon(step.expr, step.parsed, 'value')
79
80
  if (kolon === '' || !/\$[A-Za-z_]\w*/.test(kolon)) continue
80
81
  if (new RegExp(`\\$${step.name}\\b`).test(kolon)) {
81
82
  // Self-referencing lowering (#2679): capture the RHS into a
@@ -88,6 +88,10 @@ export function objectLiteralToKolonHashref(
88
88
  ): string | null {
89
89
  const entries: string[] = []
90
90
  for (const prop of obj.properties) {
91
+ // A spread (`{ ...t }`, #2696 Step 2) isn't a per-key entry this
92
+ // conditional-spread inline lowering can express — bail, same as any
93
+ // other unsupported shape (the caller falls back to the generic path).
94
+ if (prop.kind === 'spread') return null
91
95
  // Shorthand `{ a }` was a `ShorthandPropertyAssignment` (not a
92
96
  // `PropertyAssignment`), so the former parser rejected it — keep refusing.
93
97
  if (prop.shorthand) return null
@@ -57,6 +57,7 @@ import {
57
57
  parseProviderObjectLiteral,
58
58
  parseStyleObjectEntries,
59
59
  isSupported,
60
+ isSupportedValue,
60
61
  emitParsedExpr,
61
62
  emitIRNode,
62
63
  emitAttrValue,
@@ -1692,10 +1693,10 @@ export class XslateAdapter extends BaseAdapter implements IRNodeEmitter<XslateRe
1692
1693
 
1693
1694
  /** Build the narrow context the extracted memo seeding depends on. */
1694
1695
  private get memoCtx(): XslateMemoContext {
1695
- return { convertExpressionToKolon: (e, preParsed) => this.convertExpressionToKolon(e, preParsed) }
1696
+ return { convertExpressionToKolon: (e, preParsed, pos) => this.convertExpressionToKolon(e, preParsed, pos) }
1696
1697
  }
1697
1698
 
1698
- private convertExpressionToKolon(expr: string, preParsed?: ParsedExpr): string {
1699
+ private convertExpressionToKolon(expr: string, preParsed?: ParsedExpr, pos: 'rendered' | 'value' = 'rendered'): string {
1699
1700
  // Parse-first lowering — parity with the Mojo adapter's
1700
1701
  // `convertExpressionToPerl`. Parse the JS expression once, gate it on the
1701
1702
  // shared `isSupported`, and render every supported shape through the AST
@@ -1747,7 +1748,11 @@ export class XslateAdapter extends BaseAdapter implements IRNodeEmitter<XslateRe
1747
1748
  }
1748
1749
  }
1749
1750
 
1750
- const support = isSupported(parsed)
1751
+ // `pos` distinguishes a derived-seed RHS (an assignment, checked via
1752
+ // `isSupportedValue`) from every other, genuinely rendered call site —
1753
+ // the rendered gate would otherwise re-refuse a tree the seed plan
1754
+ // already classified `derived` at value position (#2696 review).
1755
+ const support = pos === 'value' ? isSupportedValue(parsed) : isSupported(parsed)
1751
1756
  if (!support.supported) {
1752
1757
  this.errors.push({
1753
1758
  code: 'BF101',
@@ -56,4 +56,11 @@ export const conformancePins: ConformancePins = {
56
56
  // above is refused.
57
57
  'date-method-uncatalogued': [{ code: 'BF021', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2356' }],
58
58
  'rich-prop-client-read': [{ code: 'BF049', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2648' }],
59
+ // #2667: a ternary/array LITERALLY WRAPPING JSX at a non-children prop
60
+ // position (e.g. `header={cond ? <a/> : <b/>}`) is refused ahead of
61
+ // `adapter.generate()` in the shared jsx-to-ir.ts phase, so it is pinned
62
+ // identically on every adapter (including Hono) — same reasoning as
63
+ // `rich-prop-client-read` above.
64
+ 'jsx-element-prop-ternary': [{ code: 'BF021', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2667' }],
65
+ 'jsx-element-prop-array': [{ code: 'BF021', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2667' }],
59
66
  }
@@ -9,6 +9,12 @@
9
9
 
10
10
  import type { RenderDivergences } from '@barefootjs/jsx'
11
11
 
12
+ // #2696 graduated: `todo-app` / `todo-app-ssr` seeded `todos` opaque
13
+ // because their `.map(t => ({ ...t, editing: false }))` callback body's
14
+ // object-literal SPREAD refused (`checkSupport`). Step 2 admits a spread
15
+ // at value position and the runtime evaluator's `object-literal` case
16
+ // now merges it, so the seed classifies `derived` and SSRs identically
17
+ // to Hono.
12
18
  // #2679 graduated (capture-before-shadow in `generateDerivedMemoSeed`,
13
19
  // packages/adapter-xslate/src/adapter/memo/seed.ts): a self-referencing
14
20
  // derived signal/memo now seeds a throwaway `__bf_seed_<name>` local from
@@ -16,11 +22,4 @@ import type { RenderDivergences } from '@barefootjs/jsx'
16
22
  // the real name off that capture — the same in-template recompute the other
17
23
  // six template-stash backends already had. Keep the file even when the set
18
24
  // is empty — the next divergence lands here, not in a re-created file.
19
- export const renderDivergences: RenderDivergences = {
20
- 'todo-app':
21
- 'the `todos` signal seeds from `(props.initialTodos ?? []).map(t => ({ ...t, editing: false }))` — a different-prop-derived `.map()` chain `extractSsrDefaults` cannot statically resolve, and `computeSsrSeedPlan` classifies it opaque (no in-template recompute), so it seeds `undef`; the non-`/* @client */`-marked `{todos().length > 0 && ...}` toggle-all block SSRs as if there are zero todos regardless of `initialTodos` (https://github.com/piconic-ai/barefootjs/issues/2696)',
22
- 'todo-app-ssr':
23
- "same root cause as `todo-app` (https://github.com/piconic-ai/barefootjs/issues/2696); this fixture's todo-list loop carries no `/* @client */` marker, but Kolon's `for` iterates an undef list as empty rather than raising, so it SSRs an empty `<ul class=\"todo-list\">` with the toggle-all controls also absent, regardless of `initialTodos`",
24
- 'callback-param-shadows-prop':
25
- "the `first` signal seeds from `[{ a: 'p' }].map((title) => title.a).join(',')` — a constant expression `extractSsrDefaults` still cannot statically resolve (`.map()` is unsupported for any receiver) and, unlike the sibling `joined` memo's structurally similar chain, gets no in-template recompute (`computeSsrSeedPlan` classifies it opaque too); `<span>{first()}</span>` SSRs empty instead of `p` (https://github.com/piconic-ai/barefootjs/issues/2696)",
26
- }
25
+ export const renderDivergences: RenderDivergences = {}