ripple 0.4.3 → 0.4.5
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 +81 -0
- package/package.json +3 -3
- package/src/constants.js +6 -0
- package/src/runtime/internal/client/attributes.js +259 -126
- package/src/runtime/internal/client/blocks.js +16 -6
- package/src/runtime/internal/client/composite.js +292 -100
- package/src/runtime/internal/client/constants.js +8 -0
- package/src/runtime/internal/client/events.js +15 -1
- package/src/runtime/internal/client/expression.js +4 -4
- package/src/runtime/internal/client/for.js +13 -38
- package/src/runtime/internal/client/if.js +56 -1
- package/src/runtime/internal/client/index.js +8 -6
- package/src/runtime/internal/client/operations.js +9 -4
- package/src/runtime/internal/client/render.js +37 -0
- package/src/runtime/internal/client/runtime.js +94 -20
- package/src/runtime/internal/client/template-ns.js +45 -4
- package/src/runtime/internal/client/template.js +103 -0
- package/tests/client/composite/composite.dynamic-components.test.tsrx +40 -0
- package/tests/client/css/scoped-styles.test.tsrx +3 -1
- package/tests/client/svg.test.tsrx +273 -1
- package/tests/hydration/compiled/client/basic.js +79 -51
- package/tests/hydration/compiled/client/composite.js +13 -4
- package/tests/hydration/compiled/client/events.js +22 -7
- package/tests/hydration/compiled/client/for.js +110 -71
- package/tests/hydration/compiled/client/fragment-cursor.js +342 -156
- package/tests/hydration/compiled/client/head.js +13 -13
- package/tests/hydration/compiled/client/hmr.js +16 -4
- package/tests/hydration/compiled/client/html-in-template.js +1 -1
- package/tests/hydration/compiled/client/html.js +144 -87
- package/tests/hydration/compiled/client/if-children.js +118 -33
- package/tests/hydration/compiled/client/if-fragment-controlflow.js +41 -21
- package/tests/hydration/compiled/client/if.js +70 -18
- package/tests/hydration/compiled/client/mixed-control-flow.js +50 -20
- package/tests/hydration/compiled/client/nested-control-flow.js +191 -100
- package/tests/hydration/compiled/client/portal.js +29 -9
- package/tests/hydration/compiled/client/reactivity.js +9 -5
- package/tests/hydration/compiled/client/streaming.js +21 -18
- package/tests/hydration/compiled/client/switch.js +17 -17
- package/tests/hydration/compiled/client/track-async-serialization.js +29 -21
- package/tests/hydration/compiled/client/try.js +13 -10
- package/tests/hydration/compiled/client/typed-text.js +3 -2
- package/tests/utils/inline-drift.test.js +83 -0
|
@@ -1,7 +1,7 @@
|
|
|
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', ['class', 'content'], [null]);
|
|
5
5
|
|
|
6
6
|
function consequent(__anchor, { a: expanded, b: children }) {
|
|
7
7
|
var div_2 = root_1();
|
|
@@ -20,7 +20,15 @@ function if_1({ a: expanded, b: children }) {
|
|
|
20
20
|
if (expanded.value) return consequent;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
var root = _$_.
|
|
23
|
+
var root = _$_.template_el('div', ['class', 'container'], [['div', ['role', 'button', 'class', 'header'], 'Toggle']]);
|
|
24
|
+
|
|
25
|
+
function render(__prev) {
|
|
26
|
+
var __a = if_1({ a: __prev._a, b: __prev._b });
|
|
27
|
+
|
|
28
|
+
if (__prev.a !== __a) {
|
|
29
|
+
_$_.if_update(__prev._c, __prev.a = __a);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
24
32
|
|
|
25
33
|
function IfWithChildren_render(__anchor, __block, { children }) {
|
|
26
34
|
const expanded = _$_.track(true, __block, '1j0jg6p');
|
|
@@ -32,17 +40,18 @@ function IfWithChildren_render(__anchor, __block, { children }) {
|
|
|
32
40
|
div_1.__click = () => expanded.value = !expanded.value;
|
|
33
41
|
|
|
34
42
|
var node = _$_.hydrating ? _$_.hydrate_sibling() : _$_.append_into(div, true);
|
|
43
|
+
var ifs = _$_.if_static(node, if_1, 0, { a: expanded, b: children });
|
|
35
44
|
|
|
36
|
-
_$_.if(node, if_1, false, { a: expanded, b: children });
|
|
37
45
|
_$_.hydrating && _$_.pop(div);
|
|
38
46
|
}
|
|
39
47
|
|
|
48
|
+
_$_.render(render, { a: _$_.UNINITIALIZED, _a: expanded, _b: children, _c: ifs });
|
|
40
49
|
_$_.append(__anchor, div);
|
|
41
50
|
}
|
|
42
51
|
|
|
43
52
|
IfWithChildren[_$_.$r] = IfWithChildren_render;
|
|
44
53
|
|
|
45
|
-
var root_2 = _$_.
|
|
54
|
+
var root_2 = _$_.template_el('div', ['class', 'item']);
|
|
46
55
|
|
|
47
56
|
function ChildItem_render(__anchor, __block, { text: label }) {
|
|
48
57
|
var div_3 = root_2();
|
|
@@ -76,7 +85,10 @@ function TestIfWithChildren_render(__anchor, __block) {
|
|
|
76
85
|
|
|
77
86
|
TestIfWithChildren[_$_.$r] = TestIfWithChildren_render;
|
|
78
87
|
|
|
79
|
-
var root_5 = _$_.
|
|
88
|
+
var root_5 = _$_.template_el('div', ['class', 'content'], [
|
|
89
|
+
['span', null, 'Static child 1'],
|
|
90
|
+
['span', null, 'Static child 2']
|
|
91
|
+
]);
|
|
80
92
|
|
|
81
93
|
function consequent_1(__anchor, expanded) {
|
|
82
94
|
var div_6 = root_5();
|
|
@@ -88,7 +100,15 @@ function if_2(expanded) {
|
|
|
88
100
|
if (expanded.value) return consequent_1;
|
|
89
101
|
}
|
|
90
102
|
|
|
91
|
-
var root_4 = _$_.
|
|
103
|
+
var root_4 = _$_.template_el('div', ['class', 'container'], [['div', ['role', 'button', 'class', 'header'], 'Toggle']]);
|
|
104
|
+
|
|
105
|
+
function render_1(__prev) {
|
|
106
|
+
var __a = if_2(__prev._a);
|
|
107
|
+
|
|
108
|
+
if (__prev.a !== __a) {
|
|
109
|
+
_$_.if_update(__prev._b, __prev.a = __a);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
92
112
|
|
|
93
113
|
function IfWithStaticChildren_render(__anchor, __block) {
|
|
94
114
|
const expanded = _$_.track(true, __block, 'gkm3jr');
|
|
@@ -100,17 +120,18 @@ function IfWithStaticChildren_render(__anchor, __block) {
|
|
|
100
120
|
div_5.__click = () => expanded.value = !expanded.value;
|
|
101
121
|
|
|
102
122
|
var node_3 = _$_.hydrating ? _$_.hydrate_sibling() : _$_.append_into(div_4, true);
|
|
123
|
+
var ifs_1 = _$_.if_static(node_3, if_2, 0, expanded);
|
|
103
124
|
|
|
104
|
-
_$_.if(node_3, if_2, false, expanded);
|
|
105
125
|
_$_.hydrating && _$_.pop(div_4);
|
|
106
126
|
}
|
|
107
127
|
|
|
128
|
+
_$_.render(render_1, { a: _$_.UNINITIALIZED, _a: expanded, _b: ifs_1 });
|
|
108
129
|
_$_.append(__anchor, div_4);
|
|
109
130
|
}
|
|
110
131
|
|
|
111
132
|
IfWithStaticChildren[_$_.$r] = IfWithStaticChildren_render;
|
|
112
133
|
|
|
113
|
-
var root_7 = _$_.
|
|
134
|
+
var root_7 = _$_.template_el('div', ['class', 'items'], [null]);
|
|
114
135
|
|
|
115
136
|
function consequent_2(__anchor, { a: expanded, b: children }) {
|
|
116
137
|
var div_8 = root_7();
|
|
@@ -131,6 +152,14 @@ function if_3({ a: expanded, b: children }) {
|
|
|
131
152
|
|
|
132
153
|
var root_6 = _$_.template(`<section class=group><div role=button class=item><div class=indicator></div><h2 class=text>Title</h2><div class=caret><svg xmlns=http://www.w3.org/2000/svg width=18 height=18 viewBox="0 0 24 24"><path d="m9 18 6-6-6-6">`);
|
|
133
154
|
|
|
155
|
+
function render_2(__prev) {
|
|
156
|
+
var __a = if_3({ a: __prev._a, b: __prev._b });
|
|
157
|
+
|
|
158
|
+
if (__prev.a !== __a) {
|
|
159
|
+
_$_.if_update(__prev._c, __prev.a = __a);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
134
163
|
function IfWithSiblingsAndChildren_render(__anchor, __block, { children }) {
|
|
135
164
|
const expanded = _$_.track(true, __block, '18vegr0');
|
|
136
165
|
var section = root_6();
|
|
@@ -145,10 +174,12 @@ function IfWithSiblingsAndChildren_render(__anchor, __block, { children }) {
|
|
|
145
174
|
? _$_.hydrate_sibling()
|
|
146
175
|
: _$_.append_into(section, true);
|
|
147
176
|
|
|
148
|
-
_$_.
|
|
177
|
+
var ifs_2 = _$_.if_static(node_4, if_3, 0, { a: expanded, b: children });
|
|
178
|
+
|
|
149
179
|
_$_.hydrating && _$_.pop(section);
|
|
150
180
|
}
|
|
151
181
|
|
|
182
|
+
_$_.render(render_2, { a: _$_.UNINITIALIZED, _a: expanded, _b: children, _c: ifs_2 });
|
|
152
183
|
_$_.append(__anchor, section);
|
|
153
184
|
}
|
|
154
185
|
|
|
@@ -174,7 +205,7 @@ function TestIfWithSiblingsAndChildren_render(__anchor, __block) {
|
|
|
174
205
|
|
|
175
206
|
TestIfWithSiblingsAndChildren[_$_.$r] = TestIfWithSiblingsAndChildren_render;
|
|
176
207
|
|
|
177
|
-
var root_11 = _$_.
|
|
208
|
+
var root_11 = _$_.template_el('div', ['class', 'conditional'], 'Conditional content');
|
|
178
209
|
|
|
179
210
|
function consequent_3(__anchor, show) {
|
|
180
211
|
var div_11 = root_11();
|
|
@@ -187,6 +218,15 @@ function if_4(show) {
|
|
|
187
218
|
}
|
|
188
219
|
|
|
189
220
|
var root_10 = _$_.template(`<div class=wrapper><div class=nested-parent><div class=nested-child><span class=deep>Deep content</span></div></div></div><button class=toggle>Toggle`, 1, 2);
|
|
221
|
+
|
|
222
|
+
function render_3(__prev) {
|
|
223
|
+
var __a = if_4(__prev._a);
|
|
224
|
+
|
|
225
|
+
if (__prev.a !== __a) {
|
|
226
|
+
_$_.if_update(__prev._b, __prev.a = __a);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
190
230
|
var root_9 = _$_.template(`<!>`, 1, 1);
|
|
191
231
|
|
|
192
232
|
function ElementWithChildrenThenIf_render(__anchor, __block) {
|
|
@@ -201,14 +241,15 @@ function ElementWithChildrenThenIf_render(__anchor, __block) {
|
|
|
201
241
|
{
|
|
202
242
|
var div_10 = _$_.hydrating ? _$_.hydrate_child() : div_9.firstChild;
|
|
203
243
|
var node_7 = _$_.hydrating ? _$_.hydrate_sibling() : _$_.append_into(div_9, true);
|
|
244
|
+
var ifs_3 = _$_.if_static(node_7, if_4, 0, show);
|
|
204
245
|
|
|
205
|
-
_$_.if(node_7, if_4, false, show);
|
|
206
246
|
_$_.hydrating && _$_.pop(div_9);
|
|
207
247
|
}
|
|
208
248
|
|
|
209
249
|
var button = _$_.hydrating ? _$_.hydrate_sibling() : div_9.nextSibling;
|
|
210
250
|
|
|
211
251
|
button.__click = () => show.value = !show.value;
|
|
252
|
+
_$_.render(render_3, { a: _$_.UNINITIALIZED, _a: show, _b: ifs_3 });
|
|
212
253
|
_$_.append(__anchor, fragment_3);
|
|
213
254
|
}));
|
|
214
255
|
|
|
@@ -217,7 +258,7 @@ function ElementWithChildrenThenIf_render(__anchor, __block) {
|
|
|
217
258
|
|
|
218
259
|
ElementWithChildrenThenIf[_$_.$r] = ElementWithChildrenThenIf_render;
|
|
219
260
|
|
|
220
|
-
var root_14 = _$_.
|
|
261
|
+
var root_14 = _$_.template_el('footer', ['class', 'footer'], 'Footer');
|
|
221
262
|
|
|
222
263
|
function consequent_4(__anchor, visible) {
|
|
223
264
|
var footer = root_14();
|
|
@@ -230,6 +271,15 @@ function if_5(visible) {
|
|
|
230
271
|
}
|
|
231
272
|
|
|
232
273
|
var root_13 = _$_.template(`<section class=outer><article class=middle><div class=inner><p class=leaf><strong>Bold</strong><em>Italic</em></p></div></article></section><button class=btn>Toggle`, 1, 2);
|
|
274
|
+
|
|
275
|
+
function render_4(__prev) {
|
|
276
|
+
var __a = if_5(__prev._a);
|
|
277
|
+
|
|
278
|
+
if (__prev.a !== __a) {
|
|
279
|
+
_$_.if_update(__prev._b, __prev.a = __a);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
233
283
|
var root_12 = _$_.template(`<!>`, 1, 1);
|
|
234
284
|
|
|
235
285
|
function DeepNestingThenIf_render(__anchor, __block) {
|
|
@@ -248,13 +298,15 @@ function DeepNestingThenIf_render(__anchor, __block) {
|
|
|
248
298
|
? _$_.hydrate_sibling()
|
|
249
299
|
: _$_.append_into(section_1, true);
|
|
250
300
|
|
|
251
|
-
_$_.
|
|
301
|
+
var ifs_4 = _$_.if_static(node_9, if_5, 0, visible);
|
|
302
|
+
|
|
252
303
|
_$_.hydrating && _$_.pop(section_1);
|
|
253
304
|
}
|
|
254
305
|
|
|
255
306
|
var button_1 = _$_.hydrating ? _$_.hydrate_sibling() : section_1.nextSibling;
|
|
256
307
|
|
|
257
308
|
button_1.__click = () => visible.value = !visible.value;
|
|
309
|
+
_$_.render(render_4, { a: _$_.UNINITIALIZED, _a: visible, _b: ifs_4 });
|
|
258
310
|
_$_.append(__anchor, fragment_5);
|
|
259
311
|
}));
|
|
260
312
|
|
|
@@ -264,7 +316,7 @@ function DeepNestingThenIf_render(__anchor, __block) {
|
|
|
264
316
|
DeepNestingThenIf[_$_.$r] = DeepNestingThenIf_render;
|
|
265
317
|
|
|
266
318
|
var root_16 = _$_.template(`<pre class=code>const x = 1;`);
|
|
267
|
-
var root_17 = _$_.
|
|
319
|
+
var root_17 = _$_.template_el('div', ['class', 'preview'], 'Preview content');
|
|
268
320
|
|
|
269
321
|
function consequent_5(__anchor, activeTab) {
|
|
270
322
|
var pre = root_16();
|
|
@@ -282,19 +334,36 @@ function if_6(activeTab) {
|
|
|
282
334
|
if (activeTab.value === 'code') return consequent_5; else return alternate;
|
|
283
335
|
}
|
|
284
336
|
|
|
285
|
-
var root_15 = _$_.
|
|
337
|
+
var root_15 = _$_.template_el('div', ['class', 'tabs'], [
|
|
338
|
+
[
|
|
339
|
+
'div',
|
|
340
|
+
['class', 'tab-list'],
|
|
341
|
+
[
|
|
342
|
+
['button', ['class', 'tab'], 'Code'],
|
|
343
|
+
['button', ['class', 'tab'], 'Preview']
|
|
344
|
+
]
|
|
345
|
+
],
|
|
346
|
+
['div', ['class', 'panel'], [null]]
|
|
347
|
+
]);
|
|
286
348
|
|
|
287
|
-
function
|
|
288
|
-
var
|
|
349
|
+
function render_5(__prev) {
|
|
350
|
+
var __activeTab_value = __prev._a.value;
|
|
351
|
+
var __a = __activeTab_value === 'code' ? 'true' : 'false';
|
|
289
352
|
|
|
290
353
|
if (__prev.a !== __a) {
|
|
291
|
-
|
|
354
|
+
__prev._b.setAttribute('aria-selected', __prev.a = __a);
|
|
292
355
|
}
|
|
293
356
|
|
|
294
|
-
var __b =
|
|
357
|
+
var __b = __activeTab_value === 'preview' ? 'true' : 'false';
|
|
295
358
|
|
|
296
359
|
if (__prev.b !== __b) {
|
|
297
|
-
|
|
360
|
+
__prev._c.setAttribute('aria-selected', __prev.b = __b);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
var __c = if_6(__prev._a);
|
|
364
|
+
|
|
365
|
+
if (__prev.c !== __c) {
|
|
366
|
+
_$_.if_update(__prev._d, __prev.c = __c);
|
|
298
367
|
}
|
|
299
368
|
}
|
|
300
369
|
|
|
@@ -321,18 +390,20 @@ function DomElementChildrenThenSibling_render(__anchor, __block) {
|
|
|
321
390
|
|
|
322
391
|
{
|
|
323
392
|
var node_11 = _$_.hydrating ? _$_.hydrate_child() : div_14.firstChild;
|
|
393
|
+
var ifs_5 = _$_.if_static(node_11, if_6, 0, activeTab);
|
|
324
394
|
|
|
325
|
-
_$_.if(node_11, if_6, false, activeTab);
|
|
326
395
|
_$_.hydrating && _$_.pop(div_14);
|
|
327
396
|
}
|
|
328
397
|
}
|
|
329
398
|
|
|
330
|
-
_$_.render(
|
|
399
|
+
_$_.render(render_5, {
|
|
331
400
|
a: void 0,
|
|
332
401
|
b: void 0,
|
|
402
|
+
c: _$_.UNINITIALIZED,
|
|
333
403
|
_a: activeTab,
|
|
334
404
|
_b: button_2,
|
|
335
|
-
_c: button_3
|
|
405
|
+
_c: button_3,
|
|
406
|
+
_d: ifs_5
|
|
336
407
|
});
|
|
337
408
|
|
|
338
409
|
_$_.append(__anchor, div_12);
|
|
@@ -342,7 +413,7 @@ DomElementChildrenThenSibling[_$_.$r] = DomElementChildrenThenSibling_render;
|
|
|
342
413
|
|
|
343
414
|
var root_19 = _$_.template(`<div class=container><ul class=list><li class=item></li><li class=item>Another item</li></ul><h2 class=heading>Static Heading</h2><p class=para>Static paragraph</p></div><button class=inc>Increment`, 1, 2);
|
|
344
415
|
|
|
345
|
-
function
|
|
416
|
+
function render_6(__prev) {
|
|
346
417
|
var __a = 'Item count: ' + String(__prev._a.value ?? '');
|
|
347
418
|
|
|
348
419
|
if (__prev.a !== __a) {
|
|
@@ -377,7 +448,7 @@ function DomChildrenThenStaticSiblings_render(__anchor, __block) {
|
|
|
377
448
|
var button_4 = _$_.hydrating ? _$_.hydrate_sibling() : div_16.nextSibling;
|
|
378
449
|
|
|
379
450
|
button_4.__click = () => count.value++;
|
|
380
|
-
_$_.render(
|
|
451
|
+
_$_.render(render_6, { a: '', _a: count, _b: li });
|
|
381
452
|
_$_.append(__anchor, fragment_7);
|
|
382
453
|
}));
|
|
383
454
|
|
|
@@ -396,8 +467,8 @@ function StaticListThenStaticSiblings_render(__anchor, __block) {
|
|
|
396
467
|
|
|
397
468
|
StaticListThenStaticSiblings[_$_.$r] = StaticListThenStaticSiblings_render;
|
|
398
469
|
|
|
399
|
-
var root_21 = _$_.
|
|
400
|
-
var root_22 = _$_.
|
|
470
|
+
var root_21 = _$_.template_el('span', ['class', 'root-if'], 'on');
|
|
471
|
+
var root_22 = _$_.template_el('span', ['class', 'root-if'], 'off');
|
|
401
472
|
|
|
402
473
|
function consequent_6(__anchor, props) {
|
|
403
474
|
var span = root_21();
|
|
@@ -415,15 +486,25 @@ function if_7(props) {
|
|
|
415
486
|
if (props.on.value) return consequent_6; else return alternate_1;
|
|
416
487
|
}
|
|
417
488
|
|
|
489
|
+
function render_7(__prev) {
|
|
490
|
+
var __a = if_7(__prev._a);
|
|
491
|
+
|
|
492
|
+
if (__prev.a !== __a) {
|
|
493
|
+
_$_.if_update(__prev._b, __prev.a = __a);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
418
497
|
function RootIfChild_render(__anchor, __block, props) {
|
|
419
|
-
_$_.
|
|
498
|
+
var ifs_6 = _$_.if_static(__anchor, if_7, 1, props);
|
|
499
|
+
|
|
500
|
+
_$_.render(render_7, { a: _$_.UNINITIALIZED, _a: props, _b: ifs_6 });
|
|
420
501
|
}
|
|
421
502
|
|
|
422
503
|
RootIfChild[_$_.$r] = RootIfChild_render;
|
|
423
504
|
|
|
424
|
-
var root_23 = _$_.
|
|
505
|
+
var root_23 = _$_.template_el('span', ['class', 'root-for']);
|
|
425
506
|
|
|
426
|
-
function
|
|
507
|
+
function render_8(__prev) {
|
|
427
508
|
var __a = __prev.$item;
|
|
428
509
|
|
|
429
510
|
if (__prev.a !== __a) {
|
|
@@ -446,13 +527,13 @@ function RootForChild_render(__anchor, __block, props) {
|
|
|
446
527
|
void 0,
|
|
447
528
|
void 0,
|
|
448
529
|
void 0,
|
|
449
|
-
|
|
530
|
+
render_8
|
|
450
531
|
);
|
|
451
532
|
}
|
|
452
533
|
|
|
453
534
|
RootForChild[_$_.$r] = RootForChild_render;
|
|
454
535
|
|
|
455
|
-
var root_24 = _$_.
|
|
536
|
+
var root_24 = _$_.template_el('span', ['class', 'trailing'], 'end');
|
|
456
537
|
|
|
457
538
|
function TrailingChild_render(__anchor, __block) {
|
|
458
539
|
var span_3 = root_24();
|
|
@@ -462,7 +543,11 @@ function TrailingChild_render(__anchor, __block) {
|
|
|
462
543
|
|
|
463
544
|
TrailingChild[_$_.$r] = TrailingChild_render;
|
|
464
545
|
|
|
465
|
-
var root_25 = _$_.
|
|
546
|
+
var root_25 = _$_.template_el('div', ['class', 'wrapper'], [
|
|
547
|
+
['div', ['class', 'host']],
|
|
548
|
+
['button', ['class', 'toggle'], 'Toggle'],
|
|
549
|
+
['button', ['class', 'rotate'], 'Rotate']
|
|
550
|
+
]);
|
|
466
551
|
|
|
467
552
|
function ComponentChildrenWithControlFlowRoots_render(__anchor, __block) {
|
|
468
553
|
const on = _$_.track(true, __block, '1vo6ory');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import * as _$_ from 'ripple/internal/client';
|
|
3
3
|
|
|
4
|
-
var root_2 = _$_.
|
|
4
|
+
var root_2 = _$_.template_el('p', ['class', 'muze'], ' ');
|
|
5
5
|
var root_1 = _$_.template(`<!><span class=after>after`, 1, 2);
|
|
6
6
|
|
|
7
7
|
function consequent(__anchor, { a: hasLoaded, b: muzes }) {
|
|
@@ -35,7 +35,7 @@ function if_1({ a: hasLoaded, b: muzes }) {
|
|
|
35
35
|
if (hasLoaded) return consequent;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
var root = _$_.
|
|
38
|
+
var root = _$_.template_el('div', ['class', 'feed-c'], [null]);
|
|
39
39
|
|
|
40
40
|
function IfFragmentForElement_render(__anchor, __block) {
|
|
41
41
|
const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
|
|
@@ -54,8 +54,8 @@ function IfFragmentForElement_render(__anchor, __block) {
|
|
|
54
54
|
|
|
55
55
|
IfFragmentForElement[_$_.$r] = IfFragmentForElement_render;
|
|
56
56
|
|
|
57
|
-
var root_5 = _$_.
|
|
58
|
-
var root_6 = _$_.
|
|
57
|
+
var root_5 = _$_.template_el('p', ['class', 'muze'], ' ');
|
|
58
|
+
var root_6 = _$_.template_el('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 = _$_.
|
|
70
|
+
var root_7 = _$_.template_el('span', ['class', 'empty'], 'empty');
|
|
71
71
|
|
|
72
72
|
function consequent_2(__anchor, muzes) {
|
|
73
73
|
var span_1 = root_7();
|
|
@@ -81,6 +81,20 @@ function if_3(muzes) {
|
|
|
81
81
|
|
|
82
82
|
var root_4 = _$_.template(`<!><!><!>`, 1, 3);
|
|
83
83
|
|
|
84
|
+
function render(__prev) {
|
|
85
|
+
var __a = if_2(__prev._a);
|
|
86
|
+
|
|
87
|
+
if (__prev.a !== __a) {
|
|
88
|
+
_$_.if_update(__prev._b, __prev.a = __a);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
var __b = if_3(__prev._a);
|
|
92
|
+
|
|
93
|
+
if (__prev.b !== __b) {
|
|
94
|
+
_$_.if_update(__prev._c, __prev.b = __b);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
84
98
|
function consequent_3(__anchor, { a: hasLoaded, b: muzes }) {
|
|
85
99
|
var fragment_1 = root_4();
|
|
86
100
|
var node_3 = _$_.first_child_frag(fragment_1);
|
|
@@ -105,12 +119,18 @@ function consequent_3(__anchor, { a: hasLoaded, b: muzes }) {
|
|
|
105
119
|
);
|
|
106
120
|
|
|
107
121
|
var node_4 = _$_.hydrating ? _$_.hydrate_sibling() : node_3.nextSibling;
|
|
108
|
-
|
|
109
|
-
_$_.if(node_4, if_2, false, muzes);
|
|
110
|
-
|
|
122
|
+
var ifs = _$_.if_static(node_4, if_2, 0, muzes);
|
|
111
123
|
var node_5 = _$_.hydrating ? _$_.hydrate_sibling() : node_4.nextSibling;
|
|
124
|
+
var ifs_1 = _$_.if_static(node_5, if_3, 0, muzes);
|
|
125
|
+
|
|
126
|
+
_$_.render(render, {
|
|
127
|
+
a: _$_.UNINITIALIZED,
|
|
128
|
+
b: _$_.UNINITIALIZED,
|
|
129
|
+
_a: muzes,
|
|
130
|
+
_b: ifs,
|
|
131
|
+
_c: ifs_1
|
|
132
|
+
});
|
|
112
133
|
|
|
113
|
-
_$_.if(node_5, if_3, false, muzes);
|
|
114
134
|
_$_.append(__anchor, fragment_1);
|
|
115
135
|
}
|
|
116
136
|
|
|
@@ -118,7 +138,7 @@ function if_4({ a: hasLoaded, b: muzes }) {
|
|
|
118
138
|
if (hasLoaded) return consequent_3;
|
|
119
139
|
}
|
|
120
140
|
|
|
121
|
-
var root_3 = _$_.
|
|
141
|
+
var root_3 = _$_.template_el('div', ['class', 'feed'], [null]);
|
|
122
142
|
|
|
123
143
|
function IfFragmentForIfIf_render(__anchor, __block) {
|
|
124
144
|
const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
|
|
@@ -150,7 +170,7 @@ function if_5(hasLoaded) {
|
|
|
150
170
|
if (hasLoaded) return consequent_4;
|
|
151
171
|
}
|
|
152
172
|
|
|
153
|
-
var root_8 = _$_.
|
|
173
|
+
var root_8 = _$_.template_el('div', ['class', 'feed-b'], [null]);
|
|
154
174
|
|
|
155
175
|
function IfFragmentElements_render(__anchor, __block) {
|
|
156
176
|
const hasLoaded = true;
|
|
@@ -168,7 +188,7 @@ function IfFragmentElements_render(__anchor, __block) {
|
|
|
168
188
|
|
|
169
189
|
IfFragmentElements[_$_.$r] = IfFragmentElements_render;
|
|
170
190
|
|
|
171
|
-
var root_12 = _$_.
|
|
191
|
+
var root_12 = _$_.template_el('p', ['class', 'muze'], ' ');
|
|
172
192
|
var root_11 = _$_.template(`<!><span class=after>after`, 1, 2);
|
|
173
193
|
var root_10 = _$_.template(`<!>`, 1, 1);
|
|
174
194
|
|
|
@@ -209,7 +229,7 @@ function ComponentBodyFragmentControlFlow_render(__anchor, __block) {
|
|
|
209
229
|
|
|
210
230
|
ComponentBodyFragmentControlFlow[_$_.$r] = ComponentBodyFragmentControlFlow_render;
|
|
211
231
|
|
|
212
|
-
var root_14 = _$_.
|
|
232
|
+
var root_14 = _$_.template_el('p', ['class', 'muze'], ' ');
|
|
213
233
|
var root_15 = _$_.template(`<!><span class=after>after`, 1, 2);
|
|
214
234
|
var root_13 = _$_.template(`<!>`, 1, 1);
|
|
215
235
|
|
|
@@ -254,7 +274,7 @@ function ComponentBodyCodeBlockControlFlow_render(__anchor, __block) {
|
|
|
254
274
|
|
|
255
275
|
ComponentBodyCodeBlockControlFlow[_$_.$r] = ComponentBodyCodeBlockControlFlow_render;
|
|
256
276
|
|
|
257
|
-
var root_17 = _$_.
|
|
277
|
+
var root_17 = _$_.template_el('p', ['class', 'muze'], ' ');
|
|
258
278
|
var root_18 = _$_.template(`<!><span class=after>after`, 1, 2);
|
|
259
279
|
|
|
260
280
|
function consequent_5(__anchor, { a: hasLoaded, b: muzes }) {
|
|
@@ -292,7 +312,7 @@ function if_6({ a: hasLoaded, b: muzes }) {
|
|
|
292
312
|
if (hasLoaded) return consequent_5;
|
|
293
313
|
}
|
|
294
314
|
|
|
295
|
-
var root_16 = _$_.
|
|
315
|
+
var root_16 = _$_.template_el('div', ['class', 'feed-f'], [null]);
|
|
296
316
|
|
|
297
317
|
function IfCodeBlockControlFlow_render(__anchor, __block) {
|
|
298
318
|
const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
|
|
@@ -311,8 +331,8 @@ function IfCodeBlockControlFlow_render(__anchor, __block) {
|
|
|
311
331
|
|
|
312
332
|
IfCodeBlockControlFlow[_$_.$r] = IfCodeBlockControlFlow_render;
|
|
313
333
|
|
|
314
|
-
var root_20 = _$_.
|
|
315
|
-
var root_22 = _$_.
|
|
334
|
+
var root_20 = _$_.template_el('span', ['class', 'loading'], 'loading');
|
|
335
|
+
var root_22 = _$_.template_el('p', ['class', 'muze'], ' ');
|
|
316
336
|
var root_21 = _$_.template(`<!><span class=after>after`, 1, 2);
|
|
317
337
|
|
|
318
338
|
function consequent_6(__anchor, { a: hasLoaded, b: muzes }) {
|
|
@@ -352,7 +372,7 @@ function if_7({ a: hasLoaded, b: muzes }) {
|
|
|
352
372
|
if (hasLoaded) return consequent_6; else return alternate;
|
|
353
373
|
}
|
|
354
374
|
|
|
355
|
-
var root_19 = _$_.
|
|
375
|
+
var root_19 = _$_.template_el('div', ['class', 'feed-d'], [null]);
|
|
356
376
|
|
|
357
377
|
function IfElseFragment_render(__anchor, __block) {
|
|
358
378
|
const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
|
|
@@ -371,8 +391,8 @@ function IfElseFragment_render(__anchor, __block) {
|
|
|
371
391
|
|
|
372
392
|
IfElseFragment[_$_.$r] = IfElseFragment_render;
|
|
373
393
|
|
|
374
|
-
var root_25 = _$_.
|
|
375
|
-
var root_24 = _$_.
|
|
394
|
+
var root_25 = _$_.template_el('p', ['class', 'muze'], ' ');
|
|
395
|
+
var root_24 = _$_.template_el('section', null, [['span', ['class', 'after'], 'after']]);
|
|
376
396
|
|
|
377
397
|
function consequent_7(__anchor, { a: hasLoaded, b: muzes }) {
|
|
378
398
|
var section = root_24();
|
|
@@ -409,7 +429,7 @@ function if_8({ a: hasLoaded, b: muzes }) {
|
|
|
409
429
|
if (hasLoaded) return consequent_7;
|
|
410
430
|
}
|
|
411
431
|
|
|
412
|
-
var root_23 = _$_.
|
|
432
|
+
var root_23 = _$_.template_el('div', ['class', 'feed-e'], [null]);
|
|
413
433
|
|
|
414
434
|
function IfDivFragment_render(__anchor, __block) {
|
|
415
435
|
const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
|