ripple 0.3.72 → 0.3.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -0
- package/package.json +3 -3
- package/src/jsx-runtime.d.ts +2 -8
- package/src/runtime/index-client.js +3 -13
- package/src/runtime/internal/client/blocks.js +3 -25
- package/src/runtime/internal/client/for.js +80 -5
- package/src/runtime/internal/client/index.js +0 -2
- package/src/runtime/internal/client/types.d.ts +0 -10
- package/tests/client/__snapshots__/computed-properties.test.tsrx.snap +8 -0
- package/tests/client/__snapshots__/for.test.tsrx.snap +22 -0
- package/tests/client/__snapshots__/html.test.tsrx.snap +4 -0
- package/tests/client/array/array.copy-within.test.tsrx +19 -19
- package/tests/client/array/array.derived.test.tsrx +97 -109
- package/tests/client/array/array.iteration.test.tsrx +28 -28
- package/tests/client/array/array.mutations.test.tsrx +68 -68
- package/tests/client/array/array.static.test.tsrx +82 -92
- package/tests/client/array/array.to-methods.test.tsrx +15 -15
- package/tests/client/async-suspend.test.tsrx +180 -179
- package/tests/client/basic/__snapshots__/basic.attributes.test.tsrx.snap +2 -0
- package/tests/client/basic/__snapshots__/basic.rendering.test.tsrx.snap +4 -0
- package/tests/client/basic/basic.attributes.test.tsrx +273 -317
- package/tests/client/basic/basic.collections.test.tsrx +55 -61
- package/tests/client/basic/basic.components.test.tsrx +196 -218
- package/tests/client/basic/basic.errors.test.tsrx +70 -76
- package/tests/client/basic/basic.events.test.tsrx +80 -85
- package/tests/client/basic/basic.get-set.test.tsrx +54 -64
- package/tests/client/basic/basic.hmr.test.tsrx +15 -19
- package/tests/client/basic/basic.reactivity.test.tsrx +121 -135
- package/tests/client/basic/basic.rendering.test.tsrx +273 -178
- package/tests/client/basic/basic.utilities.test.tsrx +8 -10
- package/tests/client/boundaries.test.tsrx +18 -18
- package/tests/client/compiler/compiler.assignments.test.tsrx +77 -76
- package/tests/client/compiler/compiler.attributes.test.tsrx +18 -14
- package/tests/client/compiler/compiler.basic.test.tsrx +357 -288
- package/tests/client/compiler/compiler.regex.test.tsrx +40 -44
- package/tests/client/compiler/compiler.tracked-access.test.tsrx +57 -38
- package/tests/client/compiler/compiler.try-in-function.test.tsrx +16 -16
- package/tests/client/compiler/compiler.typescript.test.tsrx +4 -3
- package/tests/client/composite/composite.dynamic-components.test.tsrx +41 -44
- package/tests/client/composite/composite.generics.test.tsrx +165 -167
- package/tests/client/composite/composite.props.test.tsrx +66 -74
- package/tests/client/composite/composite.reactivity.test.tsrx +132 -166
- package/tests/client/composite/composite.render.test.tsrx +92 -101
- package/tests/client/computed-properties.test.tsrx +14 -18
- package/tests/client/context.test.tsrx +14 -18
- package/tests/client/css/global-additional-cases.test.tsrx +491 -437
- package/tests/client/css/global-advanced-selectors.test.tsrx +169 -153
- package/tests/client/css/global-at-rules.test.tsrx +71 -66
- package/tests/client/css/global-basic.test.tsrx +105 -98
- package/tests/client/css/global-classes-ids.test.tsrx +128 -114
- package/tests/client/css/global-combinators.test.tsrx +83 -78
- package/tests/client/css/global-complex-nesting.test.tsrx +134 -120
- package/tests/client/css/global-edge-cases.test.tsrx +138 -120
- package/tests/client/css/global-keyframes.test.tsrx +108 -96
- package/tests/client/css/global-nested.test.tsrx +88 -78
- package/tests/client/css/global-pseudo.test.tsrx +104 -98
- package/tests/client/css/global-scoping.test.tsrx +145 -125
- package/tests/client/css/style-identifier.test.tsrx +62 -69
- package/tests/client/date.test.tsrx +83 -83
- package/tests/client/dynamic-elements.test.tsrx +227 -283
- package/tests/client/events.test.tsrx +252 -266
- package/tests/client/for.test.tsrx +120 -127
- package/tests/client/head.test.tsrx +40 -48
- package/tests/client/html.test.tsrx +37 -49
- package/tests/client/input-value.test.tsrx +1125 -1354
- package/tests/client/lazy-array.test.tsrx +10 -16
- package/tests/client/lazy-destructuring.test.tsrx +169 -221
- package/tests/client/map.test.tsrx +39 -41
- package/tests/client/media-query.test.tsrx +15 -19
- package/tests/client/object.test.tsrx +46 -56
- package/tests/client/portal.test.tsrx +31 -37
- package/tests/client/ref.test.tsrx +173 -193
- package/tests/client/return.test.tsrx +62 -37
- package/tests/client/set.test.tsrx +33 -33
- package/tests/client/svg.test.tsrx +195 -215
- package/tests/client/switch.test.tsrx +201 -191
- package/tests/client/track-async-hydration.test.tsrx +14 -18
- package/tests/client/tracked-index-access.test.tsrx +18 -28
- package/tests/client/try.test.tsrx +494 -619
- package/tests/client/tsx.test.tsrx +286 -292
- package/tests/client/typescript-generics.test.tsrx +121 -129
- package/tests/client/url/url.derived.test.tsrx +21 -25
- package/tests/client/url/url.parsing.test.tsrx +35 -35
- package/tests/client/url/url.partial-removal.test.tsrx +32 -32
- package/tests/client/url/url.reactivity.test.tsrx +68 -72
- package/tests/client/url/url.serialization.test.tsrx +8 -8
- package/tests/client/url-search-params/url-search-params.derived.test.tsrx +21 -27
- package/tests/client/url-search-params/url-search-params.initialization.test.tsrx +16 -16
- package/tests/client/url-search-params/url-search-params.iteration.test.tsrx +37 -37
- package/tests/client/url-search-params/url-search-params.mutation.test.tsrx +56 -60
- package/tests/client/url-search-params/url-search-params.retrieval.test.tsrx +32 -34
- package/tests/client/url-search-params/url-search-params.serialization.test.tsrx +9 -9
- package/tests/client/url-search-params/url-search-params.tracked-url.test.tsrx +10 -10
- package/tests/hydration/compiled/client/basic.js +390 -319
- package/tests/hydration/compiled/client/composite.js +52 -44
- package/tests/hydration/compiled/client/for.js +734 -604
- package/tests/hydration/compiled/client/head.js +183 -103
- package/tests/hydration/compiled/client/html.js +93 -86
- package/tests/hydration/compiled/client/if-children.js +95 -71
- package/tests/hydration/compiled/client/if.js +113 -89
- package/tests/hydration/compiled/client/mixed-control-flow.js +225 -209
- package/tests/hydration/compiled/client/nested-control-flow.js +94 -98
- package/tests/hydration/compiled/client/reactivity.js +26 -24
- package/tests/hydration/compiled/client/return.js +8 -42
- package/tests/hydration/compiled/client/switch.js +208 -173
- package/tests/hydration/compiled/client/track-async-serialization.js +176 -128
- package/tests/hydration/compiled/client/try.js +29 -21
- package/tests/hydration/compiled/server/basic.js +210 -221
- package/tests/hydration/compiled/server/composite.js +13 -14
- package/tests/hydration/compiled/server/for.js +427 -444
- package/tests/hydration/compiled/server/head.js +199 -189
- package/tests/hydration/compiled/server/html.js +33 -41
- package/tests/hydration/compiled/server/if-children.js +114 -117
- package/tests/hydration/compiled/server/if.js +77 -83
- package/tests/hydration/compiled/server/mixed-control-flow.js +145 -150
- package/tests/hydration/compiled/server/nested-control-flow.js +10 -0
- package/tests/hydration/compiled/server/reactivity.js +24 -22
- package/tests/hydration/compiled/server/return.js +6 -18
- package/tests/hydration/compiled/server/switch.js +179 -176
- package/tests/hydration/compiled/server/track-async-serialization.js +88 -70
- package/tests/hydration/compiled/server/try.js +31 -35
- package/tests/hydration/components/basic.tsrx +216 -258
- package/tests/hydration/components/composite.tsrx +32 -42
- package/tests/hydration/components/events.tsrx +81 -101
- package/tests/hydration/components/for.tsrx +270 -336
- package/tests/hydration/components/head.tsrx +43 -39
- package/tests/hydration/components/hmr.tsrx +16 -22
- package/tests/hydration/components/html-in-template.tsrx +15 -21
- package/tests/hydration/components/html.tsrx +442 -526
- package/tests/hydration/components/if-children.tsrx +107 -125
- package/tests/hydration/components/if.tsrx +68 -90
- package/tests/hydration/components/mixed-control-flow.tsrx +65 -72
- package/tests/hydration/components/nested-control-flow.tsrx +202 -216
- package/tests/hydration/components/portal.tsrx +33 -41
- package/tests/hydration/components/reactivity.tsrx +26 -34
- package/tests/hydration/components/return.tsrx +4 -6
- package/tests/hydration/components/switch.tsrx +73 -78
- package/tests/hydration/components/track-async-serialization.tsrx +83 -93
- package/tests/hydration/components/try.tsrx +37 -51
- package/tests/hydration/switch.test.js +8 -8
- package/tests/server/await.test.tsrx +3 -3
- package/tests/server/basic.attributes.test.tsrx +117 -162
- package/tests/server/basic.components.test.tsrx +163 -193
- package/tests/server/basic.test.tsrx +298 -198
- package/tests/server/compiler.test.tsrx +142 -72
- package/tests/server/composite.props.test.tsrx +54 -58
- package/tests/server/composite.test.tsrx +165 -167
- package/tests/server/context.test.tsrx +13 -17
- package/tests/server/dynamic-elements.test.tsrx +103 -135
- package/tests/server/for.test.tsrx +115 -84
- package/tests/server/head.test.tsrx +31 -31
- package/tests/server/html-nesting-validation.test.tsrx +16 -8
- package/tests/server/if.test.tsrx +49 -59
- package/tests/server/lazy-destructuring.test.tsrx +288 -366
- package/tests/server/return.test.tsrx +58 -36
- package/tests/server/streaming-ssr.test.tsrx +4 -4
- package/tests/server/style-identifier.test.tsrx +58 -66
- package/tests/server/switch.test.tsrx +89 -97
- package/tests/server/track-async-serialization.test.tsrx +85 -103
- package/tests/server/try.test.tsrx +275 -360
- package/tests/utils/ref-types.test.js +72 -0
- package/tests/utils/vite-plugin-config.test.js +41 -74
- package/types/index.d.ts +1 -0
- package/src/runtime/internal/client/compat.js +0 -40
- package/tests/utils/compiler-compat-config.test.js +0 -38
|
@@ -90,33 +90,32 @@ export function ReactiveIf() {
|
|
|
90
90
|
let lazy = _$_.track(true, '19a16ff0');
|
|
91
91
|
|
|
92
92
|
_$_.regular_block(() => {
|
|
93
|
-
_$_.output_push('<button');
|
|
94
|
-
_$_.output_push(' class="toggle"');
|
|
95
|
-
_$_.output_push('>');
|
|
96
|
-
|
|
97
93
|
{
|
|
98
|
-
_$_.output_push('
|
|
99
|
-
|
|
94
|
+
_$_.output_push('<button');
|
|
95
|
+
_$_.output_push(' class="toggle"');
|
|
96
|
+
_$_.output_push('>');
|
|
100
97
|
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
{
|
|
99
|
+
_$_.output_push('Toggle');
|
|
100
|
+
}
|
|
103
101
|
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
_$_.output_push('</button>');
|
|
103
|
+
_$_.output_push('<!--[-->');
|
|
106
104
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
if (lazy.value) {
|
|
106
|
+
_$_.output_push('<div');
|
|
107
|
+
_$_.output_push(' class="content"');
|
|
108
|
+
_$_.output_push('>');
|
|
111
109
|
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
{
|
|
111
|
+
_$_.output_push('Content visible');
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
_$_.output_push('</div>');
|
|
114
115
|
}
|
|
115
116
|
|
|
116
|
-
_$_.output_push('
|
|
117
|
+
_$_.output_push('<!--]-->');
|
|
117
118
|
}
|
|
118
|
-
|
|
119
|
-
_$_.output_push('<!--]-->');
|
|
120
119
|
});
|
|
121
120
|
});
|
|
122
121
|
}
|
|
@@ -126,43 +125,42 @@ export function ReactiveIfElse() {
|
|
|
126
125
|
let lazy_1 = _$_.track(false, '41177f39');
|
|
127
126
|
|
|
128
127
|
_$_.regular_block(() => {
|
|
129
|
-
_$_.output_push('<button');
|
|
130
|
-
_$_.output_push(' class="toggle"');
|
|
131
|
-
_$_.output_push('>');
|
|
132
|
-
|
|
133
128
|
{
|
|
134
|
-
_$_.output_push('
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
_$_.output_push('</button>');
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
_$_.regular_block(() => {
|
|
141
|
-
_$_.output_push('<!--[-->');
|
|
142
|
-
|
|
143
|
-
if (lazy_1.value) {
|
|
144
|
-
_$_.output_push('<div');
|
|
145
|
-
_$_.output_push(' class="on"');
|
|
129
|
+
_$_.output_push('<button');
|
|
130
|
+
_$_.output_push(' class="toggle"');
|
|
146
131
|
_$_.output_push('>');
|
|
147
132
|
|
|
148
133
|
{
|
|
149
|
-
_$_.output_push('
|
|
134
|
+
_$_.output_push('Toggle');
|
|
150
135
|
}
|
|
151
136
|
|
|
152
|
-
_$_.output_push('</
|
|
153
|
-
|
|
154
|
-
_$_.output_push('<div');
|
|
155
|
-
_$_.output_push(' class="off"');
|
|
156
|
-
_$_.output_push('>');
|
|
137
|
+
_$_.output_push('</button>');
|
|
138
|
+
_$_.output_push('<!--[-->');
|
|
157
139
|
|
|
158
|
-
{
|
|
159
|
-
_$_.output_push('
|
|
140
|
+
if (lazy_1.value) {
|
|
141
|
+
_$_.output_push('<div');
|
|
142
|
+
_$_.output_push(' class="on"');
|
|
143
|
+
_$_.output_push('>');
|
|
144
|
+
|
|
145
|
+
{
|
|
146
|
+
_$_.output_push('ON');
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
_$_.output_push('</div>');
|
|
150
|
+
} else {
|
|
151
|
+
_$_.output_push('<div');
|
|
152
|
+
_$_.output_push(' class="off"');
|
|
153
|
+
_$_.output_push('>');
|
|
154
|
+
|
|
155
|
+
{
|
|
156
|
+
_$_.output_push('OFF');
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
_$_.output_push('</div>');
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
_$_.output_push('
|
|
162
|
+
_$_.output_push('<!--]-->');
|
|
163
163
|
}
|
|
164
|
-
|
|
165
|
-
_$_.output_push('<!--]-->');
|
|
166
164
|
});
|
|
167
165
|
});
|
|
168
166
|
}
|
|
@@ -173,60 +171,56 @@ export function NestedIf() {
|
|
|
173
171
|
let lazy_3 = _$_.track(true, 'f21b8c26');
|
|
174
172
|
|
|
175
173
|
_$_.regular_block(() => {
|
|
176
|
-
_$_.output_push('<button');
|
|
177
|
-
_$_.output_push(' class="outer-toggle"');
|
|
178
|
-
_$_.output_push('>');
|
|
179
|
-
|
|
180
174
|
{
|
|
181
|
-
_$_.output_push('
|
|
182
|
-
|
|
175
|
+
_$_.output_push('<button');
|
|
176
|
+
_$_.output_push(' class="outer-toggle"');
|
|
177
|
+
_$_.output_push('>');
|
|
183
178
|
|
|
184
|
-
|
|
185
|
-
|
|
179
|
+
{
|
|
180
|
+
_$_.output_push('Outer');
|
|
181
|
+
}
|
|
186
182
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
183
|
+
_$_.output_push('</button>');
|
|
184
|
+
_$_.output_push('<button');
|
|
185
|
+
_$_.output_push(' class="inner-toggle"');
|
|
186
|
+
_$_.output_push('>');
|
|
191
187
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
188
|
+
{
|
|
189
|
+
_$_.output_push('Inner');
|
|
190
|
+
}
|
|
195
191
|
|
|
196
|
-
|
|
197
|
-
|
|
192
|
+
_$_.output_push('</button>');
|
|
193
|
+
_$_.output_push('<!--[-->');
|
|
198
194
|
|
|
199
|
-
|
|
200
|
-
|
|
195
|
+
if (lazy_2.value) {
|
|
196
|
+
_$_.output_push('<div');
|
|
197
|
+
_$_.output_push(' class="outer-content"');
|
|
198
|
+
_$_.output_push('>');
|
|
201
199
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
_$_.output_push('>');
|
|
200
|
+
{
|
|
201
|
+
_$_.output_push('Outer');
|
|
202
|
+
_$_.output_push('<!--[-->');
|
|
206
203
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
204
|
+
if (lazy_3.value) {
|
|
205
|
+
_$_.output_push('<span');
|
|
206
|
+
_$_.output_push(' class="inner-content"');
|
|
207
|
+
_$_.output_push('>');
|
|
210
208
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
_$_.output_push('>');
|
|
209
|
+
{
|
|
210
|
+
_$_.output_push('Inner');
|
|
211
|
+
}
|
|
215
212
|
|
|
216
|
-
|
|
217
|
-
_$_.output_push('Inner');
|
|
213
|
+
_$_.output_push('</span>');
|
|
218
214
|
}
|
|
219
215
|
|
|
220
|
-
_$_.output_push('
|
|
216
|
+
_$_.output_push('<!--]-->');
|
|
221
217
|
}
|
|
222
218
|
|
|
223
|
-
_$_.output_push('
|
|
219
|
+
_$_.output_push('</div>');
|
|
224
220
|
}
|
|
225
221
|
|
|
226
|
-
_$_.output_push('
|
|
222
|
+
_$_.output_push('<!--]-->');
|
|
227
223
|
}
|
|
228
|
-
|
|
229
|
-
_$_.output_push('<!--]-->');
|
|
230
224
|
});
|
|
231
225
|
});
|
|
232
226
|
}
|
|
@@ -88,6 +88,7 @@ export function MixedControlFlowStatic() {
|
|
|
88
88
|
_$_.output_push('<!--]-->');
|
|
89
89
|
}
|
|
90
90
|
);
|
|
91
|
+
break;
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
_$_.output_push('<!--]-->');
|
|
@@ -111,130 +112,124 @@ export function MixedControlFlowReactive() {
|
|
|
111
112
|
let lazy_2 = _$_.track([{ id: 1, label: 'One' }, { id: 2, label: 'Two' }], '7890dad6');
|
|
112
113
|
|
|
113
114
|
_$_.regular_block(() => {
|
|
114
|
-
_$_.output_push('<button');
|
|
115
|
-
_$_.output_push(' class="toggle-show"');
|
|
116
|
-
_$_.output_push('>');
|
|
117
|
-
|
|
118
|
-
{
|
|
119
|
-
_$_.output_push('Toggle Show');
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
_$_.output_push('</button>');
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
_$_.regular_block(() => {
|
|
126
|
-
_$_.output_push('<button');
|
|
127
|
-
_$_.output_push(' class="toggle-mode"');
|
|
128
|
-
_$_.output_push('>');
|
|
129
|
-
|
|
130
115
|
{
|
|
131
|
-
_$_.output_push('
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
_$_.output_push('</button>');
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
_$_.regular_block(() => {
|
|
138
|
-
_$_.output_push('<button');
|
|
139
|
-
_$_.output_push(' class="add-item"');
|
|
140
|
-
_$_.output_push('>');
|
|
116
|
+
_$_.output_push('<button');
|
|
117
|
+
_$_.output_push(' class="toggle-show"');
|
|
118
|
+
_$_.output_push('>');
|
|
141
119
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
120
|
+
{
|
|
121
|
+
_$_.output_push('Toggle Show');
|
|
122
|
+
}
|
|
145
123
|
|
|
146
|
-
|
|
147
|
-
|
|
124
|
+
_$_.output_push('</button>');
|
|
125
|
+
_$_.output_push('<button');
|
|
126
|
+
_$_.output_push(' class="toggle-mode"');
|
|
127
|
+
_$_.output_push('>');
|
|
148
128
|
|
|
149
|
-
|
|
150
|
-
|
|
129
|
+
{
|
|
130
|
+
_$_.output_push('Toggle Mode');
|
|
131
|
+
}
|
|
151
132
|
|
|
152
|
-
|
|
153
|
-
_$_.output_push('<
|
|
154
|
-
_$_.output_push(' class="
|
|
133
|
+
_$_.output_push('</button>');
|
|
134
|
+
_$_.output_push('<button');
|
|
135
|
+
_$_.output_push(' class="add-item"');
|
|
155
136
|
_$_.output_push('>');
|
|
156
137
|
|
|
157
138
|
{
|
|
158
|
-
_$_.output_push('
|
|
159
|
-
|
|
160
|
-
for (const item of lazy_2.value) {
|
|
161
|
-
_$_.output_push('<!--[-->');
|
|
139
|
+
_$_.output_push('Add Item');
|
|
140
|
+
}
|
|
162
141
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
_$_.try_block(
|
|
166
|
-
() => {
|
|
167
|
-
_$_.output_push('<!--[-->');
|
|
168
|
-
_$_.output_push('<p');
|
|
169
|
-
_$_.output_push(_$_.attr('class', `item item-${item.id}`));
|
|
170
|
-
_$_.output_push('>');
|
|
142
|
+
_$_.output_push('</button>');
|
|
143
|
+
_$_.output_push('<!--[-->');
|
|
171
144
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
145
|
+
if (lazy.value) {
|
|
146
|
+
_$_.output_push('<div');
|
|
147
|
+
_$_.output_push(' class="mixed-reactive-list"');
|
|
148
|
+
_$_.output_push('>');
|
|
175
149
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
},
|
|
179
|
-
null,
|
|
180
|
-
() => {
|
|
181
|
-
_$_.output_push('<!--[-->');
|
|
182
|
-
_$_.output_push('<p');
|
|
183
|
-
_$_.output_push(' class="pending"');
|
|
184
|
-
_$_.output_push('>');
|
|
150
|
+
{
|
|
151
|
+
_$_.output_push('<!--[-->');
|
|
185
152
|
|
|
186
|
-
|
|
187
|
-
|
|
153
|
+
for (const item of lazy_2.value) {
|
|
154
|
+
_$_.output_push('<!--[-->');
|
|
155
|
+
|
|
156
|
+
switch (lazy_1.value) {
|
|
157
|
+
case 'a':
|
|
158
|
+
_$_.try_block(
|
|
159
|
+
() => {
|
|
160
|
+
_$_.output_push('<!--[-->');
|
|
161
|
+
_$_.output_push('<p');
|
|
162
|
+
_$_.output_push(_$_.attr('class', `item item-${item.id}`));
|
|
163
|
+
_$_.output_push('>');
|
|
164
|
+
|
|
165
|
+
{
|
|
166
|
+
_$_.output_push(_$_.escape(`A:${item.label}`));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
_$_.output_push('</p>');
|
|
170
|
+
_$_.output_push('<!--]-->');
|
|
171
|
+
},
|
|
172
|
+
null,
|
|
173
|
+
() => {
|
|
174
|
+
_$_.output_push('<!--[-->');
|
|
175
|
+
_$_.output_push('<p');
|
|
176
|
+
_$_.output_push(' class="pending"');
|
|
177
|
+
_$_.output_push('>');
|
|
178
|
+
|
|
179
|
+
{
|
|
180
|
+
_$_.output_push('pending a');
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
_$_.output_push('</p>');
|
|
184
|
+
_$_.output_push('<!--]-->');
|
|
188
185
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
_$_.output_push(
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
_$_.output_push('
|
|
186
|
+
);
|
|
187
|
+
break;
|
|
188
|
+
|
|
189
|
+
default:
|
|
190
|
+
_$_.try_block(
|
|
191
|
+
() => {
|
|
192
|
+
_$_.output_push('<!--[-->');
|
|
193
|
+
_$_.output_push('<p');
|
|
194
|
+
_$_.output_push(_$_.attr('class', `item item-${item.id}`));
|
|
195
|
+
_$_.output_push('>');
|
|
196
|
+
|
|
197
|
+
{
|
|
198
|
+
_$_.output_push(_$_.escape(`B:${item.label}`));
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
_$_.output_push('</p>');
|
|
202
|
+
_$_.output_push('<!--]-->');
|
|
203
|
+
},
|
|
204
|
+
null,
|
|
205
|
+
() => {
|
|
206
|
+
_$_.output_push('<!--[-->');
|
|
207
|
+
_$_.output_push('<p');
|
|
208
|
+
_$_.output_push(' class="pending"');
|
|
209
|
+
_$_.output_push('>');
|
|
210
|
+
|
|
211
|
+
{
|
|
212
|
+
_$_.output_push('pending b');
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
_$_.output_push('</p>');
|
|
216
|
+
_$_.output_push('<!--]-->');
|
|
220
217
|
}
|
|
218
|
+
);
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
221
|
|
|
222
|
-
|
|
223
|
-
_$_.output_push('<!--]-->');
|
|
224
|
-
}
|
|
225
|
-
);
|
|
222
|
+
_$_.output_push('<!--]-->');
|
|
226
223
|
}
|
|
227
224
|
|
|
228
225
|
_$_.output_push('<!--]-->');
|
|
229
226
|
}
|
|
230
227
|
|
|
231
|
-
_$_.output_push('
|
|
228
|
+
_$_.output_push('</div>');
|
|
232
229
|
}
|
|
233
230
|
|
|
234
|
-
_$_.output_push('
|
|
231
|
+
_$_.output_push('<!--]-->');
|
|
235
232
|
}
|
|
236
|
-
|
|
237
|
-
_$_.output_push('<!--]-->');
|
|
238
233
|
});
|
|
239
234
|
});
|
|
240
235
|
}
|
|
@@ -245,66 +240,68 @@ export function MixedControlFlowAsyncPending() {
|
|
|
245
240
|
const state = 'slow';
|
|
246
241
|
|
|
247
242
|
_$_.regular_block(() => {
|
|
248
|
-
_$_.output_push('<div');
|
|
249
|
-
_$_.output_push(' class="before"');
|
|
250
|
-
_$_.output_push('>');
|
|
251
|
-
|
|
252
243
|
{
|
|
253
|
-
_$_.output_push('
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
_$_.output_push('</div>');
|
|
257
|
-
});
|
|
244
|
+
_$_.output_push('<div');
|
|
245
|
+
_$_.output_push(' class="before"');
|
|
246
|
+
_$_.output_push('>');
|
|
258
247
|
|
|
259
|
-
|
|
260
|
-
|
|
248
|
+
{
|
|
249
|
+
_$_.output_push('before');
|
|
250
|
+
}
|
|
261
251
|
|
|
262
|
-
|
|
252
|
+
_$_.output_push('</div>');
|
|
263
253
|
_$_.output_push('<!--[-->');
|
|
264
254
|
|
|
265
|
-
|
|
255
|
+
for (const row of rows) {
|
|
266
256
|
_$_.output_push('<!--[-->');
|
|
267
257
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
258
|
+
if (row === 1) {
|
|
259
|
+
_$_.output_push('<!--[-->');
|
|
260
|
+
|
|
261
|
+
switch (state) {
|
|
262
|
+
case 'slow':
|
|
263
|
+
_$_.try_block(
|
|
264
|
+
() => {
|
|
265
|
+
_$_.output_push('<!--[-->');
|
|
273
266
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
267
|
+
{
|
|
268
|
+
const comp = AsyncRow;
|
|
269
|
+
const args = [{ label: `row-${row}` }];
|
|
277
270
|
|
|
278
|
-
|
|
279
|
-
|
|
271
|
+
_$_.render_component(comp, ...args);
|
|
272
|
+
}
|
|
280
273
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
274
|
+
_$_.output_push('<!--]-->');
|
|
275
|
+
},
|
|
276
|
+
null,
|
|
277
|
+
() => {
|
|
278
|
+
_$_.output_push('<!--[-->');
|
|
279
|
+
_$_.output_push('<div');
|
|
280
|
+
_$_.output_push(_$_.attr('class', `pending-row pending-row-${row}`));
|
|
281
|
+
_$_.output_push('>');
|
|
282
|
+
|
|
283
|
+
{
|
|
284
|
+
_$_.output_push(_$_.escape(`pending ${row}`));
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
_$_.output_push('</div>');
|
|
288
|
+
_$_.output_push('<!--]-->');
|
|
292
289
|
}
|
|
290
|
+
);
|
|
291
|
+
break;
|
|
293
292
|
|
|
294
|
-
|
|
295
|
-
|
|
293
|
+
default:
|
|
294
|
+
_$_.output_push('<div');
|
|
295
|
+
_$_.output_push(' class="unexpected"');
|
|
296
|
+
_$_.output_push('>');
|
|
297
|
+
{
|
|
298
|
+
_$_.output_push('unexpected');
|
|
296
299
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
_$_.output_push(' class="unexpected"');
|
|
303
|
-
_$_.output_push('>');
|
|
304
|
-
{
|
|
305
|
-
_$_.output_push('unexpected');
|
|
306
|
-
}
|
|
307
|
-
_$_.output_push('</div>');
|
|
300
|
+
_$_.output_push('</div>');
|
|
301
|
+
break;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
_$_.output_push('<!--]-->');
|
|
308
305
|
}
|
|
309
306
|
|
|
310
307
|
_$_.output_push('<!--]-->');
|
|
@@ -312,8 +309,6 @@ export function MixedControlFlowAsyncPending() {
|
|
|
312
309
|
|
|
313
310
|
_$_.output_push('<!--]-->');
|
|
314
311
|
}
|
|
315
|
-
|
|
316
|
-
_$_.output_push('<!--]-->');
|
|
317
312
|
});
|
|
318
313
|
});
|
|
319
314
|
}
|
|
@@ -81,6 +81,7 @@ export function ForSwitch() {
|
|
|
81
81
|
_$_.output_push(_$_.escape(`B-${item.id}`));
|
|
82
82
|
}
|
|
83
83
|
_$_.output_push('</li>');
|
|
84
|
+
break;
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
_$_.output_push('<!--]-->');
|
|
@@ -129,6 +130,7 @@ export function IfSwitch() {
|
|
|
129
130
|
_$_.output_push('Default');
|
|
130
131
|
}
|
|
131
132
|
_$_.output_push('</p>');
|
|
133
|
+
break;
|
|
132
134
|
}
|
|
133
135
|
|
|
134
136
|
_$_.output_push('<!--]-->');
|
|
@@ -177,6 +179,7 @@ export function IfSwitchHidden() {
|
|
|
177
179
|
_$_.output_push('Default');
|
|
178
180
|
}
|
|
179
181
|
_$_.output_push('</p>');
|
|
182
|
+
break;
|
|
180
183
|
}
|
|
181
184
|
|
|
182
185
|
_$_.output_push('<!--]-->');
|
|
@@ -236,6 +239,7 @@ export function ForIfSwitchSingle() {
|
|
|
236
239
|
_$_.output_push(_$_.escape(`D-${item.id}`));
|
|
237
240
|
}
|
|
238
241
|
_$_.output_push('</li>');
|
|
242
|
+
break;
|
|
239
243
|
}
|
|
240
244
|
|
|
241
245
|
_$_.output_push('<!--]-->');
|
|
@@ -292,6 +296,7 @@ export function ForIfSwitchMulti() {
|
|
|
292
296
|
_$_.output_push(_$_.escape(`B-${item.id}`));
|
|
293
297
|
}
|
|
294
298
|
_$_.output_push('</li>');
|
|
299
|
+
break;
|
|
295
300
|
}
|
|
296
301
|
|
|
297
302
|
_$_.output_push('<!--]-->');
|
|
@@ -349,6 +354,7 @@ export function ForIfSwitchWithDisabled() {
|
|
|
349
354
|
_$_.output_push(_$_.escape(`B-${item.id}`));
|
|
350
355
|
}
|
|
351
356
|
_$_.output_push('</li>');
|
|
357
|
+
break;
|
|
352
358
|
}
|
|
353
359
|
|
|
354
360
|
_$_.output_push('<!--]-->');
|
|
@@ -418,6 +424,7 @@ export function SwitchTry() {
|
|
|
418
424
|
_$_.output_push('Default');
|
|
419
425
|
}
|
|
420
426
|
_$_.output_push('</p>');
|
|
427
|
+
break;
|
|
421
428
|
}
|
|
422
429
|
|
|
423
430
|
_$_.output_push('<!--]-->');
|
|
@@ -506,6 +513,7 @@ export function ForSwitchTry() {
|
|
|
506
513
|
_$_.output_push('<!--]-->');
|
|
507
514
|
}
|
|
508
515
|
);
|
|
516
|
+
break;
|
|
509
517
|
}
|
|
510
518
|
|
|
511
519
|
_$_.output_push('<!--]-->');
|
|
@@ -658,6 +666,7 @@ export function ForIfSwitchTrySingle() {
|
|
|
658
666
|
_$_.output_push('<!--]-->');
|
|
659
667
|
}
|
|
660
668
|
);
|
|
669
|
+
break;
|
|
661
670
|
}
|
|
662
671
|
|
|
663
672
|
_$_.output_push('<!--]-->');
|
|
@@ -758,6 +767,7 @@ export function ForIfSwitchTryMulti() {
|
|
|
758
767
|
_$_.output_push('<!--]-->');
|
|
759
768
|
}
|
|
760
769
|
);
|
|
770
|
+
break;
|
|
761
771
|
}
|
|
762
772
|
|
|
763
773
|
_$_.output_push('<!--]-->');
|