ripple 0.3.84 → 0.3.86

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 (59) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/package.json +3 -3
  3. package/src/constants.js +4 -0
  4. package/src/runtime/internal/client/blocks.js +53 -0
  5. package/src/runtime/internal/client/component.js +3 -3
  6. package/src/runtime/internal/client/constants.js +4 -0
  7. package/src/runtime/internal/client/for.js +87 -14
  8. package/src/runtime/internal/client/if.js +18 -2
  9. package/src/runtime/internal/client/index.js +1 -0
  10. package/src/runtime/internal/client/operations.js +25 -0
  11. package/src/runtime/internal/client/runtime.js +62 -10
  12. package/src/runtime/internal/client/switch.js +33 -5
  13. package/src/runtime/internal/client/template.js +10 -2
  14. package/src/runtime/internal/client/try.js +12 -2
  15. package/src/runtime/internal/client/types.d.ts +4 -0
  16. package/tests/client/__snapshots__/for.test.tsrx.snap +0 -2
  17. package/tests/client/compiler/compiler.basic.test.tsrx +5 -2
  18. package/tests/client/composite/__snapshots__/composite.render.test.tsrx.snap +0 -4
  19. package/tests/client/for-single-root-items.test.tsrx +130 -0
  20. package/tests/client/scoped-flush.test.tsrx +105 -0
  21. package/tests/hydration/compiled/client/basic.js +198 -214
  22. package/tests/hydration/compiled/client/composite.js +23 -72
  23. package/tests/hydration/compiled/client/for.js +66 -72
  24. package/tests/hydration/compiled/client/hmr.js +2 -13
  25. package/tests/hydration/compiled/client/html.js +619 -479
  26. package/tests/hydration/compiled/client/if-children.js +72 -84
  27. package/tests/hydration/compiled/client/if-fragment-controlflow.js +463 -0
  28. package/tests/hydration/compiled/client/if.js +87 -92
  29. package/tests/hydration/compiled/client/mixed-control-flow.js +120 -160
  30. package/tests/hydration/compiled/client/nested-control-flow.js +288 -360
  31. package/tests/hydration/compiled/client/portal.js +15 -21
  32. package/tests/hydration/compiled/client/reactivity.js +7 -12
  33. package/tests/hydration/compiled/client/switch.js +113 -115
  34. package/tests/hydration/compiled/client/track-async-serialization.js +71 -122
  35. package/tests/hydration/compiled/client/try.js +26 -41
  36. package/tests/hydration/compiled/server/basic.js +295 -556
  37. package/tests/hydration/compiled/server/composite.js +31 -50
  38. package/tests/hydration/compiled/server/events.js +37 -173
  39. package/tests/hydration/compiled/server/for.js +236 -847
  40. package/tests/hydration/compiled/server/head.js +110 -241
  41. package/tests/hydration/compiled/server/hmr.js +14 -41
  42. package/tests/hydration/compiled/server/html-in-template.js +14 -38
  43. package/tests/hydration/compiled/server/html.js +951 -1176
  44. package/tests/hydration/compiled/server/if-children.js +59 -493
  45. package/tests/hydration/compiled/server/if-fragment-controlflow.js +227 -0
  46. package/tests/hydration/compiled/server/if.js +57 -209
  47. package/tests/hydration/compiled/server/mixed-control-flow.js +144 -250
  48. package/tests/hydration/compiled/server/nested-control-flow.js +309 -559
  49. package/tests/hydration/compiled/server/portal.js +94 -156
  50. package/tests/hydration/compiled/server/reactivity.js +23 -65
  51. package/tests/hydration/compiled/server/return.js +6 -16
  52. package/tests/hydration/compiled/server/switch.js +91 -219
  53. package/tests/hydration/compiled/server/track-async-serialization.js +211 -256
  54. package/tests/hydration/compiled/server/try.js +67 -126
  55. package/tests/hydration/components/html.tsrx +75 -0
  56. package/tests/hydration/components/if-fragment-controlflow.tsrx +145 -0
  57. package/tests/hydration/html.test.js +50 -0
  58. package/tests/hydration/if-fragment-controlflow.test.js +95 -0
  59. package/tests/server/compiler.test.tsrx +6 -2
@@ -8,27 +8,16 @@ export function StaticForLoop() {
8
8
  const items = ['Apple', 'Banana', 'Cherry'];
9
9
 
10
10
  _$_.regular_block(() => {
11
- _$_.output_push('<ul');
12
- _$_.output_push('>');
11
+ let __out = '';
13
12
 
14
- {
15
- _$_.output_push('<!--[-->');
16
-
17
- for (const item of items) {
18
- _$_.output_push('<li');
19
- _$_.output_push('>');
20
-
21
- {
22
- _$_.output_push(_$_.escape(item));
23
- }
13
+ __out += '<ul><!--[-->';
24
14
 
25
- _$_.output_push('</li>');
26
- }
27
-
28
- _$_.output_push('<!--]-->');
15
+ for (const item of items) {
16
+ __out += '<li>' + _$_.escape(item) + '</li>';
29
17
  }
30
18
 
31
- _$_.output_push('</ul>');
19
+ __out += '<!--]--></ul>';
20
+ _$_.output_push(__out);
32
21
  });
33
22
  });
34
23
  }
@@ -38,30 +27,25 @@ export function ForLoopWithIndex() {
38
27
  const items = ['A', 'B', 'C'];
39
28
 
40
29
  _$_.regular_block(() => {
41
- _$_.output_push('<ul');
42
- _$_.output_push('>');
30
+ let __out = '';
31
+
32
+ __out += '<ul>';
43
33
 
44
34
  {
45
- _$_.output_push('<!--[-->');
35
+ __out += '<!--[-->';
46
36
 
47
37
  var i = 0;
48
38
 
49
39
  for (const item of items) {
50
- _$_.output_push('<li');
51
- _$_.output_push('>');
52
-
53
- {
54
- _$_.output_push(_$_.escape(`${i}: ${item}`));
55
- }
56
-
57
- _$_.output_push('</li>');
40
+ __out += '<li>' + _$_.escape(`${i}: ${item}`) + '</li>';
58
41
  i++;
59
42
  }
60
43
 
61
- _$_.output_push('<!--]-->');
44
+ __out += '<!--]-->';
62
45
  }
63
46
 
64
- _$_.output_push('</ul>');
47
+ __out += '</ul>';
48
+ _$_.output_push(__out);
65
49
  });
66
50
  });
67
51
  }
@@ -75,27 +59,16 @@ export function KeyedForLoop() {
75
59
  ];
76
60
 
