ripple 0.4.2 → 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 (94) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/package.json +9 -3
  3. package/src/jsx-runtime.d.ts +2 -1
  4. package/src/runtime/array.js +15 -9
  5. package/src/runtime/index-client.js +25 -7
  6. package/src/runtime/index-server.js +1 -0
  7. package/src/runtime/internal/client/attributes.js +313 -0
  8. package/src/runtime/internal/client/blocks.js +4 -14
  9. package/src/runtime/internal/client/component.js +2 -5
  10. package/src/runtime/internal/client/composite.js +14 -6
  11. package/src/runtime/internal/client/constants.js +6 -6
  12. package/src/runtime/internal/client/context.js +3 -2
  13. package/src/runtime/internal/client/css.js +11 -26
  14. package/src/runtime/internal/client/errors.js +188 -0
  15. package/src/runtime/internal/client/events.js +79 -34
  16. package/src/runtime/internal/client/expression.js +21 -116
  17. package/src/runtime/internal/client/for.js +108 -232
  18. package/src/runtime/internal/client/head.js +4 -3
  19. package/src/runtime/internal/client/html.js +5 -3
  20. package/src/runtime/internal/client/hydrate.js +484 -0
  21. package/src/runtime/internal/client/hydration-enabled.js +7 -0
  22. package/src/runtime/internal/client/hydration.js +16 -81
  23. package/src/runtime/internal/client/if.js +13 -9
  24. package/src/runtime/internal/client/index.js +14 -6
  25. package/src/runtime/internal/client/operations.js +11 -7
  26. package/src/runtime/internal/client/portal.js +3 -2
  27. package/src/runtime/internal/client/render.js +42 -325
  28. package/src/runtime/internal/client/root-boundary-enabled.js +7 -0
  29. package/src/runtime/internal/client/runtime.js +87 -363
  30. package/src/runtime/internal/client/template-ns.js +47 -0
  31. package/src/runtime/internal/client/template.js +63 -140
  32. package/src/runtime/internal/client/track-async.js +356 -0
  33. package/src/runtime/internal/client/try.js +133 -319
  34. package/src/runtime/internal/client/types.d.ts +48 -24
  35. package/src/runtime/internal/server/index.js +31 -29
  36. package/src/runtime/internal/server/prerender.js +27 -0
  37. package/src/server/index.js +1 -0
  38. package/src/utils/class-name.js +28 -0
  39. package/tests/client/basic/basic.errors.test.tsrx +3 -3
  40. package/tests/client/compiler/__snapshots__/compiler.typescript.test.tsrx.snap +0 -2
  41. package/tests/client/compiler/compiler.basic.test.tsrx +2 -2
  42. package/tests/client/compiler/compiler.tracked-access.test.tsrx +3 -3
  43. package/tests/client/composite/composite.props.test.tsrx +10 -10
  44. package/tests/client/derived-release.test.tsrx +3 -3
  45. package/tests/client/for-item.test.tsrx +39 -0
  46. package/tests/client/for-selector.test.tsrx +95 -0
  47. package/tests/hydration/compiled/client/basic.js +87 -87
  48. package/tests/hydration/compiled/client/composite.js +5 -5
  49. package/tests/hydration/compiled/client/events.js +40 -48
  50. package/tests/hydration/compiled/client/for.js +162 -181
  51. package/tests/hydration/compiled/client/fragment-cursor.js +521 -289
  52. package/tests/hydration/compiled/client/head.js +22 -22
  53. package/tests/hydration/compiled/client/hmr.js +4 -4
  54. package/tests/hydration/compiled/client/html-in-template.js +5 -5
  55. package/tests/hydration/compiled/client/html.js +152 -162
  56. package/tests/hydration/compiled/client/if-children.js +58 -53
  57. package/tests/hydration/compiled/client/if-fragment-controlflow.js +39 -39
  58. package/tests/hydration/compiled/client/if.js +26 -26
  59. package/tests/hydration/compiled/client/mixed-control-flow.js +56 -68
  60. package/tests/hydration/compiled/client/nested-control-flow.js +139 -271
  61. package/tests/hydration/compiled/client/portal.js +10 -10
  62. package/tests/hydration/compiled/client/reactivity.js +29 -29
  63. package/tests/hydration/compiled/client/return.js +2 -2
  64. package/tests/hydration/compiled/client/streaming.js +33 -35
  65. package/tests/hydration/compiled/client/switch.js +25 -25
  66. package/tests/hydration/compiled/client/track-async-serialization.js +41 -41
  67. package/tests/hydration/compiled/client/try.js +15 -15
  68. package/tests/hydration/compiled/client/typed-text.js +7 -7
  69. package/tests/hydration/compiled/server/basic.js +6 -6
  70. package/tests/hydration/compiled/server/events.js +8 -8
  71. package/tests/hydration/compiled/server/for.js +22 -22
  72. package/tests/hydration/compiled/server/fragment-cursor.js +188 -52
  73. package/tests/hydration/compiled/server/head.js +6 -6
  74. package/tests/hydration/compiled/server/hmr.js +1 -1
  75. package/tests/hydration/compiled/server/html.js +1 -1
  76. package/tests/hydration/compiled/server/if-children.js +9 -9
  77. package/tests/hydration/compiled/server/if.js +5 -5
  78. package/tests/hydration/compiled/server/mixed-control-flow.js +4 -4
  79. package/tests/hydration/compiled/server/portal.js +1 -1
  80. package/tests/hydration/compiled/server/reactivity.js +9 -9
  81. package/tests/hydration/compiled/server/streaming.js +9 -9
  82. package/tests/hydration/compiled/server/switch.js +4 -4
  83. package/tests/hydration/compiled/server/track-async-serialization.js +16 -16
  84. package/tests/hydration/compiled/server/try.js +4 -4
  85. package/tests/hydration/compiled/server/typed-text.js +1 -1
  86. package/tests/hydration/components/fragment-cursor.tsrx +60 -0
  87. package/tests/hydration/components/track-async-serialization.tsrx +2 -2
  88. package/tests/hydration/fragment-cursor.test.js +34 -1
  89. package/tests/hydration/track-async-serialization.test.js +1 -1
  90. package/tests/server/basic.components.test.tsrx +3 -3
  91. package/tests/server/track-async-serialization.test.tsrx +6 -6
  92. package/tests/utils/tracked-types.test.js +3 -3
  93. package/types/index.d.ts +8 -8
  94. 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() : _$_.append_into(div);
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,7 +42,7 @@ 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();
@@ -76,7 +76,7 @@ function TestIfWithChildren_render(__anchor, __block) {
76
76
 
77
77
  TestIfWithChildren[_$_.$r] = TestIfWithChildren_render;
78
78
 
79
- 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`);
80
80
 
81
81
  function consequent_1(__anchor, expanded) {
82
82
  var div_6 = root_5();
@@ -88,10 +88,10 @@ function if_2(expanded) {
88
88
  if (expanded.value) return consequent_1;
89
89
  }
90
90
 
91
- 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`);
92
92
 
