ripple 0.3.68 → 0.3.69

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 (182) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/package.json +3 -3
  3. package/src/jsx-runtime.d.ts +2 -2
  4. package/src/runtime/element.js +1 -1
  5. package/src/runtime/index-client.js +11 -11
  6. package/src/runtime/index-server.js +7 -4
  7. package/src/runtime/internal/client/bindings.js +1 -1
  8. package/src/runtime/internal/client/blocks.js +13 -4
  9. package/src/runtime/internal/client/component.js +55 -0
  10. package/src/runtime/internal/client/composite.js +4 -2
  11. package/src/runtime/internal/client/expression.js +65 -7
  12. package/src/runtime/internal/client/hmr.js +54 -43
  13. package/src/runtime/internal/client/index.js +5 -1
  14. package/src/runtime/internal/client/portal.js +70 -69
  15. package/src/runtime/internal/client/render.js +3 -0
  16. package/src/runtime/internal/server/index.js +92 -8
  17. package/tests/client/__snapshots__/html.test.tsrx.snap +3 -3
  18. package/tests/client/array/array.copy-within.test.tsrx +33 -31
  19. package/tests/client/array/array.derived.test.tsrx +186 -169
  20. package/tests/client/array/array.iteration.test.tsrx +40 -37
  21. package/tests/client/array/array.mutations.test.tsrx +113 -101
  22. package/tests/client/array/array.static.test.tsrx +119 -101
  23. package/tests/client/array/array.to-methods.test.tsrx +24 -21
  24. package/tests/client/async-suspend.test.tsrx +247 -246
  25. package/tests/client/basic/__snapshots__/basic.rendering.test.tsrx.snap +0 -1
  26. package/tests/client/basic/basic.attributes.test.tsrx +428 -423
  27. package/tests/client/basic/basic.collections.test.tsrx +109 -102
  28. package/tests/client/basic/basic.components.test.tsrx +323 -205
  29. package/tests/client/basic/basic.errors.test.tsrx +91 -91
  30. package/tests/client/basic/basic.events.test.tsrx +114 -115
  31. package/tests/client/basic/basic.get-set.test.tsrx +97 -87
  32. package/tests/client/basic/basic.hmr.test.tsrx +19 -16
  33. package/tests/client/basic/basic.reactivity.test.tsrx +199 -191
  34. package/tests/client/basic/basic.rendering.test.tsrx +272 -182
  35. package/tests/client/basic/basic.styling.test.tsrx +23 -22
  36. package/tests/client/basic/basic.utilities.test.tsrx +10 -8
  37. package/tests/client/boundaries.test.tsrx +26 -26
  38. package/tests/client/compiler/__snapshots__/compiler.assignments.test.rsrx.snap +5 -5
  39. package/tests/client/compiler/__snapshots__/compiler.assignments.test.tsrx.snap +5 -5
  40. package/tests/client/compiler/compiler.assignments.test.tsrx +77 -81
  41. package/tests/client/compiler/compiler.attributes.test.tsrx +15 -15
  42. package/tests/client/compiler/compiler.basic.test.tsrx +322 -314
  43. package/tests/client/compiler/compiler.regex.test.tsrx +44 -47
  44. package/tests/client/compiler/compiler.tracked-access.test.tsrx +38 -38
  45. package/tests/client/compiler/compiler.try-in-function.test.tsrx +16 -16
  46. package/tests/client/compiler/compiler.typescript.test.tsrx +2 -2
  47. package/tests/client/composite/composite.dynamic-components.test.tsrx +47 -48
  48. package/tests/client/composite/composite.generics.test.tsrx +168 -192
  49. package/tests/client/composite/composite.props.test.tsrx +97 -81
  50. package/tests/client/composite/composite.reactivity.test.tsrx +177 -147
  51. package/tests/client/composite/composite.render.test.tsrx +122 -105
  52. package/tests/client/computed-properties.test.tsrx +28 -28
  53. package/tests/client/context.test.tsrx +21 -21
  54. package/tests/client/css/global-additional-cases.test.tsrx +58 -58
  55. package/tests/client/css/global-advanced-selectors.test.tsrx +16 -16
  56. package/tests/client/css/global-at-rules.test.tsrx +10 -10
  57. package/tests/client/css/global-basic.test.tsrx +14 -14
  58. package/tests/client/css/global-classes-ids.test.tsrx +14 -14
  59. package/tests/client/css/global-combinators.test.tsrx +10 -10
  60. package/tests/client/css/global-complex-nesting.test.tsrx +14 -14
  61. package/tests/client/css/global-edge-cases.test.tsrx +18 -18
  62. package/tests/client/css/global-keyframes.test.tsrx +12 -12
  63. package/tests/client/css/global-nested.test.tsrx +10 -10
  64. package/tests/client/css/global-pseudo.test.tsrx +12 -12
  65. package/tests/client/css/global-scoping.test.tsrx +20 -20
  66. package/tests/client/css/style-identifier.test.tsrx +143 -291
  67. package/tests/client/date.test.tsrx +146 -133
  68. package/tests/client/dynamic-elements.test.tsrx +398 -365
  69. package/tests/client/events.test.tsrx +292 -290
  70. package/tests/client/for.test.tsrx +156 -153
  71. package/tests/client/head.test.tsrx +105 -96
  72. package/tests/client/html.test.tsrx +122 -26
  73. package/tests/client/input-value.test.tsrx +1361 -1314
  74. package/tests/client/lazy-array.test.tsrx +16 -13
  75. package/tests/client/lazy-destructuring.test.tsrx +257 -213
  76. package/tests/client/map.test.tsrx +65 -60
  77. package/tests/client/media-query.test.tsrx +22 -20
  78. package/tests/client/object.test.tsrx +87 -81
  79. package/tests/client/portal.test.tsrx +57 -51
  80. package/tests/client/ref.test.tsrx +233 -202
  81. package/tests/client/return.test.tsrx +71 -2560
  82. package/tests/client/set.test.tsrx +54 -45
  83. package/tests/client/svg.test.tsrx +216 -186
  84. package/tests/client/switch.test.tsrx +194 -193
  85. package/tests/client/track-async-hydration.test.tsrx +18 -14
  86. package/tests/client/tracked-index-access.test.tsrx +28 -18
  87. package/tests/client/try.test.tsrx +675 -548
  88. package/tests/client/tsx.test.tsrx +373 -311
  89. package/tests/client/typescript-generics.test.tsrx +145 -145
  90. package/tests/client/url/url.derived.test.tsrx +33 -28
  91. package/tests/client/url/url.parsing.test.tsrx +61 -51
  92. package/tests/client/url/url.partial-removal.test.tsrx +56 -48
  93. package/tests/client/url/url.reactivity.test.tsrx +142 -125
  94. package/tests/client/url/url.serialization.test.tsrx +13 -11
  95. package/tests/client/url-search-params/url-search-params.derived.test.tsrx +34 -29
  96. package/tests/client/url-search-params/url-search-params.initialization.test.tsrx +25 -21
  97. package/tests/client/url-search-params/url-search-params.iteration.test.tsrx +50 -45
  98. package/tests/client/url-search-params/url-search-params.mutation.test.tsrx +111 -99
  99. package/tests/client/url-search-params/url-search-params.retrieval.test.tsrx +49 -43
  100. package/tests/client/url-search-params/url-search-params.serialization.test.tsrx +14 -12
  101. package/tests/client/url-search-params/url-search-params.tracked-url.test.tsrx +16 -14
  102. package/tests/hydration/basic.test.js +3 -3
  103. package/tests/hydration/compiled/client/basic.js +586 -651
  104. package/tests/hydration/compiled/client/composite.js +79 -104
  105. package/tests/hydration/compiled/client/events.js +140 -148
  106. package/tests/hydration/compiled/client/for.js +1005 -1018
  107. package/tests/hydration/compiled/client/head.js +124 -134
  108. package/tests/hydration/compiled/client/hmr.js +41 -48
  109. package/tests/hydration/compiled/client/html-in-template.js +38 -41
  110. package/tests/hydration/compiled/client/html.js +970 -1314
  111. package/tests/hydration/compiled/client/if-children.js +234 -249
  112. package/tests/hydration/compiled/client/if.js +182 -189
  113. package/tests/hydration/compiled/client/mixed-control-flow.js +347 -303
  114. package/tests/hydration/compiled/client/nested-control-flow.js +1084 -832
  115. package/tests/hydration/compiled/client/portal.js +65 -85
  116. package/tests/hydration/compiled/client/reactivity.js +84 -90
  117. package/tests/hydration/compiled/client/return.js +38 -1939
  118. package/tests/hydration/compiled/client/switch.js +218 -224
  119. package/tests/hydration/compiled/client/track-async-serialization.js +250 -259
  120. package/tests/hydration/compiled/client/try.js +123 -132
  121. package/tests/hydration/compiled/server/basic.js +773 -831
  122. package/tests/hydration/compiled/server/composite.js +166 -191
  123. package/tests/hydration/compiled/server/events.js +170 -184
  124. package/tests/hydration/compiled/server/for.js +851 -909
  125. package/tests/hydration/compiled/server/head.js +206 -216
  126. package/tests/hydration/compiled/server/hmr.js +64 -72
  127. package/tests/hydration/compiled/server/html-in-template.js +42 -76
  128. package/tests/hydration/compiled/server/html.js +1362 -1667
  129. package/tests/hydration/compiled/server/if-children.js +419 -445
  130. package/tests/hydration/compiled/server/if.js +194 -208
  131. package/tests/hydration/compiled/server/mixed-control-flow.js +249 -257
  132. package/tests/hydration/compiled/server/nested-control-flow.js +491 -515
  133. package/tests/hydration/compiled/server/portal.js +152 -160
  134. package/tests/hydration/compiled/server/reactivity.js +94 -106
  135. package/tests/hydration/compiled/server/return.js +28 -2172
  136. package/tests/hydration/compiled/server/switch.js +274 -286
  137. package/tests/hydration/compiled/server/track-async-serialization.js +340 -358
  138. package/tests/hydration/compiled/server/try.js +167 -185
  139. package/tests/hydration/components/basic.tsrx +320 -272
  140. package/tests/hydration/components/composite.tsrx +44 -32
  141. package/tests/hydration/components/events.tsrx +101 -91
  142. package/tests/hydration/components/for.tsrx +510 -452
  143. package/tests/hydration/components/head.tsrx +87 -80
  144. package/tests/hydration/components/hmr.tsrx +22 -17
  145. package/tests/hydration/components/html-in-template.tsrx +22 -17
  146. package/tests/hydration/components/html.tsrx +525 -443
  147. package/tests/hydration/components/if-children.tsrx +158 -148
  148. package/tests/hydration/components/if.tsrx +109 -95
  149. package/tests/hydration/components/mixed-control-flow.tsrx +100 -96
  150. package/tests/hydration/components/nested-control-flow.tsrx +215 -203
  151. package/tests/hydration/components/portal.tsrx +41 -34
  152. package/tests/hydration/components/reactivity.tsrx +37 -27
  153. package/tests/hydration/components/return.tsrx +12 -556
  154. package/tests/hydration/components/switch.tsrx +120 -114
  155. package/tests/hydration/components/track-async-serialization.tsrx +107 -91
  156. package/tests/hydration/components/try.tsrx +55 -40
  157. package/tests/hydration/html.test.js +4 -4
  158. package/tests/hydration/return.test.js +13 -532
  159. package/tests/server/await.test.tsrx +3 -3
  160. package/tests/server/basic.attributes.test.tsrx +264 -195
  161. package/tests/server/basic.components.test.tsrx +296 -169
  162. package/tests/server/basic.test.tsrx +300 -198
  163. package/tests/server/compiler.test.tsrx +62 -60
  164. package/tests/server/composite.props.test.tsrx +77 -63
  165. package/tests/server/composite.test.tsrx +168 -192
  166. package/tests/server/context.test.tsrx +18 -12
  167. package/tests/server/dynamic-elements.test.tsrx +197 -180
  168. package/tests/server/for.test.tsrx +85 -78
  169. package/tests/server/head.test.tsrx +50 -43
  170. package/tests/server/html-nesting-validation.test.tsrx +8 -8
  171. package/tests/server/if.test.tsrx +57 -51
  172. package/tests/server/lazy-destructuring.test.tsrx +366 -294
  173. package/tests/server/return.test.tsrx +76 -1355
  174. package/tests/server/streaming-ssr.test.tsrx +4 -75
  175. package/tests/server/style-identifier.test.tsrx +169 -148
  176. package/tests/server/switch.test.tsrx +91 -85
  177. package/tests/server/track-async-serialization.test.tsrx +105 -85
  178. package/tests/server/try.test.tsrx +374 -280
  179. package/tests/utils/compiler-compat-config.test.js +2 -2
  180. package/tests/utils/runtime-imports.test.js +10 -0
  181. package/types/index.d.ts +8 -0
  182. package/tests/client/__snapshots__/html.test.rsrx.snap +0 -40
@@ -1,1722 +1,1529 @@
1
1
  // @ts-nocheck
2
2
  import * as _$_ from 'ripple/internal/server';
3
3
 
4
- import { track } from 'ripple/server';
4
+ import { Fragment, track } from 'ripple/server';
5
5
 
