ripple 0.4.1 → 0.4.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.
Files changed (96) hide show
  1. package/CHANGELOG.md +162 -0
  2. package/package.json +9 -3
  3. package/src/constants.js +4 -0
  4. package/src/jsx-runtime.d.ts +2 -1
  5. package/src/runtime/array.js +15 -9
  6. package/src/runtime/index-client.js +25 -7
  7. package/src/runtime/index-server.js +1 -0
  8. package/src/runtime/internal/client/attributes.js +313 -0
  9. package/src/runtime/internal/client/blocks.js +4 -14
  10. package/src/runtime/internal/client/component.js +2 -5
  11. package/src/runtime/internal/client/composite.js +14 -6
  12. package/src/runtime/internal/client/constants.js +12 -6
  13. package/src/runtime/internal/client/context.js +3 -2
  14. package/src/runtime/internal/client/css.js +11 -26
  15. package/src/runtime/internal/client/errors.js +188 -0
  16. package/src/runtime/internal/client/events.js +79 -34
  17. package/src/runtime/internal/client/expression.js +21 -116
  18. package/src/runtime/internal/client/for.js +272 -222
  19. package/src/runtime/internal/client/head.js +4 -3
  20. package/src/runtime/internal/client/html.js +5 -3
  21. package/src/runtime/internal/client/hydrate.js +484 -0
  22. package/src/runtime/internal/client/hydration-enabled.js +7 -0
  23. package/src/runtime/internal/client/hydration.js +16 -97
  24. package/src/runtime/internal/client/if.js +13 -9
  25. package/src/runtime/internal/client/index.js +16 -8
  26. package/src/runtime/internal/client/operations.js +12 -9
  27. package/src/runtime/internal/client/portal.js +3 -2
  28. package/src/runtime/internal/client/render.js +75 -321
  29. package/src/runtime/internal/client/root-boundary-enabled.js +7 -0
  30. package/src/runtime/internal/client/runtime.js +129 -362
  31. package/src/runtime/internal/client/template-ns.js +47 -0
  32. package/src/runtime/internal/client/template.js +63 -140
  33. package/src/runtime/internal/client/track-async.js +356 -0
  34. package/src/runtime/internal/client/try.js +133 -319
  35. package/src/runtime/internal/client/types.d.ts +48 -24
  36. package/src/runtime/internal/server/index.js +38 -33
  37. package/src/runtime/internal/server/prerender.js +27 -0
  38. package/src/server/index.js +1 -0
  39. package/src/utils/class-name.js +28 -0
  40. package/tests/client/basic/basic.errors.test.tsrx +3 -3
  41. package/tests/client/compiler/__snapshots__/compiler.typescript.test.tsrx.snap +0 -2
  42. package/tests/client/compiler/compiler.basic.test.tsrx +4 -4
  43. package/tests/client/compiler/compiler.tracked-access.test.tsrx +3 -3
  44. package/tests/client/composite/composite.props.test.tsrx +10 -10
  45. package/tests/client/derived-release.test.tsrx +3 -3
  46. package/tests/client/for-item.test.tsrx +443 -0
  47. package/tests/client/for-selector.test.tsrx +95 -0
  48. package/tests/hydration/compiled/client/basic.js +97 -123
  49. package/tests/hydration/compiled/client/composite.js +5 -5
  50. package/tests/hydration/compiled/client/events.js +84 -79
  51. package/tests/hydration/compiled/client/for.js +229 -233
  52. package/tests/hydration/compiled/client/fragment-cursor.js +781 -481
  53. package/tests/hydration/compiled/client/head.js +23 -26
  54. package/tests/hydration/compiled/client/hmr.js +4 -4
  55. package/tests/hydration/compiled/client/html-in-template.js +5 -5
  56. package/tests/hydration/compiled/client/html.js +174 -208
  57. package/tests/hydration/compiled/client/if-children.js +71 -70
  58. package/tests/hydration/compiled/client/if-fragment-controlflow.js +46 -46
  59. package/tests/hydration/compiled/client/if.js +26 -26
  60. package/tests/hydration/compiled/client/mixed-control-flow.js +63 -105
  61. package/tests/hydration/compiled/client/nested-control-flow.js +170 -390
  62. package/tests/hydration/compiled/client/portal.js +10 -10
  63. package/tests/hydration/compiled/client/reactivity.js +36 -50
  64. package/tests/hydration/compiled/client/return.js +2 -2
  65. package/tests/hydration/compiled/client/streaming.js +34 -40
  66. package/tests/hydration/compiled/client/switch.js +25 -25
  67. package/tests/hydration/compiled/client/track-async-serialization.js +41 -41
  68. package/tests/hydration/compiled/client/try.js +15 -15
  69. package/tests/hydration/compiled/client/typed-text.js +8 -19
  70. package/tests/hydration/compiled/server/basic.js +6 -6
  71. package/tests/hydration/compiled/server/events.js +13 -61
  72. package/tests/hydration/compiled/server/for.js +23 -31
  73. package/tests/hydration/compiled/server/fragment-cursor.js +214 -366
  74. package/tests/hydration/compiled/server/head.js +6 -6
  75. package/tests/hydration/compiled/server/hmr.js +1 -1
  76. package/tests/hydration/compiled/server/html.js +1 -1
  77. package/tests/hydration/compiled/server/if-children.js +9 -9
  78. package/tests/hydration/compiled/server/if.js +5 -5
  79. package/tests/hydration/compiled/server/mixed-control-flow.js +4 -4
  80. package/tests/hydration/compiled/server/portal.js +1 -1
  81. package/tests/hydration/compiled/server/reactivity.js +9 -9
  82. package/tests/hydration/compiled/server/streaming.js +9 -9
  83. package/tests/hydration/compiled/server/switch.js +4 -4
  84. package/tests/hydration/compiled/server/track-async-serialization.js +16 -16
  85. package/tests/hydration/compiled/server/try.js +4 -4
  86. package/tests/hydration/compiled/server/typed-text.js +1 -1
  87. package/tests/hydration/components/fragment-cursor.tsrx +60 -0
  88. package/tests/hydration/components/track-async-serialization.tsrx +2 -2
  89. package/tests/hydration/fragment-cursor.test.js +34 -1
  90. package/tests/hydration/track-async-serialization.test.js +1 -1
  91. package/tests/server/basic.components.test.tsrx +3 -3
  92. package/tests/server/basic.test.tsrx +23 -0
  93. package/tests/server/track-async-serialization.test.tsrx +6 -6
  94. package/tests/utils/tracked-types.test.js +3 -3
  95. package/types/index.d.ts +8 -8
  96. package/types/server.d.ts +17 -0
