@barefootjs/jsx 0.5.1 → 0.5.3
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.
- package/dist/analyzer-context.d.ts +8 -1
- package/dist/analyzer-context.d.ts.map +1 -1
- package/dist/analyzer.d.ts.map +1 -1
- package/dist/combine-client-js.d.ts.map +1 -1
- package/dist/expression-parser.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +239 -65
- package/dist/ir-to-client-js/collect-elements.d.ts +31 -9
- package/dist/ir-to-client-js/collect-elements.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/build-loop.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/event-delegation.d.ts +8 -3
- package/dist/ir-to-client-js/control-flow/plan/event-delegation.d.ts.map +1 -1
- package/dist/ir-to-client-js/emit-reactive.d.ts.map +1 -1
- package/dist/ir-to-client-js/html-template.d.ts.map +1 -1
- package/dist/ir-to-client-js/imports.d.ts +2 -2
- package/dist/ir-to-client-js/imports.d.ts.map +1 -1
- package/dist/ir-to-client-js/plan/static-array-child-init.d.ts +3 -3
- package/dist/ir-to-client-js/plan/static-array-child-init.d.ts.map +1 -1
- package/dist/ir-to-client-js/types.d.ts +26 -4
- package/dist/ir-to-client-js/types.d.ts.map +1 -1
- package/dist/ir-to-client-js/utils.d.ts +19 -1
- package/dist/ir-to-client-js/utils.d.ts.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/__snapshots__/doc-examples.test.ts.snap +203 -203
- package/src/__tests__/child-components-in-map.test.ts +376 -0
- package/src/__tests__/combine-client-js.test.ts +47 -0
- package/src/__tests__/dangerously-set-inner-html.test.ts +82 -0
- package/src/__tests__/static-loop-csr-materialize.test.ts +6 -4
- package/src/__tests__/text-slot-escaping.test.ts +56 -0
- package/src/analyzer-context.ts +59 -13
- package/src/analyzer.ts +8 -0
- package/src/combine-client-js.ts +66 -22
- package/src/expression-parser.ts +16 -1
- package/src/index.ts +2 -0
- package/src/ir-to-client-js/collect-elements.ts +191 -34
- package/src/ir-to-client-js/control-flow/plan/build-event-delegation.ts +1 -1
- package/src/ir-to-client-js/control-flow/plan/build-loop.ts +2 -1
- package/src/ir-to-client-js/control-flow/plan/event-delegation.ts +8 -3
- package/src/ir-to-client-js/control-flow/stringify/event-delegation.ts +3 -3
- package/src/ir-to-client-js/emit-reactive.ts +9 -0
- package/src/ir-to-client-js/html-template.ts +82 -10
- package/src/ir-to-client-js/imports.ts +1 -1
- package/src/ir-to-client-js/plan/build-static-array-child-init.ts +4 -8
- package/src/ir-to-client-js/plan/static-array-child-init.ts +3 -3
- package/src/ir-to-client-js/types.ts +27 -4
- package/src/ir-to-client-js/utils.ts +41 -1
- package/src/scanner/__tests__/js-scanner.fuzz.test.ts +202 -0
- package/src/types.ts +6 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Bun Snapshot v1, https://bun.sh/docs/test/snapshots
|
|
2
2
|
|
|
3
3
|
exports[`docs/core/rendering/jsx-compatibility.md doc-examples L15 — Ternary 1`] = `
|
|
4
|
-
"import { $, $t, __bfSlot, __bfText, createComponent, createDisposableEffect, createEffect, createSignal, hydrate, insert } from '@barefootjs/client/runtime'
|
|
4
|
+
"import { $, $t, __bfSlot, __bfText, createComponent, createDisposableEffect, createEffect, createSignal, escapeText, hydrate, insert } from '@barefootjs/client/runtime'
|
|
5
5
|
|
|
6
6
|
export function initTodoItem(__scope, _p = {}) {
|
|
7
7
|
if (!__scope) return
|
|
@@ -17,7 +17,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
17
17
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
20
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
21
21
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
22
22
|
export function initItem(__scope, _p = {}) {
|
|
23
23
|
if (!__scope) return
|
|
@@ -33,7 +33,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
33
33
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
36
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
37
37
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
38
38
|
function initDashboard() {}
|
|
39
39
|
|
|
@@ -73,12 +73,12 @@ export function initExample(__scope, _p = {}) {
|
|
|
73
73
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s3">\${(0) > 0 ? \`<p bf-c="s0" bf="s2"><!--bf:s1-->\${(0)}<!--/--> items</p>\` : \`<p bf-c="s0">No items</p>\`}</div>\` })
|
|
76
|
+
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s3">\${(0) > 0 ? \`<p bf-c="s0" bf="s2"><!--bf:s1-->\${escapeText((0))}<!--/--> items</p>\` : \`<p bf-c="s0">No items</p>\`}</div>\` })
|
|
77
77
|
export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
|
|
78
78
|
`;
|
|
79
79
|
|
|
80
80
|
exports[`docs/core/rendering/jsx-compatibility.md doc-examples L18 — Logical AND 1`] = `
|
|
81
|
-
"import { $, $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, insert, renderChild } from '@barefootjs/client/runtime'
|
|
81
|
+
"import { $, $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, insert, renderChild } from '@barefootjs/client/runtime'
|
|
82
82
|
|
|
83
83
|
export function initTodoItem(__scope, _p = {}) {
|
|
84
84
|
if (!__scope) return
|
|
@@ -94,7 +94,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
94
94
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
97
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
98
98
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
99
99
|
export function initItem(__scope, _p = {}) {
|
|
100
100
|
if (!__scope) return
|
|
@@ -110,7 +110,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
110
110
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
113
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
114
114
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
115
115
|
function initDashboard() {}
|
|
116
116
|
|
|
@@ -154,7 +154,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
154
154
|
`;
|
|
155
155
|
|
|
156
156
|
exports[`docs/core/rendering/jsx-compatibility.md doc-examples L31 — (no label) 1`] = `
|
|
157
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
157
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
158
158
|
|
|
159
159
|
export function initTodoItem(__scope, _p = {}) {
|
|
160
160
|
if (!__scope) return
|
|
@@ -170,7 +170,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
170
170
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
173
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
174
174
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
175
175
|
export function initItem(__scope, _p = {}) {
|
|
176
176
|
if (!__scope) return
|
|
@@ -186,7 +186,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
186
186
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
189
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
190
190
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
191
191
|
function initDashboard() {}
|
|
192
192
|
|
|
@@ -219,7 +219,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
219
219
|
`;
|
|
220
220
|
|
|
221
221
|
exports[`docs/core/rendering/jsx-compatibility.md doc-examples L40 — ✅ Simple predicate 1`] = `
|
|
222
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
222
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
223
223
|
|
|
224
224
|
export function initTodoItem(__scope, _p = {}) {
|
|
225
225
|
if (!__scope) return
|
|
@@ -235,7 +235,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
235
235
|
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
238
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
239
239
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
240
240
|
export function initItem(__scope, _p = {}) {
|
|
241
241
|
if (!__scope) return
|
|
@@ -251,7 +251,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
251
251
|
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
254
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
255
255
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
256
256
|
function initDashboard() {}
|
|
257
257
|
|
|
@@ -284,7 +284,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
284
284
|
`;
|
|
285
285
|
|
|
286
286
|
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, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
287
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
288
288
|
|
|
289
289
|
export function initTodoItem(__scope, _p = {}) {
|
|
290
290
|
if (!__scope) return
|
|
@@ -300,7 +300,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
300
300
|
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
303
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
304
304
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
305
305
|
export function initItem(__scope, _p = {}) {
|
|
306
306
|
if (!__scope) return
|
|
@@ -316,7 +316,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
316
316
|
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
319
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
320
320
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
321
321
|
function initDashboard() {}
|
|
322
322
|
|
|
@@ -359,7 +359,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
359
359
|
`;
|
|
360
360
|
|
|
361
361
|
exports[`docs/core/rendering/jsx-compatibility.md doc-examples L59 — ✅ Sort then render 1`] = `
|
|
362
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
362
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
363
363
|
|
|
364
364
|
export function initTodoItem(__scope, _p = {}) {
|
|
365
365
|
if (!__scope) return
|
|
@@ -375,7 +375,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
375
375
|
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
378
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
379
379
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
380
380
|
export function initItem(__scope, _p = {}) {
|
|
381
381
|
if (!__scope) return
|
|
@@ -391,7 +391,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
391
391
|
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
394
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
395
395
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
396
396
|
function initDashboard() {}
|
|
397
397
|
|
|
@@ -424,7 +424,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
424
424
|
`;
|
|
425
425
|
|
|
426
426
|
exports[`docs/core/rendering/jsx-compatibility.md doc-examples L64 — ✅ Filter, sort, then render 1`] = `
|
|
427
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
427
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
428
428
|
|
|
429
429
|
export function initTodoItem(__scope, _p = {}) {
|
|
430
430
|
if (!__scope) return
|
|
@@ -440,7 +440,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
440
440
|
|
|
441
441
|
}
|
|
442
442
|
|
|
443
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
443
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
444
444
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
445
445
|
export function initItem(__scope, _p = {}) {
|
|
446
446
|
if (!__scope) return
|
|
@@ -456,7 +456,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
456
456
|
|
|
457
457
|
}
|
|
458
458
|
|
|
459
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
459
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
460
460
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
461
461
|
function initDashboard() {}
|
|
462
462
|
|
|
@@ -489,7 +489,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
489
489
|
`;
|
|
490
490
|
|
|
491
491
|
exports[`docs/core/rendering/jsx-compatibility.md doc-examples L69 — ✅ Multi-key: sort by price, break ties by name 1`] = `
|
|
492
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
492
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
493
493
|
|
|
494
494
|
export function initTodoItem(__scope, _p = {}) {
|
|
495
495
|
if (!__scope) return
|
|
@@ -505,7 +505,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
505
505
|
|
|
506
506
|
}
|
|
507
507
|
|
|
508
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
508
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
509
509
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
510
510
|
export function initItem(__scope, _p = {}) {
|
|
511
511
|
if (!__scope) return
|
|
@@ -521,7 +521,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
521
521
|
|
|
522
522
|
}
|
|
523
523
|
|
|
524
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
524
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
525
525
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
526
526
|
function initDashboard() {}
|
|
527
527
|
|
|
@@ -554,7 +554,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
554
554
|
`;
|
|
555
555
|
|
|
556
556
|
exports[`docs/core/rendering/jsx-compatibility.md doc-examples L74 — ✅ Relational ternary 1`] = `
|
|
557
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
557
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
558
558
|
|
|
559
559
|
export function initTodoItem(__scope, _p = {}) {
|
|
560
560
|
if (!__scope) return
|
|
@@ -570,7 +570,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
570
570
|
|
|
571
571
|
}
|
|
572
572
|
|
|
573
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
573
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
574
574
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
575
575
|
export function initItem(__scope, _p = {}) {
|
|
576
576
|
if (!__scope) return
|
|
@@ -586,7 +586,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
586
586
|
|
|
587
587
|
}
|
|
588
588
|
|
|
589
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
589
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
590
590
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
591
591
|
function initDashboard() {}
|
|
592
592
|
|
|
@@ -619,7 +619,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
619
619
|
`;
|
|
620
620
|
|
|
621
621
|
exports[`docs/core/rendering/jsx-compatibility.md doc-examples L85 — (no label) 1`] = `
|
|
622
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
622
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
623
623
|
|
|
624
624
|
export function initTodoItem(__scope, _p = {}) {
|
|
625
625
|
if (!__scope) return
|
|
@@ -635,7 +635,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
635
635
|
|
|
636
636
|
}
|
|
637
637
|
|
|
638
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
638
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
639
639
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
640
640
|
export function initItem(__scope, _p = {}) {
|
|
641
641
|
if (!__scope) return
|
|
@@ -651,7 +651,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
651
651
|
|
|
652
652
|
}
|
|
653
653
|
|
|
654
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
654
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
655
655
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
656
656
|
function initDashboard() {}
|
|
657
657
|
|
|
@@ -683,7 +683,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
683
683
|
`;
|
|
684
684
|
|
|
685
685
|
exports[`docs/core/rendering/jsx-compatibility.md doc-examples L131 — ❌ BF101 on Go/Mojo; works on Hono 1`] = `
|
|
686
|
-
"import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
686
|
+
"import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
687
687
|
|
|
688
688
|
export function initTodoItem(__scope, _p = {}) {
|
|
689
689
|
if (!__scope) return
|
|
@@ -699,7 +699,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
699
699
|
|
|
700
700
|
}
|
|
701
701
|
|
|
702
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
702
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
703
703
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
704
704
|
export function initItem(__scope, _p = {}) {
|
|
705
705
|
if (!__scope) return
|
|
@@ -715,7 +715,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
715
715
|
|
|
716
716
|
}
|
|
717
717
|
|
|
718
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
718
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
719
719
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
720
720
|
function initDashboard() {}
|
|
721
721
|
|
|
@@ -744,12 +744,12 @@ export function initExample(__scope, _p = {}) {
|
|
|
744
744
|
|
|
745
745
|
}
|
|
746
746
|
|
|
747
|
-
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf:s0-->\${([]).reduce((sum, x) => sum + x.price, 0)}<!--/--></div>\` })
|
|
747
|
+
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf:s0-->\${escapeText(([]).reduce((sum, x) => sum + x.price, 0))}<!--/--></div>\` })
|
|
748
748
|
export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
|
|
749
749
|
`;
|
|
750
750
|
|
|
751
751
|
exports[`docs/core/rendering/jsx-compatibility.md doc-examples L134 — ✅ Use /* @client */ 1`] = `
|
|
752
|
-
"import { $t, __bfText, createComponent, createEffect, createSignal, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
|
|
752
|
+
"import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
|
|
753
753
|
|
|
754
754
|
export function initTodoItem(__scope, _p = {}) {
|
|
755
755
|
if (!__scope) return
|
|
@@ -765,7 +765,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
765
765
|
|
|
766
766
|
}
|
|
767
767
|
|
|
768
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
768
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
769
769
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
770
770
|
export function initItem(__scope, _p = {}) {
|
|
771
771
|
if (!__scope) return
|
|
@@ -781,7 +781,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
781
781
|
|
|
782
782
|
}
|
|
783
783
|
|
|
784
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
784
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
785
785
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
786
786
|
function initDashboard() {}
|
|
787
787
|
|
|
@@ -812,7 +812,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
812
812
|
`;
|
|
813
813
|
|
|
814
814
|
exports[`docs/core/rendering/jsx-compatibility.md doc-examples L151 — ❌ BF101 on Go/Mojo; works on Hono 1`] = `
|
|
815
|
-
"import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
815
|
+
"import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
816
816
|
|
|
817
817
|
export function initTodoItem(__scope, _p = {}) {
|
|
818
818
|
if (!__scope) return
|
|
@@ -828,7 +828,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
828
828
|
|
|
829
829
|
}
|
|
830
830
|
|
|
831
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
831
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
832
832
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
833
833
|
export function initItem(__scope, _p = {}) {
|
|
834
834
|
if (!__scope) return
|
|
@@ -844,7 +844,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
844
844
|
|
|
845
845
|
}
|
|
846
846
|
|
|
847
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
847
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
848
848
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
849
849
|
function initDashboard() {}
|
|
850
850
|
|
|
@@ -873,12 +873,12 @@ export function initExample(__scope, _p = {}) {
|
|
|
873
873
|
|
|
874
874
|
}
|
|
875
875
|
|
|
876
|
-
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf:s0-->\${([]).filter(function(x) { return x.done })}<!--/--></div>\` })
|
|
876
|
+
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf:s0-->\${escapeText(([]).filter(function(x) { return x.done }))}<!--/--></div>\` })
|
|
877
877
|
export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
|
|
878
878
|
`;
|
|
879
879
|
|
|
880
880
|
exports[`docs/core/rendering/jsx-compatibility.md doc-examples L154 — ✅ Use arrow functions for adapter portability 1`] = `
|
|
881
|
-
"import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
881
|
+
"import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
882
882
|
|
|
883
883
|
export function initTodoItem(__scope, _p = {}) {
|
|
884
884
|
if (!__scope) return
|
|
@@ -894,7 +894,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
894
894
|
|
|
895
895
|
}
|
|
896
896
|
|
|
897
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
897
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
898
898
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
899
899
|
export function initItem(__scope, _p = {}) {
|
|
900
900
|
if (!__scope) return
|
|
@@ -910,7 +910,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
910
910
|
|
|
911
911
|
}
|
|
912
912
|
|
|
913
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
913
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
914
914
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
915
915
|
function initDashboard() {}
|
|
916
916
|
|
|
@@ -939,12 +939,12 @@ export function initExample(__scope, _p = {}) {
|
|
|
939
939
|
|
|
940
940
|
}
|
|
941
941
|
|
|
942
|
-
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf:s0-->\${([]).filter(x => x.done)}<!--/--></div>\` })
|
|
942
|
+
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf:s0-->\${escapeText(([]).filter(x => x.done))}<!--/--></div>\` })
|
|
943
943
|
export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
|
|
944
944
|
`;
|
|
945
945
|
|
|
946
946
|
exports[`docs/core/rendering/jsx-compatibility.md doc-examples L168 — ✅ Use /* @client */ 1`] = `
|
|
947
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
947
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
948
948
|
|
|
949
949
|
export function initTodoItem(__scope, _p = {}) {
|
|
950
950
|
if (!__scope) return
|
|
@@ -960,7 +960,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
960
960
|
|
|
961
961
|
}
|
|
962
962
|
|
|
963
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
963
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
964
964
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
965
965
|
export function initItem(__scope, _p = {}) {
|
|
966
966
|
if (!__scope) return
|
|
@@ -976,7 +976,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
976
976
|
|
|
977
977
|
}
|
|
978
978
|
|
|
979
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
979
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
980
980
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
981
981
|
function initDashboard() {}
|
|
982
982
|
|
|
@@ -1009,7 +1009,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
1009
1009
|
`;
|
|
1010
1010
|
|
|
1011
1011
|
exports[`docs/core/rendering/client-directive.md doc-examples L59 — Nested higher-order methods 1`] = `
|
|
1012
|
-
"import { $t, __bfText, createComponent, createEffect, createSignal, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
|
|
1012
|
+
"import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
|
|
1013
1013
|
|
|
1014
1014
|
export function initTodoItem(__scope, _p = {}) {
|
|
1015
1015
|
if (!__scope) return
|
|
@@ -1025,7 +1025,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
1025
1025
|
|
|
1026
1026
|
}
|
|
1027
1027
|
|
|
1028
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
1028
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
1029
1029
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
1030
1030
|
export function initItem(__scope, _p = {}) {
|
|
1031
1031
|
if (!__scope) return
|
|
@@ -1041,7 +1041,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
1041
1041
|
|
|
1042
1042
|
}
|
|
1043
1043
|
|
|
1044
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
1044
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
1045
1045
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
1046
1046
|
function initDashboard() {}
|
|
1047
1047
|
|
|
@@ -1072,7 +1072,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
1072
1072
|
`;
|
|
1073
1073
|
|
|
1074
1074
|
exports[`docs/core/rendering/client-directive.md doc-examples L62 — Unsupported array methods 1`] = `
|
|
1075
|
-
"import { $t, __bfText, createComponent, createEffect, createSignal, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
|
|
1075
|
+
"import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
|
|
1076
1076
|
|
|
1077
1077
|
export function initTodoItem(__scope, _p = {}) {
|
|
1078
1078
|
if (!__scope) return
|
|
@@ -1088,7 +1088,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
1088
1088
|
|
|
1089
1089
|
}
|
|
1090
1090
|
|
|
1091
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
1091
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
1092
1092
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
1093
1093
|
export function initItem(__scope, _p = {}) {
|
|
1094
1094
|
if (!__scope) return
|
|
@@ -1104,7 +1104,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
1104
1104
|
|
|
1105
1105
|
}
|
|
1106
1106
|
|
|
1107
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
1107
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
1108
1108
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
1109
1109
|
function initDashboard() {}
|
|
1110
1110
|
|
|
@@ -1135,7 +1135,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
1135
1135
|
`;
|
|
1136
1136
|
|
|
1137
1137
|
exports[`docs/core/rendering/client-directive.md doc-examples L74 — (no label) 1`] = `
|
|
1138
|
-
"import { $t, __bfText, createComponent, createEffect, createSignal, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
|
|
1138
|
+
"import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, updateClientMarker } from '@barefootjs/client/runtime'
|
|
1139
1139
|
|
|
1140
1140
|
export function initTodoItem(__scope, _p = {}) {
|
|
1141
1141
|
if (!__scope) return
|
|
@@ -1151,7 +1151,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
1151
1151
|
|
|
1152
1152
|
}
|
|
1153
1153
|
|
|
1154
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
1154
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
1155
1155
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
1156
1156
|
export function initItem(__scope, _p = {}) {
|
|
1157
1157
|
if (!__scope) return
|
|
@@ -1167,7 +1167,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
1167
1167
|
|
|
1168
1168
|
}
|
|
1169
1169
|
|
|
1170
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
1170
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
1171
1171
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
1172
1172
|
function initDashboard() {}
|
|
1173
1173
|
|
|
@@ -1198,7 +1198,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
1198
1198
|
`;
|
|
1199
1199
|
|
|
1200
1200
|
exports[`docs/core/rendering/fragment.md doc-examples L11 — (no label) 1`] = `
|
|
1201
|
-
"import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
1201
|
+
"import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
1202
1202
|
|
|
1203
1203
|
export function initTodoItem(__scope, _p = {}) {
|
|
1204
1204
|
if (!__scope) return
|
|
@@ -1214,7 +1214,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
1214
1214
|
|
|
1215
1215
|
}
|
|
1216
1216
|
|
|
1217
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
1217
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
1218
1218
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
1219
1219
|
export function initItem(__scope, _p = {}) {
|
|
1220
1220
|
if (!__scope) return
|
|
@@ -1230,7 +1230,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
1230
1230
|
|
|
1231
1231
|
}
|
|
1232
1232
|
|
|
1233
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
1233
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
1234
1234
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
1235
1235
|
function initDashboard() {}
|
|
1236
1236
|
|
|
@@ -1256,7 +1256,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
1256
1256
|
`;
|
|
1257
1257
|
|
|
1258
1258
|
exports[`docs/core/rendering/fragment.md doc-examples L23 — (no label) 1`] = `
|
|
1259
|
-
"import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
1259
|
+
"import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
1260
1260
|
|
|
1261
1261
|
export function initTodoItem(__scope, _p = {}) {
|
|
1262
1262
|
if (!__scope) return
|
|
@@ -1272,7 +1272,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
1272
1272
|
|
|
1273
1273
|
}
|
|
1274
1274
|
|
|
1275
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
1275
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
1276
1276
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
1277
1277
|
export function initItem(__scope, _p = {}) {
|
|
1278
1278
|
if (!__scope) return
|
|
@@ -1288,7 +1288,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
1288
1288
|
|
|
1289
1289
|
}
|
|
1290
1290
|
|
|
1291
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
1291
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
1292
1292
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
1293
1293
|
function initDashboard() {}
|
|
1294
1294
|
|
|
@@ -1471,7 +1471,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
|
|
|
1471
1471
|
`;
|
|
1472
1472
|
|
|
1473
1473
|
exports[`docs/core/reactivity/create-signal.md doc-examples L95 — (no label) 1`] = `
|
|
1474
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
1474
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
1475
1475
|
|
|
1476
1476
|
|
|
1477
1477
|
export function initCounter(__scope, _p = {}) {
|
|
@@ -1492,7 +1492,7 @@ export function initCounter(__scope, _p = {}) {
|
|
|
1492
1492
|
if (_s2) _s2.addEventListener('click', () => { setCount(n => n + 1) })
|
|
1493
1493
|
}
|
|
1494
1494
|
|
|
1495
|
-
hydrate('Counter', { init: initCounter, template: (_p) => \`<div><p bf="s1"><!--bf:s0-->\${(0)}<!--/--></p><button bf="s2">+1</button></div>\` })
|
|
1495
|
+
hydrate('Counter', { init: initCounter, template: (_p) => \`<div><p bf="s1"><!--bf:s0-->\${escapeText((0))}<!--/--></p><button bf="s2">+1</button></div>\` })
|
|
1496
1496
|
export function Counter(_p, __bfKey) { return createComponent('Counter', _p, __bfKey) }"
|
|
1497
1497
|
`;
|
|
1498
1498
|
|
|
@@ -1660,7 +1660,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
|
|
|
1660
1660
|
`;
|
|
1661
1661
|
|
|
1662
1662
|
exports[`docs/core/reactivity/create-effect.md doc-examples L115 — (no label) 1`] = `
|
|
1663
|
-
"import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
1663
|
+
"import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
1664
1664
|
|
|
1665
1665
|
export function initTodoItem(__scope, _p = {}) {
|
|
1666
1666
|
if (!__scope) return
|
|
@@ -1676,7 +1676,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
1676
1676
|
|
|
1677
1677
|
}
|
|
1678
1678
|
|
|
1679
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
1679
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
1680
1680
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
1681
1681
|
export function initItem(__scope, _p = {}) {
|
|
1682
1682
|
if (!__scope) return
|
|
@@ -1692,7 +1692,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
1692
1692
|
|
|
1693
1693
|
}
|
|
1694
1694
|
|
|
1695
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
1695
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
1696
1696
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
1697
1697
|
function initDashboard() {}
|
|
1698
1698
|
|
|
@@ -1794,7 +1794,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
|
|
|
1794
1794
|
`;
|
|
1795
1795
|
|
|
1796
1796
|
exports[`docs/core/reactivity/create-memo.md doc-examples L60 — No memo needed 1`] = `
|
|
1797
|
-
"import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
1797
|
+
"import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
1798
1798
|
|
|
1799
1799
|
export function initTodoItem(__scope, _p = {}) {
|
|
1800
1800
|
if (!__scope) return
|
|
@@ -1810,7 +1810,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
1810
1810
|
|
|
1811
1811
|
}
|
|
1812
1812
|
|
|
1813
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
1813
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
1814
1814
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
1815
1815
|
export function initItem(__scope, _p = {}) {
|
|
1816
1816
|
if (!__scope) return
|
|
@@ -1826,7 +1826,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
1826
1826
|
|
|
1827
1827
|
}
|
|
1828
1828
|
|
|
1829
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
1829
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
1830
1830
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
1831
1831
|
function initDashboard() {}
|
|
1832
1832
|
|
|
@@ -1855,7 +1855,7 @@ export function initExample(__scope, _p = {}) {
|
|
|
1855
1855
|
|
|
1856
1856
|
}
|
|
1857
1857
|
|
|
1858
|
-
hydrate('Example', { init: initExample, template: (_p) => \`<div><p bf="s1"><!--bf:s0-->\${(0) * 2}<!--/--></p></div>\` })
|
|
1858
|
+
hydrate('Example', { init: initExample, template: (_p) => \`<div><p bf="s1"><!--bf:s0-->\${escapeText((0) * 2)}<!--/--></p></div>\` })
|
|
1859
1859
|
export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
|
|
1860
1860
|
`;
|
|
1861
1861
|
|
|
@@ -2101,7 +2101,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
|
|
|
2101
2101
|
`;
|
|
2102
2102
|
|
|
2103
2103
|
exports[`docs/core/reactivity/props-reactivity.md doc-examples L82 — Parent 1`] = `
|
|
2104
|
-
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
2104
|
+
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
2105
2105
|
import '/* @bf-child:Child */'
|
|
2106
2106
|
|
|
2107
2107
|
export function initTodoItem(__scope, _p = {}) {
|
|
@@ -2118,7 +2118,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
2118
2118
|
|
|
2119
2119
|
}
|
|
2120
2120
|
|
|
2121
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
2121
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
2122
2122
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
2123
2123
|
export function initItem(__scope, _p = {}) {
|
|
2124
2124
|
if (!__scope) return
|
|
@@ -2134,7 +2134,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
2134
2134
|
|
|
2135
2135
|
}
|
|
2136
2136
|
|
|
2137
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
2137
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
2138
2138
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
2139
2139
|
function initDashboard() {}
|
|
2140
2140
|
|
|
@@ -2182,7 +2182,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
2182
2182
|
`;
|
|
2183
2183
|
|
|
2184
2184
|
exports[`docs/core/reactivity/props-reactivity.md doc-examples L85 — Compiled props object 1`] = `
|
|
2185
|
-
"import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
2185
|
+
"import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
2186
2186
|
|
|
2187
2187
|
export function initTodoItem(__scope, _p = {}) {
|
|
2188
2188
|
if (!__scope) return
|
|
@@ -2198,7 +2198,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
2198
2198
|
|
|
2199
2199
|
}
|
|
2200
2200
|
|
|
2201
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
2201
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
2202
2202
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
2203
2203
|
export function initItem(__scope, _p = {}) {
|
|
2204
2204
|
if (!__scope) return
|
|
@@ -2214,7 +2214,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
2214
2214
|
|
|
2215
2215
|
}
|
|
2216
2216
|
|
|
2217
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
2217
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
2218
2218
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
2219
2219
|
function initDashboard() {}
|
|
2220
2220
|
|
|
@@ -2240,7 +2240,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
2240
2240
|
`;
|
|
2241
2241
|
|
|
2242
2242
|
exports[`docs/core/components/component-authoring.mdx doc-examples L16 — (no label) 1`] = `
|
|
2243
|
-
"import { $t, __bfText, createComponent, createEffect, hydrate } from '@barefootjs/client/runtime'
|
|
2243
|
+
"import { $t, __bfText, createComponent, createEffect, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
2244
2244
|
|
|
2245
2245
|
|
|
2246
2246
|
export function initGreeting(__scope, _p = {}) {
|
|
@@ -2259,12 +2259,12 @@ export function initGreeting(__scope, _p = {}) {
|
|
|
2259
2259
|
|
|
2260
2260
|
}
|
|
2261
2261
|
|
|
2262
|
-
hydrate('Greeting', { init: initGreeting, template: (_p) => \`<h1 bf="s1">Hello, <!--bf:s0-->\${_p.name}<!--/--></h1>\` })
|
|
2262
|
+
hydrate('Greeting', { init: initGreeting, template: (_p) => \`<h1 bf="s1">Hello, <!--bf:s0-->\${escapeText(_p.name)}<!--/--></h1>\` })
|
|
2263
2263
|
export function Greeting(_p, __bfKey) { return createComponent('Greeting', _p, __bfKey) }"
|
|
2264
2264
|
`;
|
|
2265
2265
|
|
|
2266
2266
|
exports[`docs/core/components/component-authoring.mdx doc-examples L29 — (no label) 1`] = `
|
|
2267
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
2267
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
2268
2268
|
|
|
2269
2269
|
|
|
2270
2270
|
export function initCounter(__scope, _p = {}) {
|
|
@@ -2285,7 +2285,7 @@ export function initCounter(__scope, _p = {}) {
|
|
|
2285
2285
|
if (_s1) _s1.addEventListener('click', () => { setCount(n => n + 1) })
|
|
2286
2286
|
}
|
|
2287
2287
|
|
|
2288
|
-
hydrate('Counter', { init: initCounter, template: (_p) => \`<button bf="s1"> Count: <!--bf:s0-->\${(0)}<!--/--></button>\` })
|
|
2288
|
+
hydrate('Counter', { init: initCounter, template: (_p) => \`<button bf="s1"> Count: <!--bf:s0-->\${escapeText((0))}<!--/--></button>\` })
|
|
2289
2289
|
export function Counter(_p, __bfKey) { return createComponent('Counter', _p, __bfKey) }"
|
|
2290
2290
|
`;
|
|
2291
2291
|
|
|
@@ -2371,7 +2371,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
|
|
|
2371
2371
|
`;
|
|
2372
2372
|
|
|
2373
2373
|
exports[`docs/core/components/children-slots.md doc-examples L14 — (no label) 1`] = `
|
|
2374
|
-
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
2374
|
+
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
2375
2375
|
import '/* @bf-child:Card */'
|
|
2376
2376
|
|
|
2377
2377
|
export function initTodoItem(__scope, _p = {}) {
|
|
@@ -2388,7 +2388,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
2388
2388
|
|
|
2389
2389
|
}
|
|
2390
2390
|
|
|
2391
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
2391
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
2392
2392
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
2393
2393
|
export function initItem(__scope, _p = {}) {
|
|
2394
2394
|
if (!__scope) return
|
|
@@ -2404,7 +2404,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
2404
2404
|
|
|
2405
2405
|
}
|
|
2406
2406
|
|
|
2407
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
2407
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
2408
2408
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
2409
2409
|
function initDashboard() {}
|
|
2410
2410
|
|
|
@@ -2453,7 +2453,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
|
|
|
2453
2453
|
`;
|
|
2454
2454
|
|
|
2455
2455
|
exports[`docs/core/components/children-slots.md doc-examples L68 — Input 1`] = `
|
|
2456
|
-
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
2456
|
+
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
2457
2457
|
import '/* @bf-child:Slot */'
|
|
2458
2458
|
|
|
2459
2459
|
export function initTodoItem(__scope, _p = {}) {
|
|
@@ -2470,7 +2470,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
2470
2470
|
|
|
2471
2471
|
}
|
|
2472
2472
|
|
|
2473
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
2473
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
2474
2474
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
2475
2475
|
export function initItem(__scope, _p = {}) {
|
|
2476
2476
|
if (!__scope) return
|
|
@@ -2486,7 +2486,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
2486
2486
|
|
|
2487
2487
|
}
|
|
2488
2488
|
|
|
2489
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
2489
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
2490
2490
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
2491
2491
|
function initDashboard() {}
|
|
2492
2492
|
|
|
@@ -2517,7 +2517,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
2517
2517
|
`;
|
|
2518
2518
|
|
|
2519
2519
|
exports[`docs/core/components/children-slots.md doc-examples L73 — Output 1`] = `
|
|
2520
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
2520
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
2521
2521
|
|
|
2522
2522
|
export function initTodoItem(__scope, _p = {}) {
|
|
2523
2523
|
if (!__scope) return
|
|
@@ -2533,7 +2533,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
2533
2533
|
|
|
2534
2534
|
}
|
|
2535
2535
|
|
|
2536
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
2536
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
2537
2537
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
2538
2538
|
export function initItem(__scope, _p = {}) {
|
|
2539
2539
|
if (!__scope) return
|
|
@@ -2549,7 +2549,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
2549
2549
|
|
|
2550
2550
|
}
|
|
2551
2551
|
|
|
2552
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
2552
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
2553
2553
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
2554
2554
|
function initDashboard() {}
|
|
2555
2555
|
|
|
@@ -2578,7 +2578,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
2578
2578
|
`;
|
|
2579
2579
|
|
|
2580
2580
|
exports[`docs/core/components/children-slots.md doc-examples L86 — (no label) 1`] = `
|
|
2581
|
-
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
2581
|
+
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
2582
2582
|
import '/* @bf-child:Button */'
|
|
2583
2583
|
|
|
2584
2584
|
export function initTodoItem(__scope, _p = {}) {
|
|
@@ -2595,7 +2595,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
2595
2595
|
|
|
2596
2596
|
}
|
|
2597
2597
|
|
|
2598
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
2598
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
2599
2599
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
2600
2600
|
export function initItem(__scope, _p = {}) {
|
|
2601
2601
|
if (!__scope) return
|
|
@@ -2611,7 +2611,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
2611
2611
|
|
|
2612
2612
|
}
|
|
2613
2613
|
|
|
2614
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
2614
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
2615
2615
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
2616
2616
|
function initDashboard() {}
|
|
2617
2617
|
|
|
@@ -2642,7 +2642,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
2642
2642
|
`;
|
|
2643
2643
|
|
|
2644
2644
|
exports[`docs/core/components/children-slots.md doc-examples L93 — (no label) 1`] = `
|
|
2645
|
-
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
2645
|
+
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
2646
2646
|
import '/* @bf-child:Button */'
|
|
2647
2647
|
|
|
2648
2648
|
export function initTodoItem(__scope, _p = {}) {
|
|
@@ -2659,7 +2659,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
2659
2659
|
|
|
2660
2660
|
}
|
|
2661
2661
|
|
|
2662
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
2662
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
2663
2663
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
2664
2664
|
export function initItem(__scope, _p = {}) {
|
|
2665
2665
|
if (!__scope) return
|
|
@@ -2675,7 +2675,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
2675
2675
|
|
|
2676
2676
|
}
|
|
2677
2677
|
|
|
2678
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
2678
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
2679
2679
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
2680
2680
|
function initDashboard() {}
|
|
2681
2681
|
|
|
@@ -2706,7 +2706,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
2706
2706
|
`;
|
|
2707
2707
|
|
|
2708
2708
|
exports[`docs/core/components/children-slots.md doc-examples L109 — Dialog trigger as a custom element 1`] = `
|
|
2709
|
-
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
2709
|
+
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeAttr, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
2710
2710
|
import '/* @bf-child:DialogTrigger */'
|
|
2711
2711
|
|
|
2712
2712
|
export function initTodoItem(__scope, _p = {}) {
|
|
@@ -2723,7 +2723,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
2723
2723
|
|
|
2724
2724
|
}
|
|
2725
2725
|
|
|
2726
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
2726
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
2727
2727
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
2728
2728
|
export function initItem(__scope, _p = {}) {
|
|
2729
2729
|
if (!__scope) return
|
|
@@ -2739,7 +2739,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
2739
2739
|
|
|
2740
2740
|
}
|
|
2741
2741
|
|
|
2742
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
2742
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
2743
2743
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
2744
2744
|
function initDashboard() {}
|
|
2745
2745
|
|
|
@@ -2765,12 +2765,12 @@ export function initExample(__scope, _p = {}) {
|
|
|
2765
2765
|
initChild('DialogTrigger', _s0, { asChild: true })
|
|
2766
2766
|
}
|
|
2767
2767
|
|
|
2768
|
-
hydrate('Example', { init: initExample, template: (_p) => \`<div>\${renderChild('DialogTrigger', {asChild: true, children: \`<span role="button" \${(0) != null ? 'tabIndex="' + (0) + '"' : ''}>Open</span>\`}, undefined, 's0')}</div>\` })
|
|
2768
|
+
hydrate('Example', { init: initExample, template: (_p) => \`<div>\${renderChild('DialogTrigger', {asChild: true, children: \`<span role="button" \${(0) != null ? 'tabIndex="' + escapeAttr(0) + '"' : ''}>Open</span>\`}, undefined, 's0')}</div>\` })
|
|
2769
2769
|
export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
|
|
2770
2770
|
`;
|
|
2771
2771
|
|
|
2772
2772
|
exports[`docs/core/components/children-slots.md doc-examples L118 — (no label) 1`] = `
|
|
2773
|
-
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
2773
|
+
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
2774
2774
|
import '/* @bf-child:Dialog */'
|
|
2775
2775
|
import '/* @bf-child:DialogTrigger */'
|
|
2776
2776
|
import '/* @bf-child:DialogOverlay */'
|
|
@@ -2796,7 +2796,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
2796
2796
|
|
|
2797
2797
|
}
|
|
2798
2798
|
|
|
2799
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
2799
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
2800
2800
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
2801
2801
|
export function initItem(__scope, _p = {}) {
|
|
2802
2802
|
if (!__scope) return
|
|
@@ -2812,7 +2812,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
2812
2812
|
|
|
2813
2813
|
}
|
|
2814
2814
|
|
|
2815
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
2815
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
2816
2816
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
2817
2817
|
function initDashboard() {}
|
|
2818
2818
|
|
|
@@ -2860,7 +2860,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
2860
2860
|
`;
|
|
2861
2861
|
|
|
2862
2862
|
exports[`docs/core/components/children-slots.md doc-examples L140 — (no label) 1`] = `
|
|
2863
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
2863
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, mapArray, renderChild } from '@barefootjs/client/runtime'
|
|
2864
2864
|
|
|
2865
2865
|
export function initTodoItem(__scope, _p = {}) {
|
|
2866
2866
|
if (!__scope) return
|
|
@@ -2876,7 +2876,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
2876
2876
|
|
|
2877
2877
|
}
|
|
2878
2878
|
|
|
2879
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
2879
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
2880
2880
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
2881
2881
|
export function initItem(__scope, _p = {}) {
|
|
2882
2882
|
if (!__scope) return
|
|
@@ -2892,7 +2892,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
2892
2892
|
|
|
2893
2893
|
}
|
|
2894
2894
|
|
|
2895
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
2895
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
2896
2896
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
2897
2897
|
function initDashboard() {}
|
|
2898
2898
|
|
|
@@ -2934,7 +2934,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
|
|
|
2934
2934
|
`;
|
|
2935
2935
|
|
|
2936
2936
|
exports[`docs/core/components/context-api.md doc-examples L40 — (no label) 1`] = `
|
|
2937
|
-
"import { $t, __bfText, createComponent, createEffect, createSignal, hydrate, provideContext } from '@barefootjs/client/runtime'
|
|
2937
|
+
"import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, provideContext } from '@barefootjs/client/runtime'
|
|
2938
2938
|
|
|
2939
2939
|
export function initTodoItem(__scope, _p = {}) {
|
|
2940
2940
|
if (!__scope) return
|
|
@@ -2950,7 +2950,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
2950
2950
|
|
|
2951
2951
|
}
|
|
2952
2952
|
|
|
2953
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
2953
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
2954
2954
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
2955
2955
|
export function initItem(__scope, _p = {}) {
|
|
2956
2956
|
if (!__scope) return
|
|
@@ -2966,7 +2966,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
2966
2966
|
|
|
2967
2967
|
}
|
|
2968
2968
|
|
|
2969
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
2969
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
2970
2970
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
2971
2971
|
function initDashboard() {}
|
|
2972
2972
|
|
|
@@ -3047,7 +3047,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
|
|
|
3047
3047
|
`;
|
|
3048
3048
|
|
|
3049
3049
|
exports[`docs/core/components/context-api.md doc-examples L94 — Usage 1`] = `
|
|
3050
|
-
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
3050
|
+
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
3051
3051
|
import '/* @bf-child:ThemeProvider */'
|
|
3052
3052
|
import '/* @bf-child:ThemedButton */'
|
|
3053
3053
|
|
|
@@ -3065,7 +3065,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
3065
3065
|
|
|
3066
3066
|
}
|
|
3067
3067
|
|
|
3068
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
3068
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
3069
3069
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
3070
3070
|
export function initItem(__scope, _p = {}) {
|
|
3071
3071
|
if (!__scope) return
|
|
@@ -3081,7 +3081,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
3081
3081
|
|
|
3082
3082
|
}
|
|
3083
3083
|
|
|
3084
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
3084
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
3085
3085
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
3086
3086
|
function initDashboard() {}
|
|
3087
3087
|
|
|
@@ -3200,7 +3200,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
|
|
|
3200
3200
|
`;
|
|
3201
3201
|
|
|
3202
3202
|
exports[`docs/core/components/context-api.md doc-examples L170 — (no label) 1`] = `
|
|
3203
|
-
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
3203
|
+
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
3204
3204
|
import '/* @bf-child:Accordion */'
|
|
3205
3205
|
import '/* @bf-child:AccordionTrigger */'
|
|
3206
3206
|
import '/* @bf-child:AccordionContent */'
|
|
@@ -3219,7 +3219,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
3219
3219
|
|
|
3220
3220
|
}
|
|
3221
3221
|
|
|
3222
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
3222
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
3223
3223
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
3224
3224
|
export function initItem(__scope, _p = {}) {
|
|
3225
3225
|
if (!__scope) return
|
|
@@ -3235,7 +3235,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
3235
3235
|
|
|
3236
3236
|
}
|
|
3237
3237
|
|
|
3238
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
3238
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
3239
3239
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
3240
3240
|
function initDashboard() {}
|
|
3241
3241
|
|
|
@@ -3270,7 +3270,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
3270
3270
|
`;
|
|
3271
3271
|
|
|
3272
3272
|
exports[`docs/core/components/context-api.md doc-examples L190 — Provider passes signal getter 1`] = `
|
|
3273
|
-
"import { $t, __bfText, createComponent, createEffect, createSignal, hydrate, provideContext } from '@barefootjs/client/runtime'
|
|
3273
|
+
"import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, provideContext } from '@barefootjs/client/runtime'
|
|
3274
3274
|
|
|
3275
3275
|
export function initTodoItem(__scope, _p = {}) {
|
|
3276
3276
|
if (!__scope) return
|
|
@@ -3286,7 +3286,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
3286
3286
|
|
|
3287
3287
|
}
|
|
3288
3288
|
|
|
3289
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
3289
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
3290
3290
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
3291
3291
|
export function initItem(__scope, _p = {}) {
|
|
3292
3292
|
if (!__scope) return
|
|
@@ -3302,7 +3302,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
3302
3302
|
|
|
3303
3303
|
}
|
|
3304
3304
|
|
|
3305
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
3305
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
3306
3306
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
3307
3307
|
function initDashboard() {}
|
|
3308
3308
|
|
|
@@ -3387,7 +3387,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
|
|
|
3387
3387
|
`;
|
|
3388
3388
|
|
|
3389
3389
|
exports[`docs/core/components/portals.md doc-examples L53 — (no label) 1`] = `
|
|
3390
|
-
"import { $, $t, __bfText, createComponent, createEffect, createPortal, createSignal, hydrate, isSSRPortal } from '@barefootjs/client/runtime'
|
|
3390
|
+
"import { $, $t, __bfText, createComponent, createEffect, createPortal, createSignal, escapeText, hydrate, isSSRPortal } from '@barefootjs/client/runtime'
|
|
3391
3391
|
|
|
3392
3392
|
|
|
3393
3393
|
export function initTooltip(__scope, _p = {}) {
|
|
@@ -3421,7 +3421,7 @@ export function initTooltip(__scope, _p = {}) {
|
|
|
3421
3421
|
if (_s2) (handleMount)(_s2)
|
|
3422
3422
|
}
|
|
3423
3423
|
|
|
3424
|
-
hydrate('Tooltip', { init: initTooltip, template: (_p) => \`<div><span bf="s0">\${_p.children}</span><div class="tooltip" bf="s2"><!--bf:s1-->\${_p.text}<!--/--></div></div>\` })
|
|
3424
|
+
hydrate('Tooltip', { init: initTooltip, template: (_p) => \`<div><span bf="s0">\${_p.children}</span><div class="tooltip" bf="s2"><!--bf:s1-->\${escapeText(_p.text)}<!--/--></div></div>\` })
|
|
3425
3425
|
export function Tooltip(_p, __bfKey) { return createComponent('Tooltip', _p, __bfKey) }"
|
|
3426
3426
|
`;
|
|
3427
3427
|
|
|
@@ -3492,7 +3492,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
|
|
|
3492
3492
|
`;
|
|
3493
3493
|
|
|
3494
3494
|
exports[`docs/core/components/props-type-safety.md doc-examples L16 — (no label) 1`] = `
|
|
3495
|
-
"import { $t, __bfText, createComponent, createEffect, hydrate } from '@barefootjs/client/runtime'
|
|
3495
|
+
"import { $t, __bfText, createComponent, createEffect, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
3496
3496
|
|
|
3497
3497
|
|
|
3498
3498
|
export function initGreeting(__scope, _p = {}) {
|
|
@@ -3515,7 +3515,7 @@ export function initGreeting(__scope, _p = {}) {
|
|
|
3515
3515
|
|
|
3516
3516
|
}
|
|
3517
3517
|
|
|
3518
|
-
hydrate('Greeting', { init: initGreeting, template: (_p) => \`<h1 bf="s2"><!--bf:s0-->\${_p.greeting ?? 'Hello'}<!--/-->, <!--bf:s1-->\${_p.name}<!--/--></h1>\` })
|
|
3518
|
+
hydrate('Greeting', { init: initGreeting, template: (_p) => \`<h1 bf="s2"><!--bf:s0-->\${escapeText(_p.greeting ?? 'Hello')}<!--/-->, <!--bf:s1-->\${escapeText(_p.name)}<!--/--></h1>\` })
|
|
3519
3519
|
export function Greeting(_p, __bfKey) { return createComponent('Greeting', _p, __bfKey) }"
|
|
3520
3520
|
`;
|
|
3521
3521
|
|
|
@@ -3538,11 +3538,11 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
|
|
|
3538
3538
|
`;
|
|
3539
3539
|
|
|
3540
3540
|
exports[`docs/core/components/props-type-safety.md doc-examples L54 — (no label) 1`] = `
|
|
3541
|
-
"import { createComponent, hydrate } from '@barefootjs/client/runtime'
|
|
3541
|
+
"import { createComponent, escapeAttr, hydrate } from '@barefootjs/client/runtime'
|
|
3542
3542
|
|
|
3543
3543
|
function initButton() {}
|
|
3544
3544
|
|
|
3545
|
-
hydrate('Button__b3c36eee', { init: initButton, template: (_p) => \`<button \${((\`btn btn-\${(_p.variant ?? 'default')} btn-\${(_p.size ?? 'md')} \${_p.className ?? ''}\`)) != null ? 'class="' + ((\`btn btn-\${(_p.variant ?? 'default')} btn-\${(_p.size ?? 'md')} \${_p.className ?? ''}\`)) + '"' : ''} bf="s0">\${_p.children}</button>\` })
|
|
3545
|
+
hydrate('Button__b3c36eee', { init: initButton, template: (_p) => \`<button \${((\`btn btn-\${(_p.variant ?? 'default')} btn-\${(_p.size ?? 'md')} \${_p.className ?? ''}\`)) != null ? 'class="' + escapeAttr((\`btn btn-\${(_p.variant ?? 'default')} btn-\${(_p.size ?? 'md')} \${_p.className ?? ''}\`)) + '"' : ''} bf="s0">\${_p.children}</button>\` })
|
|
3546
3546
|
export function Button(_p, __bfKey) { return createComponent('Button__b3c36eee', _p, __bfKey) }"
|
|
3547
3547
|
`;
|
|
3548
3548
|
|
|
@@ -3556,7 +3556,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
|
|
|
3556
3556
|
`;
|
|
3557
3557
|
|
|
3558
3558
|
exports[`docs/core/components/props-type-safety.md doc-examples L89 — (no label) 1`] = `
|
|
3559
|
-
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
3559
|
+
"import { $c, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
3560
3560
|
import '/* @bf-child:Card */'
|
|
3561
3561
|
|
|
3562
3562
|
export function initTodoItem(__scope, _p = {}) {
|
|
@@ -3573,7 +3573,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
3573
3573
|
|
|
3574
3574
|
}
|
|
3575
3575
|
|
|
3576
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
3576
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
3577
3577
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
3578
3578
|
export function initItem(__scope, _p = {}) {
|
|
3579
3579
|
if (!__scope) return
|
|
@@ -3589,7 +3589,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
3589
3589
|
|
|
3590
3590
|
}
|
|
3591
3591
|
|
|
3592
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
3592
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
3593
3593
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
3594
3594
|
function initDashboard() {}
|
|
3595
3595
|
|
|
@@ -3638,7 +3638,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
|
|
|
3638
3638
|
`;
|
|
3639
3639
|
|
|
3640
3640
|
exports[`docs/core/core-concepts/how-it-works.mdx doc-examples L33 — (no label) 1`] = `
|
|
3641
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
3641
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
3642
3642
|
|
|
3643
3643
|
|
|
3644
3644
|
export function initCounter(__scope, _p = {}) {
|
|
@@ -3659,7 +3659,7 @@ export function initCounter(__scope, _p = {}) {
|
|
|
3659
3659
|
if (_s1) _s1.addEventListener('click', () => { setCount(n => n + 1) })
|
|
3660
3660
|
}
|
|
3661
3661
|
|
|
3662
|
-
hydrate('Counter', { init: initCounter, template: (_p) => \`<button bf="s1"> Count: <!--bf:s0-->\${(0)}<!--/--></button>\` })
|
|
3662
|
+
hydrate('Counter', { init: initCounter, template: (_p) => \`<button bf="s1"> Count: <!--bf:s0-->\${escapeText((0))}<!--/--></button>\` })
|
|
3663
3663
|
export function Counter(_p, __bfKey) { return createComponent('Counter', _p, __bfKey) }"
|
|
3664
3664
|
`;
|
|
3665
3665
|
|
|
@@ -3686,7 +3686,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
|
|
|
3686
3686
|
`;
|
|
3687
3687
|
|
|
3688
3688
|
exports[`docs/core/core-concepts/mpa-style.md doc-examples L23 — (no label) 1`] = `
|
|
3689
|
-
"import { $, $c, $t, __bfText, createComponent, createEffect, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
3689
|
+
"import { $, $c, $t, __bfText, createComponent, createEffect, escapeAttr, escapeText, hydrate, initChild, renderChild } from '@barefootjs/client/runtime'
|
|
3690
3690
|
import '/* @bf-child:ReviewStars */'
|
|
3691
3691
|
import '/* @bf-child:AddToCart */'
|
|
3692
3692
|
|
|
@@ -3737,12 +3737,12 @@ export function initProductPage(__scope, _p = {}) {
|
|
|
3737
3737
|
initChild('AddToCart', _s6, { get productId() { return product.id } })
|
|
3738
3738
|
}
|
|
3739
3739
|
|
|
3740
|
-
hydrate('ProductPage', { init: initProductPage, template: (_p) => \`<div><h1 bf="s1"><!--bf:s0-->\${_p.product.name}<!--/--></h1><p bf="s3"><!--bf:s2-->\${_p.product.description}<!--/--></p><img \${(_p.product.image) != null ? 'src="' + (_p.product.image) + '"' : ''} bf="s4" />\${renderChild('ReviewStars', {rating: _p.product.rating}, undefined, 's5')}\${renderChild('AddToCart', {productId: _p.product.id}, undefined, 's6')}</div>\` })
|
|
3740
|
+
hydrate('ProductPage', { init: initProductPage, template: (_p) => \`<div><h1 bf="s1"><!--bf:s0-->\${escapeText(_p.product.name)}<!--/--></h1><p bf="s3"><!--bf:s2-->\${escapeText(_p.product.description)}<!--/--></p><img \${(_p.product.image) != null ? 'src="' + escapeAttr(_p.product.image) + '"' : ''} bf="s4" />\${renderChild('ReviewStars', {rating: _p.product.rating}, undefined, 's5')}\${renderChild('AddToCart', {productId: _p.product.id}, undefined, 's6')}</div>\` })
|
|
3741
3741
|
export function ProductPage(_p, __bfKey) { return createComponent('ProductPage', _p, __bfKey) }"
|
|
3742
3742
|
`;
|
|
3743
3743
|
|
|
3744
3744
|
exports[`docs/core/adapters/hono-adapter.md doc-examples L55 — (no label) 1`] = `
|
|
3745
|
-
"import { $t, __bfText, createComponent, createEffect, hydrate } from '@barefootjs/client/runtime'
|
|
3745
|
+
"import { $t, __bfText, createComponent, createEffect, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
3746
3746
|
|
|
3747
3747
|
|
|
3748
3748
|
export function initGreeting(__scope, _p = {}) {
|
|
@@ -3759,12 +3759,12 @@ export function initGreeting(__scope, _p = {}) {
|
|
|
3759
3759
|
|
|
3760
3760
|
}
|
|
3761
3761
|
|
|
3762
|
-
hydrate('Greeting', { init: initGreeting, template: (_p) => \`<h1 bf="s1">Hello, <!--bf:s0-->\${_p.name}<!--/-->!</h1>\` })
|
|
3762
|
+
hydrate('Greeting', { init: initGreeting, template: (_p) => \`<h1 bf="s1">Hello, <!--bf:s0-->\${escapeText(_p.name)}<!--/-->!</h1>\` })
|
|
3763
3763
|
export function Greeting(_p, __bfKey) { return createComponent('Greeting', _p, __bfKey) }"
|
|
3764
3764
|
`;
|
|
3765
3765
|
|
|
3766
3766
|
exports[`docs/core/adapters/hono-adapter.md doc-examples L82 — (no label) 1`] = `
|
|
3767
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
3767
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
3768
3768
|
|
|
3769
3769
|
|
|
3770
3770
|
export function initCounter(__scope, _p = {}) {
|
|
@@ -3789,7 +3789,7 @@ export function initCounter(__scope, _p = {}) {
|
|
|
3789
3789
|
if (_s2) _s2.addEventListener('click', () => { setCount(n => n + 1) })
|
|
3790
3790
|
}
|
|
3791
3791
|
|
|
3792
|
-
hydrate('Counter', { init: initCounter, template: (_p) => \`<div><span bf="s1">Count: <!--bf:s0-->\${(_p.initial ?? 0)}<!--/--></span><button bf="s2">+1</button></div>\` })
|
|
3792
|
+
hydrate('Counter', { init: initCounter, template: (_p) => \`<div><span bf="s1">Count: <!--bf:s0-->\${escapeText((_p.initial ?? 0))}<!--/--></span><button bf="s2">+1</button></div>\` })
|
|
3793
3793
|
export function Counter(_p, __bfKey) { return createComponent('Counter', _p, __bfKey) }"
|
|
3794
3794
|
`;
|
|
3795
3795
|
|
|
@@ -3816,7 +3816,7 @@ export function Layout(_p, __bfKey) { return createComponent('Layout', _p, __bfK
|
|
|
3816
3816
|
`;
|
|
3817
3817
|
|
|
3818
3818
|
exports[`docs/core/adapters/hono-adapter.md doc-examples L167 — (no label) 1`] = `
|
|
3819
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, insert } from '@barefootjs/client/runtime'
|
|
3819
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, insert } from '@barefootjs/client/runtime'
|
|
3820
3820
|
|
|
3821
3821
|
export function initTodoItem(__scope, _p = {}) {
|
|
3822
3822
|
if (!__scope) return
|
|
@@ -3832,7 +3832,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
3832
3832
|
|
|
3833
3833
|
}
|
|
3834
3834
|
|
|
3835
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
3835
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
3836
3836
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
3837
3837
|
export function initItem(__scope, _p = {}) {
|
|
3838
3838
|
if (!__scope) return
|
|
@@ -3848,7 +3848,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
3848
3848
|
|
|
3849
3849
|
}
|
|
3850
3850
|
|
|
3851
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
3851
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
3852
3852
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
3853
3853
|
function initDashboard() {}
|
|
3854
3854
|
|
|
@@ -3886,7 +3886,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
3886
3886
|
`;
|
|
3887
3887
|
|
|
3888
3888
|
exports[`docs/core/adapters/hono-adapter.md doc-examples L171 — (no label) 1`] = `
|
|
3889
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, insert } from '@barefootjs/client/runtime'
|
|
3889
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, insert } from '@barefootjs/client/runtime'
|
|
3890
3890
|
|
|
3891
3891
|
export function initTodoItem(__scope, _p = {}) {
|
|
3892
3892
|
if (!__scope) return
|
|
@@ -3902,7 +3902,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
3902
3902
|
|
|
3903
3903
|
}
|
|
3904
3904
|
|
|
3905
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
3905
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
3906
3906
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
3907
3907
|
export function initItem(__scope, _p = {}) {
|
|
3908
3908
|
if (!__scope) return
|
|
@@ -3918,7 +3918,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
3918
3918
|
|
|
3919
3919
|
}
|
|
3920
3920
|
|
|
3921
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
3921
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
3922
3922
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
3923
3923
|
function initDashboard() {}
|
|
3924
3924
|
|
|
@@ -3956,7 +3956,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
3956
3956
|
`;
|
|
3957
3957
|
|
|
3958
3958
|
exports[`docs/core/adapters/hono-adapter.md doc-examples L177 — (no label) 1`] = `
|
|
3959
|
-
"import { $, $t, __bfSlot, __bfText, createComponent, createEffect, createSignal, hydrate, insert } from '@barefootjs/client/runtime'
|
|
3959
|
+
"import { $, $t, __bfSlot, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, insert } from '@barefootjs/client/runtime'
|
|
3960
3960
|
|
|
3961
3961
|
export function initTodoItem(__scope, _p = {}) {
|
|
3962
3962
|
if (!__scope) return
|
|
@@ -3972,7 +3972,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
3972
3972
|
|
|
3973
3973
|
}
|
|
3974
3974
|
|
|
3975
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
3975
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
3976
3976
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
3977
3977
|
export function initItem(__scope, _p = {}) {
|
|
3978
3978
|
if (!__scope) return
|
|
@@ -3988,7 +3988,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
3988
3988
|
|
|
3989
3989
|
}
|
|
3990
3990
|
|
|
3991
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
3991
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
3992
3992
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
3993
3993
|
function initDashboard() {}
|
|
3994
3994
|
|
|
@@ -4026,7 +4026,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
4026
4026
|
`;
|
|
4027
4027
|
|
|
4028
4028
|
exports[`docs/core/adapters/hono-adapter.md doc-examples L190 — (no label) 1`] = `
|
|
4029
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
|
|
4029
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, mapArray } from '@barefootjs/client/runtime'
|
|
4030
4030
|
|
|
4031
4031
|
export function initTodoItem(__scope, _p = {}) {
|
|
4032
4032
|
if (!__scope) return
|
|
@@ -4042,7 +4042,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
4042
4042
|
|
|
4043
4043
|
}
|
|
4044
4044
|
|
|
4045
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
4045
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
4046
4046
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
4047
4047
|
export function initItem(__scope, _p = {}) {
|
|
4048
4048
|
if (!__scope) return
|
|
@@ -4058,7 +4058,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
4058
4058
|
|
|
4059
4059
|
}
|
|
4060
4060
|
|
|
4061
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
4061
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
4062
4062
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
4063
4063
|
function initDashboard() {}
|
|
4064
4064
|
|
|
@@ -4080,7 +4080,7 @@ export function initExample(__scope, _p = {}) {
|
|
|
4080
4080
|
const [_s1] = $(__scope, 's1')
|
|
4081
4081
|
|
|
4082
4082
|
mapArray(() => items(), _s1, (item) => String(item), (item, __idx, __existing) => {
|
|
4083
|
-
const __el = __existing ?? (() => { const __tpl = document.createElement('template'); __tpl.innerHTML = \`<li data-key="\${item()}"><!--bf:s0-->\${item()}<!--/--></li>\`; return __tpl.content.firstElementChild.cloneNode(true) })()
|
|
4083
|
+
const __el = __existing ?? (() => { const __tpl = document.createElement('template'); __tpl.innerHTML = \`<li data-key="\${item()}"><!--bf:s0-->\${escapeText(item())}<!--/--></li>\`; return __tpl.content.firstElementChild.cloneNode(true) })()
|
|
4084
4084
|
{ const [__rt_s0] = $t(__el, 's0')
|
|
4085
4085
|
if (__rt_s0) createEffect(() => { __rt_s0.textContent = String(item()) }) }
|
|
4086
4086
|
return __el
|
|
@@ -4088,12 +4088,12 @@ export function initExample(__scope, _p = {}) {
|
|
|
4088
4088
|
|
|
4089
4089
|
}
|
|
4090
4090
|
|
|
4091
|
-
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${([]).map((item) => \`<li data-key="\${item}"><!--bf:s0-->\${item}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4091
|
+
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${([]).map((item) => \`<li data-key="\${item}"><!--bf:s0-->\${escapeText(item)}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4092
4092
|
export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
|
|
4093
4093
|
`;
|
|
4094
4094
|
|
|
4095
4095
|
exports[`docs/core/adapters/go-template-adapter.md doc-examples L50 — (no label) 1`] = `
|
|
4096
|
-
"import { $t, __bfText, createComponent, createEffect, hydrate } from '@barefootjs/client/runtime'
|
|
4096
|
+
"import { $t, __bfText, createComponent, createEffect, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
4097
4097
|
|
|
4098
4098
|
|
|
4099
4099
|
export function initGreeting(__scope, _p = {}) {
|
|
@@ -4110,12 +4110,12 @@ export function initGreeting(__scope, _p = {}) {
|
|
|
4110
4110
|
|
|
4111
4111
|
}
|
|
4112
4112
|
|
|
4113
|
-
hydrate('Greeting', { init: initGreeting, template: (_p) => \`<p bf="s1">Hello, <!--bf:s0-->\${_p.name}<!--/-->!</p>\` })
|
|
4113
|
+
hydrate('Greeting', { init: initGreeting, template: (_p) => \`<p bf="s1">Hello, <!--bf:s0-->\${escapeText(_p.name)}<!--/-->!</p>\` })
|
|
4114
4114
|
export function Greeting(_p, __bfKey) { return createComponent('Greeting', _p, __bfKey) }"
|
|
4115
4115
|
`;
|
|
4116
4116
|
|
|
4117
4117
|
exports[`docs/core/adapters/go-template-adapter.md doc-examples L74 — (no label) 1`] = `
|
|
4118
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
4118
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
4119
4119
|
|
|
4120
4120
|
|
|
4121
4121
|
export function initCounter(__scope, _p = {}) {
|
|
@@ -4140,12 +4140,12 @@ export function initCounter(__scope, _p = {}) {
|
|
|
4140
4140
|
if (_s2) _s2.addEventListener('click', () => { setCount(n => n + 1) })
|
|
4141
4141
|
}
|
|
4142
4142
|
|
|
4143
|
-
hydrate('Counter', { init: initCounter, template: (_p) => \`<div><span bf="s1">Count: <!--bf:s0-->\${(_p.initial ?? 0)}<!--/--></span><button bf="s2">+1</button></div>\` })
|
|
4143
|
+
hydrate('Counter', { init: initCounter, template: (_p) => \`<div><span bf="s1">Count: <!--bf:s0-->\${escapeText((_p.initial ?? 0))}<!--/--></span><button bf="s2">+1</button></div>\` })
|
|
4144
4144
|
export function Counter(_p, __bfKey) { return createComponent('Counter', _p, __bfKey) }"
|
|
4145
4145
|
`;
|
|
4146
4146
|
|
|
4147
4147
|
exports[`docs/core/adapters/go-template-adapter.md doc-examples L147 — (no label) 1`] = `
|
|
4148
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
|
|
4148
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, mapArray } from '@barefootjs/client/runtime'
|
|
4149
4149
|
|
|
4150
4150
|
export function initTodoItem(__scope, _p = {}) {
|
|
4151
4151
|
if (!__scope) return
|
|
@@ -4161,7 +4161,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
4161
4161
|
|
|
4162
4162
|
}
|
|
4163
4163
|
|
|
4164
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
4164
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
4165
4165
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
4166
4166
|
export function initItem(__scope, _p = {}) {
|
|
4167
4167
|
if (!__scope) return
|
|
@@ -4177,7 +4177,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
4177
4177
|
|
|
4178
4178
|
}
|
|
4179
4179
|
|
|
4180
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
4180
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
4181
4181
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
4182
4182
|
function initDashboard() {}
|
|
4183
4183
|
|
|
@@ -4199,7 +4199,7 @@ export function initExample(__scope, _p = {}) {
|
|
|
4199
4199
|
const [_s1] = $(__scope, 's1')
|
|
4200
4200
|
|
|
4201
4201
|
mapArray(() => items(), _s1, (item) => String(item), (item, __idx, __existing) => {
|
|
4202
|
-
const __el = __existing ?? (() => { const __tpl = document.createElement('template'); __tpl.innerHTML = \`<li data-key="\${item()}"><!--bf:s0-->\${item()}<!--/--></li>\`; return __tpl.content.firstElementChild.cloneNode(true) })()
|
|
4202
|
+
const __el = __existing ?? (() => { const __tpl = document.createElement('template'); __tpl.innerHTML = \`<li data-key="\${item()}"><!--bf:s0-->\${escapeText(item())}<!--/--></li>\`; return __tpl.content.firstElementChild.cloneNode(true) })()
|
|
4203
4203
|
{ const [__rt_s0] = $t(__el, 's0')
|
|
4204
4204
|
if (__rt_s0) createEffect(() => { __rt_s0.textContent = String(item()) }) }
|
|
4205
4205
|
return __el
|
|
@@ -4207,12 +4207,12 @@ export function initExample(__scope, _p = {}) {
|
|
|
4207
4207
|
|
|
4208
4208
|
}
|
|
4209
4209
|
|
|
4210
|
-
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${([]).map((item) => \`<li data-key="\${item}"><!--bf:s0-->\${item}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4210
|
+
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${([]).map((item) => \`<li data-key="\${item}"><!--bf:s0-->\${escapeText(item)}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4211
4211
|
export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
|
|
4212
4212
|
`;
|
|
4213
4213
|
|
|
4214
4214
|
exports[`docs/core/adapters/go-template-adapter.md doc-examples L159 — (no label) 1`] = `
|
|
4215
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
|
|
4215
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, mapArray } from '@barefootjs/client/runtime'
|
|
4216
4216
|
|
|
4217
4217
|
export function initTodoItem(__scope, _p = {}) {
|
|
4218
4218
|
if (!__scope) return
|
|
@@ -4228,7 +4228,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
4228
4228
|
|
|
4229
4229
|
}
|
|
4230
4230
|
|
|
4231
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
4231
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
4232
4232
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
4233
4233
|
export function initItem(__scope, _p = {}) {
|
|
4234
4234
|
if (!__scope) return
|
|
@@ -4244,7 +4244,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
4244
4244
|
|
|
4245
4245
|
}
|
|
4246
4246
|
|
|
4247
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
4247
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
4248
4248
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
4249
4249
|
function initDashboard() {}
|
|
4250
4250
|
|
|
@@ -4266,7 +4266,7 @@ export function initExample(__scope, _p = {}) {
|
|
|
4266
4266
|
const [_s1] = $(__scope, 's1')
|
|
4267
4267
|
|
|
4268
4268
|
mapArray(() => items().filter(item => item.active), _s1, (item) => String(item.id), (item, __idx, __existing) => {
|
|
4269
|
-
const __el = __existing ?? (() => { const __tpl = document.createElement('template'); __tpl.innerHTML = \`<li data-key="\${item().id}"><!--bf:s0-->\${item().name}<!--/--></li>\`; return __tpl.content.firstElementChild.cloneNode(true) })()
|
|
4269
|
+
const __el = __existing ?? (() => { const __tpl = document.createElement('template'); __tpl.innerHTML = \`<li data-key="\${item().id}"><!--bf:s0-->\${escapeText(item().name)}<!--/--></li>\`; return __tpl.content.firstElementChild.cloneNode(true) })()
|
|
4270
4270
|
{ const [__rt_s0] = $t(__el, 's0')
|
|
4271
4271
|
if (__rt_s0) createEffect(() => { __rt_s0.textContent = String(item().name) }) }
|
|
4272
4272
|
return __el
|
|
@@ -4274,12 +4274,12 @@ export function initExample(__scope, _p = {}) {
|
|
|
4274
4274
|
|
|
4275
4275
|
}
|
|
4276
4276
|
|
|
4277
|
-
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${([]).filter(item => item.active).map((item) => \`<li data-key="\${item.id}"><!--bf:s0-->\${item.name}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4277
|
+
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${([]).filter(item => item.active).map((item) => \`<li data-key="\${item.id}"><!--bf:s0-->\${escapeText(item.name)}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4278
4278
|
export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
|
|
4279
4279
|
`;
|
|
4280
4280
|
|
|
4281
4281
|
exports[`docs/core/adapters/go-template-adapter.md doc-examples L173 — (no label) 1`] = `
|
|
4282
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
4282
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
4283
4283
|
|
|
4284
4284
|
export function initTodoItem(__scope, _p = {}) {
|
|
4285
4285
|
if (!__scope) return
|
|
@@ -4295,7 +4295,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
4295
4295
|
|
|
4296
4296
|
}
|
|
4297
4297
|
|
|
4298
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
4298
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
4299
4299
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
4300
4300
|
export function initItem(__scope, _p = {}) {
|
|
4301
4301
|
if (!__scope) return
|
|
@@ -4311,7 +4311,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
4311
4311
|
|
|
4312
4312
|
}
|
|
4313
4313
|
|
|
4314
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
4314
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
4315
4315
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
4316
4316
|
function initDashboard() {}
|
|
4317
4317
|
|
|
@@ -4345,7 +4345,7 @@ export function initExample(__scope, _p = {}) {
|
|
|
4345
4345
|
|
|
4346
4346
|
}
|
|
4347
4347
|
|
|
4348
|
-
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${items.toSorted((a, b) => a.priority - b.priority).map((t) => \`<li data-key="\${t.id}"><!--bf:s0-->\${t.name}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4348
|
+
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${items.toSorted((a, b) => a.priority - b.priority).map((t) => \`<li data-key="\${t.id}"><!--bf:s0-->\${escapeText(t.name)}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4349
4349
|
export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
|
|
4350
4350
|
`;
|
|
4351
4351
|
|
|
@@ -4374,7 +4374,7 @@ export function TodoList(_p, __bfKey) { return createComponent('TodoList', _p, _
|
|
|
4374
4374
|
`;
|
|
4375
4375
|
|
|
4376
4376
|
exports[`docs/core/adapters/go-template-adapter.md doc-examples L231 — (no label) 1`] = `
|
|
4377
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, insert } from '@barefootjs/client/runtime'
|
|
4377
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, insert } from '@barefootjs/client/runtime'
|
|
4378
4378
|
|
|
4379
4379
|
export function initTodoItem(__scope, _p = {}) {
|
|
4380
4380
|
if (!__scope) return
|
|
@@ -4390,7 +4390,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
4390
4390
|
|
|
4391
4391
|
}
|
|
4392
4392
|
|
|
4393
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
4393
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
4394
4394
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
4395
4395
|
export function initItem(__scope, _p = {}) {
|
|
4396
4396
|
if (!__scope) return
|
|
@@ -4406,7 +4406,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
4406
4406
|
|
|
4407
4407
|
}
|
|
4408
4408
|
|
|
4409
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
4409
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
4410
4410
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
4411
4411
|
function initDashboard() {}
|
|
4412
4412
|
|
|
@@ -4444,7 +4444,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
4444
4444
|
`;
|
|
4445
4445
|
|
|
4446
4446
|
exports[`docs/core/adapters/custom-adapter.md doc-examples L169 — (no label) 1`] = `
|
|
4447
|
-
"import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
4447
|
+
"import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
4448
4448
|
|
|
4449
4449
|
export function initTodoItem(__scope, _p = {}) {
|
|
4450
4450
|
if (!__scope) return
|
|
@@ -4460,7 +4460,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
4460
4460
|
|
|
4461
4461
|
}
|
|
4462
4462
|
|
|
4463
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
4463
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
4464
4464
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
4465
4465
|
export function initItem(__scope, _p = {}) {
|
|
4466
4466
|
if (!__scope) return
|
|
@@ -4476,7 +4476,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
4476
4476
|
|
|
4477
4477
|
}
|
|
4478
4478
|
|
|
4479
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
4479
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
4480
4480
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
4481
4481
|
function initDashboard() {}
|
|
4482
4482
|
|
|
@@ -4502,7 +4502,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
4502
4502
|
`;
|
|
4503
4503
|
|
|
4504
4504
|
exports[`docs/core/adapters/custom-adapter.md doc-examples L174 — (no label) 1`] = `
|
|
4505
|
-
"import { $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
4505
|
+
"import { $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
4506
4506
|
|
|
4507
4507
|
export function initTodoItem(__scope, _p = {}) {
|
|
4508
4508
|
if (!__scope) return
|
|
@@ -4518,7 +4518,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
4518
4518
|
|
|
4519
4519
|
}
|
|
4520
4520
|
|
|
4521
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
4521
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
4522
4522
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
4523
4523
|
export function initItem(__scope, _p = {}) {
|
|
4524
4524
|
if (!__scope) return
|
|
@@ -4534,7 +4534,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
4534
4534
|
|
|
4535
4535
|
}
|
|
4536
4536
|
|
|
4537
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
4537
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
4538
4538
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
4539
4539
|
function initDashboard() {}
|
|
4540
4540
|
|
|
@@ -4560,7 +4560,7 @@ export function Example(_p, __bfKey) { return createComponent('Example', _p, __b
|
|
|
4560
4560
|
`;
|
|
4561
4561
|
|
|
4562
4562
|
exports[`docs/core/adapters/custom-adapter.md doc-examples L195 — (no label) 1`] = `
|
|
4563
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
4563
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
4564
4564
|
|
|
4565
4565
|
export function initTodoItem(__scope, _p = {}) {
|
|
4566
4566
|
if (!__scope) return
|
|
@@ -4576,7 +4576,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
4576
4576
|
|
|
4577
4577
|
}
|
|
4578
4578
|
|
|
4579
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
4579
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
4580
4580
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
4581
4581
|
export function initItem(__scope, _p = {}) {
|
|
4582
4582
|
if (!__scope) return
|
|
@@ -4592,7 +4592,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
4592
4592
|
|
|
4593
4593
|
}
|
|
4594
4594
|
|
|
4595
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
4595
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
4596
4596
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
4597
4597
|
function initDashboard() {}
|
|
4598
4598
|
|
|
@@ -4626,12 +4626,12 @@ export function initExample(__scope, _p = {}) {
|
|
|
4626
4626
|
|
|
4627
4627
|
}
|
|
4628
4628
|
|
|
4629
|
-
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${items.map((item) => \`<li data-key="\${item.id}"><!--bf:s0-->\${item.name}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4629
|
+
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${items.map((item) => \`<li data-key="\${item.id}"><!--bf:s0-->\${escapeText(item.name)}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4630
4630
|
export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
|
|
4631
4631
|
`;
|
|
4632
4632
|
|
|
4633
4633
|
exports[`docs/core/adapters/custom-adapter.md doc-examples L200 — (no label) 1`] = `
|
|
4634
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
4634
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
4635
4635
|
|
|
4636
4636
|
export function initTodoItem(__scope, _p = {}) {
|
|
4637
4637
|
if (!__scope) return
|
|
@@ -4647,7 +4647,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
4647
4647
|
|
|
4648
4648
|
}
|
|
4649
4649
|
|
|
4650
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
4650
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
4651
4651
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
4652
4652
|
export function initItem(__scope, _p = {}) {
|
|
4653
4653
|
if (!__scope) return
|
|
@@ -4663,7 +4663,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
4663
4663
|
|
|
4664
4664
|
}
|
|
4665
4665
|
|
|
4666
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
4666
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
4667
4667
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
4668
4668
|
function initDashboard() {}
|
|
4669
4669
|
|
|
@@ -4697,7 +4697,7 @@ export function initExample(__scope, _p = {}) {
|
|
|
4697
4697
|
|
|
4698
4698
|
}
|
|
4699
4699
|
|
|
4700
|
-
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${items.map((item) => \`<li data-key="\${item.id}"><!--bf:s0-->\${item.name}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4700
|
+
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${items.map((item) => \`<li data-key="\${item.id}"><!--bf:s0-->\${escapeText(item.name)}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4701
4701
|
export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
|
|
4702
4702
|
`;
|
|
4703
4703
|
|
|
@@ -4711,7 +4711,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
|
|
|
4711
4711
|
`;
|
|
4712
4712
|
|
|
4713
4713
|
exports[`docs/core/advanced/compiler-internals.md doc-examples L126 — (no label) 1`] = `
|
|
4714
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
|
|
4714
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, mapArray } from '@barefootjs/client/runtime'
|
|
4715
4715
|
|
|
4716
4716
|
export function initTodoItem(__scope, _p = {}) {
|
|
4717
4717
|
if (!__scope) return
|
|
@@ -4727,7 +4727,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
4727
4727
|
|
|
4728
4728
|
}
|
|
4729
4729
|
|
|
4730
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
4730
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
4731
4731
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
4732
4732
|
export function initItem(__scope, _p = {}) {
|
|
4733
4733
|
if (!__scope) return
|
|
@@ -4743,7 +4743,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
4743
4743
|
|
|
4744
4744
|
}
|
|
4745
4745
|
|
|
4746
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
4746
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
4747
4747
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
4748
4748
|
function initDashboard() {}
|
|
4749
4749
|
|
|
@@ -4765,7 +4765,7 @@ export function initExample(__scope, _p = {}) {
|
|
|
4765
4765
|
const [_s1] = $(__scope, 's1')
|
|
4766
4766
|
|
|
4767
4767
|
mapArray(() => todos().filter(t => !t.done).toSorted((a, b) => a.date - b.date), _s1, (t) => String(t.id), (t, __idx, __existing) => {
|
|
4768
|
-
const __el = __existing ?? (() => { const __tpl = document.createElement('template'); __tpl.innerHTML = \`<li data-key="\${t().id}"><!--bf:s0-->\${t().name}<!--/--></li>\`; return __tpl.content.firstElementChild.cloneNode(true) })()
|
|
4768
|
+
const __el = __existing ?? (() => { const __tpl = document.createElement('template'); __tpl.innerHTML = \`<li data-key="\${t().id}"><!--bf:s0-->\${escapeText(t().name)}<!--/--></li>\`; return __tpl.content.firstElementChild.cloneNode(true) })()
|
|
4769
4769
|
{ const [__rt_s0] = $t(__el, 's0')
|
|
4770
4770
|
if (__rt_s0) createEffect(() => { __rt_s0.textContent = String(t().name) }) }
|
|
4771
4771
|
return __el
|
|
@@ -4773,7 +4773,7 @@ export function initExample(__scope, _p = {}) {
|
|
|
4773
4773
|
|
|
4774
4774
|
}
|
|
4775
4775
|
|
|
4776
|
-
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${([]).filter(t => !t.done).toSorted((a, b) => a.date - b.date).map((t) => \`<li data-key="\${t.id}"><!--bf:s0-->\${t.name}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4776
|
+
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${([]).filter(t => !t.done).toSorted((a, b) => a.date - b.date).map((t) => \`<li data-key="\${t.id}"><!--bf:s0-->\${escapeText(t.name)}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4777
4777
|
export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
|
|
4778
4778
|
`;
|
|
4779
4779
|
|
|
@@ -4840,7 +4840,7 @@ export function StatementExample(_p, __bfKey) { return createComponent('Statemen
|
|
|
4840
4840
|
`;
|
|
4841
4841
|
|
|
4842
4842
|
exports[`docs/core/advanced/performance.md doc-examples L67 — ✅ Stable key — DOM nodes reused when list changes 1`] = `
|
|
4843
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
|
|
4843
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, mapArray } from '@barefootjs/client/runtime'
|
|
4844
4844
|
|
|
4845
4845
|
export function initTodoItem(__scope, _p = {}) {
|
|
4846
4846
|
if (!__scope) return
|
|
@@ -4856,7 +4856,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
4856
4856
|
|
|
4857
4857
|
}
|
|
4858
4858
|
|
|
4859
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
4859
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
4860
4860
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
4861
4861
|
export function initItem(__scope, _p = {}) {
|
|
4862
4862
|
if (!__scope) return
|
|
@@ -4872,7 +4872,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
4872
4872
|
|
|
4873
4873
|
}
|
|
4874
4874
|
|
|
4875
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
4875
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
4876
4876
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
4877
4877
|
function initDashboard() {}
|
|
4878
4878
|
|
|
@@ -4894,7 +4894,7 @@ export function initExample(__scope, _p = {}) {
|
|
|
4894
4894
|
const [_s1] = $(__scope, 's1')
|
|
4895
4895
|
|
|
4896
4896
|
mapArray(() => items(), _s1, (item) => String(item.id), (item, __idx, __existing) => {
|
|
4897
|
-
const __el = __existing ?? (() => { const __tpl = document.createElement('template'); __tpl.innerHTML = \`<li data-key="\${item().id}"><!--bf:s0-->\${item().name}<!--/--></li>\`; return __tpl.content.firstElementChild.cloneNode(true) })()
|
|
4897
|
+
const __el = __existing ?? (() => { const __tpl = document.createElement('template'); __tpl.innerHTML = \`<li data-key="\${item().id}"><!--bf:s0-->\${escapeText(item().name)}<!--/--></li>\`; return __tpl.content.firstElementChild.cloneNode(true) })()
|
|
4898
4898
|
{ const [__rt_s0] = $t(__el, 's0')
|
|
4899
4899
|
if (__rt_s0) createEffect(() => { __rt_s0.textContent = String(item().name) }) }
|
|
4900
4900
|
return __el
|
|
@@ -4902,12 +4902,12 @@ export function initExample(__scope, _p = {}) {
|
|
|
4902
4902
|
|
|
4903
4903
|
}
|
|
4904
4904
|
|
|
4905
|
-
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${([]).map((item) => \`<li data-key="\${item.id}"><!--bf:s0-->\${item.name}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4905
|
+
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${([]).map((item) => \`<li data-key="\${item.id}"><!--bf:s0-->\${escapeText(item.name)}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4906
4906
|
export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
|
|
4907
4907
|
`;
|
|
4908
4908
|
|
|
4909
4909
|
exports[`docs/core/advanced/performance.md doc-examples L70 — ❌ Index key — DOM nodes recreated on reorder 1`] = `
|
|
4910
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate, mapArray } from '@barefootjs/client/runtime'
|
|
4910
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate, mapArray } from '@barefootjs/client/runtime'
|
|
4911
4911
|
|
|
4912
4912
|
export function initTodoItem(__scope, _p = {}) {
|
|
4913
4913
|
if (!__scope) return
|
|
@@ -4923,7 +4923,7 @@ export function initTodoItem(__scope, _p = {}) {
|
|
|
4923
4923
|
|
|
4924
4924
|
}
|
|
4925
4925
|
|
|
4926
|
-
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.todo)}<!--/--></li>\` })
|
|
4926
|
+
hydrate('TodoItem__b3c36eee', { init: initTodoItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.todo))}<!--/--></li>\` })
|
|
4927
4927
|
export function TodoItem(_p, __bfKey) { return createComponent('TodoItem__b3c36eee', _p, __bfKey) }
|
|
4928
4928
|
export function initItem(__scope, _p = {}) {
|
|
4929
4929
|
if (!__scope) return
|
|
@@ -4939,7 +4939,7 @@ export function initItem(__scope, _p = {}) {
|
|
|
4939
4939
|
|
|
4940
4940
|
}
|
|
4941
4941
|
|
|
4942
|
-
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${String(_p.item)}<!--/--></li>\` })
|
|
4942
|
+
hydrate('Item__b3c36eee', { init: initItem, template: (_p) => \`<li bf="s1"><!--bf:s0-->\${escapeText(String(_p.item))}<!--/--></li>\` })
|
|
4943
4943
|
export function Item(_p, __bfKey) { return createComponent('Item__b3c36eee', _p, __bfKey) }
|
|
4944
4944
|
function initDashboard() {}
|
|
4945
4945
|
|
|
@@ -4961,7 +4961,7 @@ export function initExample(__scope, _p = {}) {
|
|
|
4961
4961
|
const [_s1] = $(__scope, 's1')
|
|
4962
4962
|
|
|
4963
4963
|
mapArray(() => items(), _s1, (item, i) => String(i), (item, i, __existing) => {
|
|
4964
|
-
const __el = __existing ?? (() => { const __tpl = document.createElement('template'); __tpl.innerHTML = \`<li data-key="\${i}"><!--bf:s0-->\${item().name}<!--/--></li>\`; return __tpl.content.firstElementChild.cloneNode(true) })()
|
|
4964
|
+
const __el = __existing ?? (() => { const __tpl = document.createElement('template'); __tpl.innerHTML = \`<li data-key="\${i}"><!--bf:s0-->\${escapeText(item().name)}<!--/--></li>\`; return __tpl.content.firstElementChild.cloneNode(true) })()
|
|
4965
4965
|
{ const [__rt_s0] = $t(__el, 's0')
|
|
4966
4966
|
if (__rt_s0) createEffect(() => { __rt_s0.textContent = String(item().name) }) }
|
|
4967
4967
|
return __el
|
|
@@ -4969,7 +4969,7 @@ export function initExample(__scope, _p = {}) {
|
|
|
4969
4969
|
|
|
4970
4970
|
}
|
|
4971
4971
|
|
|
4972
|
-
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${([]).map((item, i) => \`<li data-key="\${i}"><!--bf:s0-->\${item.name}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4972
|
+
hydrate('Example', { init: initExample, template: (_p) => \`<div bf="s1"><!--bf-loop:l0-->\${([]).map((item, i) => \`<li data-key="\${i}"><!--bf:s0-->\${escapeText(item.name)}<!--/--></li>\`).join('')}<!--bf-/loop:l0--></div>\` })
|
|
4973
4973
|
export function Example(_p, __bfKey) { return createComponent('Example', _p, __bfKey) }"
|
|
4974
4974
|
`;
|
|
4975
4975
|
|
|
@@ -5181,7 +5181,7 @@ export function TimelineBar(_p, __bfKey) { return createComponent('TimelineBar',
|
|
|
5181
5181
|
`;
|
|
5182
5182
|
|
|
5183
5183
|
exports[`docs/core/introduction.mdx doc-examples L15 — (no label) 1`] = `
|
|
5184
|
-
"import { $, $t, __bfText, createComponent, createEffect, createSignal, hydrate } from '@barefootjs/client/runtime'
|
|
5184
|
+
"import { $, $t, __bfText, createComponent, createEffect, createSignal, escapeText, hydrate } from '@barefootjs/client/runtime'
|
|
5185
5185
|
|
|
5186
5186
|
|
|
5187
5187
|
export function initCounter(__scope, _p = {}) {
|
|
@@ -5202,6 +5202,6 @@ export function initCounter(__scope, _p = {}) {
|
|
|
5202
5202
|
if (_s1) _s1.addEventListener('click', () => { setCount(n => n + 1) })
|
|
5203
5203
|
}
|
|
5204
5204
|
|
|
5205
|
-
hydrate('Counter', { init: initCounter, template: (_p) => \`<button bf="s1"> Count: <!--bf:s0-->\${(0)}<!--/--></button>\` })
|
|
5205
|
+
hydrate('Counter', { init: initCounter, template: (_p) => \`<button bf="s1"> Count: <!--bf:s0-->\${escapeText((0))}<!--/--></button>\` })
|
|
5206
5206
|
export function Counter(_p, __bfKey) { return createComponent('Counter', _p, __bfKey) }"
|
|
5207
5207
|
`;
|