ripple 0.3.84 → 0.3.85

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 (53) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/package.json +3 -3
  3. package/src/constants.js +4 -0
  4. package/src/runtime/internal/client/component.js +3 -3
  5. package/src/runtime/internal/client/constants.js +4 -0
  6. package/src/runtime/internal/client/for.js +22 -1
  7. package/src/runtime/internal/client/if.js +18 -2
  8. package/src/runtime/internal/client/index.js +1 -0
  9. package/src/runtime/internal/client/operations.js +25 -0
  10. package/src/runtime/internal/client/runtime.js +62 -10
  11. package/src/runtime/internal/client/switch.js +16 -2
  12. package/src/runtime/internal/client/template.js +10 -2
  13. package/src/runtime/internal/client/try.js +12 -2
  14. package/src/runtime/internal/client/types.d.ts +4 -0
  15. package/tests/client/__snapshots__/for.test.tsrx.snap +0 -2
  16. package/tests/client/compiler/compiler.basic.test.tsrx +5 -2
  17. package/tests/client/composite/__snapshots__/composite.render.test.tsrx.snap +0 -4
  18. package/tests/client/scoped-flush.test.tsrx +105 -0
  19. package/tests/hydration/compiled/client/basic.js +198 -214
  20. package/tests/hydration/compiled/client/composite.js +23 -72
  21. package/tests/hydration/compiled/client/for.js +66 -72
  22. package/tests/hydration/compiled/client/hmr.js +2 -13
  23. package/tests/hydration/compiled/client/html.js +619 -479
  24. package/tests/hydration/compiled/client/if-children.js +72 -84
  25. package/tests/hydration/compiled/client/if.js +87 -92
  26. package/tests/hydration/compiled/client/mixed-control-flow.js +120 -160
  27. package/tests/hydration/compiled/client/nested-control-flow.js +288 -360
  28. package/tests/hydration/compiled/client/portal.js +15 -21
  29. package/tests/hydration/compiled/client/reactivity.js +7 -12
  30. package/tests/hydration/compiled/client/switch.js +113 -115
  31. package/tests/hydration/compiled/client/track-async-serialization.js +71 -122
  32. package/tests/hydration/compiled/client/try.js +26 -41
  33. package/tests/hydration/compiled/server/basic.js +268 -556
  34. package/tests/hydration/compiled/server/composite.js +31 -50
  35. package/tests/hydration/compiled/server/events.js +37 -173
  36. package/tests/hydration/compiled/server/for.js +236 -847
  37. package/tests/hydration/compiled/server/head.js +110 -241
  38. package/tests/hydration/compiled/server/hmr.js +14 -41
  39. package/tests/hydration/compiled/server/html-in-template.js +14 -38
  40. package/tests/hydration/compiled/server/html.js +951 -1176
  41. package/tests/hydration/compiled/server/if-children.js +59 -493
  42. package/tests/hydration/compiled/server/if.js +57 -209
  43. package/tests/hydration/compiled/server/mixed-control-flow.js +144 -250
  44. package/tests/hydration/compiled/server/nested-control-flow.js +309 -559
  45. package/tests/hydration/compiled/server/portal.js +94 -156
  46. package/tests/hydration/compiled/server/reactivity.js +23 -65
  47. package/tests/hydration/compiled/server/return.js +6 -16
  48. package/tests/hydration/compiled/server/switch.js +91 -219
  49. package/tests/hydration/compiled/server/track-async-serialization.js +211 -256
  50. package/tests/hydration/compiled/server/try.js +67 -126
  51. package/tests/hydration/components/html.tsrx +75 -0
  52. package/tests/hydration/html.test.js +50 -0
  53. package/tests/server/compiler.test.tsrx +6 -2
@@ -8,10 +8,10 @@ export function StaticHtml() {
8
8
  const html = '<p><strong>Bold</strong> text</p>';
9
9
 
10
10
  _$_.regular_block(() => {
11
- _$_.output_push('<div');
12
- _$_.output_push('>');
13
- _$_.output_push(String(html ?? ''));
14
- _$_.output_push('</div>');
11
+ let __out = '';
12
+
13
+ __out += '<div>' + String(html ?? '') + '</div>';
14
+ _$_.output_push(__out);
15
15
  });
16
16
  });
17
17
  }
@@ -21,10 +21,10 @@ export function DynamicHtml() {
21
21
  const content = '<p>Dynamic <span>HTML</span> content</p>';
22
22
 
23
23
  _$_.regular_block(() => {
24
- _$_.output_push('<div');
25
- _$_.output_push('>');
26
- _$_.output_push(String(content ?? ''));
27
- _$_.output_push('</div>');
24
+ let __out = '';
25
+
26
+ __out += '<div>' + String(content ?? '') + '</div>';
27
+ _$_.output_push(__out);
28
28
  });
29
29
  });
30
30
  }
@@ -34,10 +34,10 @@ export function EmptyHtml() {
34
34
  const html = '';
35
35
 
36
36
  _$_.regular_block(() => {
37
- _$_.output_push('<div');
38
- _$_.output_push('>');
39
- _$_.output_push(String(html ?? ''));
40
- _$_.output_push('</div>');
37
+ let __out = '';
38
+
39
+ __out += '<div>' + String(html ?? '') + '</div>';
40
+ _$_.output_push(__out);
41
41
  });
42
42
  });
43
43
  }
@@ -47,10 +47,10 @@ export function ComplexHtml() {
47
47
  const html = '<div class="nested"><span>Nested <em>content</em></span></div>';
48
48
 
49
49
  _$_.regular_block(() => {
50
- _$_.output_push('<section');
51
- _$_.output_push('>');
52
- _$_.output_push(String(html ?? ''));
53
- _$_.output_push('</section>');
50
+ let __out = '';
51
+
52
+ __out += '<section>' + String(html ?? '') + '</section>';
53
+ _$_.output_push(__out);
54
54
  });
55
55
  });
56
56
  }
@@ -61,24 +61,22 @@ export function MultipleHtml() {
61
61
  const html2 = '<p>Second paragraph</p>';
62
62
 
63
63
  _$_.regular_block(() => {
64
- _$_.output_push('<div');
65
- _$_.output_push('>');
64
+ let __out = '';
65
+
66
+ __out += '<div>';
66
67
 
67
68
  {
68
69
  const html_value = String(html1 ?? '');
69
70
 
70
- _$_.output_push('<!--' + _$_.simple_hash(html_value) + '-->');
71
- _$_.output_push(html_value);
72
- _$_.output_push('<!---->');
71
+ __out += '<!--' + _$_.simple_hash(html_value) + '-->' + html_value + '<!---->';
73
72
 
74
73
  const html_value_1 = String(html2 ?? '');
75
74
 
76
- _$_.output_push('<!--' + _$_.simple_hash(html_value_1) + '-->');
77
- _$_.output_push(html_value_1);
78
- _$_.output_push('<!---->');
75
+ __out += '<!--' + _$_.simple_hash(html_value_1) + '-->' + html_value_1 + '<!---->';
79
76
  }
80
77
 
81
- _$_.output_push('</div>');
78
+ __out += '</div>';
79
+ _$_.output_push(__out);
82
80
  });
83
81
  });
84
82
  }
@@ -86,24 +84,10 @@ export function MultipleHtml() {
86
84
  export function HtmlWithReactivity() {
87
85
  return _$_.tsrx_element(() => {
88
86
  _$_.regular_block(() => {
89
- _$_.output_push('<div');
90
- _$_.output_push('>');
91
-
92
- {
93
- _$_.output_push('<!--1tb17hh-->');
94
- _$_.output_push('<p>Count: 0</p>');
95
- _$_.output_push('<!---->');
96
- _$_.output_push('<button');
97
- _$_.output_push('>');
87
+ let __out = '';
98
88
 
99
- {
100
- _$_.output_push('Increment');
101
- }
102
-
103
- _$_.output_push('</button>');
104
- }
105
-
106
- _$_.output_push('</div>');
89
+ __out += '<div><!--1tb17hh--><p>Count: 0</p><!----><button>Increment</button></div>';
90
+ _$_.output_push(__out);
107
91
  });
108
92
  });
109
93
  }
@@ -111,23 +95,18 @@ export function HtmlWithReactivity() {
111
95
  export function HtmlWrapper({ children }) {
112
96
  return _$_.tsrx_element(() => {
113
97
  _$_.regular_block(() => {
114
- _$_.output_push('<div');
115
- _$_.output_push(' class="wrapper"');
116
- _$_.output_push('>');
117
-
118
- {
119
- _$_.output_push('<div');
120
- _$_.output_push(' class="inner"');
121
- _$_.output_push('>');
98
+ let __out = '';
122
99
 
123
- {
124
- _$_.render_expression(children);
125
- }
100
+ __out += '<div class="wrapper"><div class="inner">';
126
101
 
127
- _$_.output_push('</div>');
102
+ {
103
+ _$_.output_push(__out);
104
+ __out = '';
105
+ _$_.render_expression(children);
128
106
  }
129
107
 
130
- _$_.output_push('</div>');
108
+ __out += '</div></div>';
109
+ _$_.output_push(__out);
131
110
  });
132
111
  });
133
112
  }
@@ -144,11 +123,10 @@ export function HtmlInChildren() {
144
123
  {
145
124
  children: _$_.tsrx_element(() => {
146
125
  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>');
126
+ let __out = '';
127
+
128
+ __out += '<div class="vp-doc">' + String(content ?? '') + '</div>';
129
+ _$_.output_push(__out);
152
130
  });
153
131
  })
154
132
  }
@@ -172,19 +150,10 @@ export function HtmlInChildrenWithSiblings() {
172
150
  {
173
151
  children: _$_.tsrx_element(() => {
174
152
  return _$_.tsrx_element(() => {
175
- _$_.output_push('<h1');
176
- _$_.output_push('>');
177
-
178
- {
179
- _$_.output_push('Title');
180
- }
153
+ let __out = '';
181
154
 
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>');
155
+ __out += '<h1>Title</h1><div class="content">' + String(content ?? '') + '</div>';
156
+ _$_.output_push(__out);
188
157
  });
189
158
  })
190
159
  }
@@ -209,25 +178,22 @@ export function MultipleHtmlInChildren() {
209
178
  {
210
179
  children: _$_.tsrx_element(() => {
211
180
  return _$_.tsrx_element(() => {
212
- _$_.output_push('<div');
213
- _$_.output_push(' class="doc"');
214
- _$_.output_push('>');
181
+ let __out = '';
182
+
183
+ __out += '<div class="doc">';
215
184
 
216
185
  {
217
186
  const html_value_2 = String(html1 ?? '');
218
187
 
219
- _$_.output_push('<!--' + _$_.simple_hash(html_value_2) + '-->');
220
- _$_.output_push(html_value_2);
221
- _$_.output_push('<!---->');
188
+ __out += '<!--' + _$_.simple_hash(html_value_2) + '-->' + html_value_2 + '<!---->';
222
189
 
223
190
  const html_value_3 = String(html2 ?? '');
224
191
 
225
- _$_.output_push('<!--' + _$_.simple_hash(html_value_3) + '-->');
226
- _$_.output_push(html_value_3);
227
- _$_.output_push('<!---->');
192
+ __out += '<!--' + _$_.simple_hash(html_value_3) + '-->' + html_value_3 + '<!---->';
228
193
  }
229
194
 
230
- _$_.output_push('</div>');
195
+ __out += '</div>';
196
+ _$_.output_push(__out);
231
197
  });
232
198
  })
233
199
  }
@@ -244,10 +210,10 @@ export function HtmlWithComments() {
244
210
  const content = '<p>Before comment</p><!-- TODO: Elaborate --><p>After comment</p>';
245
211
 
246
212
  _$_.regular_block(() => {
247
- _$_.output_push('<div');
248
- _$_.output_push('>');
249
- _$_.output_push(String(content ?? ''));
250
- _$_.output_push('</div>');
213
+ let __out = '';
214
+
215
+ __out += '<div>' + String(content ?? '') + '</div>';
216
+ _$_.output_push(__out);
251
217
  });
252
218
  });
253
219
  }
@@ -257,10 +223,10 @@ export function HtmlWithEmptyComment() {
257
223
  const content = '<p>Before</p><!----><p>After</p>';
258
224
 
259
225
  _$_.regular_block(() => {
260
- _$_.output_push('<div');
261
- _$_.output_push('>');
262
- _$_.output_push(String(content ?? ''));
263
- _$_.output_push('</div>');
226
+ let __out = '';
227
+
228
+ __out += '<div>' + String(content ?? '') + '</div>';
229
+ _$_.output_push(__out);
264
230
  });
265
231
  });
266
232
  }
