@barefootjs/jsx 0.4.0 → 0.5.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.
Files changed (67) hide show
  1. package/dist/adapters/interface.d.ts +20 -0
  2. package/dist/adapters/interface.d.ts.map +1 -1
  3. package/dist/adapters/test-adapter.d.ts.map +1 -1
  4. package/dist/expression-parser.d.ts +36 -19
  5. package/dist/expression-parser.d.ts.map +1 -1
  6. package/dist/import-map.d.ts +56 -0
  7. package/dist/import-map.d.ts.map +1 -0
  8. package/dist/import-map.js +18 -0
  9. package/dist/index.d.ts +3 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +333 -199
  12. package/dist/ir-to-client-js/collect-elements.d.ts.map +1 -1
  13. package/dist/ir-to-client-js/control-flow/plan/build-loop.d.ts.map +1 -1
  14. package/dist/ir-to-client-js/control-flow/plan/loop.d.ts +14 -0
  15. package/dist/ir-to-client-js/control-flow/plan/loop.d.ts.map +1 -1
  16. package/dist/ir-to-client-js/control-flow/stringify/loop.d.ts.map +1 -1
  17. package/dist/ir-to-client-js/emit-reactive.d.ts.map +1 -1
  18. package/dist/ir-to-client-js/html-template.d.ts +0 -14
  19. package/dist/ir-to-client-js/html-template.d.ts.map +1 -1
  20. package/dist/ir-to-client-js/imports.d.ts +2 -2
  21. package/dist/ir-to-client-js/imports.d.ts.map +1 -1
  22. package/dist/ir-to-client-js/reactivity.d.ts.map +1 -1
  23. package/dist/ir-to-client-js/types.d.ts +7 -0
  24. package/dist/ir-to-client-js/types.d.ts.map +1 -1
  25. package/dist/ir-to-client-js/utils.d.ts +2 -2
  26. package/dist/ir-to-client-js/utils.d.ts.map +1 -1
  27. package/dist/scanner/js-scanner.d.ts +10 -0
  28. package/dist/scanner/js-scanner.d.ts.map +1 -1
  29. package/dist/scanner/js-scanner.js +5 -0
  30. package/dist/types.d.ts +11 -0
  31. package/dist/types.d.ts.map +1 -1
  32. package/package.json +7 -3
  33. package/src/__tests__/__snapshots__/doc-examples.test.ts.snap +438 -190
  34. package/src/__tests__/adapter-output.test.ts +49 -0
  35. package/src/__tests__/child-components-in-map.test.ts +76 -0
  36. package/src/__tests__/client-js-generation.test.ts +5 -2
  37. package/src/__tests__/import-map.test.ts +75 -0
  38. package/src/__tests__/inline-jsx-callback.test.ts +95 -0
  39. package/src/__tests__/ir-jsx-props.test.ts +5 -2
  40. package/src/__tests__/ir-sort-comparator.test.ts +212 -9
  41. package/src/__tests__/loop-item-conditional-codegen.test.ts +81 -0
  42. package/src/__tests__/map-logical-jsx-helper.test.ts +159 -0
  43. package/src/__tests__/missing-key-in-list.test.ts +49 -0
  44. package/src/__tests__/reactive-attrs-in-map.test.ts +41 -0
  45. package/src/__tests__/token-contains-ident.test.ts +27 -0
  46. package/src/__tests__/unsupported-expression.test.ts +42 -13
  47. package/src/adapters/interface.ts +20 -0
  48. package/src/adapters/test-adapter.ts +16 -1
  49. package/src/expression-parser.ts +265 -50
  50. package/src/import-map.ts +72 -0
  51. package/src/index.ts +5 -1
  52. package/src/ir-to-client-js/collect-elements.ts +3 -0
  53. package/src/ir-to-client-js/control-flow/plan/build-loop.ts +17 -0
  54. package/src/ir-to-client-js/control-flow/plan/loop.ts +14 -0
  55. package/src/ir-to-client-js/control-flow/stringify/insert.ts +7 -2
  56. package/src/ir-to-client-js/control-flow/stringify/loop.ts +60 -0
  57. package/src/ir-to-client-js/emit-reactive.ts +12 -3
  58. package/src/ir-to-client-js/html-template.ts +29 -3
  59. package/src/ir-to-client-js/imports.ts +2 -2
  60. package/src/ir-to-client-js/reactivity.ts +17 -1
  61. package/src/ir-to-client-js/stringify/static-array-child-init.ts +8 -4
  62. package/src/ir-to-client-js/types.ts +7 -0
  63. package/src/ir-to-client-js/utils.ts +31 -116
  64. package/src/jsx-to-ir.ts +161 -12
  65. package/src/preprocess-inline-jsx-callbacks.ts +28 -10
  66. package/src/scanner/js-scanner.ts +16 -1
  67. package/src/types.ts +12 -0
@@ -1,7 +1,7 @@
1
1
  // Bun Snapshot v1, https://bun.sh/docs/test/snapshots
2
2
 
3
3
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L15 — Ternary 1`] = `
4
- "import { $, $t, __bfSlot, createComponent, createDisposableEffect, createEffect, createSignal, hydrate, insert } from '@barefootjs/client/runtime'
4
+ "import { $, $t, __bfSlot, __bfText, createComponent, createDisposableEffect, createEffect, createSignal, hydrate, insert } from '@barefootjs/client/runtime'
5
5
 