77
61
  _$_.regular_block(() => {
78
- _$_.output_push('<ul');
79
- _$_.output_push('>');
80
-
81
- {
82
- _$_.output_push('<!--[-->');
62
+ let __out = '';
83
63
 
84
- for (const item of items) {
85
- _$_.output_push('<li');
86
- _$_.output_push('>');
64
+ __out += '<ul><!--[-->';
87
65
 
88
- {
89
- _$_.output_push(_$_.escape(item.name));
90
- }
91
-
92
- _$_.output_push('</li>');
93
- }
94
-
95
- _$_.output_push('<!--]-->');
66
+ for (const item of items) {
67
+ __out += '<li>' + _$_.escape(item.name) + '</li>';
96
68
  }
97
69
 
98
- _$_.output_push('</ul>');
70
+ __out += '<!--]--></ul>';
71
+ _$_.output_push(__out);
99
72
  });
100
73
  });
101
74
  }
@@ -105,38 +78,16 @@ export function ReactiveForLoopAdd() {
105
78
  let lazy = _$_.track(['A', 'B'], 'e145678a');
106
79
 
107
80
  _$_.regular_block(() => {
108
- {
109
- _$_.output_push('<button');
110
- _$_.output_push(' class="add"');
111
- _$_.output_push('>');
81
+ let __out = '';
112
82
 
113
- {
114
- _$_.output_push('Add');
115
- }
116
-
117
- _$_.output_push('</button>');
118
- _$_.output_push('<ul');
119
- _$_.output_push('>');
120
-
121
- {
122
- _$_.output_push('<!--[-->');
123
-
124
- for (const item of lazy.value) {
125
- _$_.output_push('<li');
126
- _$_.output_push('>');
127
-
128
- {
129
- _$_.output_push(_$_.escape(item));
130
- }
131
-
132
- _$_.output_push('</li>');
133
- }
134
-
135
- _$_.output_push('<!--]-->');
136
- }
83
+ __out += '<button class="add">Add</button><ul><!--[-->';
137
84
 
138
- _$_.output_push('</ul>');
85
+ for (const item of lazy.value) {
86
+ __out += '<li>' + _$_.escape(item) + '</li>';
139
87
  }
88
+
89
+ __out += '<!--]--></ul>';
90
+ _$_.output_push(__out);
140
91
  });
141
92
  });
142
93
  }
@@ -146,38 +97,16 @@ export function ReactiveForLoopRemove() {
146
97
  let lazy_1 = _$_.track(['A', 'B', 'C'], 'b4e9bd54');
147
98
 
148
99
  _$_.regular_block(() => {
149
- {
150
- _$_.output_push('<button');
151
- _$_.output_push(' class="remove"');
152
- _$_.output_push('>');
153
-
154
- {
155
- _$_.output_push('Remove');
156
- }
100
+ let __out = '';
157
101
 
158
- _$_.output_push('</button>');
159
- _$_.output_push('<ul');
160
- _$_.output_push('>');
102
+ __out += '<button class="remove">Remove</button><ul><!--[-->';
161
103
 
162
- {
163
- _$_.output_push('<!--[-->');
164
-
165
- for (const item of lazy_1.value) {
166
- _$_.output_push('<li');
167
- _$_.output_push('>');
168
-
169
- {
170
- _$_.output_push(_$_.escape(item));
171
- }
172
-
173
- _$_.output_push('</li>');
174
- }
175
-
176
- _$_.output_push('<!--]-->');
177
- }
178
-
179
- _$_.output_push('</ul>');
104
+ for (const item of lazy_1.value) {
105
+ __out += '<li>' + _$_.escape(item) + '</li>';
180
106
  }
107
+
108
+ __out += '<!--]--></ul>';
109
+ _$_.output_push(__out);
181
110
  });
182
111
  });
183
112
  }
@@ -187,48 +116,25 @@ export function ForLoopInteractive() {
187
116
  let lazy_2 = _$_.track([0, 0, 0], '36f563df');
188
117
 
189
118
  _$_.regular_block(() => {
190
- _$_.output_push('<div');
191
- _$_.output_push('>');
119
+ let __out = '';
120
+
121
+ __out += '<div>';
192
122
 
193
123
  {
194
- _$_.output_push('<!--[-->');
124
+ __out += '<!--[-->';
195
125
 
196
126
  var i = 0;
197
127
 
198
128
  for (const count of lazy_2.value) {
199
- _$_.output_push('<div');
200
- _$_.output_push(_$_.attr('class', `item-${i}`));
201
- _$_.output_push('>');
202
-
203
- {
204
- _$_.output_push('<span');
205
- _$_.output_push(' class="value"');
206
- _$_.output_push('>');
207
-
208
- {
209
- _$_.output_push(_$_.escape(count));
210
- }
211
-
212
- _$_.output_push('</span>');
213
- _$_.output_push('<button');
214
- _$_.output_push(' class="increment"');
215
- _$_.output_push('>');
216
-
217
- {
218
- _$_.output_push('+');
219
- }
220
-
221
- _$_.output_push('</button>');
222
- }
223
-
224
- _$_.output_push('</div>');
129
+ __out += '<div' + _$_.attr('class', `item-${i}`) + '><span class="value">' + _$_.escape(count) + '</span><button class="increment">+</button></div>';
225
130
  i++;
226
131
  }
227
132
 
228
- _$_.output_push('<!--]-->');
133
+ __out += '<!--]-->';
229
134
  }
230
135
 
231
- _$_.output_push('</div>');
136
+ __out += '</div>';
137
+ _$_.output_push(__out);
232
138
  });
233
139
  });
234
140
  }
@@ -238,49 +144,40 @@ export function NestedForLoop() {
238
144
  const grid = [[1, 2], [3, 4]];
239
145
 
240
146
  _$_.regular_block(() => {
241
- _$_.output_push('<div');
242
- _$_.output_push(' class="grid"');
243
- _$_.output_push('>');
147
+ let __out = '';
148
+
149
+ __out += '<div class="grid">';
244
150
 
245
151
  {
246
- _$_.output_push('<!--[-->');
152
+ __out += '<!--[-->';
247
153
 
248
154
  var rowIndex = 0;
249
155
 
250
156
  for (const row of grid) {
251
- _$_.output_push('<div');
252
- _$_.output_push(_$_.attr('class', `row-${rowIndex}`));
253
- _$_.output_push('>');
157
+ __out += '<div' + _$_.attr('class', `row-${rowIndex}`) + '>';
254
158
 
255
159
  {
256
- _$_.output_push('<!--[-->');
160
+ __out += '<!--[-->';
257
161
 
258
162
  var colIndex = 0;
259
163
 
260
164
  for (const cell of row) {
261
- _$_.output_push('<span');
262
- _$_.output_push(_$_.attr('class', `cell-${rowIndex}-${colIndex}`));
263
- _$_.output_push('>');
264
-
265
- {
266
- _$_.output_push(_$_.escape(cell));
267
- }
268
-
269
- _$_.output_push('</span>');
165
+ __out += '<span' + _$_.attr('class', `cell-${rowIndex}-${colIndex}`) + '>' + _$_.escape(cell) + '</span>';
270
166
  colIndex++;
271
167
  }
272
168
 
273
- _$_.output_push('<!--]-->');
169
+ __out += '<!--]-->';
274
170
  }
275
171
 
276
- _$_.output_push('</div>');
172
+ __out += '</div>';
277
173
  rowIndex++;
278
174
  }
279
175
 
280
- _$_.output_push('<!--]-->');
176
+ __out += '<!--]-->';
281
177
  }
282
178
 
283
- _$_.output_push('</div>');
179
+ __out += '</div>';
180
+ _$_.output_push(__out);
284
181
  });
285
182
  });
