@barefootjs/jsx 0.26.4 → 0.27.0

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 (73) hide show
  1. package/dist/compiler.d.ts.map +1 -1
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +321 -104
  5. package/dist/ir-to-client-js/client-only-elision.d.ts +103 -0
  6. package/dist/ir-to-client-js/client-only-elision.d.ts.map +1 -0
  7. package/dist/ir-to-client-js/collect-elements.d.ts.map +1 -1
  8. package/dist/ir-to-client-js/control-flow/shared.d.ts +1 -1
  9. package/dist/ir-to-client-js/control-flow/stringify/claim-plan.d.ts +54 -0
  10. package/dist/ir-to-client-js/control-flow/stringify/claim-plan.d.ts.map +1 -0
  11. package/dist/ir-to-client-js/control-flow/stringify/inner-loop.d.ts.map +1 -1
  12. package/dist/ir-to-client-js/control-flow/stringify/insert.d.ts.map +1 -1
  13. package/dist/ir-to-client-js/control-flow/stringify/loop-child-arm.d.ts.map +1 -1
  14. package/dist/ir-to-client-js/control-flow/stringify/loop.d.ts +17 -20
  15. package/dist/ir-to-client-js/control-flow/stringify/loop.d.ts.map +1 -1
  16. package/dist/ir-to-client-js/control-flow/stringify/reactive-effects.d.ts +63 -4
  17. package/dist/ir-to-client-js/control-flow/stringify/reactive-effects.d.ts.map +1 -1
  18. package/dist/ir-to-client-js/control-flow.d.ts +1 -1
  19. package/dist/ir-to-client-js/element-refs.d.ts +8 -3
  20. package/dist/ir-to-client-js/element-refs.d.ts.map +1 -1
  21. package/dist/ir-to-client-js/emit-reactive.d.ts +8 -1
  22. package/dist/ir-to-client-js/emit-reactive.d.ts.map +1 -1
  23. package/dist/ir-to-client-js/html-template.d.ts +24 -0
  24. package/dist/ir-to-client-js/html-template.d.ts.map +1 -1
  25. package/dist/ir-to-client-js/imports.d.ts +2 -2
  26. package/dist/ir-to-client-js/imports.d.ts.map +1 -1
  27. package/dist/ir-to-client-js/reactivity.d.ts.map +1 -1
  28. package/dist/ir-to-client-js/types.d.ts +9 -1
  29. package/dist/ir-to-client-js/types.d.ts.map +1 -1
  30. package/dist/ir-to-client-js/utils.d.ts +1 -1
  31. package/dist/types.d.ts +25 -2
  32. package/dist/types.d.ts.map +1 -1
  33. package/package.json +2 -2
  34. package/src/__tests__/__snapshots__/doc-examples.test.ts.snap +398 -671
  35. package/src/__tests__/child-components-in-map.test.ts +4 -4
  36. package/src/__tests__/client-js-generation.test.ts +19 -11
  37. package/src/__tests__/composite-branch-loop.test.ts +2 -2
  38. package/src/__tests__/cross-file-client-signal.test.ts +5 -1
  39. package/src/__tests__/early-return-scope-var-ref.test.ts +10 -11
  40. package/src/__tests__/inline-jsx-callback.test.ts +6 -4
  41. package/src/__tests__/ir-jsx-props.test.ts +6 -5
  42. package/src/__tests__/loop-fallback-wrap.test.ts +3 -4
  43. package/src/__tests__/module-level-signal.audit.test.ts +7 -2
  44. package/src/__tests__/nested-loop-conditional.test.ts +9 -7
  45. package/src/__tests__/nested-loop-reactive-attrs.test.ts +2 -2
  46. package/src/__tests__/preamble-region-patch.test.ts +18 -12
  47. package/src/__tests__/profile-cond-binding-ids.test.ts +3 -2
  48. package/src/__tests__/profile-loop-binding-ids.test.ts +4 -3
  49. package/src/__tests__/profile-nested-binding-ids.test.ts +11 -6
  50. package/src/__tests__/reactive-attrs-in-map.test.ts +6 -4
  51. package/src/__tests__/template-closure.test.ts +1 -1
  52. package/src/compiler.ts +11 -0
  53. package/src/index.ts +1 -0
  54. package/src/ir-to-client-js/client-only-elision.ts +273 -0
  55. package/src/ir-to-client-js/collect-elements.ts +8 -4
  56. package/src/ir-to-client-js/control-flow/shared.ts +1 -1
  57. package/src/ir-to-client-js/control-flow/stringify/branch-loop.ts +12 -4
  58. package/src/ir-to-client-js/control-flow/stringify/claim-plan.ts +68 -0
  59. package/src/ir-to-client-js/control-flow/stringify/inner-loop.ts +18 -9
  60. package/src/ir-to-client-js/control-flow/stringify/insert.ts +17 -11
  61. package/src/ir-to-client-js/control-flow/stringify/loop-child-arm.ts +35 -16
  62. package/src/ir-to-client-js/control-flow/stringify/loop.ts +48 -46
  63. package/src/ir-to-client-js/control-flow/stringify/reactive-effects.ts +241 -31
  64. package/src/ir-to-client-js/control-flow.ts +1 -1
  65. package/src/ir-to-client-js/element-refs.ts +9 -11
  66. package/src/ir-to-client-js/emit-reactive.ts +50 -14
  67. package/src/ir-to-client-js/html-template.ts +29 -9
  68. package/src/ir-to-client-js/imports.ts +7 -4
  69. package/src/ir-to-client-js/reactivity.ts +3 -2
  70. package/src/ir-to-client-js/types.ts +10 -2
  71. package/src/ir-to-client-js/utils.ts +1 -1
  72. package/src/jsx-to-ir.ts +8 -7
  73. package/src/types.ts +25 -2
@@ -1,18 +1,16 @@
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, __bfText, createComponent, createDisposableEffect, createEffect, createSignal, escapeText, hydrate, insert } from '@barefootjs/client/runtime'
4
+ "import { $, __bfSlot, createComponent, createDisposableEffect, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, insert, lazySlots } from '@barefootjs/client/runtime'
5
5
 
6
6
  export function initTodoItem(__scope, _p = {}) {
7
7
  if (!__scope) return
8
8
  const __scopeId = __scope.getAttribute('bf-s')
9
9
 
10
- const [_s0] = $t(__scope, 's0')
11
-
12
- let __anchor_s0 = _s0
10
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
13
11
  createEffect(() => {
14
12
  const __val = String(_p.todo)
15
- __anchor_s0 = __bfText(__anchor_s0, __val)
13
+ __bfw_s0('s0', escapeTextOrNode(__val))
16
14
  })
17
15
 
18
16
  }
@@ -23,12 +21,10 @@ export function initItem(__scope, _p = {}) {
23
21
  if (!__scope) return
24
22
  const __scopeId = __scope.getAttribute('bf-s')
25
23
 
26
- const [_s0] = $t(__scope, 's0')
27
-
28
- let __anchor_s0 = _s0
24
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
29
25
  createEffect(() => {
30
26
  const __val = String(_p.item)
31
- __anchor_s0 = __bfText(__anchor_s0, __val)
27
+ __bfw_s0('s0', escapeTextOrNode(__val))
32
28
  })
33
29
 
34
30
  }
@@ -58,11 +54,8 @@ export function initExample(__scope, _p = {}) {
58
54
  template: () => { const __slots = []; return { html: \`<p bf-c="s0" bf="s2"><!--bf:s1-->\${__bfSlot(count(), __slots)}<!--/--> items</p>\`, slots: __slots } },
59
55
  bindEvents: (__branchScope, { isFirstRun: __bfFirstRun = false } = {}) => {
60
56
  const __disposers = []
61
- let __anchor_s1 = $t(__branchScope, 's1')[0]
62
- __disposers.push(createDisposableEffect(() => {
63
- const __val = count()
64
- __anchor_s1 = __bfText(__anchor_s1, __val)
65
- }))
57
+ const __bfw_s1 = lazySlots(__branchScope, [{ id: 's1', kind: 'markup', path: [] }])
58
+ __disposers.push(createDisposableEffect(() => { __bfw_s1('s1', escapeTextOrNode(count())) }))
66
59
  return () => __disposers.forEach(d => d())
67
60
  }
68
61
  }, {
@@ -78,18 +71,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
78
71
  `;
79
72
 
80
73
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L18 — Logical AND 1`] = `
81
- "import { $, $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, insert, renderChild } from '@barefootjs/client/runtime'
74
+ "import { $, $c, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, insert, lazySlots, renderChild } from '@barefootjs/client/runtime'
82
75
 
83
76
  export function initTodoItem(__scope, _p = {}) {
84
77
  if (!__scope) return
85
78
  const __scopeId = __scope.getAttribute('bf-s')
86
79
 
87
- const [_s0] = $t(__scope, 's0')
88
-
89
- let __anchor_s0 = _s0
80
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
90
81
  createEffect(() => {
91
82
  const __val = String(_p.todo)
92
- __anchor_s0 = __bfText(__anchor_s0, __val)
83
+ __bfw_s0('s0', escapeTextOrNode(__val))
93
84
  })
94
85
 
95
86
  }
@@ -100,12 +91,10 @@ export function initItem(__scope, _p = {}) {
100
91
  if (!__scope) return
101
92
  const __scopeId = __scope.getAttribute('bf-s')
102
93
 
103
- const [_s0] = $t(__scope, 's0')
104
-
105
- let __anchor_s0 = _s0
94
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
106
95
  createEffect(() => {
107
96
  const __val = String(_p.item)
108
- __anchor_s0 = __bfText(__anchor_s0, __val)
97
+ __bfw_s0('s0', escapeTextOrNode(__val))
109
98
  })
110
99
 
111
100
  }
@@ -154,18 +143,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
154
143
  `;
155
144
 
156
145
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L31 — (no label) 1`] = `
157
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
146
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, mapArray, renderChild } from '@barefootjs/client/runtime'
158
147
 
159
148
  export function initTodoItem(__scope, _p = {}) {
160
149
  if (!__scope) return
161
150
  const __scopeId = __scope.getAttribute('bf-s')
162
151
 
163
- const [_s0] = $t(__scope, 's0')
164
-
165
- let __anchor_s0 = _s0
152
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
166
153
  createEffect(() => {
167
154
  const __val = String(_p.todo)
168
- __anchor_s0 = __bfText(__anchor_s0, __val)
155
+ __bfw_s0('s0', escapeTextOrNode(__val))
169
156
  })
170
157
 
171
158
  }
@@ -176,12 +163,10 @@ export function initItem(__scope, _p = {}) {
176
163
  if (!__scope) return
177
164
  const __scopeId = __scope.getAttribute('bf-s')
178
165
 
179
- const [_s0] = $t(__scope, 's0')
180
-
181
- let __anchor_s0 = _s0
166
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
182
167
  createEffect(() => {
183
168
  const __val = String(_p.item)
184
- __anchor_s0 = __bfText(__anchor_s0, __val)
169
+ __bfw_s0('s0', escapeTextOrNode(__val))
185
170
  })
186
171
 
187
172
  }
@@ -219,18 +204,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
219
204
  `;
220
205
 
221
206
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L40 — ✅ Simple predicate 1`] = `
222
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
207
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, mapArray, renderChild } from '@barefootjs/client/runtime'
223
208
 
224
209
  export function initTodoItem(__scope, _p = {}) {
225
210
  if (!__scope) return
226
211
  const __scopeId = __scope.getAttribute('bf-s')
227
212
 
228
- const [_s0] = $t(__scope, 's0')
229
-
230
- let __anchor_s0 = _s0
213
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
231
214
  createEffect(() => {
232
215
  const __val = String(_p.todo)
233
- __anchor_s0 = __bfText(__anchor_s0, __val)
216
+ __bfw_s0('s0', escapeTextOrNode(__val))
234
217
  })
235
218
 
236
219
  }
@@ -241,12 +224,10 @@ export function initItem(__scope, _p = {}) {
241
224
  if (!__scope) return
242
225
  const __scopeId = __scope.getAttribute('bf-s')
243
226
 
244
- const [_s0] = $t(__scope, 's0')
245
-
246
- let __anchor_s0 = _s0
227
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
247
228
  createEffect(() => {
248
229
  const __val = String(_p.item)
249
- __anchor_s0 = __bfText(__anchor_s0, __val)
230
+ __bfw_s0('s0', escapeTextOrNode(__val))
250
231
  })
251
232
 
252
233
  }
@@ -284,18 +265,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
284
265
  `;
285
266
 
286
267
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L45 — ✅ Block body with simple statements — also works 1`] = `
287
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
268
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, mapArray, renderChild } from '@barefootjs/client/runtime'
288
269
 
289
270
  export function initTodoItem(__scope, _p = {}) {
290
271
  if (!__scope) return
291
272
  const __scopeId = __scope.getAttribute('bf-s')
292
273
 
293
- const [_s0] = $t(__scope, 's0')
294
-
295
- let __anchor_s0 = _s0
274
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
296
275
  createEffect(() => {
297
276
  const __val = String(_p.todo)
298
- __anchor_s0 = __bfText(__anchor_s0, __val)
277
+ __bfw_s0('s0', escapeTextOrNode(__val))
299
278
  })
300
279
 
301
280
  }
@@ -306,12 +285,10 @@ export function initItem(__scope, _p = {}) {
306
285
  if (!__scope) return
307
286
  const __scopeId = __scope.getAttribute('bf-s')
308
287
 
309
- const [_s0] = $t(__scope, 's0')
310
-
311
- let __anchor_s0 = _s0
288
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
312
289
  createEffect(() => {
313
290
  const __val = String(_p.item)
314
- __anchor_s0 = __bfText(__anchor_s0, __val)
291
+ __bfw_s0('s0', escapeTextOrNode(__val))
315
292
  })
316
293
 
317
294
  }
@@ -359,18 +336,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
359
336
  `;
360
337
 
361
338
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L59 — ✅ Projection — works on every adapter 1`] = `
362
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeAttr, escapeText, hydrate, mapArray, patchLeaf } from '@barefootjs/client/runtime'
339
+ "import { $, createComponent, createEffect, createSignal, escapeAttr, escapeText, escapeTextOrNode, hydrate, lazySlots, mapArray, patchLeaf } from '@barefootjs/client/runtime'
363
340
 
364
341
  export function initTodoItem(__scope, _p = {}) {
365
342
  if (!__scope) return
366
343
  const __scopeId = __scope.getAttribute('bf-s')
367
344
 
368
- const [_s0] = $t(__scope, 's0')
369
-
370
- let __anchor_s0 = _s0
345
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
371
346
  createEffect(() => {
372
347
  const __val = String(_p.todo)
373
- __anchor_s0 = __bfText(__anchor_s0, __val)
348
+ __bfw_s0('s0', escapeTextOrNode(__val))
374
349
  })
375
350
 
376
351
  }
@@ -381,12 +356,10 @@ export function initItem(__scope, _p = {}) {
381
356
  if (!__scope) return
382
357
  const __scopeId = __scope.getAttribute('bf-s')
383
358
 
384
- const [_s0] = $t(__scope, 's0')
385
-
386
- let __anchor_s0 = _s0
359
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
387
360
  createEffect(() => {
388
361
  const __val = String(_p.item)
389
- __anchor_s0 = __bfText(__anchor_s0, __val)
362
+ __bfw_s0('s0', escapeTextOrNode(__val))
390
363
  })
391
364
 
392
365
  }
@@ -431,18 +404,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
431
404
  `;
432
405
 
433
406
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L64 — ✅ Statement body — JS-runtime adapters; /* @client */ on Go/Mojo etc. 1`] = `
434
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, mapArray, patchLeaf } from '@barefootjs/client/runtime'
407
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots, mapArray, patchLeaf } from '@barefootjs/client/runtime'
435
408
 
436
409
  export function initTodoItem(__scope, _p = {}) {
437
410
  if (!__scope) return
438
411
  const __scopeId = __scope.getAttribute('bf-s')
439
412
 
440
- const [_s0] = $t(__scope, 's0')
441
-
442
- let __anchor_s0 = _s0
413
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
443
414
  createEffect(() => {
444
415
  const __val = String(_p.todo)
445
- __anchor_s0 = __bfText(__anchor_s0, __val)
416
+ __bfw_s0('s0', escapeTextOrNode(__val))
446
417
  })
447
418
 
448
419
  }
@@ -453,12 +424,10 @@ export function initItem(__scope, _p = {}) {
453
424
  if (!__scope) return
454
425
  const __scopeId = __scope.getAttribute('bf-s')
455
426
 
456
- const [_s0] = $t(__scope, 's0')
457
-
458
- let __anchor_s0 = _s0
427
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
459
428
  createEffect(() => {
460
429
  const __val = String(_p.item)
461
- __anchor_s0 = __bfText(__anchor_s0, __val)
430
+ __bfw_s0('s0', escapeTextOrNode(__val))
462
431
  })
463
432
 
464
433
  }
@@ -509,18 +478,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
509
478
  `;
