@barefootjs/hono 0.34.0 → 0.35.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.
@@ -1 +1 @@
1
- {"version":3,"file":"hono-adapter.d.ts","sourceRoot":"","sources":["../../src/adapter/hono-adapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,MAAM,EAIX,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAElB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,UAAU,EAEf,UAAU,EAQX,MAAM,iBAAiB,CAAA;AAExB;;;;;GAKG;AACH,KAAK,aAAa,GAAG;IACnB,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAA;AAGD,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAuBD,qBAAa,WAAY,SAAQ,UAAW,YAAW,aAAa,CAAC,aAAa,CAAC;IACjF,IAAI,SAAS;IACb,SAAS,SAAS;IAClB,gBAAgB,SAAiC;IAmBjD,mBAAmB,QAAO,OAAO,CAAQ;IAEzC,SAAS,CAAC,SAAS,EAAE,gBAAgB,CAA0B;IAE/D,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,iBAAiB,CAAiB;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A0B;CAInC;AAGD,eAAO,MAAM,WAAW,aAAoB,CAAA"}
@@ -94,7 +94,7 @@ export default ${this.componentName}` : "";
94
94
  generateImports(ir, componentCode) {
95
95
  const lines = [];
96
96
  const utilImports = [];
97
- for (const util of ["bfComment", "bfText", "bfTextEnd", "serializeHydrationProps"]) {
97
+ for (const util of ["bfComment", "escapeCommentKey", "bfText", "bfTextEnd", "serializeHydrationProps"]) {
98
98
  if (new RegExp(`\\b${util}\\b`).test(componentCode)) {
99
99
  utilImports.push(util);
100
100
  }
@@ -465,7 +465,7 @@ export default ${this.componentName}` : "";
465
465
  if (loop.bodyIsMultiRoot) {
466
466
  safeChildren = `<>{bfComment('loop-i')}${children}</>`;
467
467
  } else if (loop.bodyIsItemConditional && loop.key) {
468
- safeChildren = `<>{bfComment('loop-i:' + String(${loop.key}))}${children}</>`;
468
+ safeChildren = `<>{bfComment('loop-i:' + escapeCommentKey(${loop.key}))}${children}</>`;
469
469
  }
470
470
  let chainedArray = applyHonoLoopChain(loop);
471
471
  const iterMethod = loop.method ?? "map";
@@ -57,4 +57,5 @@ export declare function createPortal(_children: unknown, _container?: unknown, _
57
57
  export declare function isSSRPortal(_element: unknown): boolean;
58
58
  export declare function findSiblingSlot(_el: unknown, _slotSelector: string): null;
59
59
  export declare function cleanupPortalPlaceholder(_portalId: string): void;
60
+ export declare function trackPosition(_update: () => void): () => void;
60
61
  //# sourceMappingURL=client-shim.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-shim.d.ts","sourceRoot":"","sources":["../src/client-shim.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,UAAU,CAAA;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAEjD,OAAO,EACL,aAAa,EACb,UAAU,EACV,YAAY,EACZ,MAAM,EACN,MAAM,EAMN,kBAAkB,EAIlB,SAAS,EAGT,UA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AAG,EAAE,MAAM,IAAI,GAAG,IAAI,CAE7C;AACD,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,IAAI,GAAG,IAAI,CAE/C;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAEzC;AACD,wBAAgB,KAAK,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAEvC;AAMD,wBAAgB,YAAY,CAC1B,SAAS,EAAE,OAAO,EAClB,UAAU,CAAC,EAAE,OAAO,EACpB,QAAQ,CAAC,EAAE,OAAO,GACjB,KAAK,CAEP;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAEtD;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAEzE;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAEhE;AAMD,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAI7D"}
@@ -70,10 +70,14 @@ function findSiblingSlot(_el, _slotSelector) {
70
70
  return null;
71
71
  }
72
72
  function cleanupPortalPlaceholder(_portalId) {}
73
+ function trackPosition(_update) {
74
+ return () => {};
75
+ }
73
76
  export {
74
77
  useContext,
75
78
  unwrap,
76
79
  untrack,
80
+ trackPosition,
77
81
  splitProps,
78
82
  queryHref,
79
83
  provideContextSSR,
@@ -1 +1 @@
1
- {"version":3,"file":"conformance-pins.d.ts","sourceRoot":"","sources":["../src/conformance-pins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,eAAO,MAAM,eAAe,EAAE,eAiB7B,CAAA"}
1
+ {"version":3,"file":"conformance-pins.d.ts","sourceRoot":"","sources":["../src/conformance-pins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,eAAO,MAAM,eAAe,EAAE,eAuB7B,CAAA"}
package/dist/index.js CHANGED
@@ -94,7 +94,7 @@ export default ${this.componentName}` : "";
94
94
  generateImports(ir, componentCode) {
95
95
  const lines = [];
96
96
  const utilImports = [];
97
- for (const util of ["bfComment", "bfText", "bfTextEnd", "serializeHydrationProps"]) {
97
+ for (const util of ["bfComment", "escapeCommentKey", "bfText", "bfTextEnd", "serializeHydrationProps"]) {
98
98
  if (new RegExp(`\\b${util}\\b`).test(componentCode)) {
99
99
  utilImports.push(util);
100
100
  }
@@ -465,7 +465,7 @@ export default ${this.componentName}` : "";
465
465
  if (loop.bodyIsMultiRoot) {
466
466
  safeChildren = `<>{bfComment('loop-i')}${children}</>`;
467
467
  } else if (loop.bodyIsItemConditional && loop.key) {
468
- safeChildren = `<>{bfComment('loop-i:' + String(${loop.key}))}${children}</>`;
468
+ safeChildren = `<>{bfComment('loop-i:' + escapeCommentKey(${loop.key}))}${children}</>`;
469
469
  }
470
470
  let chainedArray = applyHonoLoopChain(loop);
471
471
  const iterMethod = loop.method ?? "map";
@@ -666,9 +666,9 @@ var honoAdapter = new HonoAdapter;
666
666
  var conformancePins = {
667
667
  "date-method-uncatalogued": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2356" }],
668
668
  "rich-prop-client-read": [{ code: "BF049", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2648" }],
669
- "jsx-element-prop-ternary": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2667" }],
670
- "jsx-element-prop-array": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2667" }],
671
- "namespace-import-primitive": [{ code: "BF013", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2771" }]
669
+ "jsx-element-prop-ternary": [{ code: "BF021", severity: "error" }],
670
+ "jsx-element-prop-array": [{ code: "BF021", severity: "error" }],
671
+ "namespace-import-primitive": [{ code: "BF013", severity: "error" }]
672
672
  };
673
673
  export {
674
674
  honoAdapter,
package/dist/utils.d.ts CHANGED
@@ -3,6 +3,22 @@
3
3
  * Same signature as Go template bfComment function.
4
4
  */
5
5
  export declare function bfComment(key: string): import("hono/utils/html").HtmlEscapedString;
6
+ /**
7
+ * Neutralize a value for splicing into `bfComment`'s HTML comment content
8
+ * (#2795 follow-up). `comment`/`bfComment` itself is `<!--bf-${text}-->`
9
+ * with no escaping — fine for every OTHER caller (`cond-start:s0`,
10
+ * `loop:l0`, ...), whose text is entirely compiler-generated marker IDs,
11
+ * but the whole-item-conditional loop's `loop-i:<key>` anchor
12
+ * (`hono-adapter.ts`'s `bodyIsItemConditional` branch) carries a
13
+ * user-controlled key. Standard HTML escaping doesn't help inside a
14
+ * comment — only the literal sequence `-->` terminates it early, and
15
+ * `&`/`<`/`>`/`"`/`'` are not special there. The key's exact text doesn't
16
+ * need to round-trip (the client's `mapArrayAnchored` matches items
17
+ * positionally and by its own JS-computed key, never by re-parsing the
18
+ * anchor `Comment.nodeValue`), so replacing every `-` with the
19
+ * visually-similar U+2010 is sufficient and needs no decoding.
20
+ */
21
+ export declare function escapeCommentKey(value: unknown): string;
6
22
  /**
7
23
  * Output opening comment marker for reactive text expressions.
8
24
  * Renders <!--bf:slotId-->
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,+CAEpC;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,+CAEpC;AAED;;;GAGG;AACH,wBAAgB,SAAS,gDAExB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAsCjH"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,+CAEpC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGvD;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,+CAEpC;AAED;;;GAGG;AACH,wBAAgB,SAAS,gDAExB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAsCjH"}
package/dist/utils.js CHANGED
@@ -3,6 +3,11 @@ import { raw } from "hono/html";
3
3
  function bfComment(key) {
4
4
  return raw(`<!--bf-${key}-->`);
5
5
  }
6
+ function escapeCommentKey(value) {
7
+ if (value == null)
8
+ return "";
9
+ return String(value).replace(/-/g, "‐");
10
+ }
6
11
  function bfText(slotId) {
7
12
  return raw(`<!--bf:${slotId}-->`);
8
13
  }
@@ -25,6 +30,7 @@ function serializeHydrationProps(props, componentName) {
25
30
  }
26
31
  export {
27
32
  serializeHydrationProps,
33
+ escapeCommentKey,
28
34
  bfTextEnd,
29
35
  bfText,
30
36
  bfComment
package/dist/vite.js CHANGED
@@ -8,7 +8,7 @@ import { devModuleUrl, loadManifest, resolveDevOrigin, resolveScriptAssets, toPo
8
8
  import ts25 from "typescript";
9
9
 
10
10
  // ../jsx/src/analyzer.ts
11
- import ts10 from "typescript";
11
+ import ts11 from "typescript";
12
12
 
13
13
  // ../jsx/src/expression-parser.ts
14
14
  import ts from "typescript";
@@ -370,6 +370,12 @@ class BindingScope {
370
370
  }
371
371
  }
372
372
 
373
+ // ../jsx/src/ir-to-client-js/safe-html.ts
374
+ function safeHtml(expr) {
375
+ return expr;
376
+ }
377
+ var EMPTY_MARKUP = safeHtml("''");
378
+
373
379
  // ../jsx/src/ir-to-client-js/html-template.ts
374
380
  var VOID_ELEMENTS = new Set([
375
381
  "area",
@@ -427,14 +433,17 @@ function freshCounters() {
427
433
  }
428
434
 
429
435
  // ../jsx/src/analyzer-context.ts
430
- import ts9 from "typescript";
436
+ import ts10 from "typescript";
431
437
 
432
438
  // ../jsx/src/strip-types.ts
433
439
  import ts8 from "typescript";
434
440
 
441
+ // ../jsx/src/reactivity-checker.ts
442
+ import ts9 from "typescript";
443
+
435
444
  // ../jsx/src/analyzer-context.ts
436
- var _typePrinter = ts9.createPrinter({ removeComments: true, omitTrailingSemicolon: true });
437
- var _blankTypeSourceFile = ts9.createSourceFile("__bf_types__.ts", "", ts9.ScriptTarget.Latest);
445
+ var _typePrinter = ts10.createPrinter({ removeComments: true, omitTrailingSemicolon: true });
446
+ var _blankTypeSourceFile = ts10.createSourceFile("__bf_types__.ts", "", ts10.ScriptTarget.Latest);
438
447
 
439
448
  // ../jsx/src/errors.ts
440
449
  var ErrorCodes = {
@@ -656,6 +665,7 @@ var CLIENT_EXPORTS = new Set([
656
665
  "isSSRPortal",
657
666
  "findSiblingSlot",
658
667
  "cleanupPortalPlaceholder",
668
+ "trackPosition",
659
669
  "createSearchParams",
660
670
  "queryHref",
661
671
  "formatDate",
@@ -666,46 +676,46 @@ function extractFreeIdentifiersFromNode(node) {
666
676
  const ids = new Set;
667
677
  const boundNames = new Set;
668
678
  function addBindingNames(name, out) {
669
- if (ts10.isIdentifier(name))
679
+ if (ts11.isIdentifier(name))
670
680
  out.push(name.text);
671
- else if (ts10.isObjectBindingPattern(name))
681
+ else if (ts11.isObjectBindingPattern(name))
672
682
  name.elements.forEach((e) => addBindingNames(e.name, out));
673
- else if (ts10.isArrayBindingPattern(name))
683
+ else if (ts11.isArrayBindingPattern(name))
674
684
  name.elements.forEach((e) => {
675
- if (!ts10.isOmittedExpression(e))
685
+ if (!ts11.isOmittedExpression(e))
676
686
  addBindingNames(e.name, out);
677
687
  });
678
688
  }
679
689
  function visit(n) {
680
- if (ts10.isTypeNode(n))
690
+ if (ts11.isTypeNode(n))
681
691
  return;
682
- if (ts10.isIdentifier(n)) {
692
+ if (ts11.isIdentifier(n)) {
683
693
  const parent = n.parent;
684
- if (parent && ts10.isPropertyAccessExpression(parent) && parent.name === n)
694
+ if (parent && ts11.isPropertyAccessExpression(parent) && parent.name === n)
685
695
  return;
686
- if (parent && ts10.isPropertyAssignment(parent) && parent.name === n)
696
+ if (parent && ts11.isPropertyAssignment(parent) && parent.name === n)
687
697
  return;
688
- if (parent && ts10.isParameter(parent) && parent.name === n)
698
+ if (parent && ts11.isParameter(parent) && parent.name === n)
689
699
  return;
690
- if (parent && ts10.isVariableDeclaration(parent) && parent.name === n)
700
+ if (parent && ts11.isVariableDeclaration(parent) && parent.name === n)
691
701
  return;
692
702
  if (boundNames.has(n.text))
693
703
  return;
694
704
  ids.add(n.text);
695
705
  return;
696
706
  }
697
- if (ts10.isArrowFunction(n)) {
707
+ if (ts11.isArrowFunction(n)) {
698
708
  const params = [];
699
709
  for (const p of n.parameters)
700
710
  addBindingNames(p.name, params);
701
711
  for (const name of params)
702
712
  boundNames.add(name);
703
- ts10.forEachChild(n, visit);
713
+ ts11.forEachChild(n, visit);
704
714
  for (const name of params)
705
715
  boundNames.delete(name);
706
716
  return;
707
717
  }
708
- ts10.forEachChild(n, visit);
718
+ ts11.forEachChild(n, visit);
709
719
  }
710
720
  visit(node);
711
721
  return ids;
@@ -716,7 +726,8 @@ var BROWSER_ONLY_CLIENT_APIS = new Set([
716
726
  "createPortal",
717
727
  "isSSRPortal",
718
728
  "findSiblingSlot",
719
- "cleanupPortalPlaceholder"
729
+ "cleanupPortalPlaceholder",
730
+ "trackPosition"
720
731
  ]);
721
732
  var REACTIVE_PRIMITIVES = new Set([
722
733
  "createSignal",
@@ -764,7 +775,7 @@ var REACTIVE_BINDING_KINDS = new Set([
764
775
  ]);
765
776
 
766
777
  // ../jsx/src/module-exports.ts
767
- import ts11 from "typescript";
778
+ import ts12 from "typescript";
768
779
  function formatParamWithType(p) {
769
780
  const rest = p.isRest ? "..." : "";
770
781
  const optional = p.optional ? "?" : "";
@@ -799,21 +810,21 @@ function findAssignedNames(bodyText, candidates) {
799
810
  const assigned = new Set;
800
811
  if (candidates.size === 0)
801
812
  return assigned;
802
- const sf = ts11.createSourceFile("bf-assignment-scan.tsx", bodyText, ts11.ScriptTarget.Latest, false, ts11.ScriptKind.TSX);
813
+ const sf = ts12.createSourceFile("bf-assignment-scan.tsx", bodyText, ts12.ScriptTarget.Latest, false, ts12.ScriptKind.TSX);
803
814
  const record = (target) => {
804
- if (ts11.isIdentifier(target) && candidates.has(target.text)) {
815
+ if (ts12.isIdentifier(target) && candidates.has(target.text)) {
805
816
  assigned.add(target.text);
806
817
  }
807
818
  };
808
819
  const visit = (node) => {
809
- if (ts11.isBinaryExpression(node) && isAssignmentOperator(node.operatorToken.kind)) {
820
+ if (ts12.isBinaryExpression(node) && isAssignmentOperator(node.operatorToken.kind)) {
810
821
  record(node.left);
811
- } else if ((ts11.isPrefixUnaryExpression(node) || ts11.isPostfixUnaryExpression(node)) && (node.operator === ts11.SyntaxKind.PlusPlusToken || node.operator === ts11.SyntaxKind.MinusMinusToken)) {
822
+ } else if ((ts12.isPrefixUnaryExpression(node) || ts12.isPostfixUnaryExpression(node)) && (node.operator === ts12.SyntaxKind.PlusPlusToken || node.operator === ts12.SyntaxKind.MinusMinusToken)) {
812
823
  record(node.operand);
813
824
  }
814
- ts11.forEachChild(node, visit);
825
+ ts12.forEachChild(node, visit);
815
826
  };
816
- ts11.forEachChild(sf, visit);
827
+ ts12.forEachChild(sf, visit);
817
828
  return assigned;
818
829
  }
819
830
  function closeOverWritersOfMutableBindings(primaryRefs, declarations, mutableNames) {
@@ -836,12 +847,9 @@ function closeOverWritersOfMutableBindings(primaryRefs, declarations, mutableNam
836
847
  return reachable;
837
848
  }
838
849
  function isAssignmentOperator(kind) {
839
- return kind >= ts11.SyntaxKind.FirstAssignment && kind <= ts11.SyntaxKind.LastAssignment;
850
+ return kind >= ts12.SyntaxKind.FirstAssignment && kind <= ts12.SyntaxKind.LastAssignment;
840
851
  }
841
852
 
842
- // ../jsx/src/reactivity-checker.ts
843
- import ts12 from "typescript";
844
-
845
853
  // ../jsx/src/free-refs.ts
846
854
  import ts13 from "typescript";
847
855
  var _bindingMapCache = new WeakMap;
@@ -2498,7 +2506,7 @@ export default ${this.componentName}` : "";
2498
2506
  generateImports(ir, componentCode) {
2499
2507
  const lines = [];
2500
2508
  const utilImports = [];
2501
- for (const util of ["bfComment", "bfText", "bfTextEnd", "serializeHydrationProps"]) {
2509
+ for (const util of ["bfComment", "escapeCommentKey", "bfText", "bfTextEnd", "serializeHydrationProps"]) {
2502
2510
  if (new RegExp(`\\b${util}\\b`).test(componentCode)) {
2503
2511
  utilImports.push(util);
2504
2512
  }
@@ -2869,7 +2877,7 @@ export default ${this.componentName}` : "";
2869
2877
  if (loop.bodyIsMultiRoot) {
2870
2878
  safeChildren = `<>{bfComment('loop-i')}${children}</>`;
2871
2879
  } else if (loop.bodyIsItemConditional && loop.key) {
2872
- safeChildren = `<>{bfComment('loop-i:' + String(${loop.key}))}${children}</>`;
2880
+ safeChildren = `<>{bfComment('loop-i:' + escapeCommentKey(${loop.key}))}${children}</>`;
2873
2881
  }
2874
2882
  let chainedArray = applyHonoLoopChain(loop);
2875
2883
  const iterMethod = loop.method ?? "map";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barefootjs/hono",
3
- "version": "0.34.0",
3
+ "version": "0.35.1",
4
4
  "description": "Hono integration for BarefootJS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -122,7 +122,7 @@
122
122
  },
123
123
  "devDependencies": {
124
124
  "@barefootjs/adapter-tests": "0.1.0",
125
- "@barefootjs/vite": "0.34.0",
125
+ "@barefootjs/vite": "0.35.1",
126
126
  "@types/jsdom": "^27.0.0",
127
127
  "hono": "^4.6.0",
128
128
  "jsdom": "^27.3.0",
@@ -271,7 +271,7 @@ export class HonoAdapter extends JsxAdapter implements IRNodeEmitter<HonoRenderC
271
271
  // Only import bfComment/bfText/bfTextEnd/serializeHydrationProps utilities
272
272
  // that are actually used
273
273
  const utilImports: string[] = []
274
- for (const util of ['bfComment', 'bfText', 'bfTextEnd', 'serializeHydrationProps']) {
274
+ for (const util of ['bfComment', 'escapeCommentKey', 'bfText', 'bfTextEnd', 'serializeHydrationProps']) {
275
275
  if (new RegExp(`\\b${util}\\b`).test(componentCode)) {
276
276
  utilImports.push(util)
277
277
  }
@@ -1035,8 +1035,10 @@ export class HonoAdapter extends JsxAdapter implements IRNodeEmitter<HonoRenderC
1035
1035
  // renders nothing), carrying the key so the client's
1036
1036
  // `mapArrayAnchored` can hydrate every SSR-rendered item by its anchor.
1037
1037
  // `bfComment(k)` emits `<!--bf-${k}-->`, so the `loop-i:` argument
1038
- // yields `<!--bf-loop-i:KEY-->`.
1039
- safeChildren = `<>{bfComment('loop-i:' + String(${loop.key}))}${children}</>`
1038
+ // yields `<!--bf-loop-i:KEY-->`. `escapeCommentKey` (#2795 follow-up)
1039
+ // neutralizes `-` so a key can't spell `-->` and close the comment
1040
+ // early — see its docstring in `utils.ts`.
1041
+ safeChildren = `<>{bfComment('loop-i:' + escapeCommentKey(${loop.key}))}${children}</>`
1040
1042
  }
1041
1043
  // Apply chained `.sort()` / `.filter()` extracted to
1042
1044
  // `loop.sortComparator` / `loop.filterPredicate` (#1448 Tier B).
@@ -183,3 +183,13 @@ export function findSiblingSlot(_el: unknown, _slotSelector: string): null {
183
183
  export function cleanupPortalPlaceholder(_portalId: string): void {
184
184
  // no-op
185
185
  }
186
+
187
+ // ---------------------------------------------------------------------------
188
+ // Floating-element positioning — geometry exists only in the browser
189
+ // ---------------------------------------------------------------------------
190
+
191
+ export function trackPosition(_update: () => void): () => void {
192
+ return () => {
193
+ // no-op
194
+ }
195
+ }
@@ -14,18 +14,24 @@ import type { ConformancePins } from '@barefootjs/jsx'
14
14
  export const conformancePins: ConformancePins = {
15
15
  'date-method-uncatalogued': [{ code: 'BF021', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2356' }],
16
16
  'rich-prop-client-read': [{ code: 'BF049', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2648' }],
17
- // #2667: a ternary/array LITERALLY WRAPPING JSX at a non-children prop
17
+ // A ternary or array literal LITERALLY WRAPPING JSX at a non-children prop
18
18
  // position (e.g. `header={cond ? <a/> : <b/>}`) is refused ahead of
19
19
  // `adapter.generate()` in the shared jsx-to-ir.ts phase, so it is pinned
20
20
  // identically on every adapter (including Hono) — same reasoning as
21
- // `rich-prop-client-read` above.
22
- 'jsx-element-prop-ternary': [{ code: 'BF021', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2667' }],
23
- 'jsx-element-prop-array': [{ code: 'BF021', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2667' }],
24
- // #2771: a reactive primitive invoked through a namespace import
21
+ // `rich-prop-client-read` above. This is the permanent, intended behavior
22
+ // (formerly tracked as #2667, closed): the issue's own acceptance criteria
23
+ // treated a loud refusal as fully resolving the silent-divergence bug, so
24
+ // no open issue tracks further work here.
25
+ 'jsx-element-prop-ternary': [{ code: 'BF021', severity: 'error' }],
26
+ 'jsx-element-prop-array': [{ code: 'BF021', severity: 'error' }],
27
+ // A reactive primitive invoked through a namespace import
25
28
  // (`import * as bf from '@barefootjs/client'`, `bf.createSignal(...)`)
26
29
  // that the analyzer's checker-less fast path cannot recognize refuses
27
30
  // loudly (BF013) instead of silently dropping the declaration — fired
28
31
  // in the shared analyzer pass ahead of any adapter's `adapter.generate()`,
29
- // so all nine adapters (including Hono) pin this identically.
30
- 'namespace-import-primitive': [{ code: 'BF013', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2771' }],
32
+ // so all nine adapters (including Hono) pin this identically. A compile
33
+ // that supplies a shared `ts.Program` (e.g. via `@barefootjs/vite`)
34
+ // resolves the primitive normally and never reaches this refusal (formerly
35
+ // tracked as #2771, closed) — no open issue tracks further work.
36
+ 'namespace-import-primitive': [{ code: 'BF013', severity: 'error' }],
31
37
  }
package/src/utils.ts CHANGED
@@ -8,6 +8,26 @@ export function bfComment(key: string) {
8
8
  return raw(`<!--bf-${key}-->`)
9
9
  }
10
10
 
11
+ /**
12
+ * Neutralize a value for splicing into `bfComment`'s HTML comment content
13
+ * (#2795 follow-up). `comment`/`bfComment` itself is `<!--bf-${text}-->`
14
+ * with no escaping — fine for every OTHER caller (`cond-start:s0`,
15
+ * `loop:l0`, ...), whose text is entirely compiler-generated marker IDs,
16
+ * but the whole-item-conditional loop's `loop-i:<key>` anchor
17
+ * (`hono-adapter.ts`'s `bodyIsItemConditional` branch) carries a
18
+ * user-controlled key. Standard HTML escaping doesn't help inside a
19
+ * comment — only the literal sequence `-->` terminates it early, and
20
+ * `&`/`<`/`>`/`"`/`'` are not special there. The key's exact text doesn't
21
+ * need to round-trip (the client's `mapArrayAnchored` matches items
22
+ * positionally and by its own JS-computed key, never by re-parsing the
23
+ * anchor `Comment.nodeValue`), so replacing every `-` with the
24
+ * visually-similar U+2010 is sufficient and needs no decoding.
25
+ */
26
+ export function escapeCommentKey(value: unknown): string {
27
+ if (value == null) return ''
28
+ return String(value).replace(/-/g, '‐')
29
+ }
30
+
11
31
  /**
12
32
  * Output opening comment marker for reactive text expressions.
13
33
  * Renders <!--bf:slotId-->