6
6
  export function StaticHtml() {
7
- _$_.push_component();
7
+ return _$_.tsrx_element(() => {
8
+ const html = '<p><strong>Bold</strong> text</p>';
8
9
 
9
- const html = '<p><strong>Bold</strong> text</p>';
10
-
11
- _$_.regular_block(() => {
12
- _$_.output_push('<div');
13
- _$_.output_push('>');
14
-
15
- {
16
- const html_value = String(html ?? '');
17
-
18
- _$_.output_push('<!--' + _$_.simple_hash(html_value) + '-->');
19
- _$_.output_push(html_value);
20
- _$_.output_push('<!---->');
21
- }
22
-
23
- _$_.output_push('</div>');
10
+ _$_.regular_block(() => {
11
+ _$_.output_push('<div');
12
+ _$_.output_push('>');
13
+ _$_.output_push(String(html ?? ''));
14
+ _$_.output_push('</div>');
15
+ });
24
16
  });
25
-
26
- _$_.pop_component();
27
17
  }
28
18
 
29
19
  export function DynamicHtml() {
30
- _$_.push_component();
20
+ return _$_.tsrx_element(() => {
21
+ const content = '<p>Dynamic <span>HTML</span> content</p>';
31
22
 
32
- const content = '<p>Dynamic <span>HTML</span> content</p>';
33
-
34
- _$_.regular_block(() => {
35
- _$_.output_push('<div');
36
- _$_.output_push('>');
37
-
38
- {
39
- const html_value_1 = String(content ?? '');
40
-
41
- _$_.output_push('<!--' + _$_.simple_hash(html_value_1) + '-->');
42
- _$_.output_push(html_value_1);
43
- _$_.output_push('<!---->');
44
- }
45
-
46
- _$_.output_push('</div>');
23
+ _$_.regular_block(() => {
24
+ _$_.output_push('<div');
25
+ _$_.output_push('>');
26
+ _$_.output_push(String(content ?? ''));
27
+ _$_.output_push('</div>');
28
+ });
47
29
  });
48
-
49
- _$_.pop_component();
50
30
  }
51
31
 
52
32
  export function EmptyHtml() {
53
- _$_.push_component();
33
+ return _$_.tsrx_element(() => {
34
+ const html = '';
54
35
 
55
- const html = '';
56
-
57
- _$_.regular_block(() => {
58
- _$_.output_push('<div');
59
- _$_.output_push('>');
60
-
61
- {
62
- const html_value_2 = String(html ?? '');
63
-
64
- _$_.output_push('<!--' + _$_.simple_hash(html_value_2) + '-->');
65
- _$_.output_push(html_value_2);
66
- _$_.output_push('<!---->');
67
- }
68
-
69
- _$_.output_push('</div>');
36
+ _$_.regular_block(() => {
37
+ _$_.output_push('<div');
38
+ _$_.output_push('>');
39
+ _$_.output_push(String(html ?? ''));
40
+ _$_.output_push('</div>');
41
+ });
70
42
  });
71
-
72
- _$_.pop_component();
73
43
  }
74
44
 
75
45
  export function ComplexHtml() {
76
- _$_.push_component();
46
+ return _$_.tsrx_element(() => {
47
+ const html = '<div class="nested"><span>Nested <em>content</em></span></div>';
77
48
 
78
- const html = '<div class="nested"><span>Nested <em>content</em></span></div>';
79
-
80
- _$_.regular_block(() => {
81
- _$_.output_push('<section');
82
- _$_.output_push('>');
83
-
84
- {
85
- const html_value_3 = String(html ?? '');
86
-
87
- _$_.output_push('<!--' + _$_.simple_hash(html_value_3) + '-->');
88
- _$_.output_push(html_value_3);
89
- _$_.output_push('<!---->');
90
- }
91
-
92
- _$_.output_push('</section>');
49
+ _$_.regular_block(() => {
50
+ _$_.output_push('<section');
51
+ _$_.output_push('>');
52
+ _$_.output_push(String(html ?? ''));
53
+ _$_.output_push('</section>');
54
+ });
93
55
  });
94
-
95
- _$_.pop_component();
96
56
  }
97
57
 
98
58
  export function MultipleHtml() {
99
- _$_.push_component();
59
+ return _$_.tsrx_element(() => {
60
+ const html1 = '<p>First paragraph</p>';
61
+ const html2 = '<p>Second paragraph</p>';
100
62
 
101
- const html1 = '<p>First paragraph</p>';
102
- const html2 = '<p>Second paragraph</p>';
103
-
104
- _$_.regular_block(() => {
105
- _$_.output_push('<div');
106
- _$_.output_push('>');
63
+ _$_.regular_block(() => {
64
+ _$_.output_push('<div');
65
+ _$_.output_push('>');
107
66
 
108
- {
109
- const html_value_4 = String(html1 ?? '');
67
+ {
68
+ const html_value = String(html1 ?? '');
110
69
 
111
- _$_.output_push('<!--' + _$_.simple_hash(html_value_4) + '-->');
112
- _$_.output_push(html_value_4);
113
- _$_.output_push('<!---->');
70
+ _$_.output_push('<!--' + _$_.simple_hash(html_value) + '-->');
71
+ _$_.output_push(html_value);
72
+ _$_.output_push('<!---->');
114
73
 
115
- const html_value_5 = String(html2 ?? '');
74
+ const html_value_1 = String(html2 ?? '');
116
75
 
117
- _$_.output_push('<!--' + _$_.simple_hash(html_value_5) + '-->');
118
- _$_.output_push(html_value_5);
119
- _$_.output_push('<!---->');
120
- }
76
+ _$_.output_push('<!--' + _$_.simple_hash(html_value_1) + '-->');
77
+ _$_.output_push(html_value_1);
78
+ _$_.output_push('<!---->');
79
+ }
121
80
 
122
- _$_.output_push('</div>');
81
+ _$_.output_push('</div>');
82
+ });
123
83
  });
124
-
125
- _$_.pop_component();
126
84
  }
127
85
 
128
86
  export function HtmlWithReactivity() {
129
- _$_.push_component();
130
-
131
- _$_.regular_block(() => {
132
- _$_.output_push('<div');
133
- _$_.output_push('>');
134
-
135
- {
136
- _$_.output_push('<!--1tb17hh-->');
137
- _$_.output_push('<p>Count: 0</p>');
138
- _$_.output_push('<!---->');
139
- _$_.output_push('<button');
87
+ return _$_.tsrx_element(() => {
88
+ _$_.regular_block(() => {
89
+ _$_.output_push('<div');
140
90
  _$_.output_push('>');
141
91
 
142
92
  {
143
- _$_.output_push('Increment');
144
- }
93
+ _$_.output_push('<!--1tb17hh-->');
94
+ _$_.output_push('<p>Count: 0</p>');
95
+ _$_.output_push('<!---->');
96
+ _$_.output_push('<button');
97
+ _$_.output_push('>');
98
+
99
+ {
100
+ _$_.output_push('Increment');
101
+ }
145
102
 
146
- _$_.output_push('</button>');
147
- }
103
+ _$_.output_push('</button>');
104
+ }
148
105
 
149
- _$_.output_push('</div>');
106
+ _$_.output_push('</div>');
107
+ });
150
108
  });
151
-
152
- _$_.pop_component();
153
109
  }
154
110
 
155
111
  export function HtmlWrapper({ children }) {
156
- _$_.push_component();
157
-
158
- _$_.regular_block(() => {
159
- _$_.output_push('<div');
160
- _$_.output_push(' class="wrapper"');
161
- _$_.output_push('>');
162
-
163
- {
112
+ return _$_.tsrx_element(() => {
113
+ _$_.regular_block(() => {
164
114
  _$_.output_push('<div');
165
- _$_.output_push(' class="inner"');
115
+ _$_.output_push(' class="wrapper"');
166
116
  _$_.output_push('>');
167
117
 
168
118
  {
169
- _$_.render_expression(children);
119
+ _$_.output_push('<div');
120
+ _$_.output_push(' class="inner"');
121
+ _$_.output_push('>');
122
+
123
+ {
124
+ _$_.render_expression(children);
125
+ }
126
+
127
+ _$_.output_push('</div>');
170
128
  }
171
129
 
172
130
  _$_.output_push('</div>');
173
- }
174
-
175
- _$_.output_push('</div>');
131
+ });
176
132
  });
177
-
178
- _$_.pop_component();
179
133
  }
180
134
 
181
135
  export function HtmlInChildren() {
182
- _$_.push_component();
183
-
184
- const content = '<p><strong>Bold</strong> text</p>';
185
-
186
- _$_.regular_block(() => {
187
- {
188
- const comp = HtmlWrapper;
189
-
190
- const args = [
191
- {
192
- children: _$_.tsrx_element(function render_children() {
193
- _$_.push_component();
194
- _$_.output_push('<div');
195
- _$_.output_push(' class="vp-doc"');
196
- _$_.output_push('>');
197
-
198
- {
199
- const html_value_6 = String(content ?? '');
136
+ return _$_.tsrx_element(() => {
137
+ const content = '<p><strong>Bold</strong> text</p>';
200
138
 
201
- _$_.output_push('<!--' + _$_.simple_hash(html_value_6) + '-->');
202
- _$_.output_push(html_value_6);
203
- _$_.output_push('<!---->');
204
- }
139
+ _$_.regular_block(() => {
140
+ {
141
+ const comp = HtmlWrapper;
205
142
 
206
- _$_.output_push('</div>');
207
- _$_.pop_component();
208
- })
209
- }
210
- ];
143
+ const args = [
144
+ {
145
+ children: _$_.tsrx_element(() => {
146
+ return _$_.tsrx_element(() => {
147
+ _$_.output_push('<div');
148
+ _$_.output_push(' class="vp-doc"');
149
+ _$_.output_push('>');
150
+ _$_.output_push(String(content ?? ''));
151
+ _$_.output_push('</div>');
152
+ });
153
+ })
154
+ }
155
+ ];
211
156
 
212
- comp(...args);
213
- }
157
+ _$_.render_component(comp, ...args);
158
+ }
159
+ });
214
160
  });
215
-
216
- _$_.pop_component();
217
161
  }
218
162
 
219
163
  export function HtmlInChildrenWithSiblings() {
220
- _$_.push_component();
221
-
222
- const content = '<p>Dynamic content</p>';
164
+ return _$_.tsrx_element(() => {
165
+ const content = '<p>Dynamic content</p>';
223
166
 
224
- _$_.regular_block(() => {
225
- {
226
- const comp = HtmlWrapper;
227
-
228
- const args = [
229
- {
230
- children: _$_.tsrx_element(function render_children() {
231
- _$_.push_component();
232
- _$_.output_push('<h1');
233
- _$_.output_push('>');
234
-
235
- {
236
- _$_.output_push('Title');
237
- }
238
-
239
- _$_.output_push('</h1>');
240
- _$_.output_push('<div');
241
- _$_.output_push(' class="content"');
242
- _$_.output_push('>');
167
+ _$_.regular_block(() => {
168
+ {
169
+ const comp = HtmlWrapper;
243
170
 
244
- {
245
- const html_value_7 = String(content ?? '');
171
+ const args = [
172
+ {
173
+ children: _$_.tsrx_element(() => {
174
+ return _$_.tsrx_element(() => {
175
+ _$_.output_push('<h1');
176
+ _$_.output_push('>');
246
177
 
247
- _$_.output_push('<!--' + _$_.simple_hash(html_value_7) + '-->');
248
- _$_.output_push(html_value_7);
249
- _$_.output_push('<!---->');
250
- }
178
+ {
179
+ _$_.output_push('Title');
180
+ }
251
181
 
252
- _$_.output_push('</div>');
253
- _$_.pop_component();
254
- })
255
- }
256
- ];
182
+ _$_.output_push('</h1>');
183
+ _$_.output_push('<div');
184
+ _$_.output_push(' class="content"');
185
+ _$_.output_push('>');
186
+ _$_.output_push(String(content ?? ''));
187
+ _$_.output_push('</div>');
188
+ });
189
+ })
190
+ }
191
+ ];
257
192
 
258
- comp(...args);
259
- }
193
+ _$_.render_component(comp, ...args);
194
+ }
195
+ });
260
196
  });
261
-
262
- _$_.pop_component();
263
197
  }
264
198
 
265
199
  export function MultipleHtmlInChildren() {
266
- _$_.push_component();
267
-
268
- const html1 = '<p>First</p>';
269
- const html2 = '<p>Second</p>';
200
+ return _$_.tsrx_element(() => {
201
+ const html1 = '<p>First</p>';
202
+ const html2 = '<p>Second</p>';
270
203
 
271
- _$_.regular_block(() => {
272
- {
273
- const comp = HtmlWrapper;
204
+ _$_.regular_block(() => {
205
+ {
206
+ const comp = HtmlWrapper;
274
207
 
275
- const args = [
276
- {
277
- children: _$_.tsrx_element(function render_children() {
278
- _$_.push_component();
279
- _$_.output_push('<div');
280
- _$_.output_push(' class="doc"');
281
- _$_.output_push('>');
208
+ const args = [
209
+ {
210
+ children: _$_.tsrx_element(() => {
211
+ return _$_.tsrx_element(() => {
212
+ _$_.output_push('<div');
213
+ _$_.output_push(' class="doc"');
214
+ _$_.output_push('>');
282
215
 
283
- {
284
- const html_value_8 = String(html1 ?? '');
216
+ {
217
+ const html_value_2 = String(html1 ?? '');
285
218
 
286
- _$_.output_push('<!--' + _$_.simple_hash(html_value_8) + '-->');
287
- _$_.output_push(html_value_8);
288
- _$_.output_push('<!---->');
219
+ _$_.output_push('<!--' + _$_.simple_hash(html_value_2) + '-->');
220
+ _$_.output_push(html_value_2);
221
+ _$_.output_push('<!---->');
289
222
 
290
- const html_value_9 = String(html2 ?? '');
223
+ const html_value_3 = String(html2 ?? '');
291
224
 
292
- _$_.output_push('<!--' + _$_.simple_hash(html_value_9) + '-->');
293
- _$_.output_push(html_value_9);
294
- _$_.output_push('<!---->');
295
- }
225
+ _$_.output_push('<!--' + _$_.simple_hash(html_value_3) + '-->');
226
+ _$_.output_push(html_value_3);
227
+ _$_.output_push('<!---->');
228
+ }
296
229
 
297
- _$_.output_push('</div>');
298
- _$_.pop_component();
299
- })
300
- }
301
- ];
230
+ _$_.output_push('</div>');
231
+ });
232
+ })
233
+ }
234
+ ];
302
235
 
303
- comp(...args);
304
- }
236
+ _$_.render_component(comp, ...args);
237
+ }
238
+ });
305
239
  });
306
-
307
- _$_.pop_component();
308
240
  }
309
241
 
310
242
  export function HtmlWithComments() {
311
- _$_.push_component();
243
+ return _$_.tsrx_element(() => {
244
+ const content = '<p>Before comment</p><!-- TODO: Elaborate --><p>After comment</p>';
312
245
 
313
- const content = '<p>Before comment</p><!-- TODO: Elaborate --><p>After comment</p>';
314
-
315
- _$_.regular_block(() => {
316
- _$_.output_push('<div');
317
- _$_.output_push('>');
318
-
319
- {
320
- const html_value_10 = String(content ?? '');
321
-
322
- _$_.output_push('<!--' + _$_.simple_hash(html_value_10) + '-->');
323
- _$_.output_push(html_value_10);
324
- _$_.output_push('<!---->');
325
- }
326
-
327
- _$_.output_push('</div>');
246
+ _$_.regular_block(() => {
247
+ _$_.output_push('<div');
248
+ _$_.output_push('>');
249
+ _$_.output_push(String(content ?? ''));
250
+ _$_.output_push('</div>');
251
+ });
328
252
  });
329
-
330
- _$_.pop_component();
331
253
  }
332
254
 
333
255
  export function HtmlWithEmptyComment() {
334
- _$_.push_component();
256
+ return _$_.tsrx_element(() => {
257
+ const content = '<p>Before</p><!----><p>After</p>';
335
258
 
336
- const content = '<p>Before</p><!----><p>After</p>';
337
-
338
- _$_.regular_block(() => {
339
- _$_.output_push('<div');
340
- _$_.output_push('>');
341
-
342
- {
343
- const html_value_11 = String(content ?? '');
344
-
345
- _$_.output_push('<!--' + _$_.simple_hash(html_value_11) + '-->');
346
- _$_.output_push(html_value_11);
347
- _$_.output_push('<!---->');
348
- }
349
-
350
- _$_.output_push('</div>');
259
+ _$_.regular_block(() => {
260
+ _$_.output_push('<div');
261
+ _$_.output_push('>');
262
+ _$_.output_push(String(content ?? ''));
263
+ _$_.output_push('</div>');
264
+ });
351
265
  });
352
-
353
- _$_.pop_component();
354
266
  }
355
267
 
356
268
  export function HtmlWithCommentsInChildren() {
357
- _$_.push_component();
358
-
359
- const content = '<h2 id="intro">Introduction</h2><p>Some text</p><!-- TODO --><p>More text</p>';
360
-
361
- _$_.regular_block(() => {
362
- {
363
- const comp = HtmlWrapper;
364
-
365
- const args = [
366
- {
367
- children: _$_.tsrx_element(function render_children() {
368
- _$_.push_component();
369
- _$_.output_push('<div');
370
- _$_.output_push(' class="vp-doc"');
371
- _$_.output_push('>');
372
-
373
- {
374
- const html_value_12 = String(content ?? '');
269
+ return _$_.tsrx_element(() => {
270
+ const content = '<h2 id="intro">Introduction</h2><p>Some text</p><!-- TODO --><p>More text</p>';
375
271
 
376
- _$_.output_push('<!--' + _$_.simple_hash(html_value_12) + '-->');
377
- _$_.output_push(html_value_12);
378
- _$_.output_push('<!---->');
379
- }
272
+ _$_.regular_block(() => {
273
+ {
274
+ const comp = HtmlWrapper;
380
275
 
381
- _$_.output_push('</div>');
382
- _$_.pop_component();
383
- })
384
- }
385
- ];
276
+ const args = [
277
+ {
278
+ children: _$_.tsrx_element(() => {
279
+ return _$_.tsrx_element(() => {
280
+ _$_.output_push('<div');
281
+ _$_.output_push(' class="vp-doc"');
282
+ _$_.output_push('>');
283
+ _$_.output_push(String(content ?? ''));
284
+ _$_.output_push('</div>');
285
+ });
286
+ })
287
+ }
288
+ ];
386
289
 
387
- comp(...args);
388
- }
290
+ _$_.render_component(comp, ...args);
291
+ }
292
+ });
389
293
  });
390
-
391
- _$_.pop_component();
392
294
  }
393
295
 
394
296
  function DocFooter() {
395
- _$_.push_component();
396
-
397
- _$_.regular_block(() => {
398
- _$_.output_push('<footer');
399
- _$_.output_push(' class="doc-footer"');
400
- _$_.output_push('>');
297
+ return _$_.tsrx_element(() => {
298
+ _$_.regular_block(() => {
299
+ _$_.output_push('<footer');
300
+ _$_.output_push(' class="doc-footer"');
301
+ _$_.output_push('>');
401
302
 
402
- {
403
- _$_.output_push('Footer content');
404
- }
303
+ {
304
+ _$_.output_push('Footer content');
305
+ }
405
306
 
406
- _$_.output_push('</footer>');
307
+ _$_.output_push('</footer>');
308
+ });
407
309
  });
408
-
409
- _$_.pop_component();
410
310
  }
411
311
 
412
312
  export function DocLayout({ children, editPath = '', nextLink = null, toc = [] }) {
413
- _$_.push_component();
414
-
415
- _$_.regular_block(() => {
416
- _$_.output_push('<div');
417
- _$_.output_push(' class="layout"');
418
- _$_.output_push('>');
419
-
420
- {
313
+ return _$_.tsrx_element(() => {
314
+ _$_.regular_block(() => {
421
315
  _$_.output_push('<div');
422
- _$_.output_push(' class="content-container"');
316
+ _$_.output_push(' class="layout"');
423
317
  _$_.output_push('>');
424
318
 
425
319
  {
426
- _$_.output_push('<article');
320
+ _$_.output_push('<div');
321
+ _$_.output_push(' class="content-container"');
427
322
  _$_.output_push('>');
428
323
 
429
324
  {
430
- _$_.output_push('<div');
325
+ _$_.output_push('<article');
431
326
  _$_.output_push('>');
432
327
 
433
328
  {
434
- _$_.render_expression(children);
435
- }
329
+ _$_.output_push('<div');
330
+ _$_.output_push('>');
436
331
 
437
- _$_.output_push('</div>');
438
- }
332
+ {
333
+ _$_.render_expression(children);
334
+ }
439
335
 
440
- _$_.output_push('</article>');
441
- _$_.output_push('<!--[-->');
336
+ _$_.output_push('</div>');
337
+ }
442
338
 
443
- if (editPath) {
444
- _$_.output_push('<div');
445
- _$_.output_push(' class="edit-link"');
446
- _$_.output_push('>');
339
+ _$_.output_push('</article>');
340
+ _$_.output_push('<!--[-->');
447
341
 
448
- {
449
- _$_.output_push('<a');
450
- _$_.output_push(_$_.attr('href', `https://github.com/edit/${editPath}`, false));
342
+ if (editPath) {
343
+ _$_.output_push('<div');
344
+ _$_.output_push(' class="edit-link"');
451
345
  _$_.output_push('>');
452
346
 
453
347
  {
454
- _$_.output_push('Edit');
455
- }
348
+ _$_.output_push('<a');
349
+ _$_.output_push(_$_.attr('href', `https://github.com/edit/${editPath}`, false));
350
+ _$_.output_push('>');
456
351
 
457
- _$_.output_push('</a>');
458
- }
352
+ {
353
+ _$_.output_push('Edit');
354
+ }
459
355
 
460
- _$_.output_push('</div>');
461
- }
356
+ _$_.output_push('</a>');
357
+ }
462
358
 
463
- _$_.output_push('<!--]-->');
464
- _$_.output_push('<!--[-->');
359
+ _$_.output_push('</div>');
360
+ }
465
361
 
466
- if (nextLink) {
467
- _$_.output_push('<nav');
468
- _$_.output_push(' class="prev-next"');
469
- _$_.output_push('>');
362
+ _$_.output_push('<!--]-->');
363
+ _$_.output_push('<!--[-->');
470
364
 
471
- {
472
- _$_.output_push('<a');
473
- _$_.output_push(_$_.attr('href', nextLink.href, false));
365
+ if (nextLink) {
366
+ _$_.output_push('<nav');
367
+ _$_.output_push(' class="prev-next"');
474
368
  _$_.output_push('>');
475
369
 
476
370
  {
477
- _$_.output_push(_$_.escape(nextLink.text));
371
+ _$_.output_push('<a');
372
+ _$_.output_push(_$_.attr('href', nextLink.href, false));
373
+ _$_.output_push('>');
374
+
375
+ {
376
+ _$_.output_push(_$_.escape(nextLink.text));
377
+ }
378
+
379
+ _$_.output_push('</a>');
478
380
  }
479
381
 
480
- _$_.output_push('</a>');
382
+ _$_.output_push('</nav>');
481
383
  }
482
384
 
483
- _$_.output_push('</nav>');
385
+ _$_.output_push('<!--]-->');
386
+
387
+ {
388
+ const comp = DocFooter;
389
+ const args = [{}];
390
+
391
+ _$_.render_component(comp, ...args);
392
+ }
484
393
  }
485
394
 
486
- _$_.output_push('<!--]-->');
395
+ _$_.output_push('</div>');
396
+ _$_.output_push('<aside');
397
+ _$_.output_push('>');
487
398
 
488
399
  {
489
- const comp = DocFooter;
490
- const args = [{}];
400
+ _$_.output_push('<!--[-->');
491
401
 
492
- comp(...args);
493
- }
494
- }
495
-
496
- _$_.output_push('</div>');
497
- _$_.output_push('<aside');
498
- _$_.output_push('>');
499
-
500
- {
501
- _$_.output_push('<!--[-->');
502
-
503
- if (toc.length > 0) {
504
- _$_.output_push('<div');
505
- _$_.output_push(' class="toc"');
506
- _$_.output_push('>');
507
-
508
- {
509
- _$_.output_push('<ul');
510
- _$_.output_push('>');
402
+ if (toc.length > 0) {
403
+ _$_.output_push('<div');
404
+ _$_.output_push(' class="toc"');
405
+ _$_.output_push('>');
511
406
 
512
407
  {
513
- _$_.output_push('<!--[-->');
408
+ _$_.output_push('<ul');
409
+ _$_.output_push('>');
514
410
 
515
- for (const item of toc) {
516
- _$_.output_push('<li');
517
- _$_.output_push('>');
411
+ {
412
+ _$_.output_push('<!--[-->');
518
413
 
519
- {
520
- _$_.output_push('<a');
521
- _$_.output_push(_$_.attr('href', item.href, false));
414
+ for (const item of toc) {
415
+ _$_.output_push('<li');
522
416
  _$_.output_push('>');
523
417
 
524
418
  {
525
- _$_.output_push(_$_.escape(item.text));
419
+ _$_.output_push('<a');
420
+ _$_.output_push(_$_.attr('href', item.href, false));
421
+ _$_.output_push('>');
422
+
423
+ {
424
+ _$_.output_push(_$_.escape(item.text));
425
+ }
426
+
427
+ _$_.output_push('</a>');
526
428
  }
527
429
 
528
- _$_.output_push('</a>');
430
+ _$_.output_push('</li>');
529
431
  }
530
432
 
531
- _$_.output_push('</li>');
433
+ _$_.output_push('<!--]-->');
532
434
  }
533
435
 
534
- _$_.output_push('<!--]-->');
436
+ _$_.output_push('</ul>');
535
437
  }
536
438
 
537
- _$_.output_push('</ul>');
439
+ _$_.output_push('</div>');
538
440
  }
539
441
 
540
- _$_.output_push('</div>');
442
+ _$_.output_push('<!--]-->');
541
443
  }
542
444
 
543
- _$_.output_push('<!--]-->');
445
+ _$_.output_push('</aside>');
544
446
  }
545
447
 
546
- _$_.output_push('</aside>');
547
- }
548
-
549
- _$_.output_push('</div>');
448
+ _$_.output_push('</div>');
449
+ });
550
450
  });
551
-
552
- _$_.pop_component();
553
451
  }
554
452
 
555
453
  export function HtmlWithServerData() {
556
- _$_.push_component();
557
-
558
- const content = '<h1 id="intro" class="doc-h1">Introduction</h1><p>Ripple is a framework.</p>';
559
-
560
- _$_.regular_block(() => {
561
- {
562
- const comp = DocLayout;
563
-
564
- const args = [
565
- {
566
- editPath: "docs/introduction.md",
567
- nextLink: { href: '/docs/quick-start', text: 'Quick Start' },
568
- toc: [
569
- { href: '#intro', text: 'Introduction' },
570
- { href: '#features', text: 'Features' }
571
- ],
572
-
573
- children: _$_.tsrx_element(function render_children() {
574
- _$_.push_component();
575
- _$_.output_push('<div');
576
- _$_.output_push(' class="vp-doc"');
577
- _$_.output_push('>');
454
+ return _$_.tsrx_element(() => {
455
+ const content = '<h1 id="intro" class="doc-h1">Introduction</h1><p>Ripple is a framework.</p>';
578
456
 
579
- {
580
- const html_value_13 = String(content ?? '');
581
-
582
- _$_.output_push('<!--' + _$_.simple_hash(html_value_13) + '-->');
583
- _$_.output_push(html_value_13);
584
- _$_.output_push('<!---->');
585
- }
457
+ _$_.regular_block(() => {
458
+ {
459
+ const comp = DocLayout;
586
460
 
587
- _$_.output_push('</div>');
588
- _$_.pop_component();
589
- })
590
- }
591
- ];
461
+ const args = [
462
+ {
463
+ editPath: "docs/introduction.md",
464
+ nextLink: { href: '/docs/quick-start', text: 'Quick Start' },
465
+ toc: [
466
+ { href: '#intro', text: 'Introduction' },
467
+ { href: '#features', text: 'Features' }
468
+ ],
469
+
470
+ children: _$_.tsrx_element(() => {
471
+ return _$_.tsrx_element(() => {
472
+ _$_.output_push('<div');
473
+ _$_.output_push(' class="vp-doc"');
474
+ _$_.output_push('>');
475
+ _$_.output_push(String(content ?? ''));
476
+ _$_.output_push('</div>');
477
+ });
478
+ })
479
+ }
480
+ ];
592
481
 
593
- comp(...args);
594
- }
482
+ _$_.render_component(comp, ...args);
483
+ }
484
+ });
595
485
  });
596
-
597
- _$_.pop_component();
598
486
  }
599
487
 
600
488
  export function HtmlWithClientDefaults() {
601
- _$_.push_component();
602
-
603
- const content = '<h1 id="intro" class="doc-h1">Introduction</h1><p>Ripple is a framework.</p>';
604
-
605
- _$_.regular_block(() => {
606
- {
607
- const comp = DocLayout;
489
+ return _$_.tsrx_element(() => {
490
+ const content = '<h1 id="intro" class="doc-h1">Introduction</h1><p>Ripple is a framework.</p>';
608
491
 
609
- const args = [
610
- {
611
- children: _$_.tsrx_element(function render_children() {
612
- _$_.push_component();
613
- _$_.output_push('<div');
614
- _$_.output_push(' class="vp-doc"');
615
- _$_.output_push('>');
616
-
617
- {
618
- const html_value_14 = String(content ?? '');
619
-
620
- _$_.output_push('<!--' + _$_.simple_hash(html_value_14) + '-->');
621
- _$_.output_push(html_value_14);
622
- _$_.output_push('<!---->');
623
- }
492
+ _$_.regular_block(() => {
493
+ {
494
+ const comp = DocLayout;
624
495
 
625
- _$_.output_push('</div>');
626
- _$_.pop_component();
627
- })
628
- }
629
- ];
496
+ const args = [
497
+ {
498
+ children: _$_.tsrx_element(() => {
499
+ return _$_.tsrx_element(() => {
500
+ _$_.output_push('<div');
501
+ _$_.output_push(' class="vp-doc"');
502
+ _$_.output_push('>');
503
+ _$_.output_push(String(content ?? ''));
504
+ _$_.output_push('</div>');
505
+ });
506
+ })
507
+ }
508
+ ];
630
509
 
631
- comp(...args);
632
- }
510
+ _$_.render_component(comp, ...args);
511
+ }
512
+ });
633
513
  });
634
-
635
- _$_.pop_component();
636
514
  }
637
515
 
638
516
  export function HtmlWithUndefinedContent() {
639
- _$_.push_component();
640
-
641
- const content = undefined;
642
-
643
- _$_.regular_block(() => {
644
- {
645
- const comp = DocLayout;
646
-
647
- const args = [
648
- {
649
- children: _$_.tsrx_element(function render_children() {
650
- _$_.push_component();
651
- _$_.output_push('<div');
652
- _$_.output_push(' class="vp-doc"');
653
- _$_.output_push('>');
654
-
655
- {
656
- const html_value_15 = String(content ?? '');
517
+ return _$_.tsrx_element(() => {
518
+ const content = undefined;
657
519
 
658
- _$_.output_push('<!--' + _$_.simple_hash(html_value_15) + '-->');
659
- _$_.output_push(html_value_15);
660
- _$_.output_push('<!---->');
661
- }
520
+ _$_.regular_block(() => {
521
+ {
522
+ const comp = DocLayout;
662
523
 
663
- _$_.output_push('</div>');
664
- _$_.pop_component();
665
- })
666
- }
667
- ];
524
+ const args = [
525
+ {
526
+ children: _$_.tsrx_element(() => {
527
+ return _$_.tsrx_element(() => {
528
+ _$_.output_push('<div');
529
+ _$_.output_push(' class="vp-doc"');
530
+ _$_.output_push('>');
531
+ _$_.output_push(String(content ?? ''));
532
+ _$_.output_push('</div>');
533
+ });
534
+ })
535
+ }
536
+ ];
668
537
 
669
- comp(...args);
670
- }
538
+ _$_.render_component(comp, ...args);
539
+ }
540
+ });
671
541
  });
672
-
673
- _$_.pop_component();
674
542
  }
675
543
 
676
544
  function DynamicHeading({ level, children }) {
677
- _$_.push_component();
678
-
679
- _$_.regular_block(() => {
680
- _$_.output_push('<!--[-->');
545
+ return _$_.tsrx_element(() => {
546
+ _$_.regular_block(() => {
547
+ _$_.output_push('<!--[-->');
681
548
 
682
- switch (level) {
683
- case 1:
684
- _$_.output_push('<h1');
685
- _$_.output_push(' class="heading"');
686
- _$_.output_push('>');
687
- {
688
- _$_.render_expression(children);
689
- }
690
- _$_.output_push('</h1>');
549
+ switch (level) {
550
+ case 1:
551
+ _$_.output_push('<h1');
552
+ _$_.output_push(' class="heading"');
553
+ _$_.output_push('>');
554
+ {
555
+ _$_.render_expression(children);
556
+ }
557
+ _$_.output_push('</h1>');
558
+ break;
691
559
 
692
- case 2:
693
- _$_.output_push('<h2');
694
- _$_.output_push(' class="heading"');
695
- _$_.output_push('>');
696
- {
697
- _$_.render_expression(children);
698
- }
699
- _$_.output_push('</h2>');
700
- }
560
+ case 2:
561
+ _$_.output_push('<h2');
562
+ _$_.output_push(' class="heading"');
563
+ _$_.output_push('>');
564
+ {
565
+ _$_.render_expression(children);
566
+ }
567
+ _$_.output_push('</h2>');
568
+ break;
569
+ }
701
570
 
702
- _$_.output_push('<!--]-->');
571
+ _$_.output_push('<!--]-->');
572
+ });
703
573
  });
704
-
705
- _$_.pop_component();
706
574
  }
707
575
 
708
576
  function CodeBlock({ code }) {
709
- _$_.push_component();
710
-
711
- const highlighted = `<pre class="shiki"><code>${code}</code></pre>`;
577
+ return _$_.tsrx_element(() => {
578
+ const highlighted = `<pre class="shiki"><code>${code}</code></pre>`;
712
579
 
713
- _$_.regular_block(() => {
714
- _$_.output_push('<div');
715
- _$_.output_push(' class="code-block"');
716
- _$_.output_push('>');
717
-
718
- {
580
+ _$_.regular_block(() => {
719
581
  _$_.output_push('<div');
720
- _$_.output_push(' class="header"');
582
+ _$_.output_push(' class="code-block"');
721
583
  _$_.output_push('>');
722
584
 
723
585
  {
724
- _$_.output_push('<button');
586
+ _$_.output_push('<div');
587
+ _$_.output_push(' class="header"');
725
588
  _$_.output_push('>');
726
589
 
727
590
  {
728
- _$_.output_push('Copy');
729
- }
730
-
731
- _$_.output_push('</button>');
732
- _$_.output_push('<span');
733
- _$_.output_push(' class="lang"');
734
- _$_.output_push('>');
591
+ _$_.output_push('<button');
592
+ _$_.output_push('>');
735
593
 
736
- {
737
- _$_.output_push('js');
738
- }
594
+ {
595
+ _$_.output_push('Copy');
596
+ }
739
597
 
740
- _$_.output_push('</span>');
741
- }
598
+ _$_.output_push('</button>');
599
+ _$_.output_push('<span');
600
+ _$_.output_push(' class="lang"');
601
+ _$_.output_push('>');
742
602
 
743
- _$_.output_push('</div>');
744
- _$_.output_push('<div');
745
- _$_.output_push(' class="content"');
746
- _$_.output_push('>');
603
+ {
604
+ _$_.output_push('js');
605
+ }
747
606
 
748
- {
749
- const html_value_16 = String(highlighted ?? '');
607
+ _$_.output_push('</span>');
608
+ }
750
609
 
751
- _$_.output_push('<!--' + _$_.simple_hash(html_value_16) + '-->');
752
- _$_.output_push(html_value_16);
753
- _$_.output_push('<!---->');
610
+ _$_.output_push('</div>');
611
+ _$_.output_push('<div');
612
+ _$_.output_push(' class="content"');
613
+ _$_.output_push('>');
614
+ _$_.output_push(String(highlighted ?? ''));
615
+ _$_.output_push('</div>');
754
616
  }
755
617
 
756
618
  _$_.output_push('</div>');
757
- }
758
-
759
- _$_.output_push('</div>');
619
+ });
760
620
  });
761
-
762
- _$_.pop_component();
763
621
  }
764
622
 
765
623
  function ContentWrapper({ children }) {
766
- _$_.push_component();
767
-
768
- _$_.regular_block(() => {
769
- _$_.output_push('<div');
770
- _$_.output_push(' class="wrapper"');
771
- _$_.output_push('>');
772
-
773
- {
624
+ return _$_.tsrx_element(() => {
625
+ _$_.regular_block(() => {
774
626
  _$_.output_push('<div');
775
- _$_.output_push(' class="inner"');
627
+ _$_.output_push(' class="wrapper"');
776
628
  _$_.output_push('>');
777
629
 
778
630
  {
779
- _$_.render_expression(children);
631
+ _$_.output_push('<div');
632
+ _$_.output_push(' class="inner"');
633
+ _$_.output_push('>');
634
+
635
+ {
636
+ _$_.render_expression(children);
637
+ }
638
+
639
+ _$_.output_push('</div>');
780
640
  }
781
641
 
782
642
  _$_.output_push('</div>');
783
- }
784
-
785
- _$_.output_push('</div>');
643
+ });
786
644
  });
787
-
788
- _$_.pop_component();
789
645
  }
790
646
 
791
647
  export function HtmlAfterSwitchInChildren() {
792
- _$_.push_component();
793
-
794
- _$_.regular_block(() => {
795
- {
796
- const comp = ContentWrapper;
648
+ return _$_.tsrx_element(() => {
649
+ _$_.regular_block(() => {
650
+ {
651
+ const comp = ContentWrapper;
797
652
 
798
- const args = [
799
- {
800
- children: _$_.tsrx_element(function render_children() {
801
- _$_.push_component();
653
+ const args = [
654
+ {
655
+ children: _$_.tsrx_element(() => {
656
+ return _$_.tsrx_element(() => {
657
+ {
658
+ const comp = DynamicHeading;
802
659
 
803
- {
804
- const comp = DynamicHeading;
660
+ const args = [
661
+ {
662
+ level: 1,
663
+ children: _$_.tsrx_element(() => {
664
+ return _$_.tsrx_element(() => {
665
+ _$_.output_push('Title');
666
+ });
667
+ })
668
+ }
669
+ ];
805
670
 
806
- const args = [
807
- {
808
- level: 1,
809
- children: _$_.tsrx_element(function render_children() {
810
- _$_.push_component();
811
- _$_.output_push('Title');
812
- _$_.pop_component();
813
- })
671
+ _$_.render_component(comp, ...args);
814
672
  }
815
- ];
816
-
817
- comp(...args);
818
- }
819
673
 
820
- _$_.output_push('<p');
821
- _$_.output_push('>');
674
+ _$_.output_push('<p');
675
+ _$_.output_push('>');
822
676
 
823
- {
824
- _$_.output_push('First paragraph');
825
- }
677
+ {
678
+ _$_.output_push('First paragraph');
679
+ }
826
680
 
827
- _$_.output_push('</p>');
828
- _$_.output_push('<p');
829
- _$_.output_push('>');
681
+ _$_.output_push('</p>');
682
+ _$_.output_push('<p');
683
+ _$_.output_push('>');
830
684
 
831
- {
832
- _$_.output_push('Second paragraph');
833
- }
685
+ {
686
+ _$_.output_push('Second paragraph');
687
+ }
834
688
 
835
- _$_.output_push('</p>');
689
+ _$_.output_push('</p>');
836
690
 
837
- {
838
- const comp = CodeBlock;
839
- const args = [{ code: "const x = 1;" }];
691
+ {
692
+ const comp = CodeBlock;
693
+ const args = [{ code: "const x = 1;" }];
840
694
 
841
- comp(...args);
842
- }
695
+ _$_.render_component(comp, ...args);
696
+ }
843
697
 
844
- _$_.output_push('<p');
845
- _$_.output_push('>');
698
+ _$_.output_push('<p');
699
+ _$_.output_push('>');
846
700
 
847
- {
848
- _$_.output_push('After code');
849
- }
701
+ {
702
+ _$_.output_push('After code');
703
+ }
850
704
 
851
- _$_.output_push('</p>');
852
- _$_.pop_component();
853
- })
854
- }
855
- ];
705
+ _$_.output_push('</p>');
706
+ });
707
+ })
708
+ }
709
+ ];
856
710
 
857
- comp(...args);
858
- }
711
+ _$_.render_component(comp, ...args);
712
+ }
713
+ });
859
714
  });
860
-
861
- _$_.pop_component();
862
715
  }
863
716
 
864
717
  function NavItem({ href, text: label, active = false }) {
865
- _$_.push_component();
718
+ return _$_.tsrx_element(() => {
719
+ _$_.regular_block(() => {
720
+ _$_.output_push('<div');
721
+ _$_.output_push(_$_.attr('class', `nav-item${active ? ' active' : ''}`));
722
+ _$_.output_push('>');
866
723
 
867
- _$_.regular_block(() => {
868
- _$_.output_push('<div');
869
- _$_.output_push(_$_.attr('class', `nav-item${active ? ' active' : ''}`));
870
- _$_.output_push('>');
724
+ {
725
+ _$_.output_push('<!--[-->');
871
726
 
872
- {
873
- _$_.output_push('<!--[-->');
727
+ if (active) {
728
+ _$_.output_push('<div');
729
+ _$_.output_push(' class="indicator"');
730
+ _$_.output_push('>');
731
+ _$_.output_push('</div>');
732
+ }
874
733
 
875
- if (active) {
876
- _$_.output_push('<div');
877
- _$_.output_push(' class="indicator"');
734
+ _$_.output_push('<!--]-->');
735
+ _$_.output_push('<a');
736
+ _$_.output_push(_$_.attr('href', href, false));
878
737
  _$_.output_push('>');
879
- _$_.output_push('</div>');
880
- }
881
738
 
882
- _$_.output_push('<!--]-->');
883
- _$_.output_push('<a');
884
- _$_.output_push(_$_.attr('href', href, false));
885
- _$_.output_push('>');
739
+ {
740
+ _$_.output_push('<span');
741
+ _$_.output_push('>');
886
742
 
887
- {
888
- _$_.output_push('<span');
889
- _$_.output_push('>');
743
+ {
744
+ _$_.output_push(_$_.escape(label));
745
+ }
890
746
 
891
- {
892
- _$_.output_push(_$_.escape(label));
747
+ _$_.output_push('</span>');
893
748
  }
894
749
 
895
- _$_.output_push('</span>');
750
+ _$_.output_push('</a>');
896
751
  }
897
752
 
898
- _$_.output_push('</a>');
899
- }
900
-
901
- _$_.output_push('</div>');
753
+ _$_.output_push('</div>');
754
+ });
902
755
  });
903
-
904
- _$_.pop_component();
905
756
  }
906
757
 
907
758
  function SidebarSection({ title, children }) {
908
- _$_.push_component();
909
-
910
- let lazy = _$_.track(true, '6ac6906f');
911
-
912
- _$_.regular_block(() => {
913
- _$_.output_push('<section');
914
- _$_.output_push(' class="sidebar-section"');
915
- _$_.output_push('>');
759
+ return _$_.tsrx_element(() => {
760
+ let lazy = _$_.track(true, '6ac6906f');
916
761
 
917
- {
918
- _$_.output_push('<div');
919
- _$_.output_push(' class="section-header"');
762
+ _$_.regular_block(() => {
763
+ _$_.output_push('<section');
764
+ _$_.output_push(' class="sidebar-section"');
920
765
  _$_.output_push('>');
921
766
 
922
767
  {
923
- _$_.output_push('<h2');
768
+ _$_.output_push('<div');
769
+ _$_.output_push(' class="section-header"');
924
770
  _$_.output_push('>');
925
771
 
926
772
  {
927
- _$_.output_push(_$_.escape(title));
928
- }
773
+ _$_.output_push('<h2');
774
+ _$_.output_push('>');
929
775
 
930
- _$_.output_push('</h2>');
931
- _$_.output_push('<button');
932
- _$_.output_push('>');
776
+ {
777
+ _$_.output_push(_$_.escape(title));
778
+ }
933
779
 
934
- {
935
- _$_.output_push('Toggle');
780
+ _$_.output_push('</h2>');
781
+ _$_.output_push('<button');
782
+ _$_.output_push('>');
783
+
784
+ {
785
+ _$_.output_push('Toggle');
786
+ }
787
+
788
+ _$_.output_push('</button>');
936
789
  }
937
790
 
938
- _$_.output_push('</button>');
939
- }
791
+ _$_.output_push('</div>');
792
+ _$_.output_push('<!--[-->');
940
793
 
941
- _$_.output_push('</div>');
942
- _$_.output_push('<!--[-->');
794
+ if (lazy.value) {
795
+ _$_.output_push('<div');
796
+ _$_.output_push(' class="section-items"');
797
+ _$_.output_push('>');
943
798
 
944
- if (lazy.value) {
945
- _$_.output_push('<div');
946
- _$_.output_push(' class="section-items"');
947
- _$_.output_push('>');
799
+ {
800
+ _$_.render_expression(children);
801
+ }
948
802
 
949
- {
950
- _$_.render_expression(children);
803
+ _$_.output_push('</div>');
951
804
  }
952
805
 
953
- _$_.output_push('</div>');
806
+ _$_.output_push('<!--]-->');
954
807
  }
955
808
 
956
- _$_.output_push('<!--]-->');
957
- }
958
-
959
- _$_.output_push('</section>');
809
+ _$_.output_push('</section>');
810
+ });
960
811
  });
961
-
962
- _$_.pop_component();
963
812
  }
964
813
 
965
814
  function SideNav({ currentPath }) {
966
- _$_.push_component();
967
-
968
- _$_.regular_block(() => {
969
- _$_.output_push('<aside');
970
- _$_.output_push(' class="sidebar"');
971
- _$_.output_push('>');
972
-
973
- {
974
- _$_.output_push('<nav');
815
+ return _$_.tsrx_element(() => {
816
+ _$_.regular_block(() => {
817
+ _$_.output_push('<aside');
818
+ _$_.output_push(' class="sidebar"');
975
819
  _$_.output_push('>');
976
820
 
977
821
  {
978
- _$_.output_push('<div');
979
- _$_.output_push(' class="group"');
822
+ _$_.output_push('<nav');
980
823
  _$_.output_push('>');
981
824
 
982
825
  {
983
- {
984
- const comp = SidebarSection;
985
-
986
- const args = [
987
- {
988
- title: "Getting Started",
989
- children: _$_.tsrx_element(function render_children() {
990
- _$_.push_component();
826
+ _$_.output_push('<div');
827
+ _$_.output_push(' class="group"');
828
+ _$_.output_push('>');
991
829
 
992
- {
993
- const comp = NavItem;
830
+ {
831
+ {
832
+ const comp = SidebarSection;
994
833
 
995
- const args = [
834
+ const args = [
835
+ {
836
+ title: "Getting Started",
837
+ children: _$_.tsrx_element(() => {
838
+ return _$_.tsrx_element(() => {
996
839
  {
997
- href: "/intro",
998
- text: "Introduction",
999
- active: currentPath === '/intro'
1000
- }
1001
- ];
840
+ const comp = NavItem;
1002
841
 
1003
- comp(...args);
1004
- }
842
+ const args = [
843
+ {
844
+ href: "/intro",
845
+ text: "Introduction",
846
+ active: currentPath === '/intro'
847
+ }
848
+ ];
1005
849
 
1006
- {
1007
- const comp = NavItem;
850
+ _$_.render_component(comp, ...args);
851
+ }
1008
852
 
1009
- const args = [
1010
853
  {
1011
- href: "/start",
1012
- text: "Quick Start",
1013
- active: currentPath === '/start'
1014
- }
1015
- ];
854
+ const comp = NavItem;
1016
855
 
1017
- comp(...args);
1018
- }
856
+ const args = [
857
+ {
858
+ href: "/start",
859
+ text: "Quick Start",
860
+ active: currentPath === '/start'
861
+ }
862
+ ];
1019
863
 
1020
- _$_.pop_component();
1021
- })
1022
- }
1023
- ];
864
+ _$_.render_component(comp, ...args);
865
+ }
866
+ });
867
+ })
868
+ }
869
+ ];
1024
870
 
1025
- comp(...args);
871
+ _$_.render_component(comp, ...args);
872
+ }
1026
873
  }
1027
- }
1028
874
 
1029
- _$_.output_push('</div>');
1030
- _$_.output_push('<div');
1031
- _$_.output_push(' class="group"');
1032
- _$_.output_push('>');
875
+ _$_.output_push('</div>');
876
+ _$_.output_push('<div');
877
+ _$_.output_push(' class="group"');
878
+ _$_.output_push('>');
1033
879
 
1034
- {
1035
880
  {
1036
- const comp = SidebarSection;
1037
-
1038
- const args = [
1039
- {
1040
- title: "Guide",
1041
- children: _$_.tsrx_element(function render_children() {
1042
- _$_.push_component();
1043
-
1044
- {
1045
- const comp = NavItem;
881
+ {
882
+ const comp = SidebarSection;
1046
883
 
1047
- const args = [
884
+ const args = [
885
+ {
886
+ title: "Guide",
887
+ children: _$_.tsrx_element(() => {
888
+ return _$_.tsrx_element(() => {
1048
889
  {
1049
- href: "/guide/app",
1050
- text: "Application",
1051
- active: currentPath === '/guide/app'
1052
- }
1053
- ];
890
+ const comp = NavItem;
1054
891
 
1055
- comp(...args);
1056
- }
892
+ const args = [
893
+ {
894
+ href: "/guide/app",
895
+ text: "Application",
896
+ active: currentPath === '/guide/app'
897
+ }
898
+ ];
1057
899
 
1058
- {
1059
- const comp = NavItem;
900
+ _$_.render_component(comp, ...args);
901
+ }
1060
902
 
1061
- const args = [
1062
903
  {
1063
- href: "/guide/syntax",
1064
- text: "Syntax",
1065
- active: currentPath === '/guide/syntax'
1066
- }
1067
- ];
904
+ const comp = NavItem;
1068
905
 
1069
- comp(...args);
1070
- }
906
+ const args = [
907
+ {
908
+ href: "/guide/syntax",
909
+ text: "Syntax",
910
+ active: currentPath === '/guide/syntax'
911
+ }
912
+ ];
1071
913
 
1072
- _$_.pop_component();
1073
- })
1074
- }
1075
- ];
914
+ _$_.render_component(comp, ...args);
915
+ }
916
+ });
917
+ })
918
+ }
919
+ ];
1076
920
 
1077
- comp(...args);
921
+ _$_.render_component(comp, ...args);
922
+ }
1078
923
  }
924
+
925
+ _$_.output_push('</div>');
1079
926
  }
1080
927
 
1081
- _$_.output_push('</div>');
928
+ _$_.output_push('</nav>');
1082
929
  }
1083
930
 
1084
- _$_.output_push('</nav>');
1085
- }
1086
-
1087
- _$_.output_push('</aside>');
931
+ _$_.output_push('</aside>');
932
+ });
1088
933
  });
1089
-
1090
- _$_.pop_component();
1091
934
  }
1092
935
 
1093
936
  function PageHeader() {
1094
- _$_.push_component();
1095
-
1096
- _$_.regular_block(() => {
1097
- _$_.output_push('<header');
1098
- _$_.output_push(' class="page-header"');
1099
- _$_.output_push('>');
1100
-
1101
- {
1102
- _$_.output_push('<div');
1103
- _$_.output_push(' class="logo"');
937
+ return _$_.tsrx_element(() => {
938
+ _$_.regular_block(() => {
939
+ _$_.output_push('<header');
940
+ _$_.output_push(' class="page-header"');
1104
941
  _$_.output_push('>');
1105
942
 
1106
943
  {
1107
- _$_.output_push('MyApp');
1108
- }
944
+ _$_.output_push('<div');
945
+ _$_.output_push(' class="logo"');
946
+ _$_.output_push('>');
1109
947
 
1110
- _$_.output_push('</div>');
1111
- }
948
+ {
949
+ _$_.output_push('MyApp');
950
+ }
1112
951
 
1113
- _$_.output_push('</header>');
1114
- });
952
+ _$_.output_push('</div>');
953
+ }
1115
954
 
1116
- _$_.pop_component();
955
+ _$_.output_push('</header>');
956
+ });
957
+ });
1117
958
  }
1118
959
 
1119
960
  export function LayoutWithSidebarAndMain() {
1120
- _$_.push_component();
1121
-
1122
- _$_.regular_block(() => {
1123
- _$_.output_push('<div');
1124
- _$_.output_push(' class="layout"');
1125
- _$_.output_push('>');
1126
-
1127
- {
1128
- {
1129
- const comp = PageHeader;
1130
- const args = [{}];
1131
-
1132
- comp(...args);
1133
- }
1134
-
961
+ return _$_.tsrx_element(() => {
962
+ _$_.regular_block(() => {
1135
963
  _$_.output_push('<div');
1136
- _$_.output_push(' class="content-wrapper"');
964
+ _$_.output_push(' class="layout"');
1137
965
  _$_.output_push('>');
1138
966
 
1139
967
  {
1140
968
  {
1141
- const comp = SideNav;
1142
- const args = [{ currentPath: "/intro" }];
969
+ const comp = PageHeader;
970
+ const args = [{}];
1143
971
 
1144
- comp(...args);
972
+ _$_.render_component(comp, ...args);
1145
973
  }
1146
974
 
1147
- _$_.output_push('<main');
1148
- _$_.output_push(' class="main-content"');
975
+ _$_.output_push('<div');
976
+ _$_.output_push(' class="content-wrapper"');
1149
977
  _$_.output_push('>');
1150
978
 
1151
979
  {
1152
- _$_.output_push('<div');
1153
- _$_.output_push(' class="article"');
980
+ {
981
+ const comp = SideNav;
982
+ const args = [{ currentPath: "/intro" }];
983
+
984
+ _$_.render_component(comp, ...args);
985
+ }
986
+
987
+ _$_.output_push('<main');
988
+ _$_.output_push(' class="main-content"');
1154
989
  _$_.output_push('>');
1155
990
 
1156
991
  {
1157
992
  _$_.output_push('<div');
993
+ _$_.output_push(' class="article"');
1158
994
  _$_.output_push('>');
1159
995
 
1160
996
  {
1161
- _$_.output_push('<h1');
997
+ _$_.output_push('<div');
1162
998
  _$_.output_push('>');
1163
999
 
1164
1000
  {
1165
- _$_.output_push('Introduction');
1166
- }
1001
+ _$_.output_push('<h1');
1002
+ _$_.output_push('>');
1167
1003
 
1168
- _$_.output_push('</h1>');
1169
- _$_.output_push('<p');
1170
- _$_.output_push('>');
1004
+ {
1005
+ _$_.output_push('Introduction');
1006
+ }
1171
1007
 
1172
- {
1173
- _$_.output_push('Welcome to the docs.');
1008
+ _$_.output_push('</h1>');
1009
+ _$_.output_push('<p');
1010
+ _$_.output_push('>');
1011
+
1012
+ {
1013
+ _$_.output_push('Welcome to the docs.');
1014
+ }
1015
+
1016
+ _$_.output_push('</p>');
1174
1017
  }
1175
1018
 
1176
- _$_.output_push('</p>');
1019
+ _$_.output_push('</div>');
1177
1020
  }
1178
1021
 
1179
1022
  _$_.output_push('</div>');
1180
- }
1181
-
1182
- _$_.output_push('</div>');
1183
- _$_.output_push('<!--[-->');
1023
+ _$_.output_push('<!--[-->');
1184
1024
 
1185
- if (true) {
1186
- _$_.output_push('<div');
1187
- _$_.output_push(' class="edit-link"');
1188
- _$_.output_push('>');
1189
-
1190
- {
1191
- _$_.output_push('<a');
1192
- _$_.output_push(' href="/edit"');
1025
+ if (true) {
1026
+ _$_.output_push('<div');
1027
+ _$_.output_push(' class="edit-link"');
1193
1028
  _$_.output_push('>');
1194
1029
 
1195
1030
  {
1196
- _$_.output_push('Edit');
1031
+ _$_.output_push('<a');
1032
+ _$_.output_push(' href="/edit"');
1033
+ _$_.output_push('>');
1034
+
1035
+ {
1036
+ _$_.output_push('Edit');
1037
+ }
1038
+
1039
+ _$_.output_push('</a>');
1197
1040
  }
1198
1041
 
1199
- _$_.output_push('</a>');
1042
+ _$_.output_push('</div>');
1200
1043
  }
1201
1044
 
1202
- _$_.output_push('</div>');
1203
- }
1204
-
1205
- _$_.output_push('<!--]-->');
1045
+ _$_.output_push('<!--]-->');
1206
1046
 
1207
- {
1208
- const comp = PageHeader;
1209
- const args = [{}];
1047
+ {
1048
+ const comp = PageHeader;
1049
+ const args = [{}];
1210
1050
 
1211
- comp(...args);
1051
+ _$_.render_component(comp, ...args);
1052
+ }
1212
1053
  }
1054
+
1055
+ _$_.output_push('</main>');
1213
1056
  }
1214
1057
 
1215
- _$_.output_push('</main>');
1058
+ _$_.output_push('</div>');
1216
1059
  }
1217
1060
 
1218
1061
  _$_.output_push('</div>');
1219
- }
1220
-
1221
- _$_.output_push('</div>');
1062
+ });
1222
1063
  });
1223
-
1224
- _$_.pop_component();
1225
1064
  }
1226
1065
 
1227
1066
  function ArticleWrapper({ children }) {
1228
- _$_.push_component();
1229
-
1230
- _$_.regular_block(() => {
1231
- _$_.output_push('<article');
1232
- _$_.output_push(' class="doc-content"');
1233
- _$_.output_push('>');
1234
-
1235
- {
1236
- _$_.output_push('<div');
1067
+ return _$_.tsrx_element(() => {
1068
+ _$_.regular_block(() => {
1069
+ _$_.output_push('<article');
1070
+ _$_.output_push(' class="doc-content"');
1237
1071
  _$_.output_push('>');
1238
1072
 
1239
1073
  {
1240
- _$_.render_expression(children);
1241
- }
1074
+ _$_.output_push('<div');
1075
+ _$_.output_push('>');
1242
1076
 
1243
- _$_.output_push('</div>');
1244
- }
1077
+ {
1078
+ _$_.render_expression(children);
1079
+ }
1245
1080
 
1246
- _$_.output_push('</article>');
1247
- });
1081
+ _$_.output_push('</div>');
1082
+ }
1248
1083
 
1249
- _$_.pop_component();
1084
+ _$_.output_push('</article>');
1085
+ });
1086
+ });
1250
1087
  }
1251
1088
 
1252
1089
  function SimpleFooter() {
1253
- _$_.push_component();
1254
-
1255
- _$_.regular_block(() => {
1256
- _$_.output_push('<footer');
1257
- _$_.output_push(' class="doc-footer"');
1258
- _$_.output_push('>');
1090
+ return _$_.tsrx_element(() => {
1091
+ _$_.regular_block(() => {
1092
+ _$_.output_push('<footer');
1093
+ _$_.output_push(' class="doc-footer"');
1094
+ _$_.output_push('>');
1259
1095
 
1260
- {
1261
- _$_.output_push('Footer');
1262
- }
1096
+ {
1097
+ _$_.output_push('Footer');
1098
+ }
1263
1099
 
1264
- _$_.output_push('</footer>');
1100
+ _$_.output_push('</footer>');
1101
+ });
1265
1102
  });
1266
-
1267
- _$_.pop_component();
1268
1103
  }
1269
1104
 
1270
1105
  export function ArticleWithChildrenThenSibling() {
1271
- _$_.push_component();
1272
-
1273
- _$_.regular_block(() => {
1274
- _$_.output_push('<div');
1275
- _$_.output_push(' class="content-container"');
1276
- _$_.output_push('>');
1106
+ return _$_.tsrx_element(() => {
1107
+ _$_.regular_block(() => {
1108
+ _$_.output_push('<div');
1109
+ _$_.output_push(' class="content-container"');
1110
+ _$_.output_push('>');
1277
1111
 
1278
- {
1279
1112
  {
1280
- const comp = ArticleWrapper;
1281
-
1282
- const args = [
1283
- {
1284
- children: _$_.tsrx_element(function render_children() {
1285
- _$_.push_component();
1286
- _$_.output_push('<h1');
1287
- _$_.output_push('>');
1113
+ {
1114
+ const comp = ArticleWrapper;
1288
1115
 
1289
- {
1290
- _$_.output_push('Title');
1291
- }
1116
+ const args = [
1117
+ {
1118
+ children: _$_.tsrx_element(() => {
1119
+ return _$_.tsrx_element(() => {
1120
+ _$_.output_push('<h1');
1121
+ _$_.output_push('>');
1292
1122
 
1293
- _$_.output_push('</h1>');
1294
- _$_.output_push('<p');
1295
- _$_.output_push('>');
1123
+ {
1124
+ _$_.output_push('Title');
1125
+ }
1296
1126
 
1297
- {
1298
- _$_.output_push('Content goes here.');
1299
- }
1127
+ _$_.output_push('</h1>');
1128
+ _$_.output_push('<p');
1129
+ _$_.output_push('>');
1300
1130
 
1301
- _$_.output_push('</p>');
1302
- _$_.pop_component();
1303
- })
1304
- }
1305
- ];
1131
+ {
1132
+ _$_.output_push('Content goes here.');
1133
+ }
1306
1134
 
1307
- comp(...args);
1308
- }
1135
+ _$_.output_push('</p>');
1136
+ });
1137
+ })
1138
+ }
1139
+ ];
1309
1140
 
1310
- _$_.output_push('<!--[-->');
1141
+ _$_.render_component(comp, ...args);
1142
+ }
1311
1143
 
1312
- if (true) {
1313
- _$_.output_push('<div');
1314
- _$_.output_push(' class="edit-link"');
1315
- _$_.output_push('>');
1144
+ _$_.output_push('<!--[-->');
1316
1145
 
1317
- {
1318
- _$_.output_push('<a');
1319
- _$_.output_push(' href="/edit"');
1146
+ if (true) {
1147
+ _$_.output_push('<div');
1148
+ _$_.output_push(' class="edit-link"');
1320
1149
  _$_.output_push('>');
1321
1150
 
1322
1151
  {
1323
- _$_.output_push('Edit');
1324
- }
1152
+ _$_.output_push('<a');
1153
+ _$_.output_push(' href="/edit"');
1154
+ _$_.output_push('>');
1325
1155
 
1326
- _$_.output_push('</a>');
1327
- }
1156
+ {
1157
+ _$_.output_push('Edit');
1158
+ }
1328
1159
 
1329
- _$_.output_push('</div>');
1330
- }
1160
+ _$_.output_push('</a>');
1161
+ }
1331
1162
 
1332
- _$_.output_push('<!--]-->');
1333
- _$_.output_push('<!--[-->');
1163
+ _$_.output_push('</div>');
1164
+ }
1334
1165
 
1335
- if (true) {
1336
- _$_.output_push('<nav');
1337
- _$_.output_push(' class="prev-next"');
1338
- _$_.output_push('>');
1166
+ _$_.output_push('<!--]-->');
1167
+ _$_.output_push('<!--[-->');
1339
1168
 
1340
- {
1341
- _$_.output_push('<a');
1342
- _$_.output_push(' href="/prev"');
1169
+ if (true) {
1170
+ _$_.output_push('<nav');
1171
+ _$_.output_push(' class="prev-next"');
1343
1172
  _$_.output_push('>');
1344
1173
 
1345
1174
  {
1346
- _$_.output_push('Previous');
1175
+ _$_.output_push('<a');
1176
+ _$_.output_push(' href="/prev"');
1177
+ _$_.output_push('>');
1178
+
1179
+ {
1180
+ _$_.output_push('Previous');
1181
+ }
1182
+
1183
+ _$_.output_push('</a>');
1347
1184
  }
1348
1185
 
1349
- _$_.output_push('</a>');
1186
+ _$_.output_push('</nav>');
1350
1187
  }
1351
1188
 
1352
- _$_.output_push('</nav>');
1353
- }
1354
-
1355
- _$_.output_push('<!--]-->');
1189
+ _$_.output_push('<!--]-->');
1356
1190
 
1357
- {
1358
- const comp = SimpleFooter;
1359
- const args = [{}];
1191
+ {
1192
+ const comp = SimpleFooter;
1193
+ const args = [{}];
1360
1194
 
1361
- comp(...args);
1195
+ _$_.render_component(comp, ...args);
1196
+ }
1362
1197
  }
1363
- }
1364
1198
 
1365
- _$_.output_push('</div>');
1199
+ _$_.output_push('</div>');
1200
+ });
1366
1201
  });
1367
-
1368
- _$_.pop_component();
1369
1202
  }
1370
1203
 
1371
1204
  export function ArticleWithHtmlChildThenSibling() {
1372
- _$_.push_component();
1205
+ return _$_.tsrx_element(() => {
1206
+ const htmlContent = '<pre><code>const x = 1;</code></pre>';
1373
1207
 
1374
- const htmlContent = '<pre><code>const x = 1;</code></pre>';
1375
-
1376
- _$_.regular_block(() => {
1377
- _$_.output_push('<div');
1378
- _$_.output_push(' class="content-container"');
1379
- _$_.output_push('>');
1208
+ _$_.regular_block(() => {
1209
+ _$_.output_push('<div');
1210
+ _$_.output_push(' class="content-container"');
1211
+ _$_.output_push('>');
1380
1212
 
1381
- {
1382
1213
  {
1383
- const comp = ArticleWrapper;
1384
-
1385
- const args = [
1386
- {
1387
- children: _$_.tsrx_element(function render_children() {
1388
- _$_.push_component();
1389
- _$_.output_push('<div');
1390
- _$_.output_push(' class="doc-content"');
1391
- _$_.output_push('>');
1392
-
1393
- {
1394
- const html_value_17 = String(htmlContent ?? '');
1395
-
1396
- _$_.output_push('<!--' + _$_.simple_hash(html_value_17) + '-->');
1397
- _$_.output_push(html_value_17);
1398
- _$_.output_push('<!---->');
1399
- }
1400
-
1401
- _$_.output_push('</div>');
1402
- _$_.pop_component();
1403
- })
1404
- }
1405
- ];
1214
+ {
1215
+ const comp = ArticleWrapper;
1406
1216
 
1407
- comp(...args);
1408
- }
1217
+ const args = [
1218
+ {
1219
+ children: _$_.tsrx_element(() => {
1220
+ return _$_.tsrx_element(() => {
1221
+ _$_.output_push('<div');
1222
+ _$_.output_push(' class="doc-content"');
1223
+ _$_.output_push('>');
1224
+ _$_.output_push(String(htmlContent ?? ''));
1225
+ _$_.output_push('</div>');
1226
+ });
1227
+ })
1228
+ }
1229
+ ];
1409
1230
 
1410
- _$_.output_push('<!--[-->');
1231
+ _$_.render_component(comp, ...args);
1232
+ }
1411
1233
 
1412
- if (true) {
1413
- _$_.output_push('<div');
1414
- _$_.output_push(' class="edit-link"');
1415
- _$_.output_push('>');
1234
+ _$_.output_push('<!--[-->');
1416
1235
 
1417
- {
1418
- _$_.output_push('<a');
1419
- _$_.output_push(' href="/edit"');
1236
+ if (true) {
1237
+ _$_.output_push('<div');
1238
+ _$_.output_push(' class="edit-link"');
1420
1239
  _$_.output_push('>');
1421
1240
 
1422
1241
  {
1423
- _$_.output_push('Edit');
1242
+ _$_.output_push('<a');
1243
+ _$_.output_push(' href="/edit"');
1244
+ _$_.output_push('>');
1245
+
1246
+ {
1247
+ _$_.output_push('Edit');
1248
+ }
1249
+
1250
+ _$_.output_push('</a>');
1424
1251
  }
1425
1252
 
1426
- _$_.output_push('</a>');
1253
+ _$_.output_push('</div>');
1427
1254
  }
1428
1255
 
1429
- _$_.output_push('</div>');
1430
- }
1431
-
1432
- _$_.output_push('<!--]-->');
1256
+ _$_.output_push('<!--]-->');
1433
1257
 
1434
- {
1435
- const comp = SimpleFooter;
1436
- const args = [{}];
1258
+ {
1259
+ const comp = SimpleFooter;
1260
+ const args = [{}];
1437
1261
 
1438
- comp(...args);
1262
+ _$_.render_component(comp, ...args);
1263
+ }
1439
1264
  }
1440
- }
1441
1265
 
1442
- _$_.output_push('</div>');
1266
+ _$_.output_push('</div>');
1267
+ });
1443
1268
  });
1444
-
1445
- _$_.pop_component();
1446
1269
  }
1447
1270
 
1448
1271
  function InlineArticleLayout({ children }) {
1449
- _$_.push_component();
1450
-
1451
- _$_.regular_block(() => {
1452
- _$_.output_push('<div');
1453
- _$_.output_push(' class="content-container"');
1454
- _$_.output_push('>');
1455
-
1456
- {
1457
- _$_.output_push('<article');
1458
- _$_.output_push(' class="doc-content"');
1272
+ return _$_.tsrx_element(() => {
1273
+ _$_.regular_block(() => {
1274
+ _$_.output_push('<div');
1275
+ _$_.output_push(' class="content-container"');
1459
1276
  _$_.output_push('>');
1460
1277
 
1461
1278
  {
1462
- _$_.output_push('<div');
1279
+ _$_.output_push('<article');
1280
+ _$_.output_push(' class="doc-content"');
1463
1281
  _$_.output_push('>');
1464
1282
 
1465
1283
  {
1466
- _$_.render_expression(children);
1467
- }
1284
+ _$_.output_push('<div');
1285
+ _$_.output_push('>');
1468
1286
 
1469
- _$_.output_push('</div>');
1470
- }
1287
+ {
1288
+ _$_.render_expression(children);
1289
+ }
1471
1290
 
1472
- _$_.output_push('</article>');
1473
- _$_.output_push('<!--[-->');
1291
+ _$_.output_push('</div>');
1292
+ }
1474
1293
 
1475
- if (true) {
1476
- _$_.output_push('<div');
1477
- _$_.output_push(' class="edit-link"');
1478
- _$_.output_push('>');
1294
+ _$_.output_push('</article>');
1295
+ _$_.output_push('<!--[-->');
1479
1296
 
1480
- {
1481
- _$_.output_push('<a');
1482
- _$_.output_push(' href="/edit"');
1297
+ if (true) {
1298
+ _$_.output_push('<div');
1299
+ _$_.output_push(' class="edit-link"');
1483
1300
  _$_.output_push('>');
1484
1301
 
1485
1302
  {
1486
- _$_.output_push('Edit');
1303
+ _$_.output_push('<a');
1304
+ _$_.output_push(' href="/edit"');
1305
+ _$_.output_push('>');
1306
+
1307
+ {
1308
+ _$_.output_push('Edit');
1309
+ }
1310
+
1311
+ _$_.output_push('</a>');
1487
1312
  }
1488
1313
 
1489
- _$_.output_push('</a>');
1314
+ _$_.output_push('</div>');
1490
1315
  }
1491
1316
 
1492
- _$_.output_push('</div>');
1493
- }
1494
-
1495
- _$_.output_push('<!--]-->');
1317
+ _$_.output_push('<!--]-->');
1496
1318
 
1497
- {
1498
- const comp = SimpleFooter;
1499
- const args = [{}];
1319
+ {
1320
+ const comp = SimpleFooter;
1321
+ const args = [{}];
1500
1322
 
1501
- comp(...args);
1323
+ _$_.render_component(comp, ...args);
1324
+ }
1502
1325
  }
1503
- }
1504
1326
 
1505
- _$_.output_push('</div>');
1327
+ _$_.output_push('</div>');
1328
+ });
1506
1329
  });
1507
-
1508
- _$_.pop_component();
1509
1330
  }
1510
1331
 
1511
1332
  export function InlineArticleWithHtmlChild() {
1512
- _$_.push_component();
1513
-
1514
- const htmlContent = '<pre><code>const x = 1;</code></pre>';
1515
-
1516
- _$_.regular_block(() => {
1517
- {
1518
- const comp = InlineArticleLayout;
1519
-
1520
- const args = [
1521
- {
1522
- children: _$_.tsrx_element(function render_children() {
1523
- _$_.push_component();
1524
- _$_.output_push('<div');
1525
- _$_.output_push(' class="doc-content"');
1526
- _$_.output_push('>');
1527
-
1528
- {
1529
- const html_value_18 = String(htmlContent ?? '');
1333
+ return _$_.tsrx_element(() => {
1334
+ const htmlContent = '<pre><code>const x = 1;</code></pre>';
1530
1335
 
1531
- _$_.output_push('<!--' + _$_.simple_hash(html_value_18) + '-->');
1532
- _$_.output_push(html_value_18);
1533
- _$_.output_push('<!---->');
1534
- }
1336
+ _$_.regular_block(() => {
1337
+ {
1338
+ const comp = InlineArticleLayout;
1535
1339
 
1536
- _$_.output_push('</div>');
1537
- _$_.pop_component();
1538
- })
1539
- }
1540
- ];
1340
+ const args = [
1341
+ {
1342
+ children: _$_.tsrx_element(() => {
1343
+ return _$_.tsrx_element(() => {
1344
+ _$_.output_push('<div');
1345
+ _$_.output_push(' class="doc-content"');
1346
+ _$_.output_push('>');
1347
+ _$_.output_push(String(htmlContent ?? ''));
1348
+ _$_.output_push('</div>');
1349
+ });
1350
+ })
1351
+ }
1352
+ ];
1541
1353
 
1542
- comp(...args);
1543
- }
1354
+ _$_.render_component(comp, ...args);
1355
+ }
1356
+ });
1544
1357
  });
1545
-
1546
- _$_.pop_component();
1547
1358
  }
1548
1359
 
1549
1360
  function HeaderStub() {
1550
- _$_.push_component();
1551
-
1552
- _$_.regular_block(() => {
1553
- _$_.output_push('<header');
1554
- _$_.output_push(' class="header"');
1555
- _$_.output_push('>');
1361
+ return _$_.tsrx_element(() => {
1362
+ _$_.regular_block(() => {
1363
+ _$_.output_push('<header');
1364
+ _$_.output_push(' class="header"');
1365
+ _$_.output_push('>');
1556
1366
 
1557
- {
1558
- _$_.output_push('Header');
1559
- }
1367
+ {
1368
+ _$_.output_push('Header');
1369
+ }
1560
1370
 
1561
- _$_.output_push('</header>');
1371
+ _$_.output_push('</header>');
1372
+ });
1562
1373
  });
1563
-
1564
- _$_.pop_component();
1565
1374
  }
1566
1375
 
1567
1376
  function SidebarStub() {
1568
- _$_.push_component();
1569
-
1570
- _$_.regular_block(() => {
1571
- _$_.output_push('<aside');
1572
- _$_.output_push(' class="sidebar"');
1573
- _$_.output_push('>');
1377
+ return _$_.tsrx_element(() => {
1378
+ _$_.regular_block(() => {
1379
+ _$_.output_push('<aside');
1380
+ _$_.output_push(' class="sidebar"');
1381
+ _$_.output_push('>');
1574
1382
 
1575
- {
1576
- _$_.output_push('Sidebar');
1577
- }
1383
+ {
1384
+ _$_.output_push('Sidebar');
1385
+ }
1578
1386
 
1579
- _$_.output_push('</aside>');
1387
+ _$_.output_push('</aside>');
1388
+ });
1580
1389
  });
1581
-
1582
- _$_.pop_component();
1583
1390
  }
1584
1391
 
1585
1392
  function FooterStub() {
1586
- _$_.push_component();
1587
-
1588
- _$_.regular_block(() => {
1589
- _$_.output_push('<footer');
1590
- _$_.output_push(' class="footer"');
1591
- _$_.output_push('>');
1393
+ return _$_.tsrx_element(() => {
1394
+ _$_.regular_block(() => {
1395
+ _$_.output_push('<footer');
1396
+ _$_.output_push(' class="footer"');
1397
+ _$_.output_push('>');
1592
1398
 
1593
- {
1594
- _$_.output_push('Footer');
1595
- }
1399
+ {
1400
+ _$_.output_push('Footer');
1401
+ }
1596
1402
 
1597
- _$_.output_push('</footer>');
1403
+ _$_.output_push('</footer>');
1404
+ });
1598
1405
  });
1599
-
1600
- _$_.pop_component();
1601
1406
  }
1602
1407
 
1603
1408
  function DocsLayoutInner({ children, editPath = '', nextLink = null }) {
1604
- _$_.push_component();
1605
-
1606
- _$_.regular_block(() => {
1607
- _$_.output_push('<div');
1608
- _$_.output_push(' class="layout"');
1609
- _$_.output_push('>');
1610
-
1611
- {
1612
- {
1613
- const comp = HeaderStub;
1614
- const args = [{}];
1615
-
1616
- comp(...args);
1617
- }
1618
-
1409
+ return _$_.tsrx_element(() => {
1410
+ _$_.regular_block(() => {
1619
1411
  _$_.output_push('<div');
1620
- _$_.output_push(' class="docs-wrapper"');
1412
+ _$_.output_push(' class="layout"');
1621
1413
  _$_.output_push('>');
1622
1414
 
1623
1415
  {
1624
1416
  {
1625
- const comp = SidebarStub;
1417
+ const comp = HeaderStub;
1626
1418
  const args = [{}];
1627
1419
 
1628
- comp(...args);
1420
+ _$_.render_component(comp, ...args);
1629
1421
  }
1630
1422
 
1631
- _$_.output_push('<main');
1632
- _$_.output_push(' class="docs-main"');
1423
+ _$_.output_push('<div');
1424
+ _$_.output_push(' class="docs-wrapper"');
1633
1425
  _$_.output_push('>');
1634
1426
 
1635
1427
  {
1636
- _$_.output_push('<div');
1637
- _$_.output_push(' class="docs-container"');
1428
+ {
1429
+ const comp = SidebarStub;
1430
+ const args = [{}];
1431
+
1432
+ _$_.render_component(comp, ...args);
1433
+ }
1434
+
1435
+ _$_.output_push('<main');
1436
+ _$_.output_push(' class="docs-main"');
1638
1437
  _$_.output_push('>');
1639
1438
 
1640
1439
  {
1641
1440
  _$_.output_push('<div');
1642
- _$_.output_push(' class="content"');
1441
+ _$_.output_push(' class="docs-container"');
1643
1442
  _$_.output_push('>');
1644
1443
 
1645
1444
  {
1646
1445
  _$_.output_push('<div');
1647
- _$_.output_push(' class="content-container"');
1446
+ _$_.output_push(' class="content"');
1648
1447
  _$_.output_push('>');
1649
1448
 
1650
1449
  {
1651
- _$_.output_push('<article');
1652
- _$_.output_push(' class="doc-content"');
1450
+ _$_.output_push('<div');
1451
+ _$_.output_push(' class="content-container"');
1653
1452
  _$_.output_push('>');
1654
1453
 
1655
1454
  {
1656
- _$_.output_push('<div');
1455
+ _$_.output_push('<article');
1456
+ _$_.output_push(' class="doc-content"');
1657
1457
  _$_.output_push('>');
1658
1458
 
1659
1459
  {
1660
- _$_.render_expression(children);
1661
- }
1460
+ _$_.output_push('<div');
1461
+ _$_.output_push('>');
1662
1462
 
1663
- _$_.output_push('</div>');
1664
- }
1463
+ {
1464
+ _$_.render_expression(children);
1465
+ }
1665
1466
 
1666
- _$_.output_push('</article>');
1667
- _$_.output_push('<!--[-->');
1467
+ _$_.output_push('</div>');
1468
+ }
1668
1469
 
1669
- if (editPath) {
1670
- _$_.output_push('<div');
1671
- _$_.output_push(' class="edit-link"');
1672
- _$_.output_push('>');
1470
+ _$_.output_push('</article>');
1471
+ _$_.output_push('<!--[-->');
1673
1472
 
1674
- {
1675
- _$_.output_push('<a');
1676
- _$_.output_push(' href="/edit"');
1473
+ if (editPath) {
1474
+ _$_.output_push('<div');
1475
+ _$_.output_push(' class="edit-link"');
1677
1476
  _$_.output_push('>');
1678
1477
 
1679
1478
  {
1680
- _$_.output_push('Edit on GitHub');
1681
- }
1479
+ _$_.output_push('<a');
1480
+ _$_.output_push(' href="/edit"');
1481
+ _$_.output_push('>');
1682
1482
 
1683
- _$_.output_push('</a>');
1684
- }
1483
+ {
1484
+ _$_.output_push('Edit on GitHub');
1485
+ }
1685
1486
 
1686
- _$_.output_push('</div>');
1687
- }
1487
+ _$_.output_push('</a>');
1488
+ }
1688
1489
 
1689
- _$_.output_push('<!--]-->');
1690
- _$_.output_push('<!--[-->');
1490
+ _$_.output_push('</div>');
1491
+ }
1691
1492
 
1692
- if (nextLink) {
1693
- _$_.output_push('<nav');
1694
- _$_.output_push(' class="prev-next"');
1695
- _$_.output_push('>');
1493
+ _$_.output_push('<!--]-->');
1494
+ _$_.output_push('<!--[-->');
1696
1495
 
1697
- {
1698
- _$_.output_push('<a');
1699
- _$_.output_push(_$_.attr('href', nextLink.href, false));
1496
+ if (nextLink) {
1497
+ _$_.output_push('<nav');
1498
+ _$_.output_push(' class="prev-next"');
1700
1499
  _$_.output_push('>');
1701
1500
 
1702
1501
  {
1703
- _$_.output_push(_$_.escape(nextLink.text));
1502
+ _$_.output_push('<a');
1503
+ _$_.output_push(_$_.attr('href', nextLink.href, false));
1504
+ _$_.output_push('>');
1505
+
1506
+ {
1507
+ _$_.output_push(_$_.escape(nextLink.text));
1508
+ }
1509
+
1510
+ _$_.output_push('</a>');
1704
1511
  }
1705
1512
 
1706
- _$_.output_push('</a>');
1513
+ _$_.output_push('</nav>');
1707
1514
  }
1708
1515
 
1709
- _$_.output_push('</nav>');
1710
- }
1711
-
1712
- _$_.output_push('<!--]-->');
1516
+ _$_.output_push('<!--]-->');
1713
1517
 
1714
- {
1715
- const comp = FooterStub;
1716
- const args = [{}];
1518
+ {
1519
+ const comp = FooterStub;
1520
+ const args = [{}];
1717
1521
 
1718
- comp(...args);
1522
+ _$_.render_component(comp, ...args);
1523
+ }
1719
1524
  }
1525
+
1526
+ _$_.output_push('</div>');
1720
1527
  }
1721
1528
 
1722
1529
  _$_.output_push('</div>');
@@ -1725,97 +1532,73 @@ function DocsLayoutInner({ children, editPath = '', nextLink = null }) {
1725
1532
  _$_.output_push('</div>');
1726
1533
  }
1727
1534
 
1728
- _$_.output_push('</div>');
1535
+ _$_.output_push('</main>');
1729
1536
  }
1730
1537
 
1731
- _$_.output_push('</main>');
1538
+ _$_.output_push('</div>');
1732
1539
  }
1733
1540
 
1734
1541
  _$_.output_push('</div>');
1735
- }
1736
-
1737
- _$_.output_push('</div>');
1542
+ });
1738
1543
  });
1739
-
1740
- _$_.pop_component();
1741
1544
  }
1742
1545
 
1743
1546
  export function DocsLayoutWithData() {
1744
- _$_.push_component();
1745
-
1746
- const htmlContent = '<h1>Title</h1><p>Content</p>';
1747
-
1748
- _$_.regular_block(() => {
1749
- {
1750
- const comp = DocsLayoutInner;
1751
-
1752
- const args = [
1753
- {
1754
- editPath: "docs/styling.md",
1755
- nextLink: { href: '/next', text: 'Next' },
1756
- children: _$_.tsrx_element(function render_children() {
1757
- _$_.push_component();
1758
- _$_.output_push('<div');
1759
- _$_.output_push(' class="doc-content"');
1760
- _$_.output_push('>');
1761
-
1762
- {
1763
- const html_value_19 = String(htmlContent ?? '');
1547
+ return _$_.tsrx_element(() => {
1548
+ const htmlContent = '<h1>Title</h1><p>Content</p>';
1764
1549
 
1765
- _$_.output_push('<!--' + _$_.simple_hash(html_value_19) + '-->');
1766
- _$_.output_push(html_value_19);
1767
- _$_.output_push('<!---->');
1768
- }
1550
+ _$_.regular_block(() => {
1551
+ {
1552
+ const comp = DocsLayoutInner;
1769
1553
 
1770
- _$_.output_push('</div>');
1771
- _$_.pop_component();
1772
- })
1773
- }
1774
- ];
1554
+ const args = [
1555
+ {
1556
+ editPath: "docs/styling.md",
1557
+ nextLink: { href: '/next', text: 'Next' },
1558
+ children: _$_.tsrx_element(() => {
1559
+ return _$_.tsrx_element(() => {
1560
+ _$_.output_push('<div');
1561
+ _$_.output_push(' class="doc-content"');
1562
+ _$_.output_push('>');
1563
+ _$_.output_push(String(htmlContent ?? ''));
1564
+ _$_.output_push('</div>');
1565
+ });
1566
+ })
1567
+ }
1568
+ ];
1775
1569
 
1776
- comp(...args);
1777
- }
1570
+ _$_.render_component(comp, ...args);
1571
+ }
1572
+ });
1778
1573
  });
1779
-
1780
- _$_.pop_component();
1781
1574
  }
1782
1575
 
1783
1576
  export function DocsLayoutWithoutData() {
1784
- _$_.push_component();
1785
-
1786
- const htmlContent = undefined;
1577
+ return _$_.tsrx_element(() => {
1578
+ const htmlContent = undefined;
1787
1579
 
1788
- _$_.regular_block(() => {
1789
- {
1790
- const comp = DocsLayoutInner;
1791
-
1792
- const args = [
1793
- {
1794
- children: _$_.tsrx_element(function render_children() {
1795
- _$_.push_component();
1796
- _$_.output_push('<div');
1797
- _$_.output_push(' class="doc-content"');
1798
- _$_.output_push('>');
1799
-
1800
- {
1801
- const html_value_20 = String(htmlContent ?? '');
1802
-
1803
- _$_.output_push('<!--' + _$_.simple_hash(html_value_20) + '-->');
1804
- _$_.output_push(html_value_20);
1805
- _$_.output_push('<!---->');
1806
- }
1580
+ _$_.regular_block(() => {
1581
+ {
1582
+ const comp = DocsLayoutInner;
1807
1583
 
1808
- _$_.output_push('</div>');
1809
- _$_.pop_component();
1810
- })
1811
- }
1812
- ];
1584
+ const args = [
1585
+ {
1586
+ children: _$_.tsrx_element(() => {
1587
+ return _$_.tsrx_element(() => {
1588
+ _$_.output_push('<div');
1589
+ _$_.output_push(' class="doc-content"');
1590
+ _$_.output_push('>');
1591
+ _$_.output_push(String(htmlContent ?? ''));
1592
+ _$_.output_push('</div>');
1593
+ });
1594
+ })
1595
+ }
1596
+ ];
1813
1597
 
1814
- comp(...args);
1815
- }
1598
+ _$_.render_component(comp, ...args);
1599
+ }
1600
+ });
1816
1601
  });
1817
-
1818
- _$_.pop_component();
1819
1602
  }
1820
1603
 
1821
1604
  function DocsLayoutExact(
@@ -1827,616 +1610,528 @@ function DocsLayoutExact(
1827
1610
  toc = []
1828
1611
  }
1829
1612
  ) {
1830
- _$_.push_component();
1831
-
1832
- _$_.regular_block(() => {
1833
- _$_.output_push('<div');
1834
- _$_.output_push(' class="layout"');
1835
- _$_.output_push('>');
1836
-
1837
- {
1838
- {
1839
- const comp = HeaderStub;
1840
- const args = [{}];
1841
-
1842
- comp(...args);
1843
- }
1844
-
1613
+ return _$_.tsrx_element(() => {
1614
+ _$_.regular_block(() => {
1845
1615
  _$_.output_push('<div');
1846
- _$_.output_push(' class="docs-wrapper"');
1616
+ _$_.output_push(' class="layout"');
1847
1617
  _$_.output_push('>');
1848
1618
 
1849
1619
  {
1850
1620
  {
1851
- const comp = SidebarStub;
1621
+ const comp = HeaderStub;
1852
1622
  const args = [{}];
1853
1623
 
1854
- comp(...args);
1624
+ _$_.render_component(comp, ...args);
1855
1625
  }
1856
1626
 
1857
- _$_.output_push('<main');
1858
- _$_.output_push(' class="docs-main"');
1627
+ _$_.output_push('<div');
1628
+ _$_.output_push(' class="docs-wrapper"');
1859
1629
  _$_.output_push('>');
1860
1630
 
1861
1631
  {
1862
- _$_.output_push('<div');
1863
- _$_.output_push(' class="docs-container"');
1632
+ {
1633
+ const comp = SidebarStub;
1634
+ const args = [{}];
1635
+
1636
+ _$_.render_component(comp, ...args);
1637
+ }
1638
+
1639
+ _$_.output_push('<main');
1640
+ _$_.output_push(' class="docs-main"');
1864
1641
  _$_.output_push('>');
1865
1642
 
1866
1643
  {
1867
1644
  _$_.output_push('<div');
1868
- _$_.output_push(' class="content"');
1645
+ _$_.output_push(' class="docs-container"');
1869
1646
  _$_.output_push('>');
1870
1647
 
1871
1648
  {
1872
1649
  _$_.output_push('<div');
1873
- _$_.output_push(' class="content-container"');
1650
+ _$_.output_push(' class="content"');
1874
1651
  _$_.output_push('>');
1875
1652
 
1876
1653
  {
1877
- _$_.output_push('<article');
1878
- _$_.output_push(' class="doc-content"');
1654
+ _$_.output_push('<div');
1655
+ _$_.output_push(' class="content-container"');
1879
1656
  _$_.output_push('>');
1880
1657
 
1881
1658
  {
1882
- _$_.output_push('<div');
1659
+ _$_.output_push('<article');
1660
+ _$_.output_push(' class="doc-content"');
1883
1661
  _$_.output_push('>');
1884
1662
 
1885
1663
  {
1886
- _$_.render_expression(children);
1887
- }
1664
+ _$_.output_push('<div');
1665
+ _$_.output_push('>');
1888
1666
 
1889
- _$_.output_push('</div>');
1890
- }
1667
+ {
1668
+ _$_.render_expression(children);
1669
+ }
1891
1670
 
1892
- _$_.output_push('</article>');
1893
- _$_.output_push('<!--[-->');
1671
+ _$_.output_push('</div>');
1672
+ }
1894
1673
 
1895
- if (editPath) {
1896
- _$_.output_push('<div');
1897
- _$_.output_push(' class="edit-link"');
1898
- _$_.output_push('>');
1674
+ _$_.output_push('</article>');
1675
+ _$_.output_push('<!--[-->');
1899
1676
 
1900
- {
1901
- _$_.output_push('<a');
1902
- _$_.output_push(_$_.attr('href', `/edit/${editPath}`, false));
1677
+ if (editPath) {
1678
+ _$_.output_push('<div');
1679
+ _$_.output_push(' class="edit-link"');
1903
1680
  _$_.output_push('>');
1904
1681
 
1905
1682
  {
1906
- _$_.output_push('Edit on GitHub');
1907
- }
1683
+ _$_.output_push('<a');
1684
+ _$_.output_push(_$_.attr('href', `/edit/${editPath}`, false));
1685
+ _$_.output_push('>');
1908
1686
 
1909
- _$_.output_push('</a>');
1910
- }
1687
+ {
1688
+ _$_.output_push('Edit on GitHub');
1689
+ }
1911
1690
 
1912
- _$_.output_push('</div>');
1913
- }
1691
+ _$_.output_push('</a>');
1692
+ }
1914
1693
 
1915
- _$_.output_push('<!--]-->');
1916
- _$_.output_push('<!--[-->');
1694
+ _$_.output_push('</div>');
1695
+ }
1917
1696
 
1918
- if (prevLink || nextLink) {
1919
- _$_.output_push('<nav');
1920
- _$_.output_push(' class="prev-next"');
1921
- _$_.output_push('>');
1697
+ _$_.output_push('<!--]-->');
1698
+ _$_.output_push('<!--[-->');
1922
1699
 
1923
- {
1924
- _$_.output_push('<!--[-->');
1700
+ if (prevLink || nextLink) {
1701
+ _$_.output_push('<nav');
1702
+ _$_.output_push(' class="prev-next"');
1703
+ _$_.output_push('>');
1925
1704
 
1926
- if (prevLink) {
1927
- _$_.output_push('<a');
1928
- _$_.output_push(_$_.attr('href', prevLink.href, false));
1929
- _$_.output_push(' class="pager prev"');
1930
- _$_.output_push('>');
1705
+ {
1706
+ _$_.output_push('<!--[-->');
1931
1707
 
1932
- {
1933
- _$_.output_push('<span');
1934
- _$_.output_push(' class="title"');
1708
+ if (prevLink) {
1709
+ _$_.output_push('<a');
1710
+ _$_.output_push(_$_.attr('href', prevLink.href, false));
1711
+ _$_.output_push(' class="pager prev"');
1935
1712
  _$_.output_push('>');
1936
1713
 
1937
1714
  {
1938
- _$_.output_push(_$_.escape(prevLink.text));
1715
+ _$_.output_push('<span');
1716
+ _$_.output_push(' class="title"');
1717
+ _$_.output_push('>');
1718
+
1719
+ {
1720
+ _$_.output_push(_$_.escape(prevLink.text));
1721
+ }
1722
+
1723
+ _$_.output_push('</span>');
1939
1724
  }
1940
1725
 
1726
+ _$_.output_push('</a>');
1727
+ } else {
1728
+ _$_.output_push('<span');
1729
+ _$_.output_push('>');
1941
1730
  _$_.output_push('</span>');
1942
1731
  }
1943
1732
 
1944
- _$_.output_push('</a>');
1945
- } else {
1946
- _$_.output_push('<span');
1947
- _$_.output_push('>');
1948
- _$_.output_push('</span>');
1949
- }
1950
-
1951
- _$_.output_push('<!--]-->');
1952
- _$_.output_push('<!--[-->');
1953
-
1954
- if (nextLink) {
1955
- _$_.output_push('<a');
1956
- _$_.output_push(_$_.attr('href', nextLink.href, false));
1957
- _$_.output_push(' class="pager next"');
1958
- _$_.output_push('>');
1733
+ _$_.output_push('<!--]-->');
1734
+ _$_.output_push('<!--[-->');
1959
1735
 
1960
- {
1961
- _$_.output_push('<span');
1962
- _$_.output_push(' class="title"');
1736
+ if (nextLink) {
1737
+ _$_.output_push('<a');
1738
+ _$_.output_push(_$_.attr('href', nextLink.href, false));
1739
+ _$_.output_push(' class="pager next"');
1963
1740
  _$_.output_push('>');
1964
1741
 
1965
1742
  {
1966
- _$_.output_push(_$_.escape(nextLink.text));
1743
+ _$_.output_push('<span');
1744
+ _$_.output_push(' class="title"');
1745
+ _$_.output_push('>');
1746
+
1747
+ {
1748
+ _$_.output_push(_$_.escape(nextLink.text));
1749
+ }
1750
+
1751
+ _$_.output_push('</span>');
1967
1752
  }
1968
1753
 
1969
- _$_.output_push('</span>');
1754
+ _$_.output_push('</a>');
1970
1755
  }
1971
1756
 
1972
- _$_.output_push('</a>');
1757
+ _$_.output_push('<!--]-->');
1973
1758
  }
1974
1759
 
1975
- _$_.output_push('<!--]-->');
1760
+ _$_.output_push('</nav>');
1976
1761
  }
1977
1762
 
1978
- _$_.output_push('</nav>');
1979
- }
1980
-
1981
- _$_.output_push('<!--]-->');
1763
+ _$_.output_push('<!--]-->');
1982
1764
 
1983
- {
1984
- const comp = FooterStub;
1985
- const args = [{}];
1765
+ {
1766
+ const comp = FooterStub;
1767
+ const args = [{}];
1986
1768
 
1987
- comp(...args);
1769
+ _$_.render_component(comp, ...args);
1770
+ }
1988
1771
  }
1772
+
1773
+ _$_.output_push('</div>');
1989
1774
  }
1990
1775
 
1991
1776
  _$_.output_push('</div>');
1992
- }
1993
-
1994
- _$_.output_push('</div>');
1995
- _$_.output_push('<aside');
1996
- _$_.output_push(' class="aside"');
1997
- _$_.output_push('>');
1998
-
1999
- {
2000
- _$_.output_push('<!--[-->');
1777
+ _$_.output_push('<aside');
1778
+ _$_.output_push(' class="aside"');
1779
+ _$_.output_push('>');
2001
1780
 
2002
- if (toc.length > 0) {
2003
- _$_.output_push('<div');
2004
- _$_.output_push(' class="aside-content"');
2005
- _$_.output_push('>');
1781
+ {
1782
+ _$_.output_push('<!--[-->');
2006
1783
 
2007
- {
2008
- _$_.output_push('<nav');
2009
- _$_.output_push(' class="outline"');
1784
+ if (toc.length > 0) {
1785
+ _$_.output_push('<div');
1786
+ _$_.output_push(' class="aside-content"');
2010
1787
  _$_.output_push('>');
2011
1788
 
2012
1789
  {
2013
- _$_.output_push('<!--[-->');
1790
+ _$_.output_push('<nav');
1791
+ _$_.output_push(' class="outline"');
1792
+ _$_.output_push('>');
2014
1793
 
2015
- for (const item of toc) {
2016
- _$_.output_push('<a');
2017
- _$_.output_push(_$_.attr('href', item.href, false));
2018
- _$_.output_push('>');
1794
+ {
1795
+ _$_.output_push('<!--[-->');
2019
1796
 
2020
- {
2021
- _$_.output_push(_$_.escape(item.text));
1797
+ for (const item of toc) {
1798
+ _$_.output_push('<a');
1799
+ _$_.output_push(_$_.attr('href', item.href, false));
1800
+ _$_.output_push('>');
1801
+
1802
+ {
1803
+ _$_.output_push(_$_.escape(item.text));
1804
+ }
1805
+
1806
+ _$_.output_push('</a>');
2022
1807
  }
2023
1808
 
2024
- _$_.output_push('</a>');
1809
+ _$_.output_push('<!--]-->');
2025
1810
  }
2026
1811
 
2027
- _$_.output_push('<!--]-->');
1812
+ _$_.output_push('</nav>');
2028
1813
  }
2029
1814
 
2030
- _$_.output_push('</nav>');
1815
+ _$_.output_push('</div>');
2031
1816
  }
2032
1817
 
2033
- _$_.output_push('</div>');
1818
+ _$_.output_push('<!--]-->');
2034
1819
  }
2035
1820
 
2036
- _$_.output_push('<!--]-->');
1821
+ _$_.output_push('</aside>');
2037
1822
  }
2038
1823
 
2039
- _$_.output_push('</aside>');
1824
+ _$_.output_push('</div>');
2040
1825
  }
2041
1826
 
2042
- _$_.output_push('</div>');
1827
+ _$_.output_push('</main>');
2043
1828
  }
2044
1829
 
2045
- _$_.output_push('</main>');
1830
+ _$_.output_push('</div>');
2046
1831
  }
2047
1832
 
2048
1833
  _$_.output_push('</div>');
2049
- }
2050
-
2051
- _$_.output_push('</div>');
1834
+ });
2052
1835
  });
2053
-
2054
- _$_.pop_component();
2055
1836
  }
2056
1837
 
2057
1838
  export function DocsLayoutExactWithData() {
2058
- _$_.push_component();
2059
-
2060
- const htmlContent = '<h1>Styling Guide</h1><p>Content</p>';
2061
-
2062
- _$_.regular_block(() => {
2063
- {
2064
- const comp = DocsLayoutExact;
2065
-
2066
- const args = [
2067
- {
2068
- editPath: "docs/guide/styling.md",
2069
- prevLink: { href: '/prev', text: 'Previous' },
2070
- nextLink: { href: '/next', text: 'Next' },
2071
- toc: [
2072
- { href: '#intro', text: 'Introduction' },
2073
- { href: '#usage', text: 'Usage' }
2074
- ],
2075
-
2076
- children: _$_.tsrx_element(function render_children() {
2077
- _$_.push_component();
2078
- _$_.output_push('<div');
2079
- _$_.output_push(' class="doc-content"');
2080
- _$_.output_push('>');
2081
-
2082
- {
2083
- const html_value_21 = String(htmlContent ?? '');
1839
+ return _$_.tsrx_element(() => {
1840
+ const htmlContent = '<h1>Styling Guide</h1><p>Content</p>';
2084
1841
 
2085
- _$_.output_push('<!--' + _$_.simple_hash(html_value_21) + '-->');
2086
- _$_.output_push(html_value_21);
2087
- _$_.output_push('<!---->');
2088
- }
1842
+ _$_.regular_block(() => {
1843
+ {
1844
+ const comp = DocsLayoutExact;
2089
1845
 
2090
- _$_.output_push('</div>');
2091
- _$_.pop_component();
2092
- })
2093
- }
2094
- ];
1846
+ const args = [
1847
+ {
1848
+ editPath: "docs/guide/styling.md",
1849
+ prevLink: { href: '/prev', text: 'Previous' },
1850
+ nextLink: { href: '/next', text: 'Next' },
1851
+ toc: [
1852
+ { href: '#intro', text: 'Introduction' },
1853
+ { href: '#usage', text: 'Usage' }
1854
+ ],
1855
+
1856
+ children: _$_.tsrx_element(() => {
1857
+ return _$_.tsrx_element(() => {
1858
+ _$_.output_push('<div');
1859
+ _$_.output_push(' class="doc-content"');
1860
+ _$_.output_push('>');
1861
+ _$_.output_push(String(htmlContent ?? ''));
1862
+ _$_.output_push('</div>');
1863
+ });
1864
+ })
1865
+ }
1866
+ ];
2095
1867
 
2096
- comp(...args);
2097
- }
1868
+ _$_.render_component(comp, ...args);
1869
+ }
1870
+ });
2098
1871
  });
2099
-
2100
- _$_.pop_component();
2101
1872
  }
2102
1873
 
2103
1874
  export function DocsLayoutExactWithoutData() {
2104
- _$_.push_component();
2105
-
2106
- const htmlContent = undefined;
2107
- const editPath = undefined;
2108
- const prevLink = undefined;
2109
- const nextLink = undefined;
2110
- const toc = undefined;
2111
-
2112
- _$_.regular_block(() => {
2113
- {
2114
- const comp = DocsLayoutExact;
2115
-
2116
- const args = [
2117
- {
2118
- editPath,
2119
- prevLink,
2120
- nextLink,
2121
- toc,
2122
- children: _$_.tsrx_element(function render_children() {
2123
- _$_.push_component();
2124
- _$_.output_push('<div');
2125
- _$_.output_push(' class="doc-content"');
2126
- _$_.output_push('>');
2127
-
2128
- {
2129
- const html_value_22 = String(htmlContent ?? '');
2130
-
2131
- _$_.output_push('<!--' + _$_.simple_hash(html_value_22) + '-->');
2132
- _$_.output_push(html_value_22);
2133
- _$_.output_push('<!---->');
2134
- }
1875
+ return _$_.tsrx_element(() => {
1876
+ const htmlContent = undefined;
1877
+ const editPath = undefined;
1878
+ const prevLink = undefined;
1879
+ const nextLink = undefined;
1880
+ const toc = undefined;
1881
+
1882
+ _$_.regular_block(() => {
1883
+ {
1884
+ const comp = DocsLayoutExact;
2135
1885
 
2136
- _$_.output_push('</div>');
2137
- _$_.pop_component();
2138
- })
2139
- }
2140
- ];
1886
+ const args = [
1887
+ {
1888
+ editPath,
1889
+ prevLink,
1890
+ nextLink,
1891
+ toc,
1892
+ children: _$_.tsrx_element(() => {
1893
+ return _$_.tsrx_element(() => {
1894
+ _$_.output_push('<div');
1895
+ _$_.output_push(' class="doc-content"');
1896
+ _$_.output_push('>');
1897
+ _$_.output_push(String(htmlContent ?? ''));
1898
+ _$_.output_push('</div>');
1899
+ });
1900
+ })
1901
+ }
1902
+ ];
2141
1903
 
2142
- comp(...args);
2143
- }
1904
+ _$_.render_component(comp, ...args);
1905
+ }
1906
+ });
2144
1907
  });
2145
-
2146
- _$_.pop_component();
2147
1908
  }
2148
1909
 
2149
1910
  export function TemplateWithHtmlContent() {
2150
- _$_.push_component();
2151
-
2152
- const data = { title: 'Test', value: 42 };
1911
+ return _$_.tsrx_element(() => {
1912
+ const data = { title: 'Test', value: 42 };
2153
1913
 
2154
- _$_.regular_block(() => {
2155
- _$_.output_push('<div');
2156
- _$_.output_push('>');
2157
-
2158
- {
2159
- _$_.output_push('<template');
2160
- _$_.output_push(' id="t1"');
1914
+ _$_.regular_block(() => {
1915
+ _$_.output_push('<div');
2161
1916
  _$_.output_push('>');
2162
1917
 
2163
1918
  {
2164
- const html_value_23 = String(JSON.stringify(data) ?? '');
2165
-
2166
- _$_.output_push('<!--' + _$_.simple_hash(html_value_23) + '-->');
2167
- _$_.output_push(html_value_23);
2168
- _$_.output_push('<!---->');
2169
- }
1919
+ _$_.output_push('<template');
1920
+ _$_.output_push(' id="t1"');
1921
+ _$_.output_push('>');
1922
+ _$_.output_push(String(JSON.stringify(data) ?? ''));
1923
+ _$_.output_push('</template>');
1924
+ _$_.output_push('<p');
1925
+ _$_.output_push(' class="content"');
1926
+ _$_.output_push('>');
2170
1927
 
2171
- _$_.output_push('</template>');
2172
- _$_.output_push('<p');
2173
- _$_.output_push(' class="content"');
2174
- _$_.output_push('>');
1928
+ {
1929
+ _$_.output_push('Main content');
1930
+ }
2175
1931
 
2176
- {
2177
- _$_.output_push('Main content');
1932
+ _$_.output_push('</p>');
2178
1933
  }
2179
1934
 
2180
- _$_.output_push('</p>');
2181
- }
2182
-
2183
- _$_.output_push('</div>');
1935
+ _$_.output_push('</div>');
1936
+ });
2184
1937
  });
2185
-
2186
- _$_.pop_component();
2187
1938
  }
2188
1939
 
2189
1940
  export function TemplateWithHtmlAndSiblings() {
2190
- _$_.push_component();
2191
-
2192
- const data = { name: 'Ripple', version: '1.0' };
2193
-
2194
- _$_.regular_block(() => {
2195
- _$_.output_push('<div');
2196
- _$_.output_push(' class="wrapper"');
2197
- _$_.output_push('>');
1941
+ return _$_.tsrx_element(() => {
1942
+ const data = { name: 'Ripple', version: '1.0' };
2198
1943
 
2199
- {
2200
- _$_.output_push('<h1');
1944
+ _$_.regular_block(() => {
1945
+ _$_.output_push('<div');
1946
+ _$_.output_push(' class="wrapper"');
2201
1947
  _$_.output_push('>');
2202
1948
 
2203
1949
  {
2204
- _$_.output_push('Title');
2205
- }
2206
-
2207
- _$_.output_push('</h1>');
2208
- _$_.output_push('<template');
2209
- _$_.output_push(' id="data-template"');
2210
- _$_.output_push('>');
1950
+ _$_.output_push('<h1');
1951
+ _$_.output_push('>');
2211
1952
 
2212
- {
2213
- const html_value_24 = String(JSON.stringify(data) ?? '');
1953
+ {
1954
+ _$_.output_push('Title');
1955
+ }
2214
1956
 
2215
- _$_.output_push('<!--' + _$_.simple_hash(html_value_24) + '-->');
2216
- _$_.output_push(html_value_24);
2217
- _$_.output_push('<!---->');
2218
- }
1957
+ _$_.output_push('</h1>');
1958
+ _$_.output_push('<template');
1959
+ _$_.output_push(' id="data-template"');
1960
+ _$_.output_push('>');
1961
+ _$_.output_push(String(JSON.stringify(data) ?? ''));
1962
+ _$_.output_push('</template>');
1963
+ _$_.output_push('<p');
1964
+ _$_.output_push(' class="after-template"');
1965
+ _$_.output_push('>');
2219
1966
 
2220
- _$_.output_push('</template>');
2221
- _$_.output_push('<p');
2222
- _$_.output_push(' class="after-template"');
2223
- _$_.output_push('>');
1967
+ {
1968
+ _$_.output_push('Content after template');
1969
+ }
2224
1970
 
2225
- {
2226
- _$_.output_push('Content after template');
1971
+ _$_.output_push('</p>');
2227
1972
  }
2228
1973
 
2229
- _$_.output_push('</p>');
2230
- }
2231
-
2232
- _$_.output_push('</div>');
1974
+ _$_.output_push('</div>');
1975
+ });
2233
1976
  });
2234
-
2235
- _$_.pop_component();
2236
1977
  }
2237
1978
 
2238
1979
  function LayoutWithTemplate({ children, data }) {
2239
- _$_.push_component();
2240
-
2241
- _$_.regular_block(() => {
2242
- _$_.output_push('<div');
2243
- _$_.output_push(' class="layout"');
2244
- _$_.output_push('>');
2245
-
2246
- {
2247
- _$_.output_push('<template');
2248
- _$_.output_push(' id="page-data"');
1980
+ return _$_.tsrx_element(() => {
1981
+ _$_.regular_block(() => {
1982
+ _$_.output_push('<div');
1983
+ _$_.output_push(' class="layout"');
2249
1984
  _$_.output_push('>');
2250
1985
 
2251
1986
  {
2252
- const html_value_25 = String(JSON.stringify(data) ?? '');
2253
-
2254
- _$_.output_push('<!--' + _$_.simple_hash(html_value_25) + '-->');
2255
- _$_.output_push(html_value_25);
2256
- _$_.output_push('<!---->');
2257
- }
1987
+ _$_.output_push('<template');
1988
+ _$_.output_push(' id="page-data"');
1989
+ _$_.output_push('>');
1990
+ _$_.output_push(String(JSON.stringify(data) ?? ''));
1991
+ _$_.output_push('</template>');
1992
+ _$_.output_push('<main');
1993
+ _$_.output_push('>');
2258
1994
 
2259
- _$_.output_push('</template>');
2260
- _$_.output_push('<main');
2261
- _$_.output_push('>');
1995
+ {
1996
+ _$_.render_expression(children);
1997
+ }
2262
1998
 
2263
- {
2264
- _$_.render_expression(children);
1999
+ _$_.output_push('</main>');
2265
2000
  }
2266
2001
 
2267
- _$_.output_push('</main>');
2268
- }
2269
-
2270
- _$_.output_push('</div>');
2002
+ _$_.output_push('</div>');
2003
+ });
2271
2004
  });
2272
-
2273
- _$_.pop_component();
2274
2005
  }
2275
2006
 
2276
2007
  export function NestedTemplateInLayout() {
2277
- _$_.push_component();
2278
-
2279
- const doc = { title: 'Comparison', html: '<p>Content</p>' };
2280
-
2281
- _$_.regular_block(() => {
2282
- {
2283
- const comp = LayoutWithTemplate;
2284
-
2285
- const args = [
2286
- {
2287
- data: doc,
2288
- children: _$_.tsrx_element(function render_children() {
2289
- _$_.push_component();
2290
- _$_.output_push('<div');
2291
- _$_.output_push(' class="doc-content"');
2292
- _$_.output_push('>');
2293
-
2294
- {
2295
- const html_value_26 = String(doc.html ?? '');
2008
+ return _$_.tsrx_element(() => {
2009
+ const doc = { title: 'Comparison', html: '<p>Content</p>' };
2296
2010
 
2297
- _$_.output_push('<!--' + _$_.simple_hash(html_value_26) + '-->');
2298
- _$_.output_push(html_value_26);
2299
- _$_.output_push('<!---->');
2300
- }
2011
+ _$_.regular_block(() => {
2012
+ {
2013
+ const comp = LayoutWithTemplate;
2301
2014
 
2302
- _$_.output_push('</div>');
2303
- _$_.pop_component();
2304
- })
2305
- }
2306
- ];
2015
+ const args = [
2016
+ {
2017
+ data: doc,
2018
+ children: _$_.tsrx_element(() => {
2019
+ return _$_.tsrx_element(() => {
2020
+ _$_.output_push('<div');
2021
+ _$_.output_push(' class="doc-content"');
2022
+ _$_.output_push('>');
2023
+ _$_.output_push(String(doc.html ?? ''));
2024
+ _$_.output_push('</div>');
2025
+ });
2026
+ })
2027
+ }
2028
+ ];
2307
2029
 
2308
- comp(...args);
2309
- }
2030
+ _$_.render_component(comp, ...args);
2031
+ }
2032
+ });
2310
2033
  });
2311
-
2312
- _$_.pop_component();
2313
2034
  }
2314
2035
 
2315
2036
  export function HtmlCodeBlocksWithSiblingChain() {
2316
- _$_.push_component();
2317
-
2318
- const html1 = '<span class="kw">const</span> <span class="id">a</span> = 1;';
2319
- const html2 = '<span class="kw">const</span> <span class="id">b</span> = 2;';
2320
- const html3 = '<span class="kw">const</span> <span class="id">c</span> = 3;';
2321
-
2322
- _$_.regular_block(() => {
2323
- _$_.output_push('<section');
2324
- _$_.output_push(' class="readable-section"');
2325
- _$_.output_push('>');
2326
-
2327
- {
2328
- _$_.output_push('<p');
2329
- _$_.output_push('>');
2330
-
2331
- {
2332
- _$_.output_push('Ergonomics');
2333
- }
2334
-
2335
- _$_.output_push('</p>');
2336
- _$_.output_push('<h2');
2337
- _$_.output_push('>');
2338
-
2339
- {
2340
- _$_.output_push('Sibling traversal pattern');
2341
- }
2342
-
2343
- _$_.output_push('</h2>');
2344
- _$_.output_push('<p');
2037
+ return _$_.tsrx_element(() => {
2038
+ const html1 = '<span class="kw">const</span> <span class="id">a</span> = 1;';
2039
+ const html2 = '<span class="kw">const</span> <span class="id">b</span> = 2;';
2040
+ const html3 = '<span class="kw">const</span> <span class="id">c</span> = 3;';
2041
+
2042
+ _$_.regular_block(() => {
2043
+ _$_.output_push('<section');
2044
+ _$_.output_push(' class="readable-section"');
2345
2045
  _$_.output_push('>');
2346
2046
 
2347
2047
  {
2348
- _$_.output_push('Before first block');
2349
- }
2048
+ _$_.output_push('<p');
2049
+ _$_.output_push('>');
2350
2050
 
2351
- _$_.output_push('</p>');
2352
- _$_.output_push('<p');
2353
- _$_.output_push('>');
2051
+ {
2052
+ _$_.output_push('Ergonomics');
2053
+ }
2354
2054
 
2355
- {
2356
- _$_.output_push('Before second block');
2357
- }
2055
+ _$_.output_push('</p>');
2056
+ _$_.output_push('<h2');
2057
+ _$_.output_push('>');
2358
2058
 
2359
- _$_.output_push('</p>');
2360
- _$_.output_push('<pre');
2361
- _$_.output_push(' class="code-block"');
2362
- _$_.output_push('>');
2059
+ {
2060
+ _$_.output_push('Sibling traversal pattern');
2061
+ }
2363
2062
 
2364
- {
2365
- _$_.output_push('<code');
2063
+ _$_.output_push('</h2>');
2064
+ _$_.output_push('<p');
2366
2065
  _$_.output_push('>');
2367
2066
 
2368
2067
  {
2369
- const html_value_27 = String(html1 ?? '');
2370
-
2371
- _$_.output_push('<!--' + _$_.simple_hash(html_value_27) + '-->');
2372
- _$_.output_push(html_value_27);
2373
- _$_.output_push('<!---->');
2068
+ _$_.output_push('Before first block');
2374
2069
  }
2375
2070
 
2376
- _$_.output_push('</code>');
2377
- }
2071
+ _$_.output_push('</p>');
2072
+ _$_.output_push('<p');
2073
+ _$_.output_push('>');
2378
2074
 
2379
- _$_.output_push('</pre>');
2380
- _$_.output_push('<p');
2381
- _$_.output_push('>');
2075
+ {
2076
+ _$_.output_push('Before second block');
2077
+ }
2382
2078
 
2383
- {
2384
- _$_.output_push('Between one and two');
2385
- }
2079
+ _$_.output_push('</p>');
2080
+ _$_.output_push('<pre');
2081
+ _$_.output_push(' class="code-block"');
2082
+ _$_.output_push('>');
2386
2083
 
2387
- _$_.output_push('</p>');
2388
- _$_.output_push('<pre');
2389
- _$_.output_push(' class="code-block"');
2390
- _$_.output_push('>');
2084
+ {
2085
+ _$_.output_push('<code');
2086
+ _$_.output_push('>');
2087
+ _$_.output_push(String(html1 ?? ''));
2088
+ _$_.output_push('</code>');
2089
+ }
2391
2090
 
2392
- {
2393
- _$_.output_push('<code');
2091
+ _$_.output_push('</pre>');
2092
+ _$_.output_push('<p');
2394
2093
  _$_.output_push('>');
2395
2094
 
2396
2095
  {
2397
- const html_value_28 = String(html2 ?? '');
2398
-
2399
- _$_.output_push('<!--' + _$_.simple_hash(html_value_28) + '-->');
2400
- _$_.output_push(html_value_28);
2401
- _$_.output_push('<!---->');
2096
+ _$_.output_push('Between one and two');
2402
2097
  }
2403
2098
 
2404
- _$_.output_push('</code>');
2405
- }
2099
+ _$_.output_push('</p>');
2100
+ _$_.output_push('<pre');
2101
+ _$_.output_push(' class="code-block"');
2102
+ _$_.output_push('>');
2406
2103
 
2407
- _$_.output_push('</pre>');
2408
- _$_.output_push('<p');
2409
- _$_.output_push('>');
2104
+ {
2105
+ _$_.output_push('<code');
2106
+ _$_.output_push('>');
2107
+ _$_.output_push(String(html2 ?? ''));
2108
+ _$_.output_push('</code>');
2109
+ }
2410
2110
 
2411
- {
2412
- _$_.output_push('Between two and three');
2413
- }
2111
+ _$_.output_push('</pre>');
2112
+ _$_.output_push('<p');
2113
+ _$_.output_push('>');
2414
2114
 
2415
- _$_.output_push('</p>');
2416
- _$_.output_push('<pre');
2417
- _$_.output_push(' class="code-block"');
2418
- _$_.output_push('>');
2115
+ {
2116
+ _$_.output_push('Between two and three');
2117
+ }
2419
2118
 
2420
- {
2421
- _$_.output_push('<code');
2119
+ _$_.output_push('</p>');
2120
+ _$_.output_push('<pre');
2121
+ _$_.output_push(' class="code-block"');
2422
2122
  _$_.output_push('>');
2423
2123
 
2424
2124
  {
2425
- const html_value_29 = String(html3 ?? '');
2426
-
2427
- _$_.output_push('<!--' + _$_.simple_hash(html_value_29) + '-->');
2428
- _$_.output_push(html_value_29);
2429
- _$_.output_push('<!---->');
2125
+ _$_.output_push('<code');
2126
+ _$_.output_push('>');
2127
+ _$_.output_push(String(html3 ?? ''));
2128
+ _$_.output_push('</code>');
2430
2129
  }
2431
2130
 
2432
- _$_.output_push('</code>');
2131
+ _$_.output_push('</pre>');
2433
2132
  }
2434
2133
 
2435
- _$_.output_push('</pre>');
2436
- }
2437
-
2438
- _$_.output_push('</section>');
2134
+ _$_.output_push('</section>');
2135
+ });
2439
2136
  });
2440
-
2441
- _$_.pop_component();
2442
2137
  }