ripple 0.3.11 → 0.3.13

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