ripple 0.3.72 → 0.3.74

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 (165) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/package.json +3 -3
  3. package/src/jsx-runtime.d.ts +2 -8
  4. package/src/runtime/index-client.js +3 -13
  5. package/src/runtime/internal/client/blocks.js +3 -25
  6. package/src/runtime/internal/client/for.js +80 -5
  7. package/src/runtime/internal/client/index.js +0 -2
  8. package/src/runtime/internal/client/types.d.ts +0 -10
  9. package/tests/client/__snapshots__/computed-properties.test.tsrx.snap +8 -0
  10. package/tests/client/__snapshots__/for.test.tsrx.snap +22 -0
  11. package/tests/client/__snapshots__/html.test.tsrx.snap +4 -0
  12. package/tests/client/array/array.copy-within.test.tsrx +19 -19
  13. package/tests/client/array/array.derived.test.tsrx +97 -109
  14. package/tests/client/array/array.iteration.test.tsrx +28 -28
  15. package/tests/client/array/array.mutations.test.tsrx +68 -68
  16. package/tests/client/array/array.static.test.tsrx +82 -92
  17. package/tests/client/array/array.to-methods.test.tsrx +15 -15
  18. package/tests/client/async-suspend.test.tsrx +180 -179
  19. package/tests/client/basic/__snapshots__/basic.attributes.test.tsrx.snap +2 -0
  20. package/tests/client/basic/__snapshots__/basic.rendering.test.tsrx.snap +4 -0
  21. package/tests/client/basic/basic.attributes.test.tsrx +273 -317
  22. package/tests/client/basic/basic.collections.test.tsrx +55 -61
  23. package/tests/client/basic/basic.components.test.tsrx +196 -218
  24. package/tests/client/basic/basic.errors.test.tsrx +70 -76
  25. package/tests/client/basic/basic.events.test.tsrx +80 -85
  26. package/tests/client/basic/basic.get-set.test.tsrx +54 -64
  27. package/tests/client/basic/basic.hmr.test.tsrx +15 -19
  28. package/tests/client/basic/basic.reactivity.test.tsrx +121 -135
  29. package/tests/client/basic/basic.rendering.test.tsrx +273 -178
  30. package/tests/client/basic/basic.utilities.test.tsrx +8 -10
  31. package/tests/client/boundaries.test.tsrx +18 -18
  32. package/tests/client/compiler/compiler.assignments.test.tsrx +77 -76
  33. package/tests/client/compiler/compiler.attributes.test.tsrx +18 -14
  34. package/tests/client/compiler/compiler.basic.test.tsrx +357 -288
  35. package/tests/client/compiler/compiler.regex.test.tsrx +40 -44
  36. package/tests/client/compiler/compiler.tracked-access.test.tsrx +57 -38
  37. package/tests/client/compiler/compiler.try-in-function.test.tsrx +16 -16
  38. package/tests/client/compiler/compiler.typescript.test.tsrx +4 -3
  39. package/tests/client/composite/composite.dynamic-components.test.tsrx +41 -44
  40. package/tests/client/composite/composite.generics.test.tsrx +165 -167
  41. package/tests/client/composite/composite.props.test.tsrx +66 -74
  42. package/tests/client/composite/composite.reactivity.test.tsrx +132 -166
  43. package/tests/client/composite/composite.render.test.tsrx +92 -101
  44. package/tests/client/computed-properties.test.tsrx +14 -18
  45. package/tests/client/context.test.tsrx +14 -18
  46. package/tests/client/css/global-additional-cases.test.tsrx +491 -437
  47. package/tests/client/css/global-advanced-selectors.test.tsrx +169 -153
  48. package/tests/client/css/global-at-rules.test.tsrx +71 -66
  49. package/tests/client/css/global-basic.test.tsrx +105 -98
  50. package/tests/client/css/global-classes-ids.test.tsrx +128 -114
  51. package/tests/client/css/global-combinators.test.tsrx +83 -78
  52. package/tests/client/css/global-complex-nesting.test.tsrx +134 -120
  53. package/tests/client/css/global-edge-cases.test.tsrx +138 -120
  54. package/tests/client/css/global-keyframes.test.tsrx +108 -96
  55. package/tests/client/css/global-nested.test.tsrx +88 -78
  56. package/tests/client/css/global-pseudo.test.tsrx +104 -98
  57. package/tests/client/css/global-scoping.test.tsrx +145 -125
  58. package/tests/client/css/style-identifier.test.tsrx +62 -69
  59. package/tests/client/date.test.tsrx +83 -83
  60. package/tests/client/dynamic-elements.test.tsrx +227 -283
  61. package/tests/client/events.test.tsrx +252 -266
  62. package/tests/client/for.test.tsrx +120 -127
  63. package/tests/client/head.test.tsrx +40 -48
  64. package/tests/client/html.test.tsrx +37 -49
  65. package/tests/client/input-value.test.tsrx +1125 -1354
  66. package/tests/client/lazy-array.test.tsrx +10 -16
  67. package/tests/client/lazy-destructuring.test.tsrx +169 -221
  68. package/tests/client/map.test.tsrx +39 -41
  69. package/tests/client/media-query.test.tsrx +15 -19
  70. package/tests/client/object.test.tsrx +46 -56
  71. package/tests/client/portal.test.tsrx +31 -37
  72. package/tests/client/ref.test.tsrx +173 -193
  73. package/tests/client/return.test.tsrx +62 -37
  74. package/tests/client/set.test.tsrx +33 -33
  75. package/tests/client/svg.test.tsrx +195 -215
  76. package/tests/client/switch.test.tsrx +201 -191
  77. package/tests/client/track-async-hydration.test.tsrx +14 -18
  78. package/tests/client/tracked-index-access.test.tsrx +18 -28
  79. package/tests/client/try.test.tsrx +494 -619
  80. package/tests/client/tsx.test.tsrx +286 -292
  81. package/tests/client/typescript-generics.test.tsrx +121 -129
  82. package/tests/client/url/url.derived.test.tsrx +21 -25
  83. package/tests/client/url/url.parsing.test.tsrx +35 -35
  84. package/tests/client/url/url.partial-removal.test.tsrx +32 -32
  85. package/tests/client/url/url.reactivity.test.tsrx +68 -72
  86. package/tests/client/url/url.serialization.test.tsrx +8 -8
  87. package/tests/client/url-search-params/url-search-params.derived.test.tsrx +21 -27
  88. package/tests/client/url-search-params/url-search-params.initialization.test.tsrx +16 -16
  89. package/tests/client/url-search-params/url-search-params.iteration.test.tsrx +37 -37
  90. package/tests/client/url-search-params/url-search-params.mutation.test.tsrx +56 -60
  91. package/tests/client/url-search-params/url-search-params.retrieval.test.tsrx +32 -34
  92. package/tests/client/url-search-params/url-search-params.serialization.test.tsrx +9 -9
  93. package/tests/client/url-search-params/url-search-params.tracked-url.test.tsrx +10 -10
  94. package/tests/hydration/compiled/client/basic.js +390 -319
  95. package/tests/hydration/compiled/client/composite.js +52 -44
  96. package/tests/hydration/compiled/client/for.js +734 -604
  97. package/tests/hydration/compiled/client/head.js +183 -103
  98. package/tests/hydration/compiled/client/html.js +93 -86
  99. package/tests/hydration/compiled/client/if-children.js +95 -71
  100. package/tests/hydration/compiled/client/if.js +113 -89
  101. package/tests/hydration/compiled/client/mixed-control-flow.js +225 -209
  102. package/tests/hydration/compiled/client/nested-control-flow.js +94 -98
  103. package/tests/hydration/compiled/client/reactivity.js +26 -24
  104. package/tests/hydration/compiled/client/return.js +8 -42
  105. package/tests/hydration/compiled/client/switch.js +208 -173
  106. package/tests/hydration/compiled/client/track-async-serialization.js +176 -128
  107. package/tests/hydration/compiled/client/try.js +29 -21
  108. package/tests/hydration/compiled/server/basic.js +210 -221
  109. package/tests/hydration/compiled/server/composite.js +13 -14
  110. package/tests/hydration/compiled/server/for.js +427 -444
  111. package/tests/hydration/compiled/server/head.js +199 -189
  112. package/tests/hydration/compiled/server/html.js +33 -41
  113. package/tests/hydration/compiled/server/if-children.js +114 -117
  114. package/tests/hydration/compiled/server/if.js +77 -83
  115. package/tests/hydration/compiled/server/mixed-control-flow.js +145 -150
  116. package/tests/hydration/compiled/server/nested-control-flow.js +10 -0
  117. package/tests/hydration/compiled/server/reactivity.js +24 -22
  118. package/tests/hydration/compiled/server/return.js +6 -18
  119. package/tests/hydration/compiled/server/switch.js +179 -176
  120. package/tests/hydration/compiled/server/track-async-serialization.js +88 -70
  121. package/tests/hydration/compiled/server/try.js +31 -35
  122. package/tests/hydration/components/basic.tsrx +216 -258
  123. package/tests/hydration/components/composite.tsrx +32 -42
  124. package/tests/hydration/components/events.tsrx +81 -101
  125. package/tests/hydration/components/for.tsrx +270 -336
  126. package/tests/hydration/components/head.tsrx +43 -39
  127. package/tests/hydration/components/hmr.tsrx +16 -22
  128. package/tests/hydration/components/html-in-template.tsrx +15 -21
  129. package/tests/hydration/components/html.tsrx +442 -526
  130. package/tests/hydration/components/if-children.tsrx +107 -125
  131. package/tests/hydration/components/if.tsrx +68 -90
  132. package/tests/hydration/components/mixed-control-flow.tsrx +65 -72
  133. package/tests/hydration/components/nested-control-flow.tsrx +202 -216
  134. package/tests/hydration/components/portal.tsrx +33 -41
  135. package/tests/hydration/components/reactivity.tsrx +26 -34
  136. package/tests/hydration/components/return.tsrx +4 -6
  137. package/tests/hydration/components/switch.tsrx +73 -78
  138. package/tests/hydration/components/track-async-serialization.tsrx +83 -93
  139. package/tests/hydration/components/try.tsrx +37 -51
  140. package/tests/hydration/switch.test.js +8 -8
  141. package/tests/server/await.test.tsrx +3 -3
  142. package/tests/server/basic.attributes.test.tsrx +117 -162
  143. package/tests/server/basic.components.test.tsrx +163 -193
  144. package/tests/server/basic.test.tsrx +298 -198
  145. package/tests/server/compiler.test.tsrx +142 -72
  146. package/tests/server/composite.props.test.tsrx +54 -58
  147. package/tests/server/composite.test.tsrx +165 -167
  148. package/tests/server/context.test.tsrx +13 -17
  149. package/tests/server/dynamic-elements.test.tsrx +103 -135
  150. package/tests/server/for.test.tsrx +115 -84
  151. package/tests/server/head.test.tsrx +31 -31
  152. package/tests/server/html-nesting-validation.test.tsrx +16 -8
  153. package/tests/server/if.test.tsrx +49 -59
  154. package/tests/server/lazy-destructuring.test.tsrx +288 -366
  155. package/tests/server/return.test.tsrx +58 -36
  156. package/tests/server/streaming-ssr.test.tsrx +4 -4
  157. package/tests/server/style-identifier.test.tsrx +58 -66
  158. package/tests/server/switch.test.tsrx +89 -97
  159. package/tests/server/track-async-serialization.test.tsrx +85 -103
  160. package/tests/server/try.test.tsrx +275 -360
  161. package/tests/utils/ref-types.test.js +72 -0
  162. package/tests/utils/vite-plugin-config.test.js +41 -74
  163. package/types/index.d.ts +1 -0
  164. package/src/runtime/internal/client/compat.js +0 -40
  165. package/tests/utils/compiler-compat-config.test.js +0 -38