286
183
  }
@@ -290,28 +187,16 @@ export function EmptyForLoop() {
290
187
  const items = [];
291
188
 
292
189
  _$_.regular_block(() => {
293
- _$_.output_push('<div');
294
- _$_.output_push(' class="container"');
295
- _$_.output_push('>');
296
-
297
- {
298
- _$_.output_push('<!--[-->');
299
-
300
- for (const item of items) {
301
- _$_.output_push('<span');
302
- _$_.output_push('>');
190
+ let __out = '';
303
191
 
304
- {
305
- _$_.output_push(_$_.escape(item));
306
- }
307
-
308
- _$_.output_push('</span>');
309
- }
192
+ __out += '<div class="container"><!--[-->';
310
193
 
311
- _$_.output_push('<!--]-->');
194
+ for (const item of items) {
195
+ __out += '<span>' + _$_.escape(item) + '</span>';
312
196
  }
313
197
 
314
- _$_.output_push('</div>');
198
+ __out += '<!--]--></div>';
199
+ _$_.output_push(__out);
315
200
  });
316
201
  });
317
202
  }
@@ -324,45 +209,16 @@ export function ForLoopComplexObjects() {
324
209
  ];
325
210
 
326
211
  _$_.regular_block(() => {
327
- _$_.output_push('<div');
328
- _$_.output_push('>');
329
-
330
- {
331
- _$_.output_push('<!--[-->');
332
-
333
- for (const user of users) {
334
- _$_.output_push('<div');
335
- _$_.output_push(_$_.attr('class', `user-${user.id}`));
336
- _$_.output_push('>');
337
-
338
- {
339
- _$_.output_push('<span');
340
- _$_.output_push(' class="name"');
341
- _$_.output_push('>');
342
-
343
- {
344
- _$_.output_push(_$_.escape(user.name));
345
- }
212
+ let __out = '';
346
213
 
347
- _$_.output_push('</span>');
348
- _$_.output_push('<span');
349
- _$_.output_push(' class="role"');
350
- _$_.output_push('>');
214
+ __out += '<div><!--[-->';
351
215
 
352
- {
353
- _$_.output_push(_$_.escape(user.role));
354
- }
355
-
356
- _$_.output_push('</span>');
357
- }
358
-
359
- _$_.output_push('</div>');
360
- }
361
-
362
- _$_.output_push('<!--]-->');
216
+ for (const user of users) {
217
+ __out += '<div' + _$_.attr('class', `user-${user.id}`) + '><span class="name">' + _$_.escape(user.name) + '</span><span class="role">' + _$_.escape(user.role) + '</span></div>';
363
218
  }
364
219
 
365
- _$_.output_push('</div>');
220
+ __out += '<!--]--></div>';
221
+ _$_.output_push(__out);
366
222
  });
367
223
  });
368
224
  }
@@ -379,39 +235,16 @@ export function KeyedForLoopReorder() {
379
235
  );
380
236
 
381
237
  _$_.regular_block(() => {
382
- {
383
- _$_.output_push('<button');
384
- _$_.output_push(' class="reorder"');
385
- _$_.output_push('>');
238
+ let __out = '';
386
239
 
387
- {
388
- _$_.output_push('Reorder');
389
- }
240
+ __out += '<button class="reorder">Reorder</button><ul><!--[-->';
390
241
 
391
- _$_.output_push('</button>');
392
- _$_.output_push('<ul');
393
- _$_.output_push('>');
394
-
395
- {
396
- _$_.output_push('<!--[-->');
397
-
398
- for (const item of lazy_3.value) {
399
- _$_.output_push('<li');
400
- _$_.output_push(_$_.attr('class', `item-${item.id}`));
401
- _$_.output_push('>');
402
-
403
- {
404
- _$_.output_push(_$_.escape(item.name));
405
- }
406
-
407
- _$_.output_push('</li>');
408
- }
409
-
410
- _$_.output_push('<!--]-->');
411
- }
412
-
413
- _$_.output_push('</ul>');
242
+ for (const item of lazy_3.value) {
243
+ __out += '<li' + _$_.attr('class', `item-${item.id}`) + '>' + _$_.escape(item.name) + '</li>';
414
244
  }
245
+
246
+ __out += '<!--]--></ul>';
247
+ _$_.output_push(__out);
415
248
  });
416
249
  });
417
250
  }
@@ -421,39 +254,16 @@ export function KeyedForLoopUpdate() {
421
254
  let lazy_4 = _$_.track([{ id: 1, name: 'Item 1' }, { id: 2, name: 'Item 2' }], '7a2c2ada');
422
255
 
423
256
  _$_.regular_block(() => {
424
- {
425
- _$_.output_push('<button');
426
- _$_.output_push(' class="update"');
427
- _$_.output_push('>');
428
-
429
- {
430
- _$_.output_push('Update');
431
- }
432
-
433
- _$_.output_push('</button>');
434
- _$_.output_push('<ul');
435
- _$_.output_push('>');
436
-
437
- {
438
- _$_.output_push('<!--[-->');
439
-
440
- for (const item of lazy_4.value) {
441
- _$_.output_push('<li');
442
- _$_.output_push(_$_.attr('class', `item-${item.id}`));
443
- _$_.output_push('>');
257
+ let __out = '';
444
258
 
445
- {
446
- _$_.output_push(_$_.escape(item.name));
447
- }
448
-
449
- _$_.output_push('</li>');
450
- }
451
-
452
- _$_.output_push('<!--]-->');
453
- }
259
+ __out += '<button class="update">Update</button><ul><!--[-->';
454
260
 
455
- _$_.output_push('</ul>');
261
+ for (const item of lazy_4.value) {
262
+ __out += '<li' + _$_.attr('class', `item-${item.id}`) + '>' + _$_.escape(item.name) + '</li>';
456
263
  }
264
+
265
+ __out += '<!--]--></ul>';
266
+ _$_.output_push(__out);
457
267
  });
458
268
  });
