ripple 0.4.2 → 0.4.4
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 +164 -0
- package/package.json +10 -4
- package/src/constants.js +6 -0
- package/src/jsx-runtime.d.ts +2 -1
- package/src/runtime/array.js +15 -9
- package/src/runtime/index-client.js +25 -7
- package/src/runtime/index-server.js +1 -0
- package/src/runtime/internal/client/attributes.js +439 -0
- package/src/runtime/internal/client/blocks.js +20 -20
- package/src/runtime/internal/client/component.js +2 -5
- package/src/runtime/internal/client/composite.js +295 -95
- package/src/runtime/internal/client/constants.js +14 -6
- package/src/runtime/internal/client/context.js +3 -2
- package/src/runtime/internal/client/css.js +11 -26
- package/src/runtime/internal/client/errors.js +188 -0
- package/src/runtime/internal/client/events.js +79 -34
- package/src/runtime/internal/client/expression.js +25 -120
- package/src/runtime/internal/client/for.js +113 -262
- package/src/runtime/internal/client/head.js +4 -3
- package/src/runtime/internal/client/html.js +5 -3
- package/src/runtime/internal/client/hydrate.js +484 -0
- package/src/runtime/internal/client/hydration-enabled.js +7 -0
- package/src/runtime/internal/client/hydration.js +16 -81
- package/src/runtime/internal/client/if.js +69 -10
- package/src/runtime/internal/client/index.js +18 -10
- package/src/runtime/internal/client/operations.js +11 -7
- package/src/runtime/internal/client/portal.js +3 -2
- package/src/runtime/internal/client/render.js +42 -325
- package/src/runtime/internal/client/root-boundary-enabled.js +7 -0
- package/src/runtime/internal/client/runtime.js +157 -371
- package/src/runtime/internal/client/template-ns.js +88 -0
- package/src/runtime/internal/client/template.js +118 -139
- package/src/runtime/internal/client/track-async.js +356 -0
- package/src/runtime/internal/client/try.js +133 -319
- package/src/runtime/internal/client/types.d.ts +48 -24
- package/src/runtime/internal/server/index.js +31 -29
- package/src/runtime/internal/server/prerender.js +27 -0
- package/src/server/index.js +1 -0
- package/src/utils/class-name.js +28 -0
- package/tests/client/basic/basic.errors.test.tsrx +3 -3
- package/tests/client/compiler/__snapshots__/compiler.typescript.test.tsrx.snap +0 -2
- package/tests/client/compiler/compiler.basic.test.tsrx +2 -2
- package/tests/client/compiler/compiler.tracked-access.test.tsrx +3 -3
- package/tests/client/composite/composite.dynamic-components.test.tsrx +40 -0
- package/tests/client/composite/composite.props.test.tsrx +10 -10
- package/tests/client/css/scoped-styles.test.tsrx +3 -1
- package/tests/client/derived-release.test.tsrx +3 -3
- package/tests/client/for-item.test.tsrx +39 -0
- package/tests/client/for-selector.test.tsrx +95 -0
- package/tests/client/svg.test.tsrx +273 -1
- package/tests/hydration/compiled/client/basic.js +88 -87
- package/tests/hydration/compiled/client/composite.js +15 -6
- package/tests/hydration/compiled/client/events.js +40 -48
- package/tests/hydration/compiled/client/for.js +191 -199
- package/tests/hydration/compiled/client/fragment-cursor.js +633 -334
- package/tests/hydration/compiled/client/head.js +22 -22
- package/tests/hydration/compiled/client/hmr.js +14 -5
- package/tests/hydration/compiled/client/html-in-template.js +5 -5
- package/tests/hydration/compiled/client/html.js +195 -177
- package/tests/hydration/compiled/client/if-children.js +136 -63
- package/tests/hydration/compiled/client/if-fragment-controlflow.js +63 -43
- package/tests/hydration/compiled/client/if.js +78 -30
- package/tests/hydration/compiled/client/mixed-control-flow.js +90 -72
- package/tests/hydration/compiled/client/nested-control-flow.js +266 -307
- package/tests/hydration/compiled/client/portal.js +20 -11
- package/tests/hydration/compiled/client/reactivity.js +29 -29
- package/tests/hydration/compiled/client/return.js +2 -2
- package/tests/hydration/compiled/client/streaming.js +33 -35
- package/tests/hydration/compiled/client/switch.js +25 -25
- package/tests/hydration/compiled/client/track-async-serialization.js +41 -41
- package/tests/hydration/compiled/client/try.js +15 -15
- package/tests/hydration/compiled/client/typed-text.js +8 -7
- package/tests/hydration/compiled/server/basic.js +6 -6
- package/tests/hydration/compiled/server/events.js +8 -8
- package/tests/hydration/compiled/server/for.js +22 -22
- package/tests/hydration/compiled/server/fragment-cursor.js +188 -52
- package/tests/hydration/compiled/server/head.js +6 -6
- package/tests/hydration/compiled/server/hmr.js +1 -1
- package/tests/hydration/compiled/server/html.js +1 -1
- package/tests/hydration/compiled/server/if-children.js +9 -9
- package/tests/hydration/compiled/server/if.js +5 -5
- package/tests/hydration/compiled/server/mixed-control-flow.js +4 -4
- package/tests/hydration/compiled/server/portal.js +1 -1
- package/tests/hydration/compiled/server/reactivity.js +9 -9
- package/tests/hydration/compiled/server/streaming.js +9 -9
- package/tests/hydration/compiled/server/switch.js +4 -4
- package/tests/hydration/compiled/server/track-async-serialization.js +16 -16
- package/tests/hydration/compiled/server/try.js +4 -4
- package/tests/hydration/compiled/server/typed-text.js +1 -1
- package/tests/hydration/components/fragment-cursor.tsrx +60 -0
- package/tests/hydration/components/track-async-serialization.tsrx +2 -2
- package/tests/hydration/fragment-cursor.test.js +34 -1
- package/tests/hydration/track-async-serialization.test.js +1 -1
- package/tests/server/basic.components.test.tsrx +3 -3
- package/tests/server/track-async-serialization.test.tsrx +6 -6
- package/tests/utils/tracked-types.test.js +3 -3
- package/types/index.d.ts +8 -8
- package/types/server.d.ts +17 -0
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import * as _$_ from 'ripple/internal/client';
|
|
3
3
|
|
|
4
|
-
var root_1 = _$_.
|
|
4
|
+
var root_1 = _$_.template_el('div');
|
|
5
5
|
|
|
6
6
|
function render(__prev) {
|
|
7
|
-
var __pattern = _$_.get(__prev.
|
|
7
|
+
var __pattern = _$_.get(__prev._a);
|
|
8
8
|
var __a = `A-${__pattern.id}`;
|
|
9
9
|
|
|
10
10
|
if (__prev.a !== __a) {
|
|
11
|
-
_$_.set_text_content(__prev.
|
|
11
|
+
_$_.set_text_content(__prev._b, __a, __prev.a);
|
|
12
12
|
__prev.a = __a;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
var __b = `row row-${__pattern.id} kind-a`;
|
|
16
16
|
|
|
17
17
|
if (__prev.b !== __b) {
|
|
18
|
-
_$_.set_class(__prev.
|
|
18
|
+
_$_.set_class(__prev._b, __prev.b = __b);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
var root_2 = _$_.
|
|
22
|
+
var root_2 = _$_.template_el('div', null, 'pending a');
|
|
23
23
|
|
|
24
24
|
function render_1(__prev) {
|
|
25
|
-
var __a = `pending pending-${_$_.get(__prev.
|
|
25
|
+
var __a = `pending pending-${_$_.get(__prev._a).id}`;
|
|
26
26
|
|
|
27
27
|
if (__prev.a !== __a) {
|
|
28
|
-
_$_.set_class(__prev.
|
|
28
|
+
_$_.set_class(__prev._b, __prev.a = __a);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
var root_3 = _$_.
|
|
32
|
+
var root_3 = _$_.template_el('div');
|
|
33
33
|
|
|
34
34
|
function render_2(__prev) {
|
|
35
|
-
var __pattern_1 = _$_.get(__prev.
|
|
35
|
+
var __pattern_1 = _$_.get(__prev._a);
|
|
36
36
|
var __a = `B-${__pattern_1.id}`;
|
|
37
37
|
|
|
38
38
|
if (__prev.a !== __a) {
|
|
39
|
-
_$_.set_text_content(__prev.
|
|
39
|
+
_$_.set_text_content(__prev._b, __a, __prev.a);
|
|
40
40
|
__prev.a = __a;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
var __b = `row row-${__pattern_1.id} kind-b`;
|
|
44
44
|
|
|
45
45
|
if (__prev.b !== __b) {
|
|
46
|
-
_$_.set_class(__prev.
|
|
46
|
+
_$_.set_class(__prev._b, __prev.b = __b);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
var root_4 = _$_.
|
|
50
|
+
var root_4 = _$_.template_el('div', null, 'pending b');
|
|
51
51
|
|
|
52
52
|
function render_3(__prev) {
|
|
53
|
-
var __a = `pending pending-${_$_.get(__prev.
|
|
53
|
+
var __a = `pending pending-${_$_.get(__prev._a).id}`;
|
|
54
54
|
|
|
55
55
|
if (__prev.a !== __a) {
|
|
56
|
-
_$_.set_class(__prev.
|
|
56
|
+
_$_.set_class(__prev._b, __prev.a = __a);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -63,14 +63,14 @@ function switch_case_0(__anchor, pattern) {
|
|
|
63
63
|
(__anchor) => {
|
|
64
64
|
var div = root_1();
|
|
65
65
|
|
|
66
|
-
_$_.render(render, { a: '', b: _$_.UNINITIALIZED,
|
|
66
|
+
_$_.render(render, { a: '', b: _$_.UNINITIALIZED, _a: pattern, _b: div });
|
|
67
67
|
_$_.append(__anchor, div);
|
|
68
68
|
},
|
|
69
69
|
null,
|
|
70
70
|
(__anchor) => {
|
|
71
71
|
var div_1 = root_2();
|
|
72
72
|
|
|
73
|
-
_$_.render(render_1, { a: _$_.UNINITIALIZED,
|
|
73
|
+
_$_.render(render_1, { a: _$_.UNINITIALIZED, _a: pattern, _b: div_1 });
|
|
74
74
|
_$_.append(__anchor, div_1);
|
|
75
75
|
},
|
|
76
76
|
true
|
|
@@ -83,20 +83,14 @@ function switch_case_default(__anchor, pattern) {
|
|
|
83
83
|
(__anchor) => {
|
|
84
84
|
var div_2 = root_3();
|
|
85
85
|
|
|
86
|
-
_$_.render(render_2, {
|
|
87
|
-
a: '',
|
|
88
|
-
b: _$_.UNINITIALIZED,
|
|
89
|
-
_pattern: pattern,
|
|
90
|
-
_div_2: div_2
|
|
91
|
-
});
|
|
92
|
-
|
|
86
|
+
_$_.render(render_2, { a: '', b: _$_.UNINITIALIZED, _a: pattern, _b: div_2 });
|
|
93
87
|
_$_.append(__anchor, div_2);
|
|
94
88
|
},
|
|
95
89
|
null,
|
|
96
90
|
(__anchor) => {
|
|
97
91
|
var div_3 = root_4();
|
|
98
92
|
|
|
99
|
-
_$_.render(render_3, { a: _$_.UNINITIALIZED,
|
|
93
|
+
_$_.render(render_3, { a: _$_.UNINITIALIZED, _a: pattern, _b: div_3 });
|
|
100
94
|
_$_.append(__anchor, div_3);
|
|
101
95
|
},
|
|
102
96
|
true
|
|
@@ -121,7 +115,15 @@ function if_1(pattern) {
|
|
|
121
115
|
if (_$_.get(pattern).enabled) return consequent;
|
|
122
116
|
}
|
|
123
117
|
|
|
124
|
-
|
|
118
|
+
function render_4(__prev) {
|
|
119
|
+
var __a = if_1(__prev._a);
|
|
120
|
+
|
|
121
|
+
if (__prev.a !== __a) {
|
|
122
|
+
_$_.if_update(__prev._b, __prev.a = __a);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
var root = _$_.template_el('section', ['class', 'mixed-static']);
|
|
125
127
|
|
|
126
128
|
function MixedControlFlowStatic_render(__anchor, __block) {
|
|
127
129
|
const rows = [
|
|
@@ -137,10 +139,15 @@ function MixedControlFlowStatic_render(__anchor, __block) {
|
|
|
137
139
|
section,
|
|
138
140
|
() => rows,
|
|
139
141
|
(__anchor, pattern) => {
|
|
140
|
-
_$_.
|
|
142
|
+
var ifs = _$_.if_static(__anchor, if_1, 3, pattern);
|
|
143
|
+
|
|
144
|
+
_$_.item({ a: _$_.UNINITIALIZED, _a: pattern, _b: ifs });
|
|
141
145
|
},
|
|
142
146
|
4,
|
|
143
|
-
(pattern) => pattern.id
|
|
147
|
+
(pattern) => pattern.id,
|
|
148
|
+
void 0,
|
|
149
|
+
void 0,
|
|
150
|
+
render_4
|
|
144
151
|
);
|
|
145
152
|
|
|
146
153
|
_$_.hydrating && _$_.pop(section);
|
|
@@ -151,52 +158,52 @@ function MixedControlFlowStatic_render(__anchor, __block) {
|
|
|
151
158
|
|
|
152
159
|
MixedControlFlowStatic[_$_.$r] = MixedControlFlowStatic_render;
|
|
153
160
|
|
|
154
|
-
var root_8 = _$_.
|
|
161
|
+
var root_8 = _$_.template_el('p');
|
|
155
162
|
|
|
156
|
-
function
|
|
157
|
-
var __pattern_1_1 = _$_.get(__prev.
|
|
163
|
+
function render_5(__prev) {
|
|
164
|
+
var __pattern_1_1 = _$_.get(__prev._a);
|
|
158
165
|
var __a = `A:${__pattern_1_1.label}`;
|
|
159
166
|
|
|
160
167
|
if (__prev.a !== __a) {
|
|
161
|
-
_$_.set_text_content(__prev.
|
|
168
|
+
_$_.set_text_content(__prev._b, __a, __prev.a);
|
|
162
169
|
__prev.a = __a;
|
|
163
170
|
}
|
|
164
171
|
|
|
165
172
|
var __b = `item item-${__pattern_1_1.id}`;
|
|
166
173
|
|
|
167
174
|
if (__prev.b !== __b) {
|
|
168
|
-
_$_.set_class(__prev.
|
|
175
|
+
_$_.set_class(__prev._b, __prev.b = __b);
|
|
169
176
|
}
|
|
170
177
|
}
|
|
171
178
|
|
|
172
|
-
var root_9 = _$_.
|
|
173
|
-
var root_10 = _$_.
|
|
179
|
+
var root_9 = _$_.template_el('p', ['class', 'pending'], 'pending a');
|
|
180
|
+
var root_10 = _$_.template_el('p');
|
|
174
181
|
|
|
175
|
-
function
|
|
176
|
-
var __pattern_1_2 = _$_.get(__prev.
|
|
182
|
+
function render_6(__prev) {
|
|
183
|
+
var __pattern_1_2 = _$_.get(__prev._a);
|
|
177
184
|
var __a = `B:${__pattern_1_2.label}`;
|
|
178
185
|
|
|
179
186
|
if (__prev.a !== __a) {
|
|
180
|
-
_$_.set_text_content(__prev.
|
|
187
|
+
_$_.set_text_content(__prev._b, __a, __prev.a);
|
|
181
188
|
__prev.a = __a;
|
|
182
189
|
}
|
|
183
190
|
|
|
184
191
|
var __b = `item item-${__pattern_1_2.id}`;
|
|
185
192
|
|
|
186
193
|
if (__prev.b !== __b) {
|
|
187
|
-
_$_.set_class(__prev.
|
|
194
|
+
_$_.set_class(__prev._b, __prev.b = __b);
|
|
188
195
|
}
|
|
189
196
|
}
|
|
190
197
|
|
|
191
|
-
var root_11 = _$_.
|
|
198
|
+
var root_11 = _$_.template_el('p', ['class', 'pending'], 'pending b');
|
|
192
199
|
|
|
193
|
-
function switch_case_0_1(__anchor, { mode, pattern_1 }) {
|
|
200
|
+
function switch_case_0_1(__anchor, { a: mode, b: pattern_1 }) {
|
|
194
201
|
_$_.try(
|
|
195
202
|
__anchor,
|
|
196
203
|
(__anchor) => {
|
|
197
204
|
var p = root_8();
|
|
198
205
|
|
|
199
|
-
_$_.render(
|
|
206
|
+
_$_.render(render_5, { a: '', b: _$_.UNINITIALIZED, _a: pattern_1, _b: p });
|
|
200
207
|
_$_.append(__anchor, p);
|
|
201
208
|
},
|
|
202
209
|
null,
|
|
@@ -209,19 +216,13 @@ function switch_case_0_1(__anchor, { mode, pattern_1 }) {
|
|
|
209
216
|
);
|
|
210
217
|
}
|
|
211
218
|
|
|
212
|
-
function switch_case_default_1(__anchor, { mode, pattern_1 }) {
|
|
219
|
+
function switch_case_default_1(__anchor, { a: mode, b: pattern_1 }) {
|
|
213
220
|
_$_.try(
|
|
214
221
|
__anchor,
|
|
215
222
|
(__anchor) => {
|
|
216
223
|
var p_2 = root_10();
|
|
217
224
|
|
|
218
|
-
_$_.render(
|
|
219
|
-
a: '',
|
|
220
|
-
b: _$_.UNINITIALIZED,
|
|
221
|
-
_pattern_1: pattern_1,
|
|
222
|
-
_p_2: p_2
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
+
_$_.render(render_6, { a: '', b: _$_.UNINITIALIZED, _a: pattern_1, _b: p_2 });
|
|
225
226
|
_$_.append(__anchor, p_2);
|
|
226
227
|
},
|
|
227
228
|
null,
|
|
@@ -234,7 +235,7 @@ function switch_case_default_1(__anchor, { mode, pattern_1 }) {
|
|
|
234
235
|
);
|
|
235
236
|
}
|
|
236
237
|
|
|
237
|
-
function switch_2({ mode, pattern_1 }) {
|
|
238
|
+
function switch_2({ a: mode, b: pattern_1 }) {
|
|
238
239
|
switch (mode.value) {
|
|
239
240
|
case 'a':
|
|
240
241
|
return switch_case_0_1;
|
|
@@ -244,9 +245,9 @@ function switch_2({ mode, pattern_1 }) {
|
|
|
244
245
|
}
|
|
245
246
|
}
|
|
246
247
|
|
|
247
|
-
var root_7 = _$_.
|
|
248
|
+
var root_7 = _$_.template_el('div', ['class', 'mixed-reactive-list']);
|
|
248
249
|
|
|
249
|
-
function consequent_1(__anchor, { show, items, mode }) {
|
|
250
|
+
function consequent_1(__anchor, { a: show, b: items, c: mode }) {
|
|
250
251
|
var div_4 = root_7();
|
|
251
252
|
|
|
252
253
|
{
|
|
@@ -254,7 +255,7 @@ function consequent_1(__anchor, { show, items, mode }) {
|
|
|
254
255
|
div_4,
|
|
255
256
|
() => items.value,
|
|
256
257
|
(__anchor, pattern_1) => {
|
|
257
|
-
_$_.switch(__anchor, switch_2, true, { mode, pattern_1 });
|
|
258
|
+
_$_.switch(__anchor, switch_2, true, { a: mode, b: pattern_1 });
|
|
258
259
|
},
|
|
259
260
|
4,
|
|
260
261
|
(pattern_1) => pattern_1.id
|
|
@@ -266,17 +267,26 @@ function consequent_1(__anchor, { show, items, mode }) {
|
|
|
266
267
|
_$_.append(__anchor, div_4);
|
|
267
268
|
}
|
|
268
269
|
|
|
269
|
-
function if_2({ show, items, mode }) {
|
|
270
|
+
function if_2({ a: show, b: items, c: mode }) {
|
|
270
271
|
if (show.value) return consequent_1;
|
|
271
272
|
}
|
|
272
273
|
|
|
273
|
-
var root_6 = _$_.template(`<button class=
|
|
274
|
+
var root_6 = _$_.template(`<button class=toggle-show>Toggle Show</button><button class=toggle-mode>Toggle Mode</button><button class=add-item>Add Item</button><!>`, 1, 4);
|
|
275
|
+
|
|
276
|
+
function render_7(__prev) {
|
|
277
|
+
var __a = if_2({ a: __prev._a, b: __prev._b, c: __prev._c });
|
|
278
|
+
|
|
279
|
+
if (__prev.a !== __a) {
|
|
280
|
+
_$_.if_update(__prev._d, __prev.a = __a);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
274
284
|
var root_5 = _$_.template(`<!>`, 1, 1);
|
|
275
285
|
|
|
276
286
|
function MixedControlFlowReactive_render(__anchor, __block) {
|
|
277
|
-
const show = _$_.track(true, __block, '
|
|
278
|
-
const mode = _$_.track('a', __block, '
|
|
279
|
-
const items = _$_.track([{ id: 1, label: 'One' }, { id: 2, label: 'Two' }], __block, '
|
|
287
|
+
const show = _$_.track(true, __block, 'p7xgkm');
|
|
288
|
+
const mode = _$_.track('a', __block, 'pc8xwi');
|
|
289
|
+
const items = _$_.track([{ id: 1, label: 'One' }, { id: 2, label: 'Two' }], __block, 'xgaqxi');
|
|
280
290
|
var fragment = root_5();
|
|
281
291
|
var node_1 = _$_.first_child_frag(fragment);
|
|
282
292
|
|
|
@@ -301,8 +311,16 @@ function MixedControlFlowReactive_render(__anchor, __block) {
|
|
|
301
311
|
};
|
|
302
312
|
|
|
303
313
|
var node = _$_.hydrating ? _$_.hydrate_sibling() : button_2.nextSibling;
|
|
314
|
+
var ifs_1 = _$_.if_static(node, if_2, 0, { a: show, b: items, c: mode });
|
|
315
|
+
|
|
316
|
+
_$_.render(render_7, {
|
|
317
|
+
a: _$_.UNINITIALIZED,
|
|
318
|
+
_a: show,
|
|
319
|
+
_b: items,
|
|
320
|
+
_c: mode,
|
|
321
|
+
_d: ifs_1
|
|
322
|
+
});
|
|
304
323
|
|
|
305
|
-
_$_.if(node, if_2, false, { show, items, mode });
|
|
306
324
|
_$_.append(__anchor, fragment_1);
|
|
307
325
|
}));
|
|
308
326
|
|
|
@@ -311,10 +329,10 @@ function MixedControlFlowReactive_render(__anchor, __block) {
|
|
|
311
329
|
|
|
312
330
|
MixedControlFlowReactive[_$_.$r] = MixedControlFlowReactive_render;
|
|
313
331
|
|
|
314
|
-
var root_14 = _$_.
|
|
315
|
-
var root_15 = _$_.
|
|
332
|
+
var root_14 = _$_.template_el('div');
|
|
333
|
+
var root_15 = _$_.template_el('div', ['class', 'unexpected'], 'unexpected');
|
|
316
334
|
|
|
317
|
-
function switch_case_0_2(__anchor, { state, row }) {
|
|
335
|
+
function switch_case_0_2(__anchor, { a: state, b: row }) {
|
|
318
336
|
_$_.try(
|
|
319
337
|
__anchor,
|
|
320
338
|
(__anchor) => {
|
|
@@ -324,7 +342,7 @@ function switch_case_0_2(__anchor, { state, row }) {
|
|
|
324
342
|
(__anchor) => {
|
|
325
343
|
var div_6 = root_14();
|
|
326
344
|
|
|
327
|
-
_$_.set_class(div_6, `pending-row pending-row-${row}
|
|
345
|
+
_$_.set_class(div_6, `pending-row pending-row-${row}`);
|
|
328
346
|
|
|
329
347
|
{
|
|
330
348
|
div_6.textContent = `pending ${row}`;
|
|
@@ -336,13 +354,13 @@ function switch_case_0_2(__anchor, { state, row }) {
|
|
|
336
354
|
);
|
|
337
355
|
}
|
|
338
356
|
|
|
339
|
-
function switch_case_default_2(__anchor, { state, row }) {
|
|
357
|
+
function switch_case_default_2(__anchor, { a: state, b: row }) {
|
|
340
358
|
var div_7 = root_15();
|
|
341
359
|
|
|
342
360
|
_$_.append(__anchor, div_7);
|
|
343
361
|
}
|
|
344
362
|
|
|
345
|
-
function switch_3({ state, row }) {
|
|
363
|
+
function switch_3({ a: state, b: row }) {
|
|
346
364
|
switch (state) {
|
|
347
365
|
case 'slow':
|
|
348
366
|
return switch_case_0_2;
|
|
@@ -352,15 +370,15 @@ function switch_3({ state, row }) {
|
|
|
352
370
|
}
|
|
353
371
|
}
|
|
354
372
|
|
|
355
|
-
function consequent_2(__anchor, { row, state }) {
|
|
356
|
-
_$_.switch(__anchor, switch_3, true, { state, row });
|
|
373
|
+
function consequent_2(__anchor, { a: row, b: state }) {
|
|
374
|
+
_$_.switch(__anchor, switch_3, true, { a: state, b: row });
|
|
357
375
|
}
|
|
358
376
|
|
|
359
|
-
function if_3({ row, state }) {
|
|
377
|
+
function if_3({ a: row, b: state }) {
|
|
360
378
|
if (row === 1) return consequent_2;
|
|
361
379
|
}
|
|
362
380
|
|
|
363
|
-
var root_13 = _$_.template(`<div class=
|
|
381
|
+
var root_13 = _$_.template(`<div class=before>before</div><!>`, 1, 2);
|
|
364
382
|
var root_12 = _$_.template(`<!>`, 1, 1);
|
|
365
383
|
|
|
366
384
|
function MixedControlFlowAsyncPending_render(__anchor, __block) {
|
|
@@ -378,7 +396,7 @@ function MixedControlFlowAsyncPending_render(__anchor, __block) {
|
|
|
378
396
|
node_2,
|
|
379
397
|
() => rows,
|
|
380
398
|
(__anchor, row) => {
|
|
381
|
-
_$_.if(__anchor, if_3, true, { row, state });
|
|
399
|
+
_$_.if(__anchor, if_3, true, { a: row, b: state });
|
|
382
400
|
},
|
|
383
401
|
0
|
|
384
402
|
);
|
|
@@ -391,10 +409,10 @@ function MixedControlFlowAsyncPending_render(__anchor, __block) {
|
|
|
391
409
|
|
|
392
410
|
MixedControlFlowAsyncPending[_$_.$r] = MixedControlFlowAsyncPending_render;
|
|
393
411
|
|
|
394
|
-
var root_16 = _$_.
|
|
412
|
+
var root_16 = _$_.template_el('div', ['class', 'resolved-row'], ' ');
|
|
395
413
|
|
|
396
414
|
function AsyncRow_render(__anchor, __block, { label }) {
|
|
397
|
-
const value = _$_.track_async(() => _$_.with_scope(__block, () => Promise.resolve(label)), __block, '
|
|
415
|
+
const value = _$_.track_async(() => _$_.with_scope(__block, () => Promise.resolve(label)), __block, '4nsq00');
|
|
398
416
|
var div_8 = root_16();
|
|
399
417
|
|
|
400
418
|
{
|