ripple 0.3.84 → 0.3.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/package.json +3 -3
- package/src/constants.js +4 -0
- package/src/runtime/internal/client/component.js +3 -3
- package/src/runtime/internal/client/constants.js +4 -0
- package/src/runtime/internal/client/for.js +22 -1
- package/src/runtime/internal/client/if.js +18 -2
- package/src/runtime/internal/client/index.js +1 -0
- package/src/runtime/internal/client/operations.js +25 -0
- package/src/runtime/internal/client/runtime.js +62 -10
- package/src/runtime/internal/client/switch.js +16 -2
- package/src/runtime/internal/client/template.js +10 -2
- package/src/runtime/internal/client/try.js +12 -2
- package/src/runtime/internal/client/types.d.ts +4 -0
- package/tests/client/__snapshots__/for.test.tsrx.snap +0 -2
- package/tests/client/compiler/compiler.basic.test.tsrx +5 -2
- package/tests/client/composite/__snapshots__/composite.render.test.tsrx.snap +0 -4
- package/tests/client/scoped-flush.test.tsrx +105 -0
- package/tests/hydration/compiled/client/basic.js +198 -214
- package/tests/hydration/compiled/client/composite.js +23 -72
- package/tests/hydration/compiled/client/for.js +66 -72
- package/tests/hydration/compiled/client/hmr.js +2 -13
- package/tests/hydration/compiled/client/html.js +619 -479
- package/tests/hydration/compiled/client/if-children.js +72 -84
- package/tests/hydration/compiled/client/if.js +87 -92
- package/tests/hydration/compiled/client/mixed-control-flow.js +120 -160
- package/tests/hydration/compiled/client/nested-control-flow.js +288 -360
- package/tests/hydration/compiled/client/portal.js +15 -21
- package/tests/hydration/compiled/client/reactivity.js +7 -12
- package/tests/hydration/compiled/client/switch.js +113 -115
- package/tests/hydration/compiled/client/track-async-serialization.js +71 -122
- package/tests/hydration/compiled/client/try.js +26 -41
- package/tests/hydration/compiled/server/basic.js +268 -556
- package/tests/hydration/compiled/server/composite.js +31 -50
- package/tests/hydration/compiled/server/events.js +37 -173
- package/tests/hydration/compiled/server/for.js +236 -847
- package/tests/hydration/compiled/server/head.js +110 -241
- package/tests/hydration/compiled/server/hmr.js +14 -41
- package/tests/hydration/compiled/server/html-in-template.js +14 -38
- package/tests/hydration/compiled/server/html.js +951 -1176
- package/tests/hydration/compiled/server/if-children.js +59 -493
- package/tests/hydration/compiled/server/if.js +57 -209
- package/tests/hydration/compiled/server/mixed-control-flow.js +144 -250
- package/tests/hydration/compiled/server/nested-control-flow.js +309 -559
- package/tests/hydration/compiled/server/portal.js +94 -156
- package/tests/hydration/compiled/server/reactivity.js +23 -65
- package/tests/hydration/compiled/server/return.js +6 -16
- package/tests/hydration/compiled/server/switch.js +91 -219
- package/tests/hydration/compiled/server/track-async-serialization.js +211 -256
- package/tests/hydration/compiled/server/try.js +67 -126
- package/tests/hydration/components/html.tsrx +75 -0
- package/tests/hydration/html.test.js +50 -0
- package/tests/server/compiler.test.tsrx +6 -2
|
@@ -22,15 +22,10 @@ function ServerCallResult({ count }) {
|
|
|
22
22
|
let lazy = _$_.track_async(() => formatValue(count.value), '2e21cbe9');
|
|
23
23
|
|
|
24
24
|
_$_.regular_block(() => {
|
|
25
|
-
|
|
26
|
-
_$_.output_push(' class="result"');
|
|
27
|
-
_$_.output_push('>');
|
|
25
|
+
let __out = '';
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
_$_.output_push('</p>');
|
|
27
|
+
__out += '<p class="result">' + _$_.escape(lazy.value) + '</p>';
|
|
28
|
+
_$_.output_push(__out);
|
|
34
29
|
});
|
|
35
30
|
});
|
|
36
31
|
}
|
|
@@ -40,46 +35,40 @@ export function AsyncWithServerCall() {
|
|
|
40
35
|
let lazy_1 = _$_.track(0, 'f0c2b41e');
|
|
41
36
|
|
|
42
37
|
_$_.regular_block(() => {
|
|
43
|
-
|
|
44
|
-
_$_.output_push('<button');
|
|
45
|
-
_$_.output_push(' class="increment"');
|
|
46
|
-
_$_.output_push('>');
|
|
38
|
+
let __out = '';
|
|
47
39
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
40
|
+
__out += '<button class="increment">increment</button>';
|
|
41
|
+
_$_.output_push(__out);
|
|
42
|
+
__out = '';
|
|
51
43
|
|
|
52
|
-
|
|
44
|
+
_$_.try_block(
|
|
45
|
+
() => {
|
|
46
|
+
let __out = '';
|
|
53
47
|
|
|
54
|
-
|
|
55
|
-
() => {
|
|
56
|
-
_$_.output_push('<!--[-->');
|
|
48
|
+
__out += '<!--[-->';
|
|
57
49
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
50
|
+
{
|
|
51
|
+
const comp = ServerCallResult;
|
|
52
|
+
const args = [{ count: lazy_1 }];
|
|
61
53
|
|
|
62
|
-
|
|
63
|
-
|
|
54
|
+
_$_.output_push(__out);
|
|
55
|
+
__out = '';
|
|
56
|
+
_$_.render_component(comp, ...args);
|
|
57
|
+
}
|
|
64
58
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
_$_.output_push(' class="loading"');
|
|
72
|
-
_$_.output_push('>');
|
|
59
|
+
__out += '<!--]-->';
|
|
60
|
+
_$_.output_push(__out);
|
|
61
|
+
},
|
|
62
|
+
null,
|
|
63
|
+
() => {
|
|
64
|
+
let __out = '';
|
|
73
65
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
66
|
+
__out += '<!--[--><p class="loading">loading...</p><!--]-->';
|
|
67
|
+
_$_.output_push(__out);
|
|
68
|
+
}
|
|
69
|
+
);
|
|
77
70
|
|
|
78
|
-
|
|
79
|
-
_$_.output_push('<!--]-->');
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
}
|
|
71
|
+
_$_.output_push(__out);
|
|
83
72
|
});
|
|
84
73
|
});
|
|
85
74
|
}
|
|
@@ -88,41 +77,42 @@ export function AsyncSimpleValue() {
|
|
|
88
77
|
return _$_.tsrx_element(() => {
|
|
89
78
|
_$_.try_block(
|
|
90
79
|
() => {
|
|
91
|
-
|
|
80
|
+
let __out = '';
|
|
81
|
+
|
|
82
|
+
__out += '<!--[-->';
|
|
92
83
|
|
|
93
84
|
let lazy_2 = _$_.track_async(() => Promise.resolve('hydrated value'), '4e502c38');
|
|
94
85
|
|
|
95
|
-
_$_.
|
|
96
|
-
|
|
97
|
-
_$_.output_push(' class="result"');
|
|
98
|
-
_$_.output_push('>');
|
|
86
|
+
_$_.output_push(__out);
|
|
87
|
+
__out = '';
|
|
99
88
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
89
|
+
_$_.regular_block(() => {
|
|
90
|
+
let __out = '';
|
|
103
91
|
|
|
104
|
-
_$_.
|
|
92
|
+
__out += '<p class="result">' + _$_.escape(lazy_2.value) + '</p>';
|
|
93
|
+
_$_.output_push(__out);
|
|
105
94
|
});
|
|
106
95
|
|
|
107
|
-
|
|
96
|
+
__out += '<!--]-->';
|
|
97
|
+
_$_.output_push(__out);
|
|
108
98
|
},
|
|
109
99
|
null,
|
|
110
100
|
() => {
|
|
111
|
-
|
|
101
|
+
let __out = '';
|
|
112
102
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
_$_.output_push('>');
|
|
103
|
+
__out += '<!--[-->';
|
|
104
|
+
_$_.output_push(__out);
|
|
105
|
+
__out = '';
|
|
117
106
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
107
|
+
_$_.regular_block(() => {
|
|
108
|
+
let __out = '';
|
|
121
109
|
|
|
122
|
-
|
|
110
|
+
__out += '<p class="loading">loading...</p>';
|
|
111
|
+
_$_.output_push(__out);
|
|
123
112
|
});
|
|
124
113
|
|
|
125
|
-
|
|
114
|
+
__out += '<!--]-->';
|
|
115
|
+
_$_.output_push(__out);
|
|
126
116
|
}
|
|
127
117
|
);
|
|
128
118
|
});
|
|
@@ -132,41 +122,42 @@ export function AsyncNumericValue() {
|
|
|
132
122
|
return _$_.tsrx_element(() => {
|
|
133
123
|
_$_.try_block(
|
|
134
124
|
() => {
|
|
135
|
-
|
|
125
|
+
let __out = '';
|
|
126
|
+
|
|
127
|
+
__out += '<!--[-->';
|
|
136
128
|
|
|
137
129
|
let lazy_3 = _$_.track_async(() => Promise.resolve(42), '14891754');
|
|
138
130
|
|
|
139
|
-
_$_.
|
|
140
|
-
|
|
141
|
-
_$_.output_push(' class="count"');
|
|
142
|
-
_$_.output_push('>');
|
|
131
|
+
_$_.output_push(__out);
|
|
132
|
+
__out = '';
|
|
143
133
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
134
|
+
_$_.regular_block(() => {
|
|
135
|
+
let __out = '';
|
|
147
136
|
|
|
148
|
-
_$_.
|
|
137
|
+
__out += '<span class="count">' + _$_.escape(lazy_3.value) + '</span>';
|
|
138
|
+
_$_.output_push(__out);
|
|
149
139
|
});
|
|
150
140
|
|
|
151
|
-
|
|
141
|
+
__out += '<!--]-->';
|
|
142
|
+
_$_.output_push(__out);
|
|
152
143
|
},
|
|
153
144
|
null,
|
|
154
145
|
() => {
|
|
155
|
-
|
|
146
|
+
let __out = '';
|
|
156
147
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
_$_.output_push('>');
|
|
148
|
+
__out += '<!--[-->';
|
|
149
|
+
_$_.output_push(__out);
|
|
150
|
+
__out = '';
|
|
161
151
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
152
|
+
_$_.regular_block(() => {
|
|
153
|
+
let __out = '';
|
|
165
154
|
|
|
166
|
-
|
|
155
|
+
__out += '<span class="pending">...</span>';
|
|
156
|
+
_$_.output_push(__out);
|
|
167
157
|
});
|
|
168
158
|
|
|
169
|
-
|
|
159
|
+
__out += '<!--]-->';
|
|
160
|
+
_$_.output_push(__out);
|
|
170
161
|
}
|
|
171
162
|
);
|
|
172
163
|
});
|
|
@@ -176,58 +167,42 @@ export function AsyncObjectValue() {
|
|
|
176
167
|
return _$_.tsrx_element(() => {
|
|
177
168
|
_$_.try_block(
|
|
178
169
|
() => {
|
|
179
|
-
|
|
170
|
+
let __out = '';
|
|
180
171
|
|
|
181
|
-
|
|
172
|
+
__out += '<!--[-->';
|
|
182
173
|
|
|
183
|
-
_$_.
|
|
184
|
-
_$_.output_push('<div');
|
|
185
|
-
_$_.output_push(' class="user"');
|
|
186
|
-
_$_.output_push('>');
|
|
187
|
-
|
|
188
|
-
{
|
|
189
|
-
_$_.output_push('<span');
|
|
190
|
-
_$_.output_push(' class="name"');
|
|
191
|
-
_$_.output_push('>');
|
|
192
|
-
|
|
193
|
-
{
|
|
194
|
-
_$_.output_push(_$_.escape(lazy_4.value.name));
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
_$_.output_push('</span>');
|
|
198
|
-
_$_.output_push('<span');
|
|
199
|
-
_$_.output_push(' class="age"');
|
|
200
|
-
_$_.output_push('>');
|
|
174
|
+
let lazy_4 = _$_.track_async(() => Promise.resolve({ name: 'Alice', age: 30 }), 'f325448a');
|
|
201
175
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
}
|
|
176
|
+
_$_.output_push(__out);
|
|
177
|
+
__out = '';
|
|
205
178
|
|
|
206
|
-
|
|
207
|
-
|
|
179
|
+
_$_.regular_block(() => {
|
|
180
|
+
let __out = '';
|
|
208
181
|
|
|
209
|
-
_$_.
|
|
182
|
+
__out += '<div class="user"><span class="name">' + _$_.escape(lazy_4.value.name) + '</span><span class="age">' + _$_.escape(lazy_4.value.age) + '</span></div>';
|
|
183
|
+
_$_.output_push(__out);
|
|
210
184
|
});
|
|
211
185
|
|
|
212
|
-
|
|
186
|
+
__out += '<!--]-->';
|
|
187
|
+
_$_.output_push(__out);
|
|
213
188
|
},
|
|
214
189
|
null,
|
|
215
190
|
() => {
|
|
216
|
-
|
|
191
|
+
let __out = '';
|
|
217
192
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
_$_.output_push('>');
|
|
193
|
+
__out += '<!--[-->';
|
|
194
|
+
_$_.output_push(__out);
|
|
195
|
+
__out = '';
|
|
222
196
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}
|
|
197
|
+
_$_.regular_block(() => {
|
|
198
|
+
let __out = '';
|
|
226
199
|
|
|
227
|
-
|
|
200
|
+
__out += '<div class="loading">loading user...</div>';
|
|
201
|
+
_$_.output_push(__out);
|
|
228
202
|
});
|
|
229
203
|
|
|
230
|
-
|
|
204
|
+
__out += '<!--]-->';
|
|
205
|
+
_$_.output_push(__out);
|
|
231
206
|
}
|
|
232
207
|
);
|
|
233
208
|
});
|
|
@@ -237,59 +212,43 @@ export function AsyncMultipleValues() {
|
|
|
237
212
|
return _$_.tsrx_element(() => {
|
|
238
213
|
_$_.try_block(
|
|
239
214
|
() => {
|
|
240
|
-
|
|
215
|
+
let __out = '';
|
|
216
|
+
|
|
217
|
+
__out += '<!--[-->';
|
|
241
218
|
|
|
242
219
|
let lazy_5 = _$_.track_async(() => Promise.resolve('alpha'), 'ab8199a0');
|
|
243
220
|
let lazy_6 = _$_.track_async(() => Promise.resolve('beta'), 'fb7ad40b');
|
|
244
221
|
|
|
245
|
-
_$_.
|
|
246
|
-
|
|
247
|
-
_$_.output_push(' class="multi"');
|
|
248
|
-
_$_.output_push('>');
|
|
249
|
-
|
|
250
|
-
{
|
|
251
|
-
_$_.output_push('<span');
|
|
252
|
-
_$_.output_push(' class="first"');
|
|
253
|
-
_$_.output_push('>');
|
|
254
|
-
|
|
255
|
-
{
|
|
256
|
-
_$_.output_push(_$_.escape(lazy_5.value));
|
|
257
|
-
}
|
|
222
|
+
_$_.output_push(__out);
|
|
223
|
+
__out = '';
|
|
258
224
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
_$_.output_push(' class="second"');
|
|
262
|
-
_$_.output_push('>');
|
|
263
|
-
|
|
264
|
-
{
|
|
265
|
-
_$_.output_push(_$_.escape(lazy_6.value));
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
_$_.output_push('</span>');
|
|
269
|
-
}
|
|
225
|
+
_$_.regular_block(() => {
|
|
226
|
+
let __out = '';
|
|
270
227
|
|
|
271
|
-
_$_.
|
|
228
|
+
__out += '<div class="multi"><span class="first">' + _$_.escape(lazy_5.value) + '</span><span class="second">' + _$_.escape(lazy_6.value) + '</span></div>';
|
|
229
|
+
_$_.output_push(__out);
|
|
272
230
|
});
|
|
273
231
|
|
|
274
|
-
|
|
232
|
+
__out += '<!--]-->';
|
|
233
|
+
_$_.output_push(__out);
|
|
275
234
|
},
|
|
276
235
|
null,
|
|
277
236
|
() => {
|
|
278
|
-
|
|
237
|
+
let __out = '';
|
|
279
238
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
_$_.output_push('>');
|
|
239
|
+
__out += '<!--[-->';
|
|
240
|
+
_$_.output_push(__out);
|
|
241
|
+
__out = '';
|
|
284
242
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
}
|
|
243
|
+
_$_.regular_block(() => {
|
|
244
|
+
let __out = '';
|
|
288
245
|
|
|
289
|
-
|
|
246
|
+
__out += '<div class="loading">loading...</div>';
|
|
247
|
+
_$_.output_push(__out);
|
|
290
248
|
});
|
|
291
249
|
|
|
292
|
-
|
|
250
|
+
__out += '<!--]-->';
|
|
251
|
+
_$_.output_push(__out);
|
|
293
252
|
}
|
|
294
253
|
);
|
|
295
254
|
});
|
|
@@ -299,57 +258,58 @@ export function AsyncWithCatch() {
|
|
|
299
258
|
return _$_.tsrx_element(() => {
|
|
300
259
|
_$_.try_block(
|
|
301
260
|
() => {
|
|
302
|
-
|
|
261
|
+
let __out = '';
|
|
262
|
+
|
|
263
|
+
__out += '<!--[-->';
|
|
303
264
|
|
|
304
265
|
let lazy_7 = _$_.track_async(() => Promise.reject(new Error('fetch failed')), '99982de5');
|
|
305
266
|
|
|
306
|
-
_$_.
|
|
307
|
-
|
|
308
|
-
_$_.output_push(' class="result"');
|
|
309
|
-
_$_.output_push('>');
|
|
267
|
+
_$_.output_push(__out);
|
|
268
|
+
__out = '';
|
|
310
269
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}
|
|
270
|
+
_$_.regular_block(() => {
|
|
271
|
+
let __out = '';
|
|
314
272
|
|
|
315
|
-
_$_.
|
|
273
|
+
__out += '<p class="result">' + _$_.escape(lazy_7.value) + '</p>';
|
|
274
|
+
_$_.output_push(__out);
|
|
316
275
|
});
|
|
317
276
|
|
|
318
|
-
|
|
277
|
+
__out += '<!--]-->';
|
|
278
|
+
_$_.output_push(__out);
|
|
319
279
|
},
|
|
320
280
|
(e) => {
|
|
321
|
-
|
|
281
|
+
let __out = '';
|
|
322
282
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
_$_.output_push('>');
|
|
283
|
+
__out += '<!--[-->';
|
|
284
|
+
_$_.output_push(__out);
|
|
285
|
+
__out = '';
|
|
327
286
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
}
|
|
287
|
+
_$_.regular_block(() => {
|
|
288
|
+
let __out = '';
|
|
331
289
|
|
|
332
|
-
_$_.
|
|
290
|
+
__out += '<p class="error">' + _$_.escape(e.message) + '</p>';
|
|
291
|
+
_$_.output_push(__out);
|
|
333
292
|
});
|
|
334
293
|
|
|
335
|
-
|
|
294
|
+
__out += '<!--]-->';
|
|
295
|
+
_$_.output_push(__out);
|
|
336
296
|
},
|
|
337
297
|
() => {
|
|
338
|
-
|
|
298
|
+
let __out = '';
|
|
339
299
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
_$_.output_push('>');
|
|
300
|
+
__out += '<!--[-->';
|
|
301
|
+
_$_.output_push(__out);
|
|
302
|
+
__out = '';
|
|
344
303
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
}
|
|
304
|
+
_$_.regular_block(() => {
|
|
305
|
+
let __out = '';
|
|
348
306
|
|
|
349
|
-
|
|
307
|
+
__out += '<p class="loading">loading...</p>';
|
|
308
|
+
_$_.output_push(__out);
|
|
350
309
|
});
|
|
351
310
|
|
|
352
|
-
|
|
311
|
+
__out += '<!--]-->';
|
|
312
|
+
_$_.output_push(__out);
|
|
353
313
|
}
|
|
354
314
|
);
|
|
355
315
|
});
|
|
@@ -359,41 +319,42 @@ export function ChildWithError() {
|
|
|
359
319
|
return _$_.tsrx_element(() => {
|
|
360
320
|
_$_.try_block(
|
|
361
321
|
() => {
|
|
362
|
-
|
|
322
|
+
let __out = '';
|
|
323
|
+
|
|
324
|
+
__out += '<!--[-->';
|
|
363
325
|
|
|
364
326
|
let lazy_8 = _$_.track_async(() => Promise.reject(new Error('child error')), '1dea4c85');
|
|
365
327
|
|
|
366
|
-
_$_.
|
|
367
|
-
|
|
368
|
-
_$_.output_push(' class="result"');
|
|
369
|
-
_$_.output_push('>');
|
|
328
|
+
_$_.output_push(__out);
|
|
329
|
+
__out = '';
|
|
370
330
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
}
|
|
331
|
+
_$_.regular_block(() => {
|
|
332
|
+
let __out = '';
|
|
374
333
|
|
|
375
|
-
_$_.
|
|
334
|
+
__out += '<p class="result">' + _$_.escape(lazy_8.value) + '</p>';
|
|
335
|
+
_$_.output_push(__out);
|
|
376
336
|
});
|
|
377
337
|
|
|
378
|
-
|
|
338
|
+
__out += '<!--]-->';
|
|
339
|
+
_$_.output_push(__out);
|
|
379
340
|
},
|
|
380
341
|
null,
|
|
381
342
|
() => {
|
|
382
|
-
|
|
343
|
+
let __out = '';
|
|
383
344
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
_$_.output_push('>');
|
|
345
|
+
__out += '<!--[-->';
|
|
346
|
+
_$_.output_push(__out);
|
|
347
|
+
__out = '';
|
|
388
348
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
}
|
|
349
|
+
_$_.regular_block(() => {
|
|
350
|
+
let __out = '';
|
|
392
351
|
|
|
393
|
-
|
|
352
|
+
__out += '<p class="pending">loading...</p>';
|
|
353
|
+
_$_.output_push(__out);
|
|
394
354
|
});
|
|
395
355
|
|
|
396
|
-
|
|
356
|
+
__out += '<!--]-->';
|
|
357
|
+
_$_.output_push(__out);
|
|
397
358
|
}
|
|
398
359
|
);
|
|
399
360
|
});
|
|
@@ -403,7 +364,11 @@ export function ParentWithCatch() {
|
|
|
403
364
|
return _$_.tsrx_element(() => {
|
|
404
365
|
_$_.try_block(
|
|
405
366
|
() => {
|
|
406
|
-
|
|
367
|
+
let __out = '';
|
|
368
|
+
|
|
369
|
+
__out += '<!--[-->';
|
|
370
|
+
_$_.output_push(__out);
|
|
371
|
+
__out = '';
|
|
407
372
|
|
|
408
373
|
_$_.regular_block(() => {
|
|
409
374
|
{
|
|
@@ -414,24 +379,25 @@ export function ParentWithCatch() {
|
|
|
414
379
|
}
|
|
415
380
|
});
|
|
416
381
|
|
|
417
|
-
|
|
382
|
+
__out += '<!--]-->';
|
|
383
|
+
_$_.output_push(__out);
|
|
418
384
|
},
|
|
419
385
|
(e) => {
|
|
420
|
-
|
|
386
|
+
let __out = '';
|
|
421
387
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
_$_.output_push('>');
|
|
388
|
+
__out += '<!--[-->';
|
|
389
|
+
_$_.output_push(__out);
|
|
390
|
+
__out = '';
|
|
426
391
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}
|
|
392
|
+
_$_.regular_block(() => {
|
|
393
|
+
let __out = '';
|
|
430
394
|
|
|
431
|
-
_$_.
|
|
395
|
+
__out += '<p class="parent-error">' + _$_.escape(e.message) + '</p>';
|
|
396
|
+
_$_.output_push(__out);
|
|
432
397
|
});
|
|
433
398
|
|
|
434
|
-
|
|
399
|
+
__out += '<!--]-->';
|
|
400
|
+
_$_.output_push(__out);
|
|
435
401
|
},
|
|
436
402
|
null
|
|
437
403
|
);
|
|
@@ -443,15 +409,10 @@ function ReactiveDependencyResult({ count }) {
|
|
|
443
409
|
let lazy_9 = _$_.track_async(() => Promise.resolve(`count-${count.value}`), 'c9d12acf');
|
|
444
410
|
|
|
445
411
|
_$_.regular_block(() => {
|
|
446
|
-
|
|
447
|
-
_$_.output_push(' class="result"');
|
|
448
|
-
_$_.output_push('>');
|
|
449
|
-
|
|
450
|
-
{
|
|
451
|
-
_$_.output_push(_$_.escape(lazy_9.value));
|
|
452
|
-
}
|
|
412
|
+
let __out = '';
|
|
453
413
|
|
|
454
|
-
_$_.
|
|
414
|
+
__out += '<p class="result">' + _$_.escape(lazy_9.value) + '</p>';
|
|
415
|
+
_$_.output_push(__out);
|
|
455
416
|
});
|
|
456
417
|
});
|
|
457
418
|
}
|
|
@@ -461,46 +422,40 @@ export function AsyncWithReactiveDependency() {
|
|
|
461
422
|
let lazy_10 = _$_.track(0, 'cdd1adb8');
|
|
462
423
|
|
|
463
424
|
_$_.regular_block(() => {
|
|
464
|
-
|
|
465
|
-
_$_.output_push('<button');
|
|
466
|
-
_$_.output_push(' class="increment"');
|
|
467
|
-
_$_.output_push('>');
|
|
425
|
+
let __out = '';
|
|
468
426
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
427
|
+
__out += '<button class="increment">increment</button>';
|
|
428
|
+
_$_.output_push(__out);
|
|
429
|
+
__out = '';
|
|
472
430
|
|
|
473
|
-
|
|
431
|
+
_$_.try_block(
|
|
432
|
+
() => {
|
|
433
|
+
let __out = '';
|
|
474
434
|
|
|
475
|
-
|
|
476
|
-
() => {
|
|
477
|
-
_$_.output_push('<!--[-->');
|
|
435
|
+
__out += '<!--[-->';
|
|
478
436
|
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
437
|
+
{
|
|
438
|
+
const comp = ReactiveDependencyResult;
|
|
439
|
+
const args = [{ count: lazy_10 }];
|
|
482
440
|
|
|
483
|
-
|
|
484
|
-
|
|
441
|
+
_$_.output_push(__out);
|
|
442
|
+
__out = '';
|
|
443
|
+
_$_.render_component(comp, ...args);
|
|
444
|
+
}
|
|
485
445
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
_$_.output_push(' class="loading"');
|
|
493
|
-
_$_.output_push('>');
|
|
446
|
+
__out += '<!--]-->';
|
|
447
|
+
_$_.output_push(__out);
|
|
448
|
+
},
|
|
449
|
+
null,
|
|
450
|
+
() => {
|
|
451
|
+
let __out = '';
|
|
494
452
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
453
|
+
__out += '<!--[--><p class="loading">loading...</p><!--]-->';
|
|
454
|
+
_$_.output_push(__out);
|
|
455
|
+
}
|
|
456
|
+
);
|
|
498
457
|
|
|
499
|
-
|
|
500
|
-
_$_.output_push('<!--]-->');
|
|
501
|
-
}
|
|
502
|
-
);
|
|
503
|
-
}
|
|
458
|
+
_$_.output_push(__out);
|
|
504
459
|
});
|
|
505
460
|
});
|
|
506
461
|
}
|