459
269
  }
@@ -463,39 +273,16 @@ export function ForLoopMixedOperations() {
463
273
  let lazy_5 = _$_.track(['A', 'B', 'C', 'D'], '3dd7c7b6');
464
274
 
465
275
  _$_.regular_block(() => {
466
- {
467
- _$_.output_push('<button');
468
- _$_.output_push(' class="shuffle"');
469
- _$_.output_push('>');
470
-
471
- {
472
- _$_.output_push('Shuffle');
473
- }
474
-
475
- _$_.output_push('</button>');
476
- _$_.output_push('<ul');
477
- _$_.output_push('>');
478
-
479
- {
480
- _$_.output_push('<!--[-->');
481
-
482
- for (const item of lazy_5.value) {
483
- _$_.output_push('<li');
484
- _$_.output_push(_$_.attr('class', `item-${item}`));
485
- _$_.output_push('>');
486
-
487
- {
488
- _$_.output_push(_$_.escape(item));
489
- }
276
+ let __out = '';
490
277
 
491
- _$_.output_push('</li>');
492
- }
493
-
494
- _$_.output_push('<!--]-->');
495
- }
278
+ __out += '<button class="shuffle">Shuffle</button><ul><!--[-->';
496
279
 
497
- _$_.output_push('</ul>');
280
+ for (const item of lazy_5.value) {
281
+ __out += '<li' + _$_.attr('class', `item-${item}`) + '>' + _$_.escape(item) + '</li>';
498
282
  }
283
+
284
+ __out += '<!--]--></ul>';
285
+ _$_.output_push(__out);
499
286
  });
500
287
  });
501
288
  }
@@ -506,54 +293,22 @@ export function ForLoopInsideIf() {
506
293
  let lazy_7 = _$_.track(['X', 'Y', 'Z'], 'bf375103');
507
294
 
508
295
  _$_.regular_block(() => {
509
- {
510
- _$_.output_push('<button');
511
- _$_.output_push(' class="toggle"');
512
- _$_.output_push('>');
513
-
514
- {
515
- _$_.output_push('Toggle List');
516
- }
517
-
518
- _$_.output_push('</button>');
519
- _$_.output_push('<button');
520
- _$_.output_push(' class="add"');
521
- _$_.output_push('>');
522
-
523
- {
524
- _$_.output_push('Add Item');
525
- }
526
-
527
- _$_.output_push('</button>');
528
- _$_.output_push('<!--[-->');
529
-
530
- if (lazy_6.value) {
531
- _$_.output_push('<ul');
532
- _$_.output_push(' class="list"');
533
- _$_.output_push('>');
296
+ let __out = '';
534
297
 
535
- {
536
- _$_.output_push('<!--[-->');
537
-
538
- for (const item of lazy_7.value) {
539
- _$_.output_push('<li');
540
- _$_.output_push('>');
298
+ __out += '<button class="toggle">Toggle List</button><button class="add">Add Item</button><!--[-->';
541
299
 
542
- {
543
- _$_.output_push(_$_.escape(item));
544
- }
300
+ if (lazy_6.value) {
301
+ __out += '<ul class="list"><!--[-->';
545
302
 
546
- _$_.output_push('</li>');
547
- }
548
-
549
- _$_.output_push('<!--]-->');
550
- }
551
-
552
- _$_.output_push('</ul>');
303
+ for (const item of lazy_7.value) {
304
+ __out += '<li>' + _$_.escape(item) + '</li>';
553
305
  }
554
306
 
555
- _$_.output_push('<!--]-->');
307
+ __out += '<!--]--></ul>';
556
308
  }
309
+
310
+ __out += '<!--]-->';
311
+ _$_.output_push(__out);
557
312
  });
558
313
  });
559
314
  }
@@ -563,39 +318,16 @@ export function ForLoopEmptyToPopulated() {
563
318
  let lazy_8 = _$_.track([], '525c5dbc');
564
319
 
565
320
  _$_.regular_block(() => {
566
- {
567
- _$_.output_push('<button');
568
- _$_.output_push(' class="populate"');
569
- _$_.output_push('>');
570
-
571
- {
572
- _$_.output_push('Populate');
573
- }
574
-
575
- _$_.output_push('</button>');
576
- _$_.output_push('<ul');
577
- _$_.output_push(' class="list"');
578
- _$_.output_push('>');
579
-
580
- {
581
- _$_.output_push('<!--[-->');
582
-
583
- for (const item of lazy_8.value) {
584
- _$_.output_push('<li');
585
- _$_.output_push('>');
586
-
587
- {
588
- _$_.output_push(_$_.escape(item));
589
- }
590
-
591
- _$_.output_push('</li>');
592
- }
321
+ let __out = '';
593
322
 
594
- _$_.output_push('<!--]-->');
595
- }
323
+ __out += '<button class="populate">Populate</button><ul class="list"><!--[-->';
596
324
 
597
- _$_.output_push('</ul>');
325
+ for (const item of lazy_8.value) {
326
+ __out += '<li>' + _$_.escape(item) + '</li>';
598
327
  }
328
+
329
+ __out += '<!--]--></ul>';
330
+ _$_.output_push(__out);
599
331
  });
600
332
  });
601
333
  }
@@ -605,39 +337,16 @@ export function ForLoopPopulatedToEmpty() {
605
337
  let lazy_9 = _$_.track(['One', 'Two', 'Three'], 'ee47f078');
606
338
 
607
339
  _$_.regular_block(() => {
608
- {
609
- _$_.output_push('<button');
610
- _$_.output_push(' class="clear"');
611
- _$_.output_push('>');
612
-
613
- {
614
- _$_.output_push('Clear');
615
- }
616
-
617
- _$_.output_push('</button>');
618
- _$_.output_push('<ul');
619
- _$_.output_push(' class="list"');
620
- _$_.output_push('>');
621
-
622
- {
623
- _$_.output_push('<!--[-->');
624
-
625
- for (const item of lazy_9.value) {
626
- _$_.output_push('<li');
627
- _$_.output_push('>');
628
-
629
- {
630
- _$_.output_push(_$_.escape(item));
631
- }
632
-
633
- _$_.output_push('</li>');
634
- }
340
+ let __out = '';
635
341
 
636
- _$_.output_push('<!--]-->');
637
- }
342
+ __out += '<button class="clear">Clear</button><ul class="list"><!--[-->';
638
343
 
639
- _$_.output_push('</ul>');
344
+ for (const item of lazy_9.value) {
345
+ __out += '<li>' + _$_.escape(item) + '</li>';
640
346
  }
347
+
348
+ __out += '<!--]--></ul>';
349
+ _$_.output_push(__out);
641
350
  });
642
351
  });
