ripple 0.4.1 → 0.4.3
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 +162 -0
- package/package.json +9 -3
- package/src/constants.js +4 -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 +313 -0
- package/src/runtime/internal/client/blocks.js +4 -14
- package/src/runtime/internal/client/component.js +2 -5
- package/src/runtime/internal/client/composite.js +14 -6
- package/src/runtime/internal/client/constants.js +12 -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 +21 -116
- package/src/runtime/internal/client/for.js +272 -222
- 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 -97
- package/src/runtime/internal/client/if.js +13 -9
- package/src/runtime/internal/client/index.js +16 -8
- package/src/runtime/internal/client/operations.js +12 -9
- package/src/runtime/internal/client/portal.js +3 -2
- package/src/runtime/internal/client/render.js +75 -321
- package/src/runtime/internal/client/root-boundary-enabled.js +7 -0
- package/src/runtime/internal/client/runtime.js +129 -362
- package/src/runtime/internal/client/template-ns.js +47 -0
- package/src/runtime/internal/client/template.js +63 -140
- 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 +38 -33
- 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 +4 -4
- package/tests/client/compiler/compiler.tracked-access.test.tsrx +3 -3
- package/tests/client/composite/composite.props.test.tsrx +10 -10
- package/tests/client/derived-release.test.tsrx +3 -3
- package/tests/client/for-item.test.tsrx +443 -0
- package/tests/client/for-selector.test.tsrx +95 -0
- package/tests/hydration/compiled/client/basic.js +97 -123
- package/tests/hydration/compiled/client/composite.js +5 -5
- package/tests/hydration/compiled/client/events.js +84 -79
- package/tests/hydration/compiled/client/for.js +229 -233
- package/tests/hydration/compiled/client/fragment-cursor.js +781 -481
- package/tests/hydration/compiled/client/head.js +23 -26
- package/tests/hydration/compiled/client/hmr.js +4 -4
- package/tests/hydration/compiled/client/html-in-template.js +5 -5
- package/tests/hydration/compiled/client/html.js +174 -208
- package/tests/hydration/compiled/client/if-children.js +71 -70
- package/tests/hydration/compiled/client/if-fragment-controlflow.js +46 -46
- package/tests/hydration/compiled/client/if.js +26 -26
- package/tests/hydration/compiled/client/mixed-control-flow.js +63 -105
- package/tests/hydration/compiled/client/nested-control-flow.js +170 -390
- package/tests/hydration/compiled/client/portal.js +10 -10
- package/tests/hydration/compiled/client/reactivity.js +36 -50
- package/tests/hydration/compiled/client/return.js +2 -2
- package/tests/hydration/compiled/client/streaming.js +34 -40
- 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 -19
- package/tests/hydration/compiled/server/basic.js +6 -6
- package/tests/hydration/compiled/server/events.js +13 -61
- package/tests/hydration/compiled/server/for.js +23 -31
- package/tests/hydration/compiled/server/fragment-cursor.js +214 -366
- 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/basic.test.tsrx +23 -0
- 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,10 +1,10 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import * as _$_ from 'ripple/internal/client';
|
|
3
3
|
|
|
4
|
-
var root_2 = _$_.template(`<p class=
|
|
5
|
-
var root_1 = _$_.template(`<!><span class=
|
|
4
|
+
var root_2 = _$_.template(`<p class=muze> `);
|
|
5
|
+
var root_1 = _$_.template(`<!><span class=after>after`, 1, 2);
|
|
6
6
|
|
|
7
|
-
function consequent(__anchor, { hasLoaded, muzes }) {
|
|
7
|
+
function consequent(__anchor, { a: hasLoaded, b: muzes }) {
|
|
8
8
|
var fragment = root_1();
|
|
9
9
|
var node_1 = _$_.first_child_frag(fragment);
|
|
10
10
|
|
|
@@ -24,18 +24,18 @@ function consequent(__anchor, { hasLoaded, muzes }) {
|
|
|
24
24
|
_$_.append(__anchor, p);
|
|
25
25
|
},
|
|
26
26
|
0,
|
|
27
|
-
(pattern) =>
|
|
27
|
+
(pattern) => pattern.muzeId
|
|
28
28
|
);
|
|
29
29
|
|
|
30
30
|
_$_.next();
|
|
31
31
|
_$_.append(__anchor, fragment);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
function if_1({ hasLoaded, muzes }) {
|
|
34
|
+
function if_1({ a: hasLoaded, b: muzes }) {
|
|
35
35
|
if (hasLoaded) return consequent;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
var root = _$_.template(`<div class=
|
|
38
|
+
var root = _$_.template(`<div class=feed-c><!>`);
|
|
39
39
|
|
|
40
40
|
function IfFragmentForElement_render(__anchor, __block) {
|
|
41
41
|
const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
|
|
@@ -45,7 +45,7 @@ function IfFragmentForElement_render(__anchor, __block) {
|
|
|
45
45
|
{
|
|
46
46
|
var node = _$_.hydrating ? _$_.hydrate_child() : div.firstChild;
|
|
47
47
|
|
|
48
|
-
_$_.if(node, if_1, false, { hasLoaded, muzes });
|
|
48
|
+
_$_.if(node, if_1, false, { a: hasLoaded, b: muzes });
|
|
49
49
|
_$_.hydrating && _$_.pop(div);
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -54,8 +54,8 @@ function IfFragmentForElement_render(__anchor, __block) {
|
|
|
54
54
|
|
|
55
55
|
IfFragmentForElement[_$_.$r] = IfFragmentForElement_render;
|
|
56
56
|
|
|
57
|
-
var root_5 = _$_.template(`<p class=
|
|
58
|
-
var root_6 = _$_.template(`<span class=
|
|
57
|
+
var root_5 = _$_.template(`<p class=muze> `);
|
|
58
|
+
var root_6 = _$_.template(`<span class=has-items>has items`);
|
|
59
59
|
|
|
60
60
|
function consequent_1(__anchor, muzes) {
|
|
61
61
|
var span = root_6();
|
|
@@ -67,7 +67,7 @@ function if_2(muzes) {
|
|
|
67
67
|
if (muzes.length > 0) return consequent_1;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
var root_7 = _$_.template(`<span class=
|
|
70
|
+
var root_7 = _$_.template(`<span class=empty>empty`);
|
|
71
71
|
|
|
72
72
|
function consequent_2(__anchor, muzes) {
|
|
73
73
|
var span_1 = root_7();
|
|
@@ -81,7 +81,7 @@ function if_3(muzes) {
|
|
|
81
81
|
|
|
82
82
|
var root_4 = _$_.template(`<!><!><!>`, 1, 3);
|
|
83
83
|
|
|
84
|
-
function consequent_3(__anchor, { hasLoaded, muzes }) {
|
|
84
|
+
function consequent_3(__anchor, { a: hasLoaded, b: muzes }) {
|
|
85
85
|
var fragment_1 = root_4();
|
|
86
86
|
var node_3 = _$_.first_child_frag(fragment_1);
|
|
87
87
|
|
|
@@ -101,7 +101,7 @@ function consequent_3(__anchor, { hasLoaded, muzes }) {
|
|
|
101
101
|
_$_.append(__anchor, p_1);
|
|
102
102
|
},
|
|
103
103
|
0,
|
|
104
|
-
(pattern_1) =>
|
|
104
|
+
(pattern_1) => pattern_1.muzeId
|
|
105
105
|
);
|
|
106
106
|
|
|
107
107
|
var node_4 = _$_.hydrating ? _$_.hydrate_sibling() : node_3.nextSibling;
|
|
@@ -114,11 +114,11 @@ function consequent_3(__anchor, { hasLoaded, muzes }) {
|
|
|
114
114
|
_$_.append(__anchor, fragment_1);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
function if_4({ hasLoaded, muzes }) {
|
|
117
|
+
function if_4({ a: hasLoaded, b: muzes }) {
|
|
118
118
|
if (hasLoaded) return consequent_3;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
var root_3 = _$_.template(`<div class=
|
|
121
|
+
var root_3 = _$_.template(`<div class=feed><!>`);
|
|
122
122
|
|
|
123
123
|
function IfFragmentForIfIf_render(__anchor, __block) {
|
|
124
124
|
const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
|
|
@@ -128,7 +128,7 @@ function IfFragmentForIfIf_render(__anchor, __block) {
|
|
|
128
128
|
{
|
|
129
129
|
var node_2 = _$_.hydrating ? _$_.hydrate_child() : div_1.firstChild;
|
|
130
130
|
|
|
131
|
-
_$_.if(node_2, if_4, false, { hasLoaded, muzes });
|
|
131
|
+
_$_.if(node_2, if_4, false, { a: hasLoaded, b: muzes });
|
|
132
132
|
_$_.hydrating && _$_.pop(div_1);
|
|
133
133
|
}
|
|
134
134
|
|
|
@@ -137,7 +137,7 @@ function IfFragmentForIfIf_render(__anchor, __block) {
|
|
|
137
137
|
|
|
138
138
|
IfFragmentForIfIf[_$_.$r] = IfFragmentForIfIf_render;
|
|
139
139
|
|
|
140
|
-
var root_9 = _$_.template(`<p class=
|
|
140
|
+
var root_9 = _$_.template(`<p class=muze>b</p><p class=muze>c`, 1, 2);
|
|
141
141
|
|
|
142
142
|
function consequent_4(__anchor, hasLoaded) {
|
|
143
143
|
var fragment_2 = root_9();
|
|
@@ -150,7 +150,7 @@ function if_5(hasLoaded) {
|
|
|
150
150
|
if (hasLoaded) return consequent_4;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
var root_8 = _$_.template(`<div class=
|
|
153
|
+
var root_8 = _$_.template(`<div class=feed-b><!>`);
|
|
154
154
|
|
|
155
155
|
function IfFragmentElements_render(__anchor, __block) {
|
|
156
156
|
const hasLoaded = true;
|
|
@@ -168,8 +168,8 @@ function IfFragmentElements_render(__anchor, __block) {
|
|
|
168
168
|
|
|
169
169
|
IfFragmentElements[_$_.$r] = IfFragmentElements_render;
|
|
170
170
|
|
|
171
|
-
var root_12 = _$_.template(`<p class=
|
|
172
|
-
var root_11 = _$_.template(`<!><span class=
|
|
171
|
+
var root_12 = _$_.template(`<p class=muze> `);
|
|
172
|
+
var root_11 = _$_.template(`<!><span class=after>after`, 1, 2);
|
|
173
173
|
var root_10 = _$_.template(`<!>`, 1, 1);
|
|
174
174
|
|
|
175
175
|
function ComponentBodyFragmentControlFlow_render(__anchor, __block) {
|
|
@@ -197,7 +197,7 @@ function ComponentBodyFragmentControlFlow_render(__anchor, __block) {
|
|
|
197
197
|
_$_.append(__anchor, p_2);
|
|
198
198
|
},
|
|
199
199
|
0,
|
|
200
|
-
(pattern_2) =>
|
|
200
|
+
(pattern_2) => pattern_2.muzeId
|
|
201
201
|
);
|
|
202
202
|
|
|
203
203
|
_$_.next();
|
|
@@ -209,8 +209,8 @@ function ComponentBodyFragmentControlFlow_render(__anchor, __block) {
|
|
|
209
209
|
|
|
210
210
|
ComponentBodyFragmentControlFlow[_$_.$r] = ComponentBodyFragmentControlFlow_render;
|
|
211
211
|
|
|
212
|
-
var root_14 = _$_.template(`<p class=
|
|
213
|
-
var root_15 = _$_.template(`<!><span class=
|
|
212
|
+
var root_14 = _$_.template(`<p class=muze> `);
|
|
213
|
+
var root_15 = _$_.template(`<!><span class=after>after`, 1, 2);
|
|
214
214
|
var root_13 = _$_.template(`<!>`, 1, 1);
|
|
215
215
|
|
|
216
216
|
function ComponentBodyCodeBlockControlFlow_render(__anchor, __block) {
|
|
@@ -241,7 +241,7 @@ function ComponentBodyCodeBlockControlFlow_render(__anchor, __block) {
|
|
|
241
241
|
_$_.append(__anchor, p_3);
|
|
242
242
|
},
|
|
243
243
|
16,
|
|
244
|
-
(pattern_3) =>
|
|
244
|
+
(pattern_3) => pattern_3.muzeId
|
|
245
245
|
);
|
|
246
246
|
}));
|
|
247
247
|
|
|
@@ -254,10 +254,10 @@ function ComponentBodyCodeBlockControlFlow_render(__anchor, __block) {
|
|
|
254
254
|
|
|
255
255
|
ComponentBodyCodeBlockControlFlow[_$_.$r] = ComponentBodyCodeBlockControlFlow_render;
|
|
256
256
|
|
|
257
|
-
var root_17 = _$_.template(`<p class=
|
|
258
|
-
var root_18 = _$_.template(`<!><span class=
|
|
257
|
+
var root_17 = _$_.template(`<p class=muze> `);
|
|
258
|
+
var root_18 = _$_.template(`<!><span class=after>after`, 1, 2);
|
|
259
259
|
|
|
260
|
-
function consequent_5(__anchor, { hasLoaded, muzes }) {
|
|
260
|
+
function consequent_5(__anchor, { a: hasLoaded, b: muzes }) {
|
|
261
261
|
var fragment_7 = root_18();
|
|
262
262
|
var expression_6 = _$_.first_child_frag(fragment_7);
|
|
263
263
|
|
|
@@ -280,7 +280,7 @@ function consequent_5(__anchor, { hasLoaded, muzes }) {
|
|
|
280
280
|
_$_.append(__anchor, p_4);
|
|
281
281
|
},
|
|
282
282
|
16,
|
|
283
|
-
(pattern_4) =>
|
|
283
|
+
(pattern_4) => pattern_4.muzeId
|
|
284
284
|
);
|
|
285
285
|
}));
|
|
286
286
|
|
|
@@ -288,11 +288,11 @@ function consequent_5(__anchor, { hasLoaded, muzes }) {
|
|
|
288
288
|
_$_.append(__anchor, fragment_7);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
function if_6({ hasLoaded, muzes }) {
|
|
291
|
+
function if_6({ a: hasLoaded, b: muzes }) {
|
|
292
292
|
if (hasLoaded) return consequent_5;
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
var root_16 = _$_.template(`<div class=
|
|
295
|
+
var root_16 = _$_.template(`<div class=feed-f><!>`);
|
|
296
296
|
|
|
297
297
|
function IfCodeBlockControlFlow_render(__anchor, __block) {
|
|
298
298
|
const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
|
|
@@ -302,7 +302,7 @@ function IfCodeBlockControlFlow_render(__anchor, __block) {
|
|
|
302
302
|
{
|
|
303
303
|
var node_10 = _$_.hydrating ? _$_.hydrate_child() : div_3.firstChild;
|
|
304
304
|
|
|
305
|
-
_$_.if(node_10, if_6, false, { hasLoaded, muzes });
|
|
305
|
+
_$_.if(node_10, if_6, false, { a: hasLoaded, b: muzes });
|
|
306
306
|
_$_.hydrating && _$_.pop(div_3);
|
|
307
307
|
}
|
|
308
308
|
|
|
@@ -311,17 +311,17 @@ function IfCodeBlockControlFlow_render(__anchor, __block) {
|
|
|
311
311
|
|
|
312
312
|
IfCodeBlockControlFlow[_$_.$r] = IfCodeBlockControlFlow_render;
|
|
313
313
|
|
|
314
|
-
var root_20 = _$_.template(`<span class=
|
|
315
|
-
var root_22 = _$_.template(`<p class=
|
|
316
|
-
var root_21 = _$_.template(`<!><span class=
|
|
314
|
+
var root_20 = _$_.template(`<span class=loading>loading`);
|
|
315
|
+
var root_22 = _$_.template(`<p class=muze> `);
|
|
316
|
+
var root_21 = _$_.template(`<!><span class=after>after`, 1, 2);
|
|
317
317
|
|
|
318
|
-
function consequent_6(__anchor, { hasLoaded, muzes }) {
|
|
318
|
+
function consequent_6(__anchor, { a: hasLoaded, b: muzes }) {
|
|
319
319
|
var span_2 = root_20();
|
|
320
320
|
|
|
321
321
|
_$_.append(__anchor, span_2);
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
-
function alternate(__anchor, { hasLoaded, muzes }) {
|
|
324
|
+
function alternate(__anchor, { a: hasLoaded, b: muzes }) {
|
|
325
325
|
var fragment_8 = root_21();
|
|
326
326
|
var node_12 = _$_.first_child_frag(fragment_8);
|
|
327
327
|
|
|
@@ -341,18 +341,18 @@ function alternate(__anchor, { hasLoaded, muzes }) {
|
|
|
341
341
|
_$_.append(__anchor, p_5);
|
|
342
342
|
},
|
|
343
343
|
0,
|
|
344
|
-
(pattern_5) =>
|
|
344
|
+
(pattern_5) => pattern_5.muzeId
|
|
345
345
|
);
|
|
346
346
|
|
|
347
347
|
_$_.next();
|
|
348
348
|
_$_.append(__anchor, fragment_8);
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
-
function if_7({ hasLoaded, muzes }) {
|
|
351
|
+
function if_7({ a: hasLoaded, b: muzes }) {
|
|
352
352
|
if (hasLoaded) return consequent_6; else return alternate;
|
|
353
353
|
}
|
|
354
354
|
|
|
355
|
-
var root_19 = _$_.template(`<div class=
|
|
355
|
+
var root_19 = _$_.template(`<div class=feed-d><!>`);
|
|
356
356
|
|
|
357
357
|
function IfElseFragment_render(__anchor, __block) {
|
|
358
358
|
const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
|
|
@@ -362,7 +362,7 @@ function IfElseFragment_render(__anchor, __block) {
|
|
|
362
362
|
{
|
|
363
363
|
var node_11 = _$_.hydrating ? _$_.hydrate_child() : div_4.firstChild;
|
|
364
364
|
|
|
365
|
-
_$_.if(node_11, if_7, false, { hasLoaded, muzes });
|
|
365
|
+
_$_.if(node_11, if_7, false, { a: hasLoaded, b: muzes });
|
|
366
366
|
_$_.hydrating && _$_.pop(div_4);
|
|
367
367
|
}
|
|
368
368
|
|
|
@@ -371,10 +371,10 @@ function IfElseFragment_render(__anchor, __block) {
|
|
|
371
371
|
|
|
372
372
|
IfElseFragment[_$_.$r] = IfElseFragment_render;
|
|
373
373
|
|
|
374
|
-
var root_25 = _$_.template(`<p class=
|
|
375
|
-
var root_24 = _$_.template(`<section
|
|
374
|
+
var root_25 = _$_.template(`<p class=muze> `);
|
|
375
|
+
var root_24 = _$_.template(`<section><span class=after>after`);
|
|
376
376
|
|
|
377
|
-
function consequent_7(__anchor, { hasLoaded, muzes }) {
|
|
377
|
+
function consequent_7(__anchor, { a: hasLoaded, b: muzes }) {
|
|
378
378
|
var section = root_24();
|
|
379
379
|
|
|
380
380
|
{
|
|
@@ -396,7 +396,7 @@ function consequent_7(__anchor, { hasLoaded, muzes }) {
|
|
|
396
396
|
_$_.append(__anchor, p_6);
|
|
397
397
|
},
|
|
398
398
|
0,
|
|
399
|
-
(pattern_6) =>
|
|
399
|
+
(pattern_6) => pattern_6.muzeId
|
|
400
400
|
);
|
|
401
401
|
|
|
402
402
|
_$_.hydrating && _$_.pop(section);
|
|
@@ -405,11 +405,11 @@ function consequent_7(__anchor, { hasLoaded, muzes }) {
|
|
|
405
405
|
_$_.append(__anchor, section);
|
|
406
406
|
}
|
|
407
407
|
|
|
408
|
-
function if_8({ hasLoaded, muzes }) {
|
|
408
|
+
function if_8({ a: hasLoaded, b: muzes }) {
|
|
409
409
|
if (hasLoaded) return consequent_7;
|
|
410
410
|
}
|
|
411
411
|
|
|
412
|
-
var root_23 = _$_.template(`<div class=
|
|
412
|
+
var root_23 = _$_.template(`<div class=feed-e><!>`);
|
|
413
413
|
|
|
414
414
|
function IfDivFragment_render(__anchor, __block) {
|
|
415
415
|
const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
|
|
@@ -419,7 +419,7 @@ function IfDivFragment_render(__anchor, __block) {
|
|
|
419
419
|
{
|
|
420
420
|
var node_13 = _$_.hydrating ? _$_.hydrate_child() : div_5.firstChild;
|
|
421
421
|
|
|
422
|
-
_$_.if(node_13, if_8, false, { hasLoaded, muzes });
|
|
422
|
+
_$_.if(node_13, if_8, false, { a: hasLoaded, b: muzes });
|
|
423
423
|
_$_.hydrating && _$_.pop(div_5);
|
|
424
424
|
}
|
|
425
425
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import * as _$_ from 'ripple/internal/client';
|
|
3
3
|
|
|
4
|
-
var root = _$_.template(`<div class=
|
|
4
|
+
var root = _$_.template(`<div class=shown>Visible`);
|
|
5
5
|
|
|
6
6
|
function consequent(__anchor, show) {
|
|
7
7
|
var div = root();
|
|
@@ -21,7 +21,7 @@ function IfTruthy_render(__anchor, __block) {
|
|
|
21
21
|
|
|
22
22
|
IfTruthy[_$_.$r] = IfTruthy_render;
|
|
23
23
|
|
|
24
|
-
var root_1 = _$_.template(`<div class=
|
|
24
|
+
var root_1 = _$_.template(`<div class=shown>Visible`);
|
|
25
25
|
|
|
26
26
|
function consequent_1(__anchor, show) {
|
|
27
27
|
var div_1 = root_1();
|
|
@@ -41,8 +41,8 @@ function IfFalsy_render(__anchor, __block) {
|
|
|
41
41
|
|
|
42
42
|
IfFalsy[_$_.$r] = IfFalsy_render;
|
|
43
43
|
|
|
44
|
-
var root_2 = _$_.template(`<div class=
|
|
45
|
-
var root_3 = _$_.template(`<div class=
|
|
44
|
+
var root_2 = _$_.template(`<div class=logged-in>Welcome back!`);
|
|
45
|
+
var root_3 = _$_.template(`<div class=logged-out>Please log in`);
|
|
46
46
|
|
|
47
47
|
function consequent_2(__anchor, isLoggedIn) {
|
|
48
48
|
var div_2 = root_2();
|
|
@@ -68,7 +68,7 @@ function IfElse_render(__anchor, __block) {
|
|
|
68
68
|
|
|
69
69
|
IfElse[_$_.$r] = IfElse_render;
|
|
70
70
|
|
|
71
|
-
var root_6 = _$_.template(`<div class=
|
|
71
|
+
var root_6 = _$_.template(`<div class=content>Content visible`);
|
|
72
72
|
|
|
73
73
|
function consequent_3(__anchor, show) {
|
|
74
74
|
var div_4 = root_6();
|
|
@@ -80,11 +80,11 @@ function if_4(show) {
|
|
|
80
80
|
if (show.value) return consequent_3;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
var root_5 = _$_.template(`<button class=
|
|
83
|
+
var root_5 = _$_.template(`<button class=toggle>Toggle</button><!>`, 1, 2);
|
|
84
84
|
var root_4 = _$_.template(`<!>`, 1, 1);
|
|
85
85
|
|
|
86
86
|
function ReactiveIf_render(__anchor, __block) {
|
|
87
|
-
const show = _$_.track(true, __block, '
|
|
87
|
+
const show = _$_.track(true, __block, '740m40');
|
|
88
88
|
var fragment = root_4();
|
|
89
89
|
var node_1 = _$_.first_child_frag(fragment);
|
|
90
90
|
|
|
@@ -107,8 +107,8 @@ function ReactiveIf_render(__anchor, __block) {
|
|
|
107
107
|
|
|
108
108
|
ReactiveIf[_$_.$r] = ReactiveIf_render;
|
|
109
109
|
|
|
110
|
-
var root_9 = _$_.template(`<div class=
|
|
111
|
-
var root_10 = _$_.template(`<div class=
|
|
110
|
+
var root_9 = _$_.template(`<div class=on>ON`);
|
|
111
|
+
var root_10 = _$_.template(`<div class=off>OFF`);
|
|
112
112
|
|
|
113
113
|
function consequent_4(__anchor, isOn) {
|
|
114
114
|
var div_5 = root_9();
|
|
@@ -126,11 +126,11 @@ function if_5(isOn) {
|
|
|
126
126
|
if (isOn.value) return consequent_4; else return alternate_1;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
var root_8 = _$_.template(`<button class=
|
|
129
|
+
var root_8 = _$_.template(`<button class=toggle>Toggle</button><!>`, 1, 2);
|
|
130
130
|
var root_7 = _$_.template(`<!>`, 1, 1);
|
|
131
131
|
|
|
132
132
|
function ReactiveIfElse_render(__anchor, __block) {
|
|
133
|
-
const isOn = _$_.track(false, __block, '
|
|
133
|
+
const isOn = _$_.track(false, __block, 'i26m2h');
|
|
134
134
|
var fragment_2 = root_7();
|
|
135
135
|
var node_3 = _$_.first_child_frag(fragment_2);
|
|
136
136
|
|
|
@@ -153,7 +153,7 @@ function ReactiveIfElse_render(__anchor, __block) {
|
|
|
153
153
|
|
|
154
154
|
ReactiveIfElse[_$_.$r] = ReactiveIfElse_render;
|
|
155
155
|
|
|
156
|
-
var root_14 = _$_.template(`<span class=
|
|
156
|
+
var root_14 = _$_.template(`<span class=inner-content>Inner`);
|
|
157
157
|
|
|
158
158
|
function consequent_5(__anchor, inner) {
|
|
159
159
|
var span = root_14();
|
|
@@ -165,14 +165,14 @@ function if_6(inner) {
|
|
|
165
165
|
if (inner.value) return consequent_5;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
var root_13 = _$_.template(`<div class=
|
|
168
|
+
var root_13 = _$_.template(`<div class=outer-content>Outer`);
|
|
169
169
|
|
|
170
|
-
function consequent_6(__anchor, { outer, inner }) {
|
|
170
|
+
function consequent_6(__anchor, { a: outer, b: inner }) {
|
|
171
171
|
var div_7 = root_13();
|
|
172
172
|
|
|
173
173
|
{
|
|
174
174
|
var expression = _$_.hydrating ? _$_.hydrate_child() : div_7.firstChild;
|
|
175
|
-
var node_5 = _$_.hydrating ? _$_.hydrate_sibling() :
|
|
175
|
+
var node_5 = _$_.hydrating ? _$_.hydrate_sibling() : _$_.append_into(div_7, true);
|
|
176
176
|
|
|
177
177
|
_$_.if(node_5, if_6, false, inner);
|
|
178
178
|
_$_.hydrating && _$_.pop(div_7);
|
|
@@ -181,16 +181,16 @@ function consequent_6(__anchor, { outer, inner }) {
|
|
|
181
181
|
_$_.append(__anchor, div_7);
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
function if_7({ outer, inner }) {
|
|
184
|
+
function if_7({ a: outer, b: inner }) {
|
|
185
185
|
if (outer.value) return consequent_6;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
var root_12 = _$_.template(`<button class=
|
|
188
|
+
var root_12 = _$_.template(`<button class=outer-toggle>Outer</button><button class=inner-toggle>Inner</button><!>`, 1, 3);
|
|
189
189
|
var root_11 = _$_.template(`<!>`, 1, 1);
|
|
190
190
|
|
|
191
191
|
function NestedIf_render(__anchor, __block) {
|
|
192
|
-
const outer = _$_.track(true, __block, '
|
|
193
|
-
const inner = _$_.track(true, __block, '
|
|
192
|
+
const outer = _$_.track(true, __block, 'xggelb');
|
|
193
|
+
const inner = _$_.track(true, __block, '1v6cfmu');
|
|
194
194
|
var fragment_4 = root_11();
|
|
195
195
|
var node_6 = _$_.first_child_frag(fragment_4);
|
|
196
196
|
|
|
@@ -210,7 +210,7 @@ function NestedIf_render(__anchor, __block) {
|
|
|
210
210
|
|
|
211
211
|
var node_4 = _$_.hydrating ? _$_.hydrate_sibling() : button_3.nextSibling;
|
|
212
212
|
|
|
213
|
-
_$_.if(node_4, if_7, false, { outer, inner });
|
|
213
|
+
_$_.if(node_4, if_7, false, { a: outer, b: inner });
|
|
214
214
|
_$_.append(__anchor, fragment_5);
|
|
215
215
|
}));
|
|
216
216
|
|
|
@@ -219,9 +219,9 @@ function NestedIf_render(__anchor, __block) {
|
|
|
219
219
|
|
|
220
220
|
NestedIf[_$_.$r] = NestedIf_render;
|
|
221
221
|
|
|
222
|
-
var root_16 = _$_.template(`<div class=
|
|
223
|
-
var root_17 = _$_.template(`<div class=
|
|
224
|
-
var root_18 = _$_.template(`<div class=
|
|
222
|
+
var root_16 = _$_.template(`<div class=state>Loading...`);
|
|
223
|
+
var root_17 = _$_.template(`<div class=state>Success!`);
|
|
224
|
+
var root_18 = _$_.template(`<div class=state>Error occurred`);
|
|
225
225
|
|
|
226
226
|
function consequent_7(__anchor, status) {
|
|
227
227
|
var div_9 = root_16();
|
|
@@ -245,10 +245,10 @@ function if_8(status) {
|
|
|
245
245
|
if (status.value === 'loading') return consequent_7; else if (status.value === 'success') return consequent_8; else return alternate_2;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
var root_15 = _$_.template(`<div><button class=
|
|
248
|
+
var root_15 = _$_.template(`<div><button class=success>Success</button><button class=error>Error</button><button class=loading>Loading`);
|
|
249
249
|
|
|
250
250
|
function IfElseIfChain_render(__anchor, __block) {
|
|
251
|
-
const status = _$_.track('loading', __block, '
|
|
251
|
+
const status = _$_.track('loading', __block, 'l79qh6');
|
|
252
252
|
var div_8 = root_15();
|
|
253
253
|
|
|
254
254
|
{
|
|
@@ -270,7 +270,7 @@ function IfElseIfChain_render(__anchor, __block) {
|
|
|
270
270
|
status.value = 'loading';
|
|
271
271
|
};
|
|
272
272
|
|
|
273
|
-
var node_7 = _$_.hydrating ? _$_.hydrate_sibling() :
|
|
273
|
+
var node_7 = _$_.hydrating ? _$_.hydrate_sibling() : _$_.append_into(div_8, true);
|
|
274
274
|
|
|
275
275
|
_$_.if(node_7, if_8, false, status);
|
|
276
276
|
_$_.hydrating && _$_.pop(div_8);
|