@@ -277,11 +243,10 @@ export function HtmlWithCommentsInChildren() {
277
243
  {
278
244
  children: _$_.tsrx_element(() => {
279
245
  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>');
246
+ let __out = '';
247
+
248
+ __out += '<div class="vp-doc">' + String(content ?? '') + '</div>';
249
+ _$_.output_push(__out);
285
250
  });
286
251
  })
287
252
  }
@@ -296,15 +261,10 @@ export function HtmlWithCommentsInChildren() {
296
261
  function DocFooter() {
297
262
  return _$_.tsrx_element(() => {
298
263
  _$_.regular_block(() => {
299
- _$_.output_push('<footer');
300
- _$_.output_push(' class="doc-footer"');
301
- _$_.output_push('>');
302
-
303
- {
304
- _$_.output_push('Footer content');
305
- }
264
+ let __out = '';
306
265
 
307
- _$_.output_push('</footer>');
266
+ __out += '<footer class="doc-footer">Footer content</footer>';
267
+ _$_.output_push(__out);
308
268
  });
309
269
  });
310
270
  }
@@ -312,140 +272,121 @@ function DocFooter() {
312
272
  export function DocLayout(__props) {
313
273
  return _$_.tsrx_element(() => {
314
274
  _$_.regular_block(() => {
315
- _$_.output_push('<div');
316
- _$_.output_push(' class="layout"');
317
- _$_.output_push('>');
275
+ let __out = '';
276
+
277
+ __out += '<div class="layout"><div class="content-container"><article><div>';
318
278
 
319
279
  {
280
+ _$_.output_push(__out);
281
+ __out = '';
282
+ _$_.render_expression(__props.children);
283
+ }
284
+
285
+ __out += '</div></article><!--[-->';
286
+ _$_.output_push(__out);
287
+ __out = '';
288
+
289
+ if (_$_.fallback(__props.editPath, '')) {
320
290
  _$_.output_push('<div');
321
- _$_.output_push(' class="content-container"');
291
+ _$_.output_push(' class="edit-link"');
322
292
  _$_.output_push('>');
323
293
 
324
294
  {
325
- _$_.output_push('<article');
295
+ _$_.output_push('<a');
296
+ _$_.output_push(_$_.attr('href', `https://github.com/edit/${_$_.fallback(__props.editPath, '')}`, false));
326
297
  _$_.output_push('>');
327
298
 
328
299
  {
329
- _$_.output_push('<div');
330
- _$_.output_push('>');
331
-
332
- {
333
- _$_.render_expression(__props.children);
334
- }
335
-
336
- _$_.output_push('</div>');
300
+ _$_.output_push('Edit');
337
301
  }
338
302
 
339
- _$_.output_push('</article>');
340
- _$_.output_push('<!--[-->');
303
+ _$_.output_push('</a>');
304
+ }
341
305
 
342
- if (_$_.fallback(__props.editPath, '')) {
343
- _$_.output_push('<div');
344
- _$_.output_push(' class="edit-link"');
345
- _$_.output_push('>');
306
+ _$_.output_push('</div>');
307
+ }
346
308
 
347
- {
348
- _$_.output_push('<a');
349
- _$_.output_push(_$_.attr('href', `https://github.com/edit/${_$_.fallback(__props.editPath, '')}`, false));
350
- _$_.output_push('>');
309
+ __out += '<!--]--><!--[-->';
310
+ _$_.output_push(__out);
311
+ __out = '';
351
312
 
352
- {
353
- _$_.output_push('Edit');
354
- }
313
+ if (_$_.fallback(__props.nextLink, null)) {
314
+ _$_.output_push('<nav');
315
+ _$_.output_push(' class="prev-next"');
316
+ _$_.output_push('>');
355
317
 
356
- _$_.output_push('</a>');
357
- }
318
+ {
319
+ _$_.output_push('<a');
320
+ _$_.output_push(_$_.attr('href', _$_.fallback(__props.nextLink, null).href, false));
321
+ _$_.output_push('>');
358
322
 
359
- _$_.output_push('</div>');
323
+ {
324
+ _$_.output_push(_$_.escape(_$_.fallback(__props.nextLink, null).text));
360
325
  }
361
326
 
362
- _$_.output_push('<!--]-->');
363
- _$_.output_push('<!--[-->');
364
-
365
- if (_$_.fallback(__props.nextLink, null)) {
366
- _$_.output_push('<nav');
367
- _$_.output_push(' class="prev-next"');
368
- _$_.output_push('>');
369
-
370
- {
371
- _$_.output_push('<a');
372
- _$_.output_push(_$_.attr('href', _$_.fallback(__props.nextLink, null).href, false));
373
- _$_.output_push('>');
374
-
375
- {
376
- _$_.output_push(_$_.escape(_$_.fallback(__props.nextLink, null).text));
377
- }
327
+ _$_.output_push('</a>');
328
+ }
378
329
 
379
- _$_.output_push('</a>');
380
- }
330
+ _$_.output_push('</nav>');
331
+ }
381
332
 
382
- _$_.output_push('</nav>');
383
- }
333
+ __out += '<!--]-->';
384
334
 
385
- _$_.output_push('<!--]-->');
335
+ {
336
+ const comp = DocFooter;
337
+ const args = [{}];
386
338
 
387
- {
388
- const comp = DocFooter;
389
- const args = [{}];
339
+ _$_.output_push(__out);
340
+ __out = '';
341
+ _$_.render_component(comp, ...args);
342
+ }
390
343
 
391
- _$_.render_component(comp, ...args);
392
- }
393
- }
344
+ __out += '</div><aside><!--[-->';
345
+ _$_.output_push(__out);
346
+ __out = '';
394
347
 
395
- _$_.output_push('</div>');
396
- _$_.output_push('<aside');
348
+ if (_$_.fallback(__props.toc, []).length > 0) {
349
+ _$_.output_push('<div');
350
+ _$_.output_push(' class="toc"');
397
351
  _$_.output_push('>');
398
352
 
399
353
  {
400
- _$_.output_push('<!--[-->');
354
+ _$_.output_push('<ul');
355
+ _$_.output_push('>');
401
356
 
402
- if (_$_.fallback(__props.toc, []).length > 0) {
403
- _$_.output_push('<div');
404
- _$_.output_push(' class="toc"');
405
- _$_.output_push('>');
357
+ {
358
+ _$_.output_push('<!--[-->');
406
359
 
407
- {
408
- _$_.output_push('<ul');
360
+ for (const item of _$_.fallback(__props.toc, [])) {
361
+ _$_.output_push('<li');
409
362
  _$_.output_push('>');
410
363
 
411
364
  {
412
- _$_.output_push('<!--[-->');
413
-
414
- for (const item of _$_.fallback(__props.toc, [])) {
415
- _$_.output_push('<li');
416
- _$_.output_push('>');
417
-
418
- {
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>');
428
- }
365
+ _$_.output_push('<a');
366
+ _$_.output_push(_$_.attr('href', item.href, false));
367
+ _$_.output_push('>');
429
368
 
430
- _$_.output_push('</li>');
369
+ {
370
+ _$_.output_push(_$_.escape(item.text));
431
371
  }
432
372
 
433
- _$_.output_push('<!--]-->');
373
+ _$_.output_push('</a>');
434
374
  }
435
375
 
436
- _$_.output_push('</ul>');
376
+ _$_.output_push('</li>');
437
377
  }
438
378
 
439
- _$_.output_push('</div>');
379
+ _$_.output_push('<!--]-->');
440
380
  }
441
381
 
442
- _$_.output_push('<!--]-->');
382
+ _$_.output_push('</ul>');
443
383
  }
444
384
 
445
- _$_.output_push('</aside>');
385
+ _$_.output_push('</div>');
446
386
  }
447
387
 
448
- _$_.output_push('</div>');
388
+ __out += '<!--]--></aside></div>';
389
+ _$_.output_push(__out);
449
390
  });
450
391
  });
451
392
  }
@@ -469,11 +410,10 @@ export function HtmlWithServerData() {
469
410
 
470
411
  children: _$_.tsrx_element(() => {
471
412
  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>');
413
+ let __out = '';
414
+
415
+ __out += '<div class="vp-doc">' + String(content ?? '') + '</div>';
416
+ _$_.output_push(__out);
477
417
  });
478
418
  })
479
419
  }
@@ -497,11 +437,10 @@ export function HtmlWithClientDefaults() {
497
437
  {
498
438
  children: _$_.tsrx_element(() => {
499
439
  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>');
440
+ let __out = '';
441
+
442
+ __out += '<div class="vp-doc">' + String(content ?? '') + '</div>';
443
+ _$_.output_push(__out);
505
444
  });
506
445
  })
507
446
  }
@@ -525,11 +464,10 @@ export function HtmlWithUndefinedContent() {
525
464
  {
526
465
  children: _$_.tsrx_element(() => {
527
466
  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>');
467
+ let __out = '';
468
+
469
+ __out += '<div class="vp-doc">' + String(content ?? '') + '</div>';
470
+ _$_.output_push(__out);
533
471
  });
534
472
  })
535
473
  }
@@ -544,31 +482,34 @@ export function HtmlWithUndefinedContent() {
544
482
  function DynamicHeading({ level, children }) {
545
483
  return _$_.tsrx_element(() => {
546
484
  _$_.regular_block(() => {
547
- _$_.output_push('<!--[-->');
485
+ let __out = '';
486
+
487
+ __out += '<!--[-->';
548
488
 
549
489
  switch (level) {
550
490
  case 1:
551
- _$_.output_push('<h1');
552
- _$_.output_push(' class="heading"');
553
- _$_.output_push('>');
491
+ __out += '<h1 class="heading">';
554
492
  {
493
+ _$_.output_push(__out);
494
+ __out = '';
555
495
  _$_.render_expression(children);
556
496
  }
557
- _$_.output_push('</h1>');
497
+ __out += '</h1>';
558
498
  break;
559
499
 
560
500
  case 2:
561
- _$_.output_push('<h2');
562
- _$_.output_push(' class="heading"');
563
- _$_.output_push('>');
501
+ __out += '<h2 class="heading">';
564
502
  {
503
+ _$_.output_push(__out);
504
+ __out = '';
565
505
  _$_.render_expression(children);
566
506
  }
567
- _$_.output_push('</h2>');
507
+ __out += '</h2>';
568
508
  break;
569
509
  }
570
510
 
571
- _$_.output_push('<!--]-->');
511
+ __out += '<!--]-->';
512
+ _$_.output_push(__out);
572
513
  });
573
514
  });
574
515
  }
@@ -578,44 +519,10 @@ function CodeBlock({ code }) {
578
519
  const highlighted = `<pre class="shiki"><code>${code}</code></pre>`;
579
520
 
580
521
  _$_.regular_block(() => {
581
- _$_.output_push('<div');
582
- _$_.output_push(' class="code-block"');
583
- _$_.output_push('>');
584
-
585
- {
586
- _$_.output_push('<div');
587
- _$_.output_push(' class="header"');
588
- _$_.output_push('>');
589
-
590
- {
591
- _$_.output_push('<button');
592
- _$_.output_push('>');
593
-
594
- {
595
- _$_.output_push('Copy');
596
- }
597
-
598
- _$_.output_push('</button>');
599
- _$_.output_push('<span');
600
- _$_.output_push(' class="lang"');
601
- _$_.output_push('>');
602
-
603
- {
604
- _$_.output_push('js');
605
- }
606
-
607
- _$_.output_push('</span>');
608
- }
609
-
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>');
616
- }
522
+ let __out = '';
617
523
 
618
- _$_.output_push('</div>');
524
+ __out += '<div class="code-block"><div class="header"><button>Copy</button><span class="lang">js</span></div><div class="content">' + String(highlighted ?? '') + '</div></div>';
525
+ _$_.output_push(__out);
619
526
  });
620
527
  });
621
528
  }