643
352
  }
@@ -647,75 +356,40 @@ export function NestedForLoopReactive() {
647
356
  let lazy_10 = _$_.track([[1, 2], [3, 4]], 'a2f41fb3');
648
357
 
649
358
  _$_.regular_block(() => {
650
- _$_.output_push('<div');
651
- _$_.output_push(' class="nested-for-reactive"');
652
- _$_.output_push('>');
359
+ let __out = '';
653
360
 
654
- {
655
- _$_.output_push('<button');
656
- _$_.output_push(' class="add-row"');
657
- _$_.output_push('>');
361
+ __out += '<div class="nested-for-reactive"><button class="add-row">Add Row</button><button class="update-cell">Update Cell</button><div class="grid">';
658
362
 
659
- {
660
- _$_.output_push('Add Row');
661
- }
662
-
663
- _$_.output_push('</button>');
664
- _$_.output_push('<button');
665
- _$_.output_push(' class="update-cell"');
666
- _$_.output_push('>');
667
-
668
- {
669
- _$_.output_push('Update Cell');
670
- }
671
-
672
- _$_.output_push('</button>');
673
- _$_.output_push('<div');
674
- _$_.output_push(' class="grid"');
675
- _$_.output_push('>');
676
-
677
- {
678
- _$_.output_push('<!--[-->');
679
-
680
- var rowIndex = 0;
681
-
682
- for (const row of lazy_10.value) {
683
- _$_.output_push('<div');
684
- _$_.output_push(_$_.attr('class', `row-${rowIndex}`));
685
- _$_.output_push('>');
686
-
687
- {
688
- _$_.output_push('<!--[-->');
363
+ {
364
+ __out += '<!--[-->';
689
365
 
690
- var colIndex = 0;
366
+ var rowIndex = 0;
691
367
 
692
- for (const cell of row) {
693
- _$_.output_push('<span');
694
- _$_.output_push(_$_.attr('class', `cell-${rowIndex}-${colIndex}`));
695
- _$_.output_push('>');
368
+ for (const row of lazy_10.value) {
369
+ __out += '<div' + _$_.attr('class', `row-${rowIndex}`) + '>';
696
370
 
697
- {
698
- _$_.output_push(_$_.escape(cell));
699
- }
371
+ {
372
+ __out += '<!--[-->';
700
373
 
701
- _$_.output_push('</span>');
702
- colIndex++;
703
- }
374
+ var colIndex = 0;
704
375
 
705
- _$_.output_push('<!--]-->');
376
+ for (const cell of row) {
377
+ __out += '<span' + _$_.attr('class', `cell-${rowIndex}-${colIndex}`) + '>' + _$_.escape(cell) + '</span>';
378
+ colIndex++;
706
379
  }
707
380
 
708
- _$_.output_push('</div>');
709
- rowIndex++;
381
+ __out += '<!--]-->';
710
382
  }
711
383
 
712
- _$_.output_push('<!--]-->');
384
+ __out += '</div>';
385
+ rowIndex++;
713
386
  }
714
387
 
715
- _$_.output_push('</div>');
388
+ __out += '<!--]-->';
716
389
  }
717
390
 
718
- _$_.output_push('</div>');
391
+ __out += '</div></div>';
392
+ _$_.output_push(__out);
719
393
  });
720
394
  });
721
395
  }
@@ -740,82 +414,28 @@ export function ForLoopDeeplyNested() {
740
414
  ];
741
415
 
742
416
  _$_.regular_block(() => {
743
- _$_.output_push('<div');
744
- _$_.output_push(' class="org"');
745
- _$_.output_push('>');
746
-
747
- {
748
- _$_.output_push('<!--[-->');
749
-
750
- for (const dept of departments) {
751
- _$_.output_push('<div');
752
- _$_.output_push(_$_.attr('class', `dept-${dept.id}`));
753
- _$_.output_push('>');
754
-
755
- {
756
- _$_.output_push('<h2');
757
- _$_.output_push(' class="dept-name"');
758
- _$_.output_push('>');
759
-
760
- {
761
- _$_.output_push(_$_.escape(dept.name));
762
- }
763
-
764
- _$_.output_push('</h2>');
765
- _$_.output_push('<!--[-->');
417
+ let __out = '';
766
418
 
767
- for (const team of dept.teams) {
768
- _$_.output_push('<div');
769
- _$_.output_push(_$_.attr('class', `team-${team.id}`));
770
- _$_.output_push('>');
419
+ __out += '<div class="org"><!--[-->';
771
420
 
772
- {
773
- _$_.output_push('<h3');
774
- _$_.output_push(' class="team-name"');
775
- _$_.output_push('>');
421
+ for (const dept of departments) {
422
+ __out += '<div' + _$_.attr('class', `dept-${dept.id}`) + '><h2 class="dept-name">' + _$_.escape(dept.name) + '</h2><!--[-->';
776
423
 
777
- {
778
- _$_.output_push(_$_.escape(team.name));
779
- }
424
+ for (const team of dept.teams) {
425
+ __out += '<div' + _$_.attr('class', `team-${team.id}`) + '><h3 class="team-name">' + _$_.escape(team.name) + '</h3><ul><!--[-->';
780
426
 
781
- _$_.output_push('</h3>');
782
- _$_.output_push('<ul');
783
- _$_.output_push('>');
784
-
785
- {
786
- _$_.output_push('<!--[-->');
787
-
788
- for (const member of team.members) {
789
- _$_.output_push('<li');
790
- _$_.output_push(' class="member"');
791
- _$_.output_push('>');
792
-
793
- {
794
- _$_.output_push(_$_.escape(member));
795
- }
796
-
797
- _$_.output_push('</li>');
798
- }
799
-
800
- _$_.output_push('<!--]-->');
801
- }
802
-
803
- _$_.output_push('</ul>');
804
- }
805
-
806
- _$_.output_push('</div>');
807
- }
808
-
809
- _$_.output_push('<!--]-->');
427
+ for (const member of team.members) {
428
+ __out += '<li class="member">' + _$_.escape(member) + '</li>';
810
429
  }
811
430
 
812
- _$_.output_push('</div>');
431
+ __out += '<!--]--></ul></div>';
813
432
  }
814
433
 
815
- _$_.output_push('<!--]-->');
434
+ __out += '<!--]--></div>';
816
435
  }
817
436
 
818
- _$_.output_push('</div>');
437
+ __out += '<!--]--></div>';
438
+ _$_.output_push(__out);
819
439
  });
820
440
  });
821
441
  }
@@ -825,42 +445,25 @@ export function ForLoopIndexUpdate() {
825
445
  let lazy_11 = _$_.track(['First', 'Second', 'Third'], 'f61e31e6');
826
446
 
827
447
  _$_.regular_block(() => {
828
- {
829
- _$_.output_push('<button');
830
- _$_.output_push(' class="prepend"');
831
- _$_.output_push('>');
832
-
833
- {
834
- _$_.output_push('Prepend');
835
- }
836
-
837
- _$_.output_push('</button>');
838
- _$_.output_push('<ul');
839
- _$_.output_push('>');
840
-
841
- {
842
- _$_.output_push('<!--[-->');
843
-
844
- var i = 0;
448
+ let __out = '';
845
449
 
846
- for (const item of lazy_11.value) {
847
- _$_.output_push('<li');
848
- _$_.output_push(_$_.attr('class', `item-${i}`));
849
- _$_.output_push('>');
450
+ __out += '<button class="prepend">Prepend</button><ul>';
850
451
 
851
- {
852
- _$_.output_push(_$_.escape(`[${i}] ${item}`));
853
- }
452
+ {
453
+ __out += '<!--[-->';
854
454
 
855
- _$_.output_push('</li>');
856
- i++;
857
- }
455
+ var i = 0;
858
456
 
859
- _$_.output_push('<!--]-->');
457
+ for (const item of lazy_11.value) {
458
+ __out += '<li' + _$_.attr('class', `item-${i}`) + '>' + _$_.escape(`[${i}] ${item}`) + '</li>';
459
+ i++;
860
460
  }
861
461
 
862
- _$_.output_push('</ul>');
462
+ __out += '<!--]-->';
863
463
  }
464
+
465
+ __out += '</ul>';
466
+ _$_.output_push(__out);
864
467
  });
865
468
  });
866
469
  }
@@ -877,43 +480,25 @@ export function KeyedForLoopWithIndex() {
877
480
  );
878
481
 
879
482
  _$_.regular_block(() => {
880
- {
881
- _$_.output_push('<button');
882
- _$_.output_push(' class="reorder"');
883
- _$_.output_push('>');
884
-
885
- {
886
- _$_.output_push('Rotate');
887
- }
483
+ let __out = '';
888
484
 
889
- _$_.output_push('</button>');
890
- _$_.output_push('<ul');
891
- _$_.output_push('>');
485
+ __out += '<button class="reorder">Rotate</button><ul>';
892
486
 
893
- {
894
- _$_.output_push('<!--[-->');
895
-
896
- var i = 0;
897
-
898
- for (const item of lazy_12.value) {
899
- _$_.output_push('<li');
900
- _$_.output_push(_$_.attr('data-index', i, false));
901
- _$_.output_push(_$_.attr('class', `item-${item.id}`));
902
- _$_.output_push('>');
903
-
904
- {
905
- _$_.output_push(_$_.escape(`[${i}] ${item.id}: ${item.value}`));
906
- }
487
+ {
488
+ __out += '<!--[-->';
907
489
 
908
- _$_.output_push('</li>');
909
- i++;
910
- }
490
+ var i = 0;
911
491
 
912
- _$_.output_push('<!--]-->');
492
+ for (const item of lazy_12.value) {
493
+ __out += '<li' + _$_.attr('data-index', i, false) + _$_.attr('class', `item-${item.id}`) + '>' + _$_.escape(`[${i}] ${item.id}: ${item.value}`) + '</li>';
494
+ i++;
913
495
  }
914
496
 
915
- _$_.output_push('</ul>');
497
+ __out += '<!--]-->';
916
498
  }
499
+
500
+ __out += '</ul>';
501
+ _$_.output_push(__out);
917
502
  });
918
503
  });
919
504
  }
@@ -923,58 +508,16 @@ export function ForLoopWithSiblings() {
923
508
  let lazy_13 = _$_.track(['A', 'B'], '3c7e8152');
924
509
 
925
510
  _$_.regular_block(() => {
926
- {
927
- _$_.output_push('<div');
928
- _$_.output_push(' class="wrapper"');
929
- _$_.output_push('>');
930
-
931
- {
932
- _$_.output_push('<header');
933
- _$_.output_push(' class="before"');
934
- _$_.output_push('>');
935
-
936
- {
937
- _$_.output_push('Before');
938
- }
939
-
940
- _$_.output_push('</header>');
941
- _$_.output_push('<!--[-->');
511
+ let __out = '';
942
512
 
943
- for (const item of lazy_13.value) {
944
- _$_.output_push('<div');
945
- _$_.output_push(_$_.attr('class', `item-${item}`));
946
- _$_.output_push('>');
513
+ __out += '<div class="wrapper"><header class="before">Before</header><!--[-->';
947
514
 
948
- {
949
- _$_.output_push(_$_.escape(item));
950
- }
951
-
952
- _$_.output_push('</div>');
953
- }
954
-
955
- _$_.output_push('<!--]-->');
956
- _$_.output_push('<footer');
957
- _$_.output_push(' class="after"');
958
- _$_.output_push('>');
959
-
960
- {
961
- _$_.output_push('After');
962
- }
963
-
964
- _$_.output_push('</footer>');
965
- }
966
-
967
- _$_.output_push('</div>');
968
- _$_.output_push('<button');
969
- _$_.output_push(' class="add"');
970
- _$_.output_push('>');
971
-
972
- {
973
- _$_.output_push('Add');
974
- }
975
-
976
- _$_.output_push('</button>');
515
+ for (const item of lazy_13.value) {
516
+ __out += '<div' + _$_.attr('class', `item-${item}`) + '>' + _$_.escape(item) + '</div>';
977
517
  }
518
+
519
+ __out += '<!--]--><footer class="after">After</footer></div><button class="add">Add</button>';
520
+ _$_.output_push(__out);
978
521
  });
979
522
  });
980
523
  }