510
479
 
511
480
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L74 — ✅ Sort then render 1`] = `
512
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
481
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, mapArray, renderChild } from '@barefootjs/client/runtime'
513
482
 
514
483
  export function initTodoItem(__scope, _p = {}) {
515
484
  if (!__scope) return
516
485
  const __scopeId = __scope.getAttribute('bf-s')
517
486
 
518
- const [_s0] = $t(__scope, 's0')
519
-
520
- let __anchor_s0 = _s0
487
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
521
488
  createEffect(() => {
522
489
  const __val = String(_p.todo)
523
- __anchor_s0 = __bfText(__anchor_s0, __val)
490
+ __bfw_s0('s0', escapeTextOrNode(__val))
524
491
  })
525
492
 
526
493
  }
@@ -531,12 +498,10 @@ export function initItem(__scope, _p = {}) {
531
498
  if (!__scope) return
532
499
  const __scopeId = __scope.getAttribute('bf-s')
533
500
 
534
- const [_s0] = $t(__scope, 's0')
535
-
536
- let __anchor_s0 = _s0
501
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
537
502
  createEffect(() => {
538
503
  const __val = String(_p.item)
539
- __anchor_s0 = __bfText(__anchor_s0, __val)
504
+ __bfw_s0('s0', escapeTextOrNode(__val))
540
505
  })
541
506
 
542
507
  }
@@ -574,18 +539,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
574
539
  `;
575
540
 
576
541
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L79 — ✅ Filter, sort, then render 1`] = `
577
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
542
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, mapArray, renderChild } from '@barefootjs/client/runtime'
578
543
 
579
544
  export function initTodoItem(__scope, _p = {}) {
580
545
  if (!__scope) return
581
546
  const __scopeId = __scope.getAttribute('bf-s')
582
547
 
583
- const [_s0] = $t(__scope, 's0')
584
-
585
- let __anchor_s0 = _s0
548
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
586
549
  createEffect(() => {
587
550
  const __val = String(_p.todo)
588
- __anchor_s0 = __bfText(__anchor_s0, __val)
551
+ __bfw_s0('s0', escapeTextOrNode(__val))
589
552
  })
590
553
 
591
554
  }
@@ -596,12 +559,10 @@ export function initItem(__scope, _p = {}) {
596
559
  if (!__scope) return
597
560
  const __scopeId = __scope.getAttribute('bf-s')
598
561
 
599
- const [_s0] = $t(__scope, 's0')
600
-
601
- let __anchor_s0 = _s0
562
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
602
563
  createEffect(() => {
603
564
  const __val = String(_p.item)
604
- __anchor_s0 = __bfText(__anchor_s0, __val)
565
+ __bfw_s0('s0', escapeTextOrNode(__val))
605
566
  })
606
567
 
607
568
  }
@@ -639,18 +600,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
639
600
  `;
640
601
 
641
602
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L84 — ✅ Multi-key: sort by price, break ties by name 1`] = `
642
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
603
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, mapArray, renderChild } from '@barefootjs/client/runtime'
643
604
 
644
605
  export function initTodoItem(__scope, _p = {}) {
645
606
  if (!__scope) return
646
607
  const __scopeId = __scope.getAttribute('bf-s')
647
608
 
648
- const [_s0] = $t(__scope, 's0')
649
-
650
- let __anchor_s0 = _s0
609
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
651
610
  createEffect(() => {
652
611
  const __val = String(_p.todo)
653
- __anchor_s0 = __bfText(__anchor_s0, __val)
612
+ __bfw_s0('s0', escapeTextOrNode(__val))
654
613
  })
655
614
 
656
615
  }
@@ -661,12 +620,10 @@ export function initItem(__scope, _p = {}) {
661
620
  if (!__scope) return
662
621
  const __scopeId = __scope.getAttribute('bf-s')
663
622
 
664
- const [_s0] = $t(__scope, 's0')
665
-
666
- let __anchor_s0 = _s0
623
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
667
624
  createEffect(() => {
668
625
  const __val = String(_p.item)
669
- __anchor_s0 = __bfText(__anchor_s0, __val)
626
+ __bfw_s0('s0', escapeTextOrNode(__val))
670
627
  })
671
628
 
672
629
  }
@@ -704,18 +661,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
704
661
  `;
705
662
 
706
663
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L89 — ✅ Relational ternary 1`] = `
707
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
664
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, mapArray, renderChild } from '@barefootjs/client/runtime'
708
665
 
709
666
  export function initTodoItem(__scope, _p = {}) {
710
667
  if (!__scope) return
711
668
  const __scopeId = __scope.getAttribute('bf-s')
712
669
 
713
- const [_s0] = $t(__scope, 's0')
714
-
715
- let __anchor_s0 = _s0
670
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
716
671
  createEffect(() => {
717
672
  const __val = String(_p.todo)
718
- __anchor_s0 = __bfText(__anchor_s0, __val)
673
+ __bfw_s0('s0', escapeTextOrNode(__val))
719
674
  })
720
675
 
721
676
  }
@@ -726,12 +681,10 @@ export function initItem(__scope, _p = {}) {
726
681
  if (!__scope) return
727
682
  const __scopeId = __scope.getAttribute('bf-s')
728
683
 
729
- const [_s0] = $t(__scope, 's0')
730
-
731
- let __anchor_s0 = _s0
684
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
732
685
  createEffect(() => {
733
686
  const __val = String(_p.item)
734
- __anchor_s0 = __bfText(__anchor_s0, __val)
687
+ __bfw_s0('s0', escapeTextOrNode(__val))
735
688
  })
736
689
 
737
690
  }
@@ -769,18 +722,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
769
722
  `;
770
723
 
771
724
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L100 — (no label) 1`] = `
772
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
725
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
773
726
 
774
727
  export function initTodoItem(__scope, _p = {}) {
775
728
  if (!__scope) return
776
729
  const __scopeId = __scope.getAttribute('bf-s')
777
730
 
778
- const [_s0] = $t(__scope, 's0')
779
-
780
- let __anchor_s0 = _s0
731
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
781
732
  createEffect(() => {
782
733
  const __val = String(_p.todo)
783
- __anchor_s0 = __bfText(__anchor_s0, __val)
734
+ __bfw_s0('s0', escapeTextOrNode(__val))
784
735
  })
785
736
 
786
737
  }
@@ -791,12 +742,10 @@ export function initItem(__scope, _p = {}) {
791
742
  if (!__scope) return
792
743
  const __scopeId = __scope.getAttribute('bf-s')
793
744
 
794
- const [_s0] = $t(__scope, 's0')
795
-
796
- let __anchor_s0 = _s0
745
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
797
746
  createEffect(() => {
798
747
  const __val = String(_p.item)
799
- __anchor_s0 = __bfText(__anchor_s0, __val)
748
+ __bfw_s0('s0', escapeTextOrNode(__val))
800
749
  })
801
750
 
802
751
  }
@@ -833,18 +782,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
833
782
  `;
834
783
 
835
784
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L142 — ✅ Nested \`.filter()\` / \`.map()\` now compiles everywhere 1`] = `
836
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
785
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
837
786
 
838
787
  export function initTodoItem(__scope, _p = {}) {
839
788
  if (!__scope) return
840
789
  const __scopeId = __scope.getAttribute('bf-s')
841
790
 
842
- const [_s0] = $t(__scope, 's0')
843
-
844
- let __anchor_s0 = _s0
791
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
845
792
  createEffect(() => {
846
793
  const __val = String(_p.todo)
847
- __anchor_s0 = __bfText(__anchor_s0, __val)
794
+ __bfw_s0('s0', escapeTextOrNode(__val))
848
795
  })
849
796
 
850
797
  }
@@ -855,12 +802,10 @@ export function initItem(__scope, _p = {}) {
855
802
  if (!__scope) return
856
803
  const __scopeId = __scope.getAttribute('bf-s')
857
804
 
858
- const [_s0] = $t(__scope, 's0')
859
-
860
- let __anchor_s0 = _s0
805
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
861
806
  createEffect(() => {
862
807
  const __val = String(_p.item)
863
- __anchor_s0 = __bfText(__anchor_s0, __val)
808
+ __bfw_s0('s0', escapeTextOrNode(__val))
864
809
  })
865
810
 
866
811
  }
@@ -884,12 +829,10 @@ export function initExample(__scope, _p = {}) {
884
829
  const [accepted] = createSignal(false)
885
830
  const [text, setText] = createSignal('')
886
831
 
887
- const [_s0] = $t(__scope, 's0')
888
-
889
- let __anchor_s0 = _s0
832
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
890
833
  createEffect(() => {
891
834
  const __val = items().filter(x => x.tags.filter(t => t.active).length > 0).map(t => t.name)
892
- __anchor_s0 = __bfText(__anchor_s0, __val)
835
+ __bfw_s0('s0', escapeTextOrNode(__val))
893
836
  })
894
837
 
895
838
  }
@@ -899,18 +842,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
899
842
  `;
900
843
 
901
844
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L149 — ❌ BF101 on Go/Mojo; works on Hono 1`] = `
902
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
845
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
903
846
 
904
847
  export function initTodoItem(__scope, _p = {}) {
905
848
  if (!__scope) return
906
849
  const __scopeId = __scope.getAttribute('bf-s')
907
850
 
908
- const [_s0] = $t(__scope, 's0')
909
-
910
- let __anchor_s0 = _s0
851
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
911
852
  createEffect(() => {
912
853
  const __val = String(_p.todo)
913
- __anchor_s0 = __bfText(__anchor_s0, __val)
854
+ __bfw_s0('s0', escapeTextOrNode(__val))
914
855
  })
915
856
 
916
857
  }
@@ -921,12 +862,10 @@ export function initItem(__scope, _p = {}) {
921
862
  if (!__scope) return
922
863
  const __scopeId = __scope.getAttribute('bf-s')
923
864
 
924
- const [_s0] = $t(__scope, 's0')
925
-
926
- let __anchor_s0 = _s0
865
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
927
866
  createEffect(() => {
928
867
  const __val = String(_p.item)
929
- __anchor_s0 = __bfText(__anchor_s0, __val)
868
+ __bfw_s0('s0', escapeTextOrNode(__val))
930
869
  })
931
870
 
932
871
  }
@@ -950,12 +889,10 @@ export function initExample(__scope, _p = {}) {
950
889
  const [accepted] = createSignal(false)
951
890
  const [text, setText] = createSignal('')
952
891
 
953
- const [_s0] = $t(__scope, 's0')
954
-
955
- let __anchor_s0 = _s0
892
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
956
893
  createEffect(() => {
957
894
  const __val = items().filter(x => x.tags.some(t => t.active)).map(t => t.name)
958
- __anchor_s0 = __bfText(__anchor_s0, __val)
895
+ __bfw_s0('s0', escapeTextOrNode(__val))
959
896
  })
960
897
 
961
898
  }
@@ -965,18 +902,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
965
902
  `;
966
903
 
967
904
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L152 — ✅ Add /* @client */ to evaluate on the client 1`] = `
968
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
905
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
969
906
 
970
907
  export function initTodoItem(__scope, _p = {}) {
971
908
  if (!__scope) return
972
909
  const __scopeId = __scope.getAttribute('bf-s')
973
910
 
974
- const [_s0] = $t(__scope, 's0')
975
-
976
- let __anchor_s0 = _s0
911
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
977
912
  createEffect(() => {
978
913
  const __val = String(_p.todo)
979
- __anchor_s0 = __bfText(__anchor_s0, __val)
914
+ __bfw_s0('s0', escapeTextOrNode(__val))
980
915
  })
981
916
 
982
917
  }
@@ -987,12 +922,10 @@ export function initItem(__scope, _p = {}) {
987
922
  if (!__scope) return
988
923
  const __scopeId = __scope.getAttribute('bf-s')
989
924
 
990
- const [_s0] = $t(__scope, 's0')
991
-
992
- let __anchor_s0 = _s0
925
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
993
926
  createEffect(() => {
994
927
  const __val = String(_p.item)
995
- __anchor_s0 = __bfText(__anchor_s0, __val)
928
+ __bfw_s0('s0', escapeTextOrNode(__val))
996
929
  })
997
930
 
998
931
  }
@@ -1017,29 +950,28 @@ export function initExample(__scope, _p = {}) {
1017
950
  const [text, setText] = createSignal('')
1018
951
 
1019
952
  // @client: s0
953
+ { const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'text', path: [0], markerless: true }])
1020
954
  createEffect(() => {
1021
- updateClientMarker(__scope, 's0', items().filter(x => x.tags.some(t => t.active)).map(t => t.name))
1022
- })
955
+ __bfw_s0('s0', items().filter(x => x.tags.some(t => t.active)).map(t => t.name))
956
+ }) }
1023
957
 
1024
958
  }
1025
959
 
1026
- hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-client:s0--><!--/--></div>\` })
960
+ hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf:s0--><!--/--></div>\` })
1027
961
  export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
1028
962
  `;
1029
963
 
1030
964
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L159 — ❌ BF101 on Go/Mojo; works on Hono 1`] = `
1031
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
965
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
1032
966
 
1033
967
  export function initTodoItem(__scope, _p = {}) {
1034
968
  if (!__scope) return
1035
969
  const __scopeId = __scope.getAttribute('bf-s')
1036
970
 
1037
- const [_s0] = $t(__scope, 's0')
1038
-
1039
- let __anchor_s0 = _s0
971
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1040
972
  createEffect(() => {
1041
973
  const __val = String(_p.todo)
1042
- __anchor_s0 = __bfText(__anchor_s0, __val)
974
+ __bfw_s0('s0', escapeTextOrNode(__val))
1043
975
  })
1044
976
 
1045
977
  }
@@ -1050,12 +982,10 @@ export function initItem(__scope, _p = {}) {
1050
982
  if (!__scope) return
1051
983
  const __scopeId = __scope.getAttribute('bf-s')
1052
984
 
1053
- const [_s0] = $t(__scope, 's0')
1054
-
1055
- let __anchor_s0 = _s0
985
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1056
986
  createEffect(() => {
1057
987
  const __val = String(_p.item)
1058
- __anchor_s0 = __bfText(__anchor_s0, __val)
988
+ __bfw_s0('s0', escapeTextOrNode(__val))
1059
989
  })
1060
990
 
1061
991
  }
@@ -1079,12 +1009,10 @@ export function initExample(__scope, _p = {}) {
1079
1009
  const [accepted] = createSignal(false)
1080
1010
  const [text, setText] = createSignal('')
1081
1011
 
1082
- const [_s0] = $t(__scope, 's0')
1083
-
1084
- let __anchor_s0 = _s0
1012
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1085
1013
  createEffect(() => {
1086
1014
  const __val = items().reduce((sum, x) => sum + x.price, 0)
1087
- __anchor_s0 = __bfText(__anchor_s0, __val)
1015
+ __bfw_s0('s0', escapeTextOrNode(__val))
1088
1016
  })
1089
1017
 
1090
1018
  }
@@ -1094,18 +1022,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
1094
1022
  `;
1095
1023
 
1096
1024
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L162 — ✅ Use /* @client */ 1`] = `
1097
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
1025
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
1098
1026
 
1099
1027
  export function initTodoItem(__scope, _p = {}) {
1100
1028
  if (!__scope) return
1101
1029
  const __scopeId = __scope.getAttribute('bf-s')
1102
1030
 
1103
- const [_s0] = $t(__scope, 's0')
1104
-
1105
- let __anchor_s0 = _s0
1031
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1106
1032
  createEffect(() => {
1107
1033
  const __val = String(_p.todo)
1108
- __anchor_s0 = __bfText(__anchor_s0, __val)
1034
+ __bfw_s0('s0', escapeTextOrNode(__val))
1109
1035
  })
1110
1036
 
1111
1037
  }
@@ -1116,12 +1042,10 @@ export function initItem(__scope, _p = {}) {
1116
1042
  if (!__scope) return
1117
1043
  const __scopeId = __scope.getAttribute('bf-s')
1118
1044
 
1119
- const [_s0] = $t(__scope, 's0')
1120
-
1121
- let __anchor_s0 = _s0
1045
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1122
1046
  createEffect(() => {
1123
1047
  const __val = String(_p.item)
1124
- __anchor_s0 = __bfText(__anchor_s0, __val)
1048
+ __bfw_s0('s0', escapeTextOrNode(__val))
1125
1049
  })
1126
1050
 
1127
1051
  }
@@ -1146,29 +1070,28 @@ export function initExample(__scope, _p = {}) {
1146
1070
  const [text, setText] = createSignal('')
1147
1071
 
1148
1072
  // @client: s0
1073
+ { const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'text', path: [0], markerless: true }])
1149
1074
  createEffect(() => {
1150
- updateClientMarker(__scope, 's0', items().reduce((sum, x) => sum + x.price, 0))
1151
- })
1075
+ __bfw_s0('s0', items().reduce((sum, x) => sum + x.price, 0))
1076
+ }) }
1152
1077
 
1153
1078
  }
1154
1079
 
1155
- hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-client:s0--><!--/--></div>\` })
1080
+ hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf:s0--><!--/--></div>\` })
1156
1081
  export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
1157
1082
  `;
