ripple 0.3.67 → 0.3.69
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 +57 -0
- package/package.json +3 -3
- package/src/jsx-runtime.d.ts +2 -2
- package/src/runtime/element.js +1 -1
- package/src/runtime/index-client.js +11 -11
- package/src/runtime/index-server.js +7 -4
- package/src/runtime/internal/client/bindings.js +1 -1
- package/src/runtime/internal/client/blocks.js +13 -4
- package/src/runtime/internal/client/component.js +55 -0
- package/src/runtime/internal/client/composite.js +4 -2
- package/src/runtime/internal/client/expression.js +65 -7
- package/src/runtime/internal/client/hmr.js +54 -43
- package/src/runtime/internal/client/index.js +5 -1
- package/src/runtime/internal/client/portal.js +70 -69
- package/src/runtime/internal/client/render.js +3 -0
- package/src/runtime/internal/server/index.js +92 -8
- package/tests/client/__snapshots__/html.test.tsrx.snap +3 -3
- package/tests/client/array/array.copy-within.test.tsrx +33 -31
- package/tests/client/array/array.derived.test.tsrx +186 -169
- package/tests/client/array/array.iteration.test.tsrx +40 -37
- package/tests/client/array/array.mutations.test.tsrx +113 -101
- package/tests/client/array/array.static.test.tsrx +119 -101
- package/tests/client/array/array.to-methods.test.tsrx +24 -21
- package/tests/client/async-suspend.test.tsrx +247 -246
- package/tests/client/basic/__snapshots__/basic.rendering.test.tsrx.snap +0 -1
- package/tests/client/basic/basic.attributes.test.tsrx +428 -423
- package/tests/client/basic/basic.collections.test.tsrx +109 -102
- package/tests/client/basic/basic.components.test.tsrx +323 -205
- package/tests/client/basic/basic.errors.test.tsrx +91 -91
- package/tests/client/basic/basic.events.test.tsrx +114 -115
- package/tests/client/basic/basic.get-set.test.tsrx +97 -87
- package/tests/client/basic/basic.hmr.test.tsrx +19 -16
- package/tests/client/basic/basic.reactivity.test.tsrx +199 -191
- package/tests/client/basic/basic.rendering.test.tsrx +272 -182
- package/tests/client/basic/basic.styling.test.tsrx +23 -22
- package/tests/client/basic/basic.utilities.test.tsrx +10 -8
- package/tests/client/boundaries.test.tsrx +26 -26
- package/tests/client/compiler/__snapshots__/compiler.assignments.test.rsrx.snap +5 -5
- package/tests/client/compiler/__snapshots__/compiler.assignments.test.tsrx.snap +5 -5
- package/tests/client/compiler/compiler.assignments.test.tsrx +77 -81
- package/tests/client/compiler/compiler.attributes.test.tsrx +15 -15
- package/tests/client/compiler/compiler.basic.test.tsrx +322 -314
- package/tests/client/compiler/compiler.regex.test.tsrx +44 -47
- package/tests/client/compiler/compiler.tracked-access.test.tsrx +38 -38
- package/tests/client/compiler/compiler.try-in-function.test.tsrx +16 -16
- package/tests/client/compiler/compiler.typescript.test.tsrx +2 -2
- package/tests/client/composite/composite.dynamic-components.test.tsrx +47 -48
- package/tests/client/composite/composite.generics.test.tsrx +168 -192
- package/tests/client/composite/composite.props.test.tsrx +97 -81
- package/tests/client/composite/composite.reactivity.test.tsrx +177 -147
- package/tests/client/composite/composite.render.test.tsrx +122 -105
- package/tests/client/computed-properties.test.tsrx +28 -28
- package/tests/client/context.test.tsrx +21 -21
- package/tests/client/css/global-additional-cases.test.tsrx +58 -58
- package/tests/client/css/global-advanced-selectors.test.tsrx +16 -16
- package/tests/client/css/global-at-rules.test.tsrx +10 -10
- package/tests/client/css/global-basic.test.tsrx +14 -14
- package/tests/client/css/global-classes-ids.test.tsrx +14 -14
- package/tests/client/css/global-combinators.test.tsrx +10 -10
- package/tests/client/css/global-complex-nesting.test.tsrx +14 -14
- package/tests/client/css/global-edge-cases.test.tsrx +18 -18
- package/tests/client/css/global-keyframes.test.tsrx +12 -12
- package/tests/client/css/global-nested.test.tsrx +10 -10
- package/tests/client/css/global-pseudo.test.tsrx +12 -12
- package/tests/client/css/global-scoping.test.tsrx +20 -20
- package/tests/client/css/style-identifier.test.tsrx +143 -291
- package/tests/client/date.test.tsrx +146 -133
- package/tests/client/dynamic-elements.test.tsrx +398 -365
- package/tests/client/events.test.tsrx +292 -290
- package/tests/client/for.test.tsrx +156 -153
- package/tests/client/head.test.tsrx +105 -96
- package/tests/client/html.test.tsrx +122 -26
- package/tests/client/input-value.test.tsrx +1361 -1314
- package/tests/client/lazy-array.test.tsrx +16 -13
- package/tests/client/lazy-destructuring.test.tsrx +257 -213
- package/tests/client/map.test.tsrx +65 -60
- package/tests/client/media-query.test.tsrx +22 -20
- package/tests/client/object.test.tsrx +87 -81
- package/tests/client/portal.test.tsrx +57 -51
- package/tests/client/ref.test.tsrx +233 -202
- package/tests/client/return.test.tsrx +71 -2560
- package/tests/client/set.test.tsrx +54 -45
- package/tests/client/svg.test.tsrx +216 -186
- package/tests/client/switch.test.tsrx +194 -193
- package/tests/client/track-async-hydration.test.tsrx +18 -14
- package/tests/client/tracked-index-access.test.tsrx +28 -18
- package/tests/client/try.test.tsrx +675 -548
- package/tests/client/tsx.test.tsrx +373 -311
- package/tests/client/typescript-generics.test.tsrx +145 -145
- package/tests/client/url/url.derived.test.tsrx +33 -28
- package/tests/client/url/url.parsing.test.tsrx +61 -51
- package/tests/client/url/url.partial-removal.test.tsrx +56 -48
- package/tests/client/url/url.reactivity.test.tsrx +142 -125
- package/tests/client/url/url.serialization.test.tsrx +13 -11
- package/tests/client/url-search-params/url-search-params.derived.test.tsrx +34 -29
- package/tests/client/url-search-params/url-search-params.initialization.test.tsrx +25 -21
- package/tests/client/url-search-params/url-search-params.iteration.test.tsrx +50 -45
- package/tests/client/url-search-params/url-search-params.mutation.test.tsrx +111 -99
- package/tests/client/url-search-params/url-search-params.retrieval.test.tsrx +49 -43
- package/tests/client/url-search-params/url-search-params.serialization.test.tsrx +14 -12
- package/tests/client/url-search-params/url-search-params.tracked-url.test.tsrx +16 -14
- package/tests/hydration/basic.test.js +3 -3
- package/tests/hydration/compiled/client/basic.js +586 -651
- package/tests/hydration/compiled/client/composite.js +79 -104
- package/tests/hydration/compiled/client/events.js +140 -148
- package/tests/hydration/compiled/client/for.js +1005 -1018
- package/tests/hydration/compiled/client/head.js +124 -134
- package/tests/hydration/compiled/client/hmr.js +41 -48
- package/tests/hydration/compiled/client/html-in-template.js +38 -41
- package/tests/hydration/compiled/client/html.js +970 -1314
- package/tests/hydration/compiled/client/if-children.js +234 -249
- package/tests/hydration/compiled/client/if.js +182 -189
- package/tests/hydration/compiled/client/mixed-control-flow.js +347 -303
- package/tests/hydration/compiled/client/nested-control-flow.js +1084 -832
- package/tests/hydration/compiled/client/portal.js +65 -85
- package/tests/hydration/compiled/client/reactivity.js +84 -90
- package/tests/hydration/compiled/client/return.js +38 -1939
- package/tests/hydration/compiled/client/switch.js +218 -224
- package/tests/hydration/compiled/client/track-async-serialization.js +250 -259
- package/tests/hydration/compiled/client/try.js +123 -132
- package/tests/hydration/compiled/server/basic.js +773 -831
- package/tests/hydration/compiled/server/composite.js +166 -191
- package/tests/hydration/compiled/server/events.js +170 -184
- package/tests/hydration/compiled/server/for.js +851 -909
- package/tests/hydration/compiled/server/head.js +206 -216
- package/tests/hydration/compiled/server/hmr.js +64 -72
- package/tests/hydration/compiled/server/html-in-template.js +42 -76
- package/tests/hydration/compiled/server/html.js +1362 -1667
- package/tests/hydration/compiled/server/if-children.js +419 -445
- package/tests/hydration/compiled/server/if.js +194 -208
- package/tests/hydration/compiled/server/mixed-control-flow.js +249 -257
- package/tests/hydration/compiled/server/nested-control-flow.js +491 -515
- package/tests/hydration/compiled/server/portal.js +152 -160
- package/tests/hydration/compiled/server/reactivity.js +94 -106
- package/tests/hydration/compiled/server/return.js +28 -2172
- package/tests/hydration/compiled/server/switch.js +274 -286
- package/tests/hydration/compiled/server/track-async-serialization.js +340 -358
- package/tests/hydration/compiled/server/try.js +167 -185
- package/tests/hydration/components/basic.tsrx +320 -272
- package/tests/hydration/components/composite.tsrx +44 -32
- package/tests/hydration/components/events.tsrx +101 -91
- package/tests/hydration/components/for.tsrx +510 -452
- package/tests/hydration/components/head.tsrx +87 -80
- package/tests/hydration/components/hmr.tsrx +22 -17
- package/tests/hydration/components/html-in-template.tsrx +22 -17
- package/tests/hydration/components/html.tsrx +525 -443
- package/tests/hydration/components/if-children.tsrx +158 -148
- package/tests/hydration/components/if.tsrx +109 -95
- package/tests/hydration/components/mixed-control-flow.tsrx +100 -96
- package/tests/hydration/components/nested-control-flow.tsrx +215 -203
- package/tests/hydration/components/portal.tsrx +41 -34
- package/tests/hydration/components/reactivity.tsrx +37 -27
- package/tests/hydration/components/return.tsrx +12 -556
- package/tests/hydration/components/switch.tsrx +120 -114
- package/tests/hydration/components/track-async-serialization.tsrx +107 -91
- package/tests/hydration/components/try.tsrx +55 -40
- package/tests/hydration/html.test.js +4 -4
- package/tests/hydration/return.test.js +13 -532
- package/tests/server/await.test.tsrx +3 -3
- package/tests/server/basic.attributes.test.tsrx +264 -195
- package/tests/server/basic.components.test.tsrx +296 -169
- package/tests/server/basic.test.tsrx +300 -198
- package/tests/server/compiler.test.tsrx +62 -60
- package/tests/server/composite.props.test.tsrx +77 -63
- package/tests/server/composite.test.tsrx +168 -192
- package/tests/server/context.test.tsrx +18 -12
- package/tests/server/dynamic-elements.test.tsrx +197 -180
- package/tests/server/for.test.tsrx +85 -78
- package/tests/server/head.test.tsrx +50 -43
- package/tests/server/html-nesting-validation.test.tsrx +8 -8
- package/tests/server/if.test.tsrx +57 -51
- package/tests/server/lazy-destructuring.test.tsrx +366 -294
- package/tests/server/return.test.tsrx +76 -1355
- package/tests/server/streaming-ssr.test.tsrx +4 -75
- package/tests/server/style-identifier.test.tsrx +169 -148
- package/tests/server/switch.test.tsrx +91 -85
- package/tests/server/track-async-serialization.test.tsrx +105 -85
- package/tests/server/try.test.tsrx +374 -280
- package/tests/utils/compiler-compat-config.test.js +2 -2
- package/tests/utils/runtime-imports.test.js +10 -0
- package/types/index.d.ts +8 -0
- package/tests/client/__snapshots__/html.test.rsrx.snap +0 -40
|
@@ -24,389 +24,374 @@ var root_19 = _$_.template(`<div class="wrapper"><ul class="features"><li><stron
|
|
|
24
24
|
|
|
25
25
|
import { track } from 'ripple';
|
|
26
26
|
|
|
27
|
-
export function IfWithChildren(
|
|
28
|
-
_$_.
|
|
27
|
+
export function IfWithChildren({ children }) {
|
|
28
|
+
return _$_.tsrx_element((__anchor, __block) => {
|
|
29
|
+
let lazy = _$_.track(true, __block, 'c64714b1');
|
|
30
|
+
var div_1 = root();
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
{
|
|
33
|
+
var div_2 = _$_.child(div_1);
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
var div_2 = _$_.child(div_1);
|
|
35
|
+
div_2.__click = () => _$_.set(lazy, !lazy.value);
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
var node = _$_.sibling(div_2);
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
{
|
|
40
|
+
var consequent = (__anchor) => {
|
|
41
|
+
var div_3 = root_1();
|
|
39
42
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
var div_3 = root_1();
|
|
43
|
+
{
|
|
44
|
+
var expression = _$_.child(div_3);
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
_$_.expression(expression, () => children);
|
|
47
|
+
_$_.pop(div_3);
|
|
48
|
+
}
|
|
46
49
|
|
|
47
|
-
_$_.
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
+
_$_.append(__anchor, div_3);
|
|
51
|
+
};
|
|
50
52
|
|
|
51
|
-
_$_.
|
|
52
|
-
|
|
53
|
+
_$_.if(node, (__render) => {
|
|
54
|
+
if (lazy.value) __render(consequent);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
53
57
|
|
|
54
|
-
_$_.
|
|
55
|
-
if (lazy.value) __render(consequent);
|
|
56
|
-
});
|
|
58
|
+
_$_.pop(div_1);
|
|
57
59
|
}
|
|
58
60
|
|
|
59
|
-
_$_.
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
_$_.append(__anchor, div_1);
|
|
63
|
-
_$_.pop_component();
|
|
61
|
+
_$_.append(__anchor, div_1);
|
|
62
|
+
});
|
|
64
63
|
}
|
|
65
64
|
|
|
66
|
-
export function ChildItem(
|
|
67
|
-
_$_.
|
|
68
|
-
|
|
69
|
-
var div_4 = root_2();
|
|
65
|
+
export function ChildItem({ text: label }) {
|
|
66
|
+
return _$_.tsrx_element((__anchor, __block) => {
|
|
67
|
+
var div_4 = root_2();
|
|
70
68
|
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
{
|
|
70
|
+
var expression_1 = _$_.child(div_4, true);
|
|
73
71
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
expression_1.nodeValue = label;
|
|
73
|
+
_$_.pop(div_4);
|
|
74
|
+
}
|
|
77
75
|
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
_$_.append(__anchor, div_4);
|
|
77
|
+
});
|
|
80
78
|
}
|
|
81
79
|
|
|
82
|
-
export function TestIfWithChildren(
|
|
83
|
-
_$_.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
var node_1 = _$_.first_child_frag(fragment);
|
|
80
|
+
export function TestIfWithChildren() {
|
|
81
|
+
return _$_.tsrx_element((__anchor, __block) => {
|
|
82
|
+
var fragment = root_3();
|
|
83
|
+
var node_1 = _$_.first_child_frag(fragment);
|
|
87
84
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
{
|
|
91
|
-
children: _$_.tsrx_element(function render_children(__anchor, __block) {
|
|
85
|
+
_$_.render_component(IfWithChildren, node_1, {
|
|
86
|
+
children: _$_.tsrx_element((__anchor, __block) => {
|
|
92
87
|
var fragment_1 = root_4();
|
|
93
88
|
var node_2 = _$_.first_child_frag(fragment_1);
|
|
94
89
|
|
|
95
|
-
ChildItem
|
|
90
|
+
_$_.render_component(ChildItem, node_2, { text: "Item 1" });
|
|
96
91
|
|
|
97
92
|
var node_3 = _$_.sibling(node_2);
|
|
98
93
|
|
|
99
|
-
ChildItem
|
|
94
|
+
_$_.render_component(ChildItem, node_3, { text: "Item 2" });
|
|
100
95
|
_$_.append(__anchor, fragment_1);
|
|
101
96
|
})
|
|
102
|
-
}
|
|
103
|
-
_$_.active_block
|
|
104
|
-
);
|
|
97
|
+
});
|
|
105
98
|
|
|
106
|
-
|
|
107
|
-
|
|
99
|
+
_$_.append(__anchor, fragment);
|
|
100
|
+
});
|
|
108
101
|
}
|
|
109
102
|
|
|
110
|
-
export function IfWithStaticChildren(
|
|
111
|
-
_$_.
|
|
103
|
+
export function IfWithStaticChildren() {
|
|
104
|
+
return _$_.tsrx_element((__anchor, __block) => {
|
|
105
|
+
let lazy_1 = _$_.track(true, __block, '3bba8f77');
|
|
106
|
+
var div_5 = root_5();
|
|
112
107
|
|
|
113
|
-
|
|
114
|
-
|
|
108
|
+
{
|
|
109
|
+
var div_6 = _$_.child(div_5);
|
|
115
110
|
|
|
116
|
-
|
|
117
|
-
var div_6 = _$_.child(div_5);
|
|
111
|
+
div_6.__click = () => _$_.set(lazy_1, !lazy_1.value);
|
|
118
112
|
|
|
119
|
-
|
|
113
|
+
var node_4 = _$_.sibling(div_6);
|
|
120
114
|
|
|
121
|
-
|
|
115
|
+
{
|
|
116
|
+
var consequent_1 = (__anchor) => {
|
|
117
|
+
var div_7 = root_6();
|
|
122
118
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
var div_7 = root_6();
|
|
119
|
+
_$_.append(__anchor, div_7);
|
|
120
|
+
};
|
|
126
121
|
|
|
127
|
-
_$_.
|
|
128
|
-
|
|
122
|
+
_$_.if(node_4, (__render) => {
|
|
123
|
+
if (lazy_1.value) __render(consequent_1);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
129
126
|
|
|
130
|
-
_$_.
|
|
131
|
-
if (lazy_1.value) __render(consequent_1);
|
|
132
|
-
});
|
|
127
|
+
_$_.pop(div_5);
|
|
133
128
|
}
|
|
134
129
|
|
|
135
|
-
_$_.
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
_$_.append(__anchor, div_5);
|
|
139
|
-
_$_.pop_component();
|
|
130
|
+
_$_.append(__anchor, div_5);
|
|
131
|
+
});
|
|
140
132
|
}
|
|
141
133
|
|
|
142
|
-
export function IfWithSiblingsAndChildren(
|
|
143
|
-
_$_.
|
|
134
|
+
export function IfWithSiblingsAndChildren({ children }) {
|
|
135
|
+
return _$_.tsrx_element((__anchor, __block) => {
|
|
136
|
+
let lazy_2 = _$_.track(true, __block, 'a1b8fb4c');
|
|
137
|
+
var section_1 = root_7();
|
|
144
138
|
|
|
145
|
-
|
|
146
|
-
|
|
139
|
+
{
|
|
140
|
+
var div_8 = _$_.child(section_1);
|
|
147
141
|
|
|
148
|
-
|
|
149
|
-
|
|
142
|
+
div_8.__click = () => _$_.set(lazy_2, !lazy_2.value);
|
|
143
|
+
_$_.pop(div_8);
|
|
150
144
|
|
|
151
|
-
|
|
152
|
-
_$_.pop(div_8);
|
|
145
|
+
var node_5 = _$_.sibling(div_8);
|
|
153
146
|
|
|
154
|
-
|
|
147
|
+
{
|
|
148
|
+
var consequent_2 = (__anchor) => {
|
|
149
|
+
var div_9 = root_8();
|
|
155
150
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
var div_9 = root_8();
|
|
151
|
+
{
|
|
152
|
+
var expression_2 = _$_.child(div_9);
|
|
159
153
|
|
|
160
|
-
|
|
161
|
-
|
|
154
|
+
_$_.expression(expression_2, () => children);
|
|
155
|
+
_$_.pop(div_9);
|
|
156
|
+
}
|
|
162
157
|
|
|
163
|
-
_$_.
|
|
164
|
-
|
|
165
|
-
}
|
|
158
|
+
_$_.append(__anchor, div_9);
|
|
159
|
+
};
|
|
166
160
|
|
|
167
|
-
_$_.
|
|
168
|
-
|
|
161
|
+
_$_.if(node_5, (__render) => {
|
|
162
|
+
if (lazy_2.value) __render(consequent_2);
|
|
163
|
+
});
|
|
164
|
+
}
|
|
169
165
|
|
|
170
|
-
_$_.
|
|
171
|
-
if (lazy_2.value) __render(consequent_2);
|
|
172
|
-
});
|
|
166
|
+
_$_.pop(section_1);
|
|
173
167
|
}
|
|
174
168
|
|
|
175
|
-
_$_.
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
_$_.append(__anchor, section_1);
|
|
179
|
-
_$_.pop_component();
|
|
169
|
+
_$_.append(__anchor, section_1);
|
|
170
|
+
});
|
|
180
171
|
}
|
|
181
172
|
|
|
182
|
-
export function TestIfWithSiblingsAndChildren(
|
|
183
|
-
_$_.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
var node_6 = _$_.first_child_frag(fragment_2);
|
|
173
|
+
export function TestIfWithSiblingsAndChildren() {
|
|
174
|
+
return _$_.tsrx_element((__anchor, __block) => {
|
|
175
|
+
var fragment_2 = root_9();
|
|
176
|
+
var node_6 = _$_.first_child_frag(fragment_2);
|
|
187
177
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
{
|
|
191
|
-
children: _$_.tsrx_element(function render_children(__anchor, __block) {
|
|
178
|
+
_$_.render_component(IfWithSiblingsAndChildren, node_6, {
|
|
179
|
+
children: _$_.tsrx_element((__anchor, __block) => {
|
|
192
180
|
var fragment_3 = root_10();
|
|
193
181
|
var node_7 = _$_.first_child_frag(fragment_3);
|
|
194
182
|
|
|
195
|
-
ChildItem
|
|
183
|
+
_$_.render_component(ChildItem, node_7, { text: "Item A" });
|
|
196
184
|
|
|
197
185
|
var node_8 = _$_.sibling(node_7);
|
|
198
186
|
|
|
199
|
-
ChildItem
|
|
187
|
+
_$_.render_component(ChildItem, node_8, { text: "Item B" });
|
|
200
188
|
_$_.append(__anchor, fragment_3);
|
|
201
189
|
})
|
|
202
|
-
}
|
|
203
|
-
_$_.active_block
|
|
204
|
-
);
|
|
190
|
+
});
|
|
205
191
|
|
|
206
|
-
|
|
207
|
-
|
|
192
|
+
_$_.append(__anchor, fragment_2);
|
|
193
|
+
});
|
|
208
194
|
}
|
|
209
195
|
|
|
210
|
-
export function ElementWithChildrenThenIf(
|
|
211
|
-
_$_.
|
|
196
|
+
export function ElementWithChildrenThenIf() {
|
|
197
|
+
return _$_.tsrx_element((__anchor, __block) => {
|
|
198
|
+
let lazy_3 = _$_.track(true, __block, '7cd4817b');
|
|
199
|
+
var fragment_4 = root_11();
|
|
200
|
+
var div_11 = _$_.first_child_frag(fragment_4);
|
|
212
201
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
var div_11 = _$_.first_child_frag(fragment_4);
|
|
202
|
+
{
|
|
203
|
+
var div_10 = _$_.child(div_11);
|
|
216
204
|
|
|
217
|
-
|
|
218
|
-
var div_10 = _$_.child(div_11);
|
|
205
|
+
_$_.pop(div_10);
|
|
219
206
|
|
|
220
|
-
|
|
207
|
+
var node_9 = _$_.sibling(div_10);
|
|
221
208
|
|
|
222
|
-
|
|
209
|
+
{
|
|
210
|
+
var consequent_3 = (__anchor) => {
|
|
211
|
+
var div_12 = root_12();
|
|
223
212
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
var div_12 = root_12();
|
|
213
|
+
_$_.append(__anchor, div_12);
|
|
214
|
+
};
|
|
227
215
|
|
|
228
|
-
_$_.
|
|
229
|
-
|
|
216
|
+
_$_.if(node_9, (__render) => {
|
|
217
|
+
if (lazy_3.value) __render(consequent_3);
|
|
218
|
+
});
|
|
219
|
+
}
|
|
230
220
|
|
|
231
|
-
_$_.
|
|
232
|
-
if (lazy_3.value) __render(consequent_3);
|
|
233
|
-
});
|
|
221
|
+
_$_.pop(div_11);
|
|
234
222
|
}
|
|
235
223
|
|
|
236
|
-
_$_.
|
|
237
|
-
}
|
|
224
|
+
var button_1 = _$_.sibling(div_11);
|
|
238
225
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
_$_.append(__anchor, fragment_4, true);
|
|
244
|
-
_$_.pop_component();
|
|
226
|
+
button_1.__click = () => _$_.set(lazy_3, !lazy_3.value);
|
|
227
|
+
_$_.next();
|
|
228
|
+
_$_.append(__anchor, fragment_4, true);
|
|
229
|
+
});
|
|
245
230
|
}
|
|
246
231
|
|
|
247
|
-
export function DeepNestingThenIf(
|
|
248
|
-
_$_.
|
|
232
|
+
export function DeepNestingThenIf() {
|
|
233
|
+
return _$_.tsrx_element((__anchor, __block) => {
|
|
234
|
+
let lazy_4 = _$_.track(true, __block, '923116be');
|
|
235
|
+
var fragment_5 = root_13();
|
|
236
|
+
var section_2 = _$_.first_child_frag(fragment_5);
|
|
249
237
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
var section_2 = _$_.first_child_frag(fragment_5);
|
|
238
|
+
{
|
|
239
|
+
var article_1 = _$_.child(section_2);
|
|
253
240
|
|
|
254
|
-
|
|
255
|
-
var article_1 = _$_.child(section_2);
|
|
241
|
+
_$_.pop(article_1);
|
|
256
242
|
|
|
257
|
-
|
|
243
|
+
var node_10 = _$_.sibling(article_1);
|
|
258
244
|
|
|
259
|
-
|
|
245
|
+
{
|
|
246
|
+
var consequent_4 = (__anchor) => {
|
|
247
|
+
var footer_1 = root_14();
|
|
260
248
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
var footer_1 = root_14();
|
|
249
|
+
_$_.append(__anchor, footer_1);
|
|
250
|
+
};
|
|
264
251
|
|
|
265
|
-
_$_.
|
|
266
|
-
|
|
252
|
+
_$_.if(node_10, (__render) => {
|
|
253
|
+
if (lazy_4.value) __render(consequent_4);
|
|
254
|
+
});
|
|
255
|
+
}
|
|
267
256
|
|
|
268
|
-
_$_.
|
|
269
|
-
if (lazy_4.value) __render(consequent_4);
|
|
270
|
-
});
|
|
257
|
+
_$_.pop(section_2);
|
|
271
258
|
}
|
|
272
259
|
|
|
273
|
-
_$_.
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
var button_2 = _$_.sibling(section_2);
|
|
260
|
+
var button_2 = _$_.sibling(section_2);
|
|
277
261
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
262
|
+
button_2.__click = () => _$_.set(lazy_4, !lazy_4.value);
|
|
263
|
+
_$_.next();
|
|
264
|
+
_$_.append(__anchor, fragment_5, true);
|
|
265
|
+
});
|
|
282
266
|
}
|
|
283
267
|
|
|
284
|
-
export function DomElementChildrenThenSibling(
|
|
285
|
-
_$_.
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
var div_13 = root_15();
|
|
289
|
-
|
|
290
|
-
{
|
|
291
|
-
var div_14 = _$_.child(div_13);
|
|
268
|
+
export function DomElementChildrenThenSibling() {
|
|
269
|
+
return _$_.tsrx_element((__anchor, __block) => {
|
|
270
|
+
let lazy_5 = _$_.track('code', __block, '33a1e97f');
|
|
271
|
+
var div_13 = root_15();
|
|
292
272
|
|
|
293
273
|
{
|
|
294
|
-
var
|
|
274
|
+
var div_14 = _$_.child(div_13);
|
|
295
275
|
|
|
296
|
-
|
|
276
|
+
{
|
|
277
|
+
var button_3 = _$_.child(div_14);
|
|
297
278
|
|
|
298
|
-
|
|
279
|
+
button_3.__click = () => _$_.set(lazy_5, 'code');
|
|
299
280
|
|
|
300
|
-
|
|
301
|
-
}
|
|
281
|
+
var button_4 = _$_.sibling(button_3);
|
|
302
282
|
|
|
303
|
-
|
|
283
|
+
button_4.__click = () => _$_.set(lazy_5, 'preview');
|
|
284
|
+
}
|
|
304
285
|
|
|
305
|
-
|
|
286
|
+
_$_.pop(div_14);
|
|
306
287
|
|
|
307
|
-
|
|
308
|
-
var node_11 = _$_.child(div_15);
|
|
288
|
+
var div_15 = _$_.sibling(div_14);
|
|
309
289
|
|
|
310
290
|
{
|
|
311
|
-
var
|
|
312
|
-
var pre_1 = root_16();
|
|
291
|
+
var node_11 = _$_.child(div_15);
|
|
313
292
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
var alternate = (__anchor) => {
|
|
318
|
-
var div_16 = root_17();
|
|
293
|
+
{
|
|
294
|
+
var consequent_5 = (__anchor) => {
|
|
295
|
+
var pre_1 = root_16();
|
|
319
296
|
|
|
320
|
-
|
|
321
|
-
|
|
297
|
+
_$_.append(__anchor, pre_1);
|
|
298
|
+
};
|
|
322
299
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
});
|
|
326
|
-
}
|
|
300
|
+
var alternate = (__anchor) => {
|
|
301
|
+
var div_16 = root_17();
|
|
327
302
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
}
|
|
303
|
+
_$_.append(__anchor, div_16);
|
|
304
|
+
};
|
|
331
305
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
306
|
+
_$_.if(node_11, (__render) => {
|
|
307
|
+
if (lazy_5.value === 'code') __render(consequent_5); else __render(alternate, false);
|
|
308
|
+
});
|
|
309
|
+
}
|
|
335
310
|
|
|
336
|
-
|
|
337
|
-
_$_.set_attribute(button_3, 'aria-selected', __prev.a = __a);
|
|
311
|
+
_$_.pop(div_15);
|
|
338
312
|
}
|
|
313
|
+
}
|
|
339
314
|
|
|
340
|
-
|
|
315
|
+
_$_.render(
|
|
316
|
+
(__prev) => {
|
|
317
|
+
var __a = lazy_5.value === 'code' ? 'true' : 'false';
|
|
341
318
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
},
|
|
346
|
-
{ a: void 0, b: void 0 }
|
|
347
|
-
);
|
|
319
|
+
if (__prev.a !== __a) {
|
|
320
|
+
_$_.set_attribute(button_3, 'aria-selected', __prev.a = __a);
|
|
321
|
+
}
|
|
348
322
|
|
|
349
|
-
|
|
350
|
-
_$_.pop_component();
|
|
351
|
-
}
|
|
323
|
+
var __b = lazy_5.value === 'preview' ? 'true' : 'false';
|
|
352
324
|
|
|
353
|
-
|
|
354
|
-
|
|
325
|
+
if (__prev.b !== __b) {
|
|
326
|
+
_$_.set_attribute(button_4, 'aria-selected', __prev.b = __b);
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
{ a: void 0, b: void 0 }
|
|
330
|
+
);
|
|
355
331
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
332
|
+
_$_.append(__anchor, div_13);
|
|
333
|
+
});
|
|
334
|
+
}
|
|
359
335
|
|
|
360
|
-
|
|
361
|
-
|
|
336
|
+
export function DomChildrenThenStaticSiblings() {
|
|
337
|
+
return _$_.tsrx_element((__anchor, __block) => {
|
|
338
|
+
let lazy_6 = _$_.track(0, __block, '0ea64305');
|
|
339
|
+
var fragment_6 = root_18();
|
|
340
|
+
var div_17 = _$_.first_child_frag(fragment_6);
|
|
362
341
|
|
|
363
342
|
{
|
|
364
|
-
var
|
|
343
|
+
var ul_1 = _$_.child(div_17);
|
|
365
344
|
|
|
366
345
|
{
|
|
367
|
-
var
|
|
346
|
+
var li_1 = _$_.child(ul_1);
|
|
368
347
|
|
|
369
|
-
|
|
370
|
-
|
|
348
|
+
{
|
|
349
|
+
var expression_3 = _$_.child(li_1, true);
|
|
350
|
+
|
|
351
|
+
_$_.pop(li_1);
|
|
352
|
+
}
|
|
371
353
|
}
|
|
354
|
+
|
|
355
|
+
_$_.pop(ul_1);
|
|
372
356
|
}
|
|
373
357
|
|
|
374
|
-
_$_.pop(
|
|
375
|
-
}
|
|
358
|
+
_$_.pop(div_17);
|
|
376
359
|
|
|
377
|
-
|
|
360
|
+
var button_5 = _$_.sibling(div_17);
|
|
378
361
|
|
|
379
|
-
|
|
362
|
+
button_5.__click = () => _$_.update(lazy_6);
|
|
363
|
+
_$_.next();
|
|
380
364
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
365
|
+
_$_.render(() => {
|
|
366
|
+
_$_.set_text(expression_3, 'Item count: ' + _$_.with_scope(__block, () => String(lazy_6.value)));
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
_$_.append(__anchor, fragment_6, true);
|
|
370
|
+
});
|
|
385
371
|
}
|
|
386
372
|
|
|
387
|
-
export function StaticListThenStaticSiblings(
|
|
388
|
-
_$_.
|
|
373
|
+
export function StaticListThenStaticSiblings() {
|
|
374
|
+
return _$_.tsrx_element((__anchor, __block) => {
|
|
375
|
+
var div_18 = root_19();
|
|
389
376
|
|
|
390
|
-
|
|
377
|
+
{
|
|
378
|
+
var ul_2 = _$_.child(div_18);
|
|
391
379
|
|
|
392
|
-
|
|
393
|
-
|
|
380
|
+
{
|
|
381
|
+
var li_2 = _$_.child(ul_2);
|
|
394
382
|
|
|
395
|
-
|
|
396
|
-
var li_2 = _$_.child(ul_2);
|
|
383
|
+
_$_.pop(li_2);
|
|
397
384
|
|
|
398
|
-
|
|
385
|
+
var li_3 = _$_.sibling(li_2);
|
|
399
386
|
|
|
400
|
-
|
|
387
|
+
_$_.pop(li_3);
|
|
388
|
+
}
|
|
401
389
|
|
|
402
|
-
_$_.pop(
|
|
390
|
+
_$_.pop(ul_2);
|
|
403
391
|
}
|
|
404
392
|
|
|
405
|
-
_$_.
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
_$_.append(__anchor, div_18);
|
|
409
|
-
_$_.pop_component();
|
|
393
|
+
_$_.append(__anchor, div_18);
|
|
394
|
+
});
|
|
410
395
|
}
|
|
411
396
|
|
|
412
397
|
_$_.delegate(['click']);
|