@@ -988,25 +531,23 @@ export function ForLoopItemState() {
988
531
  ];
989
532
 
990
533
  _$_.regular_block(() => {
991
- _$_.output_push('<div');
992
- _$_.output_push('>');
534
+ let __out = '';
993
535
 
994
- {
995
- _$_.output_push('<!--[-->');
536
+ __out += '<div><!--[-->';
996
537
 
997
- for (const item of initialItems) {
998
- {
999
- const comp = TodoItem;
1000
- const args = [{ id: item.id, text: item.text }];
538
+ for (const item of initialItems) {
539
+ {
540
+ const comp = TodoItem;
541
+ const args = [{ id: item.id, text: item.text }];
1001
542
 
1002
- _$_.render_component(comp, ...args);
1003
- }
543
+ _$_.output_push(__out);
544
+ __out = '';
545
+ _$_.render_component(comp, ...args);
1004
546
  }
1005
-
1006
- _$_.output_push('<!--]-->');
1007
547
  }
1008
548
 
1009
- _$_.output_push('</div>');
549
+ __out += '<!--]--></div>';
550
+ _$_.output_push(__out);
1010
551
  });
1011
552
  });
1012
553
  }
@@ -1016,28 +557,10 @@ function TodoItem(props) {
1016
557
  let lazy_14 = _$_.track(false, '4f2402a4');
1017
558
 
1018
559
  _$_.regular_block(() => {
1019
- _$_.output_push('<div');
1020
- _$_.output_push(_$_.attr('class', `todo-${props.id}`));
1021
- _$_.output_push('>');
1022
-
1023
- {
1024
- _$_.output_push('<input');
1025
- _$_.output_push(' type="checkbox"');
1026
- _$_.output_push(_$_.attr('checked', lazy_14.value, true));
1027
- _$_.output_push(' class="checkbox"');
1028
- _$_.output_push(' />');
1029
- _$_.output_push('<span');
1030
- _$_.output_push(_$_.attr('class', lazy_14.value ? 'completed' : 'pending'));
1031
- _$_.output_push('>');
560
+ let __out = '';
1032
561
 
1033
- {
1034
- _$_.output_push(_$_.escape(props.text));
1035
- }
1036
-
1037
- _$_.output_push('</span>');
1038
- }
1039
-
1040
- _$_.output_push('</div>');
562
+ __out += '<div' + _$_.attr('class', `todo-${props.id}`) + '><input type="checkbox"' + _$_.attr('checked', lazy_14.value, true) + ' class="checkbox" /><span' + _$_.attr('class', lazy_14.value ? 'completed' : 'pending') + '>' + _$_.escape(props.text) + '</span></div>';
563
+ _$_.output_push(__out);
1041
564
  });
1042
565
  });
