ripple 0.3.103 → 0.3.105
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 +4 -0
- package/package.json +1 -1
- package/tests/client/array/array.static.test.tsrx +1 -3
- package/tests/client/async-suspend.test.tsrx +3 -9
- package/tests/client/basic/basic.collections.test.tsrx +1 -3
- package/tests/client/basic/basic.errors.test.tsrx +1 -3
- package/tests/client/basic/basic.reactivity.test.tsrx +6 -18
- package/tests/client/basic/basic.rendering.test.tsrx +2 -6
- package/tests/client/boundaries.test.tsrx +2 -6
- package/tests/client/code-block-children.test.tsrx +3 -9
- package/tests/client/composite/composite.reactivity.test.tsrx +1 -3
- package/tests/client/for.test.tsrx +4 -12
- package/tests/client/head.test.tsrx +1 -3
- package/tests/client/object.test.tsrx +2 -6
- package/tests/client/switch.test.tsrx +6 -18
- package/tests/client/tsx.test.tsrx +2 -6
- package/tests/hydration/compiled/client/head.js +3 -3
- package/tests/hydration/compiled/client/streaming.js +1 -1
- package/tests/hydration/compiled/server/head.js +2 -2
- package/tests/hydration/compiled/server/streaming.js +1 -1
- package/tests/hydration/components/head.tsrx +1 -3
- package/tests/hydration/components/streaming.tsrx +2 -6
- package/tests/server/code-block-children.test.tsrx +3 -9
- package/tests/server/head.test.tsrx +1 -3
- package/tests/server/streaming-ssr.test.tsrx +8 -24
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Ripple is an elegant TypeScript UI framework",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Dominic Gannaway",
|
|
6
|
-
"version": "0.3.
|
|
6
|
+
"version": "0.3.105",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"module": "src/runtime/index-client.js",
|
|
9
9
|
"main": "src/runtime/index-client.js",
|
|
@@ -138,9 +138,7 @@ describe('RippleArray > static', () => {
|
|
|
138
138
|
<div>{'Loading...'}</div>
|
|
139
139
|
} @catch (e) {
|
|
140
140
|
<>
|
|
141
|
-
<pre>
|
|
142
|
-
{'Error: ' + (e as Error).message}
|
|
143
|
-
</pre>
|
|
141
|
+
<pre>{'Error: ' + (e as Error).message}</pre>
|
|
144
142
|
<pre>{'No items'}</pre>
|
|
145
143
|
</>
|
|
146
144
|
}
|
|
@@ -361,9 +361,7 @@ describe('async suspense', () => {
|
|
|
361
361
|
});
|
|
362
362
|
// this is to make the times_rendered render together with double
|
|
363
363
|
<>
|
|
364
|
-
<div class="double">
|
|
365
|
-
{double + (++times_rendered - times_rendered)}
|
|
366
|
-
</div>
|
|
364
|
+
<div class="double">{double + (++times_rendered - times_rendered)}</div>
|
|
367
365
|
<div class="quadruple">{quadruple}</div>
|
|
368
366
|
</>
|
|
369
367
|
}
|
|
@@ -456,9 +454,7 @@ describe('async suspense', () => {
|
|
|
456
454
|
});
|
|
457
455
|
// this is to make the times_rendered render together with double
|
|
458
456
|
<>
|
|
459
|
-
<div class="double">
|
|
460
|
-
{double + (++times_rendered - times_rendered)}
|
|
461
|
-
</div>
|
|
457
|
+
<div class="double">{double + (++times_rendered - times_rendered)}</div>
|
|
462
458
|
<div class="quadruple">{quadruple}</div>
|
|
463
459
|
</>
|
|
464
460
|
}
|
|
@@ -541,9 +537,7 @@ describe('async suspense', () => {
|
|
|
541
537
|
});
|
|
542
538
|
// this is to make the times_rendered render together with double
|
|
543
539
|
<>
|
|
544
|
-
<div class="double">
|
|
545
|
-
{double + (++times_rendered - times_rendered)}
|
|
546
|
-
</div>
|
|
540
|
+
<div class="double">{double + (++times_rendered - times_rendered)}</div>
|
|
547
541
|
<div class="quadruple">{quadruple}</div>
|
|
548
542
|
</>
|
|
549
543
|
}
|
|
@@ -86,9 +86,7 @@ describe('basic client > collections', () => {
|
|
|
86
86
|
<>
|
|
87
87
|
<pre>{String(array[3])}</pre>
|
|
88
88
|
<pre>{array[0]}</pre>
|
|
89
|
-
<pre>
|
|
90
|
-
{TRACKED_ARRAY in array}
|
|
91
|
-
</pre>
|
|
89
|
+
<pre>{TRACKED_ARRAY in array}</pre>
|
|
92
90
|
<button
|
|
93
91
|
onClick={() => {
|
|
94
92
|
array.push(array.length + 1);
|
|
@@ -17,9 +17,7 @@ describe('basic client > errors', () => {
|
|
|
17
17
|
<div>
|
|
18
18
|
<button onClick={triggerError}>{'Trigger Error'}</button>
|
|
19
19
|
@if (hasError) {
|
|
20
|
-
<div class="error">
|
|
21
|
-
{'Error caught: ' + errorMessage}
|
|
22
|
-
</div>
|
|
20
|
+
<div class="error">{'Error caught: ' + errorMessage}</div>
|
|
23
21
|
} @else {
|
|
24
22
|
<div class="success">{'No error'}</div>
|
|
25
23
|
}
|
|
@@ -92,9 +92,7 @@ describe('basic client > reactivity', () => {
|
|
|
92
92
|
let &[count] = track(5);
|
|
93
93
|
<>
|
|
94
94
|
<div class="count">{count}</div>
|
|
95
|
-
<div class="doubled">
|
|
96
|
-
{count * 2}
|
|
97
|
-
</div>
|
|
95
|
+
<div class="doubled">{count * 2}</div>
|
|
98
96
|
<div class="is-even">
|
|
99
97
|
{count % 2 === 0 ? 'Even' : 'Odd'}
|
|
100
98
|
</div>
|
|
@@ -162,18 +160,10 @@ describe('basic client > reactivity', () => {
|
|
|
162
160
|
>
|
|
163
161
|
{'second: ' + second.value}
|
|
164
162
|
</button>
|
|
165
|
-
<div>
|
|
166
|
-
|
|
167
|
-
</div>
|
|
168
|
-
<div>
|
|
169
|
-
{'Comma Separated: ' + arr.map((a) => a.value).join(', ')}
|
|
170
|
-
</div>
|
|
171
|
-
<div>
|
|
172
|
-
{'Number to string: ' + arr.map((a) => String(a.value))}
|
|
173
|
-
</div>
|
|
174
|
-
<div>
|
|
175
|
-
{'Even numbers: ' + arr.map((a) => a.value).filter((a) => a % 2 === 0)}
|
|
176
|
-
</div>
|
|
163
|
+
<div>{'Sum: ' + total.value}</div>
|
|
164
|
+
<div>{'Comma Separated: ' + arr.map((a) => a.value).join(', ')}</div>
|
|
165
|
+
<div>{'Number to string: ' + arr.map((a) => String(a.value))}</div>
|
|
166
|
+
<div>{'Even numbers: ' + arr.map((a) => a.value).filter((a) => a % 2 === 0)}</div>
|
|
177
167
|
</>
|
|
178
168
|
}
|
|
179
169
|
|
|
@@ -381,9 +371,7 @@ describe('basic client > reactivity', () => {
|
|
|
381
371
|
function App() @{
|
|
382
372
|
const t = track({ a: 1, b: 2, c: 3 });
|
|
383
373
|
const doublet = track(t);
|
|
384
|
-
<pre>
|
|
385
|
-
{t === doublet}
|
|
386
|
-
</pre>
|
|
374
|
+
<pre>{t === doublet}</pre>
|
|
387
375
|
}
|
|
388
376
|
|
|
389
377
|
render(App);
|
|
@@ -411,12 +411,8 @@ second
|
|
|
411
411
|
const staticMessage = 'Welcome to Ripple!';
|
|
412
412
|
<div class="mixed-content">
|
|
413
413
|
<h1>{staticMessage}</h1>
|
|
414
|
-
<p class="greeting">
|
|
415
|
-
|
|
416
|
-
</p>
|
|
417
|
-
<p class="notifications">
|
|
418
|
-
{'You have ' + count + ' notifications'}
|
|
419
|
-
</p>
|
|
414
|
+
<p class="greeting">{'Hello, ' + name + '!'}</p>
|
|
415
|
+
<p class="notifications">{'You have ' + count + ' notifications'}</p>
|
|
420
416
|
<button
|
|
421
417
|
onClick={() => {
|
|
422
418
|
count++;
|
|
@@ -18,9 +18,7 @@ describe('passing reactivity between boundaries tests', () => {
|
|
|
18
18
|
let &[count, countTracked] = track(0);
|
|
19
19
|
const &[double] = createDouble(countTracked);
|
|
20
20
|
<>
|
|
21
|
-
<div>
|
|
22
|
-
{'Double: ' + double}
|
|
23
|
-
</div>
|
|
21
|
+
<div>{'Double: ' + double}</div>
|
|
24
22
|
<button
|
|
25
23
|
onClick={() => {
|
|
26
24
|
count++;
|
|
@@ -67,9 +65,7 @@ describe('passing reactivity between boundaries tests', () => {
|
|
|
67
65
|
let count = track(0);
|
|
68
66
|
const { double } = createDouble({ count });
|
|
69
67
|
<>
|
|
70
|
-
<div>
|
|
71
|
-
{'Double: ' + double.value}
|
|
72
|
-
</div>
|
|
68
|
+
<div>{'Double: ' + double.value}</div>
|
|
73
69
|
<button
|
|
74
70
|
onClick={() => {
|
|
75
71
|
count.value++;
|
|
@@ -28,9 +28,7 @@ describe('code blocks in template children position', () => {
|
|
|
28
28
|
@{
|
|
29
29
|
const y = 2;
|
|
30
30
|
@{
|
|
31
|
-
<span class="sum">
|
|
32
|
-
{x + y}
|
|
33
|
-
</span>
|
|
31
|
+
<span class="sum">{x + y}</span>
|
|
34
32
|
}
|
|
35
33
|
}
|
|
36
34
|
}
|
|
@@ -118,9 +116,7 @@ describe('code blocks in template children position', () => {
|
|
|
118
116
|
@{
|
|
119
117
|
const x = 2;
|
|
120
118
|
@{
|
|
121
|
-
<span class="sum">
|
|
122
|
-
{x + y}
|
|
123
|
-
</span>
|
|
119
|
+
<span class="sum">{x + y}</span>
|
|
124
120
|
}
|
|
125
121
|
}
|
|
126
122
|
}
|
|
@@ -163,9 +159,7 @@ describe('code blocks in template children position', () => {
|
|
|
163
159
|
@{
|
|
164
160
|
const y = 2;
|
|
165
161
|
@{
|
|
166
|
-
<span class="sum">
|
|
167
|
-
{x + y}
|
|
168
|
-
</span>
|
|
162
|
+
<span class="sum">{x + y}</span>
|
|
169
163
|
}
|
|
170
164
|
}
|
|
171
165
|
}
|
|
@@ -136,9 +136,7 @@ describe('for statements', () => {
|
|
|
136
136
|
<>
|
|
137
137
|
<div>
|
|
138
138
|
@for (let item of items; index i) {
|
|
139
|
-
<div>
|
|
140
|
-
{i + ' : ' + item}
|
|
141
|
-
</div>
|
|
139
|
+
<div>{i + ' : ' + item}</div>
|
|
142
140
|
}
|
|
143
141
|
</div>
|
|
144
142
|
<button
|
|
@@ -174,9 +172,7 @@ describe('for statements', () => {
|
|
|
174
172
|
]);
|
|
175
173
|
<>
|
|
176
174
|
@for (let item of items; index i; key item.id) {
|
|
177
|
-
<div>
|
|
178
|
-
{i + ':' + item.text}
|
|
179
|
-
</div>
|
|
175
|
+
<div>{i + ':' + item.text}</div>
|
|
180
176
|
}
|
|
181
177
|
<button
|
|
182
178
|
onClick={() => {
|
|
@@ -243,9 +239,7 @@ describe('for statements', () => {
|
|
|
243
239
|
<>
|
|
244
240
|
<div>
|
|
245
241
|
@for (let item of items; index idx; key item.id) {
|
|
246
|
-
<span class="item">
|
|
247
|
-
{idx + ':' + item.text}
|
|
248
|
-
</span>
|
|
242
|
+
<span class="item">{idx + ':' + item.text}</span>
|
|
249
243
|
}
|
|
250
244
|
</div>
|
|
251
245
|
<button
|
|
@@ -279,9 +273,7 @@ describe('for statements', () => {
|
|
|
279
273
|
]);
|
|
280
274
|
<>
|
|
281
275
|
@for (let item of items; index i; key item.id) {
|
|
282
|
-
<div>
|
|
283
|
-
{i + ':' + item.text}
|
|
284
|
-
</div>
|
|
276
|
+
<div>{i + ':' + item.text}</div>
|
|
285
277
|
}
|
|
286
278
|
<button
|
|
287
279
|
onClick={() => {
|
|
@@ -59,9 +59,7 @@ describe('RippleObject', () => {
|
|
|
59
59
|
function ObjectTest() @{
|
|
60
60
|
const obj = new RippleObject({ a: -1, b: 1 });
|
|
61
61
|
obj.a = 0;
|
|
62
|
-
<pre>
|
|
63
|
-
{'a' in obj && 'b' in obj}
|
|
64
|
-
</pre>
|
|
62
|
+
<pre>{'a' in obj && 'b' in obj}</pre>
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
render(ObjectTest);
|
|
@@ -165,9 +163,7 @@ describe('RippleObject', () => {
|
|
|
165
163
|
const obj = new RippleObject({ a: 0, b: 1, c: { d: { e: 8 } } });
|
|
166
164
|
<>
|
|
167
165
|
<pre>{obj.a}</pre>
|
|
168
|
-
<pre>
|
|
169
|
-
{TRACKED_OBJECT in obj}
|
|
170
|
-
</pre>
|
|
166
|
+
<pre>{TRACKED_OBJECT in obj}</pre>
|
|
171
167
|
<pre>{JSON.stringify(obj)}</pre>
|
|
172
168
|
<button
|
|
173
169
|
onClick={() => {
|
|
@@ -77,9 +77,7 @@ describe('switch statements', () => {
|
|
|
77
77
|
<button onClick={() => (value = 'y')}>{'Change Value'}</button>
|
|
78
78
|
@switch (value) {
|
|
79
79
|
@default: {
|
|
80
|
-
<div>
|
|
81
|
-
{'Default for ' + value}
|
|
82
|
-
</div>
|
|
80
|
+
<div>{'Default for ' + value}</div>
|
|
83
81
|
}
|
|
84
82
|
}
|
|
85
83
|
</>
|
|
@@ -149,27 +147,19 @@ describe('switch statements', () => {
|
|
|
149
147
|
@switch (status) {
|
|
150
148
|
@case 'active': {
|
|
151
149
|
message = 'Currently active.';
|
|
152
|
-
<div>
|
|
153
|
-
{'Status: ' + message}
|
|
154
|
-
</div>
|
|
150
|
+
<div>{'Status: ' + message}</div>
|
|
155
151
|
}
|
|
156
152
|
@case 'pending': {
|
|
157
153
|
message = 'Waiting for completion.';
|
|
158
|
-
<div>
|
|
159
|
-
{'Status: ' + message}
|
|
160
|
-
</div>
|
|
154
|
+
<div>{'Status: ' + message}</div>
|
|
161
155
|
}
|
|
162
156
|
@case 'completed': {
|
|
163
157
|
message = 'Task finished!';
|
|
164
|
-
<div class="success">
|
|
165
|
-
{'Status: ' + message}
|
|
166
|
-
</div>
|
|
158
|
+
<div class="success">{'Status: ' + message}</div>
|
|
167
159
|
}
|
|
168
160
|
@default: {
|
|
169
161
|
message = 'An error occurred.';
|
|
170
|
-
<div class="error">
|
|
171
|
-
{'Status: ' + message}
|
|
172
|
-
</div>
|
|
162
|
+
<div class="error">{'Status: ' + message}</div>
|
|
173
163
|
}
|
|
174
164
|
}
|
|
175
165
|
</>
|
|
@@ -285,9 +275,7 @@ describe('switch statements', () => {
|
|
|
285
275
|
<div>{' Case A'}</div>
|
|
286
276
|
}
|
|
287
277
|
@case 'x': {
|
|
288
|
-
<div>
|
|
289
|
-
{' Default Case for ' + value}
|
|
290
|
-
</div>
|
|
278
|
+
<div>{' Default Case for ' + value}</div>
|
|
291
279
|
}
|
|
292
280
|
@case 'b': {
|
|
293
281
|
<div>{' Case B'}</div>
|
|
@@ -164,9 +164,7 @@ describe('tsx expression', () => {
|
|
|
164
164
|
function App() @{
|
|
165
165
|
let &[count] = track(0);
|
|
166
166
|
const el = <>
|
|
167
|
-
<div>
|
|
168
|
-
{'count: ' + count}
|
|
169
|
-
</div>
|
|
167
|
+
<div>{'count: ' + count}</div>
|
|
170
168
|
</>;
|
|
171
169
|
<>
|
|
172
170
|
{el}
|
|
@@ -740,9 +738,7 @@ describe('tsrx expression', () => {
|
|
|
740
738
|
function App() @{
|
|
741
739
|
let &[count] = track(0);
|
|
742
740
|
const el = <>
|
|
743
|
-
<div>
|
|
744
|
-
{'count: ' + count}
|
|
745
|
-
</div>
|
|
741
|
+
<div>{'count: ' + count}</div>
|
|
746
742
|
</>;
|
|
747
743
|
<>
|
|
748
744
|
{el}
|
|
@@ -253,11 +253,11 @@ export function MultipleHeadBlocks() {
|
|
|
253
253
|
_$_.expression(node_8, () => _$_.tsrx_element((__anchor, __block) => {
|
|
254
254
|
var div_8 = root_19();
|
|
255
255
|
|
|
256
|
-
_$_.head('
|
|
256
|
+
_$_.head('e50b427b', (__anchor) => {
|
|
257
257
|
_$_.document.title = 'First Head';
|
|
258
258
|
});
|
|
259
259
|
|
|
260
|
-
_$_.head('
|
|
260
|
+
_$_.head('68467dce', (__anchor) => {
|
|
261
261
|
var meta_1 = root_20();
|
|
262
262
|
|
|
263
263
|
_$_.append(__anchor, meta_1);
|
|
@@ -278,7 +278,7 @@ export function HeadWithStyle() {
|
|
|
278
278
|
_$_.expression(node_9, () => _$_.tsrx_element((__anchor, __block) => {
|
|
279
279
|
var div_9 = root_22();
|
|
280
280
|
|
|
281
|
-
_$_.head('
|
|
281
|
+
_$_.head('3a8578a5', (__anchor) => {
|
|
282
282
|
_$_.document.title = 'Styled Page';
|
|
283
283
|
});
|
|
284
284
|
|
|
@@ -168,7 +168,7 @@ export function MultipleHeadBlocks() {
|
|
|
168
168
|
_$_.output_push(__out);
|
|
169
169
|
__out = '';
|
|
170
170
|
_$_.set_output_target('head');
|
|
171
|
-
__out += '<!--
|
|
171
|
+
__out += '<!--e50b427b--><title>First Head</title><!--68467dce--><meta name="author" content="Test Author" />';
|
|
172
172
|
_$_.output_push(__out);
|
|
173
173
|
__out = '';
|
|
174
174
|
_$_.set_output_target(null);
|
|
@@ -186,7 +186,7 @@ export function HeadWithStyle() {
|
|
|
186
186
|
_$_.output_push(__out);
|
|
187
187
|
__out = '';
|
|
188
188
|
_$_.set_output_target('head');
|
|
189
|
-
__out += '<!--
|
|
189
|
+
__out += '<!--3a8578a5--><title>Styled Page</title>';
|
|
190
190
|
_$_.output_push(__out);
|
|
191
191
|
__out = '';
|
|
192
192
|
_$_.set_output_target(null);
|
|
@@ -306,7 +306,7 @@ function HeadContent() {
|
|
|
306
306
|
_$_.output_push(__out);
|
|
307
307
|
__out = '';
|
|
308
308
|
_$_.set_output_target('head');
|
|
309
|
-
__out += '<!--
|
|
309
|
+
__out += '<!--814bacd9--><title>' + _$_.escape('title:' + lazy_5.value) + '</title>';
|
|
310
310
|
_$_.output_push(__out);
|
|
311
311
|
__out = '';
|
|
312
312
|
_$_.set_output_target(null);
|
|
@@ -35,9 +35,7 @@ function BasicContent() @{
|
|
|
35
35
|
let &[data] = trackAsync(() => controls.basic.promise);
|
|
36
36
|
let &[count] = track(0);
|
|
37
37
|
<div class="resolved">
|
|
38
|
-
<span class="value">
|
|
39
|
-
{data + ':' + count}
|
|
40
|
-
</span>
|
|
38
|
+
<span class="value">{data + ':' + count}</span>
|
|
41
39
|
<button class="inc" onClick={() => count++}>{'inc'}</button>
|
|
42
40
|
</div>
|
|
43
41
|
}
|
|
@@ -115,9 +113,7 @@ function HeadContent() @{
|
|
|
115
113
|
@if (data) {
|
|
116
114
|
<>
|
|
117
115
|
<head>
|
|
118
|
-
<title>
|
|
119
|
-
{'title:' + data}
|
|
120
|
-
</title>
|
|
116
|
+
<title>{'title:' + data}</title>
|
|
121
117
|
</head>
|
|
122
118
|
<p class="head-content">{data}</p>
|
|
123
119
|
</>
|
|
@@ -24,9 +24,7 @@ describe('code blocks in template children position', () => {
|
|
|
24
24
|
@{
|
|
25
25
|
const y = 2;
|
|
26
26
|
@{
|
|
27
|
-
<span class="sum">
|
|
28
|
-
{x + y}
|
|
29
|
-
</span>
|
|
27
|
+
<span class="sum">{x + y}</span>
|
|
30
28
|
}
|
|
31
29
|
}
|
|
32
30
|
}
|
|
@@ -87,9 +85,7 @@ describe('code blocks in template children position', () => {
|
|
|
87
85
|
@{
|
|
88
86
|
const x = 2;
|
|
89
87
|
@{
|
|
90
|
-
<span class="sum">
|
|
91
|
-
{x + y}
|
|
92
|
-
</span>
|
|
88
|
+
<span class="sum">{x + y}</span>
|
|
93
89
|
}
|
|
94
90
|
}
|
|
95
91
|
}
|
|
@@ -110,9 +106,7 @@ describe('code blocks in template children position', () => {
|
|
|
110
106
|
@{
|
|
111
107
|
const y = 2;
|
|
112
108
|
@{
|
|
113
|
-
<span class="sum">
|
|
114
|
-
{x + y}
|
|
115
|
-
</span>
|
|
109
|
+
<span class="sum">{x + y}</span>
|
|
116
110
|
}
|
|
117
111
|
}
|
|
118
112
|
}
|
|
@@ -299,9 +299,7 @@ describe('streaming try/pending boundaries', () => {
|
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
function RootCatch({ error }: { error: unknown }) @{
|
|
302
|
-
<h2>
|
|
303
|
-
{'root caught: ' + (error instanceof Error ? error.message : String(error))}
|
|
304
|
-
</h2>
|
|
302
|
+
<h2>{'root caught: ' + (error instanceof Error ? error.message : String(error))}</h2>
|
|
305
303
|
}
|
|
306
304
|
|
|
307
305
|
const { chunks, sink } = recordingSink();
|
|
@@ -423,16 +421,12 @@ describe('streaming nested and sibling boundaries', () => {
|
|
|
423
421
|
|
|
424
422
|
function First() @{
|
|
425
423
|
let &[data] = trackAsync(() => d_first.promise);
|
|
426
|
-
<p>
|
|
427
|
-
{'first: ' + data}
|
|
428
|
-
</p>
|
|
424
|
+
<p>{'first: ' + data}</p>
|
|
429
425
|
}
|
|
430
426
|
|
|
431
427
|
function Second() @{
|
|
432
428
|
let &[data] = trackAsync(() => d_second.promise);
|
|
433
|
-
<p>
|
|
434
|
-
{'second: ' + data}
|
|
435
|
-
</p>
|
|
429
|
+
<p>{'second: ' + data}</p>
|
|
436
430
|
}
|
|
437
431
|
|
|
438
432
|
function App() @{
|
|
@@ -475,21 +469,15 @@ describe('streaming nested and sibling boundaries', () => {
|
|
|
475
469
|
function makeApp(ds: Deferred<string>[]) {
|
|
476
470
|
function A() @{
|
|
477
471
|
let &[data] = trackAsync(() => ds[0].promise);
|
|
478
|
-
<p>
|
|
479
|
-
{'A:' + data}
|
|
480
|
-
</p>
|
|
472
|
+
<p>{'A:' + data}</p>
|
|
481
473
|
}
|
|
482
474
|
function B() @{
|
|
483
475
|
let &[data] = trackAsync(() => ds[1].promise);
|
|
484
|
-
<p>
|
|
485
|
-
{'B:' + data}
|
|
486
|
-
</p>
|
|
476
|
+
<p>{'B:' + data}</p>
|
|
487
477
|
}
|
|
488
478
|
function C() @{
|
|
489
479
|
let &[data] = trackAsync(() => ds[2].promise);
|
|
490
|
-
<p>
|
|
491
|
-
{'C:' + data}
|
|
492
|
-
</p>
|
|
480
|
+
<p>{'C:' + data}</p>
|
|
493
481
|
}
|
|
494
482
|
|
|
495
483
|
function App() @{
|
|
@@ -553,9 +541,7 @@ describe('streaming root boundary', () => {
|
|
|
553
541
|
|
|
554
542
|
function App() @{
|
|
555
543
|
let &[data] = trackAsync(() => d.promise);
|
|
556
|
-
<p>
|
|
557
|
-
{'app: ' + data}
|
|
558
|
-
</p>
|
|
544
|
+
<p>{'app: ' + data}</p>
|
|
559
545
|
}
|
|
560
546
|
|
|
561
547
|
function RootPending() @{
|
|
@@ -631,9 +617,7 @@ describe('streaming head content', () => {
|
|
|
631
617
|
@if (data) {
|
|
632
618
|
<>
|
|
633
619
|
<head>
|
|
634
|
-
<title>
|
|
635
|
-
{'title:' + data}
|
|
636
|
-
</title>
|
|
620
|
+
<title>{'title:' + data}</title>
|
|
637
621
|
</head>
|
|
638
622
|
<p class="has-head">{data}</p>
|
|
639
623
|
</>
|