ripple 0.4.4 → 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 +24 -0
- package/package.json +2 -2
- package/src/runtime/internal/client/attributes.js +8 -1
- package/src/runtime/internal/client/events.js +15 -1
- package/src/runtime/internal/client/index.js +2 -0
- 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 +21 -9
- package/src/runtime/internal/client/template.js +69 -22
- package/tests/hydration/compiled/client/basic.js +43 -16
- package/tests/hydration/compiled/client/composite.js +2 -2
- package/tests/hydration/compiled/client/events.js +21 -6
- package/tests/hydration/compiled/client/for.js +37 -9
- package/tests/hydration/compiled/client/fragment-cursor.js +160 -41
- package/tests/hydration/compiled/client/head.js +3 -3
- package/tests/hydration/compiled/client/hmr.js +5 -2
- package/tests/hydration/compiled/client/html.js +66 -37
- package/tests/hydration/compiled/client/if-children.js +24 -7
- package/tests/hydration/compiled/client/if-fragment-controlflow.js +7 -7
- package/tests/hydration/compiled/client/if.js +5 -1
- package/tests/hydration/compiled/client/nested-control-flow.js +3 -3
- package/tests/hydration/compiled/client/portal.js +15 -4
- package/tests/hydration/compiled/client/reactivity.js +6 -2
- package/tests/hydration/compiled/client/streaming.js +4 -1
- package/tests/hydration/compiled/client/track-async-serialization.js +10 -2
- package/tests/hydration/compiled/client/try.js +4 -1
- package/tests/utils/inline-drift.test.js +83 -0
|
@@ -49,7 +49,7 @@ function ComplexHtml_render(__anchor, __block) {
|
|
|
49
49
|
|
|
50
50
|
ComplexHtml[_$_.$r] = ComplexHtml_render;
|
|
51
51
|
|
|
52
|
-
var root_4 = _$_.
|
|
52
|
+
var root_4 = _$_.template_el('div', null, [null, null]);
|
|
53
53
|
|
|
54
54
|
function render(__prev) {
|
|
55
55
|
_$_.html(__prev._a, () => __prev._b);
|
|
@@ -74,7 +74,7 @@ function MultipleHtml_render(__anchor, __block) {
|
|
|
74
74
|
|
|
75
75
|
MultipleHtml[_$_.$r] = MultipleHtml_render;
|
|
76
76
|
|
|
77
|
-
var root_5 = _$_.
|
|
77
|
+
var root_5 = _$_.template_el('div', null, [null, ['button', null, 'Increment']]);
|
|
78
78
|
|
|
79
79
|
function render_1(__prev) {
|
|
80
80
|
_$_.html(__prev._a, () => "<p>Count: 0</p>");
|
|
@@ -95,7 +95,7 @@ function HtmlWithReactivity_render(__anchor, __block) {
|
|
|
95
95
|
|
|
96
96
|
HtmlWithReactivity[_$_.$r] = HtmlWithReactivity_render;
|
|
97
97
|
|
|
98
|
-
var root_6 = _$_.
|
|
98
|
+
var root_6 = _$_.template_el('div', ['class', 'wrapper'], [['div', ['class', 'inner'], [null]]]);
|
|
99
99
|
|
|
100
100
|
function HtmlWrapper_render(__anchor, __block, { children }) {
|
|
101
101
|
var div_5 = root_6();
|
|
@@ -152,7 +152,7 @@ function HtmlInChildrenWithSiblings_render(__anchor, __block) {
|
|
|
152
152
|
|
|
153
153
|
HtmlInChildrenWithSiblings[_$_.$r] = HtmlInChildrenWithSiblings_render;
|
|
154
154
|
|
|
155
|
-
var root_9 = _$_.
|
|
155
|
+
var root_9 = _$_.template_el('div', ['class', 'doc'], [null, null]);
|
|
156
156
|
|
|
157
157
|
function render_2(__prev) {
|
|
158
158
|
_$_.html(__prev._a, () => __prev._b);
|
|
@@ -233,7 +233,7 @@ function DocFooter_render(__anchor, __block) {
|
|
|
233
233
|
|
|
234
234
|
DocFooter[_$_.$r] = DocFooter_render;
|
|
235
235
|
|
|
236
|
-
var root_15 = _$_.
|
|
236
|
+
var root_15 = _$_.template_el('div', ['class', 'edit-link'], [['a', null, 'Edit']]);
|
|
237
237
|
|
|
238
238
|
function consequent(__anchor, editPath) {
|
|
239
239
|
var div_16 = root_15();
|
|
@@ -251,7 +251,7 @@ function if_1(editPath) {
|
|
|
251
251
|
if (editPath) return consequent;
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
var root_16 = _$_.
|
|
254
|
+
var root_16 = _$_.template_el('nav', ['class', 'prev-next'], [['a', null, ' ']]);
|
|
255
255
|
|
|
256
256
|
function render_3(__prev) {
|
|
257
257
|
var __a = __prev._a.href;
|
|
@@ -283,7 +283,7 @@ function if_2(nextLink) {
|
|
|
283
283
|
if (nextLink) return consequent_1;
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
-
var root_18 = _$_.
|
|
286
|
+
var root_18 = _$_.template_el('li', null, [['a']]);
|
|
287
287
|
|
|
288
288
|
function render_4(__prev) {
|
|
289
289
|
var __a = __prev._a.text;
|
|
@@ -300,7 +300,7 @@ function render_4(__prev) {
|
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
var root_17 = _$_.
|
|
303
|
+
var root_17 = _$_.template_el('div', ['class', 'toc'], [['ul']]);
|
|
304
304
|
|
|
305
305
|
function consequent_2(__anchor, toc) {
|
|
306
306
|
var div_17 = root_17();
|
|
@@ -338,7 +338,14 @@ function if_3(toc) {
|
|
|
338
338
|
if (toc.length > 0) return consequent_2;
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
var root_14 = _$_.
|
|
341
|
+
var root_14 = _$_.template_el('div', ['class', 'layout'], [
|
|
342
|
+
[
|
|
343
|
+
'div',
|
|
344
|
+
['class', 'content-container'],
|
|
345
|
+
[['article', null, [['div', null, [null]]]]]
|
|
346
|
+
],
|
|
347
|
+
['aside', null, [null]]
|
|
348
|
+
]);
|
|
342
349
|
|
|
343
350
|
function render_5(__prev) {
|
|
344
351
|
var __a = if_3(__prev._a);
|
|
@@ -462,8 +469,8 @@ function HtmlWithUndefinedContent_render(__anchor, __block) {
|
|
|
462
469
|
|
|
463
470
|
HtmlWithUndefinedContent[_$_.$r] = HtmlWithUndefinedContent_render;
|
|
464
471
|
|
|
465
|
-
var root_22 = _$_.
|
|
466
|
-
var root_23 = _$_.
|
|
472
|
+
var root_22 = _$_.template_el('h1', ['class', 'heading'], [null]);
|
|
473
|
+
var root_23 = _$_.template_el('h2', ['class', 'heading'], [null]);
|
|
467
474
|
|
|
468
475
|
function switch_case_0(__anchor, { a: level, b: children }) {
|
|
469
476
|
var h1_1 = root_22();
|
|
@@ -507,7 +514,14 @@ function DynamicHeading_render(__anchor, __block, { level, children }) {
|
|
|
507
514
|
|
|
508
515
|
DynamicHeading[_$_.$r] = DynamicHeading_render;
|
|
509
516
|
|
|
510
|
-
var root_24 = _$_.
|
|
517
|
+
var root_24 = _$_.template_el('div', ['class', 'code-block'], [
|
|
518
|
+
[
|
|
519
|
+
'div',
|
|
520
|
+
['class', 'header'],
|
|
521
|
+
[['button', null, 'Copy'], ['span', ['class', 'lang'], 'js']]
|
|
522
|
+
],
|
|
523
|
+
['div', ['class', 'content']]
|
|
524
|
+
]);
|
|
511
525
|
|
|
512
526
|
function CodeBlock_render(__anchor, __block, { code }) {
|
|
513
527
|
const highlighted = `<pre class="shiki"><code>${code}</code></pre>`;
|
|
@@ -525,7 +539,7 @@ function CodeBlock_render(__anchor, __block, { code }) {
|
|
|
525
539
|
|
|
526
540
|
CodeBlock[_$_.$r] = CodeBlock_render;
|
|
527
541
|
|
|
528
|
-
var root_25 = _$_.
|
|
542
|
+
var root_25 = _$_.template_el('div', ['class', 'wrapper'], [['div', ['class', 'inner'], [null]]]);
|
|
529
543
|
|
|
530
544
|
function ContentWrapper_render(__anchor, __block, { children }) {
|
|
531
545
|
var div_24 = root_25();
|
|
@@ -576,8 +590,8 @@ function HtmlAfterSwitchInChildren_render(__anchor, __block) {
|
|
|
576
590
|
|
|
577
591
|
HtmlAfterSwitchInChildren[_$_.$r] = HtmlAfterSwitchInChildren_render;
|
|
578
592
|
|
|
579
|
-
var root_27 = _$_.
|
|
580
|
-
var root_28 = _$_.
|
|
593
|
+
var root_27 = _$_.template_el('h1', ['class', 'heading'], [null]);
|
|
594
|
+
var root_28 = _$_.template_el('h2', ['class', 'heading'], [null]);
|
|
581
595
|
|
|
582
596
|
function consequent_3(__anchor, { a: primary, b: children }) {
|
|
583
597
|
var h1_2 = root_27();
|
|
@@ -737,7 +751,7 @@ function HtmlAfterTryInChildren_render(__anchor, __block) {
|
|
|
737
751
|
|
|
738
752
|
HtmlAfterTryInChildren[_$_.$r] = HtmlAfterTryInChildren_render;
|
|
739
753
|
|
|
740
|
-
var root_35 = _$_.
|
|
754
|
+
var root_35 = _$_.template_el('span', ['class', 'boxed'], [null]);
|
|
741
755
|
|
|
742
756
|
function Boxed_render(__anchor, __block, { children }) {
|
|
743
757
|
var span_2 = root_35();
|
|
@@ -804,7 +818,7 @@ function if_5(active) {
|
|
|
804
818
|
if (active) return consequent_4;
|
|
805
819
|
}
|
|
806
820
|
|
|
807
|
-
var root_38 = _$_.
|
|
821
|
+
var root_38 = _$_.template_el('div', null, [['a', null, [['span']]]]);
|
|
808
822
|
|
|
809
823
|
function NavItem_render(__anchor, __block, { href, text: label, active = false }) {
|
|
810
824
|
var div_27 = root_38();
|
|
@@ -836,7 +850,7 @@ function NavItem_render(__anchor, __block, { href, text: label, active = false }
|
|
|
836
850
|
|
|
837
851
|
NavItem[_$_.$r] = NavItem_render;
|
|
838
852
|
|
|
839
|
-
var root_41 = _$_.
|
|
853
|
+
var root_41 = _$_.template_el('div', ['class', 'section-items'], [null]);
|
|
840
854
|
|
|
841
855
|
function consequent_5(__anchor, { a: expanded, b: children }) {
|
|
842
856
|
var div_30 = root_41();
|
|
@@ -855,7 +869,13 @@ function if_6({ a: expanded, b: children }) {
|
|
|
855
869
|
if (expanded.value) return consequent_5;
|
|
856
870
|
}
|
|
857
871
|
|
|
858
|
-
var root_40 = _$_.
|
|
872
|
+
var root_40 = _$_.template_el('section', ['class', 'sidebar-section'], [
|
|
873
|
+
[
|
|
874
|
+
'div',
|
|
875
|
+
['class', 'section-header'],
|
|
876
|
+
[['h2'], ['button', null, 'Toggle']]
|
|
877
|
+
]
|
|
878
|
+
]);
|
|
859
879
|
|
|
860
880
|
function render_6(__prev) {
|
|
861
881
|
var __a = if_6({ a: __prev._a, b: __prev._b });
|
|
@@ -903,7 +923,14 @@ SidebarSection[_$_.$r] = SidebarSection_render;
|
|
|
903
923
|
|
|
904
924
|
var root_43 = _$_.template(`<!><!>`, 1, 2);
|
|
905
925
|
var root_44 = _$_.template(`<!><!>`, 1, 2);
|
|
906
|
-
|
|
926
|
+
|
|
927
|
+
var root_42 = _$_.template_el('aside', ['class', 'sidebar'], [
|
|
928
|
+
[
|
|
929
|
+
'nav',
|
|
930
|
+
null,
|
|
931
|
+
[['div', ['class', 'group']], ['div', ['class', 'group']]]
|
|
932
|
+
]
|
|
933
|
+
]);
|
|
907
934
|
|
|
908
935
|
function SideNav_render(__anchor, __block, { currentPath }) {
|
|
909
936
|
var aside_1 = root_42();
|
|
@@ -983,7 +1010,7 @@ function SideNav_render(__anchor, __block, { currentPath }) {
|
|
|
983
1010
|
|
|
984
1011
|
SideNav[_$_.$r] = SideNav_render;
|
|
985
1012
|
|
|
986
|
-
var root_45 = _$_.
|
|
1013
|
+
var root_45 = _$_.template_el('header', ['class', 'page-header'], [['div', ['class', 'logo'], 'MyApp']]);
|
|
987
1014
|
|
|
988
1015
|
function PageHeader_render(__anchor, __block) {
|
|
989
1016
|
var header = root_45();
|
|
@@ -993,7 +1020,7 @@ function PageHeader_render(__anchor, __block) {
|
|
|
993
1020
|
|
|
994
1021
|
PageHeader[_$_.$r] = PageHeader_render;
|
|
995
1022
|
|
|
996
|
-
var root_47 = _$_.
|
|
1023
|
+
var root_47 = _$_.template_el('div', ['class', 'edit-link'], [['a', ['href', '/edit'], 'Edit']]);
|
|
997
1024
|
|
|
998
1025
|
function consequent_6(__anchor) {
|
|
999
1026
|
var div_36 = root_47();
|
|
@@ -1047,7 +1074,7 @@ function LayoutWithSidebarAndMain_render(__anchor, __block) {
|
|
|
1047
1074
|
|
|
1048
1075
|
LayoutWithSidebarAndMain[_$_.$r] = LayoutWithSidebarAndMain_render;
|
|
1049
1076
|
|
|
1050
|
-
var root_48 = _$_.
|
|
1077
|
+
var root_48 = _$_.template_el('article', ['class', 'doc-content'], [['div', null, [null]]]);
|
|
1051
1078
|
|
|
1052
1079
|
function ArticleWrapper_render(__anchor, __block, { children }) {
|
|
1053
1080
|
var article_1 = root_48();
|
|
@@ -1079,7 +1106,7 @@ function SimpleFooter_render(__anchor, __block) {
|
|
|
1079
1106
|
SimpleFooter[_$_.$r] = SimpleFooter_render;
|
|
1080
1107
|
|
|
1081
1108
|
var root_51 = _$_.template(`<h1>Title</h1><p>Content goes here.`, 1, 2);
|
|
1082
|
-
var root_52 = _$_.
|
|
1109
|
+
var root_52 = _$_.template_el('div', ['class', 'edit-link'], [['a', ['href', '/edit'], 'Edit']]);
|
|
1083
1110
|
|
|
1084
1111
|
function consequent_7(__anchor) {
|
|
1085
1112
|
var div_39 = root_52();
|
|
@@ -1091,7 +1118,7 @@ function if_8() {
|
|
|
1091
1118
|
if (true) return consequent_7;
|
|
1092
1119
|
}
|
|
1093
1120
|
|
|
1094
|
-
var root_53 = _$_.
|
|
1121
|
+
var root_53 = _$_.template_el('nav', ['class', 'prev-next'], [['a', ['href', '/prev'], 'Previous']]);
|
|
1095
1122
|
|
|
1096
1123
|
function consequent_8(__anchor) {
|
|
1097
1124
|
var nav_2 = root_53();
|
|
@@ -1103,7 +1130,7 @@ function if_9() {
|
|
|
1103
1130
|
if (true) return consequent_8;
|
|
1104
1131
|
}
|
|
1105
1132
|
|
|
1106
|
-
var root_50 = _$_.
|
|
1133
|
+
var root_50 = _$_.template_el('div', ['class', 'content-container'], [null, null, null, null]);
|
|
1107
1134
|
|
|
1108
1135
|
function ArticleWithChildrenThenSibling_render(__anchor, __block) {
|
|
1109
1136
|
var div_38 = root_50();
|
|
@@ -1140,7 +1167,7 @@ function ArticleWithChildrenThenSibling_render(__anchor, __block) {
|
|
|
1140
1167
|
ArticleWithChildrenThenSibling[_$_.$r] = ArticleWithChildrenThenSibling_render;
|
|
1141
1168
|
|
|
1142
1169
|
var root_55 = _$_.template_el('div', ['class', 'doc-content']);
|
|
1143
|
-
var root_56 = _$_.
|
|
1170
|
+
var root_56 = _$_.template_el('div', ['class', 'edit-link'], [['a', ['href', '/edit'], 'Edit']]);
|
|
1144
1171
|
|
|
1145
1172
|
function consequent_9(__anchor) {
|
|
1146
1173
|
var div_42 = root_56();
|
|
@@ -1152,7 +1179,7 @@ function if_10() {
|
|
|
1152
1179
|
if (true) return consequent_9;
|
|
1153
1180
|
}
|
|
1154
1181
|
|
|
1155
|
-
var root_54 = _$_.
|
|
1182
|
+
var root_54 = _$_.template_el('div', ['class', 'content-container'], [null, null, null]);
|
|
1156
1183
|
|
|
1157
1184
|
function ArticleWithHtmlChildThenSibling_render(__anchor, __block) {
|
|
1158
1185
|
const htmlContent = '<pre><code>const x = 1;</code></pre>';
|
|
@@ -1185,7 +1212,7 @@ function ArticleWithHtmlChildThenSibling_render(__anchor, __block) {
|
|
|
1185
1212
|
|
|
1186
1213
|
ArticleWithHtmlChildThenSibling[_$_.$r] = ArticleWithHtmlChildThenSibling_render;
|
|
1187
1214
|
|
|
1188
|
-
var root_58 = _$_.
|
|
1215
|
+
var root_58 = _$_.template_el('div', ['class', 'edit-link'], [['a', ['href', '/edit'], 'Edit']]);
|
|
1189
1216
|
|
|
1190
1217
|
function consequent_10(__anchor) {
|
|
1191
1218
|
var div_45 = root_58();
|
|
@@ -1197,7 +1224,9 @@ function if_11() {
|
|
|
1197
1224
|
if (true) return consequent_10;
|
|
1198
1225
|
}
|
|
1199
1226
|
|
|
1200
|
-
var root_57 = _$_.
|
|
1227
|
+
var root_57 = _$_.template_el('div', ['class', 'content-container'], [
|
|
1228
|
+
['article', ['class', 'doc-content'], [['div', null, [null]]]]
|
|
1229
|
+
]);
|
|
1201
1230
|
|
|
1202
1231
|
function InlineArticleLayout_render(__anchor, __block, { children }) {
|
|
1203
1232
|
var div_43 = root_57();
|
|
@@ -1280,7 +1309,7 @@ function FooterStub_render(__anchor, __block) {
|
|
|
1280
1309
|
|
|
1281
1310
|
FooterStub[_$_.$r] = FooterStub_render;
|
|
1282
1311
|
|
|
1283
|
-
var root_64 = _$_.
|
|
1312
|
+
var root_64 = _$_.template_el('div', ['class', 'edit-link'], [['a', ['href', '/edit'], 'Edit on GitHub']]);
|
|
1284
1313
|
|
|
1285
1314
|
function consequent_11(__anchor, editPath) {
|
|
1286
1315
|
var div_53 = root_64();
|
|
@@ -1292,7 +1321,7 @@ function if_12(editPath) {
|
|
|
1292
1321
|
if (editPath) return consequent_11;
|
|
1293
1322
|
}
|
|
1294
1323
|
|
|
1295
|
-
var root_65 = _$_.
|
|
1324
|
+
var root_65 = _$_.template_el('nav', ['class', 'prev-next'], [['a', null, ' ']]);
|
|
1296
1325
|
|
|
1297
1326
|
function render_7(__prev) {
|
|
1298
1327
|
var __a = __prev._a.href;
|
|
@@ -1436,7 +1465,7 @@ function DocsLayoutWithoutData_render(__anchor, __block) {
|
|
|
1436
1465
|
|
|
1437
1466
|
DocsLayoutWithoutData[_$_.$r] = DocsLayoutWithoutData_render;
|
|
1438
1467
|
|
|
1439
|
-
var root_69 = _$_.
|
|
1468
|
+
var root_69 = _$_.template_el('div', ['class', 'edit-link'], [['a', null, 'Edit on GitHub']]);
|
|
1440
1469
|
|
|
1441
1470
|
function consequent_13(__anchor, editPath) {
|
|
1442
1471
|
var div_62 = root_69();
|
|
@@ -1454,7 +1483,7 @@ function if_14(editPath) {
|
|
|
1454
1483
|
if (editPath) return consequent_13;
|
|
1455
1484
|
}
|
|
1456
1485
|
|
|
1457
|
-
var root_71 = _$_.
|
|
1486
|
+
var root_71 = _$_.template_el('a', ['class', 'pager prev'], [['span', ['class', 'title'], ' ']]);
|
|
1458
1487
|
|
|
1459
1488
|
function render_8(__prev) {
|
|
1460
1489
|
var __a = __prev._a.href;
|
|
@@ -1494,7 +1523,7 @@ function if_15(prevLink) {
|
|
|
1494
1523
|
if (prevLink) return consequent_14; else return alternate_1;
|
|
1495
1524
|
}
|
|
1496
1525
|
|
|
1497
|
-
var root_73 = _$_.
|
|
1526
|
+
var root_73 = _$_.template_el('a', ['class', 'pager next'], [['span', ['class', 'title'], ' ']]);
|
|
1498
1527
|
|
|
1499
1528
|
function render_9(__prev) {
|
|
1500
1529
|
var __a = __prev._a.href;
|
|
@@ -1526,7 +1555,7 @@ function if_16(nextLink) {
|
|
|
1526
1555
|
if (nextLink) return consequent_15;
|
|
1527
1556
|
}
|
|
1528
1557
|
|
|
1529
|
-
var root_70 = _$_.
|
|
1558
|
+
var root_70 = _$_.template_el('nav', ['class', 'prev-next'], [null, null]);
|
|
1530
1559
|
|
|
1531
1560
|
function consequent_16(__anchor, { a: prevLink, b: nextLink }) {
|
|
1532
1561
|
var nav_4 = root_70();
|
|
@@ -1566,7 +1595,7 @@ function render_10(__prev) {
|
|
|
1566
1595
|
}
|
|
1567
1596
|
}
|
|
1568
1597
|
|
|
1569
|
-
var root_74 = _$_.
|
|
1598
|
+
var root_74 = _$_.template_el('div', ['class', 'aside-content'], [['nav', ['class', 'outline']]]);
|
|
1570
1599
|
|
|
1571
1600
|
function consequent_17(__anchor, toc) {
|
|
1572
1601
|
var div_63 = root_74();
|
|
@@ -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,7 @@ 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
24
|
|
|
25
25
|
function render(__prev) {
|
|
26
26
|
var __a = if_1({ a: __prev._a, b: __prev._b });
|
|
@@ -85,7 +85,10 @@ function TestIfWithChildren_render(__anchor, __block) {
|
|
|
85
85
|
|
|
86
86
|
TestIfWithChildren[_$_.$r] = TestIfWithChildren_render;
|
|
87
87
|
|
|
88
|
-
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
|
+
]);
|
|
89
92
|
|
|
90
93
|
function consequent_1(__anchor, expanded) {
|
|
91
94
|
var div_6 = root_5();
|
|
@@ -97,7 +100,7 @@ function if_2(expanded) {
|
|
|
97
100
|
if (expanded.value) return consequent_1;
|
|
98
101
|
}
|
|
99
102
|
|
|
100
|
-
var root_4 = _$_.
|
|
103
|
+
var root_4 = _$_.template_el('div', ['class', 'container'], [['div', ['role', 'button', 'class', 'header'], 'Toggle']]);
|
|
101
104
|
|
|
102
105
|
function render_1(__prev) {
|
|
103
106
|
var __a = if_2(__prev._a);
|
|
@@ -128,7 +131,7 @@ function IfWithStaticChildren_render(__anchor, __block) {
|
|
|
128
131
|
|
|
129
132
|
IfWithStaticChildren[_$_.$r] = IfWithStaticChildren_render;
|
|
130
133
|
|
|
131
|
-
var root_7 = _$_.
|
|
134
|
+
var root_7 = _$_.template_el('div', ['class', 'items'], [null]);
|
|
132
135
|
|
|
133
136
|
function consequent_2(__anchor, { a: expanded, b: children }) {
|
|
134
137
|
var div_8 = root_7();
|
|
@@ -331,7 +334,17 @@ function if_6(activeTab) {
|
|
|
331
334
|
if (activeTab.value === 'code') return consequent_5; else return alternate;
|
|
332
335
|
}
|
|
333
336
|
|
|
334
|
-
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
|
+
]);
|
|
335
348
|
|
|
336
349
|
function render_5(__prev) {
|
|
337
350
|
var __activeTab_value = __prev._a.value;
|
|
@@ -530,7 +543,11 @@ function TrailingChild_render(__anchor, __block) {
|
|
|
530
543
|
|
|
531
544
|
TrailingChild[_$_.$r] = TrailingChild_render;
|
|
532
545
|
|
|
533
|
-
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
|
+
]);
|
|
534
551
|
|
|
535
552
|
function ComponentChildrenWithControlFlowRoots_render(__anchor, __block) {
|
|
536
553
|
const on = _$_.track(true, __block, '1vo6ory');
|
|
@@ -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' }];
|
|
@@ -138,7 +138,7 @@ function if_4({ a: hasLoaded, b: muzes }) {
|
|
|
138
138
|
if (hasLoaded) return consequent_3;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
var root_3 = _$_.
|
|
141
|
+
var root_3 = _$_.template_el('div', ['class', 'feed'], [null]);
|
|
142
142
|
|
|
143
143
|
function IfFragmentForIfIf_render(__anchor, __block) {
|
|
144
144
|
const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
|
|
@@ -170,7 +170,7 @@ function if_5(hasLoaded) {
|
|
|
170
170
|
if (hasLoaded) return consequent_4;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
var root_8 = _$_.
|
|
173
|
+
var root_8 = _$_.template_el('div', ['class', 'feed-b'], [null]);
|
|
174
174
|
|
|
175
175
|
function IfFragmentElements_render(__anchor, __block) {
|
|
176
176
|
const hasLoaded = true;
|
|
@@ -312,7 +312,7 @@ function if_6({ a: hasLoaded, b: muzes }) {
|
|
|
312
312
|
if (hasLoaded) return consequent_5;
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
var root_16 = _$_.
|
|
315
|
+
var root_16 = _$_.template_el('div', ['class', 'feed-f'], [null]);
|
|
316
316
|
|
|
317
317
|
function IfCodeBlockControlFlow_render(__anchor, __block) {
|
|
318
318
|
const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
|
|
@@ -372,7 +372,7 @@ function if_7({ a: hasLoaded, b: muzes }) {
|
|
|
372
372
|
if (hasLoaded) return consequent_6; else return alternate;
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
-
var root_19 = _$_.
|
|
375
|
+
var root_19 = _$_.template_el('div', ['class', 'feed-d'], [null]);
|
|
376
376
|
|
|
377
377
|
function IfElseFragment_render(__anchor, __block) {
|
|
378
378
|
const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
|
|
@@ -392,7 +392,7 @@ function IfElseFragment_render(__anchor, __block) {
|
|
|
392
392
|
IfElseFragment[_$_.$r] = IfElseFragment_render;
|
|
393
393
|
|
|
394
394
|
var root_25 = _$_.template_el('p', ['class', 'muze'], ' ');
|
|
395
|
-
var root_24 = _$_.
|
|
395
|
+
var root_24 = _$_.template_el('section', null, [['span', ['class', 'after'], 'after']]);
|
|
396
396
|
|
|
397
397
|
function consequent_7(__anchor, { a: hasLoaded, b: muzes }) {
|
|
398
398
|
var section = root_24();
|
|
@@ -429,7 +429,7 @@ function if_8({ a: hasLoaded, b: muzes }) {
|
|
|
429
429
|
if (hasLoaded) return consequent_7;
|
|
430
430
|
}
|
|
431
431
|
|
|
432
|
-
var root_23 = _$_.
|
|
432
|
+
var root_23 = _$_.template_el('div', ['class', 'feed-e'], [null]);
|
|
433
433
|
|
|
434
434
|
function IfDivFragment_render(__anchor, __block) {
|
|
435
435
|
const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
|
|
@@ -284,7 +284,11 @@ function if_8(status) {
|
|
|
284
284
|
if (status.value === 'loading') return consequent_7; else if (status.value === 'success') return consequent_8; else return alternate_2;
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
var root_15 = _$_.
|
|
287
|
+
var root_15 = _$_.template_el('div', null, [
|
|
288
|
+
['button', ['class', 'success'], 'Success'],
|
|
289
|
+
['button', ['class', 'error'], 'Error'],
|
|
290
|
+
['button', ['class', 'loading'], 'Loading']
|
|
291
|
+
]);
|
|
288
292
|
|
|
289
293
|
function render_4(__prev) {
|
|
290
294
|
var __a = if_8(__prev._a);
|
|
@@ -195,7 +195,7 @@ function if_2({ a: show, b: kind }) {
|
|
|
195
195
|
if (show) return consequent_1;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
var root_5 = _$_.
|
|
198
|
+
var root_5 = _$_.template_el('div', ['class', 'if-switch'], [null]);
|
|
199
199
|
|
|
200
200
|
function IfSwitch_render(__anchor, __block) {
|
|
201
201
|
const show = true;
|
|
@@ -247,7 +247,7 @@ function if_3({ a: show, b: kind }) {
|
|
|
247
247
|
if (show) return consequent_2;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
var root_8 = _$_.
|
|
250
|
+
var root_8 = _$_.template_el('div', ['class', 'if-switch-hidden'], [['p', ['class', 'after'], 'after']]);
|
|
251
251
|
|
|
252
252
|
function IfSwitchHidden_render(__anchor, __block) {
|
|
253
253
|
const show = false;
|
|
@@ -631,7 +631,7 @@ function switch_7(kind) {
|
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
|
|
634
|
-
var root_20 = _$_.
|
|
634
|
+
var root_20 = _$_.template_el('div', ['class', 'switch-try'], [null]);
|
|
635
635
|
|
|
636
636
|
function SwitchTry_render(__anchor, __block) {
|
|
637
637
|
const kind = 'a';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import * as _$_ from 'ripple/internal/client';
|
|
3
3
|
|
|
4
4
|
var root_1 = _$_.template_el('div', ['class', 'portal-content'], 'Portal content');
|
|
5
|
-
var root = _$_.
|
|
5
|
+
var root = _$_.template_el('div', ['class', 'container'], [['h1', null, 'Main Content']]);
|
|
6
6
|
|
|
7
7
|
function SimplePortal_render(__anchor, __block) {
|
|
8
8
|
var div = root();
|
|
@@ -39,7 +39,7 @@ function if_1(show) {
|
|
|
39
39
|
if (show.value) return consequent;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
var root_2 = _$_.
|
|
42
|
+
var root_2 = _$_.template_el('div', ['class', 'container'], [['button', ['class', 'toggle'], 'Toggle']]);
|
|
43
43
|
|
|
44
44
|
function render(__prev) {
|
|
45
45
|
var __a = if_1(__prev._a);
|
|
@@ -71,7 +71,11 @@ function ConditionalPortal_render(__anchor, __block) {
|
|
|
71
71
|
ConditionalPortal[_$_.$r] = ConditionalPortal_render;
|
|
72
72
|
|
|
73
73
|
var root_5 = _$_.template_el('div', ['class', 'portal-content'], 'Modal content');
|
|
74
|
-
|
|
74
|
+
|
|
75
|
+
var root_4 = _$_.template_el('div', null, [
|
|
76
|
+
['div', ['class', 'main-content'], 'Main page content'],
|
|
77
|
+
['div', ['class', 'footer'], 'Footer']
|
|
78
|
+
]);
|
|
75
79
|
|
|
76
80
|
function PortalWithMainContent_render(__anchor, __block) {
|
|
77
81
|
var div_4 = root_4();
|
|
@@ -95,7 +99,14 @@ function PortalWithMainContent_render(__anchor, __block) {
|
|
|
95
99
|
PortalWithMainContent[_$_.$r] = PortalWithMainContent_render;
|
|
96
100
|
|
|
97
101
|
var root_7 = _$_.template_el('div', ['class', 'portal-content'], 'Portal content');
|
|
98
|
-
|
|
102
|
+
|
|
103
|
+
var root_6 = _$_.template_el('div', ['class', 'outer'], [
|
|
104
|
+
[
|
|
105
|
+
'div',
|
|
106
|
+
['class', 'inner'],
|
|
107
|
+
[['span', null, 'Nested content']]
|
|
108
|
+
]
|
|
109
|
+
]);
|
|
99
110
|
|
|
100
111
|
function NestedContentWithPortal_render(__anchor, __block) {
|
|
101
112
|
var div_7 = root_6();
|
|
@@ -22,7 +22,7 @@ function TrackedState_render(__anchor, __block) {
|
|
|
22
22
|
|
|
23
23
|
TrackedState[_$_.$r] = TrackedState_render;
|
|
24
24
|
|
|
25
|
-
var root_1 = _$_.
|
|
25
|
+
var root_1 = _$_.template_el('div', null, [['span', ['class', 'count'], ' ']]);
|
|
26
26
|
|
|
27
27
|
function CounterWithInitial_render(__anchor, __block, props) {
|
|
28
28
|
const count = _$_.track(props.initial, __block, '133ubs');
|
|
@@ -70,7 +70,11 @@ function ComputedValues_render(__anchor, __block) {
|
|
|
70
70
|
|
|
71
71
|
ComputedValues[_$_.$r] = ComputedValues_render;
|
|
72
72
|
|
|
73
|
-
var root_3 = _$_.
|
|
73
|
+
var root_3 = _$_.template_el('div', ['class', 'multiple-tracked'], [
|
|
74
|
+
['div', ['class', 'x']],
|
|
75
|
+
['div', ['class', 'y']],
|
|
76
|
+
['div', ['class', 'z']]
|
|
77
|
+
]);
|
|
74
78
|
|
|
75
79
|
function render_1(__prev) {
|
|
76
80
|
var __a = __prev._a.value;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import * as _$_ from 'ripple/internal/client';
|
|
3
3
|
|
|
4
|
-
var root = _$_.
|
|
4
|
+
var root = _$_.template_el('div', ['class', 'resolved'], [
|
|
5
|
+
['span', ['class', 'value']],
|
|
6
|
+
['button', ['class', 'inc'], 'inc']
|
|
7
|
+
]);
|
|
5
8
|
|
|
6
9
|
function render(__prev) {
|
|
7
10
|
var __a = __prev._a.value + ':' + __prev._b.value;
|
|
@@ -179,7 +179,11 @@ function AsyncNumericValue_render(__anchor, __block) {
|
|
|
179
179
|
|
|
180
180
|
AsyncNumericValue[_$_.$r] = AsyncNumericValue_render;
|
|
181
181
|
|
|
182
|
-
var root_12 = _$_.
|
|
182
|
+
var root_12 = _$_.template_el('div', ['class', 'user'], [
|
|
183
|
+
['span', ['class', 'name'], ' '],
|
|
184
|
+
['span', ['class', 'age'], ' ']
|
|
185
|
+
]);
|
|
186
|
+
|
|
183
187
|
var root_13 = _$_.template_el('div', ['class', 'loading'], 'loading user...');
|
|
184
188
|
|
|
185
189
|
function AsyncObjectValue_render(__anchor, __block) {
|
|
@@ -223,7 +227,11 @@ function AsyncObjectValue_render(__anchor, __block) {
|
|
|
223
227
|
|
|
224
228
|
AsyncObjectValue[_$_.$r] = AsyncObjectValue_render;
|
|
225
229
|
|
|
226
|
-
var root_14 = _$_.
|
|
230
|
+
var root_14 = _$_.template_el('div', ['class', 'multi'], [
|
|
231
|
+
['span', ['class', 'first'], ' '],
|
|
232
|
+
['span', ['class', 'second'], ' ']
|
|
233
|
+
]);
|
|
234
|
+
|
|
227
235
|
var root_15 = _$_.template_el('div', ['class', 'loading'], 'loading...');
|
|
228
236
|
|
|
229
237
|
function AsyncMultipleValues_render(__anchor, __block) {
|
|
@@ -11,7 +11,10 @@ function RootPending_render(__anchor, __block) {
|
|
|
11
11
|
|
|
12
12
|
RootPending[_$_.$r] = RootPending_render;
|
|
13
13
|
|
|
14
|
-
var root_1 = _$_.
|
|
14
|
+
var root_1 = _$_.template_el('section', ['class', 'root-catch'], [
|
|
15
|
+
['p', ['class', 'root-error'], ' '],
|
|
16
|
+
['button', ['class', 'root-reset'], 'retry']
|
|
17
|
+
]);
|
|
15
18
|
|
|
16
19
|
function RootCatch_render(__anchor, __block, { error, reset }) {
|
|
17
20
|
var section = root_1();
|