ripple 0.3.126 → 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 (41) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/package.json +2 -2
  3. package/src/jsx-runtime.d.ts +1128 -967
  4. package/src/runtime/internal/client/blocks.js +20 -24
  5. package/src/runtime/internal/client/constants.js +5 -5
  6. package/src/runtime/internal/client/expression.js +142 -101
  7. package/src/runtime/internal/client/for.js +217 -145
  8. package/src/runtime/internal/client/index.js +5 -1
  9. package/src/runtime/internal/client/operations.js +24 -10
  10. package/src/runtime/internal/client/render.js +22 -3
  11. package/src/runtime/internal/client/runtime.js +246 -182
  12. package/src/runtime/internal/client/selector.js +74 -0
  13. package/src/runtime/internal/client/types.d.ts +11 -0
  14. package/src/runtime/internal/server/index.js +2 -0
  15. package/tests/client/basic/basic.reactivity.test.tsrx +33 -0
  16. package/tests/client/for-selector.test.tsrx +221 -0
  17. package/tests/hydration/compiled/client/basic.js +44 -44
  18. package/tests/hydration/compiled/client/composite.js +3 -3
  19. package/tests/hydration/compiled/client/events.js +56 -29
  20. package/tests/hydration/compiled/client/for.js +76 -70
  21. package/tests/hydration/compiled/client/head.js +11 -8
  22. package/tests/hydration/compiled/client/hmr.js +4 -4
  23. package/tests/hydration/compiled/client/html-in-template.js +3 -3
  24. package/tests/hydration/compiled/client/html.js +141 -141
  25. package/tests/hydration/compiled/client/if-children.js +29 -29
  26. package/tests/hydration/compiled/client/if-fragment-controlflow.js +16 -16
  27. package/tests/hydration/compiled/client/if.js +10 -10
  28. package/tests/hydration/compiled/client/mixed-control-flow.js +26 -22
  29. package/tests/hydration/compiled/client/nested-control-flow.js +114 -92
  30. package/tests/hydration/compiled/client/portal.js +8 -8
  31. package/tests/hydration/compiled/client/reactivity.js +38 -15
  32. package/tests/hydration/compiled/client/streaming.js +16 -16
  33. package/tests/hydration/compiled/client/switch.js +4 -4
  34. package/tests/hydration/compiled/client/track-async-serialization.js +18 -18
  35. package/tests/hydration/compiled/client/try.js +8 -8
  36. package/tests/hydration/compiled/server/events.js +5 -53
  37. package/tests/hydration/compiled/server/for.js +2 -18
  38. package/tests/hydration/compiled/server/head.js +1 -9
  39. package/tests/hydration/compiled/server/html.js +1 -9
  40. package/tests/hydration/compiled/server/reactivity.js +2 -34
  41. package/tests/utils/jsx-runtime-types.test.js +106 -0
