@barefootjs/hono 0.33.3 → 0.33.6

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"}
@@ -463,7 +463,7 @@ export default ${this.componentName}` : "";
463
463
  const preamble = loop.preamble?.ssrText;
464
464
  let safeChildren = children.startsWith("{") ? `<>${children}</>` : children;
465
465
  if (loop.bodyIsMultiRoot) {
466
- safeChildren = `<>{bfComment('bf-loop-i')}${children}</>`;
466
+ safeChildren = `<>{bfComment('loop-i')}${children}</>`;
467
467
  } else if (loop.bodyIsItemConditional && loop.key) {
468
468
  safeChildren = `<>{bfComment('loop-i:' + String(${loop.key}))}${children}</>`;
469
469
  }
@@ -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,eAU7B,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,eAiB7B,CAAA"}
package/dist/index.js CHANGED
@@ -463,7 +463,7 @@ export default ${this.componentName}` : "";
463
463
  const preamble = loop.preamble?.ssrText;
464
464
  let safeChildren = children.startsWith("{") ? `<>${children}</>` : children;
465
465
  if (loop.bodyIsMultiRoot) {
466
- safeChildren = `<>{bfComment('bf-loop-i')}${children}</>`;
466
+ safeChildren = `<>{bfComment('loop-i')}${children}</>`;
467
467
  } else if (loop.bodyIsItemConditional && loop.key) {
468
468
  safeChildren = `<>{bfComment('loop-i:' + String(${loop.key}))}${children}</>`;
469
469
  }
@@ -667,7 +667,8 @@ 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
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" }]
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" }]
671
672
  };