@@ -623,23 +530,18 @@ function CodeBlock({ code }) {
623
530
  function ContentWrapper({ children }) {
624
531
  return _$_.tsrx_element(() => {
625
532
  _$_.regular_block(() => {
626
- _$_.output_push('<div');
627
- _$_.output_push(' class="wrapper"');
628
- _$_.output_push('>');
629
-
630
- {
631
- _$_.output_push('<div');
632
- _$_.output_push(' class="inner"');
633
- _$_.output_push('>');
533
+ let __out = '';
634
534
 
635
- {
636
- _$_.render_expression(children);
637
- }
535
+ __out += '<div class="wrapper"><div class="inner">';
638
536
 
639
- _$_.output_push('</div>');
537
+ {
538
+ _$_.output_push(__out);
539
+ __out = '';
540
+ _$_.render_expression(children);
640
541
  }
641
542
 
642
- _$_.output_push('</div>');
543
+ __out += '</div></div>';
544
+ _$_.output_push(__out);
643
545
  });
644
546
  });
645
547
  }
@@ -654,55 +556,46 @@ export function HtmlAfterSwitchInChildren() {
654
556
  {
655
557
  children: _$_.tsrx_element(() => {
656
558
  return _$_.tsrx_element(() => {
559
+ let __out = '';
560
+
657
561
  {
658
562
  const comp = DynamicHeading;
659
563
 
564
+ _$_.output_push(__out);
565
+ __out = '';
566
+
660
567
  const args = [
661
568
  {
662
569
  level: 1,
663
570
  children: _$_.tsrx_element(() => {
664
571
  return _$_.tsrx_element(() => {
665
- _$_.output_push('Title');
572
+ let __out = '';
573
+
574
+ __out += 'Title';
575
+ _$_.output_push(__out);
666
576
  });
667
577
  })
668
578
  }
669
579
  ];
670
580
 
581
+ _$_.output_push(__out);
582
+ __out = '';
671
583
  _$_.render_component(comp, ...args);
672
584
  }
673
585
 
674
- _$_.output_push('<p');
675
- _$_.output_push('>');
676
-
677
- {
678
- _$_.output_push('First paragraph');
679
- }
680
-
681
- _$_.output_push('</p>');
682
- _$_.output_push('<p');
683
- _$_.output_push('>');
684
-
685
- {
686
- _$_.output_push('Second paragraph');
687
- }
688
-
689
- _$_.output_push('</p>');
586
+ __out += '<p>First paragraph</p><p>Second paragraph</p>';
690
587
 
691
588
  {
692
589
  const comp = CodeBlock;
693
590
  const args = [{ code: "const x = 1;" }];
694
591
 
592
+ _$_.output_push(__out);
593
+ __out = '';
695
594
  _$_.render_component(comp, ...args);
696
595
  }
697
596
 
698
- _$_.output_push('<p');
699
- _$_.output_push('>');
700
-
701
- {
702
- _$_.output_push('After code');
703
- }
704
-
705
- _$_.output_push('</p>');
597
+ __out += '<p>After code</p>';
598
+ _$_.output_push(__out);
706
599
  });
707
600
  })
708
601
  }
@@ -714,831 +607,903 @@ export function HtmlAfterSwitchInChildren() {
714
607
  });
715
608
  }
716
609
 
717
- function NavItem(__props) {
610
+ function IfHeading({ primary, children }) {
718
611
  return _$_.tsrx_element(() => {
719
612
  _$_.regular_block(() => {
720
- _$_.output_push('<div');
721
- _$_.output_push(_$_.attr('class', `nav-item${_$_.fallback(__props.active, false) ? ' active' : ''}`));
722
- _$_.output_push('>');
723
-
724
- {
725
- _$_.output_push('<!--[-->');
613
+ let __out = '';
726
614
 
727
- if (_$_.fallback(__props.active, false)) {
728
- _$_.output_push('<div');
729
- _$_.output_push(' class="indicator"');
730
- _$_.output_push('>');
731
- _$_.output_push('</div>');
732
- }
615
+ __out += '<!--[-->';
733
616
 
734
- _$_.output_push('<!--]-->');
735
- _$_.output_push('<a');
736
- _$_.output_push(_$_.attr('href', __props.href, false));
737
- _$_.output_push('>');
617
+ if (primary) {
618
+ __out += '<h1 class="heading">';
738
619
 
739
620
  {
740
- _$_.output_push('<span');
741
- _$_.output_push('>');
621
+ _$_.output_push(__out);
622
+ __out = '';
623
+ _$_.render_expression(children);
624
+ }
742
625
 
743
- {
744
- _$_.output_push(_$_.escape(__props.text));
745
- }
626
+ __out += '</h1>';
627
+ } else {
628
+ __out += '<h2 class="heading">';
746
629
 
747
- _$_.output_push('</span>');
630
+ {
631
+ _$_.output_push(__out);
632
+ __out = '';
633
+ _$_.render_expression(children);
748
634
  }
749
635
 
750
- _$_.output_push('</a>');
636
+ __out += '</h2>';
751
637
  }
752
638
 
753
- _$_.output_push('</div>');
639
+ __out += '<!--]-->';
640
+ _$_.output_push(__out);
754
641
  });
755
642
  });
756
643
  }
757
644
 
758
- function SidebarSection({ title, children }) {
645
+ export function HtmlAfterIfInChildren() {
759
646
  return _$_.tsrx_element(() => {
760
- let lazy = _$_.track(true, '6ac6906f');
761
-
762
647
  _$_.regular_block(() => {
763
- _$_.output_push('<section');
764
- _$_.output_push(' class="sidebar-section"');
765
- _$_.output_push('>');
766
-
767
648
  {
768
- _$_.output_push('<div');
769
- _$_.output_push(' class="section-header"');
770
- _$_.output_push('>');
771
-
772
- {
773
- _$_.output_push('<h2');
774
- _$_.output_push('>');
649
+ const comp = ContentWrapper;
775
650
 
651
+ const args = [
776
652
  {
777
- _$_.output_push(_$_.escape(title));
778
- }
653
+ children: _$_.tsrx_element(() => {
654
+ return _$_.tsrx_element(() => {
655
+ let __out = '';
779
656
 
780
- _$_.output_push('</h2>');
781
- _$_.output_push('<button');
782
- _$_.output_push('>');
657
+ {
658
+ const comp = IfHeading;
783
659
 
784
- {
785
- _$_.output_push('Toggle');
786
- }
660
+ _$_.output_push(__out);
661
+ __out = '';
787
662
 
788
- _$_.output_push('</button>');
789
- }
663
+ const args = [
664
+ {
665
+ primary: true,
666
+ children: _$_.tsrx_element(() => {
667
+ return _$_.tsrx_element(() => {
668
+ let __out = '';
790
669
 
791
- _$_.output_push('</div>');
792
- _$_.output_push('<!--[-->');
670
+ __out += 'Title';
671
+ _$_.output_push(__out);
672
+ });
673
+ })
674
+ }
675
+ ];
793
676
 
794
- if (lazy.value) {
795
- _$_.output_push('<div');
796
- _$_.output_push(' class="section-items"');
797
- _$_.output_push('>');
677
+ _$_.output_push(__out);
678
+ __out = '';
679
+ _$_.render_component(comp, ...args);
680
+ }
798
681
 
799
- {
800
- _$_.render_expression(children);
682
+ __out += '<p>First paragraph</p><p>Second paragraph</p>';
683
+
684
+ {
685
+ const comp = CodeBlock;
686
+ const args = [{ code: "const x = 1;" }];
687
+
688
+ _$_.output_push(__out);
689
+ __out = '';
690
+ _$_.render_component(comp, ...args);
691
+ }
692
+
693
+ __out += '<p>After code</p>';
694
+ _$_.output_push(__out);
695
+ });
696
+ })
801
697
  }
698
+ ];
802
699
 
803
- _$_.output_push('</div>');
804
- }
700
+ _$_.render_component(comp, ...args);
701
+ }
702
+ });
703
+ });
704
+ }
705
+
706
+ function ForList({ items }) {
707
+ return _$_.tsrx_element(() => {
708
+ _$_.regular_block(() => {
709
+ let __out = '';
805
710
 
806
- _$_.output_push('<!--]-->');
711
+ __out += '<!--[-->';
712
+
713
+ for (const item of items) {
714
+ __out += '<span class="for-item">' + _$_.escape(item) + '</span>';
807
715
  }
808
716
 
809
- _$_.output_push('</section>');
717
+ __out += '<!--]-->';
718
+ _$_.output_push(__out);
810
719
  });
811
720
  });
812
721
  }
813
722
 
814
- function SideNav({ currentPath }) {
723
+ export function HtmlAfterForInChildren() {
815
724
  return _$_.tsrx_element(() => {
816
725
  _$_.regular_block(() => {
817
- _$_.output_push('<aside');
818
- _$_.output_push(' class="sidebar"');
819
- _$_.output_push('>');
820
-
821
726
  {
822
- _$_.output_push('<nav');
823
- _$_.output_push('>');
824
-
825
- {
826
- _$_.output_push('<div');
827
- _$_.output_push(' class="group"');
828
- _$_.output_push('>');
727
+ const comp = ContentWrapper;
829
728
 
729
+ const args = [
830
730
  {
831
- {
832
- const comp = SidebarSection;
731
+ children: _$_.tsrx_element(() => {
732
+ return _$_.tsrx_element(() => {
733
+ let __out = '';
833
734
 
834
- const args = [
835
735
  {
836
- title: "Getting Started",
837
- children: _$_.tsrx_element(() => {
838
- return _$_.tsrx_element(() => {
839
- {
840
- const comp = NavItem;
736
+ const comp = ForList;
737
+ const args = [{ items: ['Title', 'Subtitle'] }];
841
738
 
842
- const args = [
843
- {
844
- href: "/intro",
845
- text: "Introduction",
846
- active: currentPath === '/intro'
847
- }
848
- ];
739
+ _$_.output_push(__out);
740
+ __out = '';
741
+ _$_.render_component(comp, ...args);
742
+ }
849
743
 
850
- _$_.render_component(comp, ...args);
851
- }
744
+ __out += '<p>First paragraph</p>';
852
745
 
853
- {
854
- const comp = NavItem;
855
-
856
- const args = [
857
- {
858
- href: "/start",
859
- text: "Quick Start",
860
- active: currentPath === '/start'
861
- }
862
- ];
746
+ {
747
+ const comp = CodeBlock;
748
+ const args = [{ code: "const x = 1;" }];
863
749
 
864
- _$_.render_component(comp, ...args);
865
- }
866
- });
867
- })
750
+ _$_.output_push(__out);
751
+ __out = '';
752
+ _$_.render_component(comp, ...args);
868
753
  }
869
- ];
870
754
 
871
- _$_.render_component(comp, ...args);
872
- }
755
+ __out += '<p>After code</p>';
756
+ _$_.output_push(__out);
757
+ });
758
+ })
873
759
  }
760
+ ];
874
761
 
875
- _$_.output_push('</div>');
876
- _$_.output_push('<div');
877
- _$_.output_push(' class="group"');
878
- _$_.output_push('>');
762
+ _$_.render_component(comp, ...args);
763
+ }
764
+ });
765
+ });
766
+ }
767
+
768
+ function TryBox({ value }) {
769
+ return _$_.tsrx_element(() => {
770
+ _$_.try_block(
771
+ () => {
772
+ let __out = '';
773
+
774
+ __out += '<!--[-->';
775
+ _$_.output_push(__out);
776
+ __out = '';
777
+
778
+ _$_.regular_block(() => {
779
+ let __out = '';
780
+
781
+ __out += '<div class="try-box">' + _$_.escape(value) + '</div>';
782
+ _$_.output_push(__out);
783
+ });
784
+
785
+ __out += '<!--]-->';
786
+ _$_.output_push(__out);
787
+ },
788
+ (e) => {
789
+ let __out = '';
790
+
791
+ __out += '<!--[-->';
792
+ _$_.output_push(__out);
793
+ __out = '';
794
+
795
+ _$_.regular_block(() => {
796
+ let __out = '';
797
+
798
+ __out += '<span>error</span>';
799
+ _$_.output_push(__out);
800
+ });
801
+
802
+ __out += '<!--]-->';
803
+ _$_.output_push(__out);
804
+ },
805
+ null
806
+ );
807
+ });
808
+ }
809
+
810
+ export function HtmlAfterTryInChildren() {
811
+ return _$_.tsrx_element(() => {
812
+ _$_.regular_block(() => {
813
+ {
814
+ const comp = ContentWrapper;
879
815
 
816
+ const args = [
880
817
  {
881
- {
882
- const comp = SidebarSection;
818
+ children: _$_.tsrx_element(() => {
819
+ return _$_.tsrx_element(() => {
820
+ let __out = '';
883
821
 
884
- const args = [
885
822
  {
886
- title: "Guide",
887
- children: _$_.tsrx_element(() => {
888
- return _$_.tsrx_element(() => {
889
- {
890
- const comp = NavItem;
891
-
892
- const args = [
893
- {
894
- href: "/guide/app",
895
- text: "Application",
896
- active: currentPath === '/guide/app'
897
- }
898
- ];
823
+ const comp = TryBox;
824
+ const args = [{ value: "Title" }];
899
825
 
900
- _$_.render_component(comp, ...args);
901
- }
826
+ _$_.output_push(__out);
827
+ __out = '';
828
+ _$_.render_component(comp, ...args);
829
+ }
902
830
 
903
- {
904
- const comp = NavItem;
831
+ __out += '<p>First paragraph</p>';
905
832
 
906
- const args = [
907
- {
908
- href: "/guide/syntax",
909
- text: "Syntax",
910
- active: currentPath === '/guide/syntax'
911
- }
912
- ];
833
+ {
834
+ const comp = CodeBlock;
835
+ const args = [{ code: "const x = 1;" }];
913
836
 
914
- _$_.render_component(comp, ...args);
915
- }
916
- });
917
- })
837
+ _$_.output_push(__out);
838
+ __out = '';
839
+ _$_.render_component(comp, ...args);
918
840
  }
919
- ];
920
841
 
921
- _$_.render_component(comp, ...args);
922
- }
842
+ __out += '<p>After code</p>';
843
+ _$_.output_push(__out);
844
+ });
845
+ })
923
846
  }
847
+ ];
924
848
 
925
- _$_.output_push('</div>');
926
- }
927
-
928
- _$_.output_push('</nav>');
849
+ _$_.render_component(comp, ...args);
929
850
  }
930
-
931
- _$_.output_push('</aside>');
932
851
  });
933
852
  });
934
853
  }
935
854
 
936
- function PageHeader() {
855
+ function Boxed({ children }) {
937
856
  return _$_.tsrx_element(() => {
938
857
  _$_.regular_block(() => {
939
- _$_.output_push('<header');
940
- _$_.output_push(' class="page-header"');
941
- _$_.output_push('>');
858
+ let __out = '';
942
859
 
943
- {
944
- _$_.output_push('<div');
945
- _$_.output_push(' class="logo"');
946
- _$_.output_push('>');
860
+ __out += '<span class="boxed">';
947
861
 
948
- {
949
- _$_.output_push('MyApp');
950
- }
951
-
952
- _$_.output_push('</div>');
862
+ {
863
+ _$_.output_push(__out);
864
+ __out = '';
865
+ _$_.render_expression(children);
953
866
  }
954
867
 
955
- _$_.output_push('</header>');
868
+ __out += '</span>';
869
+ _$_.output_push(__out);
956
870
  });
957
871
  });
958
872
  }
959
873
 
960
- export function LayoutWithSidebarAndMain() {
874
+ function IndirectHeading({ text }) {
961
875
  return _$_.tsrx_element(() => {
962
876
  _$_.regular_block(() => {
963
- _$_.output_push('<div');
964
- _$_.output_push(' class="layout"');
965
- _$_.output_push('>');
966
-
967
877
  {
968
- {
969
- const comp = PageHeader;
970
- const args = [{}];
878
+ const comp = Boxed;
971
879
 
972
- _$_.render_component(comp, ...args);
973
- }
974
-
975
- _$_.output_push('<div');
976
- _$_.output_push(' class="content-wrapper"');
977
- _$_.output_push('>');
978
-
979
- {
880
+ const args = [
980
881
  {
981
- const comp = SideNav;
982
- const args = [{ currentPath: "/intro" }];
882
+ children: _$_.tsrx_element(() => {
883
+ return _$_.tsrx_element(() => {
884
+ let __out = '';
983
885
 
984
- _$_.render_component(comp, ...args);
886
+ __out += _$_.escape(text);
887
+ _$_.output_push(__out);
888
+ });
889
+ })
985
890
  }
891
+ ];
986
892
 
987
- _$_.output_push('<main');
988
- _$_.output_push(' class="main-content"');
989
- _$_.output_push('>');
990
-
991
- {
992
- _$_.output_push('<div');
993
- _$_.output_push(' class="article"');
994
- _$_.output_push('>');
893
+ _$_.render_component(comp, ...args);
894
+ }
895
+ });
896
+ });
897
+ }
995
898
 
996
- {
997
- _$_.output_push('<div');
998
- _$_.output_push('>');
899
+ export function HtmlAfterComponentInChildren() {
900
+ return _$_.tsrx_element(() => {
901
+ _$_.regular_block(() => {
902
+ {
903
+ const comp = ContentWrapper;
999
904
 
1000
- {
1001
- _$_.output_push('<h1');
1002
- _$_.output_push('>');
905
+ const args = [
906
+ {
907
+ children: _$_.tsrx_element(() => {
908
+ return _$_.tsrx_element(() => {
909
+ let __out = '';
1003
910
 
1004
911
  {
1005
- _$_.output_push('Introduction');
1006
- }
912
+ const comp = IndirectHeading;
913
+ const args = [{ text: "Title" }];
1007
914
 
1008
- _$_.output_push('</h1>');
1009
- _$_.output_push('<p');
1010
- _$_.output_push('>');
1011
-
1012
- {
1013
- _$_.output_push('Welcome to the docs.');
915
+ _$_.output_push(__out);
916
+ __out = '';
917
+ _$_.render_component(comp, ...args);
1014
918
  }
1015
919
 
1016
- _$_.output_push('</p>');
1017
- }
1018
-
1019
- _$_.output_push('</div>');
1020
- }
1021
-
1022
- _$_.output_push('</div>');
1023
- _$_.output_push('<!--[-->');
1024
-
1025
- if (true) {
1026
- _$_.output_push('<div');
1027
- _$_.output_push(' class="edit-link"');
1028
- _$_.output_push('>');
1029
-
1030
- {
1031
- _$_.output_push('<a');
1032
- _$_.output_push(' href="/edit"');
1033
- _$_.output_push('>');
920
+ __out += '<p>First paragraph</p>';
1034
921
 
1035
922
  {
1036
- _$_.output_push('Edit');
1037
- }
1038
-
1039
- _$_.output_push('</a>');
1040
- }
1041
-
1042
- _$_.output_push('</div>');
1043
- }
1044
-
1045
- _$_.output_push('<!--]-->');
923
+ const comp = CodeBlock;
924
+ const args = [{ code: "const x = 1;" }];
1046
925
 
1047
- {
1048
- const comp = PageHeader;
1049
- const args = [{}];
926
+ _$_.output_push(__out);
927
+ __out = '';
928
+ _$_.render_component(comp, ...args);
929
+ }
1050
930
 
1051
- _$_.render_component(comp, ...args);
1052
- }
931
+ __out += '<p>After code</p>';
932
+ _$_.output_push(__out);
933
+ });
934
+ })
1053
935
  }
936
+ ];
1054
937
 
1055
- _$_.output_push('</main>');
1056
- }
1057
-
1058
- _$_.output_push('</div>');
938
+ _$_.render_component(comp, ...args);
1059
939
  }
1060
-
1061
- _$_.output_push('</div>');
1062
940
  });
1063
941
  });
1064
942
  }
1065
943
 
1066
- function ArticleWrapper({ children }) {
944
+ function NavItem(__props) {
1067
945
  return _$_.tsrx_element(() => {
1068
946
  _$_.regular_block(() => {
1069
- _$_.output_push('<article');
1070
- _$_.output_push(' class="doc-content"');
1071
- _$_.output_push('>');
947
+ let __out = '';
1072
948
 
1073
- {
949
+ __out += '<div' + _$_.attr('class', `nav-item${_$_.fallback(__props.active, false) ? ' active' : ''}`) + '><!--[-->';
950
+ _$_.output_push(__out);
951
+ __out = '';
952
+
953
+ if (_$_.fallback(__props.active, false)) {
1074
954
  _$_.output_push('<div');
955
+ _$_.output_push(' class="indicator"');
1075
956
  _$_.output_push('>');
1076
-
1077
- {
1078
- _$_.render_expression(children);
1079
- }
1080
-
1081
957
  _$_.output_push('</div>');
1082
958
  }
1083
959
 
1084
- _$_.output_push('</article>');
960
+ __out += '<!--]--><a' + _$_.attr('href', __props.href, false) + '><span>' + _$_.escape(__props.text) + '</span></a></div>';
961
+ _$_.output_push(__out);
1085
962
  });
1086
963
  });
1087
964
  }
1088
965
 
1089
- function SimpleFooter() {
966
+ function SidebarSection({ title, children }) {
1090
967
  return _$_.tsrx_element(() => {
968
+ let lazy = _$_.track(true, '6ac6906f');
969
+
1091
970
  _$_.regular_block(() => {
1092
- _$_.output_push('<footer');
1093
- _$_.output_push(' class="doc-footer"');
1094
- _$_.output_push('>');
971
+ let __out = '';
1095
972
 
1096
- {
1097
- _$_.output_push('Footer');
973
+ __out += '<section class="sidebar-section"><div class="section-header"><h2>' + _$_.escape(title) + '</h2><button>Toggle</button></div><!--[-->';
974
+
975
+ if (lazy.value) {
976
+ __out += '<div class="section-items">';
977
+
978
+ {
979
+ _$_.output_push(__out);
980
+ __out = '';
981
+ _$_.render_expression(children);
982
+ }
983
+
984
+ __out += '</div>';
1098
985
  }
1099
986
 
1100
- _$_.output_push('</footer>');
987
+ __out += '<!--]--></section>';
988
+ _$_.output_push(__out);
1101
989
  });
1102
990
  });
1103
991
  }
1104
992
 
1105
- export function ArticleWithChildrenThenSibling() {
993
+ function SideNav({ currentPath }) {
1106
994
  return _$_.tsrx_element(() => {
1107
995
  _$_.regular_block(() => {
1108
- _$_.output_push('<div');
1109
- _$_.output_push(' class="content-container"');
1110
- _$_.output_push('>');
996
+ let __out = '';
997
+
998
+ __out += '<aside class="sidebar"><nav><div class="group">';
1111
999
 
1112
1000
  {
1113
1001
  {
1114
- const comp = ArticleWrapper;
1002
+ const comp = SidebarSection;
1003
+
1004
+ _$_.output_push(__out);
1005
+ __out = '';
1115
1006
 
1116
1007
  const args = [
1117
1008
  {
1009
+ title: "Getting Started",
1118
1010
  children: _$_.tsrx_element(() => {
1119
1011
  return _$_.tsrx_element(() => {
1120
- _$_.output_push('<h1');
1121
- _$_.output_push('>');
1122
-
1123
1012
  {
1124
- _$_.output_push('Title');
1125
- }
1013
+ const comp = NavItem;
1126
1014
 
1127
- _$_.output_push('</h1>');
1128
- _$_.output_push('<p');
1129
- _$_.output_push('>');
1015
+ const args = [
1016
+ {
1017
+ href: "/intro",
1018
+ text: "Introduction",
1019
+ active: currentPath === '/intro'
1020
+ }
1021
+ ];
1130
1022
 
1131
- {
1132
- _$_.output_push('Content goes here.');
1023
+ _$_.render_component(comp, ...args);
1133
1024
  }
1134
1025
 
1135
- _$_.output_push('</p>');
1026
+ {
1027
+ const comp = NavItem;
1028
+
1029
+ const args = [
1030
+ {
1031
+ href: "/start",
1032
+ text: "Quick Start",
1033
+ active: currentPath === '/start'
1034
+ }
1035
+ ];
1036
+
1037
+ _$_.render_component(comp, ...args);
1038
+ }
1136
1039
  });
1137
1040
  })
1138
1041
  }
1139
1042
  ];
1140
1043
 
1044
+ _$_.output_push(__out);
1045
+ __out = '';
1141
1046
  _$_.render_component(comp, ...args);
1142
1047
  }
1048
+ }
1143
1049
 
1144
- _$_.output_push('<!--[-->');
1050
+ __out += '</div><div class="group">';
1145
1051
 
1146
- if (true) {
1147
- _$_.output_push('<div');
1148
- _$_.output_push(' class="edit-link"');
1149
- _$_.output_push('>');
1052
+ {
1053
+ {
1054
+ const comp = SidebarSection;
1150
1055
 
1151
- {
1152
- _$_.output_push('<a');
1153
- _$_.output_push(' href="/edit"');
1154
- _$_.output_push('>');
1056
+ _$_.output_push(__out);
1057
+ __out = '';
1155
1058
 
1059
+ const args = [
1156
1060
  {
1157
- _$_.output_push('Edit');
1158
- }
1159
-
1160
- _$_.output_push('</a>');
1161
- }
1061
+ title: "Guide",
1062
+ children: _$_.tsrx_element(() => {
1063
+ return _$_.tsrx_element(() => {
1064
+ {
1065
+ const comp = NavItem;
1162
1066
 
1163
- _$_.output_push('</div>');
1164
- }
1067
+ const args = [
1068
+ {
1069
+ href: "/guide/app",
1070
+ text: "Application",
1071
+ active: currentPath === '/guide/app'
1072
+ }
1073
+ ];
1165
1074
 
1166
- _$_.output_push('<!--]-->');
1167
- _$_.output_push('<!--[-->');
1075
+ _$_.render_component(comp, ...args);
1076
+ }
1168
1077
 
1169
- if (true) {
1170
- _$_.output_push('<nav');
1171
- _$_.output_push(' class="prev-next"');
1172
- _$_.output_push('>');
1078
+ {
1079
+ const comp = NavItem;
1173
1080
 
1174
- {
1175
- _$_.output_push('<a');
1176
- _$_.output_push(' href="/prev"');
1177
- _$_.output_push('>');
1081
+ const args = [
1082
+ {
1083
+ href: "/guide/syntax",
1084
+ text: "Syntax",
1085
+ active: currentPath === '/guide/syntax'
1086
+ }
1087
+ ];
1178
1088
 
1179
- {
1180
- _$_.output_push('Previous');
1089
+ _$_.render_component(comp, ...args);
1090
+ }
1091
+ });
1092
+ })
1181
1093
  }
1094
+ ];
1182
1095
 
1183
- _$_.output_push('</a>');
1184
- }
1185
-
1186
- _$_.output_push('</nav>');
1187
- }
1188
-
1189
- _$_.output_push('<!--]-->');
1190
-
1191
- {
1192
- const comp = SimpleFooter;
1193
- const args = [{}];
1194
-
1096
+ _$_.output_push(__out);
1097
+ __out = '';
1195
1098
  _$_.render_component(comp, ...args);
1196
1099
  }
1197
1100
  }
1198
1101
 
1199
- _$_.output_push('</div>');
1102
+ __out += '</div></nav></aside>';
1103
+ _$_.output_push(__out);
1200
1104
  });
1201
1105
  });
1202
1106
  }
1203
1107
 
1204
- export function ArticleWithHtmlChildThenSibling() {
1108
+ function PageHeader() {
1205
1109
  return _$_.tsrx_element(() => {
1206
- const htmlContent = '<pre><code>const x = 1;</code></pre>';
1110
+ _$_.regular_block(() => {
1111
+ let __out = '';
1112
+
1113
+ __out += '<header class="page-header"><div class="logo">MyApp</div></header>';
1114
+ _$_.output_push(__out);
1115
+ });
1116
+ });
1117
+ }
1207
1118
 
1119
+ export function LayoutWithSidebarAndMain() {
1120
+ return _$_.tsrx_element(() => {
1208
1121
  _$_.regular_block(() => {
1209
- _$_.output_push('<div');
1210
- _$_.output_push(' class="content-container"');
1211
- _$_.output_push('>');
1122
+ let __out = '';
1123
+
1124
+ __out += '<div class="layout">';
1212
1125
 
1213
1126
  {
1214
- {
1215
- const comp = ArticleWrapper;
1127
+ const comp = PageHeader;
1128
+ const args = [{}];
1216
1129
 
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
- ];
1130
+ _$_.output_push(__out);
1131
+ __out = '';
1132
+ _$_.render_component(comp, ...args);
1133
+ }
1230
1134
 
1231
- _$_.render_component(comp, ...args);
1232
- }
1135
+ __out += '<div class="content-wrapper">';
1233
1136
 
1234
- _$_.output_push('<!--[-->');
1137
+ {
1138
+ const comp = SideNav;
1139
+ const args = [{ currentPath: "/intro" }];
1235
1140
 
1236
- if (true) {
1237
- _$_.output_push('<div');
1238
- _$_.output_push(' class="edit-link"');
1239
- _$_.output_push('>');
1141
+ _$_.output_push(__out);
1142
+ __out = '';
1143
+ _$_.render_component(comp, ...args);
1144
+ }
1240
1145
 
1241
- {
1242
- _$_.output_push('<a');
1243
- _$_.output_push(' href="/edit"');
1244
- _$_.output_push('>');
1146
+ __out += '<main class="main-content"><div class="article"><div><h1>Introduction</h1><p>Welcome to the docs.</p></div></div><!--[-->';
1245
1147
 
1246
- {
1247
- _$_.output_push('Edit');
1248
- }
1148
+ if (true) {
1149
+ __out += '<div class="edit-link"><a href="/edit">Edit</a></div>';
1150
+ }
1249
1151
 
1250
- _$_.output_push('</a>');
1251
- }
1152
+ __out += '<!--]-->';
1252
1153
 
1253
- _$_.output_push('</div>');
1254
- }
1154
+ {
1155
+ const comp = PageHeader;
1156
+ const args = [{}];
1255
1157
 
1256
- _$_.output_push('<!--]-->');
1158
+ _$_.output_push(__out);
1159
+ __out = '';
1160
+ _$_.render_component(comp, ...args);
1161
+ }
1257
1162
 
1258
- {
1259
- const comp = SimpleFooter;
1260
- const args = [{}];
1163
+ __out += '</main></div></div>';
1164
+ _$_.output_push(__out);
1165
+ });
1166
+ });
1167
+ }
1261
1168
 
1262
- _$_.render_component(comp, ...args);
1263
- }
1169
+ function ArticleWrapper({ children }) {
1170
+ return _$_.tsrx_element(() => {
1171
+ _$_.regular_block(() => {
1172
+ let __out = '';
1173
+
1174
+ __out += '<article class="doc-content"><div>';
1175
+
1176
+ {
1177
+ _$_.output_push(__out);
1178
+ __out = '';
1179
+ _$_.render_expression(children);
1264
1180
  }
1265
1181
 
1266
- _$_.output_push('</div>');
1182
+ __out += '</div></article>';
1183
+ _$_.output_push(__out);
1267
1184
  });
1268
1185
  });
1269
1186
  }
1270
1187
 
1271
- function InlineArticleLayout({ children }) {
1188
+ function SimpleFooter() {
1272
1189
  return _$_.tsrx_element(() => {
1273
1190
  _$_.regular_block(() => {
1274
- _$_.output_push('<div');
1275
- _$_.output_push(' class="content-container"');
1276
- _$_.output_push('>');
1191
+ let __out = '';
1192
+
1193
+ __out += '<footer class="doc-footer">Footer</footer>';
1194
+ _$_.output_push(__out);
1195
+ });
1196
+ });
1197
+ }
1198
+
1199
+ export function ArticleWithChildrenThenSibling() {
1200
+ return _$_.tsrx_element(() => {
1201
+ _$_.regular_block(() => {
1202
+ let __out = '';
1203
+
1204
+ __out += '<div class="content-container">';
1277
1205
 
1278
1206
  {
1279
- _$_.output_push('<article');
1280
- _$_.output_push(' class="doc-content"');
1281
- _$_.output_push('>');
1207
+ const comp = ArticleWrapper;
1282
1208
 
1283
- {
1284
- _$_.output_push('<div');
1285
- _$_.output_push('>');
1209
+ _$_.output_push(__out);
1210
+ __out = '';
1286
1211
 
1212
+ const args = [
1287
1213
  {
1288
- _$_.render_expression(children);
1289
- }
1290
-
1291
- _$_.output_push('</div>');
1292
- }
1214
+ children: _$_.tsrx_element(() => {
1215
+ return _$_.tsrx_element(() => {
1216
+ let __out = '';
1293
1217
 
1294
- _$_.output_push('</article>');
1295
- _$_.output_push('<!--[-->');
1218
+ __out += '<h1>Title</h1><p>Content goes here.</p>';
1219
+ _$_.output_push(__out);
1220
+ });
1221
+ })
1222
+ }
1223
+ ];
1296
1224
 
1297
- if (true) {
1298
- _$_.output_push('<div');
1299
- _$_.output_push(' class="edit-link"');
1300
- _$_.output_push('>');
1225
+ _$_.output_push(__out);
1226
+ __out = '';
1227
+ _$_.render_component(comp, ...args);
1228
+ }
1301
1229
 
1302
- {
1303
- _$_.output_push('<a');
1304
- _$_.output_push(' href="/edit"');
1305
- _$_.output_push('>');
1230
+ __out += '<!--[-->';
1306
1231
 
1307
- {
1308
- _$_.output_push('Edit');
1309
- }
1232
+ if (true) {
1233
+ __out += '<div class="edit-link"><a href="/edit">Edit</a></div>';
1234
+ }
1310
1235
 
1311
- _$_.output_push('</a>');
1312
- }
1236
+ __out += '<!--]--><!--[-->';
1313
1237
 
1314
- _$_.output_push('</div>');
1315
- }
1238
+ if (true) {
1239
+ __out += '<nav class="prev-next"><a href="/prev">Previous</a></nav>';
1240
+ }
1316
1241
 
1317
- _$_.output_push('<!--]-->');
1242
+ __out += '<!--]-->';
1318
1243
 
1319
- {
1320
- const comp = SimpleFooter;
1321
- const args = [{}];
1244
+ {
1245
+ const comp = SimpleFooter;
1246
+ const args = [{}];
1322
1247
 
1323
- _$_.render_component(comp, ...args);
1324
- }
1248
+ _$_.output_push(__out);
1249
+ __out = '';
1250
+ _$_.render_component(comp, ...args);
1325
1251
  }
1326
1252
 
1327
- _$_.output_push('</div>');
1253
+ __out += '</div>';
1254
+ _$_.output_push(__out);
1328
1255
  });
1329
1256
  });
1330
1257
  }
1331
1258
 
1332
- export function InlineArticleWithHtmlChild() {
1259
+ export function ArticleWithHtmlChildThenSibling() {
1333
1260
  return _$_.tsrx_element(() => {
1334
1261
  const htmlContent = '<pre><code>const x = 1;</code></pre>';
1335
1262
 
1336
1263
  _$_.regular_block(() => {
1264
+ let __out = '';
1265
+
1266
+ __out += '<div class="content-container">';
1267
+
1337
1268
  {
1338
- const comp = InlineArticleLayout;
1269
+ const comp = ArticleWrapper;
1270
+
1271
+ _$_.output_push(__out);
1272
+ __out = '';
1339
1273
 
1340
1274
  const args = [
1341
1275
  {
1342
1276
  children: _$_.tsrx_element(() => {
1343
1277
  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>');
1278
+ let __out = '';
1279
+
1280
+ __out += '<div class="doc-content">' + String(htmlContent ?? '') + '</div>';
1281
+ _$_.output_push(__out);
1349
1282
  });
1350
1283
  })
1351
1284
  }
1352
1285
  ];
1353
1286
 
1287
+ _$_.output_push(__out);
1288
+ __out = '';
1354
1289
  _$_.render_component(comp, ...args);
1355
1290
  }
1356
- });
1357
- });
1358
- }
1359
1291
 
1360
- function HeaderStub() {
1361
- return _$_.tsrx_element(() => {
1362
- _$_.regular_block(() => {
1363
- _$_.output_push('<header');
1364
- _$_.output_push(' class="header"');
1365
- _$_.output_push('>');
1292
+ __out += '<!--[-->';
1293
+
1294
+ if (true) {
1295
+ __out += '<div class="edit-link"><a href="/edit">Edit</a></div>';
1296
+ }
1297
+
1298
+ __out += '<!--]-->';
1366
1299
 
1367
1300
  {
1368
- _$_.output_push('Header');
1301
+ const comp = SimpleFooter;
1302
+ const args = [{}];
1303
+
1304
+ _$_.output_push(__out);
1305
+ __out = '';
1306
+ _$_.render_component(comp, ...args);
1369
1307
  }
1370
1308
 
1371
- _$_.output_push('</header>');
1309
+ __out += '</div>';
1310
+ _$_.output_push(__out);
1372
1311
  });
1373
1312
  });
1374
1313
  }
1375
1314
 
1376
- function SidebarStub() {
1315
+ function InlineArticleLayout({ children }) {
1377
1316
  return _$_.tsrx_element(() => {
1378
1317
  _$_.regular_block(() => {
1379
- _$_.output_push('<aside');
1380
- _$_.output_push(' class="sidebar"');
1381
- _$_.output_push('>');
1318
+ let __out = '';
1319
+
1320
+ __out += '<div class="content-container"><article class="doc-content"><div>';
1382
1321
 
1383
1322
  {
1384
- _$_.output_push('Sidebar');
1323
+ _$_.output_push(__out);
1324
+ __out = '';
1325
+ _$_.render_expression(children);
1385
1326
  }
1386
1327
 
1387
- _$_.output_push('</aside>');
1388
- });
1389
- });
1390
- }
1328
+ __out += '</div></article><!--[-->';
1391
1329
 
1392
- function FooterStub() {
1393
- return _$_.tsrx_element(() => {
1394
- _$_.regular_block(() => {
1395
- _$_.output_push('<footer');
1396
- _$_.output_push(' class="footer"');
1397
- _$_.output_push('>');
1330
+ if (true) {
1331
+ __out += '<div class="edit-link"><a href="/edit">Edit</a></div>';
1332
+ }
1333
+
1334
+ __out += '<!--]-->';
1398
1335
 
1399
1336
  {
1400
- _$_.output_push('Footer');
1337
+ const comp = SimpleFooter;
1338
+ const args = [{}];
1339
+
1340
+ _$_.output_push(__out);
1341
+ __out = '';
1342
+ _$_.render_component(comp, ...args);
1401
1343
  }
1402
1344
 
1403
- _$_.output_push('</footer>');
1345
+ __out += '</div>';
1346
+ _$_.output_push(__out);
1404
1347
  });
1405
1348
  });
1406
1349
  }
1407
1350
 
1408
- function DocsLayoutInner(__props) {
1351
+ export function InlineArticleWithHtmlChild() {
1409
1352
  return _$_.tsrx_element(() => {
1410
- _$_.regular_block(() => {
1411
- _$_.output_push('<div');
1412
- _$_.output_push(' class="layout"');
1413
- _$_.output_push('>');
1353
+ const htmlContent = '<pre><code>const x = 1;</code></pre>';
1414
1354
 
1355
+ _$_.regular_block(() => {
1415
1356
  {
1416
- {
1417
- const comp = HeaderStub;
1418
- const args = [{}];
1419
-
1420
- _$_.render_component(comp, ...args);
1421
- }
1422
-
1423
- _$_.output_push('<div');
1424
- _$_.output_push(' class="docs-wrapper"');
1425
- _$_.output_push('>');
1357
+ const comp = InlineArticleLayout;
1426
1358
 
1427
- {
1359
+ const args = [
1428
1360
  {
1429
- const comp = SidebarStub;
1430
- const args = [{}];
1361
+ children: _$_.tsrx_element(() => {
1362
+ return _$_.tsrx_element(() => {
1363
+ let __out = '';
1431
1364
 
1432
- _$_.render_component(comp, ...args);
1365
+ __out += '<div class="doc-content">' + String(htmlContent ?? '') + '</div>';
1366
+ _$_.output_push(__out);
1367
+ });
1368
+ })
1433
1369
  }
1370
+ ];
1434
1371
 
1435
- _$_.output_push('<main');
1436
- _$_.output_push(' class="docs-main"');
1437
- _$_.output_push('>');
1372
+ _$_.render_component(comp, ...args);
1373
+ }
1374
+ });
1375
+ });
1376
+ }
1438
1377
 
1439
- {
1440
- _$_.output_push('<div');
1441
- _$_.output_push(' class="docs-container"');
1442
- _$_.output_push('>');
1378
+ function HeaderStub() {
1379
+ return _$_.tsrx_element(() => {
1380
+ _$_.regular_block(() => {
1381
+ let __out = '';
1443
1382
 
1444
- {
1445
- _$_.output_push('<div');
1446
- _$_.output_push(' class="content"');
1447
- _$_.output_push('>');
1383
+ __out += '<header class="header">Header</header>';
1384
+ _$_.output_push(__out);
1385
+ });
1386
+ });
1387
+ }
1448
1388
 
1449
- {
1450
- _$_.output_push('<div');
1451
- _$_.output_push(' class="content-container"');
1452
- _$_.output_push('>');
1389
+ function SidebarStub() {
1390
+ return _$_.tsrx_element(() => {
1391
+ _$_.regular_block(() => {
1392
+ let __out = '';
1453
1393
 
1454
- {
1455
- _$_.output_push('<article');
1456
- _$_.output_push(' class="doc-content"');
1457
- _$_.output_push('>');
1394
+ __out += '<aside class="sidebar">Sidebar</aside>';
1395
+ _$_.output_push(__out);
1396
+ });
1397
+ });
1398
+ }
1458
1399
 
1459
- {
1460
- _$_.output_push('<div');
1461
- _$_.output_push('>');
1400
+ function FooterStub() {
1401
+ return _$_.tsrx_element(() => {
1402
+ _$_.regular_block(() => {
1403
+ let __out = '';
1462
1404
 
1463
- {
1464
- _$_.render_expression(__props.children);
1465
- }
1405
+ __out += '<footer class="footer">Footer</footer>';
1406
+ _$_.output_push(__out);
1407
+ });
1408
+ });
1409
+ }
1466
1410
 
1467
- _$_.output_push('</div>');
1468
- }
1411
+ function DocsLayoutInner(__props) {
1412
+ return _$_.tsrx_element(() => {
1413
+ _$_.regular_block(() => {
1414
+ let __out = '';
1469
1415
 
1470
- _$_.output_push('</article>');
1471
- _$_.output_push('<!--[-->');
1416
+ __out += '<div class="layout">';
1472
1417
 
1473
- if (_$_.fallback(__props.editPath, '')) {
1474
- _$_.output_push('<div');
1475
- _$_.output_push(' class="edit-link"');
1476
- _$_.output_push('>');
1418
+ {
1419
+ const comp = HeaderStub;
1420
+ const args = [{}];
1477
1421
 
1478
- {
1479
- _$_.output_push('<a');
1480
- _$_.output_push(' href="/edit"');
1481
- _$_.output_push('>');
1422
+ _$_.output_push(__out);
1423
+ __out = '';
1424
+ _$_.render_component(comp, ...args);
1425
+ }
1482
1426
 
1483
- {
1484
- _$_.output_push('Edit on GitHub');
1485
- }
1427
+ __out += '<div class="docs-wrapper">';
1486
1428
 
1487
- _$_.output_push('</a>');
1488
- }
1429
+ {
1430
+ const comp = SidebarStub;
1431
+ const args = [{}];
1489
1432
 
1490
- _$_.output_push('</div>');
1491
- }
1433
+ _$_.output_push(__out);
1434
+ __out = '';
1435
+ _$_.render_component(comp, ...args);
1436
+ }
1492
1437
 
1493
- _$_.output_push('<!--]-->');
1494
- _$_.output_push('<!--[-->');
1438
+ __out += '<main class="docs-main"><div class="docs-container"><div class="content"><div class="content-container"><article class="doc-content"><div>';
1495
1439
 
1496
- if (_$_.fallback(__props.nextLink, null)) {
1497
- _$_.output_push('<nav');
1498
- _$_.output_push(' class="prev-next"');
1499
- _$_.output_push('>');
1440
+ {
1441
+ _$_.output_push(__out);
1442
+ __out = '';
1443
+ _$_.render_expression(__props.children);
1444
+ }
1500
1445
 
1501
- {
1502
- _$_.output_push('<a');
1503
- _$_.output_push(_$_.attr('href', _$_.fallback(__props.nextLink, null).href, false));
1504
- _$_.output_push('>');
1446
+ __out += '</div></article><!--[-->';
1447
+ _$_.output_push(__out);
1448
+ __out = '';
1505
1449
 
1506
- {
1507
- _$_.output_push(_$_.escape(_$_.fallback(__props.nextLink, null).text));
1508
- }
1450
+ if (_$_.fallback(__props.editPath, '')) {
1451
+ _$_.output_push('<div');
1452
+ _$_.output_push(' class="edit-link"');
1453
+ _$_.output_push('>');
1509
1454
 
1510
- _$_.output_push('</a>');
1511
- }
1455
+ {
1456
+ _$_.output_push('<a');
1457
+ _$_.output_push(' href="/edit"');
1458
+ _$_.output_push('>');
1512
1459
 
1513
- _$_.output_push('</nav>');
1514
- }
1460
+ {
1461
+ _$_.output_push('Edit on GitHub');
1462
+ }
1515
1463
 
1516
- _$_.output_push('<!--]-->');
1464
+ _$_.output_push('</a>');
1465
+ }
1517
1466
 
1518
- {
1519
- const comp = FooterStub;
1520
- const args = [{}];
1467
+ _$_.output_push('</div>');
1468
+ }
1521
1469
 
1522
- _$_.render_component(comp, ...args);
1523
- }
1524
- }
1470
+ __out += '<!--]--><!--[-->';
1471
+ _$_.output_push(__out);
1472
+ __out = '';
1525
1473
 
1526
- _$_.output_push('</div>');
1527
- }
1474
+ if (_$_.fallback(__props.nextLink, null)) {
1475
+ _$_.output_push('<nav');
1476
+ _$_.output_push(' class="prev-next"');
1477
+ _$_.output_push('>');
1528
1478
 
1529
- _$_.output_push('</div>');
1530
- }
1479
+ {
1480
+ _$_.output_push('<a');
1481
+ _$_.output_push(_$_.attr('href', _$_.fallback(__props.nextLink, null).href, false));
1482
+ _$_.output_push('>');
1531
1483
 
1532
- _$_.output_push('</div>');
1484
+ {
1485
+ _$_.output_push(_$_.escape(_$_.fallback(__props.nextLink, null).text));
1533
1486
  }
1534
1487
 
1535
- _$_.output_push('</main>');
1488
+ _$_.output_push('</a>');
1536
1489
  }
1537
1490
 
1538
- _$_.output_push('</div>');
1491
+ _$_.output_push('</nav>');
1492
+ }
1493
+
1494
+ __out += '<!--]-->';
1495
+
1496
+ {
1497
+ const comp = FooterStub;
1498
+ const args = [{}];
1499
+
1500
+ _$_.output_push(__out);
1501
+ __out = '';
1502
+ _$_.render_component(comp, ...args);
1539
1503
  }
1540
1504
 
1541
- _$_.output_push('</div>');
1505
+ __out += '</div></div></div></main></div></div>';
1506
+ _$_.output_push(__out);
1542
1507
  });
1543
1508
  });
1544
1509
  }
@@ -1557,11 +1522,10 @@ export function DocsLayoutWithData() {
1557
1522
  nextLink: { href: '/next', text: 'Next' },
1558
1523
  children: _$_.tsrx_element(() => {
1559
1524
  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>');
1525
+ let __out = '';
1526
+
1527
+ __out += '<div class="doc-content">' + String(htmlContent ?? '') + '</div>';
1528
+ _$_.output_push(__out);
1565
1529
  });
1566
1530
  })
1567
1531
  }
@@ -1585,11 +1549,10 @@ export function DocsLayoutWithoutData() {
1585
1549
  {
1586
1550
  children: _$_.tsrx_element(() => {
1587
1551
  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>');
1552
+ let __out = '';
1553
+
1554
+ __out += '<div class="doc-content">' + String(htmlContent ?? '') + '</div>';
1555
+ _$_.output_push(__out);
1593
1556
  });
1594
1557
  })
1595
1558
  }
@@ -1604,225 +1567,180 @@ export function DocsLayoutWithoutData() {
1604
1567
  function DocsLayoutExact(__props) {
1605
1568
  return _$_.tsrx_element(() => {
1606
1569
  _$_.regular_block(() => {
1607
- _$_.output_push('<div');
1608
- _$_.output_push(' class="layout"');
1609
- _$_.output_push('>');
1570
+ let __out = '';
1571
+
1572
+ __out += '<div class="layout">';
1610
1573
 
1611
1574
  {
1612
- {
1613
- const comp = HeaderStub;
1614
- const args = [{}];
1575
+ const comp = HeaderStub;
1576
+ const args = [{}];
1615
1577
 
1616
- _$_.render_component(comp, ...args);
1617
- }
1578
+ _$_.output_push(__out);
1579
+ __out = '';
1580
+ _$_.render_component(comp, ...args);
1581
+ }
1582
+
1583
+ __out += '<div class="docs-wrapper">';
1584
+
1585
+ {
1586
+ const comp = SidebarStub;
1587
+ const args = [{}];
1618
1588
 
1589
+ _$_.output_push(__out);
1590
+ __out = '';
1591
+ _$_.render_component(comp, ...args);
1592
+ }
1593
+
1594
+ __out += '<main class="docs-main"><div class="docs-container"><div class="content"><div class="content-container"><article class="doc-content"><div>';
1595
+
1596
+ {
1597
+ _$_.output_push(__out);
1598
+ __out = '';
1599
+ _$_.render_expression(__props.children);
1600
+ }
1601
+
1602
+ __out += '</div></article><!--[-->';
1603
+ _$_.output_push(__out);
1604
+ __out = '';
1605
+
1606
+ if (_$_.fallback(__props.editPath, '')) {
1619
1607
  _$_.output_push('<div');
1620
- _$_.output_push(' class="docs-wrapper"');
1608
+ _$_.output_push(' class="edit-link"');
1621
1609
  _$_.output_push('>');
1622
1610
 
1623
1611
  {
1624
- {
1625
- const comp = SidebarStub;
1626
- const args = [{}];
1627
-
1628
- _$_.render_component(comp, ...args);
1629
- }
1630
-
1631
- _$_.output_push('<main');
1632
- _$_.output_push(' class="docs-main"');
1612
+ _$_.output_push('<a');
1613
+ _$_.output_push(_$_.attr('href', `/edit/${_$_.fallback(__props.editPath, '')}`, false));
1633
1614
  _$_.output_push('>');
1634
1615
 
1635
1616
  {
1636
- _$_.output_push('<div');
1637
- _$_.output_push(' class="docs-container"');
1638
- _$_.output_push('>');
1639
-
1640
- {
1641
- _$_.output_push('<div');
1642
- _$_.output_push(' class="content"');
1643
- _$_.output_push('>');
1644
-
1645
- {
1646
- _$_.output_push('<div');
1647
- _$_.output_push(' class="content-container"');
1648
- _$_.output_push('>');
1617
+ _$_.output_push('Edit on GitHub');
1618
+ }
1649
1619
 
1650
- {
1651
- _$_.output_push('<article');
1652
- _$_.output_push(' class="doc-content"');
1653
- _$_.output_push('>');
1620
+ _$_.output_push('</a>');
1621
+ }
1654
1622
 
1655
- {
1656
- _$_.output_push('<div');
1657
- _$_.output_push('>');
1623
+ _$_.output_push('</div>');
1624
+ }
1658
1625
 
1659
- {
1660
- _$_.render_expression(__props.children);
1661
- }
1626
+ __out += '<!--]--><!--[-->';
1627
+ _$_.output_push(__out);
1628
+ __out = '';
1662
1629
 
1663
- _$_.output_push('</div>');
1664
- }
1630
+ if (_$_.fallback(__props.prevLink, null) || _$_.fallback(__props.nextLink, null)) {
1631
+ _$_.output_push('<nav');
1632
+ _$_.output_push(' class="prev-next"');
1633
+ _$_.output_push('>');
1665
1634
 
1666
- _$_.output_push('</article>');
1667
- _$_.output_push('<!--[-->');
1635
+ {
1636
+ _$_.output_push('<!--[-->');
1668
1637
 
1669
- if (_$_.fallback(__props.editPath, '')) {
1670
- _$_.output_push('<div');
1671
- _$_.output_push(' class="edit-link"');
1672
- _$_.output_push('>');
1638
+ if (_$_.fallback(__props.prevLink, null)) {
1639
+ _$_.output_push('<a');
1640
+ _$_.output_push(_$_.attr('href', _$_.fallback(__props.prevLink, null).href, false));
1641
+ _$_.output_push(' class="pager prev"');
1642
+ _$_.output_push('>');
1673
1643
 
1674
- {
1675
- _$_.output_push('<a');
1676
- _$_.output_push(_$_.attr('href', `/edit/${_$_.fallback(__props.editPath, '')}`, false));
1677
- _$_.output_push('>');
1644
+ {
1645
+ _$_.output_push('<span');
1646
+ _$_.output_push(' class="title"');
1647
+ _$_.output_push('>');
1678
1648
 
1679
- {
1680
- _$_.output_push('Edit on GitHub');
1681
- }
1649
+ {
1650
+ _$_.output_push(_$_.escape(_$_.fallback(__props.prevLink, null).text));
1651
+ }
1682
1652
 
1683
- _$_.output_push('</a>');
1684
- }
1653
+ _$_.output_push('</span>');
1654
+ }
1685
1655
 
1686
- _$_.output_push('</div>');
1687
- }
1656
+ _$_.output_push('</a>');
1657
+ } else {
1658
+ _$_.output_push('<span');
1659
+ _$_.output_push('>');
1660
+ _$_.output_push('</span>');
1661
+ }
1688
1662
 
1689
- _$_.output_push('<!--]-->');
1690
- _$_.output_push('<!--[-->');
1663
+ _$_.output_push('<!--]-->');
1664
+ _$_.output_push('<!--[-->');
1691
1665
 
1692
- if (_$_.fallback(__props.prevLink, null) || _$_.fallback(__props.nextLink, null)) {
1693
- _$_.output_push('<nav');
1694
- _$_.output_push(' class="prev-next"');
1695
- _$_.output_push('>');
1666
+ if (_$_.fallback(__props.nextLink, null)) {
1667
+ _$_.output_push('<a');
1668
+ _$_.output_push(_$_.attr('href', _$_.fallback(__props.nextLink, null).href, false));
1669
+ _$_.output_push(' class="pager next"');
1670
+ _$_.output_push('>');
1696
1671
 
1697
- {
1698
- _$_.output_push('<!--[-->');
1699
-
1700
- if (_$_.fallback(__props.prevLink, null)) {
1701
- _$_.output_push('<a');
1702
- _$_.output_push(_$_.attr('href', _$_.fallback(__props.prevLink, null).href, false));
1703
- _$_.output_push(' class="pager prev"');
1704
- _$_.output_push('>');
1705
-
1706
- {
1707
- _$_.output_push('<span');
1708
- _$_.output_push(' class="title"');
1709
- _$_.output_push('>');
1710
-
1711
- {
1712
- _$_.output_push(_$_.escape(_$_.fallback(__props.prevLink, null).text));
1713
- }
1714
-
1715
- _$_.output_push('</span>');
1716
- }
1717
-
1718
- _$_.output_push('</a>');
1719
- } else {
1720
- _$_.output_push('<span');
1721
- _$_.output_push('>');
1722
- _$_.output_push('</span>');
1723
- }
1672
+ {
1673
+ _$_.output_push('<span');
1674
+ _$_.output_push(' class="title"');
1675
+ _$_.output_push('>');
1724
1676
 
1725
- _$_.output_push('<!--]-->');
1726
- _$_.output_push('<!--[-->');
1677
+ {
1678
+ _$_.output_push(_$_.escape(_$_.fallback(__props.nextLink, null).text));
1679
+ }
1727
1680
 
1728
- if (_$_.fallback(__props.nextLink, null)) {
1729
- _$_.output_push('<a');
1730
- _$_.output_push(_$_.attr('href', _$_.fallback(__props.nextLink, null).href, false));
1731
- _$_.output_push(' class="pager next"');
1732
- _$_.output_push('>');
1681
+ _$_.output_push('</span>');
1682
+ }
1733
1683
 
1734
- {
1735
- _$_.output_push('<span');
1736
- _$_.output_push(' class="title"');
1737
- _$_.output_push('>');
1684
+ _$_.output_push('</a>');
1685
+ }
1738
1686
 
1739
- {
1740
- _$_.output_push(_$_.escape(_$_.fallback(__props.nextLink, null).text));
1741
- }
1687
+ _$_.output_push('<!--]-->');
1688
+ }
1742
1689
 
1743
- _$_.output_push('</span>');
1744
- }
1690
+ _$_.output_push('</nav>');
1691
+ }
1745
1692
 
1746
- _$_.output_push('</a>');
1747
- }
1693
+ __out += '<!--]-->';
1748
1694
 
1749
- _$_.output_push('<!--]-->');
1750
- }
1695
+ {
1696
+ const comp = FooterStub;
1697
+ const args = [{}];
1751
1698
 
1752
- _$_.output_push('</nav>');
1753
- }
1699
+ _$_.output_push(__out);
1700
+ __out = '';
1701
+ _$_.render_component(comp, ...args);
1702
+ }
1754
1703
 
1755
- _$_.output_push('<!--]-->');
1704
+ __out += '</div></div><aside class="aside"><!--[-->';
1705
+ _$_.output_push(__out);
1706
+ __out = '';
1756
1707
 
1757
- {
1758
- const comp = FooterStub;
1759
- const args = [{}];
1708
+ if (_$_.fallback(__props.toc, []).length > 0) {
1709
+ _$_.output_push('<div');
1710
+ _$_.output_push(' class="aside-content"');
1711
+ _$_.output_push('>');
1760
1712
 
1761
- _$_.render_component(comp, ...args);
1762
- }
1763
- }
1713
+ {
1714
+ _$_.output_push('<nav');
1715
+ _$_.output_push(' class="outline"');
1716
+ _$_.output_push('>');
1764
1717
 
1765
- _$_.output_push('</div>');
1766
- }
1718
+ {
1719
+ _$_.output_push('<!--[-->');
1767
1720
 
1768
- _$_.output_push('</div>');
1769
- _$_.output_push('<aside');
1770
- _$_.output_push(' class="aside"');
1721
+ for (const item of _$_.fallback(__props.toc, [])) {
1722
+ _$_.output_push('<a');
1723
+ _$_.output_push(_$_.attr('href', item.href, false));
1771
1724
  _$_.output_push('>');
1772
1725
 
1773
1726
  {
1774
- _$_.output_push('<!--[-->');
1775
-
1776
- if (_$_.fallback(__props.toc, []).length > 0) {
1777
- _$_.output_push('<div');
1778
- _$_.output_push(' class="aside-content"');
1779
- _$_.output_push('>');
1780
-
1781
- {
1782
- _$_.output_push('<nav');
1783
- _$_.output_push(' class="outline"');
1784
- _$_.output_push('>');
1785
-
1786
- {
1787
- _$_.output_push('<!--[-->');
1788
-
1789
- for (const item of _$_.fallback(__props.toc, [])) {
1790
- _$_.output_push('<a');
1791
- _$_.output_push(_$_.attr('href', item.href, false));
1792
- _$_.output_push('>');
1793
-
1794
- {
1795
- _$_.output_push(_$_.escape(item.text));
1796
- }
1797
-
1798
- _$_.output_push('</a>');
1799
- }
1800
-
1801
- _$_.output_push('<!--]-->');
1802
- }
1803
-
1804
- _$_.output_push('</nav>');
1805
- }
1806
-
1807
- _$_.output_push('</div>');
1808
- }
1809
-
1810
- _$_.output_push('<!--]-->');
1727
+ _$_.output_push(_$_.escape(item.text));
1811
1728
  }
1812
1729
 
1813
- _$_.output_push('</aside>');
1730
+ _$_.output_push('</a>');
1814
1731
  }
1815
1732
 
1816
- _$_.output_push('</div>');
1733
+ _$_.output_push('<!--]-->');
1817
1734
  }
1818
1735
 
1819
- _$_.output_push('</main>');
1736
+ _$_.output_push('</nav>');
1820
1737
  }
1821
1738
 
1822
1739
  _$_.output_push('</div>');
1823
1740
  }
1824
1741
 
1825
- _$_.output_push('</div>');
1742
+ __out += '<!--]--></aside></div></main></div></div>';
1743
+ _$_.output_push(__out);
1826
1744
  });
1827
1745
  });
1828
1746
  }
@@ -1847,11 +1765,10 @@ export function DocsLayoutExactWithData() {
1847
1765
 
1848
1766
  children: _$_.tsrx_element(() => {
1849
1767
  return _$_.tsrx_element(() => {
1850
- _$_.output_push('<div');
1851
- _$_.output_push(' class="doc-content"');
1852
- _$_.output_push('>');
1853
- _$_.output_push(String(htmlContent ?? ''));
1854
- _$_.output_push('</div>');
1768
+ let __out = '';
1769
+
1770
+ __out += '<div class="doc-content">' + String(htmlContent ?? '') + '</div>';
1771
+ _$_.output_push(__out);
1855
1772
  });
1856
1773
  })
1857
1774
  }
@@ -1883,11 +1800,10 @@ export function DocsLayoutExactWithoutData() {
1883
1800
  toc,
1884
1801
  children: _$_.tsrx_element(() => {
1885
1802
  return _$_.tsrx_element(() => {
1886
- _$_.output_push('<div');
1887
- _$_.output_push(' class="doc-content"');
1888
- _$_.output_push('>');
1889
- _$_.output_push(String(htmlContent ?? ''));
1890
- _$_.output_push('</div>');
1803
+ let __out = '';
1804
+
1805
+ __out += '<div class="doc-content">' + String(htmlContent ?? '') + '</div>';
1806
+ _$_.output_push(__out);
1891
1807
  });
1892
1808
  })
1893
1809
  }
@@ -1904,27 +1820,10 @@ export function TemplateWithHtmlContent() {
1904
1820
  const data = { title: 'Test', value: 42 };
1905
1821
 
1906
1822
  _$_.regular_block(() => {
1907
- _$_.output_push('<div');
1908
- _$_.output_push('>');
1909
-
1910
- {
1911
- _$_.output_push('<template');
1912
- _$_.output_push(' id="t1"');
1913
- _$_.output_push('>');
1914
- _$_.output_push(String(JSON.stringify(data) ?? ''));
1915
- _$_.output_push('</template>');
1916
- _$_.output_push('<p');
1917
- _$_.output_push(' class="content"');
1918
- _$_.output_push('>');
1823
+ let __out = '';
1919
1824
 
1920
- {
1921
- _$_.output_push('Main content');
1922
- }
1923
-
1924
- _$_.output_push('</p>');
1925
- }
1926
-
1927
- _$_.output_push('</div>');
1825
+ __out += '<div><template id="t1">' + String(JSON.stringify(data) ?? '') + '</template><p class="content">Main content</p></div>';
1826
+ _$_.output_push(__out);
1928
1827
  });
1929
1828
  });
1930
1829
  }
@@ -1934,36 +1833,10 @@ export function TemplateWithHtmlAndSiblings() {
1934
1833
  const data = { name: 'Ripple', version: '1.0' };
1935
1834
 
1936
1835
  _$_.regular_block(() => {
1937
- _$_.output_push('<div');
1938
- _$_.output_push(' class="wrapper"');
1939
- _$_.output_push('>');
1940
-
1941
- {
1942
- _$_.output_push('<h1');
1943
- _$_.output_push('>');
1944
-
1945
- {
1946
- _$_.output_push('Title');
1947
- }
1948
-
1949
- _$_.output_push('</h1>');
1950
- _$_.output_push('<template');
1951
- _$_.output_push(' id="data-template"');
1952
- _$_.output_push('>');
1953
- _$_.output_push(String(JSON.stringify(data) ?? ''));
1954
- _$_.output_push('</template>');
1955
- _$_.output_push('<p');
1956
- _$_.output_push(' class="after-template"');
1957
- _$_.output_push('>');
1958
-
1959
- {
1960
- _$_.output_push('Content after template');
1961
- }
1962
-
1963
- _$_.output_push('</p>');
1964
- }
1836
+ let __out = '';
1965
1837
 
1966
- _$_.output_push('</div>');
1838
+ __out += '<div class="wrapper"><h1>Title</h1><template id="data-template">' + String(JSON.stringify(data) ?? '') + '</template><p class="after-template">Content after template</p></div>';
1839
+ _$_.output_push(__out);
1967
1840
  });
1968
1841
  });
1969
1842
  }
@@ -1971,27 +1844,18 @@ export function TemplateWithHtmlAndSiblings() {
1971
1844
  function LayoutWithTemplate({ children, data }) {
1972
1845
  return _$_.tsrx_element(() => {
1973
1846
  _$_.regular_block(() => {
1974
- _$_.output_push('<div');
1975
- _$_.output_push(' class="layout"');
1976
- _$_.output_push('>');
1977
-
1978
- {
1979
- _$_.output_push('<template');
1980
- _$_.output_push(' id="page-data"');
1981
- _$_.output_push('>');
1982
- _$_.output_push(String(JSON.stringify(data) ?? ''));
1983
- _$_.output_push('</template>');
1984
- _$_.output_push('<main');
1985
- _$_.output_push('>');
1847
+ let __out = '';
1986
1848
 
1987
- {
1988
- _$_.render_expression(children);
1989
- }
1849
+ __out += '<div class="layout"><template id="page-data">' + String(JSON.stringify(data) ?? '') + '</template><main>';
1990
1850
 
1991
- _$_.output_push('</main>');
1851
+ {
1852
+ _$_.output_push(__out);
1853
+ __out = '';
1854
+ _$_.render_expression(children);
1992
1855
  }
1993
1856
 
1994
- _$_.output_push('</div>');
1857
+ __out += '</main></div>';
1858
+ _$_.output_push(__out);
1995
1859
  });
1996
1860
  });
1997
1861
  }
@@ -2009,11 +1873,10 @@ export function NestedTemplateInLayout() {
2009
1873
  data: doc,
2010
1874
  children: _$_.tsrx_element(() => {
2011
1875
  return _$_.tsrx_element(() => {
2012
- _$_.output_push('<div');
2013
- _$_.output_push(' class="doc-content"');
2014
- _$_.output_push('>');
2015
- _$_.output_push(String(doc.html ?? ''));
2016
- _$_.output_push('</div>');
1876
+ let __out = '';
1877
+
1878
+ __out += '<div class="doc-content">' + String(doc.html ?? '') + '</div>';
1879
+ _$_.output_push(__out);
2017
1880
  });
2018
1881
  })
2019
1882
  }
@@ -2032,98 +1895,10 @@ export function HtmlCodeBlocksWithSiblingChain() {
2032
1895
  const html3 = '<span class="kw">const</span> <span class="id">c</span> = 3;';
2033
1896
 
2034
1897
  _$_.regular_block(() => {
2035
- _$_.output_push('<section');
2036
- _$_.output_push(' class="readable-section"');
2037
- _$_.output_push('>');
2038
-
2039
- {
2040
- _$_.output_push('<p');
2041
- _$_.output_push('>');
2042
-
2043
- {
2044
- _$_.output_push('Ergonomics');
2045
- }
2046
-
2047
- _$_.output_push('</p>');
2048
- _$_.output_push('<h2');
2049
- _$_.output_push('>');
2050
-
2051
- {
2052
- _$_.output_push('Sibling traversal pattern');
2053
- }
2054
-
2055
- _$_.output_push('</h2>');
2056
- _$_.output_push('<p');
2057
- _$_.output_push('>');
2058
-
2059
- {
2060
- _$_.output_push('Before first block');
2061
- }
2062
-
2063
- _$_.output_push('</p>');
2064
- _$_.output_push('<p');
2065
- _$_.output_push('>');
2066
-
2067
- {
2068
- _$_.output_push('Before second block');
2069
- }
2070
-
2071
- _$_.output_push('</p>');
2072
- _$_.output_push('<pre');
2073
- _$_.output_push(' class="code-block"');
2074
- _$_.output_push('>');
2075
-
2076
- {
2077
- _$_.output_push('<code');
2078
- _$_.output_push('>');
2079
- _$_.output_push(String(html1 ?? ''));
2080
- _$_.output_push('</code>');
2081
- }
2082
-
2083
- _$_.output_push('</pre>');
2084
- _$_.output_push('<p');
2085
- _$_.output_push('>');
2086
-
2087
- {
2088
- _$_.output_push('Between one and two');
2089
- }
2090
-
2091
- _$_.output_push('</p>');
2092
- _$_.output_push('<pre');
2093
- _$_.output_push(' class="code-block"');
2094
- _$_.output_push('>');
2095
-
2096
- {
2097
- _$_.output_push('<code');
2098
- _$_.output_push('>');
2099
- _$_.output_push(String(html2 ?? ''));
2100
- _$_.output_push('</code>');
2101
- }
2102
-
2103
- _$_.output_push('</pre>');
2104
- _$_.output_push('<p');
2105
- _$_.output_push('>');
2106
-
2107
- {
2108
- _$_.output_push('Between two and three');
2109
- }
2110
-
2111
- _$_.output_push('</p>');
2112
- _$_.output_push('<pre');
2113
- _$_.output_push(' class="code-block"');
2114
- _$_.output_push('>');
2115
-
2116
- {
2117
- _$_.output_push('<code');
2118
- _$_.output_push('>');
2119
- _$_.output_push(String(html3 ?? ''));
2120
- _$_.output_push('</code>');
2121
- }
2122
-
2123
- _$_.output_push('</pre>');
2124
- }
1898
+ let __out = '';
2125
1899
 
2126
- _$_.output_push('</section>');
1900
+ __out += '<section class="readable-section"><p>Ergonomics</p><h2>Sibling traversal pattern</h2><p>Before first block</p><p>Before second block</p><pre class="code-block"><code>' + String(html1 ?? '') + '</code></pre><p>Between one and two</p><pre class="code-block"><code>' + String(html2 ?? '') + '</code></pre><p>Between two and three</p><pre class="code-block"><code>' + String(html3 ?? '') + '</code></pre></section>';
1901
+ _$_.output_push(__out);
2127
1902
  });
2128
1903
  });
2129
1904
  }