@@ -94,7 +94,7 @@ export function StaticForLoop() {
94
94
  var li = root_1();
95
95
 
96
96
  {
97
- var expression = _$_.child(li);
97
+ var expression = _$_.hydrating ? _$_.hydrate_child() : li.firstChild;
98
98
 
99
99
  _$_.expression(expression, () => item);
100
100
  _$_.pop(li);
@@ -125,7 +125,7 @@ export function ForLoopWithIndex() {
125
125
  var li_1 = root_3();
126
126
 
127
127
  {
128
- var expression_1 = _$_.child(li_1, true);
128
+ var expression_1 = _$_.hydrating ? _$_.hydrate_child(true) : li_1.firstChild;
129
129
 
130
130
  _$_.pop(li_1);
131
131
  }
@@ -164,7 +164,7 @@ export function KeyedForLoop() {
164
164
  var li_2 = root_5();
165
165
 
166
166
  {
167
- var expression_2 = _$_.child(li_2);
167
+ var expression_2 = _$_.hydrating ? _$_.hydrate_child() : li_2.firstChild;
168
168
 
169
169
  _$_.expression(expression_2, () => _$_.get(pattern).name);
170
170
  _$_.pop(li_2);
@@ -197,7 +197,7 @@ export function ReactiveForLoopAdd() {
197
197
  _$_.set(lazy, [...lazy.value, 'C']);
198
198
  };
199
199
 
200
- var ul_3 = _$_.sibling(button);
200
+ var ul_3 = _$_.hydrating ? _$_.hydrate_sibling() : button.nextSibling;
201
201
 
202
202
  {
203
203
  _$_.for(
@@ -207,7 +207,7 @@ export function ReactiveForLoopAdd() {
207
207
  var li_3 = root_8();
208
208
 
209
209
  {
210
- var expression_3 = _$_.child(li_3);
210
+ var expression_3 = _$_.hydrating ? _$_.hydrate_child() : li_3.firstChild;
211
211
 
212
212
  _$_.expression(expression_3, () => item);
213
213
  _$_.pop(li_3);
@@ -243,7 +243,7 @@ export function ReactiveForLoopRemove() {
243
243
  _$_.set(lazy_1, _$_.with_scope(__block, () => lazy_1.value.slice(0, -1)));
244
244
  };
245
245
 
246
- var ul_4 = _$_.sibling(button_1);
246
+ var ul_4 = _$_.hydrating ? _$_.hydrate_sibling() : button_1.nextSibling;
247
247
 
248
248
  {
249
249
  _$_.for(
@@ -253,7 +253,7 @@ export function ReactiveForLoopRemove() {
253
253
  var li_4 = root_11();
254
254
 
255
255
  {
256
- var expression_4 = _$_.child(li_4);
256
+ var expression_4 = _$_.hydrating ? _$_.hydrate_child() : li_4.firstChild;
257
257
 
258
258
  _$_.expression(expression_4, () => item);
259
259
  _$_.pop(li_4);
@@ -288,16 +288,16 @@ export function ForLoopInteractive() {
288
288
  var div_1 = root_13();
289
289
 
290
290
  {
291
- var span = _$_.child(div_1);
291
+ var span = _$_.hydrating ? _$_.hydrate_child() : div_1.firstChild;
292
292
 
293
293
  {
294
- var expression_5 = _$_.child(span);
294
+ var expression_5 = _$_.hydrating ? _$_.hydrate_child() : span.firstChild;
295
295
 
296
296
  _$_.expression(expression_5, () => count);
297
297
  _$_.pop(span);
298
298
  }
299
299
 
300
- var button_2 = _$_.sibling(span);
300
+ var button_2 = _$_.hydrating ? _$_.hydrate_sibling() : span.nextSibling;
301
301
 
302
302
  button_2.__click = () => {
303
303
  const newCounts = [...lazy_2.value];
@@ -343,7 +343,7 @@ export function NestedForLoop() {
343
343
  var span_1 = root_16();
344
344
 
345
345
  {
346
- var expression_6 = _$_.child(span_1);
346
+ var expression_6 = _$_.hydrating ? _$_.hydrate_child() : span_1.firstChild;
347
347
 
348
348
  _$_.expression(expression_6, () => cell);
349
349
  _$_.pop(span_1);
@@ -390,9 +390,9 @@ export function EmptyForLoop() {
390
390
  var span_2 = root_18();
391
391
 
392
392
  {
393
- var expression_7 = _$_.child(span_2);
393
+ var expression_7 = _$_.hydrating ? _$_.hydrate_child(true) : span_2.firstChild;
394
394
 
395
- _$_.expression(expression_7, () => item);
395
+ expression_7.nodeValue = item;
396
396
  _$_.pop(span_2);
397
397
  }
398
398
 
@@ -425,19 +425,19 @@ export function ForLoopComplexObjects() {
425
425
  var div_6 = root_20();
426
426
 
427
427
  {
428
- var span_3 = _$_.child(div_6);
428
+ var span_3 = _$_.hydrating ? _$_.hydrate_child() : div_6.firstChild;
429
429
 
430
430
  {
431
- var expression_8 = _$_.child(span_3);
431
+ var expression_8 = _$_.hydrating ? _$_.hydrate_child() : span_3.firstChild;
432
432
 
433
433
  _$_.expression(expression_8, () => _$_.get(pattern_1).name);
434
434
  _$_.pop(span_3);
435
435
  }
436
436
 
437
- var span_4 = _$_.sibling(span_3);
437
+ var span_4 = _$_.hydrating ? _$_.hydrate_sibling() : span_3.nextSibling;
438
438
 
439
439
  {
440
- var expression_9 = _$_.child(span_4);
440
+ var expression_9 = _$_.hydrating ? _$_.hydrate_child() : span_4.firstChild;
441
441
 
442
442
  _$_.expression(expression_9, () => _$_.get(pattern_1).role);
443
443
  _$_.pop(span_4);
@@ -484,7 +484,7 @@ export function KeyedForLoopReorder() {
484
484
  _$_.set(lazy_3, [lazy_3.value[2], lazy_3.value[0], lazy_3.value[1]]);
485
485
  };
486
486
 
487
- var ul_5 = _$_.sibling(button_3);
487
+ var ul_5 = _$_.hydrating ? _$_.hydrate_sibling() : button_3.nextSibling;
488
488
 
489
489
  {
490
490
  _$_.for_keyed(
@@ -494,7 +494,7 @@ export function KeyedForLoopReorder() {
494
494
  var li_5 = root_23();
495
495
 
496
496
  {
497
- var expression_10 = _$_.child(li_5);
497
+ var expression_10 = _$_.hydrating ? _$_.hydrate_child() : li_5.firstChild;
498
498
 
499
499
  _$_.expression(expression_10, () => _$_.get(pattern_2).name);
500
500
  _$_.pop(li_5);
@@ -535,7 +535,7 @@ export function KeyedForLoopUpdate() {
535
535
  _$_.set(lazy_4, _$_.with_scope(__block, () => lazy_4.value.map((item) => item.id === 1 ? { ...item, name: 'Updated' } : item)));
536
536
  };
537
537
 
538
- var ul_6 = _$_.sibling(button_4);
538
+ var ul_6 = _$_.hydrating ? _$_.hydrate_sibling() : button_4.nextSibling;
539
539
 
540
540
  {
541
541
  _$_.for_keyed(
@@ -545,7 +545,7 @@ export function KeyedForLoopUpdate() {
545
545
  var li_6 = root_26();
546
546
 
547
547
  {
548
- var expression_11 = _$_.child(li_6);
548
+ var expression_11 = _$_.hydrating ? _$_.hydrate_child() : li_6.firstChild;
549
549
 
550
550
  _$_.expression(expression_11, () => _$_.get(pattern_3).name);
551
551
  _$_.pop(li_6);
@@ -586,7 +586,7 @@ export function ForLoopMixedOperations() {
586
586
  _$_.set(lazy_5, ['D', 'C', 'A', 'E']);
587
587
  };
588
588
 
589
- var ul_7 = _$_.sibling(button_5);
589
+ var ul_7 = _$_.hydrating ? _$_.hydrate_sibling() : button_5.nextSibling;
590
590
 
591
591
  {
592
592
  _$_.for(
@@ -598,7 +598,7 @@ export function ForLoopMixedOperations() {
598
598
  _$_.set_class(li_7, `item-${item}`, void 0, true);
599
599
 
600
600
  {
601
- var expression_12 = _$_.child(li_7);
601
+ var expression_12 = _$_.hydrating ? _$_.hydrate_child() : li_7.firstChild;
602
602
 
603
603
  _$_.expression(expression_12, () => item);
604
604
  _$_.pop(li_7);
@@ -635,13 +635,13 @@ export function ForLoopInsideIf() {
635
635
  _$_.set(lazy_6, !lazy_6.value);
636
636
  };
637
637
 
638
- var button_7 = _$_.sibling(button_6);
638
+ var button_7 = _$_.hydrating ? _$_.hydrate_sibling() : button_6.nextSibling;
639
639
 
640
640
  button_7.__click = () => {
641
641
  _$_.set(lazy_7, [...lazy_7.value, 'W']);
642
642
  };
643
643
 
644
- var node_5 = _$_.sibling(button_7);
644
+ var node_5 = _$_.hydrating ? _$_.hydrate_sibling() : button_7.nextSibling;
645
645
 
646
646
  {
647
647
  var consequent = (__anchor) => {
@@ -655,7 +655,7 @@ export function ForLoopInsideIf() {
655
655
  var li_8 = root_33();
656
656
 
657
657
  {
658
- var expression_13 = _$_.child(li_8);
658
+ var expression_13 = _$_.hydrating ? _$_.hydrate_child() : li_8.firstChild;
659
659
 
660
660
  _$_.expression(expression_13, () => item);
661
661
  _$_.pop(li_8);
@@ -698,7 +698,7 @@ export function ForLoopEmptyToPopulated() {
698
698
  _$_.set(lazy_8, ['One', 'Two', 'Three']);
699
699
  };
700
700
 
701
- var ul_9 = _$_.sibling(button_8);
701
+ var ul_9 = _$_.hydrating ? _$_.hydrate_sibling() : button_8.nextSibling;
702
702
 
703
703
  {
704
704
  _$_.for(
@@ -708,9 +708,9 @@ export function ForLoopEmptyToPopulated() {
708
708
  var li_9 = root_36();
709
709
 
710
710
  {
711
- var expression_14 = _$_.child(li_9);
711
+ var expression_14 = _$_.hydrating ? _$_.hydrate_child(true) : li_9.firstChild;
712
712
 
713
- _$_.expression(expression_14, () => item);
713
+ expression_14.nodeValue = item;
714
714
  _$_.pop(li_9);
715
715
  }
716
716
 
@@ -744,7 +744,7 @@ export function ForLoopPopulatedToEmpty() {
744
744
  _$_.set(lazy_9, []);
745
745
  };
746
746
 
747
- var ul_10 = _$_.sibling(button_9);
747
+ var ul_10 = _$_.hydrating ? _$_.hydrate_sibling() : button_9.nextSibling;
748
748
 
749
749
  {
750
750
  _$_.for(
@@ -754,7 +754,7 @@ export function ForLoopPopulatedToEmpty() {
754
754
  var li_10 = root_39();
755
755
 
756
756
  {
757
- var expression_15 = _$_.child(li_10);
757
+ var expression_15 = _$_.hydrating ? _$_.hydrate_child() : li_10.firstChild;
758
758
 
759
759
  _$_.expression(expression_15, () => item);
760
760
  _$_.pop(li_10);
@@ -782,13 +782,13 @@ export function NestedForLoopReactive() {
782
782
  var div_7 = root_40();
783
783
 
784
784
  {
785
- var button_10 = _$_.child(div_7);
785
+ var button_10 = _$_.hydrating ? _$_.hydrate_child() : div_7.firstChild;
786
786
 
787
787
  button_10.__click = () => {
788
788
  _$_.set(lazy_10, [...lazy_10.value, [5, 6]]);
789
789
  };
790
790
 
791
- var button_11 = _$_.sibling(button_10);
791
+ var button_11 = _$_.hydrating ? _$_.hydrate_sibling() : button_10.nextSibling;
792
792
 
793
793
  button_11.__click = () => {
794
794
  const newGrid = _$_.with_scope(__block, () => lazy_10.value.map((row) => [...row]));
@@ -797,7 +797,7 @@ export function NestedForLoopReactive() {
797
797
  _$_.set(lazy_10, newGrid);
798
798
  };
799
799
 
800
- var div_8 = _$_.sibling(button_11);
800
+ var div_8 = _$_.hydrating ? _$_.hydrate_sibling() : button_11.nextSibling;
801
801
 
802
802
  {
803
803
  _$_.for(
@@ -814,7 +814,7 @@ export function NestedForLoopReactive() {
814
814
  var span_5 = root_42();
815
815
 
816
816
  {
817
- var expression_16 = _$_.child(span_5);
817
+ var expression_16 = _$_.hydrating ? _$_.hydrate_child() : span_5.firstChild;
818
818
 
819
819
  _$_.expression(expression_16, () => cell);
820
820
  _$_.pop(span_5);
@@ -878,16 +878,16 @@ export function ForLoopDeeplyNested() {
878
878
  var div_11 = root_44();
879
879
 
880
880
  {
881
- var h2 = _$_.child(div_11);
881
+ var h2 = _$_.hydrating ? _$_.hydrate_child() : div_11.firstChild;
882
882
 
883
883
  {
884
- var expression_17 = _$_.child(h2);
884
+ var expression_17 = _$_.hydrating ? _$_.hydrate_child() : h2.firstChild;
885
885
 
886
886
  _$_.expression(expression_17, () => _$_.get(pattern_4).name);
887
887
  _$_.pop(h2);
888
888
  }
889
889
 
890
- var node_9 = _$_.sibling(h2);
890
+ var node_9 = _$_.hydrating ? _$_.hydrate_sibling() : h2.nextSibling;
891
891
 
892
892
  _$_.for_keyed(
893
893
  node_9,
@@ -896,16 +896,16 @@ export function ForLoopDeeplyNested() {
896
896
  var div_12 = root_45();
897
897
 
898
898
  {
899
- var h3 = _$_.child(div_12);
899
+ var h3 = _$_.hydrating ? _$_.hydrate_child() : div_12.firstChild;
900
900
 
901
901
  {
902
- var expression_18 = _$_.child(h3);
902
+ var expression_18 = _$_.hydrating ? _$_.hydrate_child() : h3.firstChild;
903
903
 
904
904
  _$_.expression(expression_18, () => _$_.get(pattern_5).name);
905
905
  _$_.pop(h3);
906
906
  }
907
907
 
908
- var ul_11 = _$_.sibling(h3);
908
+ var ul_11 = _$_.hydrating ? _$_.hydrate_sibling() : h3.nextSibling;
909
909
 
910
910
  {
911
911
  _$_.for(
@@ -915,7 +915,7 @@ export function ForLoopDeeplyNested() {
915
915
  var li_11 = root_46();
916
916
 
917
917
  {
918
- var expression_19 = _$_.child(li_11);
918
+ var expression_19 = _$_.hydrating ? _$_.hydrate_child() : li_11.firstChild;
919
919
 
920
920
  _$_.expression(expression_19, () => member);
921
921
  _$_.pop(li_11);
@@ -974,7 +974,7 @@ export function ForLoopIndexUpdate() {
974
974
  _$_.set(lazy_11, ['Zeroth', ...lazy_11.value]);
975
975
  };
976
976
 
977
- var ul_12 = _$_.sibling(button_12);
977
+ var ul_12 = _$_.hydrating ? _$_.hydrate_sibling() : button_12.nextSibling;
978
978
 
979
979
  {
980
980
  _$_.for(
@@ -984,7 +984,7 @@ export function ForLoopIndexUpdate() {
984
984
  var li_12 = root_49();
985
985
 
986
986
  {
987
- var expression_20 = _$_.child(li_12, true);
987
+ var expression_20 = _$_.hydrating ? _$_.hydrate_child(true) : li_12.firstChild;
988
988
 
989
989
  _$_.pop(li_12);
990
990
  }
@@ -1003,7 +1003,7 @@ export function ForLoopIndexUpdate() {
1003
1003
  _$_.set_class(li_12, __prev.b = __b, void 0, true);
1004
1004
  }
1005
1005
  },
1006
- { a: ' ', b: Symbol() }
1006
+ { a: ' ', b: _$_.UNINITIALIZED }
1007
1007
  );
1008
1008
 
1009
1009
  _$_.append(__anchor, li_12);
@@ -1045,7 +1045,7 @@ export function KeyedForLoopWithIndex() {
1045
1045
  _$_.set(lazy_12, [lazy_12.value[1], lazy_12.value[2], lazy_12.value[0]]);
1046
1046
  };
1047
1047
 
1048
- var ul_13 = _$_.sibling(button_13);
1048
+ var ul_13 = _$_.hydrating ? _$_.hydrate_sibling() : button_13.nextSibling;
1049
1049
 
1050
1050
  {
1051
1051
  _$_.for_keyed(
@@ -1055,14 +1055,15 @@ export function KeyedForLoopWithIndex() {
1055
1055
  var li_13 = root_52();
1056
1056
 
1057
1057
  {
1058
- var expression_21 = _$_.child(li_13, true);
1058
+ var expression_21 = _$_.hydrating ? _$_.hydrate_child(true) : li_13.firstChild;
1059
1059
 
1060
1060
  _$_.pop(li_13);
1061
1061
  }
1062
1062
 
1063
1063
  _$_.render(
1064
1064
  (__prev) => {
1065
- var __a = `[${i.value}] ${_$_.get(pattern_6).id}: ${_$_.get(pattern_6).value}`;
1065
+ var __pattern_6 = _$_.get(pattern_6);
1066
+ var __a = `[${i.value}] ${__pattern_6.id}: ${__pattern_6.value}`;
1066
1067
 
1067
1068
  if (__prev.a !== __a) {
1068
1069
  _$_.set_text(expression_21, __prev.a = __a);
@@ -1074,13 +1075,13 @@ export function KeyedForLoopWithIndex() {
1074
1075
  _$_.set_attribute(li_13, 'data-index', __prev.b = __b);
1075
1076
  }
1076
1077
 
1077
- var __c = `item-${_$_.get(pattern_6).id}`;
1078
+ var __c = `item-${__pattern_6.id}`;
1078
1079
 
1079
1080
  if (__prev.c !== __c) {
1080
1081
  _$_.set_class(li_13, __prev.c = __c, void 0, true);
1081
1082
  }
1082
1083
  },
1083
- { a: ' ', b: void 0, c: Symbol() }
1084
+ { a: ' ', b: void 0, c: _$_.UNINITIALIZED }
1084
1085
  );
1085
1086
 
1086
1087
  _$_.append(__anchor, li_13);
@@ -1111,8 +1112,8 @@ export function ForLoopWithSiblings() {
1111
1112
  var div_13 = _$_.first_child_frag(fragment_21);
1112
1113
 
1113
1114
  {
1114
- var header = _$_.child(div_13);
1115
- var node_12 = _$_.sibling(header);
1115
+ var header = _$_.hydrating ? _$_.hydrate_child() : div_13.firstChild;
1116
+ var node_12 = _$_.hydrating ? _$_.hydrate_sibling() : header.nextSibling;
1116
1117
 
1117
1118
  _$_.for(
1118
1119
  node_12,
@@ -1123,7 +1124,7 @@ export function ForLoopWithSiblings() {
1123
1124
  _$_.set_class(div_14, `item-${item}`, void 0, true);
1124
1125
 
1125
1126
  {
1126
- var expression_22 = _$_.child(div_14);
1127
+ var expression_22 = _$_.hydrating ? _$_.hydrate_child() : div_14.firstChild;
1127
1128
 
1128
1129
  _$_.expression(expression_22, () => item);
1129
1130
  _$_.pop(div_14);
@@ -1137,7 +1138,7 @@ export function ForLoopWithSiblings() {
1137
1138
  _$_.pop(div_13);
1138
1139
  }
1139
1140
 
1140
- var button_14 = _$_.sibling(div_13);
1141
+ var button_14 = _$_.hydrating ? _$_.hydrate_sibling() : div_13.nextSibling;
1141
1142
 
1142
1143
  button_14.__click = () => {
1143
1144
  _$_.set(lazy_13, [...lazy_13.value, 'C']);
@@ -1193,16 +1194,16 @@ function TodoItem(props) {
1193
1194
  var div_16 = root_57();
1194
1195
 
1195
1196
  {
1196
- var input = _$_.child(div_16);
1197
+ var input = _$_.hydrating ? _$_.hydrate_child() : div_16.firstChild;
1197
1198
 
1198
1199
  input.__change = (e) => {
1199
1200
  _$_.set(lazy_14, e.target.checked);
1200
1201
  };
1201
1202
 
1202
- var span_6 = _$_.sibling(input);
1203
+ var span_6 = _$_.hydrating ? _$_.hydrate_sibling() : input.nextSibling;
1203
1204
 
1204
1205
  {
1205
- var expression_23 = _$_.child(span_6, true);
1206
+ var expression_23 = _$_.hydrating ? _$_.hydrate_child(true) : span_6.firstChild;
1206
1207
 
1207
1208
  _$_.pop(span_6);
1208
1209
  }
@@ -1234,7 +1235,12 @@ function TodoItem(props) {
1234
1235
  _$_.set_class(div_16, __prev.d = __d, void 0, true);
1235
1236
  }
1236
1237
  },
1237
- { a: void 0, b: ' ', c: Symbol(), d: Symbol() }
1238
+ {
1239
+ a: void 0,
1240
+ b: ' ',
1241
+ c: _$_.UNINITIALIZED,
1242
+ d: _$_.UNINITIALIZED
1243
+ }
1238
1244
  );
1239
1245
 
1240
1246
  _$_.append(__anchor, div_16);
@@ -1254,7 +1260,7 @@ export function ForLoopSingleItem() {
1254
1260
  var li_14 = root_59();
1255
1261
 
1256
1262
  {
1257
- var expression_24 = _$_.child(li_14);
1263
+ var expression_24 = _$_.hydrating ? _$_.hydrate_child() : li_14.firstChild;
1258
1264
 
1259
1265
  _$_.expression(expression_24, () => item);
1260
1266
  _$_.pop(li_14);
@@ -1286,7 +1292,7 @@ export function ForLoopAddAtBeginning() {
1286
1292
  _$_.set(lazy_15, ['A', ...lazy_15.value]);
1287
1293
  };
1288
1294
 
1289
- var ul_15 = _$_.sibling(button_15);
1295
+ var ul_15 = _$_.hydrating ? _$_.hydrate_sibling() : button_15.nextSibling;
1290
1296
 
1291
1297
  {
1292
1298
  _$_.for(
@@ -1298,7 +1304,7 @@ export function ForLoopAddAtBeginning() {
1298
1304
  _$_.set_class(li_15, `item-${item}`, void 0, true);
1299
1305
 
1300
1306
  {
1301
- var expression_25 = _$_.child(li_15);
1307
+ var expression_25 = _$_.hydrating ? _$_.hydrate_child() : li_15.firstChild;
1302
1308
 
1303
1309
  _$_.expression(expression_25, () => item);
1304
1310
  _$_.pop(li_15);
@@ -1337,7 +1343,7 @@ export function ForLoopAddInMiddle() {
1337
1343
  _$_.set(lazy_16, copy);
1338
1344
  };
1339
1345
 
1340
- var ul_16 = _$_.sibling(button_16);
1346
+ var ul_16 = _$_.hydrating ? _$_.hydrate_sibling() : button_16.nextSibling;
1341
1347
 
1342
1348
  {
1343
1349
  _$_.for(
@@ -1349,7 +1355,7 @@ export function ForLoopAddInMiddle() {
1349
1355
  _$_.set_class(li_16, `item-${item}`, void 0, true);
1350
1356
 
1351
1357
  {
1352
- var expression_26 = _$_.child(li_16);
1358
+ var expression_26 = _$_.hydrating ? _$_.hydrate_child() : li_16.firstChild;
1353
1359
 
1354
1360
  _$_.expression(expression_26, () => item);
1355
1361
  _$_.pop(li_16);
@@ -1385,7 +1391,7 @@ export function ForLoopRemoveFromMiddle() {
1385
1391
  _$_.set(lazy_17, _$_.with_scope(__block, () => lazy_17.value.filter((item) => item !== 'B')));
1386
1392
  };
1387
1393
 
1388
- var ul_17 = _$_.sibling(button_17);
1394
+ var ul_17 = _$_.hydrating ? _$_.hydrate_sibling() : button_17.nextSibling;
1389
1395
 
1390
1396
  {
1391
1397
  _$_.for(
@@ -1397,7 +1403,7 @@ export function ForLoopRemoveFromMiddle() {
1397
1403
  _$_.set_class(li_17, `item-${item}`, void 0, true);
1398
1404
 
1399
1405
  {
1400
- var expression_27 = _$_.child(li_17);
1406
+ var expression_27 = _$_.hydrating ? _$_.hydrate_child() : li_17.firstChild;
1401
1407
 
1402
1408
  _$_.expression(expression_27, () => item);
1403
1409
  _$_.pop(li_17);
@@ -1432,7 +1438,7 @@ export function ForLoopLargeList() {
1432
1438
  var li_18 = root_70();
1433
1439
 
1434
1440
  {
1435
- var expression_28 = _$_.child(li_18);
1441
+ var expression_28 = _$_.hydrating ? _$_.hydrate_child() : li_18.firstChild;
1436
1442
 
1437
1443
  _$_.expression(expression_28, () => item);
1438
1444
  _$_.pop(li_18);
@@ -1471,7 +1477,7 @@ export function ForLoopSwap() {
1471
1477
  _$_.set(lazy_18, copy);
1472
1478
  };
1473
1479
 
1474
- var ul_19 = _$_.sibling(button_18);
1480
+ var ul_19 = _$_.hydrating ? _$_.hydrate_sibling() : button_18.nextSibling;
1475
1481
 
1476
1482
  {
1477
1483
  _$_.for(
@@ -1483,7 +1489,7 @@ export function ForLoopSwap() {
1483
1489
  _$_.set_class(li_19, `item-${item}`, void 0, true);
1484
1490
 
1485
1491
  {
1486
- var expression_29 = _$_.child(li_19);
1492
+ var expression_29 = _$_.hydrating ? _$_.hydrate_child() : li_19.firstChild;
1487
1493
 
1488
1494
  _$_.expression(expression_29, () => item);
1489
1495
  _$_.pop(li_19);
@@ -1519,7 +1525,7 @@ export function ForLoopReverse() {
1519
1525
  _$_.set(lazy_19, _$_.with_scope(__block, () => [...lazy_19.value].reverse()));
1520
1526
  };
1521
1527
 
1522
- var ul_20 = _$_.sibling(button_19);
1528
+ var ul_20 = _$_.hydrating ? _$_.hydrate_sibling() : button_19.nextSibling;
1523
1529
 
1524
1530
  {
1525
1531
  _$_.for(
@@ -1531,7 +1537,7 @@ export function ForLoopReverse() {
1531
1537
  _$_.set_class(li_20, `item-${item}`, void 0, true);
1532
1538
 
1533
1539
  {
1534
- var expression_30 = _$_.child(li_20);
1540
+ var expression_30 = _$_.hydrating ? _$_.hydrate_child() : li_20.firstChild;
1535
1541
 
1536
1542
  _$_.expression(expression_30, () => item);
1537
1543
  _$_.pop(li_20);
@@ -56,10 +56,10 @@ export function ReactiveTitle() {
56
56
  var div_1 = root_3();
57
57
 
58
58
  {
59
- var span = _$_.child(div_1);
59
+ var span = _$_.hydrating ? _$_.hydrate_child() : div_1.firstChild;
60
60
 
61
61
  {
62
- var expression = _$_.child(span);
62
+ var expression = _$_.hydrating ? _$_.hydrate_child() : span.firstChild;
63
63
 
64
64
  _$_.expression(expression, () => lazy.value);
65
65
  _$_.pop(span);
@@ -112,7 +112,7 @@ export function ReactiveMetaTags() {
112
112
  var div_3 = root_8();
113
113
 
114
114
  {
115
- var expression_1 = _$_.child(div_3);
115
+ var expression_1 = _$_.hydrating ? _$_.hydrate_child() : div_3.firstChild;
116
116
 
117
117
  _$_.expression(expression_1, () => lazy_1.value);
118
118
  _$_.pop(div_3);
@@ -143,7 +143,7 @@ export function TitleWithTemplate() {
143
143
  var div_4 = root_11();
144
144
 
145
145
  {
146
- var expression_2 = _$_.child(div_4);
146
+ var expression_2 = _$_.hydrating ? _$_.hydrate_child() : div_4.firstChild;
147
147
 
148
148
  _$_.expression(expression_2, () => lazy_2.value);
149
149
  _$_.pop(div_4);
@@ -192,7 +192,7 @@ export function ConditionalTitle() {
192
192
  var div_6 = root_15();
193
193
 
194
194
  {
195
- var expression_3 = _$_.child(div_6);
195
+ var expression_3 = _$_.hydrating ? _$_.hydrate_child() : div_6.firstChild;
196
196
 
197
197
  _$_.expression(expression_3, () => lazy_4.value);
198
198
  _$_.pop(div_6);
@@ -222,12 +222,11 @@ export function ComputedTitle() {
222
222
  var div_7 = root_17();
223
223
 
224
224
  {
225
- var span_1 = _$_.child(div_7);
225
+ var span_1 = _$_.hydrating ? _$_.hydrate_child() : div_7.firstChild;
226
226
 
227
227
  {
228
- var expression_4 = _$_.child(span_1);
228
+ var expression_4 = _$_.hydrating ? _$_.hydrate_child(true) : span_1.firstChild;
229
229
 
230
- _$_.expression(expression_4, () => lazy_5.value);
231
230
  _$_.pop(span_1);
232
231
  }
233
232
  }
@@ -238,6 +237,10 @@ export function ComputedTitle() {
238
237
  });
239
238
  });
240
239
 
240
+ _$_.render(() => {
241
+ _$_.set_text(expression_4, lazy_5.value);
242
+ });
243
+
241
244
  _$_.append(__anchor, div_7);
242
245
  }));
243
246
 
@@ -12,11 +12,11 @@ export function Layout({ children }) {
12
12
  var div = root();
13
13
 
14
14
  {
15
- var nav = _$_.child(div);
16
- var main = _$_.sibling(nav);
15
+ var nav = _$_.hydrating ? _$_.hydrate_child() : div.firstChild;
16
+ var main = _$_.hydrating ? _$_.hydrate_sibling() : nav.nextSibling;
17
17
 
18
18
  {
19
- var expression = _$_.child(main);
19
+ var expression = _$_.hydrating ? _$_.hydrate_child() : main.firstChild;
20
20
 
21
21
  _$_.expression(expression, () => children);
22
22
  _$_.pop(main);
@@ -33,7 +33,7 @@ export function Content() {
33
33
  var div_1 = root_1();
34
34
 
35
35
  {
36
- var node = _$_.child(div_1);
36
+ var node = _$_.hydrating ? _$_.hydrate_child() : div_1.firstChild;
37
37
 
38
38
  {
39
39
  var consequent = (__anchor) => {
@@ -32,11 +32,11 @@ export function TemplateAroundIfBlock() {
32
32
  var div = root_2();
33
33
 
34
34
  {
35
- var template_2 = _$_.child(div);
35
+ var template_2 = _$_.hydrating ? _$_.hydrate_child() : div.firstChild;
36
36
 
37
37
  template_2.innerHTML = "before" ?? template_2.innerHTML;
38
38
 
39
- var node = _$_.sibling(template_2);
39
+ var node = _$_.hydrating ? _$_.hydrate_sibling() : template_2.nextSibling;
40
40
 
41
41
  {
42
42
  var consequent = (__anchor) => {
@@ -50,7 +50,7 @@ export function TemplateAroundIfBlock() {
50
50
  });
51
51
  }
52
52
 
53
- var template_3 = _$_.sibling(node);
53
+ var template_3 = _$_.hydrating ? _$_.hydrate_sibling() : node.nextSibling;
54
54
 
55
55
  template_3.innerHTML = "after" ?? template_3.innerHTML;
56
56
  _$_.pop(div);