1043
566
  }
@@ -1047,28 +570,16 @@ export function ForLoopSingleItem() {
1047
570
  const items = ['Only'];
1048
571
 
1049
572
  _$_.regular_block(() => {
1050
- _$_.output_push('<ul');
1051
- _$_.output_push('>');
1052
-
1053
- {
1054
- _$_.output_push('<!--[-->');
1055
-
1056
- for (const item of items) {
1057
- _$_.output_push('<li');
1058
- _$_.output_push(' class="single"');
1059
- _$_.output_push('>');
1060
-
1061
- {
1062
- _$_.output_push(_$_.escape(item));
1063
- }
573
+ let __out = '';
1064
574
 
1065
- _$_.output_push('</li>');
1066
- }
575
+ __out += '<ul><!--[-->';
1067
576
 
1068
- _$_.output_push('<!--]-->');
577
+ for (const item of items) {
578
+ __out += '<li class="single">' + _$_.escape(item) + '</li>';
1069
579
  }
1070
580
 
1071
- _$_.output_push('</ul>');
581
+ __out += '<!--]--></ul>';
582
+ _$_.output_push(__out);
1072
583
  });
1073
584
  });
1074
585
  }
@@ -1078,39 +589,16 @@ export function ForLoopAddAtBeginning() {
1078
589
  let lazy_15 = _$_.track(['B', 'C'], '1561403a');
1079
590
 
1080
591
  _$_.regular_block(() => {
1081
- {
1082
- _$_.output_push('<button');
1083
- _$_.output_push(' class="prepend"');
1084
- _$_.output_push('>');
1085
-
1086
- {
1087
- _$_.output_push('Prepend A');
1088
- }
1089
-
1090
- _$_.output_push('</button>');
1091
- _$_.output_push('<ul');
1092
- _$_.output_push('>');
1093
-
1094
- {
1095
- _$_.output_push('<!--[-->');
1096
-
1097
- for (const item of lazy_15.value) {
1098
- _$_.output_push('<li');
1099
- _$_.output_push(_$_.attr('class', `item-${item}`));
1100
- _$_.output_push('>');
1101
-
1102
- {
1103
- _$_.output_push(_$_.escape(item));
1104
- }
1105
-
1106
- _$_.output_push('</li>');
1107
- }
592
+ let __out = '';
1108
593
 
1109
- _$_.output_push('<!--]-->');
1110
- }
594
+ __out += '<button class="prepend">Prepend A</button><ul><!--[-->';
1111
595
 
1112
- _$_.output_push('</ul>');
596
+ for (const item of lazy_15.value) {
597
+ __out += '<li' + _$_.attr('class', `item-${item}`) + '>' + _$_.escape(item) + '</li>';
1113
598
  }
599
+
600
+ __out += '<!--]--></ul>';
601
+ _$_.output_push(__out);
1114
602
  });
1115
603
  });
1116
604
  }
@@ -1120,39 +608,16 @@ export function ForLoopAddInMiddle() {
1120
608
  let lazy_16 = _$_.track(['A', 'C'], '1bc60b46');
1121
609
 
1122
610
  _$_.regular_block(() => {
1123
- {
1124
- _$_.output_push('<button');
1125
- _$_.output_push(' class="insert"');
1126
- _$_.output_push('>');
1127
-
1128
- {
1129
- _$_.output_push('Insert B');
1130
- }
1131
-
1132
- _$_.output_push('</button>');
1133
- _$_.output_push('<ul');
1134
- _$_.output_push('>');
1135
-
1136
- {
1137
- _$_.output_push('<!--[-->');
1138
-
1139
- for (const item of lazy_16.value) {
1140
- _$_.output_push('<li');
1141
- _$_.output_push(_$_.attr('class', `item-${item}`));
1142
- _$_.output_push('>');
1143
-
1144
- {
1145
- _$_.output_push(_$_.escape(item));
1146
- }
611
+ let __out = '';
1147
612
 
1148
- _$_.output_push('</li>');
1149
- }
613
+ __out += '<button class="insert">Insert B</button><ul><!--[-->';
1150
614
 
1151
- _$_.output_push('<!--]-->');
1152
- }
1153
-
1154
- _$_.output_push('</ul>');
615
+ for (const item of lazy_16.value) {
616
+ __out += '<li' + _$_.attr('class', `item-${item}`) + '>' + _$_.escape(item) + '</li>';
1155
617
  }
618
+
619
+ __out += '<!--]--></ul>';
620
+ _$_.output_push(__out);
1156
621
  });
1157
622
  });