1158
1083
 
1159
1084
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L179 — ❌ BF101 on Go/Mojo; works on Hono 1`] = `
1160
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
1085
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
1161
1086
 
1162
1087
  export function initTodoItem(__scope, _p = {}) {
1163
1088
  if (!__scope) return
1164
1089
  const __scopeId = __scope.getAttribute('bf-s')
1165
1090
 
1166
- const [_s0] = $t(__scope, 's0')
1167
-
1168
- let __anchor_s0 = _s0
1091
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1169
1092
  createEffect(() => {
1170
1093
  const __val = String(_p.todo)
1171
- __anchor_s0 = __bfText(__anchor_s0, __val)
1094
+ __bfw_s0('s0', escapeTextOrNode(__val))
1172
1095
  })
1173
1096
 
1174
1097
  }
@@ -1179,12 +1102,10 @@ export function initItem(__scope, _p = {}) {
1179
1102
  if (!__scope) return
1180
1103
  const __scopeId = __scope.getAttribute('bf-s')
1181
1104
 
1182
- const [_s0] = $t(__scope, 's0')
1183
-
1184
- let __anchor_s0 = _s0
1105
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1185
1106
  createEffect(() => {
1186
1107
  const __val = String(_p.item)
1187
- __anchor_s0 = __bfText(__anchor_s0, __val)
1108
+ __bfw_s0('s0', escapeTextOrNode(__val))
1188
1109
  })
1189
1110
 
1190
1111
  }
@@ -1208,12 +1129,10 @@ export function initExample(__scope, _p = {}) {
1208
1129
  const [accepted] = createSignal(false)
1209
1130
  const [text, setText] = createSignal('')
1210
1131
 
1211
- const [_s0] = $t(__scope, 's0')
1212
-
1213
- let __anchor_s0 = _s0
1132
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1214
1133
  createEffect(() => {
1215
1134
  const __val = items().filter(function(x) { return x.done })
1216
- __anchor_s0 = __bfText(__anchor_s0, __val)
1135
+ __bfw_s0('s0', escapeTextOrNode(__val))
1217
1136
  })
1218
1137
 
1219
1138
  }
@@ -1223,18 +1142,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
1223
1142
  `;
1224
1143
 
1225
1144
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L182 — ✅ Use arrow functions for adapter portability 1`] = `
1226
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
1145
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
1227
1146
 
1228
1147
  export function initTodoItem(__scope, _p = {}) {
1229
1148
  if (!__scope) return
1230
1149
  const __scopeId = __scope.getAttribute('bf-s')
1231
1150
 
1232
- const [_s0] = $t(__scope, 's0')
1233
-
1234
- let __anchor_s0 = _s0
1151
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1235
1152
  createEffect(() => {
1236
1153
  const __val = String(_p.todo)
1237
- __anchor_s0 = __bfText(__anchor_s0, __val)
1154
+ __bfw_s0('s0', escapeTextOrNode(__val))
1238
1155
  })
1239
1156
 
1240
1157
  }
@@ -1245,12 +1162,10 @@ export function initItem(__scope, _p = {}) {
1245
1162
  if (!__scope) return
1246
1163
  const __scopeId = __scope.getAttribute('bf-s')
1247
1164
 
1248
- const [_s0] = $t(__scope, 's0')
1249
-
1250
- let __anchor_s0 = _s0
1165
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1251
1166
  createEffect(() => {
1252
1167
  const __val = String(_p.item)
1253
- __anchor_s0 = __bfText(__anchor_s0, __val)
1168
+ __bfw_s0('s0', escapeTextOrNode(__val))
1254
1169
  })
1255
1170
 
1256
1171
  }
@@ -1274,12 +1189,10 @@ export function initExample(__scope, _p = {}) {
1274
1189
  const [accepted] = createSignal(false)
1275
1190
  const [text, setText] = createSignal('')
1276
1191
 
1277
- const [_s0] = $t(__scope, 's0')
1278
-
1279
- let __anchor_s0 = _s0
1192
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1280
1193
  createEffect(() => {
1281
1194
  const __val = items().filter(x => x.done)
1282
- __anchor_s0 = __bfText(__anchor_s0, __val)
1195
+ __bfw_s0('s0', escapeTextOrNode(__val))
1283
1196
  })
1284
1197
 
1285
1198
  }
@@ -1289,18 +1202,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
1289
1202
  `;
1290
1203
 
1291
1204
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L195 — ✅ Value-producing block bodies normalize (let-inline) and lower everywhere 1`] = `
1292
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
1205
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, mapArray, renderChild } from '@barefootjs/client/runtime'
1293
1206
 
1294
1207
  export function initTodoItem(__scope, _p = {}) {
1295
1208
  if (!__scope) return
1296
1209
  const __scopeId = __scope.getAttribute('bf-s')
1297
1210
 
1298
- const [_s0] = $t(__scope, 's0')
1299
-
1300
- let __anchor_s0 = _s0
1211
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1301
1212
  createEffect(() => {
1302
1213
  const __val = String(_p.todo)
1303
- __anchor_s0 = __bfText(__anchor_s0, __val)
1214
+ __bfw_s0('s0', escapeTextOrNode(__val))
1304
1215
  })
1305
1216
 
1306
1217
  }
@@ -1311,12 +1222,10 @@ export function initItem(__scope, _p = {}) {
1311
1222
  if (!__scope) return
1312
1223
  const __scopeId = __scope.getAttribute('bf-s')
1313
1224
 
1314
- const [_s0] = $t(__scope, 's0')
1315
-
1316
- let __anchor_s0 = _s0
1225
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1317
1226
  createEffect(() => {
1318
1227
  const __val = String(_p.item)
1319
- __anchor_s0 = __bfText(__anchor_s0, __val)
1228
+ __bfw_s0('s0', escapeTextOrNode(__val))
1320
1229
  })
1321
1230
 
1322
1231
  }
@@ -1354,18 +1263,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
1354
1263
  `;
1355
1264
 
1356
1265
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L205 — ❌ BF021 on Go/Mojo — a JS-runtime target (Hono, CSR) runs the comparator 1`] = `
1357
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
1266
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, mapArray, renderChild } from '@barefootjs/client/runtime'
1358
1267
 
1359
1268
  export function initTodoItem(__scope, _p = {}) {
1360
1269
  if (!__scope) return
1361
1270
  const __scopeId = __scope.getAttribute('bf-s')
1362
1271
 
1363
- const [_s0] = $t(__scope, 's0')
1364
-
1365
- let __anchor_s0 = _s0
1272
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1366
1273
  createEffect(() => {
1367
1274
  const __val = String(_p.todo)
1368
- __anchor_s0 = __bfText(__anchor_s0, __val)
1275
+ __bfw_s0('s0', escapeTextOrNode(__val))
1369
1276
  })
1370
1277
 
1371
1278
  }
@@ -1376,12 +1283,10 @@ export function initItem(__scope, _p = {}) {
1376
1283
  if (!__scope) return
1377
1284
  const __scopeId = __scope.getAttribute('bf-s')
1378
1285
 
1379
- const [_s0] = $t(__scope, 's0')
1380
-
1381
- let __anchor_s0 = _s0
1286
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1382
1287
  createEffect(() => {
1383
1288
  const __val = String(_p.item)
1384
- __anchor_s0 = __bfText(__anchor_s0, __val)
1289
+ __bfw_s0('s0', escapeTextOrNode(__val))
1385
1290
  })
1386
1291
 
1387
1292
  }
@@ -1419,18 +1324,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
1419
1324
  `;
1420
1325
 
1421
1326
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L210 — ✅ Use /* @client */ 1`] = `
1422
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
1327
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, mapArray, renderChild } from '@barefootjs/client/runtime'
1423
1328
 
1424
1329
  export function initTodoItem(__scope, _p = {}) {
1425
1330
  if (!__scope) return
1426
1331
  const __scopeId = __scope.getAttribute('bf-s')
1427
1332
 
1428
- const [_s0] = $t(__scope, 's0')
1429
-
1430
- let __anchor_s0 = _s0
1333
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1431
1334
  createEffect(() => {
1432
1335
  const __val = String(_p.todo)
1433
- __anchor_s0 = __bfText(__anchor_s0, __val)
1336
+ __bfw_s0('s0', escapeTextOrNode(__val))
1434
1337
  })
1435
1338
 
1436
1339
  }
@@ -1441,12 +1344,10 @@ export function initItem(__scope, _p = {}) {
1441
1344
  if (!__scope) return
1442
1345
  const __scopeId = __scope.getAttribute('bf-s')
1443
1346
 
1444
- const [_s0] = $t(__scope, 's0')
1445
-
1446
- let __anchor_s0 = _s0
1347
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1447
1348
  createEffect(() => {
1448
1349
  const __val = String(_p.item)
1449
- __anchor_s0 = __bfText(__anchor_s0, __val)
1350
+ __bfw_s0('s0', escapeTextOrNode(__val))
1450
1351
  })
1451
1352
 
1452
1353
  }
@@ -1484,7 +1385,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
1484
1385
  `;
1485
1386
 
1486
1387
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L222 — ❌ BF021 on Go/Mojo — \`byPrice\` is imported, not declared in this file 1`] = `
1487
- "import { $, $t, createComponent, createEffect, escapeAttr, escapeText, hydrate, mapArray, tAfter } from '@barefootjs/client/runtime'
1388
+ "import { $, createComponent, createEffect, escapeAttr, escapeText, hydrate, lazySlots, mapArray } from '@barefootjs/client/runtime'
1488
1389
  import { byPrice } from './comparators'
1489
1390
 
1490
1391
 
@@ -1500,9 +1401,8 @@ export function initSortedList(__scope, _p = {}) {
1500
1401
  __tpl_l0.innerHTML = \`<li data-key=""><!--bf:s0--><!--/--></li>\`
1501
1402
  mapArray(() => items.sort(byPrice), _s1, (item) => String(item.id), (item, __idx, __existing) => {
1502
1403
  const __el = __existing ?? __tpl_l0.content.firstElementChild.cloneNode(true)
1503
- const __p = __existing ? null : [__el.firstChild]
1504
- { const __rt_s0 = __p ? tAfter(__p[0]) : $t(__el, 's0')[0]
1505
- if (__rt_s0) createEffect(() => { __rt_s0.textContent = String(item().name) }) }
1404
+ const __bfw_s0 = lazySlots(__el, [{ id: 's0', kind: 'text', path: __existing ? [] : [0] }])
1405
+ createEffect(() => { __bfw_s0('s0', String(item().name)) })
1506
1406
  return __el
1507
1407
  }, 'l0')
1508
1408
 
@@ -1513,18 +1413,16 @@ export function SortedList(_p, __bfKey) { return createComponent('SortedList__b3
1513
1413
  `;
1514
1414
 
1515
1415
  exports[`docs/core/rendering/jsx-compatibility.md doc-examples L228 — ✅ Use /* @client */, or inline / re-declare the comparator locally 1`] = `
1516
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
1416
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, mapArray, renderChild } from '@barefootjs/client/runtime'
1517
1417
 
1518
1418
  export function initTodoItem(__scope, _p = {}) {
1519
1419
  if (!__scope) return
1520
1420
  const __scopeId = __scope.getAttribute('bf-s')
1521
1421
 
1522
- const [_s0] = $t(__scope, 's0')
1523
-
1524
- let __anchor_s0 = _s0
1422
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1525
1423
  createEffect(() => {
1526
1424
  const __val = String(_p.todo)
1527
- __anchor_s0 = __bfText(__anchor_s0, __val)
1425
+ __bfw_s0('s0', escapeTextOrNode(__val))
1528
1426
  })
1529
1427
 
1530
1428
  }
@@ -1535,12 +1433,10 @@ export function initItem(__scope, _p = {}) {
1535
1433
  if (!__scope) return
1536
1434
  const __scopeId = __scope.getAttribute('bf-s')
1537
1435
 
1538
- const [_s0] = $t(__scope, 's0')
1539
-
1540
- let __anchor_s0 = _s0
1436
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1541
1437
  createEffect(() => {
1542
1438
  const __val = String(_p.item)
1543
- __anchor_s0 = __bfText(__anchor_s0, __val)
1439
+ __bfw_s0('s0', escapeTextOrNode(__val))
1544
1440
  })
1545
1441
 
1546
1442
  }
@@ -1577,19 +1473,17 @@ hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-
1577
1473
  export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
1578
1474
  `;
1579
1475
 
1580
- exports[`docs/core/rendering/client-directive.md doc-examples L59 — Nested higher-order methods 1`] = `
1581
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
1476
+ exports[`docs/core/rendering/client-directive.md doc-examples L76 — Nested higher-order methods 1`] = `
1477
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
1582
1478
 
1583
1479
  export function initTodoItem(__scope, _p = {}) {
1584
1480
  if (!__scope) return
1585
1481
  const __scopeId = __scope.getAttribute('bf-s')
1586
1482
 
1587
- const [_s0] = $t(__scope, 's0')
1588
-
1589
- let __anchor_s0 = _s0
1483
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1590
1484
  createEffect(() => {
1591
1485
  const __val = String(_p.todo)
1592
- __anchor_s0 = __bfText(__anchor_s0, __val)
1486
+ __bfw_s0('s0', escapeTextOrNode(__val))
1593
1487
  })
1594
1488
 
1595
1489
  }
@@ -1600,12 +1494,10 @@ export function initItem(__scope, _p = {}) {
1600
1494
  if (!__scope) return
1601
1495
  const __scopeId = __scope.getAttribute('bf-s')
1602
1496
 
1603
- const [_s0] = $t(__scope, 's0')
1604
-
1605
- let __anchor_s0 = _s0
1497
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1606
1498
  createEffect(() => {
1607
1499
  const __val = String(_p.item)
1608
- __anchor_s0 = __bfText(__anchor_s0, __val)
1500
+ __bfw_s0('s0', escapeTextOrNode(__val))
1609
1501
  })
1610
1502
 
1611
1503
  }
@@ -1630,29 +1522,28 @@ export function initExample(__scope, _p = {}) {
1630
1522
  const [text, setText] = createSignal('')
1631
1523
 
1632
1524
  // @client: s0
1525
+ { const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'text', path: [0], markerless: true }])
1633
1526
  createEffect(() => {
1634
- updateClientMarker(__scope, 's0', items().filter(x => x.tags().filter(t => t.active).length > 0))
1635
- })
1527
+ __bfw_s0('s0', items().filter(x => x.tags().filter(t => t.active).length > 0))
1528
+ }) }
1636
1529
 
1637
1530
  }
1638
1531
 
1639
- hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-client:s0--><!--/--></div>\` })
1532
+ hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf:s0--><!--/--></div>\` })
1640
1533
  export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
1641
1534
  `;
1642
1535
 
1643
- exports[`docs/core/rendering/client-directive.md doc-examples L62 — Unsupported array methods 1`] = `
1644
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
1536
+ exports[`docs/core/rendering/client-directive.md doc-examples L79 — Unsupported array methods 1`] = `
1537
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
1645
1538
 
1646
1539
  export function initTodoItem(__scope, _p = {}) {
1647
1540
  if (!__scope) return
1648
1541
  const __scopeId = __scope.getAttribute('bf-s')
1649
1542
 
1650
- const [_s0] = $t(__scope, 's0')
1651
-
1652
- let __anchor_s0 = _s0
1543
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1653
1544
  createEffect(() => {
1654
1545
  const __val = String(_p.todo)
1655
- __anchor_s0 = __bfText(__anchor_s0, __val)
1546
+ __bfw_s0('s0', escapeTextOrNode(__val))
1656
1547
  })
1657
1548
 
1658
1549
  }