672
673
  export {
673
674
  honoAdapter,
@@ -1 +1 @@
1
- {"version":3,"file":"test-render.d.ts","sourceRoot":"","sources":["../src/test-render.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAStD,MAAM,WAAW,aAAa;IAC5B,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,8BAA8B;IAC9B,OAAO,EAAE,eAAe,CAAA;IACxB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,qDAAqD;IACrD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACnC;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACzC;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AA2BD,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAsLjF"}
1
+ {"version":3,"file":"test-render.d.ts","sourceRoot":"","sources":["../src/test-render.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAStD,MAAM,WAAW,aAAa;IAC5B,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,8BAA8B;IAC9B,OAAO,EAAE,eAAe,CAAA;IACxB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,qDAAqD;IACrD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACnC;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACzC;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAkDD,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAqMjF"}
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 ts9 from "typescript";
11
+ import ts10 from "typescript";
12
12
 
13
13
  // ../jsx/src/expression-parser.ts
14
14
  import ts from "typescript";
@@ -84,7 +84,7 @@ var EVAL_MATH_METHODS = new Set([
84
84
  ]);
85
85
 
86
86
  // ../jsx/src/prop-rewrite.ts
87
- import ts5 from "typescript";
87
+ import ts7 from "typescript";
88
88
 
89
89
  // ../jsx/src/ir-to-client-js/utils.ts
90
90
  import ts3 from "typescript";
@@ -242,18 +242,45 @@ function escapeHtml(text) {
242
242
  return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
243
243
  }
244
244
  // ../jsx/src/ir-to-client-js/csr-substitute.ts
245
+ import ts5 from "typescript";
246
+
247
+ // ../jsx/src/props-binding.ts
245
248
  import ts4 from "typescript";
249
+ function isIdentifierName(key) {
250
+ if (key.length === 0)
251
+ return false;
252
+ for (let i = 0;i < key.length; ) {
253
+ const cp = key.codePointAt(i);
254
+ const ok = i === 0 ? ts4.isIdentifierStart(cp, ts4.ScriptTarget.Latest) : ts4.isIdentifierPart(cp, ts4.ScriptTarget.Latest);
255
+ if (!ok)
256
+ return false;
257
+ i += cp > 65535 ? 2 : 1;
258
+ }
259
+ return true;
260
+ }
261
+ function propsDestructureBinding(p) {
262
+ const callerKey = p.sourceName ?? p.name;
263
+ const localName = p.name;
264
+ const binding = callerKey === localName ? localName : `${isIdentifierName(callerKey) ? callerKey : JSON.stringify(callerKey)}: ${localName}`;
265
+ return p.defaultValue ? `${binding} = ${p.defaultValue}` : binding;
266
+ }
267
+ var EMPTY_SET = new Set;
268
+
269
+ // ../jsx/src/ir-to-client-js/csr-substitute.ts
246
270
  function extractFreeIdentifiersFromText(text) {
247
271
  if (!text || text.trim().length === 0)
248
272
  return new Set;
249
- const sf = ts4.createSourceFile("__free_ids__.ts", `(${text});`, ts4.ScriptTarget.Latest, true, ts4.ScriptKind.TS);
273
+ const sf = ts5.createSourceFile("__free_ids__.ts", `(${text});`, ts5.ScriptTarget.Latest, true, ts5.ScriptKind.TS);
250
274
  const stmt = sf.statements[0];
251
- if (!stmt || !ts4.isExpressionStatement(stmt))
275
+ if (!stmt || !ts5.isExpressionStatement(stmt))
252
276
  return new Set;
253
- const expr = ts4.isParenthesizedExpression(stmt.expression) ? stmt.expression.expression : stmt.expression;
277
+ const expr = ts5.isParenthesizedExpression(stmt.expression) ? stmt.expression.expression : stmt.expression;
254
278
  return extractFreeIdentifiersFromNode(expr);
255
279
  }
256
280
 
281
+ // ../jsx/src/ir-to-client-js/rewrite-props-object.ts
282
+ import ts6 from "typescript";
283
+
257
284
  // ../jsx/src/scope/binding-scope.ts
258
285
  class BindingScope {
259
286
  frames;
@@ -375,27 +402,6 @@ var SKELETON_PATH_FORCE_CLOSE_GROUPS = [
375
402
  new Set(["li"])
376
403
  ];
377
404
 
378
- // ../jsx/src/props-binding.ts
379
- import ts6 from "typescript";
380
- function isIdentifierName(key) {
381
- if (key.length === 0)
382
- return false;
383
- for (let i = 0;i < key.length; ) {
384
- const cp = key.codePointAt(i);
385
- const ok = i === 0 ? ts6.isIdentifierStart(cp, ts6.ScriptTarget.Latest) : ts6.isIdentifierPart(cp, ts6.ScriptTarget.Latest);
386
- if (!ok)
387
- return false;
388
- i += cp > 65535 ? 2 : 1;
389
- }
390
- return true;
391
- }
392
- function propsDestructureBinding(p) {
393
- const callerKey = p.sourceName ?? p.name;
394
- const localName = p.name;
395
- const binding = callerKey === localName ? localName : `${isIdentifierName(callerKey) ? callerKey : JSON.stringify(callerKey)}: ${localName}`;
396
- return p.defaultValue ? `${binding} = ${p.defaultValue}` : binding;
397
- }
398
-
399
405
  // ../jsx/src/instrumentation.ts
400
406
  var _counters = freshCounters();
401
407
  function freshCounters() {
@@ -409,20 +415,21 @@ function freshCounters() {
409
415
  }
410
416
 
411
417
  // ../jsx/src/analyzer-context.ts
412
- import ts8 from "typescript";
418
+ import ts9 from "typescript";
413
419
 
414
420
  // ../jsx/src/strip-types.ts
415
- import ts7 from "typescript";
421
+ import ts8 from "typescript";
416
422
 
417
423
  // ../jsx/src/analyzer-context.ts
418
- var _typePrinter = ts8.createPrinter({ removeComments: true, omitTrailingSemicolon: true });
419
- var _blankTypeSourceFile = ts8.createSourceFile("__bf_types__.ts", "", ts8.ScriptTarget.Latest);
424
+ var _typePrinter = ts9.createPrinter({ removeComments: true, omitTrailingSemicolon: true });
425
+ var _blankTypeSourceFile = ts9.createSourceFile("__bf_types__.ts", "", ts9.ScriptTarget.Latest);
420
426
 
421
427
  // ../jsx/src/errors.ts
422
428
  var ErrorCodes = {
423
429
  MISSING_USE_CLIENT: "BF001",
424
430
  CLIENT_IMPORTING_SERVER: "BF003",
425
431
  SIGNAL_OUTSIDE_COMPONENT: "BF011",
432
+ PRIMITIVE_VIA_NAMESPACE_IMPORT: "BF013",
426
433
  UNSUPPORTED_JSX_PATTERN: "BF021",
427
434
  MISSING_KEY_IN_LIST: "BF023",
428
435
  MISSING_KEY_IN_NESTED_LIST: "BF024",
@@ -455,6 +462,7 @@ var errorMessages = {
455
462
  [ErrorCodes.MISSING_USE_CLIENT]: "'use client' directive required for components with createSignal or event handlers",
456
463
  [ErrorCodes.CLIENT_IMPORTING_SERVER]: "Client component cannot import server component",
457
464
  [ErrorCodes.SIGNAL_OUTSIDE_COMPONENT]: "Module-level reactive declaration (createSignal / createMemo) is not allowed. " + "The downstream codegen drops the declaration silently and every reference becomes a ReferenceError at SSR and at hydrate. " + "Move the declaration inside a component function so each mount gets its own state.",
465
+ [ErrorCodes.PRIMITIVE_VIA_NAMESPACE_IMPORT]: "Reactive primitive called through a namespace import of '@barefootjs/client' (import * as ns) is not recognized; " + "the declaration is dropped and its references throw ReferenceError at hydrate. Import the primitive by name instead.",
458
466
  [ErrorCodes.UNSUPPORTED_JSX_PATTERN]: "Unsupported JSX pattern",
459
467
  [ErrorCodes.MISSING_KEY_IN_LIST]: "Missing key attribute in list rendering. Add a key prop for efficient updates",
460
468
  [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",
@@ -646,46 +654,46 @@ function extractFreeIdentifiersFromNode(node) {
646
654
  const ids = new Set;
647
655
  const boundNames = new Set;
648
656
  function addBindingNames(name, out) {
649
- if (ts9.isIdentifier(name))
657
+ if (ts10.isIdentifier(name))
650
658
  out.push(name.text);
651
- else if (ts9.isObjectBindingPattern(name))
659
+ else if (ts10.isObjectBindingPattern(name))
652
660
  name.elements.forEach((e) => addBindingNames(e.name, out));
653
- else if (ts9.isArrayBindingPattern(name))
661
+ else if (ts10.isArrayBindingPattern(name))
654
662
  name.elements.forEach((e) => {
655
- if (!ts9.isOmittedExpression(e))
663
+ if (!ts10.isOmittedExpression(e))
656
664
  addBindingNames(e.name, out);
657
665
  });
658
666
  }
659
667
  function visit(n) {
660
- if (ts9.isTypeNode(n))
668
+ if (ts10.isTypeNode(n))
661
669
  return;
662
- if (ts9.isIdentifier(n)) {
670
+ if (ts10.isIdentifier(n)) {
663
671
  const parent = n.parent;
664
- if (parent && ts9.isPropertyAccessExpression(parent) && parent.name === n)
672
+ if (parent && ts10.isPropertyAccessExpression(parent) && parent.name === n)
665
673
  return;
666
- if (parent && ts9.isPropertyAssignment(parent) && parent.name === n)
674
+ if (parent && ts10.isPropertyAssignment(parent) && parent.name === n)
667
675
  return;
668
- if (parent && ts9.isParameter(parent) && parent.name === n)
676
+ if (parent && ts10.isParameter(parent) && parent.name === n)
669
677
  return;
670
- if (parent && ts9.isVariableDeclaration(parent) && parent.name === n)
678
+ if (parent && ts10.isVariableDeclaration(parent) && parent.name === n)
671
679
  return;
672
680
  if (boundNames.has(n.text))
673
681
  return;
674
682
  ids.add(n.text);
675
683
  return;
676
684
  }
677
- if (ts9.isArrowFunction(n)) {
685
+ if (ts10.isArrowFunction(n)) {
678
686
  const params = [];
679
687
  for (const p of n.parameters)
680
688
  addBindingNames(p.name, params);
681
689
  for (const name of params)
682
690
  boundNames.add(name);
683
- ts9.forEachChild(n, visit);
691
+ ts10.forEachChild(n, visit);
684
692
  for (const name of params)
685
693
  boundNames.delete(name);
686
694
  return;
687
695
  }
688
- ts9.forEachChild(n, visit);
696
+ ts10.forEachChild(n, visit);
689
697
  }
690
698
  visit(node);
691
699
  return ids;
@@ -708,7 +716,7 @@ var REACTIVE_PRIMITIVES = new Set([
708
716
  ]);
709
717
 
710
718
  // ../jsx/src/jsx-to-ir.ts
711
- import ts13 from "typescript";
719
+ import ts14 from "typescript";
712
720
 
713
721
  // ../jsx/src/types.ts
714
722
  var SCOPE_FORBIDDEN = {
@@ -744,7 +752,7 @@ var REACTIVE_BINDING_KINDS = new Set([
744
752
  ]);
745
753
 
746
754
  // ../jsx/src/module-exports.ts
747
- import ts10 from "typescript";
755
+ import ts11 from "typescript";
748
756
  function formatParamWithType(p) {
749
757
  const rest = p.isRest ? "..." : "";
750
758
  const optional = p.optional ? "?" : "";
@@ -779,21 +787,21 @@ function findAssignedNames(bodyText, candidates) {
779
787
  const assigned = new Set;
780
788
  if (candidates.size === 0)
781
789
  return assigned;
782
- const sf = ts10.createSourceFile("bf-assignment-scan.tsx", bodyText, ts10.ScriptTarget.Latest, false, ts10.ScriptKind.TSX);
790
+ const sf = ts11.createSourceFile("bf-assignment-scan.tsx", bodyText, ts11.ScriptTarget.Latest, false, ts11.ScriptKind.TSX);
783
791
  const record = (target) => {
784
- if (ts10.isIdentifier(target) && candidates.has(target.text)) {
792
+ if (ts11.isIdentifier(target) && candidates.has(target.text)) {
785
793
  assigned.add(target.text);
786
794
  }
787
795
  };
788
796
  const visit = (node) => {
789
- if (ts10.isBinaryExpression(node) && isAssignmentOperator(node.operatorToken.kind)) {
797
+ if (ts11.isBinaryExpression(node) && isAssignmentOperator(node.operatorToken.kind)) {
790
798
  record(node.left);
791
- } else if ((ts10.isPrefixUnaryExpression(node) || ts10.isPostfixUnaryExpression(node)) && (node.operator === ts10.SyntaxKind.PlusPlusToken || node.operator === ts10.SyntaxKind.MinusMinusToken)) {
799
+ } else if ((ts11.isPrefixUnaryExpression(node) || ts11.isPostfixUnaryExpression(node)) && (node.operator === ts11.SyntaxKind.PlusPlusToken || node.operator === ts11.SyntaxKind.MinusMinusToken)) {
792
800
  record(node.operand);
793
801
  }
794
- ts10.forEachChild(node, visit);
802
+ ts11.forEachChild(node, visit);
795
803
  };
796
- ts10.forEachChild(sf, visit);
804
+ ts11.forEachChild(sf, visit);
797
805
  return assigned;
798
806
  }
799
807
  function closeOverWritersOfMutableBindings(primaryRefs, declarations, mutableNames) {
@@ -816,14 +824,14 @@ function closeOverWritersOfMutableBindings(primaryRefs, declarations, mutableNam
816
824
  return reachable;
817
825
  }
818
826
  function isAssignmentOperator(kind) {
819
- return kind >= ts10.SyntaxKind.FirstAssignment && kind <= ts10.SyntaxKind.LastAssignment;
827
+ return kind >= ts11.SyntaxKind.FirstAssignment && kind <= ts11.SyntaxKind.LastAssignment;
820
828
  }
821
829
 
822
830
  // ../jsx/src/reactivity-checker.ts
823
- import ts11 from "typescript";
831
+ import ts12 from "typescript";
824
832
 
825
833
  // ../jsx/src/free-refs.ts
826
- import ts12 from "typescript";
834
+ import ts13 from "typescript";
827
835
  var _bindingMapCache = new WeakMap;
828
836
 
829
837
  // ../jsx/src/to-locale-date-lowering.ts
@@ -1271,16 +1279,16 @@ var KEYWORDS_AND_GLOBALS = new Set([
1271
1279
  ]);
1272
1280
 
1273
1281
  // ../jsx/src/ir-to-client-js/walk-prop-accesses.ts
1274
- import ts14 from "typescript";
1282
+ import ts15 from "typescript";
1275
1283
 
1276
1284
  // ../jsx/src/ir-to-client-js/imports.ts
1277
- import ts16 from "typescript";
1285
+ import ts17 from "typescript";
1278
1286
 
1279
1287
  // ../jsx/src/value-references.ts
1280
- import ts15 from "typescript";
1288
+ import ts16 from "typescript";
1281
1289
 
1282
1290
  // ../jsx/src/relocate.ts
1283
- import ts17 from "typescript";
1291
+ import ts18 from "typescript";
1284
1292
 
1285
1293
  // ../jsx/src/lowering-registry.ts
1286
1294
  var plugins = [];
@@ -1459,10 +1467,10 @@ function formatDateLocalNames(metadata) {
1459
1467
  }
1460
1468
 
1461
1469
  // ../jsx/src/ir-to-client-js/prune-unused-prop-extractions.ts
1462
- import ts18 from "typescript";
1470
+ import ts19 from "typescript";
1463
1471
 
1464
1472
  // ../jsx/src/ir-to-client-js/control-flow/plan/lazy-preamble.ts
1465
- import ts19 from "typescript";
1473
+ import ts20 from "typescript";
1466
1474
  var NO_PREAMBLE = {
1467
1475
  lazySafe: true,
1468
1476
  facts: { declaredNames: new Set, freeNames: new Set }
@@ -1512,7 +1520,7 @@ var INERT_BINDING_GLOBALS = new Set([
1512
1520
  ]);
1513
1521
 
1514
1522
  // ../jsx/src/ir-to-client-js/emit-reactive.ts
1515
- import ts20 from "typescript";
1523
+ import ts21 from "typescript";
1516
1524
 
1517
1525
  // ../jsx/src/ir-to-client-js/control-flow/stringify/event-delegation.ts
1518
1526
  var NON_BUBBLING_EVENTS = new Set([
@@ -1526,9 +1534,6 @@ var NON_BUBBLING_EVENTS = new Set([
1526
1534
  "pointerleave"
1527
1535
  ]);
1528
1536
 
1529
- // ../jsx/src/ir-to-client-js/rewrite-props-object.ts
1530
- import ts21 from "typescript";
1531
-
1532
1537
  // ../jsx/src/ir-to-client-js/source-map.ts
1533
1538
  var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1534
1539
  function encodeVLQ(value) {
@@ -2862,7 +2867,7 @@ export default ${this.componentName}` : "";
2862
2867
  const preamble = loop.preamble?.ssrText;
2863
2868
  let safeChildren = children.startsWith("{") ? `<>${children}</>` : children;
2864
2869
  if (loop.bodyIsMultiRoot) {
2865
- safeChildren = `<>{bfComment('bf-loop-i')}${children}</>`;
2870
+ safeChildren = `<>{bfComment('loop-i')}${children}</>`;
2866
2871
  } else if (loop.bodyIsItemConditional && loop.key) {
2867
2872
  safeChildren = `<>{bfComment('loop-i:' + String(${loop.key}))}${children}</>`;
2868
2873
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barefootjs/hono",
3
- "version": "0.33.3",
3
+ "version": "0.33.6",
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.33.3",
125
+ "@barefootjs/vite": "0.33.6",
126
126
  "@types/jsdom": "^27.0.0",
127
127
  "hono": "^4.6.0",
128
128
  "jsdom": "^27.3.0",
@@ -1023,10 +1023,12 @@ export class HonoAdapter extends JsxAdapter implements IRNodeEmitter<HonoRenderC
1023
1023
  // in a Fragment so the prefix and the existing children share an arrow
1024
1024
  // expression body.
1025
1025
  if (loop.bodyIsMultiRoot) {
1026
- // Per-item start marker: BF_LOOP_ITEM ('bf-loop-i'). Hardcoded
1027
- // literal here to match the adapter's existing convention of
1028
- // emitting comment-marker strings directly.
1029
- safeChildren = `<>{bfComment('bf-loop-i')}${children}</>`
1026
+ // Per-item start marker: BF_LOOP_ITEM ('bf-loop-i'). `bfComment(k)`
1027
+ // emits `<!--bf-${k}-->`, so the argument here is `'loop-i'`, not
1028
+ // `'bf-loop-i'` (which would double the prefix to `<!--bf-bf-loop-i-->`
1029
+ // a genuine SSR-emission bug this fixed, caught by #2763's fixture
1030
+ // being the first `bodyIsMultiRoot` case exercised on this adapter).
1031
+ safeChildren = `<>{bfComment('loop-i')}${children}</>`
1030
1032
  } else if (loop.bodyIsItemConditional && loop.key) {
1031
1033
  // Whole-item conditional (#1665): a per-item `<!--bf-loop-i:KEY-->`
1032
1034
  // anchor that is ALWAYS present (even when the item's conditional
@@ -21,4 +21,11 @@ export const conformancePins: ConformancePins = {
21
21
  // `rich-prop-client-read` above.
22
22
  'jsx-element-prop-ternary': [{ code: 'BF021', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2667' }],
23
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
25
+ // (`import * as bf from '@barefootjs/client'`, `bf.createSignal(...)`)
26
+ // that the analyzer's checker-less fast path cannot recognize refuses
27
+ // loudly (BF013) instead of silently dropping the declaration — fired
28
+ // 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' }],
24
31
  }
@@ -70,6 +70,29 @@ function stripModuleExports(code: string): string {
70
70
  .replace(/\bexport\s+(default\s+)?/g, '')
71
71
  }
72
72
 
73
+ /**
74
+ * A single named-import line for a child that's being INLINED (its
75
+ * declarations are spliced in verbatim, see `stripModuleExports` above) —
76
+ * returns `const <local> = <declared>` for every aliased specifier
77
+ * (`{ Label as AliasedLabel }`), or `null` when every specifier is a bare,
78
+ * non-aliased name (nothing left to bind; dropping the whole line is
79
+ * correct). A default-import specifier (`import Label from …`) has no
80
+ * declared name to alias against and is left unhandled — dropped like
81
+ * before, matching what a bare inlined child needs.
82
+ */
83
+ function aliasDeclarationsFor(importLine: string): string | null {
84
+ const namedMatch = importLine.match(/\{([^}]*)\}/)
85
+ if (!namedMatch) return null
86
+ const aliases = namedMatch[1]
87
+ .split(',')
88
+ .map(spec => spec.trim())
89
+ .filter(Boolean)
90
+ .map(spec => spec.match(/^(\w+)\s+as\s+(\w+)$/))
91
+ .filter((m): m is RegExpMatchArray => m !== null)
92
+ .map(([, declared, local]) => `const ${local} = ${declared};`)
93
+ return aliases.length > 0 ? aliases.join(' ') : null
94
+ }
95
+
73
96
  export async function renderHonoComponent(options: RenderOptions): Promise<string> {
74
97
  const { source, adapter, props, components, componentModules, componentName: requestedName } = options
75
98
 
@@ -171,7 +194,22 @@ export async function renderHonoComponent(options: RenderOptions): Promise<strin
171
194
  const [, prefix, importPath, suffix] = importMatch
172
195
  const moduleKey = matchKey(importPath, moduleTempPaths.keys())
173
196
  if (moduleKey) return `${prefix}${moduleTempPaths.get(moduleKey)}${suffix}`
174
- if (matchKey(importPath, componentKeys)) return null
197
+ if (matchKey(importPath, componentKeys)) {
198
+ // The inlined child keeps its OWN declared name (`stripModuleExports`
199
+ // only removes `export `, it doesn't rename), but the parent's
200
+ // JSX still references whatever LOCAL name it imported the child
201
+ // under (#2777 — Hono correctly keeps the caller's local binding
202
+ // rather than the declared name). Dropping the import line
203
+ // unconditionally is only safe for a non-aliased specifier
204
+ // (`import { Label } from './label'`, where local === declared);
205
+ // an aliased one (`import { Label as AliasedLabel } from
206
+ // './label'`) needs a `const AliasedLabel = Label` left behind, or
207
+ // the parent's JSX throws `ReferenceError: AliasedLabel is not
208
+ // defined` — this harness inlines the child by literal source
209
+ // splice, not through a real module boundary, so there's no
210
+ // `import … as …` left to do the binding for us.
211
+ return aliasDeclarationsFor(line)
212
+ }
175
213
  return line
176
214
  })
177
215
  .filter((line): line is string => line !== null)