@@ -30,8 +30,8 @@ var root_26 = _$_.template(`<div class="vp-doc"></div>`, 0);
30
30
  var root_25 = _$_.template(`<!>`, 1, 1);
31
31
  var root_28 = _$_.template(`<div class="vp-doc"></div>`, 0);
32
32
  var root_27 = _$_.template(`<!>`, 1, 1);
33
- var root_30 = _$_.template(`<h1 class="heading"><!></h1>`, 1, 1);
34
- var root_31 = _$_.template(`<h2 class="heading"><!></h2>`, 1, 1);
33
+ var root_30 = _$_.template(`<h1 class="heading"><!></h1>`, 0);
34
+ var root_31 = _$_.template(`<h2 class="heading"><!></h2>`, 0);
35
35
  var root_29 = _$_.template(`<!>`, 1, 1);
36
36
  var root_32 = _$_.template(`<div class="code-block"><div class="header"><button>Copy</button><span class="lang">js</span></div><div class="content"></div></div>`, 0);
37
37
  var root_33 = _$_.template(`<div class="wrapper"><div class="inner"><!></div></div>`, 0);
@@ -315,7 +315,7 @@ function DocFooter() {
315
315
  });
316
316
  }
317
317
 
318
- export function DocLayout({ children, editPath = '', nextLink = null, toc = [] }) {
318
+ export function DocLayout(__props) {
319
319
  return _$_.tsrx_element((__anchor, __block) => {
320
320
  var div_14 = root_18();
321
321
 
@@ -331,7 +331,7 @@ export function DocLayout({ children, editPath = '', nextLink = null, toc = [] }
331
331
  {
332
332
  var expression_1 = _$_.child(div_15);
333
333
 
334
- _$_.expression(expression_1, () => children);
334
+ _$_.expression(expression_1, () => __props.children);
335
335
  _$_.pop(div_15);
336
336
  }
337
337
  }
@@ -346,15 +346,17 @@ export function DocLayout({ children, editPath = '', nextLink = null, toc = [] }
346
346
 
347
347
  {
348
348
  var a_1 = _$_.child(div_17);
349
-
350
- _$_.set_attribute(a_1, 'href', `https://github.com/edit/${editPath}`);
351
349
  }
352
350
 
351
+ _$_.render(() => {
352
+ _$_.set_attribute(a_1, 'href', `https://github.com/edit/${_$_.fallback(__props.editPath, '')}`);
353
+ });
354
+
353
355
  _$_.append(__anchor, div_17);
354
356
  };
355
357
 
356
358
  _$_.if(node_9, (__render) => {
357
- if (editPath) __render(consequent);
359
+ if (_$_.fallback(__props.editPath, '')) __render(consequent);
358
360
  });
359
361
  }
360
362
 
@@ -370,20 +372,20 @@ export function DocLayout({ children, editPath = '', nextLink = null, toc = [] }
370
372
  {
371
373
  var expression_2 = _$_.child(a_2);
372
374
 
373
- _$_.expression(expression_2, () => nextLink.text);
375
+ _$_.expression(expression_2, () => _$_.fallback(__props.nextLink, null).text);
374
376
  _$_.pop(a_2);
375
377
  }
376
378
  }
377
379
 
378
380
  _$_.render(() => {
379
- _$_.set_attribute(a_2, 'href', nextLink.href);
381
+ _$_.set_attribute(a_2, 'href', _$_.fallback(__props.nextLink, null).href);
380
382
  });
381
383
 
382
384
  _$_.append(__anchor, nav_1);
383
385
  };
384
386
 
385
387
  _$_.if(node_10, (__render) => {
386
- if (nextLink) __render(consequent_1);
388
+ if (_$_.fallback(__props.nextLink, null)) __render(consequent_1);
387
389
  });
388
390
  }
389
391
 
@@ -408,7 +410,7 @@ export function DocLayout({ children, editPath = '', nextLink = null, toc = [] }
408
410
  {
409
411
  _$_.for(
410
412
  ul_1,
411
- () => toc,
413
+ () => _$_.fallback(__props.toc, []),
412
414
  (__anchor, item) => {
413
415
  var li_1 = root_22();
414
416
 
@@ -440,7 +442,7 @@ export function DocLayout({ children, editPath = '', nextLink = null, toc = [] }
440
442
  };
441
443
 
442
444
  _$_.if(node_12, (__render) => {
443
- if (toc.length > 0) __render(consequent_2);
445
+ if (_$_.fallback(__props.toc, []).length > 0) __render(consequent_2);
444
446
  });
445
447
  }
446
448
 
@@ -523,8 +525,7 @@ function DynamicHeading({ level, children }) {
523
525
 
524
526
  {
525
527
  var switch_case_0 = (__anchor) => {
526
- var fragment_9 = root_30();
527
- var h1_2 = _$_.first_child_frag(fragment_9);
528
+ var h1_2 = root_30();
528
529
 
529
530
  {
530
531
  var expression_4 = _$_.child(h1_2);
@@ -533,12 +534,11 @@ function DynamicHeading({ level, children }) {
533
534
  _$_.pop(h1_2);
534
535
  }
535
536
 
536
- _$_.append(__anchor, fragment_9);
537
+ _$_.append(__anchor, h1_2);
537
538
  };
538
539
 
539
540
  var switch_case_1 = (__anchor) => {
540
- var fragment_10 = root_31();
541
- var h2_1 = _$_.first_child_frag(fragment_10);
541
+ var h2_1 = root_31();
542
542
 
543
543
  {
544
544
  var expression_5 = _$_.child(h2_1);
@@ -547,7 +547,7 @@ function DynamicHeading({ level, children }) {
547
547
  _$_.pop(h2_1);
548
548
  }
549
549
 
550
- _$_.append(__anchor, fragment_10);
550
+ _$_.append(__anchor, h2_1);
551
551
  };
552
552
 
553
553
  _$_.switch(node_16, () => {
@@ -609,13 +609,13 @@ function ContentWrapper({ children }) {
609
609
 
610
610
  export function HtmlAfterSwitchInChildren() {
611
611
  return _$_.tsrx_element((__anchor, __block) => {
612
- var fragment_11 = root_34();
613
- var node_17 = _$_.first_child_frag(fragment_11);
612
+ var fragment_9 = root_34();
613
+ var node_17 = _$_.first_child_frag(fragment_9);
614
614
 
615
615
  _$_.render_component(ContentWrapper, node_17, {
616
616
  children: _$_.tsrx_element((__anchor, __block) => {
617
- var fragment_12 = root_35();
618
- var node_18 = _$_.first_child_frag(fragment_12);
617
+ var fragment_10 = root_35();
618
+ var node_18 = _$_.first_child_frag(fragment_10);
619
619
 
620
620
  _$_.render_component(DynamicHeading, node_18, {
621
621
  level: 1,
@@ -631,20 +631,18 @@ export function HtmlAfterSwitchInChildren() {
631
631
  var node_19 = _$_.sibling(p_1);
632
632
 
633
633
  _$_.render_component(CodeBlock, node_19, { code: "const x = 1;" });
634
- _$_.append(__anchor, fragment_12);
634
+ _$_.append(__anchor, fragment_10);
635
635
  })
636
636
  });
637
637
 
638
- _$_.append(__anchor, fragment_11);
638
+ _$_.append(__anchor, fragment_9);
639
639
  });
640
640
  }
641
641
 
642
- function NavItem({ href, text: label, active = false }) {
642
+ function NavItem(__props) {
643
643
  return _$_.tsrx_element((__anchor, __block) => {
644
644
  var div_27 = root_36();
645
645
 
646
- _$_.set_class(div_27, `nav-item${active ? ' active' : ''}`, void 0, true);
647
-
648
646
  {
649
647
  var node_20 = _$_.child(div_27);
650
648
 
@@ -656,21 +654,19 @@ function NavItem({ href, text: label, active = false }) {
656
654
  };
657
655
 
658
656
  _$_.if(node_20, (__render) => {
659
- if (active) __render(consequent_3);
657
+ if (_$_.fallback(__props.active, false)) __render(consequent_3);
660
658
  });
661
659
  }
662
660
 
663
661
  var a_4 = _$_.sibling(node_20);
664
662
 
665
- _$_.set_attribute(a_4, 'href', href);
666
-
667
663
  {
668
664
  var span_1 = _$_.child(a_4);
669
665
 
670
666
  {
671
- var expression_8 = _$_.child(span_1, true);
667
+ var expression_8 = _$_.child(span_1);
672
668
 
673
- expression_8.nodeValue = label;
669
+ _$_.expression(expression_8, () => __props.text);
674
670
  _$_.pop(span_1);
675
671
  }
676
672
  }
@@ -678,6 +674,23 @@ function NavItem({ href, text: label, active = false }) {
678
674
  _$_.pop(div_27);
679
675
  }
680
676
 
677
+ _$_.render(
678
+ (__prev) => {
679
+ var __a = __props.href;
680
+
681
+ if (__prev.a !== __a) {
682
+ _$_.set_attribute(a_4, 'href', __prev.a = __a);
683
+ }
684
+
685
+ var __b = `nav-item${_$_.fallback(__props.active, false) ? ' active' : ''}`;
686
+
687
+ if (__prev.b !== __b) {
688
+ _$_.set_class(div_27, __prev.b = __b, void 0, true);
689
+ }
690
+ },
691
+ { a: void 0, b: Symbol() }
692
+ );
693
+
681
694
  _$_.append(__anchor, div_27);
682
695
  });
683
696
  }
@@ -751,8 +764,8 @@ function SideNav({ currentPath }) {
751
764
  _$_.render_component(SidebarSection, node_22, {
752
765
  title: "Getting Started",
753
766
  children: _$_.tsrx_element((__anchor, __block) => {
754
- var fragment_13 = root_41();
755
- var node_23 = _$_.first_child_frag(fragment_13);
767
+ var fragment_11 = root_41();
768
+ var node_23 = _$_.first_child_frag(fragment_11);
756
769
 
757
770
  _$_.render_component(NavItem, node_23, {
758
771
  href: "/intro",
@@ -768,7 +781,7 @@ function SideNav({ currentPath }) {
768
781
  active: currentPath === '/start'
769
782
  });
770
783
 
771
- _$_.append(__anchor, fragment_13);
784
+ _$_.append(__anchor, fragment_11);
772
785
  })
773
786
  });
774
787
 
@@ -783,8 +796,8 @@ function SideNav({ currentPath }) {
783
796
  _$_.render_component(SidebarSection, node_25, {
784
797
  title: "Guide",
785
798
  children: _$_.tsrx_element((__anchor, __block) => {
786
- var fragment_14 = root_42();
787
- var node_26 = _$_.first_child_frag(fragment_14);
799
+ var fragment_12 = root_42();
800
+ var node_26 = _$_.first_child_frag(fragment_12);
788
801
 
789
802
  _$_.render_component(NavItem, node_26, {
790
803
  href: "/guide/app",
@@ -800,7 +813,7 @@ function SideNav({ currentPath }) {
800
813
  active: currentPath === '/guide/syntax'
801
814
  });
802
815
 
803
- _$_.append(__anchor, fragment_14);
816
+ _$_.append(__anchor, fragment_12);
804
817
  })
805
818
  });
806
819
 
@@ -910,9 +923,9 @@ export function ArticleWithChildrenThenSibling() {
910
923
 
911
924
  _$_.render_component(ArticleWrapper, node_32, {
912
925
  children: _$_.tsrx_element((__anchor, __block) => {
913
- var fragment_15 = root_49();
926
+ var fragment_13 = root_49();
914
927
 
915
- _$_.append(__anchor, fragment_15);
928
+ _$_.append(__anchor, fragment_13);
916
929
  })
917
930
  });
918
931
 
@@ -1042,8 +1055,8 @@ function InlineArticleLayout({ children }) {
1042
1055
  export function InlineArticleWithHtmlChild() {
1043
1056
  return _$_.tsrx_element((__anchor, __block) => {
1044
1057
  const htmlContent = '<pre><code>const x = 1;</code></pre>';
1045
- var fragment_16 = root_57();
1046
- var node_41 = _$_.first_child_frag(fragment_16);
1058
+ var fragment_14 = root_57();
1059
+ var node_41 = _$_.first_child_frag(fragment_14);
1047
1060
 
1048
1061
  _$_.render_component(InlineArticleLayout, node_41, {
1049
1062
  children: _$_.tsrx_element((__anchor, __block) => {
@@ -1054,7 +1067,7 @@ export function InlineArticleWithHtmlChild() {
1054
1067
  })
1055
1068
  });
1056
1069
 
1057
- _$_.append(__anchor, fragment_16);
1070
+ _$_.append(__anchor, fragment_14);
1058
1071
  });
1059
1072
  }
1060
1073
 
@@ -1082,7 +1095,7 @@ function FooterStub() {
1082
1095
  });
1083
1096
  }
1084
1097
 
1085
- function DocsLayoutInner({ children, editPath = '', nextLink = null }) {
1098
+ function DocsLayoutInner(__props) {
1086
1099
  return _$_.tsrx_element((__anchor, __block) => {
1087
1100
  var div_47 = root_62();
1088
1101
 
@@ -1118,7 +1131,7 @@ function DocsLayoutInner({ children, editPath = '', nextLink = null }) {
1118
1131
  {
1119
1132
  var expression_13 = _$_.child(div_49);
1120
1133
 
1121
- _$_.expression(expression_13, () => children);
1134
+ _$_.expression(expression_13, () => __props.children);
1122
1135
  _$_.pop(div_49);
1123
1136
  }
1124
1137
  }
@@ -1135,7 +1148,7 @@ function DocsLayoutInner({ children, editPath = '', nextLink = null }) {
1135
1148
  };
1136
1149
 
1137
1150
  _$_.if(node_44, (__render) => {
1138
- if (editPath) __render(consequent_10);
1151
+ if (_$_.fallback(__props.editPath, '')) __render(consequent_10);
1139
1152
  });
1140
1153
  }
1141
1154
 
@@ -1151,20 +1164,20 @@ function DocsLayoutInner({ children, editPath = '', nextLink = null }) {
1151
1164
  {
1152
1165
  var expression_14 = _$_.child(a_5);
1153
1166
 
1154
- _$_.expression(expression_14, () => nextLink.text);
1167
+ _$_.expression(expression_14, () => _$_.fallback(__props.nextLink, null).text);
1155
1168
  _$_.pop(a_5);
1156
1169
  }
1157
1170
  }
1158
1171
 
1159
1172
  _$_.render(() => {
1160
- _$_.set_attribute(a_5, 'href', nextLink.href);
1173
+ _$_.set_attribute(a_5, 'href', _$_.fallback(__props.nextLink, null).href);
1161
1174
  });
1162
1175
 
1163
1176
  _$_.append(__anchor, nav_4);
1164
1177
  };
1165
1178
 
1166
1179
  _$_.if(node_45, (__render) => {
1167
- if (nextLink) __render(consequent_11);
1180
+ if (_$_.fallback(__props.nextLink, null)) __render(consequent_11);
1168
1181
  });
1169
1182
  }
1170
1183
 
@@ -1190,8 +1203,8 @@ function DocsLayoutInner({ children, editPath = '', nextLink = null }) {
1190
1203
  export function DocsLayoutWithData() {
1191
1204
  return _$_.tsrx_element((__anchor, __block) => {
1192
1205
  const htmlContent = '<h1>Title</h1><p>Content</p>';
1193
- var fragment_17 = root_65();
1194
- var node_47 = _$_.first_child_frag(fragment_17);
1206
+ var fragment_15 = root_65();
1207
+ var node_47 = _$_.first_child_frag(fragment_15);
1195
1208
 
1196
1209
  _$_.render_component(DocsLayoutInner, node_47, {
1197
1210
  editPath: "docs/styling.md",
@@ -1204,15 +1217,15 @@ export function DocsLayoutWithData() {
1204
1217
  })
1205
1218
  });
1206
1219
 
1207
- _$_.append(__anchor, fragment_17);
1220
+ _$_.append(__anchor, fragment_15);
1208
1221
  });
1209
1222
  }
1210
1223
 
1211
1224
  export function DocsLayoutWithoutData() {
1212
1225
  return _$_.tsrx_element((__anchor, __block) => {
1213
1226
  const htmlContent = undefined;
1214
- var fragment_18 = root_67();
1215
- var node_48 = _$_.first_child_frag(fragment_18);
1227
+ var fragment_16 = root_67();
1228
+ var node_48 = _$_.first_child_frag(fragment_16);
1216
1229
 
1217
1230
  _$_.render_component(DocsLayoutInner, node_48, {
1218
1231
  children: _$_.tsrx_element((__anchor, __block) => {
@@ -1223,19 +1236,11 @@ export function DocsLayoutWithoutData() {
1223
1236
  })
1224
1237
  });
1225
1238
 
1226
- _$_.append(__anchor, fragment_18);
1239
+ _$_.append(__anchor, fragment_16);
1227
1240
  });
1228
1241
  }
1229
1242
 
1230
- function DocsLayoutExact(
1231
- {
1232
- children,
1233
- editPath = '',
1234
- prevLink = null,
1235
- nextLink = null,
1236
- toc = []
1237
- }
1238
- ) {
1243
+ function DocsLayoutExact(__props) {
1239
1244
  return _$_.tsrx_element((__anchor, __block) => {
1240
1245
  var div_56 = root_69();
1241
1246
 
@@ -1271,7 +1276,7 @@ function DocsLayoutExact(
1271
1276
  {
1272
1277
  var expression_15 = _$_.child(div_58);
1273
1278
 
1274
- _$_.expression(expression_15, () => children);
1279
+ _$_.expression(expression_15, () => __props.children);
1275
1280
  _$_.pop(div_58);
1276
1281
  }
1277
1282
  }
@@ -1286,15 +1291,17 @@ function DocsLayoutExact(
1286
1291
 
1287
1292
  {
1288
1293
  var a_6 = _$_.child(div_62);
1289
-
1290
- _$_.set_attribute(a_6, 'href', `/edit/${editPath}`);
1291
1294
  }
1292
1295
 
1296
+ _$_.render(() => {
1297
+ _$_.set_attribute(a_6, 'href', `/edit/${_$_.fallback(__props.editPath, '')}`);
1298
+ });
1299
+
1293
1300
  _$_.append(__anchor, div_62);
1294
1301
  };
1295
1302
 
1296
1303
  _$_.if(node_51, (__render) => {
1297
- if (editPath) __render(consequent_12);
1304
+ if (_$_.fallback(__props.editPath, '')) __render(consequent_12);
1298
1305
  });
1299
1306
  }
1300
1307
 
@@ -1317,13 +1324,13 @@ function DocsLayoutExact(
1317
1324
  {
1318
1325
  var expression_16 = _$_.child(span_2);
1319
1326
 
1320
- _$_.expression(expression_16, () => prevLink.text);
1327
+ _$_.expression(expression_16, () => _$_.fallback(__props.prevLink, null).text);
1321
1328
  _$_.pop(span_2);
1322
1329
  }
1323
1330
  }
1324
1331
 
1325
1332
  _$_.render(() => {
1326
- _$_.set_attribute(a_7, 'href', prevLink.href);
1333
+ _$_.set_attribute(a_7, 'href', _$_.fallback(__props.prevLink, null).href);
1327
1334
  });
1328
1335
 
1329
1336
  _$_.append(__anchor, a_7);
@@ -1336,7 +1343,7 @@ function DocsLayoutExact(
1336
1343
  };
1337
1344
 
1338
1345
  _$_.if(node_53, (__render) => {
1339
- if (prevLink) __render(consequent_13); else __render(alternate, false);
1346
+ if (_$_.fallback(__props.prevLink, null)) __render(consequent_13); else __render(alternate, false);
1340
1347
  });
1341
1348
  }
1342
1349
 
@@ -1352,20 +1359,20 @@ function DocsLayoutExact(
1352
1359
  {
1353
1360
  var expression_17 = _$_.child(span_4);
1354
1361
 
1355
- _$_.expression(expression_17, () => nextLink.text);
1362
+ _$_.expression(expression_17, () => _$_.fallback(__props.nextLink, null).text);
1356
1363
  _$_.pop(span_4);
1357
1364
  }
1358
1365
  }
1359
1366
 
1360
1367
  _$_.render(() => {
1361
- _$_.set_attribute(a_8, 'href', nextLink.href);
1368
+ _$_.set_attribute(a_8, 'href', _$_.fallback(__props.nextLink, null).href);
1362
1369
  });
1363
1370
 
1364
1371
  _$_.append(__anchor, a_8);
1365
1372
  };
1366
1373
 
1367
1374
  _$_.if(node_54, (__render) => {
1368
- if (nextLink) __render(consequent_14);
1375
+ if (_$_.fallback(__props.nextLink, null)) __render(consequent_14);
1369
1376
  });
1370
1377
  }
1371
1378
 
@@ -1376,7 +1383,7 @@ function DocsLayoutExact(
1376
1383
  };
1377
1384
 
1378
1385
  _$_.if(node_52, (__render) => {
1379
- if (prevLink || nextLink) __render(consequent_15);
1386
+ if (_$_.fallback(__props.prevLink, null) || _$_.fallback(__props.nextLink, null)) __render(consequent_15);
1380
1387
  });
1381
1388
  }
1382
1389
 
@@ -1404,7 +1411,7 @@ function DocsLayoutExact(
1404
1411
  {
1405
1412
  _$_.for(
1406
1413
  nav_6,
1407
- () => toc,
1414
+ () => _$_.fallback(__props.toc, []),
1408
1415
  (__anchor, item) => {
1409
1416
  var a_9 = root_76();
1410
1417
 
@@ -1432,7 +1439,7 @@ function DocsLayoutExact(
1432
1439
  };
1433
1440
 
1434
1441
  _$_.if(node_56, (__render) => {
1435
- if (toc.length > 0) __render(consequent_16);
1442
+ if (_$_.fallback(__props.toc, []).length > 0) __render(consequent_16);
1436
1443
  });
1437
1444
  }
1438
1445
 
@@ -1454,8 +1461,8 @@ function DocsLayoutExact(
1454
1461
  export function DocsLayoutExactWithData() {
1455
1462
  return _$_.tsrx_element((__anchor, __block) => {
1456
1463
  const htmlContent = '<h1>Styling Guide</h1><p>Content</p>';
1457
- var fragment_19 = root_77();
1458
- var node_57 = _$_.first_child_frag(fragment_19);
1464
+ var fragment_17 = root_77();
1465
+ var node_57 = _$_.first_child_frag(fragment_17);
1459
1466
 
1460
1467
  _$_.render_component(DocsLayoutExact, node_57, {
1461
1468
  editPath: "docs/guide/styling.md",
@@ -1474,7 +1481,7 @@ export function DocsLayoutExactWithData() {
1474
1481
  })
1475
1482
  });
1476
1483
 
1477
- _$_.append(__anchor, fragment_19);
1484
+ _$_.append(__anchor, fragment_17);
1478
1485
  });
1479
1486
  }
1480
1487
 
@@ -1485,8 +1492,8 @@ export function DocsLayoutExactWithoutData() {
1485
1492
  const prevLink = undefined;
1486
1493
  const nextLink = undefined;
1487
1494
  const toc = undefined;
1488
- var fragment_20 = root_79();
1489
- var node_58 = _$_.first_child_frag(fragment_20);
1495
+ var fragment_18 = root_79();
1496
+ var node_58 = _$_.first_child_frag(fragment_18);
1490
1497
 
1491
1498
  _$_.render_component(DocsLayoutExact, node_58, {
1492
1499
  editPath,
@@ -1501,7 +1508,7 @@ export function DocsLayoutExactWithoutData() {
1501
1508
  })
1502
1509
  });
1503
1510
 
1504
- _$_.append(__anchor, fragment_20);
1511
+ _$_.append(__anchor, fragment_18);
1505
1512
  });
1506
1513
  }
1507
1514
 
@@ -1567,8 +1574,8 @@ function LayoutWithTemplate({ children, data }) {
1567
1574
  export function NestedTemplateInLayout() {
1568
1575
  return _$_.tsrx_element((__anchor, __block) => {
1569
1576
  const doc = { title: 'Comparison', html: '<p>Content</p>' };
1570
- var fragment_21 = root_84();
1571
- var node_59 = _$_.first_child_frag(fragment_21);
1577
+ var fragment_19 = root_84();
1578
+ var node_59 = _$_.first_child_frag(fragment_19);
1572
1579
 
1573
1580
  _$_.render_component(LayoutWithTemplate, node_59, {
1574
1581
  data: doc,
@@ -1583,7 +1590,7 @@ export function NestedTemplateInLayout() {
1583
1590
  })
1584
1591
  });
1585
1592
 
1586
- _$_.append(__anchor, fragment_21);
1593
+ _$_.append(__anchor, fragment_19);
1587
1594
  });
1588
1595
  }
1589
1596