@@ -1663,12 +1554,10 @@ export function initItem(__scope, _p = {}) {
1663
1554
  if (!__scope) return
1664
1555
  const __scopeId = __scope.getAttribute('bf-s')
1665
1556
 
1666
- const [_s0] = $t(__scope, 's0')
1667
-
1668
- let __anchor_s0 = _s0
1557
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1669
1558
  createEffect(() => {
1670
1559
  const __val = String(_p.item)
1671
- __anchor_s0 = __bfText(__anchor_s0, __val)
1560
+ __bfw_s0('s0', escapeTextOrNode(__val))
1672
1561
  })
1673
1562
 
1674
1563
  }
@@ -1693,29 +1582,28 @@ export function initExample(__scope, _p = {}) {
1693
1582
  const [text, setText] = createSignal('')
1694
1583
 
1695
1584
  // @client: s0
1585
+ { const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'text', path: [0], markerless: true }])
1696
1586
  createEffect(() => {
1697
- updateClientMarker(__scope, 's0', items().reduce((sum, x) => sum + x.price, 0))
1698
- })
1587
+ __bfw_s0('s0', items().reduce((sum, x) => sum + x.price, 0))
1588
+ }) }
1699
1589
 
1700
1590
  }
1701
1591
 
1702
- hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-client:s0--><!--/--></div>\` })
1592
+ hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf:s0--><!--/--></div>\` })
1703
1593
  export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
1704
1594
  `;
1705
1595
 
1706
- exports[`docs/core/rendering/client-directive.md doc-examples L74 — (no label) 1`] = `
1707
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
1596
+ exports[`docs/core/rendering/client-directive.md doc-examples L91 — (no label) 1`] = `
1597
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
1708
1598
 
1709
1599
  export function initTodoItem(__scope, _p = {}) {
1710
1600
  if (!__scope) return
1711
1601
  const __scopeId = __scope.getAttribute('bf-s')
1712
1602
 
1713
- const [_s0] = $t(__scope, 's0')
1714
-
1715
- let __anchor_s0 = _s0
1603
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1716
1604
  createEffect(() => {
1717
1605
  const __val = String(_p.todo)
1718
- __anchor_s0 = __bfText(__anchor_s0, __val)
1606
+ __bfw_s0('s0', escapeTextOrNode(__val))
1719
1607
  })
1720
1608
 
1721
1609
  }
@@ -1726,12 +1614,10 @@ export function initItem(__scope, _p = {}) {
1726
1614
  if (!__scope) return
1727
1615
  const __scopeId = __scope.getAttribute('bf-s')
1728
1616
 
1729
- const [_s0] = $t(__scope, 's0')
1730
-
1731
- let __anchor_s0 = _s0
1617
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1732
1618
  createEffect(() => {
1733
1619
  const __val = String(_p.item)
1734
- __anchor_s0 = __bfText(__anchor_s0, __val)
1620
+ __bfw_s0('s0', escapeTextOrNode(__val))
1735
1621
  })
1736
1622
 
1737
1623
  }
@@ -1756,29 +1642,28 @@ export function initExample(__scope, _p = {}) {
1756
1642
  const [text, setText] = createSignal('')
1757
1643
 
1758
1644
  // @client: s0
1645
+ { const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'text', path: [0, 0], markerless: true }])
1759
1646
  createEffect(() => {
1760
- updateClientMarker(__scope, 's0', todos().filter(t => !t.done).length)
1761
- })
1647
+ __bfw_s0('s0', todos().filter(t => !t.done).length)
1648
+ }) }
1762
1649
 
1763
1650
  }
1764
1651
 
