ripple 0.3.127 → 0.3.128

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 (39) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/package.json +2 -2
  3. package/src/runtime/internal/client/blocks.js +20 -24
  4. package/src/runtime/internal/client/constants.js +5 -5
  5. package/src/runtime/internal/client/expression.js +142 -101
  6. package/src/runtime/internal/client/for.js +217 -145
  7. package/src/runtime/internal/client/index.js +5 -1
  8. package/src/runtime/internal/client/operations.js +24 -10
  9. package/src/runtime/internal/client/render.js +22 -3
  10. package/src/runtime/internal/client/runtime.js +246 -182
  11. package/src/runtime/internal/client/selector.js +74 -0
  12. package/src/runtime/internal/client/types.d.ts +11 -0
  13. package/src/runtime/internal/server/index.js +2 -0
  14. package/tests/client/basic/basic.reactivity.test.tsrx +33 -0
  15. package/tests/client/for-selector.test.tsrx +221 -0
  16. package/tests/hydration/compiled/client/basic.js +44 -44
  17. package/tests/hydration/compiled/client/composite.js +3 -3
  18. package/tests/hydration/compiled/client/events.js +56 -29
  19. package/tests/hydration/compiled/client/for.js +76 -70
  20. package/tests/hydration/compiled/client/head.js +11 -8
  21. package/tests/hydration/compiled/client/hmr.js +4 -4
  22. package/tests/hydration/compiled/client/html-in-template.js +3 -3
  23. package/tests/hydration/compiled/client/html.js +141 -141
  24. package/tests/hydration/compiled/client/if-children.js +29 -29
  25. package/tests/hydration/compiled/client/if-fragment-controlflow.js +16 -16
  26. package/tests/hydration/compiled/client/if.js +10 -10
  27. package/tests/hydration/compiled/client/mixed-control-flow.js +26 -22
  28. package/tests/hydration/compiled/client/nested-control-flow.js +114 -92
  29. package/tests/hydration/compiled/client/portal.js +8 -8
  30. package/tests/hydration/compiled/client/reactivity.js +38 -15
  31. package/tests/hydration/compiled/client/streaming.js +16 -16
  32. package/tests/hydration/compiled/client/switch.js +4 -4
  33. package/tests/hydration/compiled/client/track-async-serialization.js +18 -18
  34. package/tests/hydration/compiled/client/try.js +8 -8
  35. package/tests/hydration/compiled/server/events.js +5 -53
  36. package/tests/hydration/compiled/server/for.js +2 -18
  37. package/tests/hydration/compiled/server/head.js +1 -9
  38. package/tests/hydration/compiled/server/html.js +1 -9
  39. package/tests/hydration/compiled/server/reactivity.js +2 -34