1158
623
  }
@@ -1162,39 +627,16 @@ export function ForLoopRemoveFromMiddle() {
1162
627
  let lazy_17 = _$_.track(['A', 'B', 'C'], '1c87f95f');
1163
628
 
1164
629
  _$_.regular_block(() => {
1165
- {
1166
- _$_.output_push('<button');
1167
- _$_.output_push(' class="remove-middle"');
1168
- _$_.output_push('>');
1169
-
1170
- {
1171
- _$_.output_push('Remove B');
1172
- }
1173
-
1174
- _$_.output_push('</button>');
1175
- _$_.output_push('<ul');
1176
- _$_.output_push('>');
1177
-
1178
- {
1179
- _$_.output_push('<!--[-->');
1180
-
1181
- for (const item of lazy_17.value) {
1182
- _$_.output_push('<li');
1183
- _$_.output_push(_$_.attr('class', `item-${item}`));
1184
- _$_.output_push('>');
630
+ let __out = '';
1185
631
 
1186
- {
1187
- _$_.output_push(_$_.escape(item));
1188
- }
632
+ __out += '<button class="remove-middle">Remove B</button><ul><!--[-->';
1189
633
 
1190
- _$_.output_push('</li>');
1191
- }
1192
-
1193
- _$_.output_push('<!--]-->');
1194
- }
1195
-
1196
- _$_.output_push('</ul>');
634
+ for (const item of lazy_17.value) {
635
+ __out += '<li' + _$_.attr('class', `item-${item}`) + '>' + _$_.escape(item) + '</li>';
1197
636
  }
637
+
638
+ __out += '<!--]--></ul>';
639
+ _$_.output_push(__out);
1198
640
  });
1199
641
  });
1200
642
  }
@@ -1204,32 +646,25 @@ export function ForLoopLargeList() {
1204
646
  const items = Array.from({ length: 50 }, (_, i) => `Item ${i + 1}`);
1205
647
 
1206
648
  _$_.regular_block(() => {
1207
- _$_.output_push('<ul');
1208
- _$_.output_push(' class="large-list"');
1209
- _$_.output_push('>');
649
+ let __out = '';
650
+
651
+ __out += '<ul class="large-list">';
1210
652
 
1211
653
  {
1212
- _$_.output_push('<!--[-->');
654
+ __out += '<!--[-->';
1213
655
 
1214
656
  var i = 0;
1215
657
 
1216
658
  for (const item of items) {
1217
- _$_.output_push('<li');
1218
- _$_.output_push(_$_.attr('class', `item-${i}`));
1219
- _$_.output_push('>');
1220
-
1221
- {
1222
- _$_.output_push(_$_.escape(item));
1223
- }
1224
-
1225
- _$_.output_push('</li>');
659
+ __out += '<li' + _$_.attr('class', `item-${i}`) + '>' + _$_.escape(item) + '</li>';
1226
660
  i++;
1227
661
  }
1228
662
 
1229
- _$_.output_push('<!--]-->');
663
+ __out += '<!--]-->';
1230
664
  }
1231
665
 
1232
- _$_.output_push('</ul>');
666
+ __out += '</ul>';
667
+ _$_.output_push(__out);
1233
668
  });
1234
669
  });
1235
670
  }
@@ -1239,39 +674,16 @@ export function ForLoopSwap() {
1239
674
  let lazy_18 = _$_.track(['A', 'B', 'C', 'D'], '5f8d152f');
1240
675
 
1241
676
  _$_.regular_block(() => {
1242
- {
1243
- _$_.output_push('<button');
1244
- _$_.output_push(' class="swap"');
1245
- _$_.output_push('>');
1246
-
1247
- {
1248
- _$_.output_push('Swap First and Last');
1249
- }
1250
-
1251
- _$_.output_push('</button>');
1252
- _$_.output_push('<ul');
1253
- _$_.output_push('>');
1254
-
1255
- {
1256
- _$_.output_push('<!--[-->');
1257
-
1258
- for (const item of lazy_18.value) {
1259
- _$_.output_push('<li');
1260
- _$_.output_push(_$_.attr('class', `item-${item}`));
1261
- _$_.output_push('>');
1262
-
1263
- {
1264
- _$_.output_push(_$_.escape(item));
1265
- }
677
+ let __out = '';
1266
678
 
1267
- _$_.output_push('</li>');
1268
- }
679
+ __out += '<button class="swap">Swap First and Last</button><ul><!--[-->';
1269
680
 
1270
- _$_.output_push('<!--]-->');
1271
- }
1272
-
1273
- _$_.output_push('</ul>');
681
+ for (const item of lazy_18.value) {
682
+ __out += '<li' + _$_.attr('class', `item-${item}`) + '>' + _$_.escape(item) + '</li>';
1274
683
  }
684
+
685
+ __out += '<!--]--></ul>';
686
+ _$_.output_push(__out);
1275
687
  });
1276
688
  });
1277
689
  }
@@ -1281,39 +693,16 @@ export function ForLoopReverse() {
1281
693
  let lazy_19 = _$_.track(['A', 'B', 'C', 'D'], '24602e64');
1282
694
 
1283
695
  _$_.regular_block(() => {
1284
- {
1285
- _$_.output_push('<button');
1286
- _$_.output_push(' class="reverse"');
1287
- _$_.output_push('>');
1288
-
1289
- {
1290
- _$_.output_push('Reverse');
1291
- }
1292
-
1293
- _$_.output_push('</button>');
1294
- _$_.output_push('<ul');
1295
- _$_.output_push('>');
1296
-
1297
- {
1298
- _$_.output_push('<!--[-->');
1299
-
1300
- for (const item of lazy_19.value) {
1301
- _$_.output_push('<li');
1302
- _$_.output_push(_$_.attr('class', `item-${item}`));
1303
- _$_.output_push('>');
696
+ let __out = '';
1304
697
 
1305
- {
1306
- _$_.output_push(_$_.escape(item));
1307
- }
698
+ __out += '<button class="reverse">Reverse</button><ul><!--[-->';
1308
699
 
1309
- _$_.output_push('</li>');
1310
- }
1311
-
1312
- _$_.output_push('<!--]-->');
1313
- }
1314
-
1315
- _$_.output_push('</ul>');
700
+ for (const item of lazy_19.value) {
701
+ __out += '<li' + _$_.attr('class', `item-${item}`) + '>' + _$_.escape(item) + '</li>';
1316
702
  }
703
+
704
+ __out += '<!--]--></ul>';
705
+ _$_.output_push(__out);
1317
706
  });
1318
707
  });
1319
708
  }