@@ -1,9 +1,9 @@
1
1
  // @ts-nocheck
2
2
  import * as _$_ from 'ripple/internal/client';
3
3
 
4
- var root_1 = _$_.template(`<div class="content"><!></div>`, 0);
4
+ var root_1 = _$_.template(`<div class=content><!>`);
5
5
 
6
- function consequent(__anchor, { expanded, children }) {
6
+ function consequent(__anchor, { a: expanded, b: children }) {
7
7
  var div_2 = root_1();
8
8
 
9
9
  {
@@ -16,14 +16,14 @@ function consequent(__anchor, { expanded, children }) {
16
16
  _$_.append(__anchor, div_2);
17
17
  }
18
18
 
19
- function if_1({ expanded, children }) {
19
+ function if_1({ a: expanded, b: children }) {
20
20
  if (expanded.value) return consequent;
21
21
  }
22
22
 
23
- var root = _$_.template(`<div class="container"><div role="button" class="header">Toggle</div><!></div>`, 0);
23
+ var root = _$_.template(`<div class=container><div role=button class=header>Toggle`);
24
24
 
25
25
  function IfWithChildren_render(__anchor, __block, { children }) {
26
- const expanded = _$_.track(true, __block, 'c64714b1');
26
+ const expanded = _$_.track(true, __block, '1j0jg6p');
27
27
  var div = root();
28
28
 
29
29
  {
@@ -31,9 +31,9 @@ function IfWithChildren_render(__anchor, __block, { children }) {
31
31
 
32
32
  div_1.__click = () => expanded.value = !expanded.value;
33
33
 
34
- var node = _$_.hydrating ? _$_.hydrate_sibling() : div_1.nextSibling;
34
+ var node = _$_.hydrating ? _$_.hydrate_sibling() : _$_.append_into(div, true);
35
35
 
36
- _$_.if(node, if_1, false, { expanded, children });
36
+ _$_.if(node, if_1, false, { a: expanded, b: children });
37
37
  _$_.hydrating && _$_.pop(div);
38
38
  }
39
39
 
@@ -42,15 +42,13 @@ function IfWithChildren_render(__anchor, __block, { children }) {
42
42
 
43
43
  IfWithChildren[_$_.$r] = IfWithChildren_render;
44
44
 
45
- var root_2 = _$_.template(`<div class="item"> </div>`, 0);
45
+ var root_2 = _$_.template(`<div class=item>`);
46
46
 
47
47
  function ChildItem_render(__anchor, __block, { text: label }) {
48
48
  var div_3 = root_2();
49
49
 
50
50
  {
51
- var expression_1 = _$_.hydrating ? _$_.hydrate_text() : div_3.firstChild;
52
-
53
- expression_1.nodeValue = label;
51
+ div_3.textContent = label;
54
52
  }
55
53
 
56
54
  _$_.append(__anchor, div_3);
@@ -78,7 +76,7 @@ function TestIfWithChildren_render(__anchor, __block) {
78
76
 
79
77
  TestIfWithChildren[_$_.$r] = TestIfWithChildren_render;
80
78
 
81
- var root_5 = _$_.template(`<div class="content"><span>Static child 1</span><span>Static child 2</span></div>`, 0);
79
+ var root_5 = _$_.template(`<div class=content><span>Static child 1</span><span>Static child 2`);
82
80
 
83
81
  function consequent_1(__anchor, expanded) {
84
82
  var div_6 = root_5();
@@ -90,10 +88,10 @@ function if_2(expanded) {
90
88
  if (expanded.value) return consequent_1;
91
89
  }
92
90
 
93
- var root_4 = _$_.template(`<div class="container"><div role="button" class="header">Toggle</div><!></div>`, 0);
91
+ var root_4 = _$_.template(`<div class=container><div role=button class=header>Toggle`);
94
92
 
95
93
  function IfWithStaticChildren_render(__anchor, __block) {
96
- const expanded = _$_.track(true, __block, '3bba8f77');
94
+ const expanded = _$_.track(true, __block, 'gkm3jr');
97
95
  var div_4 = root_4();
98
96
 
99
97
  {
@@ -101,7 +99,7 @@ function IfWithStaticChildren_render(__anchor, __block) {
101
99
 
102
100
  div_5.__click = () => expanded.value = !expanded.value;
103
101
 
104
- var node_3 = _$_.hydrating ? _$_.hydrate_sibling() : div_5.nextSibling;
102
+ var node_3 = _$_.hydrating ? _$_.hydrate_sibling() : _$_.append_into(div_4, true);
105
103
 
106
104
  _$_.if(node_3, if_2, false, expanded);
107
105
  _$_.hydrating && _$_.pop(div_4);
@@ -112,9 +110,9 @@ function IfWithStaticChildren_render(__anchor, __block) {
112
110
 
113
111
  IfWithStaticChildren[_$_.$r] = IfWithStaticChildren_render;
114
112
 
115
- var root_7 = _$_.template(`<div class="items"><!></div>`, 0);
113
+ var root_7 = _$_.template(`<div class=items><!>`);
116
114
 
117
- function consequent_2(__anchor, { expanded, children }) {
115
+ function consequent_2(__anchor, { a: expanded, b: children }) {
118
116
  var div_8 = root_7();
119
117
 
120
118
  {
@@ -127,14 +125,14 @@ function consequent_2(__anchor, { expanded, children }) {
127
125
  _$_.append(__anchor, div_8);
128
126
  }
129
127
 
130
- function if_3({ expanded, children }) {
128
+ function if_3({ a: expanded, b: children }) {
131
129
  if (expanded.value) return consequent_2;
132
130
  }
133
131
 
134
- var root_6 = _$_.template(`<section class="group"><div role="button" class="item"><div class="indicator"></div><h2 class="text">Title</h2><div class="caret"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24"><path d="m9 18 6-6-6-6"></path></svg></div></div><!></section>`, 0);
132
+ var root_6 = _$_.template(`<section class=group><div role=button class=item><div class=indicator></div><h2 class=text>Title</h2><div class=caret><svg xmlns=http://www.w3.org/2000/svg width=18 height=18 viewBox="0 0 24 24"><path d="m9 18 6-6-6-6">`);
135
133
 
136
134
  function IfWithSiblingsAndChildren_render(__anchor, __block, { children }) {
137
- const expanded = _$_.track(true, __block, 'a1b8fb4c');
135
+ const expanded = _$_.track(true, __block, '18vegr0');
138
136
  var section = root_6();
139
137
 
140
138
  {
@@ -143,9 +141,11 @@ function IfWithSiblingsAndChildren_render(__anchor, __block, { children }) {
143
141
  div_7.__click = () => expanded.value = !expanded.value;
144
142
  _$_.hydrating && _$_.pop(div_7);
145
143
 
146
- var node_4 = _$_.hydrating ? _$_.hydrate_sibling() : div_7.nextSibling;
144
+ var node_4 = _$_.hydrating
145
+ ? _$_.hydrate_sibling()
146
+ : _$_.append_into(section, true);
147
147
 
148
- _$_.if(node_4, if_3, false, { expanded, children });
148
+ _$_.if(node_4, if_3, false, { a: expanded, b: children });
149
149
  _$_.hydrating && _$_.pop(section);
150
150
  }
151
151
 
@@ -174,7 +174,7 @@ function TestIfWithSiblingsAndChildren_render(__anchor, __block) {
174
174
 
175
175
  TestIfWithSiblingsAndChildren[_$_.$r] = TestIfWithSiblingsAndChildren_render;
176
176
 
177
- var root_11 = _$_.template(`<div class="conditional">Conditional content</div>`, 0);
177
+ var root_11 = _$_.template(`<div class=conditional>Conditional content`);
178
178
 
179
179
  function consequent_3(__anchor, show) {
180
180
  var div_11 = root_11();
@@ -186,27 +186,27 @@ function if_4(show) {
186
186
  if (show.value) return consequent_3;
187
187
  }
188
188
 
189
- var root_10 = _$_.template(`<div class="wrapper"><div class="nested-parent"><div class="nested-child"><span class="deep">Deep content</span></div></div><!></div><button class="toggle">Toggle</button>`, 1, 2);
189
+ var root_10 = _$_.template(`<div class=wrapper><div class=nested-parent><div class=nested-child><span class=deep>Deep content</span></div></div></div><button class=toggle>Toggle`, 1, 2);
190
190
  var root_9 = _$_.template(`<!>`, 1, 1);
191
191
 
192
192
  function ElementWithChildrenThenIf_render(__anchor, __block) {
193
- const show = _$_.track(true, __block, '7cd4817b');
193
+ const show = _$_.track(true, __block, 'ymw5ff');
194
194
  var fragment_2 = root_9();
195
195
  var node_8 = _$_.first_child_frag(fragment_2);
196
196
 
197
197
  _$_.expression(node_8, () => _$_.tsrx_element((__anchor, __block) => {
198
198
  var fragment_3 = root_10();
199
- var div_10 = _$_.first_child_frag(fragment_3);
199
+ var div_9 = _$_.first_child_frag(fragment_3);
200
200
 
201
201
  {
202
- var div_9 = _$_.hydrating ? _$_.hydrate_child() : div_10.firstChild;
203
- var node_7 = _$_.hydrating ? _$_.hydrate_sibling() : div_9.nextSibling;
202
+ var div_10 = _$_.hydrating ? _$_.hydrate_child() : div_9.firstChild;
203
+ var node_7 = _$_.hydrating ? _$_.hydrate_sibling() : _$_.append_into(div_9, true);
204
204
 
205
205
  _$_.if(node_7, if_4, false, show);
206
- _$_.hydrating && _$_.pop(div_10);
206
+ _$_.hydrating && _$_.pop(div_9);
207
207
  }
208
208
 
209
- var button = _$_.hydrating ? _$_.hydrate_sibling() : div_10.nextSibling;
209
+ var button = _$_.hydrating ? _$_.hydrate_sibling() : div_9.nextSibling;
210
210
 
211
211
  button.__click = () => show.value = !show.value;
212
212
  _$_.append(__anchor, fragment_3);
@@ -217,7 +217,7 @@ function ElementWithChildrenThenIf_render(__anchor, __block) {
217
217
 
218
218
  ElementWithChildrenThenIf[_$_.$r] = ElementWithChildrenThenIf_render;
219
219
 
220
- var root_14 = _$_.template(`<footer class="footer">Footer</footer>`, 0);
220
+ var root_14 = _$_.template(`<footer class=footer>Footer`);
221
221
 
222
222
  function consequent_4(__anchor, visible) {
223
223
  var footer = root_14();
@@ -229,11 +229,11 @@ function if_5(visible) {
229
229
  if (visible.value) return consequent_4;
230
230
  }
231
231
 
232
- var root_13 = _$_.template(`<section class="outer"><article class="middle"><div class="inner"><p class="leaf"><strong>Bold</strong><em>Italic</em></p></div></article><!></section><button class="btn">Toggle</button>`, 1, 2);
232
+ var root_13 = _$_.template(`<section class=outer><article class=middle><div class=inner><p class=leaf><strong>Bold</strong><em>Italic</em></p></div></article></section><button class=btn>Toggle`, 1, 2);
233
233
  var root_12 = _$_.template(`<!>`, 1, 1);
234
234
 
235
235
  function DeepNestingThenIf_render(__anchor, __block) {
236
- const visible = _$_.track(true, __block, '923116be');
236
+ const visible = _$_.track(true, __block, '14k9o72');
237
237
  var fragment_4 = root_12();
238
238
  var node_10 = _$_.first_child_frag(fragment_4);
239
239
 
@@ -243,7 +243,10 @@ function DeepNestingThenIf_render(__anchor, __block) {
243
243
 
244
244
  {
245
245
  var article = _$_.hydrating ? _$_.hydrate_child() : section_1.firstChild;
246
- var node_9 = _$_.hydrating ? _$_.hydrate_sibling() : article.nextSibling;
246
+
247
+ var node_9 = _$_.hydrating
248
+ ? _$_.hydrate_sibling()
249
+ : _$_.append_into(section_1, true);
247
250
 
248
251
  _$_.if(node_9, if_5, false, visible);
249
252
  _$_.hydrating && _$_.pop(section_1);
@@ -260,8 +263,8 @@ function DeepNestingThenIf_render(__anchor, __block) {
260
263
 
261
264
  DeepNestingThenIf[_$_.$r] = DeepNestingThenIf_render;
262
265
 
263
- var root_16 = _$_.template(`<pre class="code">const x = 1;</pre>`, 0);
264
- var root_17 = _$_.template(`<div class="preview">Preview content</div>`, 0);
266
+ var root_16 = _$_.template(`<pre class=code>const x = 1;`);
267
+ var root_17 = _$_.template(`<div class=preview>Preview content`);
265
268
 
266
269
  function consequent_5(__anchor, activeTab) {
267
270
  var pre = root_16();
@@ -279,24 +282,24 @@ function if_6(activeTab) {
279
282
  if (activeTab.value === 'code') return consequent_5; else return alternate;
280
283
  }
281
284
 
282
- var root_15 = _$_.template(`<div class="tabs"><div class="tab-list"><button class="tab">Code</button><button class="tab">Preview</button></div><div class="panel"><!></div></div>`, 0);
285
+ var root_15 = _$_.template(`<div class=tabs><div class=tab-list><button class=tab>Code</button><button class=tab>Preview</button></div><div class=panel><!>`);
283
286
 
284
287
  function render(__prev) {
285
- var __a = __prev._activeTab.value === 'code' ? 'true' : 'false';
288
+ var __a = __prev._a.value === 'code' ? 'true' : 'false';
286
289
 
287
290
  if (__prev.a !== __a) {
288
- _$_.set_attribute(__prev._button_2, 'aria-selected', __prev.a = __a);
291
+ _$_.set_attribute(__prev._b, 'aria-selected', __prev.a = __a);
289
292
  }
290
293
 
291
- var __b = __prev._activeTab.value === 'preview' ? 'true' : 'false';
294
+ var __b = __prev._a.value === 'preview' ? 'true' : 'false';
292
295
 
293
296
  if (__prev.b !== __b) {
294
- _$_.set_attribute(__prev._button_3, 'aria-selected', __prev.b = __b);
297
+ _$_.set_attribute(__prev._c, 'aria-selected', __prev.b = __b);
295
298
  }
296
299
  }
297
300
 
298
301
  function DomElementChildrenThenSibling_render(__anchor, __block) {
299
- const activeTab = _$_.track('code', __block, '33a1e97f');
302
+ const activeTab = _$_.track('code', __block, 'ebqq2n');
300
303
  var div_12 = root_15();
301
304
 
302
305
  {
@@ -327,9 +330,9 @@ function DomElementChildrenThenSibling_render(__anchor, __block) {
327
330
  _$_.render(render, {
328
331
  a: void 0,
329
332
  b: void 0,
330
- _activeTab: activeTab,
331
- _button_2: button_2,
332
- _button_3: button_3
333
+ _a: activeTab,
334
+ _b: button_2,
335
+ _c: button_3
333
336
  });
334
337
 
335
338
  _$_.append(__anchor, div_12);
@@ -337,20 +340,21 @@ function DomElementChildrenThenSibling_render(__anchor, __block) {
337
340
 
338
341
  DomElementChildrenThenSibling[_$_.$r] = DomElementChildrenThenSibling_render;
339
342
 
340
- var root_19 = _$_.template(`<div class="container"><ul class="list"><li class="item"> </li><li class="item">Another item</li></ul><h2 class="heading">Static Heading</h2><p class="para">Static paragraph</p></div><button class="inc">Increment</button>`, 1, 2);
343
+ var root_19 = _$_.template(`<div class=container><ul class=list><li class=item></li><li class=item>Another item</li></ul><h2 class=heading>Static Heading</h2><p class=para>Static paragraph</p></div><button class=inc>Increment`, 1, 2);
341
344
 
342
345
  function render_1(__prev) {
343
- var __a = 'Item count: ' + String(__prev._count.value ?? '');
346
+ var __a = 'Item count: ' + String(__prev._a.value ?? '');
344
347
 
345
348
  if (__prev.a !== __a) {
346
- _$_.set_text(__prev._expression_3, __prev.a = __a);
349
+ _$_.set_text_content(__prev._b, __a, __prev.a);
350
+ __prev.a = __a;
347
351
  }
348
352
  }
349
353
 
350
354
  var root_18 = _$_.template(`<!>`, 1, 1);
351
355
 
352
356
  function DomChildrenThenStaticSiblings_render(__anchor, __block) {
353
- const count = _$_.track(0, __block, '0ea64305');
357
+ const count = _$_.track(0, __block, '42buv9');
354
358
  var fragment_6 = root_18();
355
359
  var node_12 = _$_.first_child_frag(fragment_6);
356
360
 
@@ -363,10 +367,6 @@ function DomChildrenThenStaticSiblings_render(__anchor, __block) {
363
367
 
364
368
  {
365
369
  var li = _$_.hydrating ? _$_.hydrate_child() : ul.firstChild;
366
-
367
- {
368
- var expression_3 = _$_.hydrating ? _$_.hydrate_text() : li.firstChild;
369
- }
370
370
  }
371
371
 
372
372
  _$_.hydrating && _$_.pop(ul);
@@ -377,7 +377,7 @@ function DomChildrenThenStaticSiblings_render(__anchor, __block) {
377
377
  var button_4 = _$_.hydrating ? _$_.hydrate_sibling() : div_16.nextSibling;
378
378
 
379
379
  button_4.__click = () => count.value++;
380
- _$_.render(render_1, { a: ' ', _count: count, _expression_3: expression_3 });
380
+ _$_.render(render_1, { a: '', _a: count, _b: li });
381
381
  _$_.append(__anchor, fragment_7);
382
382
  }));
383
383
 
@@ -386,7 +386,7 @@ function DomChildrenThenStaticSiblings_render(__anchor, __block) {
386
386
 
387
387
  DomChildrenThenStaticSiblings[_$_.$r] = DomChildrenThenStaticSiblings_render;
388
388
 
389
- var root_20 = _$_.template(`<div class="wrapper"><ul class="features"><li><strong>Feature One</strong>: Description of feature one with <code>code</code> reference</li><li><strong>Feature Two</strong>: Another feature description</li><li><strong>Feature Three</strong>: Third feature</li></ul><h2 class="section-heading">Section Heading</h2><p class="section-content">Static paragraph with <a href="/link">a link</a> and more text.</p></div>`, 0);
389
+ var root_20 = _$_.template(`<div class=wrapper><ul class=features><li><strong>Feature One</strong>: Description of feature one with <code>code</code> reference</li><li><strong>Feature Two</strong>: Another feature description</li><li><strong>Feature Three</strong>: Third feature</li></ul><h2 class=section-heading>Section Heading</h2><p class=section-content>Static paragraph with <a href=/link>a link</a> and more text.`);
390
390
 
391
391
  function StaticListThenStaticSiblings_render(__anchor, __block) {
392
392
  var div_17 = root_20();
@@ -396,8 +396,8 @@ function StaticListThenStaticSiblings_render(__anchor, __block) {
396
396
 
397
397
  StaticListThenStaticSiblings[_$_.$r] = StaticListThenStaticSiblings_render;
398
398
 
399
- var root_21 = _$_.template(`<span class="root-if">on</span>`, 0);
400
- var root_22 = _$_.template(`<span class="root-if">off</span>`, 0);
399
+ var root_21 = _$_.template(`<span class=root-if>on`);
400
+ var root_22 = _$_.template(`<span class=root-if>off`);
401
401
 
402
402
  function consequent_6(__anchor, props) {
403
403
  var span = root_21();
@@ -421,13 +421,14 @@ function RootIfChild_render(__anchor, __block, props) {
421
421
 
422
422
  RootIfChild[_$_.$r] = RootIfChild_render;
423
423
 
424
- var root_23 = _$_.template(`<span class="root-for"> </span>`, 0);
424
+ var root_23 = _$_.template(`<span class=root-for>`);
425
425
 
426
426
  function render_2(__prev) {
427
- var __a = _$_.get(__prev._pattern);
427
+ var __a = __prev.$item;
428
428
 
429
429
  if (__prev.a !== __a) {
430
- _$_.set_text(__prev._expression_4, __prev.a = __a);
430
+ _$_.set_text_content(__prev._b, __a, __prev.a);
431
+ __prev.a = __a;
431
432
  }
432
433
  }
433
434
 
@@ -438,20 +439,20 @@ function RootForChild_render(__anchor, __block, props) {
438
439
  (__anchor, pattern) => {
439
440
  var span_2 = root_23();
440
441
 
441
- {
442
- var expression_4 = _$_.hydrating ? _$_.hydrate_text() : span_2.firstChild;
443
- }
444
-
445
- _$_.render(render_2, { a: ' ', _pattern: pattern, _expression_4: expression_4 });
442
+ _$_.item({ a: '', $item: pattern, _b: span_2 });
446
443
  _$_.append(__anchor, span_2);
447
444
  },
448
- 16
445
+ 144,
446
+ void 0,
447
+ void 0,
448
+ void 0,
449
+ render_2
449
450
  );
450
451
  }
451
452
 
452
453
  RootForChild[_$_.$r] = RootForChild_render;
453
454
 
454
- var root_24 = _$_.template(`<span class="trailing">end</span>`, 0);
455
+ var root_24 = _$_.template(`<span class=trailing>end`);
455
456
 
456
457
  function TrailingChild_render(__anchor, __block) {
457
458
  var span_3 = root_24();
@@ -461,11 +462,11 @@ function TrailingChild_render(__anchor, __block) {
461
462
 
462
463
  TrailingChild[_$_.$r] = TrailingChild_render;
463
464
 
464
- var root_25 = _$_.template(`<div class="wrapper"><div class="host"></div><button class="toggle">Toggle</button><button class="rotate">Rotate</button></div>`, 0);
465
+ var root_25 = _$_.template(`<div class=wrapper><div class=host></div><button class=toggle>Toggle</button><button class=rotate>Rotate`);
465
466
 
466
467
  function ComponentChildrenWithControlFlowRoots_render(__anchor, __block) {
467
- const on = _$_.track(true, __block, 'f3e4c6ee');
468
- const items = _$_.track([1, 2, 3], __block, '2bbbeeb0');
468
+ const on = _$_.track(true, __block, '1vo6ory');
469
+ const items = _$_.track([1, 2, 3], __block, 'c4uisw');
469
470
  var div_18 = root_25();
470
471
 
471
472
  {