6
6
  export function initTodoItem(__scope, _p = {}) {
7
7
  if (!__scope) return
@@ -9,9 +9,10 @@ export function initTodoItem(__scope, _p = {}) {
9
9
 
10
10
  const [_s0] = $t(__scope, 's0')
11
11
 
12
+ let __anchor_s0 = _s0
12
13
  createEffect(() => {
13
14
  const __val = String(_p.todo)
14
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
15
+ __anchor_s0 = __bfText(__anchor_s0, __val)
15
16
  })
16
17
 
17
18
  }
@@ -24,9 +25,10 @@ export function initItem(__scope, _p = {}) {
24
25
 
25
26
  const [_s0] = $t(__scope, 's0')
26
27
 
28
+ let __anchor_s0 = _s0
27
29
  createEffect(() => {
28
30
  const __val = String(_p.item)
29
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
31
+ __anchor_s0 = __bfText(__anchor_s0, __val)
30
32
  })
31
33
 
32
34
  }
@@ -56,10 +58,10 @@ export function initExample(__scope, _p = {}) {
56
58
  template: () => { const __slots = []; return { html: \`<p bf-c="s0" bf="s2"><!--bf:s1-->\${__bfSlot(count(), __slots)}<!--/--> items</p>\`, slots: __slots } },
57
59
  bindEvents: (__branchScope, { isFirstRun: __bfFirstRun = false } = {}) => {
58
60
  const __disposers = []
59
- const [__el_s1] = $t(__branchScope, 's1')
61
+ let __anchor_s1 = $t(__branchScope, 's1')[0]
60
62
  __disposers.push(createDisposableEffect(() => {
61
63
  const __val = count()
62
- if (__el_s1 && !__val?.__isSlot) __el_s1.nodeValue = String(__val ?? '')
64
+ __anchor_s1 = __bfText(__anchor_s1, __val)
63
65
  }))
64
66
  return () => __disposers.forEach(d => d())
65
67
  }
@@ -76,7 +78,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
76
78
  `;
77
79
 
78
80
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L18 — Logical AND 1`] = `
79
- "import { $, $c, $t, createComponent, createEffect, createSignal, hydrate, initChild, insert, renderChild } from '@barefootjs/client/runtime'
81
+ "import { $, $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, insert, renderChild } from '@barefootjs/client/runtime'
80
82
 
81
83
  export function initTodoItem(__scope, _p = {}) {
82
84
  if (!__scope) return
@@ -84,9 +86,10 @@ export function initTodoItem(__scope, _p = {}) {
84
86
 
85
87
  const [_s0] = $t(__scope, 's0')
86
88
 
89
+ let __anchor_s0 = _s0
87
90
  createEffect(() => {
88
91
  const __val = String(_p.todo)
89
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
92
+ __anchor_s0 = __bfText(__anchor_s0, __val)
90
93
  })
91
94
 
92
95
  }
@@ -99,9 +102,10 @@ export function initItem(__scope, _p = {}) {
99
102
 
100
103
  const [_s0] = $t(__scope, 's0')
101
104
 
105
+ let __anchor_s0 = _s0
102
106
  createEffect(() => {
103
107
  const __val = String(_p.item)
104
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
108
+ __anchor_s0 = __bfText(__anchor_s0, __val)
105
109
  })
106
110
 
107
111
  }
@@ -150,7 +154,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
150
154
  `;
151
155
 
152
156
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L31 — (no label) 1`] = `
153
- "import { $, $t, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
157
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
154
158
 
155
159
  export function initTodoItem(__scope, _p = {}) {
156
160
  if (!__scope) return
@@ -158,9 +162,10 @@ export function initTodoItem(__scope, _p = {}) {
158
162
 
159
163
  const [_s0] = $t(__scope, 's0')
160
164
 
165
+ let __anchor_s0 = _s0
161
166
  createEffect(() => {
162
167
  const __val = String(_p.todo)
163
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
168
+ __anchor_s0 = __bfText(__anchor_s0, __val)
164
169
  })
165
170
 
166
171
  }
@@ -173,9 +178,10 @@ export function initItem(__scope, _p = {}) {
173
178
 
174
179
  const [_s0] = $t(__scope, 's0')
175
180
 
181
+ let __anchor_s0 = _s0
176
182
  createEffect(() => {
177
183
  const __val = String(_p.item)
178
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
184
+ __anchor_s0 = __bfText(__anchor_s0, __val)
179
185
  })
180
186
 
181
187
  }
@@ -213,7 +219,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
213
219
  `;
214
220
 
215
221
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L40 — ✅ Simple predicate 1`] = `
216
- "import { $, $t, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
222
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
217
223
 
218
224
  export function initTodoItem(__scope, _p = {}) {
219
225
  if (!__scope) return
@@ -221,9 +227,10 @@ export function initTodoItem(__scope, _p = {}) {
221
227
 
222
228
  const [_s0] = $t(__scope, 's0')
223
229
 
230
+ let __anchor_s0 = _s0
224
231
  createEffect(() => {
225
232
  const __val = String(_p.todo)
226
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
233
+ __anchor_s0 = __bfText(__anchor_s0, __val)
227
234
  })
228
235
 
229
236
  }
@@ -236,9 +243,10 @@ export function initItem(__scope, _p = {}) {
236
243
 
237
244
  const [_s0] = $t(__scope, 's0')
238
245
 
246
+ let __anchor_s0 = _s0
239
247
  createEffect(() => {
240
248
  const __val = String(_p.item)
241
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
249
+ __anchor_s0 = __bfText(__anchor_s0, __val)
242
250
  })
243
251
 
244
252
  }
@@ -276,7 +284,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
276
284
  `;
277
285
 
278
286
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L45 — ✅ Block body with simple statements — also works 1`] = `
279
- "import { $, $t, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
287
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
280
288
 
281
289
  export function initTodoItem(__scope, _p = {}) {
282
290
  if (!__scope) return
@@ -284,9 +292,10 @@ export function initTodoItem(__scope, _p = {}) {
284
292
 
285
293
  const [_s0] = $t(__scope, 's0')
286
294
 
295
+ let __anchor_s0 = _s0
287
296
  createEffect(() => {
288
297
  const __val = String(_p.todo)
289
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
298
+ __anchor_s0 = __bfText(__anchor_s0, __val)
290
299
  })
291
300
 
292
301
  }
@@ -299,9 +308,10 @@ export function initItem(__scope, _p = {}) {
299
308
 
300
309
  const [_s0] = $t(__scope, 's0')
301
310
 
311
+ let __anchor_s0 = _s0
302
312
  createEffect(() => {
303
313
  const __val = String(_p.item)
304
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
314
+ __anchor_s0 = __bfText(__anchor_s0, __val)
305
315
  })
306
316
 
307
317
  }
@@ -349,7 +359,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
349
359
  `;
350
360
 
351
361
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L59 — ✅ Sort then render 1`] = `
352
- "import { $, $t, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
362
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
353
363
 
354
364
  export function initTodoItem(__scope, _p = {}) {
355
365
  if (!__scope) return
@@ -357,9 +367,10 @@ export function initTodoItem(__scope, _p = {}) {
357
367
 
358
368
  const [_s0] = $t(__scope, 's0')
359
369
 
370
+ let __anchor_s0 = _s0
360
371
  createEffect(() => {
361
372
  const __val = String(_p.todo)
362
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
373
+ __anchor_s0 = __bfText(__anchor_s0, __val)
363
374
  })
364
375
 
365
376
  }
@@ -372,9 +383,10 @@ export function initItem(__scope, _p = {}) {
372
383
 
373
384
  const [_s0] = $t(__scope, 's0')
374
385
 
386
+ let __anchor_s0 = _s0
375
387
  createEffect(() => {
376
388
  const __val = String(_p.item)
377
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
389
+ __anchor_s0 = __bfText(__anchor_s0, __val)
378
390
  })
379
391
 
380
392
  }
@@ -412,7 +424,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
412
424
  `;
413
425
 
414
426
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L64 — ✅ Filter, sort, then render 1`] = `
415
- "import { $, $t, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
427
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
416
428
 
417
429
  export function initTodoItem(__scope, _p = {}) {
418
430
  if (!__scope) return
@@ -420,9 +432,10 @@ export function initTodoItem(__scope, _p = {}) {
420
432
 
421
433
  const [_s0] = $t(__scope, 's0')
422
434
 
435
+ let __anchor_s0 = _s0
423
436
  createEffect(() => {
424
437
  const __val = String(_p.todo)
425
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
438
+ __anchor_s0 = __bfText(__anchor_s0, __val)
426
439
  })
427
440
 
428
441
  }
@@ -435,9 +448,10 @@ export function initItem(__scope, _p = {}) {
435
448
 
436
449
  const [_s0] = $t(__scope, 's0')
437
450
 
451
+ let __anchor_s0 = _s0
438
452
  createEffect(() => {
439
453
  const __val = String(_p.item)
440
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
454
+ __anchor_s0 = __bfText(__anchor_s0, __val)
441
455
  })
442
456
 
443
457
  }
@@ -474,8 +488,8 @@ hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-
474
488
  export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
475
489
  `;
476
490
 
477
- exports[`docs/core/rendering/jsx-compatibility.md doc-examples L75(no label) 1`] = `
478
- "import { $, $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
491
+ exports[`docs/core/rendering/jsx-compatibility.md doc-examples L69 Multi-key: sort by price, break ties by name 1`] = `
492
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
479
493
 
480
494
  export function initTodoItem(__scope, _p = {}) {
481
495
  if (!__scope) return
@@ -483,9 +497,10 @@ export function initTodoItem(__scope, _p = {}) {
483
497
 
484
498
  const [_s0] = $t(__scope, 's0')
485
499
 
500
+ let __anchor_s0 = _s0
486
501
  createEffect(() => {
487
502
  const __val = String(_p.todo)
488
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
503
+ __anchor_s0 = __bfText(__anchor_s0, __val)
489
504
  })
490
505
 
491
506
  }
@@ -498,9 +513,140 @@ export function initItem(__scope, _p = {}) {
498
513
 
499
514
  const [_s0] = $t(__scope, 's0')
500
515
 
516
+ let __anchor_s0 = _s0
501
517
  createEffect(() => {
502
518
  const __val = String(_p.item)
503
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
519
+ __anchor_s0 = __bfText(__anchor_s0, __val)
520
+ })
521
+
522
+ }
523
+
524
+ hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
525
+ export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
526
+ function initDashboard() {}
527
+
528
+ hydrate('Dashboard__b3c36eee', { init: initDashboard, template: (_p) => \`<div>D</div>\` })
529
+ export function Dashboard(_p, __bfKey) { return createComponent('Dashboard__b3c36eee', _p, __bfKey) }
530
+ export function initExample(__scope, _p = {}) {
531
+ if (!__scope) return
532
+ const __scopeId = __scope.getAttribute('bf-s')
533
+
534
+ const children = _p.children
535
+ const [count, setCount] = createSignal(0)
536
+ const [isLoggedIn] = createSignal(false)
537
+ const [todos] = createSignal([])
538
+ const [items] = createSignal([])
539
+ const [filter] = createSignal('all')
540
+ const [accepted] = createSignal(false)
541
+ const [text, setText] = createSignal('')
542
+
543
+ const [_s1] = $(__scope, 's1')
544
+
545
+ mapArray(() => items().toSorted((a, b) => a.price - b.price || a.name.localeCompare(b.name)), _s1, (item) => String(item.id), (item, __idx, __existing) => {
546
+ if (__existing) { initChild('Item__b3c36eee', __existing, { get item() { return item() } }); return __existing }
547
+ return createComponent('Item__b3c36eee', { get item() { return item() } }, item().id)
548
+ }, 'l0')
549
+
550
+ }
551
+
552
+ hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${([]).toSorted((a, b) => a.price - b.price || a.name.localeCompare(b.name)).map((item) => \`\${renderChild('Item__b3c36eee', {item: item}, item.id)}\`).join('')}<!--bf-/loop:l0--></div>\` })
553
+ export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
554
+ `;
555
+
556
+ exports[`docs/core/rendering/jsx-compatibility.md doc-examples L74 — ✅ Relational ternary 1`] = `
557
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
558
+
559
+ export function initTodoItem(__scope, _p = {}) {
560
+ if (!__scope) return
561
+ const __scopeId = __scope.getAttribute('bf-s')
562
+
563
+ const [_s0] = $t(__scope, 's0')
564
+
565
+ let __anchor_s0 = _s0
566
+ createEffect(() => {
567
+ const __val = String(_p.todo)
568
+ __anchor_s0 = __bfText(__anchor_s0, __val)
569
+ })
570
+
571
+ }
572
+
573
+ hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
574
+ export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
575
+ export function initItem(__scope, _p = {}) {
576
+ if (!__scope) return
577
+ const __scopeId = __scope.getAttribute('bf-s')
578
+
579
+ const [_s0] = $t(__scope, 's0')
580
+
581
+ let __anchor_s0 = _s0
582
+ createEffect(() => {
583
+ const __val = String(_p.item)
584
+ __anchor_s0 = __bfText(__anchor_s0, __val)
585
+ })
586
+
587
+ }
588
+
589
+ hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
590
+ export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
591
+ function initDashboard() {}
592
+
593
+ hydrate('Dashboard__b3c36eee', { init: initDashboard, template: (_p) => \`<div>D</div>\` })
594
+ export function Dashboard(_p, __bfKey) { return createComponent('Dashboard__b3c36eee', _p, __bfKey) }
595
+ export function initExample(__scope, _p = {}) {
596
+ if (!__scope) return
597
+ const __scopeId = __scope.getAttribute('bf-s')
598
+
599
+ const children = _p.children
600
+ const [count, setCount] = createSignal(0)
601
+ const [isLoggedIn] = createSignal(false)
602
+ const [todos] = createSignal([])
603
+ const [items] = createSignal([])
604
+ const [filter] = createSignal('all')
605
+ const [accepted] = createSignal(false)
606
+ const [text, setText] = createSignal('')
607
+
608
+ const [_s1] = $(__scope, 's1')
609
+
610
+ mapArray(() => items().toSorted((a, b) => a.price > b.price ? 1 : -1), _s1, (item) => String(item.id), (item, __idx, __existing) => {
611
+ if (__existing) { initChild('Item__b3c36eee', __existing, { get item() { return item() } }); return __existing }
612
+ return createComponent('Item__b3c36eee', { get item() { return item() } }, item().id)
613
+ }, 'l0')
614
+
615
+ }
616
+
617
+ hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${([]).toSorted((a, b) => a.price > b.price ? 1 : -1).map((item) => \`\${renderChild('Item__b3c36eee', {item: item}, item.id)}\`).join('')}<!--bf-/loop:l0--></div>\` })
618
+ export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
619
+ `;
620
+
621
+ exports[`docs/core/rendering/jsx-compatibility.md doc-examples L85 — (no label) 1`] = `
622
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
623
+
624
+ export function initTodoItem(__scope, _p = {}) {
625
+ if (!__scope) return
626
+ const __scopeId = __scope.getAttribute('bf-s')
627
+
628
+ const [_s0] = $t(__scope, 's0')
629
+
630
+ let __anchor_s0 = _s0
631
+ createEffect(() => {
632
+ const __val = String(_p.todo)
633
+ __anchor_s0 = __bfText(__anchor_s0, __val)
634
+ })
635
+
636
+ }
637
+
638
+ hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
639
+ export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
640
+ export function initItem(__scope, _p = {}) {
641
+ if (!__scope) return
642
+ const __scopeId = __scope.getAttribute('bf-s')
643
+
644
+ const [_s0] = $t(__scope, 's0')
645
+
646
+ let __anchor_s0 = _s0
647
+ createEffect(() => {
648
+ const __val = String(_p.item)
649
+ __anchor_s0 = __bfText(__anchor_s0, __val)
504
650
  })
505
651
 
506
652
  }
@@ -536,8 +682,8 @@ hydrate('Example', { init: initExample, template: (_p) => \`<div><button bf="s0"
536
682
  export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
537
683
  `;
538
684
 
539
- exports[`docs/core/rendering/jsx-compatibility.md doc-examples L121 — ❌ BF101 on Go/Mojo; works on Hono 1`] = `
540
- "import { $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
685
+ exports[`docs/core/rendering/jsx-compatibility.md doc-examples L131 — ❌ BF101 on Go/Mojo; works on Hono 1`] = `
686
+ "import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
541
687
 
542
688
  export function initTodoItem(__scope, _p = {}) {
543
689
  if (!__scope) return
@@ -545,9 +691,10 @@ export function initTodoItem(__scope, _p = {}) {
545
691
 
546
692
  const [_s0] = $t(__scope, 's0')
547
693
 
694
+ let __anchor_s0 = _s0
548
695
  createEffect(() => {
549
696
  const __val = String(_p.todo)
550
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
697
+ __anchor_s0 = __bfText(__anchor_s0, __val)
551
698
  })
552
699
 
553
700
  }
@@ -560,9 +707,10 @@ export function initItem(__scope, _p = {}) {
560
707
 
561
708
  const [_s0] = $t(__scope, 's0')
562
709
 
710
+ let __anchor_s0 = _s0
563
711
  createEffect(() => {
564
712
  const __val = String(_p.item)
565
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
713
+ __anchor_s0 = __bfText(__anchor_s0, __val)
566
714
  })
567
715
 
568
716
  }
@@ -588,9 +736,10 @@ export function initExample(__scope, _p = {}) {
588
736
 
589
737
  const [_s0] = $t(__scope, 's0')
590
738
 
739
+ let __anchor_s0 = _s0
591
740
  createEffect(() => {
592
741
  const __val = items().reduce((sum, x) => sum + x.price, 0)
593
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
742
+ __anchor_s0 = __bfText(__anchor_s0, __val)
594
743
  })
595
744
 
596
745
  }
@@ -599,8 +748,8 @@ hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf:
599
748
  export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
600
749
  `;
601
750
 
602
- exports[`docs/core/rendering/jsx-compatibility.md doc-examples L124 — ✅ Use /* @client */ 1`] = `
603
- "import { $t, createComponent, createEffect, createSignal, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
751
+ exports[`docs/core/rendering/jsx-compatibility.md doc-examples L134 — ✅ Use /* @client */ 1`] = `
752
+ "import { $t, __bfText, createComponent, createEffect, createSignal, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
604
753
 
605
754
  export function initTodoItem(__scope, _p = {}) {
606
755
  if (!__scope) return
@@ -608,9 +757,10 @@ export function initTodoItem(__scope, _p = {}) {
608
757
 
609
758
  const [_s0] = $t(__scope, 's0')
610
759
 
760
+ let __anchor_s0 = _s0
611
761
  createEffect(() => {
612
762
  const __val = String(_p.todo)
613
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
763
+ __anchor_s0 = __bfText(__anchor_s0, __val)
614
764
  })
615
765
 
616
766
  }
@@ -623,9 +773,10 @@ export function initItem(__scope, _p = {}) {
623
773
 
624
774
  const [_s0] = $t(__scope, 's0')
625
775
 
776
+ let __anchor_s0 = _s0
626
777
  createEffect(() => {
627
778
  const __val = String(_p.item)
628
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
779
+ __anchor_s0 = __bfText(__anchor_s0, __val)
629
780
  })
630
781
 
631
782
  }
@@ -660,8 +811,8 @@ hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-
660
811
  export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
661
812
  `;
662
813
 
663
- exports[`docs/core/rendering/jsx-compatibility.md doc-examples L141 — ❌ BF101 on Go/Mojo; works on Hono 1`] = `
664
- "import { $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
814
+ exports[`docs/core/rendering/jsx-compatibility.md doc-examples L151 — ❌ BF101 on Go/Mojo; works on Hono 1`] = `
815
+ "import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
665
816
 
666
817
  export function initTodoItem(__scope, _p = {}) {
667
818
  if (!__scope) return
@@ -669,9 +820,10 @@ export function initTodoItem(__scope, _p = {}) {
669
820
 
670
821
  const [_s0] = $t(__scope, 's0')
671
822
 
823
+ let __anchor_s0 = _s0
672
824
  createEffect(() => {
673
825
  const __val = String(_p.todo)
674
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
826
+ __anchor_s0 = __bfText(__anchor_s0, __val)
675
827
  })
676
828
 
677
829
  }
@@ -684,9 +836,10 @@ export function initItem(__scope, _p = {}) {
684
836
 
685
837
  const [_s0] = $t(__scope, 's0')
686
838
 
839
+ let __anchor_s0 = _s0
687
840
  createEffect(() => {
688
841
  const __val = String(_p.item)
689
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
842
+ __anchor_s0 = __bfText(__anchor_s0, __val)
690
843
  })
691
844
 
692
845
  }
@@ -712,9 +865,10 @@ export function initExample(__scope, _p = {}) {
712
865
 
713
866
  const [_s0] = $t(__scope, 's0')
714
867
 
868
+ let __anchor_s0 = _s0
715
869
  createEffect(() => {
716
870
  const __val = items().filter(function(x) { return x.done })
717
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
871
+ __anchor_s0 = __bfText(__anchor_s0, __val)
718
872
  })
719
873
 
720
874
  }
@@ -723,8 +877,8 @@ hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf:
723
877
  export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
724
878
  `;
725
879
 
726
- exports[`docs/core/rendering/jsx-compatibility.md doc-examples L144 — ✅ Use arrow functions for adapter portability 1`] = `
727
- "import { $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
880
+ exports[`docs/core/rendering/jsx-compatibility.md doc-examples L154 — ✅ Use arrow functions for adapter portability 1`] = `
881
+ "import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
728
882
 
729
883
  export function initTodoItem(__scope, _p = {}) {
730
884
  if (!__scope) return
@@ -732,9 +886,10 @@ export function initTodoItem(__scope, _p = {}) {
732
886
 
733
887
  const [_s0] = $t(__scope, 's0')
734
888
 
889
+ let __anchor_s0 = _s0
735
890
  createEffect(() => {
736
891
  const __val = String(_p.todo)
737
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
892
+ __anchor_s0 = __bfText(__anchor_s0, __val)
738
893
  })
739
894
 
740
895
  }
@@ -747,9 +902,10 @@ export function initItem(__scope, _p = {}) {
747
902
 
748
903
  const [_s0] = $t(__scope, 's0')
749
904
 
905
+ let __anchor_s0 = _s0
750
906
  createEffect(() => {
751
907
  const __val = String(_p.item)
752
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
908
+ __anchor_s0 = __bfText(__anchor_s0, __val)
753
909
  })
754
910
 
755
911
  }
@@ -775,9 +931,10 @@ export function initExample(__scope, _p = {}) {
775
931
 
776
932
  const [_s0] = $t(__scope, 's0')
777
933
 
934
+ let __anchor_s0 = _s0
778
935
  createEffect(() => {
779
936
  const __val = items().filter(x => x.done)
780
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
937
+ __anchor_s0 = __bfText(__anchor_s0, __val)
781
938
  })
782
939
 
783
940
  }
@@ -786,8 +943,8 @@ hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf:
786
943
  export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
787
944
  `;
788
945
 
789
- exports[`docs/core/rendering/jsx-compatibility.md doc-examples L158 — ✅ Use /* @client */ 1`] = `
790
- "import { $, $t, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
946
+ exports[`docs/core/rendering/jsx-compatibility.md doc-examples L168 — ✅ Use /* @client */ 1`] = `
947
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
791
948
 
792
949
  export function initTodoItem(__scope, _p = {}) {
793
950
  if (!__scope) return
@@ -795,9 +952,10 @@ export function initTodoItem(__scope, _p = {}) {
795
952
 
796
953
  const [_s0] = $t(__scope, 's0')
797
954
 
955
+ let __anchor_s0 = _s0
798
956
  createEffect(() => {
799
957
  const __val = String(_p.todo)
800
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
958
+ __anchor_s0 = __bfText(__anchor_s0, __val)
801
959
  })
802
960
 
803
961
  }
@@ -810,9 +968,10 @@ export function initItem(__scope, _p = {}) {
810
968
 
811
969
  const [_s0] = $t(__scope, 's0')
812
970
 
971
+ let __anchor_s0 = _s0
813
972
  createEffect(() => {
814
973
  const __val = String(_p.item)
815
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
974
+ __anchor_s0 = __bfText(__anchor_s0, __val)
816
975
  })
817
976
 
818
977
  }
@@ -838,19 +997,19 @@ export function initExample(__scope, _p = {}) {
838
997
 
839
998
  const [_s1] = $(__scope, 's1')
840
999
 
841
- mapArray(() => items().sort((a, b) => a.name > b.name ? 1 : -1), _s1, (item) => String(item.id), (item, __idx, __existing) => {
1000
+ mapArray(() => items().sort((a, b) => { const an = a.name; return an > b.name ? 1 : -1 }), _s1, (item) => String(item.id), (item, __idx, __existing) => {
842
1001
  if (__existing) { initChild('Item__b3c36eee', __existing, { get item() { return item() } }); return __existing }
843
1002
  return createComponent('Item__b3c36eee', { get item() { return item() } }, item().id)
844
1003
  }, 'l0')
845
1004
 
846
1005
  }
847
1006
 
848
- hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${([]).sort((a, b) => a.name > b.name ? 1 : -1).map((item) => \`\${renderChild('Item__b3c36eee', {item: item}, item.id)}\`).join('')}<!--bf-/loop:l0--></div>\` })
1007
+ hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${([]).sort((a, b) => { const an = a.name; return an > b.name ? 1 : -1 }).map((item) => \`\${renderChild('Item__b3c36eee', {item: item}, item.id)}\`).join('')}<!--bf-/loop:l0--></div>\` })
849
1008
  export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
850
1009
  `;
851
1010
 
852
1011
  exports[`docs/core/rendering/client-directive.md doc-examples L59 — Nested higher-order methods 1`] = `
853
- "import { $t, createComponent, createEffect, createSignal, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
1012
+ "import { $t, __bfText, createComponent, createEffect, createSignal, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
854
1013
 
855
1014
  export function initTodoItem(__scope, _p = {}) {
856
1015
  if (!__scope) return
@@ -858,9 +1017,10 @@ export function initTodoItem(__scope, _p = {}) {
858
1017
 
859
1018
  const [_s0] = $t(__scope, 's0')
860
1019
 
1020
+ let __anchor_s0 = _s0
861
1021
  createEffect(() => {
862
1022
  const __val = String(_p.todo)
863
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
1023
+ __anchor_s0 = __bfText(__anchor_s0, __val)
864
1024
  })
865
1025
 
866
1026
  }
@@ -873,9 +1033,10 @@ export function initItem(__scope, _p = {}) {
873
1033
 
874
1034
  const [_s0] = $t(__scope, 's0')
875
1035
 
1036
+ let __anchor_s0 = _s0
876
1037
  createEffect(() => {
877
1038
  const __val = String(_p.item)
878
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
1039
+ __anchor_s0 = __bfText(__anchor_s0, __val)
879
1040
  })
880
1041
 
881
1042
  }
@@ -911,7 +1072,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
911
1072
  `;
912
1073
 
913
1074
  exports[`docs/core/rendering/client-directive.md doc-examples L62 — Unsupported array methods 1`] = `
914
- "import { $t, createComponent, createEffect, createSignal, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
1075
+ "import { $t, __bfText, createComponent, createEffect, createSignal, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
915
1076
 
916
1077
  export function initTodoItem(__scope, _p = {}) {
917
1078
  if (!__scope) return
@@ -919,9 +1080,10 @@ export function initTodoItem(__scope, _p = {}) {
919
1080
 
920
1081
  const [_s0] = $t(__scope, 's0')
921
1082
 
1083
+ let __anchor_s0 = _s0
922
1084
  createEffect(() => {
923
1085
  const __val = String(_p.todo)
924
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
1086
+ __anchor_s0 = __bfText(__anchor_s0, __val)
925
1087
  })
926
1088
 
927
1089
  }
@@ -934,9 +1096,10 @@ export function initItem(__scope, _p = {}) {
934
1096
 
935
1097
  const [_s0] = $t(__scope, 's0')
936
1098
 
1099
+ let __anchor_s0 = _s0
937
1100
  createEffect(() => {
938
1101
  const __val = String(_p.item)
939
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
1102
+ __anchor_s0 = __bfText(__anchor_s0, __val)
940
1103
  })
941
1104
 
942
1105
  }
@@ -972,7 +1135,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
972
1135
  `;
973
1136
 
974
1137
  exports[`docs/core/rendering/client-directive.md doc-examples L74 — (no label) 1`] = `
975
- "import { $t, createComponent, createEffect, createSignal, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
1138
+ "import { $t, __bfText, createComponent, createEffect, createSignal, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
976
1139
 
977
1140
  export function initTodoItem(__scope, _p = {}) {
978
1141
  if (!__scope) return
@@ -980,9 +1143,10 @@ export function initTodoItem(__scope, _p = {}) {
980
1143
 
981
1144
  const [_s0] = $t(__scope, 's0')
982
1145
 
1146
+ let __anchor_s0 = _s0
983
1147
  createEffect(() => {
984
1148
  const __val = String(_p.todo)
985
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
1149
+ __anchor_s0 = __bfText(__anchor_s0, __val)
986
1150
  })
987
1151
 
988
1152
  }
@@ -995,9 +1159,10 @@ export function initItem(__scope, _p = {}) {
995
1159
 
996
1160
  const [_s0] = $t(__scope, 's0')
997
1161
 
1162
+ let __anchor_s0 = _s0
998
1163
  createEffect(() => {
999
1164
  const __val = String(_p.item)
1000
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
1165
+ __anchor_s0 = __bfText(__anchor_s0, __val)
1001
1166
  })
1002
1167
 
1003
1168
  }
@@ -1033,7 +1198,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
1033
1198
  `;
1034
1199
 
1035
1200
  exports[`docs/core/rendering/fragment.md doc-examples L11 — (no label) 1`] = `
1036
- "import { $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
1201
+ "import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
1037
1202
 
1038
1203
  export function initTodoItem(__scope, _p = {}) {
1039
1204
  if (!__scope) return
@@ -1041,9 +1206,10 @@ export function initTodoItem(__scope, _p = {}) {
1041
1206
 
1042
1207
  const [_s0] = $t(__scope, 's0')
1043
1208
 
1209
+ let __anchor_s0 = _s0
1044
1210
  createEffect(() => {
1045
1211
  const __val = String(_p.todo)
1046
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
1212
+ __anchor_s0 = __bfText(__anchor_s0, __val)
1047
1213
  })
1048
1214
 
1049
1215
  }
@@ -1056,9 +1222,10 @@ export function initItem(__scope, _p = {}) {
1056
1222
 
1057
1223
  const [_s0] = $t(__scope, 's0')
1058
1224
 
1225
+ let __anchor_s0 = _s0
1059
1226
  createEffect(() => {
1060
1227
  const __val = String(_p.item)
1061
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
1228
+ __anchor_s0 = __bfText(__anchor_s0, __val)
1062
1229
  })
1063
1230
 
1064
1231
  }
@@ -1089,7 +1256,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
1089
1256
  `;
1090
1257
 
1091
1258
  exports[`docs/core/rendering/fragment.md doc-examples L23 — (no label) 1`] = `
1092
- "import { $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
1259
+ "import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
1093
1260
 
1094
1261
  export function initTodoItem(__scope, _p = {}) {
1095
1262
  if (!__scope) return
@@ -1097,9 +1264,10 @@ export function initTodoItem(__scope, _p = {}) {
1097
1264
 
1098
1265
  const [_s0] = $t(__scope, 's0')
1099
1266
 
1267
+ let __anchor_s0 = _s0
1100
1268
  createEffect(() => {
1101
1269
  const __val = String(_p.todo)
1102
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
1270
+ __anchor_s0 = __bfText(__anchor_s0, __val)
1103
1271
  })
1104
1272
 
1105
1273
  }
@@ -1112,9 +1280,10 @@ export function initItem(__scope, _p = {}) {
1112
1280
 
1113
1281
  const [_s0] = $t(__scope, 's0')
1114
1282
 
1283
+ let __anchor_s0 = _s0
1115
1284
  createEffect(() => {
1116
1285
  const __val = String(_p.item)
1117
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
1286
+ __anchor_s0 = __bfText(__anchor_s0, __val)
1118
1287
  })
1119
1288
 
1120
1289
  }
@@ -1302,7 +1471,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
1302
1471
  `;
1303
1472
 
1304
1473
  exports[`docs/core/reactivity/create-signal.md doc-examples L95 — (no label) 1`] = `
1305
- "import { $, $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
1474
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
1306
1475
 
1307
1476
 
1308
1477
  export function initCounter(__scope, _p = {}) {
@@ -1314,9 +1483,10 @@ export function initCounter(__scope, _p = {}) {
1314
1483
  const [_s2] = $(__scope, 's2')
1315
1484
  const [_s0] = $t(__scope, 's0')
1316
1485
 
1486
+ let __anchor_s0 = _s0
1317
1487
  createEffect(() => {
1318
1488
  const __val = count()
1319
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
1489
+ __anchor_s0 = __bfText(__anchor_s0, __val)
1320
1490
  })
1321
1491
 
1322
1492
  if (_s2) _s2.addEventListener('click', () => { setCount(n => n + 1) })
@@ -1490,7 +1660,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
1490
1660
  `;
1491
1661
 
1492
1662
  exports[`docs/core/reactivity/create-effect.md doc-examples L115 — (no label) 1`] = `
1493
- "import { $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
1663
+ "import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
1494
1664
 
1495
1665
  export function initTodoItem(__scope, _p = {}) {
1496
1666
  if (!__scope) return
@@ -1498,9 +1668,10 @@ export function initTodoItem(__scope, _p = {}) {
1498
1668
 
1499
1669
  const [_s0] = $t(__scope, 's0')
1500
1670
 
1671
+ let __anchor_s0 = _s0
1501
1672
  createEffect(() => {
1502
1673
  const __val = String(_p.todo)
1503
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
1674
+ __anchor_s0 = __bfText(__anchor_s0, __val)
1504
1675
  })
1505
1676
 
1506
1677
  }
@@ -1513,9 +1684,10 @@ export function initItem(__scope, _p = {}) {
1513
1684
 
1514
1685
  const [_s0] = $t(__scope, 's0')
1515
1686
 
1687
+ let __anchor_s0 = _s0
1516
1688
  createEffect(() => {
1517
1689
  const __val = String(_p.item)
1518
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
1690
+ __anchor_s0 = __bfText(__anchor_s0, __val)
1519
1691
  })
1520
1692
 
1521
1693
  }
@@ -1622,7 +1794,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
1622
1794
  `;
1623
1795
 
1624
1796
  exports[`docs/core/reactivity/create-memo.md doc-examples L60 — No memo needed 1`] = `
1625
- "import { $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
1797
+ "import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
1626
1798
 
1627
1799
  export function initTodoItem(__scope, _p = {}) {
1628
1800
  if (!__scope) return
@@ -1630,9 +1802,10 @@ export function initTodoItem(__scope, _p = {}) {
1630
1802
 
1631
1803
  const [_s0] = $t(__scope, 's0')
1632
1804
 
1805
+ let __anchor_s0 = _s0
1633
1806
  createEffect(() => {
1634
1807
  const __val = String(_p.todo)
1635
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
1808
+ __anchor_s0 = __bfText(__anchor_s0, __val)
1636
1809
  })
1637
1810
 
1638
1811
  }
@@ -1645,9 +1818,10 @@ export function initItem(__scope, _p = {}) {
1645
1818
 
1646
1819
  const [_s0] = $t(__scope, 's0')
1647
1820
 
1821
+ let __anchor_s0 = _s0
1648
1822
  createEffect(() => {
1649
1823
  const __val = String(_p.item)
1650
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
1824
+ __anchor_s0 = __bfText(__anchor_s0, __val)
1651
1825
  })
1652
1826
 
1653
1827
  }
@@ -1673,9 +1847,10 @@ export function initExample(__scope, _p = {}) {
1673
1847
 
1674
1848
  const [_s0] = $t(__scope, 's0')
1675
1849
 
1850
+ let __anchor_s0 = _s0
1676
1851
  createEffect(() => {
1677
1852
  const __val = count() * 2
1678
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
1853
+ __anchor_s0 = __bfText(__anchor_s0, __val)
1679
1854
  })
1680
1855
 
1681
1856
  }
@@ -1926,7 +2101,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
1926
2101
  `;
1927
2102
 
1928
2103
  exports[`docs/core/reactivity/props-reactivity.md doc-examples L82 — Parent 1`] = `
1929
- "import { $c, $t, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2104
+ "import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
1930
2105
  import '/* @bf-child:Child */'
1931
2106
 
1932
2107
  export function initTodoItem(__scope, _p = {}) {
@@ -1935,9 +2110,10 @@ export function initTodoItem(__scope, _p = {}) {
1935
2110
 
1936
2111
  const [_s0] = $t(__scope, 's0')
1937
2112
 
2113
+ let __anchor_s0 = _s0
1938
2114
  createEffect(() => {
1939
2115
  const __val = String(_p.todo)
1940
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2116
+ __anchor_s0 = __bfText(__anchor_s0, __val)
1941
2117
  })
1942
2118
 
1943
2119
  }
@@ -1950,9 +2126,10 @@ export function initItem(__scope, _p = {}) {
1950
2126
 
1951
2127
  const [_s0] = $t(__scope, 's0')
1952
2128
 
2129
+ let __anchor_s0 = _s0
1953
2130
  createEffect(() => {
1954
2131
  const __val = String(_p.item)
1955
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2132
+ __anchor_s0 = __bfText(__anchor_s0, __val)
1956
2133
  })
1957
2134
 
1958
2135
  }
@@ -2005,7 +2182,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
2005
2182
  `;
2006
2183
 
2007
2184
  exports[`docs/core/reactivity/props-reactivity.md doc-examples L85 — Compiled props object 1`] = `
2008
- "import { $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
2185
+ "import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
2009
2186
 
2010
2187
  export function initTodoItem(__scope, _p = {}) {
2011
2188
  if (!__scope) return
@@ -2013,9 +2190,10 @@ export function initTodoItem(__scope, _p = {}) {
2013
2190
 
2014
2191
  const [_s0] = $t(__scope, 's0')
2015
2192
 
2193
+ let __anchor_s0 = _s0
2016
2194
  createEffect(() => {
2017
2195
  const __val = String(_p.todo)
2018
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2196
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2019
2197
  })
2020
2198
 
2021
2199
  }
@@ -2028,9 +2206,10 @@ export function initItem(__scope, _p = {}) {
2028
2206
 
2029
2207
  const [_s0] = $t(__scope, 's0')
2030
2208
 
2209
+ let __anchor_s0 = _s0
2031
2210
  createEffect(() => {
2032
2211
  const __val = String(_p.item)
2033
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2212
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2034
2213
  })
2035
2214
 
2036
2215
  }
@@ -2061,7 +2240,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
2061
2240
  `;
2062
2241
 
2063
2242
  exports[`docs/core/components/component-authoring.mdx doc-examples L16 — (no label) 1`] = `
2064
- "import { $t, createComponent, createEffect, hydrate } from '@barefootjs/client/runtime'
2243
+ "import { $t, __bfText, createComponent, createEffect, hydrate } from '@barefootjs/client/runtime'
2065
2244
 
2066
2245
 
2067
2246
  export function initGreeting(__scope, _p = {}) {
@@ -2072,9 +2251,10 @@ export function initGreeting(__scope, _p = {}) {
2072
2251
 
2073
2252
  const [_s0] = $t(__scope, 's0')
2074
2253
 
2254
+ let __anchor_s0 = _s0
2075
2255
  createEffect(() => {
2076
2256
  const __val = name
2077
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2257
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2078
2258
  })
2079
2259
 
2080
2260
  }
@@ -2084,7 +2264,7 @@ export function Greeting(_p, __bfKey) { return createComponent('Greeting', _p, _
2084
2264
  `;
2085
2265
 
2086
2266
  exports[`docs/core/components/component-authoring.mdx doc-examples L29 — (no label) 1`] = `
2087
- "import { $, $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
2267
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
2088
2268
 
2089
2269
 
2090
2270
  export function initCounter(__scope, _p = {}) {
@@ -2096,9 +2276,10 @@ export function initCounter(__scope, _p = {}) {
2096
2276
  const [_s1] = $(__scope, 's1')
2097
2277
  const [_s0] = $t(__scope, 's0')
2098
2278
 
2279
+ let __anchor_s0 = _s0
2099
2280
  createEffect(() => {
2100
2281
  const __val = count()
2101
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2282
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2102
2283
  })
2103
2284
 
2104
2285
  if (_s1) _s1.addEventListener('click', () => { setCount(n => n + 1) })
@@ -2190,7 +2371,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
2190
2371
  `;
2191
2372
 
2192
2373
  exports[`docs/core/components/children-slots.md doc-examples L14 — (no label) 1`] = `
2193
- "import { $c, $t, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2374
+ "import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2194
2375
  import '/* @bf-child:Card */'
2195
2376
 
2196
2377
  export function initTodoItem(__scope, _p = {}) {
@@ -2199,9 +2380,10 @@ export function initTodoItem(__scope, _p = {}) {
2199
2380
 
2200
2381
  const [_s0] = $t(__scope, 's0')
2201
2382
 
2383
+ let __anchor_s0 = _s0
2202
2384
  createEffect(() => {
2203
2385
  const __val = String(_p.todo)
2204
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2386
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2205
2387
  })
2206
2388
 
2207
2389
  }
@@ -2214,9 +2396,10 @@ export function initItem(__scope, _p = {}) {
2214
2396
 
2215
2397
  const [_s0] = $t(__scope, 's0')
2216
2398
 
2399
+ let __anchor_s0 = _s0
2217
2400
  createEffect(() => {
2218
2401
  const __val = String(_p.item)
2219
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2402
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2220
2403
  })
2221
2404
 
2222
2405
  }
@@ -2270,7 +2453,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
2270
2453
  `;
2271
2454
 
2272
2455
  exports[`docs/core/components/children-slots.md doc-examples L68 — Input 1`] = `
2273
- "import { $c, $t, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2456
+ "import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2274
2457
  import '/* @bf-child:Slot */'
2275
2458
 
2276
2459
  export function initTodoItem(__scope, _p = {}) {
@@ -2279,9 +2462,10 @@ export function initTodoItem(__scope, _p = {}) {
2279
2462
 
2280
2463
  const [_s0] = $t(__scope, 's0')
2281
2464
 
2465
+ let __anchor_s0 = _s0
2282
2466
  createEffect(() => {
2283
2467
  const __val = String(_p.todo)
2284
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2468
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2285
2469
  })
2286
2470
 
2287
2471
  }
@@ -2294,9 +2478,10 @@ export function initItem(__scope, _p = {}) {
2294
2478
 
2295
2479
  const [_s0] = $t(__scope, 's0')
2296
2480
 
2481
+ let __anchor_s0 = _s0
2297
2482
  createEffect(() => {
2298
2483
  const __val = String(_p.item)
2299
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2484
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2300
2485
  })
2301
2486
 
2302
2487
  }
@@ -2332,7 +2517,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
2332
2517
  `;
2333
2518
 
2334
2519
  exports[`docs/core/components/children-slots.md doc-examples L73 — Output 1`] = `
2335
- "import { $, $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
2520
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
2336
2521
 
2337
2522
  export function initTodoItem(__scope, _p = {}) {
2338
2523
  if (!__scope) return
@@ -2340,9 +2525,10 @@ export function initTodoItem(__scope, _p = {}) {
2340
2525
 
2341
2526
  const [_s0] = $t(__scope, 's0')
2342
2527
 
2528
+ let __anchor_s0 = _s0
2343
2529
  createEffect(() => {
2344
2530
  const __val = String(_p.todo)
2345
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2531
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2346
2532
  })
2347
2533
 
2348
2534
  }
@@ -2355,9 +2541,10 @@ export function initItem(__scope, _p = {}) {
2355
2541
 
2356
2542
  const [_s0] = $t(__scope, 's0')
2357
2543
 
2544
+ let __anchor_s0 = _s0
2358
2545
  createEffect(() => {
2359
2546
  const __val = String(_p.item)
2360
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2547
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2361
2548
  })
2362
2549
 
2363
2550
  }
@@ -2391,7 +2578,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
2391
2578
  `;
2392
2579
 
2393
2580
  exports[`docs/core/components/children-slots.md doc-examples L86 — (no label) 1`] = `
2394
- "import { $c, $t, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2581
+ "import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2395
2582
  import '/* @bf-child:Button */'
2396
2583
 
2397
2584
  export function initTodoItem(__scope, _p = {}) {
@@ -2400,9 +2587,10 @@ export function initTodoItem(__scope, _p = {}) {
2400
2587
 
2401
2588
  const [_s0] = $t(__scope, 's0')
2402
2589
 
2590
+ let __anchor_s0 = _s0
2403
2591
  createEffect(() => {
2404
2592
  const __val = String(_p.todo)
2405
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2593
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2406
2594
  })
2407
2595
 
2408
2596
  }
@@ -2415,9 +2603,10 @@ export function initItem(__scope, _p = {}) {
2415
2603
 
2416
2604
  const [_s0] = $t(__scope, 's0')
2417
2605
 
2606
+ let __anchor_s0 = _s0
2418
2607
  createEffect(() => {
2419
2608
  const __val = String(_p.item)
2420
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2609
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2421
2610
  })
2422
2611
 
2423
2612
  }
@@ -2453,7 +2642,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
2453
2642
  `;
2454
2643
 
2455
2644
  exports[`docs/core/components/children-slots.md doc-examples L93 — (no label) 1`] = `
2456
- "import { $c, $t, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2645
+ "import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2457
2646
  import '/* @bf-child:Button */'
2458
2647
 
2459
2648
  export function initTodoItem(__scope, _p = {}) {
@@ -2462,9 +2651,10 @@ export function initTodoItem(__scope, _p = {}) {
2462
2651
 
2463
2652
  const [_s0] = $t(__scope, 's0')
2464
2653
 
2654
+ let __anchor_s0 = _s0
2465
2655
  createEffect(() => {
2466
2656
  const __val = String(_p.todo)
2467
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2657
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2468
2658
  })
2469
2659
 
2470
2660
  }
@@ -2477,9 +2667,10 @@ export function initItem(__scope, _p = {}) {
2477
2667
 
2478
2668
  const [_s0] = $t(__scope, 's0')
2479
2669
 
2670
+ let __anchor_s0 = _s0
2480
2671
  createEffect(() => {
2481
2672
  const __val = String(_p.item)
2482
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2673
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2483
2674
  })
2484
2675
 
2485
2676
  }
@@ -2515,7 +2706,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
2515
2706
  `;
2516
2707
 
2517
2708
  exports[`docs/core/components/children-slots.md doc-examples L109 — Dialog trigger as a custom element 1`] = `
2518
- "import { $c, $t, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2709
+ "import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2519
2710
  import '/* @bf-child:DialogTrigger */'
2520
2711
 
2521
2712
  export function initTodoItem(__scope, _p = {}) {
@@ -2524,9 +2715,10 @@ export function initTodoItem(__scope, _p = {}) {
2524
2715
 
2525
2716
  const [_s0] = $t(__scope, 's0')
2526
2717
 
2718
+ let __anchor_s0 = _s0
2527
2719
  createEffect(() => {
2528
2720
  const __val = String(_p.todo)
2529
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2721
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2530
2722
  })
2531
2723
 
2532
2724
  }
@@ -2539,9 +2731,10 @@ export function initItem(__scope, _p = {}) {
2539
2731
 
2540
2732
  const [_s0] = $t(__scope, 's0')
2541
2733
 
2734
+ let __anchor_s0 = _s0
2542
2735
  createEffect(() => {
2543
2736
  const __val = String(_p.item)
2544
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2737
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2545
2738
  })
2546
2739
 
2547
2740
  }
@@ -2577,7 +2770,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
2577
2770
  `;
2578
2771
 
2579
2772
  exports[`docs/core/components/children-slots.md doc-examples L118 — (no label) 1`] = `
2580
- "import { $c, $t, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2773
+ "import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2581
2774
  import '/* @bf-child:Dialog */'
2582
2775
  import '/* @bf-child:DialogTrigger */'
2583
2776
  import '/* @bf-child:DialogOverlay */'
@@ -2595,9 +2788,10 @@ export function initTodoItem(__scope, _p = {}) {
2595
2788
 
2596
2789
  const [_s0] = $t(__scope, 's0')
2597
2790
 
2791
+ let __anchor_s0 = _s0
2598
2792
  createEffect(() => {
2599
2793
  const __val = String(_p.todo)
2600
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2794
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2601
2795
  })
2602
2796
 
2603
2797
  }
@@ -2610,9 +2804,10 @@ export function initItem(__scope, _p = {}) {
2610
2804
 
2611
2805
  const [_s0] = $t(__scope, 's0')
2612
2806
 
2807
+ let __anchor_s0 = _s0
2613
2808
  createEffect(() => {
2614
2809
  const __val = String(_p.item)
2615
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2810
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2616
2811
  })
2617
2812
 
2618
2813
  }
@@ -2665,7 +2860,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
2665
2860
  `;
2666
2861
 
2667
2862
  exports[`docs/core/components/children-slots.md doc-examples L140 — (no label) 1`] = `
2668
- "import { $, $t, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
2863
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
2669
2864
 
2670
2865
  export function initTodoItem(__scope, _p = {}) {
2671
2866
  if (!__scope) return
@@ -2673,9 +2868,10 @@ export function initTodoItem(__scope, _p = {}) {
2673
2868
 
2674
2869
  const [_s0] = $t(__scope, 's0')
2675
2870
 
2871
+ let __anchor_s0 = _s0
2676
2872
  createEffect(() => {
2677
2873
  const __val = String(_p.todo)
2678
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2874
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2679
2875
  })
2680
2876
 
2681
2877
  }
@@ -2688,9 +2884,10 @@ export function initItem(__scope, _p = {}) {
2688
2884
 
2689
2885
  const [_s0] = $t(__scope, 's0')
2690
2886
 
2887
+ let __anchor_s0 = _s0
2691
2888
  createEffect(() => {
2692
2889
  const __val = String(_p.item)
2693
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2890
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2694
2891
  })
2695
2892
 
2696
2893
  }
@@ -2737,7 +2934,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
2737
2934
  `;
2738
2935
 
2739
2936
  exports[`docs/core/components/context-api.md doc-examples L40 — (no label) 1`] = `
2740
- "import { $t, createComponent, createEffect, createSignal, hydrate, provideContext } from '@barefootjs/client/runtime'
2937
+ "import { $t, __bfText, createComponent, createEffect, createSignal, hydrate, provideContext } from '@barefootjs/client/runtime'
2741
2938
 
2742
2939
  export function initTodoItem(__scope, _p = {}) {
2743
2940
  if (!__scope) return
@@ -2745,9 +2942,10 @@ export function initTodoItem(__scope, _p = {}) {
2745
2942
 
2746
2943
  const [_s0] = $t(__scope, 's0')
2747
2944
 
2945
+ let __anchor_s0 = _s0
2748
2946
  createEffect(() => {
2749
2947
  const __val = String(_p.todo)
2750
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2948
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2751
2949
  })
2752
2950
 
2753
2951
  }
@@ -2760,9 +2958,10 @@ export function initItem(__scope, _p = {}) {
2760
2958
 
2761
2959
  const [_s0] = $t(__scope, 's0')
2762
2960
 
2961
+ let __anchor_s0 = _s0
2763
2962
  createEffect(() => {
2764
2963
  const __val = String(_p.item)
2765
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
2964
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2766
2965
  })
2767
2966
 
2768
2967
  }
@@ -2848,7 +3047,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
2848
3047
  `;
2849
3048
 
2850
3049
  exports[`docs/core/components/context-api.md doc-examples L94 — Usage 1`] = `
2851
- "import { $c, $t, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
3050
+ "import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2852
3051
  import '/* @bf-child:ThemeProvider */'
2853
3052
  import '/* @bf-child:ThemedButton */'
2854
3053
 
@@ -2858,9 +3057,10 @@ export function initTodoItem(__scope, _p = {}) {
2858
3057
 
2859
3058
  const [_s0] = $t(__scope, 's0')
2860
3059
 
3060
+ let __anchor_s0 = _s0
2861
3061
  createEffect(() => {
2862
3062
  const __val = String(_p.todo)
2863
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3063
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2864
3064
  })
2865
3065
 
2866
3066
  }
@@ -2873,9 +3073,10 @@ export function initItem(__scope, _p = {}) {
2873
3073
 
2874
3074
  const [_s0] = $t(__scope, 's0')
2875
3075
 
3076
+ let __anchor_s0 = _s0
2876
3077
  createEffect(() => {
2877
3078
  const __val = String(_p.item)
2878
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3079
+ __anchor_s0 = __bfText(__anchor_s0, __val)
2879
3080
  })
2880
3081
 
2881
3082
  }
@@ -2999,7 +3200,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
2999
3200
  `;
3000
3201
 
3001
3202
  exports[`docs/core/components/context-api.md doc-examples L170 — (no label) 1`] = `
3002
- "import { $c, $t, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
3203
+ "import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
3003
3204
  import '/* @bf-child:Accordion */'
3004
3205
  import '/* @bf-child:AccordionTrigger */'
3005
3206
  import '/* @bf-child:AccordionContent */'
@@ -3010,9 +3211,10 @@ export function initTodoItem(__scope, _p = {}) {
3010
3211
 
3011
3212
  const [_s0] = $t(__scope, 's0')
3012
3213
 
3214
+ let __anchor_s0 = _s0
3013
3215
  createEffect(() => {
3014
3216
  const __val = String(_p.todo)
3015
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3217
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3016
3218
  })
3017
3219
 
3018
3220
  }
@@ -3025,9 +3227,10 @@ export function initItem(__scope, _p = {}) {
3025
3227
 
3026
3228
  const [_s0] = $t(__scope, 's0')
3027
3229
 
3230
+ let __anchor_s0 = _s0
3028
3231
  createEffect(() => {
3029
3232
  const __val = String(_p.item)
3030
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3233
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3031
3234
  })
3032
3235
 
3033
3236
  }
@@ -3067,7 +3270,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
3067
3270
  `;
3068
3271
 
3069
3272
  exports[`docs/core/components/context-api.md doc-examples L190 — Provider passes signal getter 1`] = `
3070
- "import { $t, createComponent, createEffect, createSignal, hydrate, provideContext } from '@barefootjs/client/runtime'
3273
+ "import { $t, __bfText, createComponent, createEffect, createSignal, hydrate, provideContext } from '@barefootjs/client/runtime'
3071
3274
 
3072
3275
  export function initTodoItem(__scope, _p = {}) {
3073
3276
  if (!__scope) return
@@ -3075,9 +3278,10 @@ export function initTodoItem(__scope, _p = {}) {
3075
3278
 
3076
3279
  const [_s0] = $t(__scope, 's0')
3077
3280
 
3281
+ let __anchor_s0 = _s0
3078
3282
  createEffect(() => {
3079
3283
  const __val = String(_p.todo)
3080
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3284
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3081
3285
  })
3082
3286
 
3083
3287
  }
@@ -3090,9 +3294,10 @@ export function initItem(__scope, _p = {}) {
3090
3294
 
3091
3295
  const [_s0] = $t(__scope, 's0')
3092
3296
 
3297
+ let __anchor_s0 = _s0
3093
3298
  createEffect(() => {
3094
3299
  const __val = String(_p.item)
3095
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3300
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3096
3301
  })
3097
3302
 
3098
3303
  }
@@ -3182,7 +3387,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
3182
3387
  `;
3183
3388
 
3184
3389
  exports[`docs/core/components/portals.md doc-examples L53 — (no label) 1`] = `
3185
- "import { $, $t, createComponent, createEffect, createPortal, createSignal, hydrate, isSSRPortal } from '@barefootjs/client/runtime'
3390
+ "import { $, $t, __bfText, createComponent, createEffect, createPortal, createSignal, hydrate, isSSRPortal } from '@barefootjs/client/runtime'
3186
3391
 
3187
3392
 
3188
3393
  export function initTooltip(__scope, _p = {}) {
@@ -3205,9 +3410,10 @@ export function initTooltip(__scope, _p = {}) {
3205
3410
  const [_s0, _s2] = $(__scope, 's0', 's2')
3206
3411
  const [_s1] = $t(__scope, 's1')
3207
3412
 
3413
+ let __anchor_s1 = _s1
3208
3414
  createEffect(() => {
3209
3415
  const __val = _p.text
3210
- if (_s1 && !__val?.__isSlot) _s1.nodeValue = String(__val ?? '')
3416
+ __anchor_s1 = __bfText(__anchor_s1, __val)
3211
3417
  })
3212
3418
 
3213
3419
  if (_s0) _s0.addEventListener('mouseenter', () => { setVisible(true) })
@@ -3286,7 +3492,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
3286
3492
  `;
3287
3493
 
3288
3494
  exports[`docs/core/components/props-type-safety.md doc-examples L16 — (no label) 1`] = `
3289
- "import { $t, createComponent, createEffect, hydrate } from '@barefootjs/client/runtime'
3495
+ "import { $t, __bfText, createComponent, createEffect, hydrate } from '@barefootjs/client/runtime'
3290
3496
 
3291
3497
 
3292
3498
  export function initGreeting(__scope, _p = {}) {
@@ -3295,14 +3501,16 @@ export function initGreeting(__scope, _p = {}) {
3295
3501
 
3296
3502
  const [_s0, _s1] = $t(__scope, 's0', 's1')
3297
3503
 
3504
+ let __anchor_s0 = _s0
3298
3505
  createEffect(() => {
3299
3506
  const __val = _p.greeting ?? 'Hello'
3300
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3507
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3301
3508
  })
3302
3509
 
3510
+ let __anchor_s1 = _s1
3303
3511
  createEffect(() => {
3304
3512
  const __val = _p.name
3305
- if (_s1 && !__val?.__isSlot) _s1.nodeValue = String(__val ?? '')
3513
+ __anchor_s1 = __bfText(__anchor_s1, __val)
3306
3514
  })
3307
3515
 
3308
3516
  }
@@ -3348,7 +3556,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
3348
3556
  `;
3349
3557
 
3350
3558
  exports[`docs/core/components/props-type-safety.md doc-examples L89 — (no label) 1`] = `
3351
- "import { $c, $t, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
3559
+ "import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
3352
3560
  import '/* @bf-child:Card */'
3353
3561
 
3354
3562
  export function initTodoItem(__scope, _p = {}) {
@@ -3357,9 +3565,10 @@ export function initTodoItem(__scope, _p = {}) {
3357
3565
 
3358
3566
  const [_s0] = $t(__scope, 's0')
3359
3567
 
3568
+ let __anchor_s0 = _s0
3360
3569
  createEffect(() => {
3361
3570
  const __val = String(_p.todo)
3362
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3571
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3363
3572
  })
3364
3573
 
3365
3574
  }
@@ -3372,9 +3581,10 @@ export function initItem(__scope, _p = {}) {
3372
3581
 
3373
3582
  const [_s0] = $t(__scope, 's0')
3374
3583
 
3584
+ let __anchor_s0 = _s0
3375
3585
  createEffect(() => {
3376
3586
  const __val = String(_p.item)
3377
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3587
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3378
3588
  })
3379
3589
 
3380
3590
  }
@@ -3428,7 +3638,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
3428
3638
  `;
3429
3639
 
3430
3640
  exports[`docs/core/core-concepts/how-it-works.mdx doc-examples L33 — (no label) 1`] = `
3431
- "import { $, $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
3641
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
3432
3642
 
3433
3643
 
3434
3644
  export function initCounter(__scope, _p = {}) {
@@ -3440,9 +3650,10 @@ export function initCounter(__scope, _p = {}) {
3440
3650
  const [_s1] = $(__scope, 's1')
3441
3651
  const [_s0] = $t(__scope, 's0')
3442
3652
 
3653
+ let __anchor_s0 = _s0
3443
3654
  createEffect(() => {
3444
3655
  const __val = count()
3445
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3656
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3446
3657
  })
3447
3658
 
3448
3659
  if (_s1) _s1.addEventListener('click', () => { setCount(n => n + 1) })
@@ -3475,7 +3686,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
3475
3686
  `;
3476
3687
 
3477
3688
  exports[`docs/core/core-concepts/mpa-style.md doc-examples L23 — (no label) 1`] = `
3478
- "import { $, $c, $t, createComponent, createEffect, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
3689
+ "import { $, $c, $t, __bfText, createComponent, createEffect, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
3479
3690
  import '/* @bf-child:ReviewStars */'
3480
3691
  import '/* @bf-child:AddToCart */'
3481
3692
 
@@ -3490,14 +3701,16 @@ export function initProductPage(__scope, _p = {}) {
3490
3701
  const [_s0, _s2] = $t(__scope, 's0', 's2')
3491
3702
  const [_s5, _s6] = $c(__scope, 's5', 's6')
3492
3703
 
3704
+ let __anchor_s0 = _s0
3493
3705
  createEffect(() => {
3494
3706
  const __val = product.name
3495
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3707
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3496
3708
  })
3497
3709
 
3710
+ let __anchor_s2 = _s2
3498
3711
  createEffect(() => {
3499
3712
  const __val = product.description
3500
- if (_s2 && !__val?.__isSlot) _s2.nodeValue = String(__val ?? '')
3713
+ __anchor_s2 = __bfText(__anchor_s2, __val)
3501
3714
  })
3502
3715
 
3503
3716
  createEffect(() => {
@@ -3529,7 +3742,7 @@ export function ProductPage(_p, __bfKey) { return createComponent('ProductPage',
3529
3742
  `;
3530
3743
 
3531
3744
  exports[`docs/core/adapters/hono-adapter.md doc-examples L55 — (no label) 1`] = `
3532
- "import { $t, createComponent, createEffect, hydrate } from '@barefootjs/client/runtime'
3745
+ "import { $t, __bfText, createComponent, createEffect, hydrate } from '@barefootjs/client/runtime'
3533
3746
 
3534
3747
 
3535
3748
  export function initGreeting(__scope, _p = {}) {
@@ -3538,9 +3751,10 @@ export function initGreeting(__scope, _p = {}) {
3538
3751
 
3539
3752
  const [_s0] = $t(__scope, 's0')
3540
3753
 
3754
+ let __anchor_s0 = _s0
3541
3755
  createEffect(() => {
3542
3756
  const __val = _p.name
3543
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3757
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3544
3758
  })
3545
3759
 
3546
3760
  }
@@ -3550,7 +3764,7 @@ export function Greeting(_p, __bfKey) { return createComponent('Greeting', _p, _
3550
3764
  `;
3551
3765
 
3552
3766
  exports[`docs/core/adapters/hono-adapter.md doc-examples L82 — (no label) 1`] = `
3553
- "import { $, $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
3767
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
3554
3768
 
3555
3769
 
3556
3770
  export function initCounter(__scope, _p = {}) {
@@ -3566,9 +3780,10 @@ export function initCounter(__scope, _p = {}) {
3566
3780
  const [_s2] = $(__scope, 's2')
3567
3781
  const [_s0] = $t(__scope, 's0')
3568
3782
 
3783
+ let __anchor_s0 = _s0
3569
3784
  createEffect(() => {
3570
3785
  const __val = count()
3571
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3786
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3572
3787
  })
3573
3788
 
3574
3789
  if (_s2) _s2.addEventListener('click', () => { setCount(n => n + 1) })
@@ -3601,7 +3816,7 @@ export function Layout(_p, __bfKey) { return createComponent('Layout', _p, __bfK
3601
3816
  `;
3602
3817
 
3603
3818
  exports[`docs/core/adapters/hono-adapter.md doc-examples L167 — (no label) 1`] = `
3604
- "import { $, $t, createComponent, createEffect, createSignal, hydrate, insert } from '@barefootjs/client/runtime'
3819
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, insert } from '@barefootjs/client/runtime'
3605
3820
 
3606
3821
  export function initTodoItem(__scope, _p = {}) {
3607
3822
  if (!__scope) return
@@ -3609,9 +3824,10 @@ export function initTodoItem(__scope, _p = {}) {
3609
3824
 
3610
3825
  const [_s0] = $t(__scope, 's0')
3611
3826
 
3827
+ let __anchor_s0 = _s0
3612
3828
  createEffect(() => {
3613
3829
  const __val = String(_p.todo)
3614
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3830
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3615
3831
  })
3616
3832
 
3617
3833
  }
@@ -3624,9 +3840,10 @@ export function initItem(__scope, _p = {}) {
3624
3840
 
3625
3841
  const [_s0] = $t(__scope, 's0')
3626
3842
 
3843
+ let __anchor_s0 = _s0
3627
3844
  createEffect(() => {
3628
3845
  const __val = String(_p.item)
3629
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3846
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3630
3847
  })
3631
3848
 
3632
3849
  }
@@ -3669,7 +3886,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
3669
3886
  `;
3670
3887
 
3671
3888
  exports[`docs/core/adapters/hono-adapter.md doc-examples L171 — (no label) 1`] = `
3672
- "import { $, $t, createComponent, createEffect, createSignal, hydrate, insert } from '@barefootjs/client/runtime'
3889
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, insert } from '@barefootjs/client/runtime'
3673
3890
 
3674
3891
  export function initTodoItem(__scope, _p = {}) {
3675
3892
  if (!__scope) return
@@ -3677,9 +3894,10 @@ export function initTodoItem(__scope, _p = {}) {
3677
3894
 
3678
3895
  const [_s0] = $t(__scope, 's0')
3679
3896
 
3897
+ let __anchor_s0 = _s0
3680
3898
  createEffect(() => {
3681
3899
  const __val = String(_p.todo)
3682
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3900
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3683
3901
  })
3684
3902
 
3685
3903
  }
@@ -3692,9 +3910,10 @@ export function initItem(__scope, _p = {}) {
3692
3910
 
3693
3911
  const [_s0] = $t(__scope, 's0')
3694
3912
 
3913
+ let __anchor_s0 = _s0
3695
3914
  createEffect(() => {
3696
3915
  const __val = String(_p.item)
3697
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3916
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3698
3917
  })
3699
3918
 
3700
3919
  }
@@ -3737,7 +3956,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
3737
3956
  `;
3738
3957
 
3739
3958
  exports[`docs/core/adapters/hono-adapter.md doc-examples L177 — (no label) 1`] = `
3740
- "import { $, $t, __bfSlot, createComponent, createEffect, createSignal, hydrate, insert } from '@barefootjs/client/runtime'
3959
+ "import { $, $t, __bfSlot, __bfText, createComponent, createEffect, createSignal, hydrate, insert } from '@barefootjs/client/runtime'
3741
3960
 
3742
3961
  export function initTodoItem(__scope, _p = {}) {
3743
3962
  if (!__scope) return
@@ -3745,9 +3964,10 @@ export function initTodoItem(__scope, _p = {}) {
3745
3964
 
3746
3965
  const [_s0] = $t(__scope, 's0')
3747
3966
 
3967
+ let __anchor_s0 = _s0
3748
3968
  createEffect(() => {
3749
3969
  const __val = String(_p.todo)
3750
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3970
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3751
3971
  })
3752
3972
 
3753
3973
  }
@@ -3760,9 +3980,10 @@ export function initItem(__scope, _p = {}) {
3760
3980
 
3761
3981
  const [_s0] = $t(__scope, 's0')
3762
3982
 
3983
+ let __anchor_s0 = _s0
3763
3984
  createEffect(() => {
3764
3985
  const __val = String(_p.item)
3765
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
3986
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3766
3987
  })
3767
3988
 
3768
3989
  }
@@ -3805,7 +4026,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
3805
4026
  `;
3806
4027
 
3807
4028
  exports[`docs/core/adapters/hono-adapter.md doc-examples L190 — (no label) 1`] = `
3808
- "import { $, $t, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
4029
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
3809
4030
 
3810
4031
  export function initTodoItem(__scope, _p = {}) {
3811
4032
  if (!__scope) return
@@ -3813,9 +4034,10 @@ export function initTodoItem(__scope, _p = {}) {
3813
4034
 
3814
4035
  const [_s0] = $t(__scope, 's0')
3815
4036
 
4037
+ let __anchor_s0 = _s0
3816
4038
  createEffect(() => {
3817
4039
  const __val = String(_p.todo)
3818
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4040
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3819
4041
  })
3820
4042
 
3821
4043
  }
@@ -3828,9 +4050,10 @@ export function initItem(__scope, _p = {}) {
3828
4050
 
3829
4051
  const [_s0] = $t(__scope, 's0')
3830
4052
 
4053
+ let __anchor_s0 = _s0
3831
4054
  createEffect(() => {
3832
4055
  const __val = String(_p.item)
3833
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4056
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3834
4057
  })
3835
4058
 
3836
4059
  }
@@ -3870,7 +4093,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
3870
4093
  `;
3871
4094
 
3872
4095
  exports[`docs/core/adapters/go-template-adapter.md doc-examples L50 — (no label) 1`] = `
3873
- "import { $t, createComponent, createEffect, hydrate } from '@barefootjs/client/runtime'
4096
+ "import { $t, __bfText, createComponent, createEffect, hydrate } from '@barefootjs/client/runtime'
3874
4097
 
3875
4098
 
3876
4099
  export function initGreeting(__scope, _p = {}) {
@@ -3879,9 +4102,10 @@ export function initGreeting(__scope, _p = {}) {
3879
4102
 
3880
4103
  const [_s0] = $t(__scope, 's0')
3881
4104
 
4105
+ let __anchor_s0 = _s0
3882
4106
  createEffect(() => {
3883
4107
  const __val = _p.name
3884
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4108
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3885
4109
  })
3886
4110
 
3887
4111
  }
@@ -3891,7 +4115,7 @@ export function Greeting(_p, __bfKey) { return createComponent('Greeting', _p, _
3891
4115
  `;
3892
4116
 
3893
4117
  exports[`docs/core/adapters/go-template-adapter.md doc-examples L74 — (no label) 1`] = `
3894
- "import { $, $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
4118
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
3895
4119
 
3896
4120
 
3897
4121
  export function initCounter(__scope, _p = {}) {
@@ -3907,9 +4131,10 @@ export function initCounter(__scope, _p = {}) {
3907
4131
  const [_s2] = $(__scope, 's2')
3908
4132
  const [_s0] = $t(__scope, 's0')
3909
4133
 
4134
+ let __anchor_s0 = _s0
3910
4135
  createEffect(() => {
3911
4136
  const __val = count()
3912
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4137
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3913
4138
  })
3914
4139
 
3915
4140
  if (_s2) _s2.addEventListener('click', () => { setCount(n => n + 1) })
@@ -3920,7 +4145,7 @@ export function Counter(_p, __bfKey) { return createComponent('Counter', _p, __b
3920
4145
  `;
3921
4146
 
3922
4147
  exports[`docs/core/adapters/go-template-adapter.md doc-examples L147 — (no label) 1`] = `
3923
- "import { $, $t, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
4148
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
3924
4149
 
3925
4150
  export function initTodoItem(__scope, _p = {}) {
3926
4151
  if (!__scope) return
@@ -3928,9 +4153,10 @@ export function initTodoItem(__scope, _p = {}) {
3928
4153
 
3929
4154
  const [_s0] = $t(__scope, 's0')
3930
4155
 
4156
+ let __anchor_s0 = _s0
3931
4157
  createEffect(() => {
3932
4158
  const __val = String(_p.todo)
3933
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4159
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3934
4160
  })
3935
4161
 
3936
4162
  }
@@ -3943,9 +4169,10 @@ export function initItem(__scope, _p = {}) {
3943
4169
 
3944
4170
  const [_s0] = $t(__scope, 's0')
3945
4171
 
4172
+ let __anchor_s0 = _s0
3946
4173
  createEffect(() => {
3947
4174
  const __val = String(_p.item)
3948
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4175
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3949
4176
  })
3950
4177
 
3951
4178
  }
@@ -3985,7 +4212,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
3985
4212
  `;
3986
4213
 
3987
4214
  exports[`docs/core/adapters/go-template-adapter.md doc-examples L159 — (no label) 1`] = `
3988
- "import { $, $t, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
4215
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
3989
4216
 
3990
4217
  export function initTodoItem(__scope, _p = {}) {
3991
4218
  if (!__scope) return
@@ -3993,9 +4220,10 @@ export function initTodoItem(__scope, _p = {}) {
3993
4220
 
3994
4221
  const [_s0] = $t(__scope, 's0')
3995
4222
 
4223
+ let __anchor_s0 = _s0
3996
4224
  createEffect(() => {
3997
4225
  const __val = String(_p.todo)
3998
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4226
+ __anchor_s0 = __bfText(__anchor_s0, __val)
3999
4227
  })
4000
4228
 
4001
4229
  }
@@ -4008,9 +4236,10 @@ export function initItem(__scope, _p = {}) {
4008
4236
 
4009
4237
  const [_s0] = $t(__scope, 's0')
4010
4238
 
4239
+ let __anchor_s0 = _s0
4011
4240
  createEffect(() => {
4012
4241
  const __val = String(_p.item)
4013
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4242
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4014
4243
  })
4015
4244
 
4016
4245
  }
@@ -4050,7 +4279,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
4050
4279
  `;
4051
4280
 
4052
4281
  exports[`docs/core/adapters/go-template-adapter.md doc-examples L173 — (no label) 1`] = `
4053
- "import { $, $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
4282
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
4054
4283
 
4055
4284
  export function initTodoItem(__scope, _p = {}) {
4056
4285
  if (!__scope) return
@@ -4058,9 +4287,10 @@ export function initTodoItem(__scope, _p = {}) {
4058
4287
 
4059
4288
  const [_s0] = $t(__scope, 's0')
4060
4289
 
4290
+ let __anchor_s0 = _s0
4061
4291
  createEffect(() => {
4062
4292
  const __val = String(_p.todo)
4063
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4293
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4064
4294
  })
4065
4295
 
4066
4296
  }
@@ -4073,9 +4303,10 @@ export function initItem(__scope, _p = {}) {
4073
4303
 
4074
4304
  const [_s0] = $t(__scope, 's0')
4075
4305
 
4306
+ let __anchor_s0 = _s0
4076
4307
  createEffect(() => {
4077
4308
  const __val = String(_p.item)
4078
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4309
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4079
4310
  })
4080
4311
 
4081
4312
  }
@@ -4143,7 +4374,7 @@ export function TodoList(_p, __bfKey) { return createComponent('TodoList', _p, _
4143
4374
  `;
4144
4375
 
4145
4376
  exports[`docs/core/adapters/go-template-adapter.md doc-examples L231 — (no label) 1`] = `
4146
- "import { $, $t, createComponent, createEffect, createSignal, hydrate, insert } from '@barefootjs/client/runtime'
4377
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, insert } from '@barefootjs/client/runtime'
4147
4378
 
4148
4379
  export function initTodoItem(__scope, _p = {}) {
4149
4380
  if (!__scope) return
@@ -4151,9 +4382,10 @@ export function initTodoItem(__scope, _p = {}) {
4151
4382
 
4152
4383
  const [_s0] = $t(__scope, 's0')
4153
4384
 
4385
+ let __anchor_s0 = _s0
4154
4386
  createEffect(() => {
4155
4387
  const __val = String(_p.todo)
4156
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4388
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4157
4389
  })
4158
4390
 
4159
4391
  }
@@ -4166,9 +4398,10 @@ export function initItem(__scope, _p = {}) {
4166
4398
 
4167
4399
  const [_s0] = $t(__scope, 's0')
4168
4400
 
4401
+ let __anchor_s0 = _s0
4169
4402
  createEffect(() => {
4170
4403
  const __val = String(_p.item)
4171
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4404
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4172
4405
  })
4173
4406
 
4174
4407
  }
@@ -4211,7 +4444,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
4211
4444
  `;
4212
4445
 
4213
4446
  exports[`docs/core/adapters/custom-adapter.md doc-examples L169 — (no label) 1`] = `
4214
- "import { $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
4447
+ "import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
4215
4448
 
4216
4449
  export function initTodoItem(__scope, _p = {}) {
4217
4450
  if (!__scope) return
@@ -4219,9 +4452,10 @@ export function initTodoItem(__scope, _p = {}) {
4219
4452
 
4220
4453
  const [_s0] = $t(__scope, 's0')
4221
4454
 
4455
+ let __anchor_s0 = _s0
4222
4456
  createEffect(() => {
4223
4457
  const __val = String(_p.todo)
4224
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4458
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4225
4459
  })
4226
4460
 
4227
4461
  }
@@ -4234,9 +4468,10 @@ export function initItem(__scope, _p = {}) {
4234
4468
 
4235
4469
  const [_s0] = $t(__scope, 's0')
4236
4470
 
4471
+ let __anchor_s0 = _s0
4237
4472
  createEffect(() => {
4238
4473
  const __val = String(_p.item)
4239
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4474
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4240
4475
  })
4241
4476
 
4242
4477
  }
@@ -4267,7 +4502,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
4267
4502
  `;
4268
4503
 
4269
4504
  exports[`docs/core/adapters/custom-adapter.md doc-examples L174 — (no label) 1`] = `
4270
- "import { $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
4505
+ "import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
4271
4506
 
4272
4507
  export function initTodoItem(__scope, _p = {}) {
4273
4508
  if (!__scope) return
@@ -4275,9 +4510,10 @@ export function initTodoItem(__scope, _p = {}) {
4275
4510
 
4276
4511
  const [_s0] = $t(__scope, 's0')
4277
4512
 
4513
+ let __anchor_s0 = _s0
4278
4514
  createEffect(() => {
4279
4515
  const __val = String(_p.todo)
4280
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4516
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4281
4517
  })
4282
4518
 
4283
4519
  }
@@ -4290,9 +4526,10 @@ export function initItem(__scope, _p = {}) {
4290
4526
 
4291
4527
  const [_s0] = $t(__scope, 's0')
4292
4528
 
4529
+ let __anchor_s0 = _s0
4293
4530
  createEffect(() => {
4294
4531
  const __val = String(_p.item)
4295
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4532
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4296
4533
  })
4297
4534
 
4298
4535
  }
@@ -4323,7 +4560,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
4323
4560
  `;
4324
4561
 
4325
4562
  exports[`docs/core/adapters/custom-adapter.md doc-examples L195 — (no label) 1`] = `
4326
- "import { $, $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
4563
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
4327
4564
 
4328
4565
  export function initTodoItem(__scope, _p = {}) {
4329
4566
  if (!__scope) return
@@ -4331,9 +4568,10 @@ export function initTodoItem(__scope, _p = {}) {
4331
4568
 
4332
4569
  const [_s0] = $t(__scope, 's0')
4333
4570
 
4571
+ let __anchor_s0 = _s0
4334
4572
  createEffect(() => {
4335
4573
  const __val = String(_p.todo)
4336
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4574
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4337
4575
  })
4338
4576
 
4339
4577
  }
@@ -4346,9 +4584,10 @@ export function initItem(__scope, _p = {}) {
4346
4584
 
4347
4585
  const [_s0] = $t(__scope, 's0')
4348
4586
 
4587
+ let __anchor_s0 = _s0
4349
4588
  createEffect(() => {
4350
4589
  const __val = String(_p.item)
4351
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4590
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4352
4591
  })
4353
4592
 
4354
4593
  }
@@ -4392,7 +4631,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
4392
4631
  `;
4393
4632
 
4394
4633
  exports[`docs/core/adapters/custom-adapter.md doc-examples L200 — (no label) 1`] = `
4395
- "import { $, $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
4634
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
4396
4635
 
4397
4636
  export function initTodoItem(__scope, _p = {}) {
4398
4637
  if (!__scope) return
@@ -4400,9 +4639,10 @@ export function initTodoItem(__scope, _p = {}) {
4400
4639
 
4401
4640
  const [_s0] = $t(__scope, 's0')
4402
4641
 
4642
+ let __anchor_s0 = _s0
4403
4643
  createEffect(() => {
4404
4644
  const __val = String(_p.todo)
4405
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4645
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4406
4646
  })
4407
4647
 
4408
4648
  }
@@ -4415,9 +4655,10 @@ export function initItem(__scope, _p = {}) {
4415
4655
 
4416
4656
  const [_s0] = $t(__scope, 's0')
4417
4657
 
4658
+ let __anchor_s0 = _s0
4418
4659
  createEffect(() => {
4419
4660
  const __val = String(_p.item)
4420
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4661
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4421
4662
  })
4422
4663
 
4423
4664
  }
@@ -4470,7 +4711,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
4470
4711
  `;
4471
4712
 
4472
4713
  exports[`docs/core/advanced/compiler-internals.md doc-examples L126 — (no label) 1`] = `
4473
- "import { $, $t, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
4714
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
4474
4715
 
4475
4716
  export function initTodoItem(__scope, _p = {}) {
4476
4717
  if (!__scope) return
@@ -4478,9 +4719,10 @@ export function initTodoItem(__scope, _p = {}) {
4478
4719
 
4479
4720
  const [_s0] = $t(__scope, 's0')
4480
4721
 
4722
+ let __anchor_s0 = _s0
4481
4723
  createEffect(() => {
4482
4724
  const __val = String(_p.todo)
4483
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4725
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4484
4726
  })
4485
4727
 
4486
4728
  }
@@ -4493,9 +4735,10 @@ export function initItem(__scope, _p = {}) {
4493
4735
 
4494
4736
  const [_s0] = $t(__scope, 's0')
4495
4737
 
4738
+ let __anchor_s0 = _s0
4496
4739
  createEffect(() => {
4497
4740
  const __val = String(_p.item)
4498
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4741
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4499
4742
  })
4500
4743
 
4501
4744
  }
@@ -4597,7 +4840,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
4597
4840
  `;
4598
4841
 
4599
4842
  exports[`docs/core/advanced/performance.md doc-examples L67 — ✅ Stable key — DOM nodes reused when list changes 1`] = `
4600
- "import { $, $t, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
4843
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
4601
4844
 
4602
4845
  export function initTodoItem(__scope, _p = {}) {
4603
4846
  if (!__scope) return
@@ -4605,9 +4848,10 @@ export function initTodoItem(__scope, _p = {}) {
4605
4848
 
4606
4849
  const [_s0] = $t(__scope, 's0')
4607
4850
 
4851
+ let __anchor_s0 = _s0
4608
4852
  createEffect(() => {
4609
4853
  const __val = String(_p.todo)
4610
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4854
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4611
4855
  })
4612
4856
 
4613
4857
  }
@@ -4620,9 +4864,10 @@ export function initItem(__scope, _p = {}) {
4620
4864
 
4621
4865
  const [_s0] = $t(__scope, 's0')
4622
4866
 
4867
+ let __anchor_s0 = _s0
4623
4868
  createEffect(() => {
4624
4869
  const __val = String(_p.item)
4625
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4870
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4626
4871
  })
4627
4872
 
4628
4873
  }
@@ -4662,7 +4907,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
4662
4907
  `;
4663
4908
 
4664
4909
  exports[`docs/core/advanced/performance.md doc-examples L70 — ❌ Index key — DOM nodes recreated on reorder 1`] = `
4665
- "import { $, $t, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
4910
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
4666
4911
 
4667
4912
  export function initTodoItem(__scope, _p = {}) {
4668
4913
  if (!__scope) return
@@ -4670,9 +4915,10 @@ export function initTodoItem(__scope, _p = {}) {
4670
4915
 
4671
4916
  const [_s0] = $t(__scope, 's0')
4672
4917
 
4918
+ let __anchor_s0 = _s0
4673
4919
  createEffect(() => {
4674
4920
  const __val = String(_p.todo)
4675
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4921
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4676
4922
  })
4677
4923
 
4678
4924
  }
@@ -4685,9 +4931,10 @@ export function initItem(__scope, _p = {}) {
4685
4931
 
4686
4932
  const [_s0] = $t(__scope, 's0')
4687
4933
 
4934
+ let __anchor_s0 = _s0
4688
4935
  createEffect(() => {
4689
4936
  const __val = String(_p.item)
4690
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
4937
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4691
4938
  })
4692
4939
 
4693
4940
  }
@@ -4934,7 +5181,7 @@ export function TimelineBar(_p, __bfKey) { return createComponent('TimelineBar',
4934
5181
  `;
4935
5182
 
4936
5183
  exports[`docs/core/introduction.mdx doc-examples L15 — (no label) 1`] = `
4937
- "import { $, $t, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
5184
+ "import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
4938
5185
 
4939
5186
 
4940
5187
  export function initCounter(__scope, _p = {}) {
@@ -4946,9 +5193,10 @@ export function initCounter(__scope, _p = {}) {
4946
5193
  const [_s1] = $(__scope, 's1')
4947
5194
  const [_s0] = $t(__scope, 's0')
4948
5195
 
5196
+ let __anchor_s0 = _s0
4949
5197
  createEffect(() => {
4950
5198
  const __val = count()
4951
- if (_s0 && !__val?.__isSlot) _s0.nodeValue = String(__val ?? '')
5199
+ __anchor_s0 = __bfText(__anchor_s0, __val)
4952
5200
  })
4953
5201
 
4954
5202
  if (_s1) _s1.addEventListener('click', () => { setCount(n => n + 1) })