@@ -31,18 +31,18 @@ export function IfWithChildren({ children }) {
31
31
  var div = root();
32
32
 
33
33
  {
34
- var div_1 = _$_.child(div);
34
+ var div_1 = _$_.hydrating ? _$_.hydrate_child() : div.firstChild;
35
35
 
36
36
  div_1.__click = () => _$_.set(lazy, !lazy.value);
37
37
 
38
- var node = _$_.sibling(div_1);
38
+ var node = _$_.hydrating ? _$_.hydrate_sibling() : div_1.nextSibling;
39
39
 
40
40
  {
41
41
  var consequent = (__anchor) => {
42
42
  var div_2 = root_1();
43
43
 
44
44
  {
45
- var expression = _$_.child(div_2);
45
+ var expression = _$_.hydrating ? _$_.hydrate_child() : div_2.firstChild;
46
46
 
47
47
  _$_.expression(expression, () => children);
48
48
  _$_.pop(div_2);
@@ -68,7 +68,7 @@ export function ChildItem({ text: label }) {
68
68
  var div_3 = root_2();
69
69
 
70
70
  {
71
- var expression_1 = _$_.child(div_3, true);
71
+ var expression_1 = _$_.hydrating ? _$_.hydrate_child(true) : div_3.firstChild;
72
72
 
73
73
  expression_1.nodeValue = label;
74
74
  _$_.pop(div_3);
@@ -87,7 +87,7 @@ export function TestIfWithChildren() {
87
87
 
88
88
  _$_.render_component(ChildItem, node_1, { text: "Item 1" });
89
89
 
90
- var node_2 = _$_.sibling(node_1);
90
+ var node_2 = _$_.hydrating ? _$_.hydrate_sibling() : node_1.nextSibling;
91
91
 
92
92
  _$_.render_component(ChildItem, node_2, { text: "Item 2" });
93
93
  _$_.append(__anchor, fragment);
@@ -102,11 +102,11 @@ export function IfWithStaticChildren() {
102
102
  var div_4 = root_4();
103
103
 
104
104
  {
105
- var div_5 = _$_.child(div_4);
105
+ var div_5 = _$_.hydrating ? _$_.hydrate_child() : div_4.firstChild;
106
106
 
107
107
  div_5.__click = () => _$_.set(lazy_1, !lazy_1.value);
108
108
 
109
- var node_3 = _$_.sibling(div_5);
109
+ var node_3 = _$_.hydrating ? _$_.hydrate_sibling() : div_5.nextSibling;
110
110
 
111
111
  {
112
112
  var consequent_1 = (__anchor) => {
@@ -133,19 +133,19 @@ export function IfWithSiblingsAndChildren({ children }) {
133
133
  var section = root_6();
134
134
 
135
135
  {
136
- var div_7 = _$_.child(section);
136
+ var div_7 = _$_.hydrating ? _$_.hydrate_child() : section.firstChild;
137
137
 
138
138
  div_7.__click = () => _$_.set(lazy_2, !lazy_2.value);
139
139
  _$_.pop(div_7);
140
140
 
141
- var node_4 = _$_.sibling(div_7);
141
+ var node_4 = _$_.hydrating ? _$_.hydrate_sibling() : div_7.nextSibling;
142
142
 
143
143
  {
144
144
  var consequent_2 = (__anchor) => {
145
145
  var div_8 = root_7();
146
146
 
147
147
  {
148
- var expression_2 = _$_.child(div_8);
148
+ var expression_2 = _$_.hydrating ? _$_.hydrate_child() : div_8.firstChild;
149
149
 
150
150
  _$_.expression(expression_2, () => children);
151
151
  _$_.pop(div_8);
@@ -175,7 +175,7 @@ export function TestIfWithSiblingsAndChildren() {
175
175
 
176
176
  _$_.render_component(ChildItem, node_5, { text: "Item A" });
177
177
 
178
- var node_6 = _$_.sibling(node_5);
178
+ var node_6 = _$_.hydrating ? _$_.hydrate_sibling() : node_5.nextSibling;
179
179
 
180
180
  _$_.render_component(ChildItem, node_6, { text: "Item B" });
181
181
  _$_.append(__anchor, fragment_1);
@@ -195,11 +195,11 @@ export function ElementWithChildrenThenIf() {
195
195
  var div_10 = _$_.first_child_frag(fragment_3);
196
196
 
197
197
  {
198
- var div_9 = _$_.child(div_10);
198
+ var div_9 = _$_.hydrating ? _$_.hydrate_child() : div_10.firstChild;
199
199
 
200
200
  _$_.pop(div_9);
201
201
 
202
- var node_7 = _$_.sibling(div_9);
202
+ var node_7 = _$_.hydrating ? _$_.hydrate_sibling() : div_9.nextSibling;
203
203
 
204
204
  {
205
205
  var consequent_3 = (__anchor) => {
@@ -216,7 +216,7 @@ export function ElementWithChildrenThenIf() {
216
216
  _$_.pop(div_10);
217
217
  }
218
218
 
219
- var button = _$_.sibling(div_10);
219
+ var button = _$_.hydrating ? _$_.hydrate_sibling() : div_10.nextSibling;
220
220
 
221
221
  button.__click = () => _$_.set(lazy_3, !lazy_3.value);
222
222
  _$_.next();
@@ -238,11 +238,11 @@ export function DeepNestingThenIf() {
238
238
  var section_1 = _$_.first_child_frag(fragment_5);
239
239
 
240
240
  {
241
- var article = _$_.child(section_1);
241
+ var article = _$_.hydrating ? _$_.hydrate_child() : section_1.firstChild;
242
242
 
243
243
  _$_.pop(article);
244
244
 
245
- var node_9 = _$_.sibling(article);
245
+ var node_9 = _$_.hydrating ? _$_.hydrate_sibling() : article.nextSibling;
246
246
 
247
247
  {
248
248
  var consequent_4 = (__anchor) => {
@@ -259,7 +259,7 @@ export function DeepNestingThenIf() {
259
259
  _$_.pop(section_1);
260
260
  }
261
261
 
262
- var button_1 = _$_.sibling(section_1);
262
+ var button_1 = _$_.hydrating ? _$_.hydrate_sibling() : section_1.nextSibling;
263
263
 
264
264
  button_1.__click = () => _$_.set(lazy_4, !lazy_4.value);
265
265
  _$_.next();
@@ -276,24 +276,24 @@ export function DomElementChildrenThenSibling() {
276
276
  var div_12 = root_15();
277
277
 
278
278
  {
279
- var div_13 = _$_.child(div_12);
279
+ var div_13 = _$_.hydrating ? _$_.hydrate_child() : div_12.firstChild;
280
280
 
281
281
  {
282
- var button_2 = _$_.child(div_13);
282
+ var button_2 = _$_.hydrating ? _$_.hydrate_child() : div_13.firstChild;
283
283
 
284
284
  button_2.__click = () => _$_.set(lazy_5, 'code');
285
285
 
286
- var button_3 = _$_.sibling(button_2);
286
+ var button_3 = _$_.hydrating ? _$_.hydrate_sibling() : button_2.nextSibling;
287
287
 
288
288
  button_3.__click = () => _$_.set(lazy_5, 'preview');
289
289
  }
290
290
 
291
291
  _$_.pop(div_13);
292
292
 
293
- var div_14 = _$_.sibling(div_13);
293
+ var div_14 = _$_.hydrating ? _$_.hydrate_sibling() : div_13.nextSibling;
294
294
 
295
295
  {
296
- var node_11 = _$_.child(div_14);
296
+ var node_11 = _$_.hydrating ? _$_.hydrate_child() : div_14.firstChild;
297
297
 
298
298
  {
299
299
  var consequent_5 = (__anchor) => {
@@ -349,13 +349,13 @@ export function DomChildrenThenStaticSiblings() {
349
349
  var div_16 = _$_.first_child_frag(fragment_7);
350
350
 
351
351
  {
352
- var ul = _$_.child(div_16);
352
+ var ul = _$_.hydrating ? _$_.hydrate_child() : div_16.firstChild;
353
353
 
354
354
  {
355
- var li = _$_.child(ul);
355
+ var li = _$_.hydrating ? _$_.hydrate_child() : ul.firstChild;
356
356
 
357
357
  {
358
- var expression_3 = _$_.child(li, true);
358
+ var expression_3 = _$_.hydrating ? _$_.hydrate_child(true) : li.firstChild;
359
359
 
360
360
  _$_.pop(li);
361
361
  }
@@ -366,7 +366,7 @@ export function DomChildrenThenStaticSiblings() {
366
366
 
367
367
  _$_.pop(div_16);
368
368
 
369
- var button_4 = _$_.sibling(div_16);
369
+ var button_4 = _$_.hydrating ? _$_.hydrate_sibling() : div_16.nextSibling;
370
370
 
371
371
  button_4.__click = () => _$_.update(lazy_6);
372
372
  _$_.next();
@@ -387,14 +387,14 @@ export function StaticListThenStaticSiblings() {
387
387
  var div_17 = root_20();
388
388
 
389
389
  {
390
- var ul_1 = _$_.child(div_17);
390
+ var ul_1 = _$_.hydrating ? _$_.hydrate_child() : div_17.firstChild;
391
391
 
392
392
  {
393
- var li_1 = _$_.child(ul_1);
393
+ var li_1 = _$_.hydrating ? _$_.hydrate_child() : ul_1.firstChild;
394
394
 
395
395
  _$_.pop(li_1);
396
396
 
397
- var li_2 = _$_.sibling(li_1);
397
+ var li_2 = _$_.hydrating ? _$_.hydrate_sibling() : li_1.nextSibling;
398
398
 
399
399
  _$_.pop(li_2);
400
400
  }
@@ -35,7 +35,7 @@ export function IfFragmentForElement() {
35
35
  var div = root();
36
36
 
37
37
  {
38
- var node = _$_.child(div);
38
+ var node = _$_.hydrating ? _$_.hydrate_child() : div.firstChild;
39
39
 
40
40
  {
41
41
  var consequent = (__anchor) => {
@@ -49,7 +49,7 @@ export function IfFragmentForElement() {
49
49
  var p = root_2();
50
50
 
51
51
  {
52
- var expression = _$_.child(p);
52
+ var expression = _$_.hydrating ? _$_.hydrate_child() : p.firstChild;
53
53
 
54
54
  _$_.expression(expression, () => _$_.get(pattern).muzeId);
55
55
  _$_.pop(p);
@@ -83,7 +83,7 @@ export function IfFragmentForIfIf() {
83
83
  var div_1 = root_3();
84
84
 
85
85
  {
86
- var node_2 = _$_.child(div_1);
86
+ var node_2 = _$_.hydrating ? _$_.hydrate_child() : div_1.firstChild;
87
87
 
88
88
  {
89
89
  var consequent_3 = (__anchor) => {
@@ -97,7 +97,7 @@ export function IfFragmentForIfIf() {
97
97
  var p_1 = root_5();
98
98
 
99
99
  {
100
- var expression_1 = _$_.child(p_1);
100
+ var expression_1 = _$_.hydrating ? _$_.hydrate_child() : p_1.firstChild;
101
101
 
102
102
  _$_.expression(expression_1, () => _$_.get(pattern_1).muzeId);
103
103
  _$_.pop(p_1);
@@ -109,7 +109,7 @@ export function IfFragmentForIfIf() {
109
109
  (pattern_1) => _$_.get(pattern_1).muzeId
110
110
  );
111
111
 
112
- var node_4 = _$_.sibling(node_3);
112
+ var node_4 = _$_.hydrating ? _$_.hydrate_sibling() : node_3.nextSibling;
113
113
 
114
114
  {
115
115
  var consequent_1 = (__anchor) => {
@@ -123,7 +123,7 @@ export function IfFragmentForIfIf() {
123
123
  });
124
124
  }
125
125
 
126
- var node_5 = _$_.sibling(node_4);
126
+ var node_5 = _$_.hydrating ? _$_.hydrate_sibling() : node_4.nextSibling;
127
127
 
128
128
  {
129
129
  var consequent_2 = (__anchor) => {
@@ -158,7 +158,7 @@ export function IfFragmentElements() {
158
158
  var div_2 = root_8();
159
159
 
160
160
  {
161
- var node_6 = _$_.child(div_2);
161
+ var node_6 = _$_.hydrating ? _$_.hydrate_child() : div_2.firstChild;
162
162
 
163
163
  {
164
164
  var consequent_4 = (__anchor) => {
@@ -196,7 +196,7 @@ export function ComponentBodyFragmentControlFlow() {
196
196
  var p_2 = root_12();
197
197
 
198
198
  {
199
- var expression_2 = _$_.child(p_2);
199
+ var expression_2 = _$_.hydrating ? _$_.hydrate_child() : p_2.firstChild;
200
200
 
201
201
  _$_.expression(expression_2, () => _$_.get(pattern_2).muzeId);
202
202
  _$_.pop(p_2);
@@ -235,7 +235,7 @@ export function ComponentBodyCodeBlockControlFlow() {
235
235
  var p_3 = root_14();
236
236
 
237
237
  {
238
- var expression_3 = _$_.child(p_3);
238
+ var expression_3 = _$_.hydrating ? _$_.hydrate_child() : p_3.firstChild;
239
239
 
240
240
  _$_.expression(expression_3, () => _$_.get(pattern_3).muzeId);
241
241
  _$_.pop(p_3);
@@ -262,7 +262,7 @@ export function IfCodeBlockControlFlow() {
262
262
  var div_3 = root_16();
263
263
 
264
264
  {
265
- var node_10 = _$_.child(div_3);
265
+ var node_10 = _$_.hydrating ? _$_.hydrate_child() : div_3.firstChild;
266
266
 
267
267
  {
268
268
  var consequent_5 = (__anchor) => {
@@ -279,7 +279,7 @@ export function IfCodeBlockControlFlow() {
279
279
  var p_4 = root_17();
280
280
 
281
281
  {
282
- var expression_5 = _$_.child(p_4);
282
+ var expression_5 = _$_.hydrating ? _$_.hydrate_child() : p_4.firstChild;
283
283
 
284
284
  _$_.expression(expression_5, () => _$_.get(pattern_4).muzeId);
285
285
  _$_.pop(p_4);
@@ -314,7 +314,7 @@ export function IfElseFragment() {
314
314
  var div_4 = root_19();
315
315
 
316
316
  {
317
- var node_11 = _$_.child(div_4);
317
+ var node_11 = _$_.hydrating ? _$_.hydrate_child() : div_4.firstChild;
318
318
 
319
319
  {
320
320
  var consequent_6 = (__anchor) => {
@@ -334,7 +334,7 @@ export function IfElseFragment() {
334
334
  var p_5 = root_22();
335
335
 
336
336
  {
337
- var expression_7 = _$_.child(p_5);
337
+ var expression_7 = _$_.hydrating ? _$_.hydrate_child() : p_5.firstChild;
338
338
 
339
339
  _$_.expression(expression_7, () => _$_.get(pattern_5).muzeId);
340
340
  _$_.pop(p_5);
@@ -368,14 +368,14 @@ export function IfDivFragment() {
368
368
  var div_5 = root_23();
369
369
 
370
370
  {
371
- var node_13 = _$_.child(div_5);
371
+ var node_13 = _$_.hydrating ? _$_.hydrate_child() : div_5.firstChild;
372
372
 
373
373
  {
374
374
  var consequent_7 = (__anchor) => {
375
375
  var section = root_24();
376
376
 
377
377
  {
378
- var node_14 = _$_.child(section);
378
+ var node_14 = _$_.hydrating ? _$_.hydrate_child() : section.firstChild;
379
379
 
380
380
  _$_.for_keyed(
381
381
  node_14,
@@ -384,7 +384,7 @@ export function IfDivFragment() {
384
384
  var p_6 = root_25();
385
385
 
386
386
  {
387
- var expression_8 = _$_.child(p_6);
387
+ var expression_8 = _$_.hydrating ? _$_.hydrate_child() : p_6.firstChild;
388
388
 
389
389
  _$_.expression(expression_8, () => _$_.get(pattern_6).muzeId);
390
390
  _$_.pop(p_6);
@@ -109,7 +109,7 @@ export function ReactiveIf() {
109
109
  _$_.set(lazy, !lazy.value);
110
110
  };
111
111
 
112
- var node = _$_.sibling(button);
112
+ var node = _$_.hydrating ? _$_.hydrate_sibling() : button.nextSibling;
113
113
 
114
114
  {
115
115
  var consequent_3 = (__anchor) => {
@@ -144,7 +144,7 @@ export function ReactiveIfElse() {
144
144
  _$_.set(lazy_1, !lazy_1.value);
145
145
  };
146
146
 
147
- var node_2 = _$_.sibling(button_1);
147
+ var node_2 = _$_.hydrating ? _$_.hydrate_sibling() : button_1.nextSibling;
148
148
 
149
149
  {
150
150
  var consequent_4 = (__anchor) => {
@@ -186,21 +186,21 @@ export function NestedIf() {
186
186
  _$_.set(lazy_2, !lazy_2.value);
187
187
  };
188
188
 
189
- var button_3 = _$_.sibling(button_2);
189
+ var button_3 = _$_.hydrating ? _$_.hydrate_sibling() : button_2.nextSibling;
190
190
 
191
191
  button_3.__click = () => {
192
192
  _$_.set(lazy_3, !lazy_3.value);
193
193
  };
194
194
 
195
- var node_4 = _$_.sibling(button_3);
195
+ var node_4 = _$_.hydrating ? _$_.hydrate_sibling() : button_3.nextSibling;
196
196
 
197
197
  {
198
198
  var consequent_6 = (__anchor) => {
199
199
  var div_7 = root_13();
200
200
 
201
201
  {
202
- var expression = _$_.child(div_7);
203
- var node_5 = _$_.sibling(expression);
202
+ var expression = _$_.hydrating ? _$_.hydrate_child() : div_7.firstChild;
203
+ var node_5 = _$_.hydrating ? _$_.hydrate_sibling() : expression.nextSibling;
204
204
 
205
205
  {
206
206
  var consequent_5 = (__anchor) => {
@@ -238,25 +238,25 @@ export function IfElseIfChain() {
238
238
  var div_8 = root_15();
239
239
 
240
240
  {
241
- var button_4 = _$_.child(div_8);
241
+ var button_4 = _$_.hydrating ? _$_.hydrate_child() : div_8.firstChild;
242
242
 
243
243
  button_4.__click = () => {
244
244
  _$_.set(lazy_4, 'success');
245
245
  };
246
246
 
247
- var button_5 = _$_.sibling(button_4);
247
+ var button_5 = _$_.hydrating ? _$_.hydrate_sibling() : button_4.nextSibling;
248
248
 
249
249
  button_5.__click = () => {
250
250
  _$_.set(lazy_4, 'error');
251
251
  };
252
252
 
253
- var button_6 = _$_.sibling(button_5);
253
+ var button_6 = _$_.hydrating ? _$_.hydrate_sibling() : button_5.nextSibling;
254
254
 
255
255
  button_6.__click = () => {
256
256
  _$_.set(lazy_4, 'loading');
257
257
  };
258
258
 
259
- var node_7 = _$_.sibling(button_6);
259
+ var node_7 = _$_.hydrating ? _$_.hydrate_sibling() : button_6.nextSibling;
260
260
 
261
261
  {
262
262
  var consequent_7 = (__anchor) => {
@@ -46,26 +46,27 @@ export function MixedControlFlowStatic() {
46
46
  var div = root_1();
47
47
 
48
48
  {
49
- var expression = _$_.child(div, true);
49
+ var expression = _$_.hydrating ? _$_.hydrate_child(true) : div.firstChild;
50
50
 
51
51
  _$_.pop(div);
52
52
  }
53
53
 
54
54
  _$_.render(
55
55
  (__prev) => {
56
- var __a = `A-${_$_.get(pattern).id}`;
56
+ var __pattern = _$_.get(pattern);
57
+ var __a = `A-${__pattern.id}`;
57
58
 
58
59
  if (__prev.a !== __a) {
59
60
  _$_.set_text(expression, __prev.a = __a);
60
61
  }
61
62
 
62
- var __b = `row row-${_$_.get(pattern).id} kind-a`;
63
+ var __b = `row row-${__pattern.id} kind-a`;
63
64
 
64
65
  if (__prev.b !== __b) {
65
66
  _$_.set_class(div, __prev.b = __b, void 0, true);
66
67
  }
67
68
  },
68
- { a: ' ', b: Symbol() }
69
+ { a: ' ', b: _$_.UNINITIALIZED }
69
70
  );
70
71
 
71
72
  _$_.append(__anchor, div);
@@ -91,26 +92,27 @@ export function MixedControlFlowStatic() {
91
92
  var div_2 = root_3();
92
93
 
93
94
  {
94
- var expression_1 = _$_.child(div_2, true);
95
+ var expression_1 = _$_.hydrating ? _$_.hydrate_child(true) : div_2.firstChild;
95
96
 
96
97
  _$_.pop(div_2);
97
98
  }
98
99
 
99
100
  _$_.render(
100
101
  (__prev) => {
101
- var __a = `B-${_$_.get(pattern).id}`;
102
+ var __pattern_1 = _$_.get(pattern);
103
+ var __a = `B-${__pattern_1.id}`;
102
104
 
103
105
  if (__prev.a !== __a) {
104
106
  _$_.set_text(expression_1, __prev.a = __a);
105
107
  }
106
108
 
107
- var __b = `row row-${_$_.get(pattern).id} kind-b`;
109
+ var __b = `row row-${__pattern_1.id} kind-b`;
108
110
 
109
111
  if (__prev.b !== __b) {
110
112
  _$_.set_class(div_2, __prev.b = __b, void 0, true);
111
113
  }
112
114
  },
113
- { a: ' ', b: Symbol() }
115
+ { a: ' ', b: _$_.UNINITIALIZED }
114
116
  );
115
117
 
116
118
  _$_.append(__anchor, div_2);
@@ -185,19 +187,19 @@ export function MixedControlFlowReactive() {
185
187
  _$_.set(lazy, !lazy.value);
186
188
  };
187
189
 
188
- var button_1 = _$_.sibling(button);
190
+ var button_1 = _$_.hydrating ? _$_.hydrate_sibling() : button.nextSibling;
189
191
 
190
192
  button_1.__click = () => {
191
193
  _$_.set(lazy_1, lazy_1.value === 'a' ? 'b' : 'a');
192
194
  };
193
195
 
194
- var button_2 = _$_.sibling(button_1);
196
+ var button_2 = _$_.hydrating ? _$_.hydrate_sibling() : button_1.nextSibling;
195
197
 
196
198
  button_2.__click = () => {
197
199
  _$_.set(lazy_2, [...lazy_2.value, { id: 3, label: 'Three' }]);
198
200
  };
199
201
 
200
- var node = _$_.sibling(button_2);
202
+ var node = _$_.hydrating ? _$_.hydrate_sibling() : button_2.nextSibling;
201
203
 
202
204
  {
203
205
  var consequent_1 = (__anchor) => {
@@ -216,26 +218,27 @@ export function MixedControlFlowReactive() {
216
218
  var p = root_8();
217
219
 
218
220
  {
219
- var expression_2 = _$_.child(p, true);
221
+ var expression_2 = _$_.hydrating ? _$_.hydrate_child(true) : p.firstChild;
220
222
 
221
223
  _$_.pop(p);
222
224
  }
223
225
 
224
226
  _$_.render(
225
227
  (__prev) => {
226
- var __a = `A:${_$_.get(pattern_1).label}`;
228
+ var __pattern_1_1 = _$_.get(pattern_1);
229
+ var __a = `A:${__pattern_1_1.label}`;
227
230
 
228
231
  if (__prev.a !== __a) {
229
232
  _$_.set_text(expression_2, __prev.a = __a);
230
233
  }
231
234
 
232
- var __b = `item item-${_$_.get(pattern_1).id}`;
235
+ var __b = `item item-${__pattern_1_1.id}`;
233
236
 
234
237
  if (__prev.b !== __b) {
235
238
  _$_.set_class(p, __prev.b = __b, void 0, true);
236
239
  }
237
240
  },
238
- { a: ' ', b: Symbol() }
241
+ { a: ' ', b: _$_.UNINITIALIZED }
239
242
  );
240
243
 
241
244
  _$_.append(__anchor, p);
@@ -257,26 +260,27 @@ export function MixedControlFlowReactive() {
257
260
  var p_2 = root_10();
258
261
 
259
262
  {
260
- var expression_3 = _$_.child(p_2, true);
263
+ var expression_3 = _$_.hydrating ? _$_.hydrate_child(true) : p_2.firstChild;
261
264
 
262
265
  _$_.pop(p_2);
263
266
  }
264
267
 
265
268
  _$_.render(
266
269
  (__prev) => {
267
- var __a = `B:${_$_.get(pattern_1).label}`;
270
+ var __pattern_1_2 = _$_.get(pattern_1);
271
+ var __a = `B:${__pattern_1_2.label}`;
268
272
 
269
273
  if (__prev.a !== __a) {
270
274
  _$_.set_text(expression_3, __prev.a = __a);
271
275
  }
272
276
 
273
- var __b = `item item-${_$_.get(pattern_1).id}`;
277
+ var __b = `item item-${__pattern_1_2.id}`;
274
278
 
275
279
  if (__prev.b !== __b) {
276
280
  _$_.set_class(p_2, __prev.b = __b, void 0, true);
277
281
  }
278
282
  },
279
- { a: ' ', b: Symbol() }
283
+ { a: ' ', b: _$_.UNINITIALIZED }
280
284
  );
281
285
 
282
286
  _$_.append(__anchor, p_2);
@@ -342,7 +346,7 @@ export function MixedControlFlowAsyncPending() {
342
346
  _$_.expression(node_3, () => _$_.tsrx_element((__anchor, __block) => {
343
347
  var fragment_3 = root_13();
344
348
  var div_5 = _$_.first_child_frag(fragment_3);
345
- var node_2 = _$_.sibling(div_5);
349
+ var node_2 = _$_.hydrating ? _$_.hydrate_sibling() : div_5.nextSibling;
346
350
 
347
351
  _$_.for(
348
352
  node_2,
@@ -364,7 +368,7 @@ export function MixedControlFlowAsyncPending() {
364
368
  _$_.set_class(div_6, `pending-row pending-row-${row}`, void 0, true);
365
369
 
366
370
  {
367
- var expression_4 = _$_.child(div_6, true);
371
+ var expression_4 = _$_.hydrating ? _$_.hydrate_child(true) : div_6.firstChild;
368
372
 
369
373
  expression_4.nodeValue = `pending ${row}`;
370
374
  _$_.pop(div_6);
@@ -427,7 +431,7 @@ function AsyncRow({ label }) {
427
431
  var div_8 = root_16();
428
432
 
429
433
  {
430
- var expression_5 = _$_.child(div_8);
434
+ var expression_5 = _$_.hydrating ? _$_.hydrate_child() : div_8.firstChild;
431
435
 
432
436
  _$_.expression(expression_5, () => lazy_3.value);
433
437
  _$_.pop(div_8);