1765
- hydrate('Example', { init: initExample, template: (_p) => \`<div><strong bf="s1"><!--bf-client:s0--><!--/--></strong></div>\` })
1652
+ hydrate('Example', { init: initExample, template: (_p) => \`<div><strong bf="s1"><!--bf:s0--><!--/--></strong></div>\` })
1766
1653
  export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
1767
1654
  `;
1768
1655
 
1769
1656
  exports[`docs/core/rendering/fragment.md doc-examples L11 — (no label) 1`] = `
1770
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
1657
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
1771
1658
 
1772
1659
  export function initTodoItem(__scope, _p = {}) {
1773
1660
  if (!__scope) return
1774
1661
  const __scopeId = __scope.getAttribute('bf-s')
1775
1662
 
1776
- const [_s0] = $t(__scope, 's0')
1777
-
1778
- let __anchor_s0 = _s0
1663
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1779
1664
  createEffect(() => {
1780
1665
  const __val = String(_p.todo)
1781
- __anchor_s0 = __bfText(__anchor_s0, __val)
1666
+ __bfw_s0('s0', escapeTextOrNode(__val))
1782
1667
  })
1783
1668
 
1784
1669
  }
@@ -1789,12 +1674,10 @@ export function initItem(__scope, _p = {}) {
1789
1674
  if (!__scope) return
1790
1675
  const __scopeId = __scope.getAttribute('bf-s')
1791
1676
 
1792
- const [_s0] = $t(__scope, 's0')
1793
-
1794
- let __anchor_s0 = _s0
1677
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1795
1678
  createEffect(() => {
1796
1679
  const __val = String(_p.item)
1797
- __anchor_s0 = __bfText(__anchor_s0, __val)
1680
+ __bfw_s0('s0', escapeTextOrNode(__val))
1798
1681
  })
1799
1682
 
1800
1683
  }
@@ -1825,18 +1708,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
1825
1708
  `;
1826
1709
 
1827
1710
  exports[`docs/core/rendering/fragment.md doc-examples L23 — (no label) 1`] = `
1828
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
1711
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
1829
1712
 
1830
1713
  export function initTodoItem(__scope, _p = {}) {
1831
1714
  if (!__scope) return
1832
1715
  const __scopeId = __scope.getAttribute('bf-s')
1833
1716
 
1834
- const [_s0] = $t(__scope, 's0')
1835
-
1836
- let __anchor_s0 = _s0
1717
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1837
1718
  createEffect(() => {
1838
1719
  const __val = String(_p.todo)
1839
- __anchor_s0 = __bfText(__anchor_s0, __val)
1720
+ __bfw_s0('s0', escapeTextOrNode(__val))
1840
1721
  })
1841
1722
 
1842
1723
  }
@@ -1847,12 +1728,10 @@ export function initItem(__scope, _p = {}) {
1847
1728
  if (!__scope) return
1848
1729
  const __scopeId = __scope.getAttribute('bf-s')
1849
1730
 
1850
- const [_s0] = $t(__scope, 's0')
1851
-
1852
- let __anchor_s0 = _s0
1731
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
1853
1732
  createEffect(() => {
1854
1733
  const __val = String(_p.item)
1855
- __anchor_s0 = __bfText(__anchor_s0, __val)
1734
+ __bfw_s0('s0', escapeTextOrNode(__val))
1856
1735
  })
1857
1736
 
1858
1737
  }
@@ -2040,7 +1919,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
2040
1919
  `;
2041
1920
 
2042
1921
  exports[`docs/core/reactivity/create-signal.md doc-examples L95 — (no label) 1`] = `
2043
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
1922
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
2044
1923
 
2045
1924
 
2046
1925
  export function initCounter(__scope, _p = {}) {
@@ -2050,12 +1929,11 @@ export function initCounter(__scope, _p = {}) {
2050
1929
  const [count, setCount] = createSignal(0)
2051
1930
 
2052
1931
  const [_s2] = $(__scope, 's2')
2053
- const [_s0] = $t(__scope, 's0')
2054
1932
 
2055
- let __anchor_s0 = _s0
1933
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
2056
1934
  createEffect(() => {
2057
1935
  const __val = count()
2058
- __anchor_s0 = __bfText(__anchor_s0, __val)
1936
+ __bfw_s0('s0', escapeTextOrNode(__val))
2059
1937
  })
2060
1938
 
2061
1939
  if (_s2) _s2.addEventListener('click', () => { setCount(n => n + 1) })
@@ -2229,18 +2107,16 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
2229
2107
  `;
2230
2108
 
2231
2109
  exports[`docs/core/reactivity/create-effect.md doc-examples L115 — (no label) 1`] = `
2232
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
2110
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
2233
2111
 
2234
2112
  export function initTodoItem(__scope, _p = {}) {
2235
2113
  if (!__scope) return
2236
2114
  const __scopeId = __scope.getAttribute('bf-s')
2237
2115
 
2238
- const [_s0] = $t(__scope, 's0')
2239
-
2240
- let __anchor_s0 = _s0
2116
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
2241
2117
  createEffect(() => {
2242
2118
  const __val = String(_p.todo)
2243
- __anchor_s0 = __bfText(__anchor_s0, __val)
2119
+ __bfw_s0('s0', escapeTextOrNode(__val))
2244
2120
  })
2245
2121
 
2246
2122
  }
@@ -2251,12 +2127,10 @@ export function initItem(__scope, _p = {}) {
2251
2127
  if (!__scope) return
2252
2128
  const __scopeId = __scope.getAttribute('bf-s')
2253
2129
 
2254
- const [_s0] = $t(__scope, 's0')
2255
-
2256
- let __anchor_s0 = _s0
2130
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
2257
2131
  createEffect(() => {
2258
2132
  const __val = String(_p.item)
2259
- __anchor_s0 = __bfText(__anchor_s0, __val)
2133
+ __bfw_s0('s0', escapeTextOrNode(__val))
2260
2134
  })
2261
2135
 
2262
2136
  }
@@ -2363,18 +2237,16 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
2363
2237
  `;
2364
2238
 
2365
2239
  exports[`docs/core/reactivity/create-memo.md doc-examples L60 — No memo needed 1`] = `
2366
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
2240
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
2367
2241
 
2368
2242
  export function initTodoItem(__scope, _p = {}) {
2369
2243
  if (!__scope) return
2370
2244
  const __scopeId = __scope.getAttribute('bf-s')
2371
2245
 
2372
- const [_s0] = $t(__scope, 's0')
2373
-
2374
- let __anchor_s0 = _s0
2246
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
2375
2247
  createEffect(() => {
2376
2248
  const __val = String(_p.todo)
2377
- __anchor_s0 = __bfText(__anchor_s0, __val)
2249
+ __bfw_s0('s0', escapeTextOrNode(__val))
2378
2250
  })
2379
2251
 
2380
2252
  }
@@ -2385,12 +2257,10 @@ export function initItem(__scope, _p = {}) {
2385
2257
  if (!__scope) return
2386
2258
  const __scopeId = __scope.getAttribute('bf-s')
2387
2259
 
2388
- const [_s0] = $t(__scope, 's0')
2389
-
2390
- let __anchor_s0 = _s0
2260
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
2391
2261
  createEffect(() => {
2392
2262
  const __val = String(_p.item)
2393
- __anchor_s0 = __bfText(__anchor_s0, __val)
2263
+ __bfw_s0('s0', escapeTextOrNode(__val))
2394
2264
  })
2395
2265
 
2396
2266
  }
@@ -2414,12 +2284,10 @@ export function initExample(__scope, _p = {}) {
2414
2284
  const [accepted] = createSignal(false)
2415
2285
  const [text, setText] = createSignal('')
2416
2286
 
2417
- const [_s0] = $t(__scope, 's0')
2418
-
2419
- let __anchor_s0 = _s0
2287
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
2420
2288
  createEffect(() => {
2421
2289
  const __val = count() * 2
2422
- __anchor_s0 = __bfText(__anchor_s0, __val)
2290
+ __bfw_s0('s0', escapeTextOrNode(__val))
2423
2291
  })
2424
2292
 
2425
2293
  }
@@ -2670,19 +2538,17 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
2670
2538
  `;
2671
2539
 
2672
2540
  exports[`docs/core/reactivity/props-reactivity.md doc-examples L82 — Parent 1`] = `
2673
- "import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2541
+ "import { $c, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, renderChild } from '@barefootjs/client/runtime'
2674
2542
  import '/* @bf-child:Child */'
2675
2543
 
2676
2544
  export function initTodoItem(__scope, _p = {}) {
2677
2545
  if (!__scope) return
2678
2546
  const __scopeId = __scope.getAttribute('bf-s')
2679
2547
 
2680
- const [_s0] = $t(__scope, 's0')
2681
-
2682
- let __anchor_s0 = _s0
2548
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
2683
2549
  createEffect(() => {
2684
2550
  const __val = String(_p.todo)
2685
- __anchor_s0 = __bfText(__anchor_s0, __val)
2551
+ __bfw_s0('s0', escapeTextOrNode(__val))
2686
2552
  })
2687
2553
 
2688
2554
  }
@@ -2693,12 +2559,10 @@ export function initItem(__scope, _p = {}) {
2693
2559
  if (!__scope) return
2694
2560
  const __scopeId = __scope.getAttribute('bf-s')
2695
2561
 
2696
- const [_s0] = $t(__scope, 's0')
2697
-
2698
- let __anchor_s0 = _s0
2562
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
2699
2563
  createEffect(() => {
2700
2564
  const __val = String(_p.item)
2701
- __anchor_s0 = __bfText(__anchor_s0, __val)
2565
+ __bfw_s0('s0', escapeTextOrNode(__val))
2702
2566
  })
2703
2567
 
2704
2568
  }
@@ -2751,18 +2615,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
2751
2615
  `;
2752
2616
 
2753
2617
  exports[`docs/core/reactivity/props-reactivity.md doc-examples L85 — Compiled props object 1`] = `
2754
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
2618
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
2755
2619
 
2756
2620
  export function initTodoItem(__scope, _p = {}) {
2757
2621
  if (!__scope) return
2758
2622
  const __scopeId = __scope.getAttribute('bf-s')
2759
2623
 
2760
- const [_s0] = $t(__scope, 's0')
2761
-
2762
- let __anchor_s0 = _s0
2624
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
2763
2625
  createEffect(() => {
2764
2626
  const __val = String(_p.todo)
2765
- __anchor_s0 = __bfText(__anchor_s0, __val)
2627
+ __bfw_s0('s0', escapeTextOrNode(__val))
2766
2628
  })
2767
2629
 
2768
2630
  }
@@ -2773,12 +2635,10 @@ export function initItem(__scope, _p = {}) {
2773
2635
  if (!__scope) return
2774
2636
  const __scopeId = __scope.getAttribute('bf-s')
2775
2637
 
2776
- const [_s0] = $t(__scope, 's0')
2777
-
2778
- let __anchor_s0 = _s0
2638
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
2779
2639
  createEffect(() => {
2780
2640
  const __val = String(_p.item)
2781
- __anchor_s0 = __bfText(__anchor_s0, __val)
2641
+ __bfw_s0('s0', escapeTextOrNode(__val))
2782
2642
  })
2783
2643
 
2784
2644
  }
@@ -2809,7 +2669,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
2809
2669
  `;
2810
2670
 
2811
2671
  exports[`docs/core/components/component-authoring.mdx doc-examples L16 — (no label) 1`] = `
2812
- "import { $t, __bfText, createComponent, createEffect, escapeText, hydrate } from '@barefootjs/client/runtime'
2672
+ "import { createComponent, createEffect, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
2813
2673
 
2814
2674
 
2815
2675
  export function initGreeting(__scope, _p = {}) {
@@ -2818,12 +2678,10 @@ export function initGreeting(__scope, _p = {}) {
2818
2678
 
2819
2679
  const name = _p.name
2820
2680
 
2821
- const [_s0] = $t(__scope, 's0')
2822
-
2823
- let __anchor_s0 = _s0
2681
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
2824
2682
  createEffect(() => {
2825
2683
  const __val = name
2826
- __anchor_s0 = __bfText(__anchor_s0, __val)
2684
+ __bfw_s0('s0', escapeTextOrNode(__val))
2827
2685
  })
2828
2686
 
2829
2687
  }
@@ -2833,7 +2691,7 @@ export function Greeting(_p, __bfKey) { return createComponent('Greeting', _p, _
2833
2691
  `;
2834
2692
 
2835
2693
  exports[`docs/core/components/component-authoring.mdx doc-examples L29 — (no label) 1`] = `
2836
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
2694
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
2837
2695
 
2838
2696
 
2839
2697
  export function initCounter(__scope, _p = {}) {
@@ -2843,12 +2701,11 @@ export function initCounter(__scope, _p = {}) {
2843
2701
  const [count, setCount] = createSignal(0)
2844
2702
 
2845
2703
  const [_s1] = $(__scope, 's1')
2846
- const [_s0] = $t(__scope, 's0')
2847
2704
 
2848
- let __anchor_s0 = _s0
2705
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
2849
2706
  createEffect(() => {
2850
2707
  const __val = count()
2851
- __anchor_s0 = __bfText(__anchor_s0, __val)
2708
+ __bfw_s0('s0', escapeTextOrNode(__val))
2852
2709
  })
2853
2710
 
2854
2711
  if (_s1) _s1.addEventListener('click', () => { setCount(n => n + 1) })
@@ -2940,19 +2797,17 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
2940
2797
  `;
2941
2798
 
2942
2799
  exports[`docs/core/components/children-slots.md doc-examples L14 — (no label) 1`] = `
2943
- "import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2800
+ "import { $c, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, renderChild } from '@barefootjs/client/runtime'
2944
2801
  import '/* @bf-child:Card */'
2945
2802
 
2946
2803
  export function initTodoItem(__scope, _p = {}) {
2947
2804
  if (!__scope) return
2948
2805
  const __scopeId = __scope.getAttribute('bf-s')
2949
2806
 
2950
- const [_s0] = $t(__scope, 's0')
2951
-
2952
- let __anchor_s0 = _s0
2807
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
2953
2808
  createEffect(() => {
2954
2809
  const __val = String(_p.todo)
2955
- __anchor_s0 = __bfText(__anchor_s0, __val)
2810
+ __bfw_s0('s0', escapeTextOrNode(__val))
2956
2811
  })
2957
2812
 
2958
2813
  }
@@ -2963,12 +2818,10 @@ export function initItem(__scope, _p = {}) {
2963
2818
  if (!__scope) return
2964
2819
  const __scopeId = __scope.getAttribute('bf-s')
2965
2820
 
2966
- const [_s0] = $t(__scope, 's0')
2967
-
2968
- let __anchor_s0 = _s0
2821
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
2969
2822
  createEffect(() => {
2970
2823
  const __val = String(_p.item)
2971
- __anchor_s0 = __bfText(__anchor_s0, __val)
2824
+ __bfw_s0('s0', escapeTextOrNode(__val))
2972
2825
  })
2973
2826
 
2974
2827
  }
@@ -3022,19 +2875,17 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
3022
2875
  `;
3023
2876
 
3024
2877
  exports[`docs/core/components/children-slots.md doc-examples L68 — Input 1`] = `
3025
- "import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2878
+ "import { $c, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, renderChild } from '@barefootjs/client/runtime'
3026
2879
  import '/* @bf-child:Slot */'
3027
2880
 
3028
2881
  export function initTodoItem(__scope, _p = {}) {
3029
2882
  if (!__scope) return
3030
2883
  const __scopeId = __scope.getAttribute('bf-s')
3031
2884
 
3032
- const [_s0] = $t(__scope, 's0')
3033
-
3034
- let __anchor_s0 = _s0
2885
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3035
2886
  createEffect(() => {
3036
2887
  const __val = String(_p.todo)
3037
- __anchor_s0 = __bfText(__anchor_s0, __val)
2888
+ __bfw_s0('s0', escapeTextOrNode(__val))
3038
2889
  })
3039
2890
 
3040
2891
  }
@@ -3045,12 +2896,10 @@ export function initItem(__scope, _p = {}) {
3045
2896
  if (!__scope) return
3046
2897
  const __scopeId = __scope.getAttribute('bf-s')
3047
2898
 
3048
- const [_s0] = $t(__scope, 's0')
3049
-
3050
- let __anchor_s0 = _s0
2899
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3051
2900
  createEffect(() => {
3052
2901
  const __val = String(_p.item)
3053
- __anchor_s0 = __bfText(__anchor_s0, __val)
2902
+ __bfw_s0('s0', escapeTextOrNode(__val))
3054
2903
  })
3055
2904
 
3056
2905
  }
@@ -3086,18 +2935,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
3086
2935
  `;
3087
2936
 
3088
2937
  exports[`docs/core/components/children-slots.md doc-examples L73 — Output 1`] = `
3089
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
2938
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
3090
2939
 
3091
2940
  export function initTodoItem(__scope, _p = {}) {
3092
2941
  if (!__scope) return
3093
2942
  const __scopeId = __scope.getAttribute('bf-s')
3094
2943
 
3095
- const [_s0] = $t(__scope, 's0')
3096
-
3097
- let __anchor_s0 = _s0
2944
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3098
2945
  createEffect(() => {
3099
2946
  const __val = String(_p.todo)
3100
- __anchor_s0 = __bfText(__anchor_s0, __val)
2947
+ __bfw_s0('s0', escapeTextOrNode(__val))
3101
2948
  })
3102
2949
 
3103
2950
  }
@@ -3108,12 +2955,10 @@ export function initItem(__scope, _p = {}) {
3108
2955
  if (!__scope) return
3109
2956
  const __scopeId = __scope.getAttribute('bf-s')
3110
2957
 
3111
- const [_s0] = $t(__scope, 's0')
3112
-
3113
- let __anchor_s0 = _s0
2958
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3114
2959
  createEffect(() => {
3115
2960
  const __val = String(_p.item)
3116
- __anchor_s0 = __bfText(__anchor_s0, __val)
2961
+ __bfw_s0('s0', escapeTextOrNode(__val))
3117
2962
  })
3118
2963
 
3119
2964
  }
@@ -3147,19 +2992,17 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
3147
2992
  `;
3148
2993
 
3149
2994
  exports[`docs/core/components/children-slots.md doc-examples L86 — (no label) 1`] = `
3150
- "import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
2995
+ "import { $c, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, renderChild } from '@barefootjs/client/runtime'
3151
2996
  import '/* @bf-child:Button */'
3152
2997
 
3153
2998
  export function initTodoItem(__scope, _p = {}) {
3154
2999
  if (!__scope) return
3155
3000
  const __scopeId = __scope.getAttribute('bf-s')
3156
3001
 
3157
- const [_s0] = $t(__scope, 's0')
3158
-
3159
- let __anchor_s0 = _s0
3002
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3160
3003
  createEffect(() => {
3161
3004
  const __val = String(_p.todo)
3162
- __anchor_s0 = __bfText(__anchor_s0, __val)
3005
+ __bfw_s0('s0', escapeTextOrNode(__val))
3163
3006
  })
3164
3007
 
3165
3008
  }
@@ -3170,12 +3013,10 @@ export function initItem(__scope, _p = {}) {
3170
3013
  if (!__scope) return
3171
3014
  const __scopeId = __scope.getAttribute('bf-s')
3172
3015
 
3173
- const [_s0] = $t(__scope, 's0')
3174
-
3175
- let __anchor_s0 = _s0
3016
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3176
3017
  createEffect(() => {
3177
3018
  const __val = String(_p.item)
3178
- __anchor_s0 = __bfText(__anchor_s0, __val)
3019
+ __bfw_s0('s0', escapeTextOrNode(__val))
3179
3020
  })
3180
3021
 
3181
3022
  }
@@ -3211,19 +3052,17 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
3211
3052
  `;
3212
3053
 
3213
3054
  exports[`docs/core/components/children-slots.md doc-examples L93 — (no label) 1`] = `
3214
- "import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
3055
+ "import { $c, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, renderChild } from '@barefootjs/client/runtime'
3215
3056
  import '/* @bf-child:Button */'
3216
3057
 
3217
3058
  export function initTodoItem(__scope, _p = {}) {
3218
3059
  if (!__scope) return
3219
3060
  const __scopeId = __scope.getAttribute('bf-s')
3220
3061
 
3221
- const [_s0] = $t(__scope, 's0')
3222
-
3223
- let __anchor_s0 = _s0
3062
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3224
3063
  createEffect(() => {
3225
3064
  const __val = String(_p.todo)
3226
- __anchor_s0 = __bfText(__anchor_s0, __val)
3065
+ __bfw_s0('s0', escapeTextOrNode(__val))
3227
3066
  })
3228
3067
 
3229
3068
  }
@@ -3234,12 +3073,10 @@ export function initItem(__scope, _p = {}) {
3234
3073
  if (!__scope) return
3235
3074
  const __scopeId = __scope.getAttribute('bf-s')
3236
3075
 
3237
- const [_s0] = $t(__scope, 's0')
3238
-
3239
- let __anchor_s0 = _s0
3076
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3240
3077
  createEffect(() => {
3241
3078
  const __val = String(_p.item)
3242
- __anchor_s0 = __bfText(__anchor_s0, __val)
3079
+ __bfw_s0('s0', escapeTextOrNode(__val))
3243
3080
  })
3244
3081
 
3245
3082
  }
@@ -3275,19 +3112,17 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
3275
3112
  `;
3276
3113
 
3277
3114
  exports[`docs/core/components/children-slots.md doc-examples L109 — Dialog trigger as a custom element 1`] = `
3278
- "import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeAttr, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
3115
+ "import { $c, createComponent, createEffect, createSignal, escapeAttr, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, renderChild } from '@barefootjs/client/runtime'
3279
3116
  import '/* @bf-child:DialogTrigger */'
3280
3117
 
3281
3118
  export function initTodoItem(__scope, _p = {}) {
3282
3119
  if (!__scope) return
3283
3120
  const __scopeId = __scope.getAttribute('bf-s')
3284
3121
 
3285
- const [_s0] = $t(__scope, 's0')
3286
-
3287
- let __anchor_s0 = _s0
3122
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3288
3123
  createEffect(() => {
3289
3124
  const __val = String(_p.todo)
3290
- __anchor_s0 = __bfText(__anchor_s0, __val)
3125
+ __bfw_s0('s0', escapeTextOrNode(__val))
3291
3126
  })
3292
3127
 
3293
3128
  }
@@ -3298,12 +3133,10 @@ export function initItem(__scope, _p = {}) {
3298
3133
  if (!__scope) return
3299
3134
  const __scopeId = __scope.getAttribute('bf-s')
3300
3135
 
3301
- const [_s0] = $t(__scope, 's0')
3302
-
3303
- let __anchor_s0 = _s0
3136
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3304
3137
  createEffect(() => {
3305
3138
  const __val = String(_p.item)
3306
- __anchor_s0 = __bfText(__anchor_s0, __val)
3139
+ __bfw_s0('s0', escapeTextOrNode(__val))
3307
3140
  })
3308
3141
 
3309
3142
  }
@@ -3339,7 +3172,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
3339
3172
  `;
3340
3173
 
3341
3174
  exports[`docs/core/components/children-slots.md doc-examples L118 — (no label) 1`] = `
3342
- "import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
3175
+ "import { $c, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, renderChild } from '@barefootjs/client/runtime'
3343
3176
  import '/* @bf-child:Dialog */'
3344
3177
  import '/* @bf-child:DialogTrigger */'
3345
3178
  import '/* @bf-child:DialogOverlay */'
@@ -3355,12 +3188,10 @@ export function initTodoItem(__scope, _p = {}) {
3355
3188
  if (!__scope) return
3356
3189
  const __scopeId = __scope.getAttribute('bf-s')
3357
3190
 
3358
- const [_s0] = $t(__scope, 's0')
3359
-
3360
- let __anchor_s0 = _s0
3191
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3361
3192
  createEffect(() => {
3362
3193
  const __val = String(_p.todo)
3363
- __anchor_s0 = __bfText(__anchor_s0, __val)
3194
+ __bfw_s0('s0', escapeTextOrNode(__val))
3364
3195
  })
3365
3196
 
3366
3197
  }
@@ -3371,12 +3202,10 @@ export function initItem(__scope, _p = {}) {
3371
3202
  if (!__scope) return
3372
3203
  const __scopeId = __scope.getAttribute('bf-s')
3373
3204
 
3374
- const [_s0] = $t(__scope, 's0')
3375
-
3376
- let __anchor_s0 = _s0
3205
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3377
3206
  createEffect(() => {
3378
3207
  const __val = String(_p.item)
3379
- __anchor_s0 = __bfText(__anchor_s0, __val)
3208
+ __bfw_s0('s0', escapeTextOrNode(__val))
3380
3209
  })
3381
3210
 
3382
3211
  }
@@ -3429,18 +3258,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
3429
3258
  `;
3430
3259
 
3431
3260
  exports[`docs/core/components/children-slots.md doc-examples L140 — (no label) 1`] = `
3432
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
3261
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, mapArray, renderChild } from '@barefootjs/client/runtime'
3433
3262
 
3434
3263
  export function initTodoItem(__scope, _p = {}) {
3435
3264
  if (!__scope) return
3436
3265
  const __scopeId = __scope.getAttribute('bf-s')
3437
3266
 
3438
- const [_s0] = $t(__scope, 's0')
3439
-
3440
- let __anchor_s0 = _s0
3267
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3441
3268
  createEffect(() => {
3442
3269
  const __val = String(_p.todo)
3443
- __anchor_s0 = __bfText(__anchor_s0, __val)
3270
+ __bfw_s0('s0', escapeTextOrNode(__val))
3444
3271
  })
3445
3272
 
3446
3273
  }
@@ -3451,12 +3278,10 @@ export function initItem(__scope, _p = {}) {
3451
3278
  if (!__scope) return
3452
3279
  const __scopeId = __scope.getAttribute('bf-s')
3453
3280
 
3454
- const [_s0] = $t(__scope, 's0')
3455
-
3456
- let __anchor_s0 = _s0
3281
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3457
3282
  createEffect(() => {
3458
3283
  const __val = String(_p.item)
3459
- __anchor_s0 = __bfText(__anchor_s0, __val)
3284
+ __bfw_s0('s0', escapeTextOrNode(__val))
3460
3285
  })
3461
3286
 
3462
3287
  }
@@ -3503,18 +3328,16 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
3503
3328
  `;
3504
3329
 
3505
3330
  exports[`docs/core/components/context-api.md doc-examples L40 — (no label) 1`] = `
3506
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, provideContext } from '@barefootjs/client/runtime'
3331
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots, provideContext } from '@barefootjs/client/runtime'
3507
3332
 
3508
3333
  export function initTodoItem(__scope, _p = {}) {
3509
3334
  if (!__scope) return
3510
3335
  const __scopeId = __scope.getAttribute('bf-s')
3511
3336
 
3512
- const [_s0] = $t(__scope, 's0')
3513
-
3514
- let __anchor_s0 = _s0
3337
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3515
3338
  createEffect(() => {
3516
3339
  const __val = String(_p.todo)
3517
- __anchor_s0 = __bfText(__anchor_s0, __val)
3340
+ __bfw_s0('s0', escapeTextOrNode(__val))
3518
3341
  })
3519
3342
 
3520
3343
  }
@@ -3525,12 +3348,10 @@ export function initItem(__scope, _p = {}) {
3525
3348
  if (!__scope) return
3526
3349
  const __scopeId = __scope.getAttribute('bf-s')
3527
3350
 
3528
- const [_s0] = $t(__scope, 's0')
3529
-
3530
- let __anchor_s0 = _s0
3351
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3531
3352
  createEffect(() => {
3532
3353
  const __val = String(_p.item)
3533
- __anchor_s0 = __bfText(__anchor_s0, __val)
3354
+ __bfw_s0('s0', escapeTextOrNode(__val))
3534
3355
  })
3535
3356
 
3536
3357
  }
@@ -3616,7 +3437,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
3616
3437
  `;
3617
3438
 
3618
3439
  exports[`docs/core/components/context-api.md doc-examples L94 — Usage 1`] = `
3619
- "import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
3440
+ "import { $c, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, renderChild } from '@barefootjs/client/runtime'
3620
3441
  import '/* @bf-child:ThemeProvider */'
3621
3442
  import '/* @bf-child:ThemedButton */'
3622
3443
 
@@ -3624,12 +3445,10 @@ export function initTodoItem(__scope, _p = {}) {
3624
3445
  if (!__scope) return
3625
3446
  const __scopeId = __scope.getAttribute('bf-s')
3626
3447
 
3627
- const [_s0] = $t(__scope, 's0')
3628
-
3629
- let __anchor_s0 = _s0
3448
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3630
3449
  createEffect(() => {
3631
3450
  const __val = String(_p.todo)
3632
- __anchor_s0 = __bfText(__anchor_s0, __val)
3451
+ __bfw_s0('s0', escapeTextOrNode(__val))
3633
3452
  })
3634
3453
 
3635
3454
  }
@@ -3640,12 +3459,10 @@ export function initItem(__scope, _p = {}) {
3640
3459
  if (!__scope) return
3641
3460
  const __scopeId = __scope.getAttribute('bf-s')
3642
3461
 
3643
- const [_s0] = $t(__scope, 's0')
3644
-
3645
- let __anchor_s0 = _s0
3462
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3646
3463
  createEffect(() => {
3647
3464
  const __val = String(_p.item)
3648
- __anchor_s0 = __bfText(__anchor_s0, __val)
3465
+ __bfw_s0('s0', escapeTextOrNode(__val))
3649
3466
  })
3650
3467
 
3651
3468
  }
@@ -3769,7 +3586,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
3769
3586
  `;
3770
3587
 
3771
3588
  exports[`docs/core/components/context-api.md doc-examples L170 — (no label) 1`] = `
3772
- "import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
3589
+ "import { $c, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, renderChild } from '@barefootjs/client/runtime'
3773
3590
  import '/* @bf-child:Accordion */'
3774
3591
  import '/* @bf-child:AccordionTrigger */'
3775
3592
  import '/* @bf-child:AccordionContent */'
@@ -3778,12 +3595,10 @@ export function initTodoItem(__scope, _p = {}) {
3778
3595
  if (!__scope) return
3779
3596
  const __scopeId = __scope.getAttribute('bf-s')
3780
3597
 
3781
- const [_s0] = $t(__scope, 's0')
3782
-
3783
- let __anchor_s0 = _s0
3598
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3784
3599
  createEffect(() => {
3785
3600
  const __val = String(_p.todo)
3786
- __anchor_s0 = __bfText(__anchor_s0, __val)
3601
+ __bfw_s0('s0', escapeTextOrNode(__val))
3787
3602
  })
3788
3603
 
3789
3604
  }
@@ -3794,12 +3609,10 @@ export function initItem(__scope, _p = {}) {
3794
3609
  if (!__scope) return
3795
3610
  const __scopeId = __scope.getAttribute('bf-s')
3796
3611
 
3797
- const [_s0] = $t(__scope, 's0')
3798
-
3799
- let __anchor_s0 = _s0
3612
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3800
3613
  createEffect(() => {
3801
3614
  const __val = String(_p.item)
3802
- __anchor_s0 = __bfText(__anchor_s0, __val)
3615
+ __bfw_s0('s0', escapeTextOrNode(__val))
3803
3616
  })
3804
3617
 
3805
3618
  }
@@ -3839,18 +3652,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
3839
3652
  `;
3840
3653
 
3841
3654
  exports[`docs/core/components/context-api.md doc-examples L190 — Provider passes signal getter 1`] = `
3842
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, provideContext } from '@barefootjs/client/runtime'
3655
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots, provideContext } from '@barefootjs/client/runtime'
3843
3656
 
3844
3657
  export function initTodoItem(__scope, _p = {}) {
3845
3658
  if (!__scope) return
3846
3659
  const __scopeId = __scope.getAttribute('bf-s')
3847
3660
 
3848
- const [_s0] = $t(__scope, 's0')
3849
-
3850
- let __anchor_s0 = _s0
3661
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3851
3662
  createEffect(() => {
3852
3663
  const __val = String(_p.todo)
3853
- __anchor_s0 = __bfText(__anchor_s0, __val)
3664
+ __bfw_s0('s0', escapeTextOrNode(__val))
3854
3665
  })
3855
3666
 
3856
3667
  }
@@ -3861,12 +3672,10 @@ export function initItem(__scope, _p = {}) {
3861
3672
  if (!__scope) return
3862
3673
  const __scopeId = __scope.getAttribute('bf-s')
3863
3674
 
3864
- const [_s0] = $t(__scope, 's0')
3865
-
3866
- let __anchor_s0 = _s0
3675
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
3867
3676
  createEffect(() => {
3868
3677
  const __val = String(_p.item)
3869
- __anchor_s0 = __bfText(__anchor_s0, __val)
3678
+ __bfw_s0('s0', escapeTextOrNode(__val))
3870
3679
  })
3871
3680
 
3872
3681
  }
@@ -3956,7 +3765,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
3956
3765
  `;
3957
3766
 
3958
3767
  exports[`docs/core/components/portals.md doc-examples L53 — (no label) 1`] = `
3959
- "import { $, $t, __bfText, createComponent, createEffect, createPortal, createSignal, escapeText, hydrate, isSSRPortal } from '@barefootjs/client/runtime'
3768
+ "import { $, createComponent, createEffect, createPortal, createSignal, escapeText, escapeTextOrNode, hydrate, isSSRPortal, lazySlots } from '@barefootjs/client/runtime'
3960
3769
 
3961
3770
 
3962
3771
  export function initTooltip(__scope, _p = {}) {
@@ -3977,12 +3786,11 @@ export function initTooltip(__scope, _p = {}) {
3977
3786
  }
3978
3787
 
3979
3788
  const [_s0, _s2] = $(__scope, 's0', 's2')
3980
- const [_s1] = $t(__scope, 's1')
3981
3789
 
3982
- let __anchor_s1 = _s1
3790
+ const __bfw_s1 = lazySlots(__scope, [{ id: 's1', kind: 'markup', path: [] }])
3983
3791
  createEffect(() => {
3984
3792
  const __val = _p.text
3985
- __anchor_s1 = __bfText(__anchor_s1, __val)
3793
+ __bfw_s1('s1', escapeTextOrNode(__val))
3986
3794
  })
3987
3795
 
3988
3796
  if (_s0) _s0.addEventListener('mouseenter', () => { setVisible(true) })
@@ -4061,25 +3869,23 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
4061
3869
  `;
4062
3870
 
4063
3871
  exports[`docs/core/components/props-type-safety.md doc-examples L16 — (no label) 1`] = `
4064
- "import { $t, __bfText, createComponent, createEffect, escapeText, hydrate } from '@barefootjs/client/runtime'
3872
+ "import { createComponent, createEffect, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
4065
3873
 
4066
3874
 
4067
3875
  export function initGreeting(__scope, _p = {}) {
4068
3876
  if (!__scope) return
4069
3877
  const __scopeId = __scope.getAttribute('bf-s')
4070
3878
 
4071
- const [_s0, _s1] = $t(__scope, 's0', 's1')
4072
-
4073
- let __anchor_s0 = _s0
3879
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4074
3880
  createEffect(() => {
4075
3881
  const __val = _p.greeting ?? 'Hello'
4076
- __anchor_s0 = __bfText(__anchor_s0, __val)
3882
+ __bfw_s0('s0', escapeTextOrNode(__val))
4077
3883
  })
4078
3884
 
4079
- let __anchor_s1 = _s1
3885
+ const __bfw_s1 = lazySlots(__scope, [{ id: 's1', kind: 'markup', path: [] }])
4080
3886
  createEffect(() => {
4081
3887
  const __val = _p.name
4082
- __anchor_s1 = __bfText(__anchor_s1, __val)
3888
+ __bfw_s1('s1', escapeTextOrNode(__val))
4083
3889
  })
4084
3890
 
4085
3891
  }
@@ -4125,19 +3931,17 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
4125
3931
  `;
4126
3932
 
4127
3933
  exports[`docs/core/components/props-type-safety.md doc-examples L89 — (no label) 1`] = `
4128
- "import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
3934
+ "import { $c, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, renderChild } from '@barefootjs/client/runtime'
4129
3935
  import '/* @bf-child:Card */'
4130
3936
 
4131
3937
  export function initTodoItem(__scope, _p = {}) {
4132
3938
  if (!__scope) return
4133
3939
  const __scopeId = __scope.getAttribute('bf-s')
4134
3940
 
4135
- const [_s0] = $t(__scope, 's0')
4136
-
4137
- let __anchor_s0 = _s0
3941
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4138
3942
  createEffect(() => {
4139
3943
  const __val = String(_p.todo)
4140
- __anchor_s0 = __bfText(__anchor_s0, __val)
3944
+ __bfw_s0('s0', escapeTextOrNode(__val))
4141
3945
  })
4142
3946
 
4143
3947
  }
@@ -4148,12 +3952,10 @@ export function initItem(__scope, _p = {}) {
4148
3952
  if (!__scope) return
4149
3953
  const __scopeId = __scope.getAttribute('bf-s')
4150
3954
 
4151
- const [_s0] = $t(__scope, 's0')
4152
-
4153
- let __anchor_s0 = _s0
3955
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4154
3956
  createEffect(() => {
4155
3957
  const __val = String(_p.item)
4156
- __anchor_s0 = __bfText(__anchor_s0, __val)
3958
+ __bfw_s0('s0', escapeTextOrNode(__val))
4157
3959
  })
4158
3960
 
4159
3961
  }
@@ -4207,7 +4009,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
4207
4009
  `;
4208
4010
 
4209
4011
  exports[`docs/core/core-concepts/how-it-works.mdx doc-examples L33 — (no label) 1`] = `
4210
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
4012
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
4211
4013
 
4212
4014
 
4213
4015
  export function initCounter(__scope, _p = {}) {
@@ -4217,12 +4019,11 @@ export function initCounter(__scope, _p = {}) {
4217
4019
  const [count, setCount] = createSignal(0)
4218
4020
 
4219
4021
  const [_s1] = $(__scope, 's1')
4220
- const [_s0] = $t(__scope, 's0')
4221
4022
 
4222
- let __anchor_s0 = _s0
4023
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4223
4024
  createEffect(() => {
4224
4025
  const __val = count()
4225
- __anchor_s0 = __bfText(__anchor_s0, __val)
4026
+ __bfw_s0('s0', escapeTextOrNode(__val))
4226
4027
  })
4227
4028
 
4228
4029
  if (_s1) _s1.addEventListener('click', () => { setCount(n => n + 1) })
@@ -4255,7 +4056,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
4255
4056
  `;
4256
4057
 
4257
4058
  exports[`docs/core/core-concepts/mpa-style.md doc-examples L23 — (no label) 1`] = `
4258
- "import { $, $c, $t, __bfText, createComponent, createEffect, escapeAttr, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
4059
+ "import { $, $c, createComponent, createEffect, escapeAttr, escapeText, escapeTextOrNode, hydrate, initChild, lazySlots, renderChild } from '@barefootjs/client/runtime'
4259
4060
  import '/* @bf-child:ReviewStars */'
4260
4061
  import '/* @bf-child:AddToCart */'
4261
4062
 
@@ -4267,19 +4068,18 @@ export function initProductPage(__scope, _p = {}) {
4267
4068
  const product = _p.product ?? {}
4268
4069
 
4269
4070
  const [_s4] = $(__scope, 's4')
4270
- const [_s0, _s2] = $t(__scope, 's0', 's2')
4271
4071
  const [_s5, _s6] = $c(__scope, 's5', 's6')
4272
4072
 
4273
- let __anchor_s0 = _s0
4073
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4274
4074
  createEffect(() => {
4275
4075
  const __val = product.name
4276
- __anchor_s0 = __bfText(__anchor_s0, __val)
4076
+ __bfw_s0('s0', escapeTextOrNode(__val))
4277
4077
  })
4278
4078
 
4279
- let __anchor_s2 = _s2
4079
+ const __bfw_s2 = lazySlots(__scope, [{ id: 's2', kind: 'markup', path: [] }])
4280
4080
  createEffect(() => {
4281
4081
  const __val = product.description
4282
- __anchor_s2 = __bfText(__anchor_s2, __val)
4082
+ __bfw_s2('s2', escapeTextOrNode(__val))
4283
4083
  })
4284
4084
 
4285
4085
  createEffect(() => {
@@ -4311,19 +4111,17 @@ export function ProductPage(_p, __bfKey) { return createComponent('ProductPage',
4311
4111
  `;
4312
4112
 
4313
4113
  exports[`docs/core/adapters/hono-adapter.md doc-examples L55 — (no label) 1`] = `
4314
- "import { $t, __bfText, createComponent, createEffect, escapeText, hydrate } from '@barefootjs/client/runtime'
4114
+ "import { createComponent, createEffect, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
4315
4115
 
4316
4116
 
4317
4117
  export function initGreeting(__scope, _p = {}) {
4318
4118
  if (!__scope) return
4319
4119
  const __scopeId = __scope.getAttribute('bf-s')
4320
4120
 
4321
- const [_s0] = $t(__scope, 's0')
4322
-
4323
- let __anchor_s0 = _s0
4121
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4324
4122
  createEffect(() => {
4325
4123
  const __val = _p.name
4326
- __anchor_s0 = __bfText(__anchor_s0, __val)
4124
+ __bfw_s0('s0', escapeTextOrNode(__val))
4327
4125
  })
4328
4126
 
4329
4127
  }
@@ -4333,7 +4131,7 @@ export function Greeting(_p, __bfKey) { return createComponent('Greeting', _p, _
4333
4131
  `;
4334
4132
 
4335
4133
  exports[`docs/core/adapters/hono-adapter.md doc-examples L82 — (no label) 1`] = `
4336
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
4134
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
4337
4135
 
4338
4136
 
4339
4137
  export function initCounter(__scope, _p = {}) {
@@ -4347,12 +4145,11 @@ export function initCounter(__scope, _p = {}) {
4347
4145
  })
4348
4146
 
4349
4147
  const [_s2] = $(__scope, 's2')
4350
- const [_s0] = $t(__scope, 's0')
4351
4148
 
4352
- let __anchor_s0 = _s0
4149
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4353
4150
  createEffect(() => {
4354
4151
  const __val = count()
4355
- __anchor_s0 = __bfText(__anchor_s0, __val)
4152
+ __bfw_s0('s0', escapeTextOrNode(__val))
4356
4153
  })
4357
4154
 
4358
4155
  if (_s2) _s2.addEventListener('click', () => { setCount(n => n + 1) })
@@ -4385,18 +4182,16 @@ export function Layout(_p, __bfKey) { return createComponent('Layout', _p, __bfK
4385
4182
  `;
4386
4183
 
4387
4184
  exports[`docs/core/adapters/hono-adapter.md doc-examples L167 — (no label) 1`] = `
4388
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, insert } from '@barefootjs/client/runtime'
4185
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, insert, lazySlots } from '@barefootjs/client/runtime'
4389
4186
 
4390
4187
  export function initTodoItem(__scope, _p = {}) {
4391
4188
  if (!__scope) return
4392
4189
  const __scopeId = __scope.getAttribute('bf-s')
4393
4190
 
4394
- const [_s0] = $t(__scope, 's0')
4395
-
4396
- let __anchor_s0 = _s0
4191
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4397
4192
  createEffect(() => {
4398
4193
  const __val = String(_p.todo)
4399
- __anchor_s0 = __bfText(__anchor_s0, __val)
4194
+ __bfw_s0('s0', escapeTextOrNode(__val))
4400
4195
  })
4401
4196
 
4402
4197
  }
@@ -4407,12 +4202,10 @@ export function initItem(__scope, _p = {}) {
4407
4202
  if (!__scope) return
4408
4203
  const __scopeId = __scope.getAttribute('bf-s')
4409
4204
 
4410
- const [_s0] = $t(__scope, 's0')
4411
-
4412
- let __anchor_s0 = _s0
4205
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4413
4206
  createEffect(() => {
4414
4207
  const __val = String(_p.item)
4415
- __anchor_s0 = __bfText(__anchor_s0, __val)
4208
+ __bfw_s0('s0', escapeTextOrNode(__val))
4416
4209
  })
4417
4210
 
4418
4211
  }
@@ -4455,18 +4248,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
4455
4248
  `;
4456
4249
 
4457
4250
  exports[`docs/core/adapters/hono-adapter.md doc-examples L171 — (no label) 1`] = `
4458
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, insert } from '@barefootjs/client/runtime'
4251
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, insert, lazySlots } from '@barefootjs/client/runtime'
4459
4252
 
4460
4253
  export function initTodoItem(__scope, _p = {}) {
4461
4254
  if (!__scope) return
4462
4255
  const __scopeId = __scope.getAttribute('bf-s')
4463
4256
 
4464
- const [_s0] = $t(__scope, 's0')
4465
-
4466
- let __anchor_s0 = _s0
4257
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4467
4258
  createEffect(() => {
4468
4259
  const __val = String(_p.todo)
4469
- __anchor_s0 = __bfText(__anchor_s0, __val)
4260
+ __bfw_s0('s0', escapeTextOrNode(__val))
4470
4261
  })
4471
4262
 
4472
4263
  }
@@ -4477,12 +4268,10 @@ export function initItem(__scope, _p = {}) {
4477
4268
  if (!__scope) return
4478
4269
  const __scopeId = __scope.getAttribute('bf-s')
4479
4270
 
4480
- const [_s0] = $t(__scope, 's0')
4481
-
4482
- let __anchor_s0 = _s0
4271
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4483
4272
  createEffect(() => {
4484
4273
  const __val = String(_p.item)
4485
- __anchor_s0 = __bfText(__anchor_s0, __val)
4274
+ __bfw_s0('s0', escapeTextOrNode(__val))
4486
4275
  })
4487
4276
 
4488
4277
  }
@@ -4525,18 +4314,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
4525
4314
  `;
4526
4315
 
4527
4316
  exports[`docs/core/adapters/hono-adapter.md doc-examples L177 — (no label) 1`] = `
4528
- "import { $, $t, __bfSlot, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, insert } from '@barefootjs/client/runtime'
4317
+ "import { $, __bfSlot, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, insert, lazySlots } from '@barefootjs/client/runtime'
4529
4318
 
4530
4319
  export function initTodoItem(__scope, _p = {}) {
4531
4320
  if (!__scope) return
4532
4321
  const __scopeId = __scope.getAttribute('bf-s')
4533
4322
 
4534
- const [_s0] = $t(__scope, 's0')
4535
-
4536
- let __anchor_s0 = _s0
4323
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4537
4324
  createEffect(() => {
4538
4325
  const __val = String(_p.todo)
4539
- __anchor_s0 = __bfText(__anchor_s0, __val)
4326
+ __bfw_s0('s0', escapeTextOrNode(__val))
4540
4327
  })
4541
4328
 
4542
4329
  }
@@ -4547,12 +4334,10 @@ export function initItem(__scope, _p = {}) {
4547
4334
  if (!__scope) return
4548
4335
  const __scopeId = __scope.getAttribute('bf-s')
4549
4336
 
4550
- const [_s0] = $t(__scope, 's0')
4551
-
4552
- let __anchor_s0 = _s0
4337
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4553
4338
  createEffect(() => {
4554
4339
  const __val = String(_p.item)
4555
- __anchor_s0 = __bfText(__anchor_s0, __val)
4340
+ __bfw_s0('s0', escapeTextOrNode(__val))
4556
4341
  })
4557
4342
 
4558
4343
  }
@@ -4595,18 +4380,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
4595
4380
  `;
4596
4381
 
4597
4382
  exports[`docs/core/adapters/hono-adapter.md doc-examples L190 — (no label) 1`] = `
4598
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeAttr, escapeText, hydrate, mapArray, tAfter } from '@barefootjs/client/runtime'
4383
+ "import { $, createComponent, createEffect, createSignal, escapeAttr, escapeText, escapeTextOrNode, hydrate, lazySlots, mapArray } from '@barefootjs/client/runtime'
4599
4384
 
4600
4385
  export function initTodoItem(__scope, _p = {}) {
4601
4386
  if (!__scope) return
4602
4387
  const __scopeId = __scope.getAttribute('bf-s')
4603
4388
 
4604
- const [_s0] = $t(__scope, 's0')
4605
-
4606
- let __anchor_s0 = _s0
4389
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4607
4390
  createEffect(() => {
4608
4391
  const __val = String(_p.todo)
4609
- __anchor_s0 = __bfText(__anchor_s0, __val)
4392
+ __bfw_s0('s0', escapeTextOrNode(__val))
4610
4393
  })
4611
4394
 
4612
4395
  }
@@ -4617,12 +4400,10 @@ export function initItem(__scope, _p = {}) {
4617
4400
  if (!__scope) return
4618
4401
  const __scopeId = __scope.getAttribute('bf-s')
4619
4402
 
4620
- const [_s0] = $t(__scope, 's0')
4621
-
4622
- let __anchor_s0 = _s0
4403
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4623
4404
  createEffect(() => {
4624
4405
  const __val = String(_p.item)
4625
- __anchor_s0 = __bfText(__anchor_s0, __val)
4406
+ __bfw_s0('s0', escapeTextOrNode(__val))
4626
4407
  })
4627
4408
 
4628
4409
  }
@@ -4652,9 +4433,8 @@ export function initExample(__scope, _p = {}) {
4652
4433
  __tpl_l0.innerHTML = \`<li data-key=""><!--bf:s0--><!--/--></li>\`
4653
4434
  mapArray(() => items(), _s1, (item) => String(item), (item, __idx, __existing) => {
4654
4435
  const __el = __existing ?? __tpl_l0.content.firstElementChild.cloneNode(true)
4655
- const __p = __existing ? null : [__el.firstChild]
4656
- { const __rt_s0 = __p ? tAfter(__p[0]) : $t(__el, 's0')[0]
4657
- if (__rt_s0) createEffect(() => { __rt_s0.textContent = String(item()) }) }
4436
+ const __bfw_s0 = lazySlots(__el, [{ id: 's0', kind: 'text', path: __existing ? [] : [0] }])
4437
+ createEffect(() => { __bfw_s0('s0', String(item())) })
4658
4438
  return __el
4659
4439
  }, 'l0')
4660
4440
 
@@ -4665,19 +4445,17 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
4665
4445
  `;
4666
4446
 
4667
4447
  exports[`docs/core/adapters/go-template-adapter.md doc-examples L71 — (no label) 1`] = `
4668
- "import { $t, __bfText, createComponent, createEffect, escapeText, hydrate } from '@barefootjs/client/runtime'
4448
+ "import { createComponent, createEffect, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
4669
4449
 
4670
4450
 
4671
4451
  export function initGreeting(__scope, _p = {}) {
4672
4452
  if (!__scope) return
4673
4453
  const __scopeId = __scope.getAttribute('bf-s')
4674
4454
 
4675
- const [_s0] = $t(__scope, 's0')
4676
-
4677
- let __anchor_s0 = _s0
4455
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4678
4456
  createEffect(() => {
4679
4457
  const __val = _p.name
4680
- __anchor_s0 = __bfText(__anchor_s0, __val)
4458
+ __bfw_s0('s0', escapeTextOrNode(__val))
4681
4459
  })
4682
4460
 
4683
4461
  }
@@ -4687,7 +4465,7 @@ export function Greeting(_p, __bfKey) { return createComponent('Greeting', _p, _
4687
4465
  `;
4688
4466
 
4689
4467
  exports[`docs/core/adapters/go-template-adapter.md doc-examples L95 — (no label) 1`] = `
4690
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
4468
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
4691
4469
 
4692
4470
 
4693
4471
  export function initCounter(__scope, _p = {}) {
@@ -4701,12 +4479,11 @@ export function initCounter(__scope, _p = {}) {
4701
4479
  })
4702
4480
 
4703
4481
  const [_s2] = $(__scope, 's2')
4704
- const [_s0] = $t(__scope, 's0')
4705
4482
 
4706
- let __anchor_s0 = _s0
4483
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4707
4484
  createEffect(() => {
4708
4485
  const __val = count()
4709
- __anchor_s0 = __bfText(__anchor_s0, __val)
4486
+ __bfw_s0('s0', escapeTextOrNode(__val))
4710
4487
  })
4711
4488
 
4712
4489
  if (_s2) _s2.addEventListener('click', () => { setCount(n => n + 1) })
@@ -4717,18 +4494,16 @@ export function Counter(_p, __bfKey) { return createComponent('Counter', _p, __b
4717
4494
  `;
4718
4495
 
4719
4496
  exports[`docs/core/adapters/go-template-adapter.md doc-examples L168 — (no label) 1`] = `
4720
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeAttr, escapeText, hydrate, mapArray, tAfter } from '@barefootjs/client/runtime'
4497
+ "import { $, createComponent, createEffect, createSignal, escapeAttr, escapeText, escapeTextOrNode, hydrate, lazySlots, mapArray } from '@barefootjs/client/runtime'
4721
4498
 
4722
4499
  export function initTodoItem(__scope, _p = {}) {
4723
4500
  if (!__scope) return
4724
4501
  const __scopeId = __scope.getAttribute('bf-s')
4725
4502
 
4726
- const [_s0] = $t(__scope, 's0')
4727
-
4728
- let __anchor_s0 = _s0
4503
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4729
4504
  createEffect(() => {
4730
4505
  const __val = String(_p.todo)
4731
- __anchor_s0 = __bfText(__anchor_s0, __val)
4506
+ __bfw_s0('s0', escapeTextOrNode(__val))
4732
4507
  })
4733
4508
 
4734
4509
  }
@@ -4739,12 +4514,10 @@ export function initItem(__scope, _p = {}) {
4739
4514
  if (!__scope) return
4740
4515
  const __scopeId = __scope.getAttribute('bf-s')
4741
4516
 
4742
- const [_s0] = $t(__scope, 's0')
4743
-
4744
- let __anchor_s0 = _s0
4517
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4745
4518
  createEffect(() => {
4746
4519
  const __val = String(_p.item)
4747
- __anchor_s0 = __bfText(__anchor_s0, __val)
4520
+ __bfw_s0('s0', escapeTextOrNode(__val))
4748
4521
  })
4749
4522
 
4750
4523
  }
@@ -4774,9 +4547,8 @@ export function initExample(__scope, _p = {}) {
4774
4547
  __tpl_l0.innerHTML = \`<li data-key=""><!--bf:s0--><!--/--></li>\`
4775
4548
  mapArray(() => items(), _s1, (item) => String(item), (item, __idx, __existing) => {
4776
4549
  const __el = __existing ?? __tpl_l0.content.firstElementChild.cloneNode(true)
4777
- const __p = __existing ? null : [__el.firstChild]
4778
- { const __rt_s0 = __p ? tAfter(__p[0]) : $t(__el, 's0')[0]
4779
- if (__rt_s0) createEffect(() => { __rt_s0.textContent = String(item()) }) }
4550
+ const __bfw_s0 = lazySlots(__el, [{ id: 's0', kind: 'text', path: __existing ? [] : [0] }])
4551
+ createEffect(() => { __bfw_s0('s0', String(item())) })
4780
4552
  return __el
4781
4553
  }, 'l0')
4782
4554
 
@@ -4787,18 +4559,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
4787
4559
  `;
4788
4560
 
4789
4561
  exports[`docs/core/adapters/go-template-adapter.md doc-examples L180 — (no label) 1`] = `
4790
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeAttr, escapeText, hydrate, mapArray, tAfter } from '@barefootjs/client/runtime'
4562
+ "import { $, createComponent, createEffect, createSignal, escapeAttr, escapeText, escapeTextOrNode, hydrate, lazySlots, mapArray } from '@barefootjs/client/runtime'
4791
4563
 
4792
4564
  export function initTodoItem(__scope, _p = {}) {
4793
4565
  if (!__scope) return
4794
4566
  const __scopeId = __scope.getAttribute('bf-s')
4795
4567
 
4796
- const [_s0] = $t(__scope, 's0')
4797
-
4798
- let __anchor_s0 = _s0
4568
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4799
4569
  createEffect(() => {
4800
4570
  const __val = String(_p.todo)
4801
- __anchor_s0 = __bfText(__anchor_s0, __val)
4571
+ __bfw_s0('s0', escapeTextOrNode(__val))
4802
4572
  })
4803
4573
 
4804
4574
  }
@@ -4809,12 +4579,10 @@ export function initItem(__scope, _p = {}) {
4809
4579
  if (!__scope) return
4810
4580
  const __scopeId = __scope.getAttribute('bf-s')
4811
4581
 
4812
- const [_s0] = $t(__scope, 's0')
4813
-
4814
- let __anchor_s0 = _s0
4582
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4815
4583
  createEffect(() => {
4816
4584
  const __val = String(_p.item)
4817
- __anchor_s0 = __bfText(__anchor_s0, __val)
4585
+ __bfw_s0('s0', escapeTextOrNode(__val))
4818
4586
  })
4819
4587
 
4820
4588
  }
@@ -4844,9 +4612,8 @@ export function initExample(__scope, _p = {}) {
4844
4612
  __tpl_l0.innerHTML = \`<li data-key=""><!--bf:s0--><!--/--></li>\`
4845
4613
  mapArray(() => items().filter(item => item.active), _s1, (item) => String(item.id), (item, __idx, __existing) => {
4846
4614
  const __el = __existing ?? __tpl_l0.content.firstElementChild.cloneNode(true)
4847
- const __p = __existing ? null : [__el.firstChild]
4848
- { const __rt_s0 = __p ? tAfter(__p[0]) : $t(__el, 's0')[0]
4849
- if (__rt_s0) createEffect(() => { __rt_s0.textContent = String(item().name) }) }
4615
+ const __bfw_s0 = lazySlots(__el, [{ id: 's0', kind: 'text', path: __existing ? [] : [0] }])
4616
+ createEffect(() => { __bfw_s0('s0', String(item().name)) })
4850
4617
  return __el
4851
4618
  }, 'l0')
4852
4619
 
@@ -4857,18 +4624,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
4857
4624
  `;
4858
4625
 
4859
4626
  exports[`docs/core/adapters/go-template-adapter.md doc-examples L194 — (no label) 1`] = `
4860
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeAttr, escapeText, hydrate } from '@barefootjs/client/runtime'
4627
+ "import { $, createComponent, createEffect, createSignal, escapeAttr, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
4861
4628
 
4862
4629
  export function initTodoItem(__scope, _p = {}) {
4863
4630
  if (!__scope) return
4864
4631
  const __scopeId = __scope.getAttribute('bf-s')
4865
4632
 
4866
- const [_s0] = $t(__scope, 's0')
4867
-
4868
- let __anchor_s0 = _s0
4633
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4869
4634
  createEffect(() => {
4870
4635
  const __val = String(_p.todo)
4871
- __anchor_s0 = __bfText(__anchor_s0, __val)
4636
+ __bfw_s0('s0', escapeTextOrNode(__val))
4872
4637
  })
4873
4638
 
4874
4639
  }
@@ -4879,12 +4644,10 @@ export function initItem(__scope, _p = {}) {
4879
4644
  if (!__scope) return
4880
4645
  const __scopeId = __scope.getAttribute('bf-s')
4881
4646
 
4882
- const [_s0] = $t(__scope, 's0')
4883
-
4884
- let __anchor_s0 = _s0
4647
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4885
4648
  createEffect(() => {
4886
4649
  const __val = String(_p.item)
4887
- __anchor_s0 = __bfText(__anchor_s0, __val)
4650
+ __bfw_s0('s0', escapeTextOrNode(__val))
4888
4651
  })
4889
4652
 
4890
4653
  }
@@ -4915,8 +4678,8 @@ export function initExample(__scope, _p = {}) {
4915
4678
  items.forEach((t, __idx) => {
4916
4679
  let __iterEl = _s1.children[__idx]
4917
4680
  if (__iterEl) {
4918
- { const [__rt_s0] = $t(__iterEl, 's0')
4919
- if (__rt_s0) createEffect(() => { __rt_s0.textContent = String(t.name) }) }
4681
+ const __bfw_s0 = lazySlots(__iterEl, [{ id: 's0', kind: 'text', path: [] }])
4682
+ createEffect(() => { __bfw_s0('s0', String(t.name)) })
4920
4683
  }
4921
4684
  })
4922
4685
  }
@@ -4952,18 +4715,16 @@ export function TodoList(_p, __bfKey) { return createComponent('TodoList', _p, _
4952
4715
  `;
4953
4716
 
4954
4717
  exports[`docs/core/adapters/go-template-adapter.md doc-examples L260 — (no label) 1`] = `
4955
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, insert } from '@barefootjs/client/runtime'
4718
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, insert, lazySlots } from '@barefootjs/client/runtime'
4956
4719
 
4957
4720
  export function initTodoItem(__scope, _p = {}) {
4958
4721
  if (!__scope) return
4959
4722
  const __scopeId = __scope.getAttribute('bf-s')
4960
4723
 
4961
- const [_s0] = $t(__scope, 's0')
4962
-
4963
- let __anchor_s0 = _s0
4724
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4964
4725
  createEffect(() => {
4965
4726
  const __val = String(_p.todo)
4966
- __anchor_s0 = __bfText(__anchor_s0, __val)
4727
+ __bfw_s0('s0', escapeTextOrNode(__val))
4967
4728
  })
4968
4729
 
4969
4730
  }
@@ -4974,12 +4735,10 @@ export function initItem(__scope, _p = {}) {
4974
4735
  if (!__scope) return
4975
4736
  const __scopeId = __scope.getAttribute('bf-s')
4976
4737
 
4977
- const [_s0] = $t(__scope, 's0')
4978
-
4979
- let __anchor_s0 = _s0
4738
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
4980
4739
  createEffect(() => {
4981
4740
  const __val = String(_p.item)
4982
- __anchor_s0 = __bfText(__anchor_s0, __val)
4741
+ __bfw_s0('s0', escapeTextOrNode(__val))
4983
4742
  })
4984
4743
 
4985
4744
  }
@@ -5022,18 +4781,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
5022
4781
  `;
5023
4782
 
5024
4783
  exports[`docs/core/adapters/custom-adapter.md doc-examples L169 — (no label) 1`] = `
5025
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
4784
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
5026
4785
 
5027
4786
  export function initTodoItem(__scope, _p = {}) {
5028
4787
  if (!__scope) return
5029
4788
  const __scopeId = __scope.getAttribute('bf-s')
5030
4789
 
5031
- const [_s0] = $t(__scope, 's0')
5032
-
5033
- let __anchor_s0 = _s0
4790
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
5034
4791
  createEffect(() => {
5035
4792
  const __val = String(_p.todo)
5036
- __anchor_s0 = __bfText(__anchor_s0, __val)
4793
+ __bfw_s0('s0', escapeTextOrNode(__val))
5037
4794
  })
5038
4795
 
5039
4796
  }
@@ -5044,12 +4801,10 @@ export function initItem(__scope, _p = {}) {
5044
4801
  if (!__scope) return
5045
4802
  const __scopeId = __scope.getAttribute('bf-s')
5046
4803
 
5047
- const [_s0] = $t(__scope, 's0')
5048
-
5049
- let __anchor_s0 = _s0
4804
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
5050
4805
  createEffect(() => {
5051
4806
  const __val = String(_p.item)
5052
- __anchor_s0 = __bfText(__anchor_s0, __val)
4807
+ __bfw_s0('s0', escapeTextOrNode(__val))
5053
4808
  })
5054
4809
 
5055
4810
  }
@@ -5080,18 +4835,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
5080
4835
  `;
5081
4836
 
5082
4837
  exports[`docs/core/adapters/custom-adapter.md doc-examples L174 — (no label) 1`] = `
5083
- "import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
4838
+ "import { createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
5084
4839
 
5085
4840
  export function initTodoItem(__scope, _p = {}) {
5086
4841
  if (!__scope) return
5087
4842
  const __scopeId = __scope.getAttribute('bf-s')
5088
4843
 
5089
- const [_s0] = $t(__scope, 's0')
5090
-
5091
- let __anchor_s0 = _s0
4844
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
5092
4845
  createEffect(() => {
5093
4846
  const __val = String(_p.todo)
5094
- __anchor_s0 = __bfText(__anchor_s0, __val)
4847
+ __bfw_s0('s0', escapeTextOrNode(__val))
5095
4848
  })
5096
4849
 
5097
4850
  }
@@ -5102,12 +4855,10 @@ export function initItem(__scope, _p = {}) {
5102
4855
  if (!__scope) return
5103
4856
  const __scopeId = __scope.getAttribute('bf-s')
5104
4857
 
5105
- const [_s0] = $t(__scope, 's0')
5106
-
5107
- let __anchor_s0 = _s0
4858
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
5108
4859
  createEffect(() => {
5109
4860
  const __val = String(_p.item)
5110
- __anchor_s0 = __bfText(__anchor_s0, __val)
4861
+ __bfw_s0('s0', escapeTextOrNode(__val))
5111
4862
  })
5112
4863
 
5113
4864
  }
@@ -5138,18 +4889,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
5138
4889
  `;
5139
4890
 
5140
4891
  exports[`docs/core/adapters/custom-adapter.md doc-examples L195 — (no label) 1`] = `
5141
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeAttr, escapeText, hydrate } from '@barefootjs/client/runtime'
4892
+ "import { $, createComponent, createEffect, createSignal, escapeAttr, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
5142
4893
 
5143
4894
  export function initTodoItem(__scope, _p = {}) {
5144
4895
  if (!__scope) return
5145
4896
  const __scopeId = __scope.getAttribute('bf-s')
5146
4897
 
5147
- const [_s0] = $t(__scope, 's0')
5148
-
5149
- let __anchor_s0 = _s0
4898
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
5150
4899
  createEffect(() => {
5151
4900
  const __val = String(_p.todo)
5152
- __anchor_s0 = __bfText(__anchor_s0, __val)
4901
+ __bfw_s0('s0', escapeTextOrNode(__val))
5153
4902
  })
5154
4903
 
5155
4904
  }
@@ -5160,12 +4909,10 @@ export function initItem(__scope, _p = {}) {
5160
4909
  if (!__scope) return
5161
4910
  const __scopeId = __scope.getAttribute('bf-s')
5162
4911
 
5163
- const [_s0] = $t(__scope, 's0')
5164
-
5165
- let __anchor_s0 = _s0
4912
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
5166
4913
  createEffect(() => {
5167
4914
  const __val = String(_p.item)
5168
- __anchor_s0 = __bfText(__anchor_s0, __val)
4915
+ __bfw_s0('s0', escapeTextOrNode(__val))
5169
4916
  })
5170
4917
 
5171
4918
  }
@@ -5196,8 +4943,8 @@ export function initExample(__scope, _p = {}) {
5196
4943
  items.forEach((item, __idx) => {
5197
4944
  let __iterEl = _s1.children[__idx]
5198
4945
  if (__iterEl) {
5199
- { const [__rt_s0] = $t(__iterEl, 's0')
5200
- if (__rt_s0) createEffect(() => { __rt_s0.textContent = String(item.name) }) }
4946
+ const __bfw_s0 = lazySlots(__iterEl, [{ id: 's0', kind: 'text', path: [] }])
4947
+ createEffect(() => { __bfw_s0('s0', String(item.name)) })
5201
4948
  }
5202
4949
  })
5203
4950
  }
@@ -5209,18 +4956,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
5209
4956
  `;
5210
4957
 
5211
4958
  exports[`docs/core/adapters/custom-adapter.md doc-examples L200 — (no label) 1`] = `
5212
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeAttr, escapeText, hydrate } from '@barefootjs/client/runtime'
4959
+ "import { $, createComponent, createEffect, createSignal, escapeAttr, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
5213
4960
 
5214
4961
  export function initTodoItem(__scope, _p = {}) {
5215
4962
  if (!__scope) return
5216
4963
  const __scopeId = __scope.getAttribute('bf-s')
5217
4964
 
5218
- const [_s0] = $t(__scope, 's0')
5219
-
5220
- let __anchor_s0 = _s0
4965
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
5221
4966
  createEffect(() => {
5222
4967
  const __val = String(_p.todo)
5223
- __anchor_s0 = __bfText(__anchor_s0, __val)
4968
+ __bfw_s0('s0', escapeTextOrNode(__val))
5224
4969
  })
5225
4970
 
5226
4971
  }
@@ -5231,12 +4976,10 @@ export function initItem(__scope, _p = {}) {
5231
4976
  if (!__scope) return
5232
4977
  const __scopeId = __scope.getAttribute('bf-s')
5233
4978
 
5234
- const [_s0] = $t(__scope, 's0')
5235
-
5236
- let __anchor_s0 = _s0
4979
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
5237
4980
  createEffect(() => {
5238
4981
  const __val = String(_p.item)
5239
- __anchor_s0 = __bfText(__anchor_s0, __val)
4982
+ __bfw_s0('s0', escapeTextOrNode(__val))
5240
4983
  })
5241
4984
 
5242
4985
  }
@@ -5267,8 +5010,8 @@ export function initExample(__scope, _p = {}) {
5267
5010
  items.forEach((item, __idx) => {
5268
5011
  let __iterEl = _s1.children[__idx]
5269
5012
  if (__iterEl) {
5270
- { const [__rt_s0] = $t(__iterEl, 's0')
5271
- if (__rt_s0) createEffect(() => { __rt_s0.textContent = String(item.name) }) }
5013
+ const __bfw_s0 = lazySlots(__iterEl, [{ id: 's0', kind: 'text', path: [] }])
5014
+ createEffect(() => { __bfw_s0('s0', String(item.name)) })
5272
5015
  }
5273
5016
  })
5274
5017
  }
@@ -5289,18 +5032,16 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
5289
5032
  `;
5290
5033
 
5291
5034
  exports[`docs/core/advanced/compiler-internals.md doc-examples L126 — (no label) 1`] = `
5292
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeAttr, escapeText, hydrate, mapArray, tAfter } from '@barefootjs/client/runtime'
5035
+ "import { $, createComponent, createEffect, createSignal, escapeAttr, escapeText, escapeTextOrNode, hydrate, lazySlots, mapArray } from '@barefootjs/client/runtime'
5293
5036
 
5294
5037
  export function initTodoItem(__scope, _p = {}) {
5295
5038
  if (!__scope) return
5296
5039
  const __scopeId = __scope.getAttribute('bf-s')
5297
5040
 
5298
- const [_s0] = $t(__scope, 's0')
5299
-
5300
- let __anchor_s0 = _s0
5041
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
5301
5042
  createEffect(() => {
5302
5043
  const __val = String(_p.todo)
5303
- __anchor_s0 = __bfText(__anchor_s0, __val)
5044
+ __bfw_s0('s0', escapeTextOrNode(__val))
5304
5045
  })
5305
5046
 
5306
5047
  }
@@ -5311,12 +5052,10 @@ export function initItem(__scope, _p = {}) {
5311
5052
  if (!__scope) return
5312
5053
  const __scopeId = __scope.getAttribute('bf-s')
5313
5054
 
5314
- const [_s0] = $t(__scope, 's0')
5315
-
5316
- let __anchor_s0 = _s0
5055
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
5317
5056
  createEffect(() => {
5318
5057
  const __val = String(_p.item)
5319
- __anchor_s0 = __bfText(__anchor_s0, __val)
5058
+ __bfw_s0('s0', escapeTextOrNode(__val))
5320
5059
  })
5321
5060
 
5322
5061
  }
@@ -5346,9 +5085,8 @@ export function initExample(__scope, _p = {}) {
5346
5085
  __tpl_l0.innerHTML = \`<li data-key=""><!--bf:s0--><!--/--></li>\`
5347
5086
  mapArray(() => todos().filter(t => !t.done).toSorted((a, b) => a.date - b.date), _s1, (t) => String(t.id), (t, __idx, __existing) => {
5348
5087
  const __el = __existing ?? __tpl_l0.content.firstElementChild.cloneNode(true)
5349
- const __p = __existing ? null : [__el.firstChild]
5350
- { const __rt_s0 = __p ? tAfter(__p[0]) : $t(__el, 's0')[0]
5351
- if (__rt_s0) createEffect(() => { __rt_s0.textContent = String(t().name) }) }
5088
+ const __bfw_s0 = lazySlots(__el, [{ id: 's0', kind: 'text', path: __existing ? [] : [0] }])
5089
+ createEffect(() => { __bfw_s0('s0', String(t().name)) })
5352
5090
  return __el
5353
5091
  }, 'l0')
5354
5092
 
@@ -5421,18 +5159,16 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
5421
5159
  `;
5422
5160
 
5423
5161
  exports[`docs/core/advanced/performance.md doc-examples L67 — ✅ Stable key — DOM nodes reused when list changes 1`] = `
5424
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeAttr, escapeText, hydrate, mapArray, tAfter } from '@barefootjs/client/runtime'
5162
+ "import { $, createComponent, createEffect, createSignal, escapeAttr, escapeText, escapeTextOrNode, hydrate, lazySlots, mapArray } from '@barefootjs/client/runtime'
5425
5163
 
5426
5164
  export function initTodoItem(__scope, _p = {}) {
5427
5165
  if (!__scope) return
5428
5166
  const __scopeId = __scope.getAttribute('bf-s')
5429
5167
 
5430
- const [_s0] = $t(__scope, 's0')
5431
-
5432
- let __anchor_s0 = _s0
5168
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
5433
5169
  createEffect(() => {
5434
5170
  const __val = String(_p.todo)
5435
- __anchor_s0 = __bfText(__anchor_s0, __val)
5171
+ __bfw_s0('s0', escapeTextOrNode(__val))
5436
5172
  })
5437
5173
 
5438
5174
  }
@@ -5443,12 +5179,10 @@ export function initItem(__scope, _p = {}) {
5443
5179
  if (!__scope) return
5444
5180
  const __scopeId = __scope.getAttribute('bf-s')
5445
5181
 
5446
- const [_s0] = $t(__scope, 's0')
5447
-
5448
- let __anchor_s0 = _s0
5182
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
5449
5183
  createEffect(() => {
5450
5184
  const __val = String(_p.item)
5451
- __anchor_s0 = __bfText(__anchor_s0, __val)
5185
+ __bfw_s0('s0', escapeTextOrNode(__val))
5452
5186
  })
5453
5187
 
5454
5188
  }
@@ -5478,9 +5212,8 @@ export function initExample(__scope, _p = {}) {
5478
5212
  __tpl_l0.innerHTML = \`<li data-key=""><!--bf:s0--><!--/--></li>\`
5479
5213
  mapArray(() => items(), _s1, (item) => String(item.id), (item, __idx, __existing) => {
5480
5214
  const __el = __existing ?? __tpl_l0.content.firstElementChild.cloneNode(true)
5481
- const __p = __existing ? null : [__el.firstChild]
5482
- { const __rt_s0 = __p ? tAfter(__p[0]) : $t(__el, 's0')[0]
5483
- if (__rt_s0) createEffect(() => { __rt_s0.textContent = String(item().name) }) }
5215
+ const __bfw_s0 = lazySlots(__el, [{ id: 's0', kind: 'text', path: __existing ? [] : [0] }])
5216
+ createEffect(() => { __bfw_s0('s0', String(item().name)) })
5484
5217
  return __el
5485
5218
  }, 'l0')
5486
5219
 
@@ -5491,18 +5224,16 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
5491
5224
  `;
5492
5225
 
5493
5226
  exports[`docs/core/advanced/performance.md doc-examples L70 — ❌ Index key — DOM nodes recreated on reorder 1`] = `
5494
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeAttr, escapeText, hydrate, mapArray, tAfter } from '@barefootjs/client/runtime'
5227
+ "import { $, createComponent, createEffect, createSignal, escapeAttr, escapeText, escapeTextOrNode, hydrate, lazySlots, mapArray } from '@barefootjs/client/runtime'
5495
5228
 
5496
5229
  export function initTodoItem(__scope, _p = {}) {
5497
5230
  if (!__scope) return
5498
5231
  const __scopeId = __scope.getAttribute('bf-s')
5499
5232
 
5500
- const [_s0] = $t(__scope, 's0')
5501
-
5502
- let __anchor_s0 = _s0
5233
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
5503
5234
  createEffect(() => {
5504
5235
  const __val = String(_p.todo)
5505
- __anchor_s0 = __bfText(__anchor_s0, __val)
5236
+ __bfw_s0('s0', escapeTextOrNode(__val))
5506
5237
  })
5507
5238
 
5508
5239
  }
@@ -5513,12 +5244,10 @@ export function initItem(__scope, _p = {}) {
5513
5244
  if (!__scope) return
5514
5245
  const __scopeId = __scope.getAttribute('bf-s')
5515
5246
 
5516
- const [_s0] = $t(__scope, 's0')
5517
-
5518
- let __anchor_s0 = _s0
5247
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
5519
5248
  createEffect(() => {
5520
5249
  const __val = String(_p.item)
5521
- __anchor_s0 = __bfText(__anchor_s0, __val)
5250
+ __bfw_s0('s0', escapeTextOrNode(__val))
5522
5251
  })
5523
5252
 
5524
5253
  }
@@ -5548,9 +5277,8 @@ export function initExample(__scope, _p = {}) {
5548
5277
  __tpl_l0.innerHTML = \`<li data-key=""><!--bf:s0--><!--/--></li>\`
5549
5278
  mapArray(() => items(), _s1, (item, i) => String(i), (item, i, __existing) => {
5550
5279
  const __el = __existing ?? __tpl_l0.content.firstElementChild.cloneNode(true)
5551
- const __p = __existing ? null : [__el.firstChild]
5552
- { const __rt_s0 = __p ? tAfter(__p[0]) : $t(__el, 's0')[0]
5553
- if (__rt_s0) createEffect(() => { __rt_s0.textContent = String(item().name) }) }
5280
+ const __bfw_s0 = lazySlots(__el, [{ id: 's0', kind: 'text', path: __existing ? [] : [0] }])
5281
+ createEffect(() => { __bfw_s0('s0', String(item().name)) })
5554
5282
  return __el
5555
5283
  }, 'l0')
5556
5284
 
@@ -5768,7 +5496,7 @@ export function TimelineBar(_p, __bfKey) { return createComponent('TimelineBar',
5768
5496
  `;
5769
5497
 
5770
5498
  exports[`docs/core/introduction.mdx doc-examples L15 — (no label) 1`] = `
5771
- "import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
5499
+ "import { $, createComponent, createEffect, createSignal, escapeText, escapeTextOrNode, hydrate, lazySlots } from '@barefootjs/client/runtime'
5772
5500
 
5773
5501
 
5774
5502
  export function initCounter(__scope, _p = {}) {
@@ -5778,12 +5506,11 @@ export function initCounter(__scope, _p = {}) {
5778
5506
  const [count, setCount] = createSignal(0)
5779
5507
 
5780
5508
  const [_s1] = $(__scope, 's1')
5781
- const [_s0] = $t(__scope, 's0')
5782
5509
 
5783
- let __anchor_s0 = _s0
5510
+ const __bfw_s0 = lazySlots(__scope, [{ id: 's0', kind: 'markup', path: [] }])
5784
5511
  createEffect(() => {
5785
5512
  const __val = count()
5786
- __anchor_s0 = __bfText(__anchor_s0, __val)
5513
+ __bfw_s0('s0', escapeTextOrNode(__val))
5787
5514
  })
5788
5515
 
5789
5516
  if (_s1) _s1.addEventListener('click', () => { setCount(n => n + 1) })