93
93
  function IfWithStaticChildren_render(__anchor, __block) {
94
- const expanded = _$_.track(true, __block, '3bba8f77');
94
+ const expanded = _$_.track(true, __block, 'gkm3jr');
95
95
  var div_4 = root_4();
96
96
 
97
97
  {
@@ -99,7 +99,7 @@ function IfWithStaticChildren_render(__anchor, __block) {
99
99
 
100
100
  div_5.__click = () => expanded.value = !expanded.value;
101
101
 
102
- var node_3 = _$_.hydrating ? _$_.hydrate_sibling() : _$_.append_into(div_4);
102
+ var node_3 = _$_.hydrating ? _$_.hydrate_sibling() : _$_.append_into(div_4, true);
103
103
 
104
104
  _$_.if(node_3, if_2, false, expanded);
105
105
  _$_.hydrating && _$_.pop(div_4);
@@ -110,9 +110,9 @@ function IfWithStaticChildren_render(__anchor, __block) {
110
110
 
111
111
  IfWithStaticChildren[_$_.$r] = IfWithStaticChildren_render;
112
112
 
113
- var root_7 = _$_.template(`<div class="items"><!></div>`, 0);
113
+ var root_7 = _$_.template(`<div class=items><!>`);
114
114
 
115
- function consequent_2(__anchor, { expanded, children }) {
115
+ function consequent_2(__anchor, { a: expanded, b: children }) {
116
116
  var div_8 = root_7();
117
117
 
118
118
  {
@@ -125,14 +125,14 @@ function consequent_2(__anchor, { expanded, children }) {
125
125
  _$_.append(__anchor, div_8);
126
126
  }
127
127
 
128
- function if_3({ expanded, children }) {
128
+ function if_3({ a: expanded, b: children }) {
129
129
  if (expanded.value) return consequent_2;
130
130
  }
131
131
 
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"></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">`);
133
133
 
134
134
  function IfWithSiblingsAndChildren_render(__anchor, __block, { children }) {
135
- const expanded = _$_.track(true, __block, 'a1b8fb4c');
135
+ const expanded = _$_.track(true, __block, '18vegr0');
136
136
  var section = root_6();
137
137
 
138
138
  {
@@ -141,9 +141,11 @@ function IfWithSiblingsAndChildren_render(__anchor, __block, { children }) {
141
141
  div_7.__click = () => expanded.value = !expanded.value;
142
142
  _$_.hydrating && _$_.pop(div_7);
143
143
 
144
- var node_4 = _$_.hydrating ? _$_.hydrate_sibling() : _$_.append_into(section);
144
+ var node_4 = _$_.hydrating
145
+ ? _$_.hydrate_sibling()
146
+ : _$_.append_into(section, true);
145
147
 
146
- _$_.if(node_4, if_3, false, { expanded, children });
148
+ _$_.if(node_4, if_3, false, { a: expanded, b: children });
147
149
  _$_.hydrating && _$_.pop(section);
148
150
  }
149
151
 
@@ -172,7 +174,7 @@ function TestIfWithSiblingsAndChildren_render(__anchor, __block) {
172
174
 
173
175
  TestIfWithSiblingsAndChildren[_$_.$r] = TestIfWithSiblingsAndChildren_render;
174
176
 
175
- var root_11 = _$_.template(`<div class="conditional">Conditional content</div>`, 0);
177
+ var root_11 = _$_.template(`<div class=conditional>Conditional content`);
176
178
 
177
179
  function consequent_3(__anchor, show) {
178
180
  var div_11 = root_11();
@@ -184,11 +186,11 @@ function if_4(show) {
184
186
  if (show.value) return consequent_3;
185
187
  }
186
188
 
187
- 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);
188
190
  var root_9 = _$_.template(`<!>`, 1, 1);
189
191
 
190
192
  function ElementWithChildrenThenIf_render(__anchor, __block) {
191
- const show = _$_.track(true, __block, '7cd4817b');
193
+ const show = _$_.track(true, __block, 'ymw5ff');
192
194
  var fragment_2 = root_9();
193
195
  var node_8 = _$_.first_child_frag(fragment_2);
194
196
 
@@ -198,7 +200,7 @@ function ElementWithChildrenThenIf_render(__anchor, __block) {
198
200
 
199
201
  {
200
202
  var div_10 = _$_.hydrating ? _$_.hydrate_child() : div_9.firstChild;
201
- var node_7 = _$_.hydrating ? _$_.hydrate_sibling() : _$_.append_into(div_9);
203
+ var node_7 = _$_.hydrating ? _$_.hydrate_sibling() : _$_.append_into(div_9, true);
202
204
 
203
205
  _$_.if(node_7, if_4, false, show);
204
206
  _$_.hydrating && _$_.pop(div_9);
@@ -215,7 +217,7 @@ function ElementWithChildrenThenIf_render(__anchor, __block) {
215
217
 
216
218
  ElementWithChildrenThenIf[_$_.$r] = ElementWithChildrenThenIf_render;
217
219
 
218
- var root_14 = _$_.template(`<footer class="footer">Footer</footer>`, 0);
220
+ var root_14 = _$_.template(`<footer class=footer>Footer`);
219
221
 
220
222
  function consequent_4(__anchor, visible) {
221
223
  var footer = root_14();
@@ -227,11 +229,11 @@ function if_5(visible) {
227
229
  if (visible.value) return consequent_4;
228
230
  }
229
231
 
230
- 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);
231
233
  var root_12 = _$_.template(`<!>`, 1, 1);
232
234
 
233
235
  function DeepNestingThenIf_render(__anchor, __block) {
234
- const visible = _$_.track(true, __block, '923116be');
236
+ const visible = _$_.track(true, __block, '14k9o72');
235
237
  var fragment_4 = root_12();
236
238
  var node_10 = _$_.first_child_frag(fragment_4);
237
239
 
@@ -241,7 +243,10 @@ function DeepNestingThenIf_render(__anchor, __block) {
241
243
 
242
244
  {
243
245
  var article = _$_.hydrating ? _$_.hydrate_child() : section_1.firstChild;
244
- var node_9 = _$_.hydrating ? _$_.hydrate_sibling() : _$_.append_into(section_1);
246
+
247
+ var node_9 = _$_.hydrating
248
+ ? _$_.hydrate_sibling()
249
+ : _$_.append_into(section_1, true);
245
250
 
246
251
  _$_.if(node_9, if_5, false, visible);
247
252
  _$_.hydrating && _$_.pop(section_1);
@@ -258,8 +263,8 @@ function DeepNestingThenIf_render(__anchor, __block) {
258
263
 
259
264
  DeepNestingThenIf[_$_.$r] = DeepNestingThenIf_render;
260
265
 
261
- var root_16 = _$_.template(`<pre class="code">const x = 1;</pre>`, 0);
262
- 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`);
263
268
 
264
269
  function consequent_5(__anchor, activeTab) {
265
270
  var pre = root_16();
@@ -277,24 +282,24 @@ function if_6(activeTab) {
277
282
  if (activeTab.value === 'code') return consequent_5; else return alternate;
278
283
  }
279
284
 
280
- 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><!>`);
281
286
 
282
287
  function render(__prev) {
283
- var __a = __prev._activeTab.value === 'code' ? 'true' : 'false';
288
+ var __a = __prev._a.value === 'code' ? 'true' : 'false';
284
289
 
285
290
  if (__prev.a !== __a) {
286
- _$_.set_attribute(__prev._button_2, 'aria-selected', __prev.a = __a);
291
+ _$_.set_attribute(__prev._b, 'aria-selected', __prev.a = __a);
287
292
  }
288
293
 
289
- var __b = __prev._activeTab.value === 'preview' ? 'true' : 'false';
294
+ var __b = __prev._a.value === 'preview' ? 'true' : 'false';
290
295
 
291
296
  if (__prev.b !== __b) {
292
- _$_.set_attribute(__prev._button_3, 'aria-selected', __prev.b = __b);
297
+ _$_.set_attribute(__prev._c, 'aria-selected', __prev.b = __b);
293
298
  }
294
299
  }
295
300
 
296
301
  function DomElementChildrenThenSibling_render(__anchor, __block) {
297
- const activeTab = _$_.track('code', __block, '33a1e97f');
302
+ const activeTab = _$_.track('code', __block, 'ebqq2n');
298
303
  var div_12 = root_15();
299
304
 
300
305
  {
@@ -325,9 +330,9 @@ function DomElementChildrenThenSibling_render(__anchor, __block) {
325
330
  _$_.render(render, {
326
331
  a: void 0,
327
332
  b: void 0,
328
- _activeTab: activeTab,
329
- _button_2: button_2,
330
- _button_3: button_3
333
+ _a: activeTab,
334
+ _b: button_2,
335
+ _c: button_3
331
336
  });
332
337
 
333
338
  _$_.append(__anchor, div_12);
@@ -335,13 +340,13 @@ function DomElementChildrenThenSibling_render(__anchor, __block) {
335
340
 
336
341
  DomElementChildrenThenSibling[_$_.$r] = DomElementChildrenThenSibling_render;
337
342
 
338
- 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);
339
344
 
340
345
  function render_1(__prev) {
341
- var __a = 'Item count: ' + String(__prev._count.value ?? '');
346
+ var __a = 'Item count: ' + String(__prev._a.value ?? '');
342
347
 
343
348
  if (__prev.a !== __a) {
344
- _$_.set_text_content(__prev._li, __a, __prev.a);
349
+ _$_.set_text_content(__prev._b, __a, __prev.a);
345
350
  __prev.a = __a;
346
351
  }
347
352
  }
@@ -349,7 +354,7 @@ function render_1(__prev) {
349
354
  var root_18 = _$_.template(`<!>`, 1, 1);
350
355
 
351
356
  function DomChildrenThenStaticSiblings_render(__anchor, __block) {
352
- const count = _$_.track(0, __block, '0ea64305');
357
+ const count = _$_.track(0, __block, '42buv9');
353
358
  var fragment_6 = root_18();
354
359
  var node_12 = _$_.first_child_frag(fragment_6);
355
360
 
@@ -372,7 +377,7 @@ function DomChildrenThenStaticSiblings_render(__anchor, __block) {
372
377
  var button_4 = _$_.hydrating ? _$_.hydrate_sibling() : div_16.nextSibling;
373
378
 
374
379
  button_4.__click = () => count.value++;
375
- _$_.render(render_1, { a: '', _count: count, _li: li });
380
+ _$_.render(render_1, { a: '', _a: count, _b: li });
376
381
  _$_.append(__anchor, fragment_7);
377
382
  }));
378
383
 
@@ -381,7 +386,7 @@ function DomChildrenThenStaticSiblings_render(__anchor, __block) {
381
386
 
382
387
  DomChildrenThenStaticSiblings[_$_.$r] = DomChildrenThenStaticSiblings_render;
383
388
 
384
- 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.`);
385
390
 
386
391
  function StaticListThenStaticSiblings_render(__anchor, __block) {
387
392
  var div_17 = root_20();
@@ -391,8 +396,8 @@ function StaticListThenStaticSiblings_render(__anchor, __block) {
391
396
 
392
397
  StaticListThenStaticSiblings[_$_.$r] = StaticListThenStaticSiblings_render;
393
398
 
394
- var root_21 = _$_.template(`<span class="root-if">on</span>`, 0);
395
- 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`);
396
401
 
397
402
  function consequent_6(__anchor, props) {
398
403
  var span = root_21();
@@ -416,13 +421,13 @@ function RootIfChild_render(__anchor, __block, props) {
416
421
 
417
422
  RootIfChild[_$_.$r] = RootIfChild_render;
418
423
 
419
- var root_23 = _$_.template(`<span class="root-for"></span>`, 0);
424
+ var root_23 = _$_.template(`<span class=root-for>`);
420
425
 
421
426
  function render_2(__prev) {
422
427
  var __a = __prev.$item;
423
428
 
424
429
  if (__prev.a !== __a) {
425
- _$_.set_text_content(__prev._span_2, __a, __prev.a);
430
+ _$_.set_text_content(__prev._b, __a, __prev.a);
426
431
  __prev.a = __a;
427
432
  }
428
433
  }
@@ -434,7 +439,7 @@ function RootForChild_render(__anchor, __block, props) {
434
439
  (__anchor, pattern) => {
435
440
  var span_2 = root_23();
436
441
 
437
- _$_.item({ a: '', $item: pattern, _span_2: span_2 });
442
+ _$_.item({ a: '', $item: pattern, _b: span_2 });
438
443
  _$_.append(__anchor, span_2);
439
444
  },
440
445
  144,
@@ -447,7 +452,7 @@ function RootForChild_render(__anchor, __block, props) {
447
452
 
448
453
  RootForChild[_$_.$r] = RootForChild_render;
449
454
 
450
- var root_24 = _$_.template(`<span class="trailing">end</span>`, 0);
455
+ var root_24 = _$_.template(`<span class=trailing>end`);
451
456
 
452
457
  function TrailingChild_render(__anchor, __block) {
453
458
  var span_3 = root_24();
@@ -457,11 +462,11 @@ function TrailingChild_render(__anchor, __block) {
457
462
 
458
463
  TrailingChild[_$_.$r] = TrailingChild_render;
459
464
 
460
- 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`);
461
466
 
462
467
  function ComponentChildrenWithControlFlowRoots_render(__anchor, __block) {
463
- const on = _$_.track(true, __block, 'f3e4c6ee');
464
- const items = _$_.track([1, 2, 3], __block, '2bbbeeb0');
468
+ const on = _$_.track(true, __block, '1vo6ory');
469
+ const items = _$_.track([1, 2, 3], __block, 'c4uisw');
465
470
  var div_18 = root_25();
466
471
 
467
472
  {
@@ -1,10 +1,10 @@
1
1
  // @ts-nocheck
2
2
  import * as _$_ from 'ripple/internal/client';
3
3
 
4
- var root_2 = _$_.template(`<p class="muze"> </p>`, 0);
5
- var root_1 = _$_.template(`<!><span class="after">after</span>`, 1, 2);
4
+ var root_2 = _$_.template(`<p class=muze> `);
5
+ var root_1 = _$_.template(`<!><span class=after>after`, 1, 2);
6
6
 
7
- function consequent(__anchor, { hasLoaded, muzes }) {
7
+ function consequent(__anchor, { a: hasLoaded, b: muzes }) {
8
8
  var fragment = root_1();
9
9
  var node_1 = _$_.first_child_frag(fragment);
10
10
 
@@ -31,11 +31,11 @@ function consequent(__anchor, { hasLoaded, muzes }) {
31
31
  _$_.append(__anchor, fragment);
32
32
  }
33
33
 
34
- function if_1({ hasLoaded, muzes }) {
34
+ function if_1({ a: hasLoaded, b: muzes }) {
35
35
  if (hasLoaded) return consequent;
36
36
  }
37
37
 
38
- var root = _$_.template(`<div class="feed-c"><!></div>`, 0);
38
+ var root = _$_.template(`<div class=feed-c><!>`);
39
39
 
40
40
  function IfFragmentForElement_render(__anchor, __block) {
41
41
  const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
@@ -45,7 +45,7 @@ function IfFragmentForElement_render(__anchor, __block) {
45
45
  {
46
46
  var node = _$_.hydrating ? _$_.hydrate_child() : div.firstChild;
47
47
 
48
- _$_.if(node, if_1, false, { hasLoaded, muzes });
48
+ _$_.if(node, if_1, false, { a: hasLoaded, b: muzes });
49
49
  _$_.hydrating && _$_.pop(div);
50
50
  }
51
51
 
@@ -54,8 +54,8 @@ function IfFragmentForElement_render(__anchor, __block) {
54
54
 
55
55
  IfFragmentForElement[_$_.$r] = IfFragmentForElement_render;
56
56
 
57
- var root_5 = _$_.template(`<p class="muze"> </p>`, 0);
58
- var root_6 = _$_.template(`<span class="has-items">has items</span>`, 0);
57
+ var root_5 = _$_.template(`<p class=muze> `);
58
+ var root_6 = _$_.template(`<span class=has-items>has items`);
59
59
 
60
60
  function consequent_1(__anchor, muzes) {
61
61
  var span = root_6();
@@ -67,7 +67,7 @@ function if_2(muzes) {
67
67
  if (muzes.length > 0) return consequent_1;
68
68
  }
69
69
 
70
- var root_7 = _$_.template(`<span class="empty">empty</span>`, 0);
70
+ var root_7 = _$_.template(`<span class=empty>empty`);
71
71
 
72
72
  function consequent_2(__anchor, muzes) {
73
73
  var span_1 = root_7();
@@ -81,7 +81,7 @@ function if_3(muzes) {
81
81
 
82
82
  var root_4 = _$_.template(`<!><!><!>`, 1, 3);
83
83
 
84
- function consequent_3(__anchor, { hasLoaded, muzes }) {
84
+ function consequent_3(__anchor, { a: hasLoaded, b: muzes }) {
85
85
  var fragment_1 = root_4();
86
86
  var node_3 = _$_.first_child_frag(fragment_1);
87
87
 
@@ -114,11 +114,11 @@ function consequent_3(__anchor, { hasLoaded, muzes }) {
114
114
  _$_.append(__anchor, fragment_1);
115
115
  }
116
116
 
117
- function if_4({ hasLoaded, muzes }) {
117
+ function if_4({ a: hasLoaded, b: muzes }) {
118
118
  if (hasLoaded) return consequent_3;
119
119
  }
120
120
 
121
- var root_3 = _$_.template(`<div class="feed"><!></div>`, 0);
121
+ var root_3 = _$_.template(`<div class=feed><!>`);
122
122
 
123
123
  function IfFragmentForIfIf_render(__anchor, __block) {
124
124
  const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
@@ -128,7 +128,7 @@ function IfFragmentForIfIf_render(__anchor, __block) {
128
128
  {
129
129
  var node_2 = _$_.hydrating ? _$_.hydrate_child() : div_1.firstChild;
130
130
 
131
- _$_.if(node_2, if_4, false, { hasLoaded, muzes });
131
+ _$_.if(node_2, if_4, false, { a: hasLoaded, b: muzes });
132
132
  _$_.hydrating && _$_.pop(div_1);
133
133
  }
134
134
 
@@ -137,7 +137,7 @@ function IfFragmentForIfIf_render(__anchor, __block) {
137
137
 
138
138
  IfFragmentForIfIf[_$_.$r] = IfFragmentForIfIf_render;
139
139
 
140
- var root_9 = _$_.template(`<p class="muze">b</p><p class="muze">c</p>`, 1, 2);
140
+ var root_9 = _$_.template(`<p class=muze>b</p><p class=muze>c`, 1, 2);
141
141
 
142
142
  function consequent_4(__anchor, hasLoaded) {
143
143
  var fragment_2 = root_9();
@@ -150,7 +150,7 @@ function if_5(hasLoaded) {
150
150
  if (hasLoaded) return consequent_4;
151
151
  }
152
152
 
153
- var root_8 = _$_.template(`<div class="feed-b"><!></div>`, 0);
153
+ var root_8 = _$_.template(`<div class=feed-b><!>`);
154
154
 
155
155
  function IfFragmentElements_render(__anchor, __block) {
156
156
  const hasLoaded = true;
@@ -168,8 +168,8 @@ function IfFragmentElements_render(__anchor, __block) {
168
168
 
169
169
  IfFragmentElements[_$_.$r] = IfFragmentElements_render;
170
170
 
171
- var root_12 = _$_.template(`<p class="muze"> </p>`, 0);
172
- var root_11 = _$_.template(`<!><span class="after">after</span>`, 1, 2);
171
+ var root_12 = _$_.template(`<p class=muze> `);
172
+ var root_11 = _$_.template(`<!><span class=after>after`, 1, 2);
173
173
  var root_10 = _$_.template(`<!>`, 1, 1);
174
174
 
175
175
  function ComponentBodyFragmentControlFlow_render(__anchor, __block) {
@@ -209,8 +209,8 @@ function ComponentBodyFragmentControlFlow_render(__anchor, __block) {
209
209
 
210
210
  ComponentBodyFragmentControlFlow[_$_.$r] = ComponentBodyFragmentControlFlow_render;
211
211
 
212
- var root_14 = _$_.template(`<p class="muze"> </p>`, 0);
213
- var root_15 = _$_.template(`<!><span class="after">after</span>`, 1, 2);
212
+ var root_14 = _$_.template(`<p class=muze> `);
213
+ var root_15 = _$_.template(`<!><span class=after>after`, 1, 2);
214
214
  var root_13 = _$_.template(`<!>`, 1, 1);
215
215
 
216
216
  function ComponentBodyCodeBlockControlFlow_render(__anchor, __block) {
@@ -254,10 +254,10 @@ function ComponentBodyCodeBlockControlFlow_render(__anchor, __block) {
254
254
 
255
255
  ComponentBodyCodeBlockControlFlow[_$_.$r] = ComponentBodyCodeBlockControlFlow_render;
256
256
 
257
- var root_17 = _$_.template(`<p class="muze"> </p>`, 0);
258
- var root_18 = _$_.template(`<!><span class="after">after</span>`, 1, 2);
257
+ var root_17 = _$_.template(`<p class=muze> `);
258
+ var root_18 = _$_.template(`<!><span class=after>after`, 1, 2);
259
259
 
260
- function consequent_5(__anchor, { hasLoaded, muzes }) {
260
+ function consequent_5(__anchor, { a: hasLoaded, b: muzes }) {
261
261
  var fragment_7 = root_18();
262
262
  var expression_6 = _$_.first_child_frag(fragment_7);
263
263
 
@@ -288,11 +288,11 @@ function consequent_5(__anchor, { hasLoaded, muzes }) {
288
288
  _$_.append(__anchor, fragment_7);
289
289
  }
290
290
 
291
- function if_6({ hasLoaded, muzes }) {
291
+ function if_6({ a: hasLoaded, b: muzes }) {
292
292
  if (hasLoaded) return consequent_5;
293
293
  }
294
294
 
295
- var root_16 = _$_.template(`<div class="feed-f"><!></div>`, 0);
295
+ var root_16 = _$_.template(`<div class=feed-f><!>`);
296
296
 
297
297
  function IfCodeBlockControlFlow_render(__anchor, __block) {
298
298
  const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
@@ -302,7 +302,7 @@ function IfCodeBlockControlFlow_render(__anchor, __block) {
302
302
  {
303
303
  var node_10 = _$_.hydrating ? _$_.hydrate_child() : div_3.firstChild;
304
304
 
305
- _$_.if(node_10, if_6, false, { hasLoaded, muzes });
305
+ _$_.if(node_10, if_6, false, { a: hasLoaded, b: muzes });
306
306
  _$_.hydrating && _$_.pop(div_3);
307
307
  }
308
308
 
@@ -311,17 +311,17 @@ function IfCodeBlockControlFlow_render(__anchor, __block) {
311
311
 
312
312
  IfCodeBlockControlFlow[_$_.$r] = IfCodeBlockControlFlow_render;
313
313
 
314
- var root_20 = _$_.template(`<span class="loading">loading</span>`, 0);
315
- var root_22 = _$_.template(`<p class="muze"> </p>`, 0);
316
- var root_21 = _$_.template(`<!><span class="after">after</span>`, 1, 2);
314
+ var root_20 = _$_.template(`<span class=loading>loading`);
315
+ var root_22 = _$_.template(`<p class=muze> `);
316
+ var root_21 = _$_.template(`<!><span class=after>after`, 1, 2);
317
317
 
318
- function consequent_6(__anchor, { hasLoaded, muzes }) {
318
+ function consequent_6(__anchor, { a: hasLoaded, b: muzes }) {
319
319
  var span_2 = root_20();
320
320
 
321
321
  _$_.append(__anchor, span_2);
322
322
  }
323
323
 
324
- function alternate(__anchor, { hasLoaded, muzes }) {
324
+ function alternate(__anchor, { a: hasLoaded, b: muzes }) {
325
325
  var fragment_8 = root_21();
326
326
  var node_12 = _$_.first_child_frag(fragment_8);
327
327
 
@@ -348,11 +348,11 @@ function alternate(__anchor, { hasLoaded, muzes }) {
348
348
  _$_.append(__anchor, fragment_8);
349
349
  }
350
350
 
351
- function if_7({ hasLoaded, muzes }) {
351
+ function if_7({ a: hasLoaded, b: muzes }) {
352
352
  if (hasLoaded) return consequent_6; else return alternate;
353
353
  }
354
354
 
355
- var root_19 = _$_.template(`<div class="feed-d"><!></div>`, 0);
355
+ var root_19 = _$_.template(`<div class=feed-d><!>`);
356
356
 
357
357
  function IfElseFragment_render(__anchor, __block) {
358
358
  const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
@@ -362,7 +362,7 @@ function IfElseFragment_render(__anchor, __block) {
362
362
  {
363
363
  var node_11 = _$_.hydrating ? _$_.hydrate_child() : div_4.firstChild;
364
364
 
365
- _$_.if(node_11, if_7, false, { hasLoaded, muzes });
365
+ _$_.if(node_11, if_7, false, { a: hasLoaded, b: muzes });
366
366
  _$_.hydrating && _$_.pop(div_4);
367
367
  }
368
368
 
@@ -371,10 +371,10 @@ function IfElseFragment_render(__anchor, __block) {
371
371
 
372
372
  IfElseFragment[_$_.$r] = IfElseFragment_render;
373
373
 
374
- var root_25 = _$_.template(`<p class="muze"> </p>`, 0);
375
- var root_24 = _$_.template(`<section><!><span class="after">after</span></section>`, 0);
374
+ var root_25 = _$_.template(`<p class=muze> `);
375
+ var root_24 = _$_.template(`<section><span class=after>after`);
376
376
 
377
- function consequent_7(__anchor, { hasLoaded, muzes }) {
377
+ function consequent_7(__anchor, { a: hasLoaded, b: muzes }) {
378
378
  var section = root_24();
379
379
 
380
380
  {
@@ -405,11 +405,11 @@ function consequent_7(__anchor, { hasLoaded, muzes }) {
405
405
  _$_.append(__anchor, section);
406
406
  }
407
407
 
408
- function if_8({ hasLoaded, muzes }) {
408
+ function if_8({ a: hasLoaded, b: muzes }) {
409
409
  if (hasLoaded) return consequent_7;
410
410
  }
411
411
 
412
- var root_23 = _$_.template(`<div class="feed-e"><!></div>`, 0);
412
+ var root_23 = _$_.template(`<div class=feed-e><!>`);
413
413
 
414
414
  function IfDivFragment_render(__anchor, __block) {
415
415
  const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
@@ -419,7 +419,7 @@ function IfDivFragment_render(__anchor, __block) {
419
419
  {
420
420
  var node_13 = _$_.hydrating ? _$_.hydrate_child() : div_5.firstChild;
421
421
 
422
- _$_.if(node_13, if_8, false, { hasLoaded, muzes });
422
+ _$_.if(node_13, if_8, false, { a: hasLoaded, b: muzes });
423
423
  _$_.hydrating && _$_.pop(div_5);
424
424
  }
425
425