ripple 0.3.11 → 0.3.13
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 +43 -0
- package/package.json +8 -2
- package/src/compiler/phases/1-parse/index.js +73 -30
- package/src/compiler/phases/2-analyze/index.js +28 -58
- package/src/compiler/phases/3-transform/client/index.js +127 -164
- package/src/compiler/phases/3-transform/segments.js +4 -8
- package/src/compiler/phases/3-transform/server/index.js +210 -360
- package/src/compiler/types/import.d.ts +0 -12
- package/src/compiler/types/index.d.ts +12 -5
- package/src/compiler/types/parse.d.ts +2 -0
- package/src/compiler/utils.js +39 -44
- package/src/helpers.d.ts +2 -0
- package/src/runtime/index-client.js +15 -13
- package/src/runtime/index-server.js +18 -11
- package/src/runtime/internal/client/blocks.js +19 -23
- package/src/runtime/internal/client/constants.js +20 -9
- package/src/runtime/internal/client/index.js +14 -4
- package/src/runtime/internal/client/runtime.js +435 -173
- package/src/runtime/internal/client/try.js +334 -156
- package/src/runtime/internal/client/types.d.ts +26 -0
- package/src/runtime/internal/server/blocks.js +183 -0
- package/src/runtime/internal/server/constants.js +7 -0
- package/src/runtime/internal/server/index.js +780 -148
- package/src/runtime/internal/server/types.d.ts +35 -0
- package/src/server/index.js +1 -1
- package/src/utils/async.js +35 -0
- package/src/utils/builders.js +3 -1
- package/tests/client/__snapshots__/computed-properties.test.rsrx.snap +49 -0
- package/tests/client/__snapshots__/for.test.rsrx.snap +319 -0
- package/tests/client/__snapshots__/html.test.rsrx.snap +40 -0
- package/tests/client/_etc.test.rsrx +7 -0
- package/tests/client/array/{array.static.test.ripple → array.static.test.rsrx} +18 -20
- package/tests/client/async-suspend.test.rsrx +662 -0
- package/tests/client/basic/__snapshots__/basic.attributes.test.rsrx.snap +60 -0
- package/tests/client/basic/__snapshots__/basic.rendering.test.rsrx.snap +59 -0
- package/tests/client/basic/{basic.errors.test.ripple → basic.errors.test.rsrx} +2 -2
- package/tests/client/compiler/__snapshots__/compiler.assignments.test.rsrx.snap +12 -0
- package/tests/client/compiler/__snapshots__/compiler.typescript.test.rsrx.snap +46 -0
- package/tests/client/compiler/{compiler.try-in-function.test.ripple → compiler.try-in-function.test.rsrx} +8 -6
- package/tests/client/composite/__snapshots__/composite.render.test.rsrx.snap +37 -0
- package/tests/client/{function-overload.test.ripple → function-overload.test.rsrx} +1 -1
- package/tests/client/try.test.rsrx +1702 -0
- package/tests/hydration/build-components.js +5 -3
- package/tests/hydration/compiled/client/head.js +11 -11
- package/tests/hydration/compiled/client/mixed-control-flow.js +55 -70
- package/tests/hydration/compiled/client/nested-control-flow.js +72 -88
- package/tests/hydration/compiled/client/try.js +42 -54
- package/tests/hydration/compiled/server/basic.js +491 -369
- package/tests/hydration/compiled/server/composite.js +153 -128
- package/tests/hydration/compiled/server/events.js +166 -145
- package/tests/hydration/compiled/server/for.js +821 -677
- package/tests/hydration/compiled/server/head.js +200 -165
- package/tests/hydration/compiled/server/hmr.js +62 -54
- package/tests/hydration/compiled/server/html-in-template.js +64 -55
- package/tests/hydration/compiled/server/html.js +1477 -1360
- package/tests/hydration/compiled/server/if-children.js +448 -408
- package/tests/hydration/compiled/server/if.js +204 -171
- package/tests/hydration/compiled/server/mixed-control-flow.js +237 -195
- package/tests/hydration/compiled/server/nested-control-flow.js +533 -467
- package/tests/hydration/compiled/server/portal.js +94 -107
- package/tests/hydration/compiled/server/reactivity.js +87 -64
- package/tests/hydration/compiled/server/return.js +1424 -1174
- package/tests/hydration/compiled/server/switch.js +268 -238
- package/tests/hydration/compiled/server/try.js +98 -87
- package/tests/hydration/components/{mixed-control-flow.ripple → mixed-control-flow.rsrx} +2 -2
- package/tests/hydration/components/{try.ripple → try.rsrx} +4 -2
- package/tests/hydration/mixed-control-flow.test.js +14 -0
- package/tests/hydration/nested-control-flow.test.js +50 -48
- package/tests/hydration/try.test.js +25 -0
- package/tests/server/__snapshots__/compiler.test.ripple.snap +0 -32
- package/tests/server/__snapshots__/compiler.test.rsrx.snap +95 -0
- package/tests/server/{compiler.test.ripple → compiler.test.rsrx} +0 -17
- package/tests/server/{html-nesting-validation.test.ripple → html-nesting-validation.test.rsrx} +3 -3
- package/tests/server/streaming-ssr.test.rsrx +115 -0
- package/tests/server/try.test.rsrx +503 -0
- package/tests/utils/compiler-compat-config.test.js +3 -3
- package/tests/utils/vite-plugin-config.test.js +1 -1
- package/tests/utils/vite-plugin-hmr.test.js +5 -5
- package/tsconfig.json +4 -0
- package/types/index.d.ts +13 -23
- package/types/server.d.ts +43 -16
- package/tests/client/_etc.test.ripple +0 -5
- package/tests/client/async-suspend.test.ripple +0 -94
- package/tests/client/try.test.ripple +0 -196
- package/tests/server/streaming-ssr.test.ripple +0 -68
- package/tests/server/try.test.ripple +0 -82
- /package/tests/client/array/{array.copy-within.test.ripple → array.copy-within.test.rsrx} +0 -0
- /package/tests/client/array/{array.derived.test.ripple → array.derived.test.rsrx} +0 -0
- /package/tests/client/array/{array.iteration.test.ripple → array.iteration.test.rsrx} +0 -0
- /package/tests/client/array/{array.mutations.test.ripple → array.mutations.test.rsrx} +0 -0
- /package/tests/client/array/{array.to-methods.test.ripple → array.to-methods.test.rsrx} +0 -0
- /package/tests/client/basic/{basic.attributes.test.ripple → basic.attributes.test.rsrx} +0 -0
- /package/tests/client/basic/{basic.collections.test.ripple → basic.collections.test.rsrx} +0 -0
- /package/tests/client/basic/{basic.components.test.ripple → basic.components.test.rsrx} +0 -0
- /package/tests/client/basic/{basic.events.test.ripple → basic.events.test.rsrx} +0 -0
- /package/tests/client/basic/{basic.get-set.test.ripple → basic.get-set.test.rsrx} +0 -0
- /package/tests/client/basic/{basic.hmr.test.ripple → basic.hmr.test.rsrx} +0 -0
- /package/tests/client/basic/{basic.reactivity.test.ripple → basic.reactivity.test.rsrx} +0 -0
- /package/tests/client/basic/{basic.rendering.test.ripple → basic.rendering.test.rsrx} +0 -0
- /package/tests/client/basic/{basic.styling.test.ripple → basic.styling.test.rsrx} +0 -0
- /package/tests/client/basic/{basic.utilities.test.ripple → basic.utilities.test.rsrx} +0 -0
- /package/tests/client/{boundaries.test.ripple → boundaries.test.rsrx} +0 -0
- /package/tests/client/compiler/{compiler.assignments.test.ripple → compiler.assignments.test.rsrx} +0 -0
- /package/tests/client/compiler/{compiler.attributes.test.ripple → compiler.attributes.test.rsrx} +0 -0
- /package/tests/client/compiler/{compiler.basic.test.ripple → compiler.basic.test.rsrx} +0 -0
- /package/tests/client/compiler/{compiler.regex.test.ripple → compiler.regex.test.rsrx} +0 -0
- /package/tests/client/compiler/{compiler.tracked-access.test.ripple → compiler.tracked-access.test.rsrx} +0 -0
- /package/tests/client/compiler/{compiler.typescript.test.ripple → compiler.typescript.test.rsrx} +0 -0
- /package/tests/client/composite/{composite.dynamic-components.test.ripple → composite.dynamic-components.test.rsrx} +0 -0
- /package/tests/client/composite/{composite.generics.test.ripple → composite.generics.test.rsrx} +0 -0
- /package/tests/client/composite/{composite.props.test.ripple → composite.props.test.rsrx} +0 -0
- /package/tests/client/composite/{composite.reactivity.test.ripple → composite.reactivity.test.rsrx} +0 -0
- /package/tests/client/composite/{composite.render.test.ripple → composite.render.test.rsrx} +0 -0
- /package/tests/client/{computed-properties.test.ripple → computed-properties.test.rsrx} +0 -0
- /package/tests/client/{context.test.ripple → context.test.rsrx} +0 -0
- /package/tests/client/css/{global-additional-cases.test.ripple → global-additional-cases.test.rsrx} +0 -0
- /package/tests/client/css/{global-advanced-selectors.test.ripple → global-advanced-selectors.test.rsrx} +0 -0
- /package/tests/client/css/{global-at-rules.test.ripple → global-at-rules.test.rsrx} +0 -0
- /package/tests/client/css/{global-basic.test.ripple → global-basic.test.rsrx} +0 -0
- /package/tests/client/css/{global-classes-ids.test.ripple → global-classes-ids.test.rsrx} +0 -0
- /package/tests/client/css/{global-combinators.test.ripple → global-combinators.test.rsrx} +0 -0
- /package/tests/client/css/{global-complex-nesting.test.ripple → global-complex-nesting.test.rsrx} +0 -0
- /package/tests/client/css/{global-edge-cases.test.ripple → global-edge-cases.test.rsrx} +0 -0
- /package/tests/client/css/{global-keyframes.test.ripple → global-keyframes.test.rsrx} +0 -0
- /package/tests/client/css/{global-nested.test.ripple → global-nested.test.rsrx} +0 -0
- /package/tests/client/css/{global-pseudo.test.ripple → global-pseudo.test.rsrx} +0 -0
- /package/tests/client/css/{global-scoping.test.ripple → global-scoping.test.rsrx} +0 -0
- /package/tests/client/css/{style-identifier.test.ripple → style-identifier.test.rsrx} +0 -0
- /package/tests/client/{date.test.ripple → date.test.rsrx} +0 -0
- /package/tests/client/{dynamic-elements.test.ripple → dynamic-elements.test.rsrx} +0 -0
- /package/tests/client/{events.test.ripple → events.test.rsrx} +0 -0
- /package/tests/client/{for.test.ripple → for.test.rsrx} +0 -0
- /package/tests/client/{function-overload-import.ripple → function-overload-import.rsrx} +0 -0
- /package/tests/client/{head.test.ripple → head.test.rsrx} +0 -0
- /package/tests/client/{html.test.ripple → html.test.rsrx} +0 -0
- /package/tests/client/{input-value.test.ripple → input-value.test.rsrx} +0 -0
- /package/tests/client/{lazy-destructuring.test.ripple → lazy-destructuring.test.rsrx} +0 -0
- /package/tests/client/{map.test.ripple → map.test.rsrx} +0 -0
- /package/tests/client/{media-query.test.ripple → media-query.test.rsrx} +0 -0
- /package/tests/client/{object.test.ripple → object.test.rsrx} +0 -0
- /package/tests/client/{portal.test.ripple → portal.test.rsrx} +0 -0
- /package/tests/client/{ref.test.ripple → ref.test.rsrx} +0 -0
- /package/tests/client/{return.test.ripple → return.test.rsrx} +0 -0
- /package/tests/client/{set.test.ripple → set.test.rsrx} +0 -0
- /package/tests/client/{svg.test.ripple → svg.test.rsrx} +0 -0
- /package/tests/client/{switch.test.ripple → switch.test.rsrx} +0 -0
- /package/tests/client/{tsx.test.ripple → tsx.test.rsrx} +0 -0
- /package/tests/client/{typescript-generics.test.ripple → typescript-generics.test.rsrx} +0 -0
- /package/tests/client/url/{url.derived.test.ripple → url.derived.test.rsrx} +0 -0
- /package/tests/client/url/{url.parsing.test.ripple → url.parsing.test.rsrx} +0 -0
- /package/tests/client/url/{url.partial-removal.test.ripple → url.partial-removal.test.rsrx} +0 -0
- /package/tests/client/url/{url.reactivity.test.ripple → url.reactivity.test.rsrx} +0 -0
- /package/tests/client/url/{url.serialization.test.ripple → url.serialization.test.rsrx} +0 -0
- /package/tests/client/url-search-params/{url-search-params.derived.test.ripple → url-search-params.derived.test.rsrx} +0 -0
- /package/tests/client/url-search-params/{url-search-params.initialization.test.ripple → url-search-params.initialization.test.rsrx} +0 -0
- /package/tests/client/url-search-params/{url-search-params.iteration.test.ripple → url-search-params.iteration.test.rsrx} +0 -0
- /package/tests/client/url-search-params/{url-search-params.mutation.test.ripple → url-search-params.mutation.test.rsrx} +0 -0
- /package/tests/client/url-search-params/{url-search-params.retrieval.test.ripple → url-search-params.retrieval.test.rsrx} +0 -0
- /package/tests/client/url-search-params/{url-search-params.serialization.test.ripple → url-search-params.serialization.test.rsrx} +0 -0
- /package/tests/client/url-search-params/{url-search-params.tracked-url.test.ripple → url-search-params.tracked-url.test.rsrx} +0 -0
- /package/tests/hydration/components/{basic.ripple → basic.rsrx} +0 -0
- /package/tests/hydration/components/{composite.ripple → composite.rsrx} +0 -0
- /package/tests/hydration/components/{events.ripple → events.rsrx} +0 -0
- /package/tests/hydration/components/{for.ripple → for.rsrx} +0 -0
- /package/tests/hydration/components/{head.ripple → head.rsrx} +0 -0
- /package/tests/hydration/components/{hmr.ripple → hmr.rsrx} +0 -0
- /package/tests/hydration/components/{html-in-template.ripple → html-in-template.rsrx} +0 -0
- /package/tests/hydration/components/{html.ripple → html.rsrx} +0 -0
- /package/tests/hydration/components/{if-children.ripple → if-children.rsrx} +0 -0
- /package/tests/hydration/components/{if.ripple → if.rsrx} +0 -0
- /package/tests/hydration/components/{nested-control-flow.ripple → nested-control-flow.rsrx} +0 -0
- /package/tests/hydration/components/{portal.ripple → portal.rsrx} +0 -0
- /package/tests/hydration/components/{reactivity.ripple → reactivity.rsrx} +0 -0
- /package/tests/hydration/components/{return.ripple → return.rsrx} +0 -0
- /package/tests/hydration/components/{switch.ripple → switch.rsrx} +0 -0
- /package/tests/server/{await.test.ripple → await.test.rsrx} +0 -0
- /package/tests/server/{basic.attributes.test.ripple → basic.attributes.test.rsrx} +0 -0
- /package/tests/server/{basic.components.test.ripple → basic.components.test.rsrx} +0 -0
- /package/tests/server/{basic.test.ripple → basic.test.rsrx} +0 -0
- /package/tests/server/{composite.props.test.ripple → composite.props.test.rsrx} +0 -0
- /package/tests/server/{composite.test.ripple → composite.test.rsrx} +0 -0
- /package/tests/server/{context.test.ripple → context.test.rsrx} +0 -0
- /package/tests/server/{dynamic-elements.test.ripple → dynamic-elements.test.rsrx} +0 -0
- /package/tests/server/{for.test.ripple → for.test.rsrx} +0 -0
- /package/tests/server/{head.test.ripple → head.test.rsrx} +0 -0
- /package/tests/server/{if.test.ripple → if.test.rsrx} +0 -0
- /package/tests/server/{lazy-destructuring.test.ripple → lazy-destructuring.test.rsrx} +0 -0
- /package/tests/server/{return.test.ripple → return.test.rsrx} +0 -0
- /package/tests/server/{style-identifier.test.ripple → style-identifier.test.rsrx} +0 -0
- /package/tests/server/{switch.test.ripple → switch.test.rsrx} +0 -0
|
@@ -39,13 +39,15 @@ function buildComponents() {
|
|
|
39
39
|
mkdirSync(clientOutDir, { recursive: true });
|
|
40
40
|
mkdirSync(serverOutDir, { recursive: true });
|
|
41
41
|
|
|
42
|
-
// Get all
|
|
43
|
-
const componentFiles = readdirSync(componentsDir).filter(
|
|
42
|
+
// Get all supported component files in components directory
|
|
43
|
+
const componentFiles = readdirSync(componentsDir).filter(
|
|
44
|
+
(f) => f.endsWith('.ripple') || f.endsWith('.rsrx') || f.endsWith('.tsrx'),
|
|
45
|
+
);
|
|
44
46
|
|
|
45
47
|
for (const file of componentFiles) {
|
|
46
48
|
const filePath = join(componentsDir, file);
|
|
47
49
|
const source = readFileSync(filePath, 'utf-8');
|
|
48
|
-
const outputName = basename(file, '.ripple') + '.js';
|
|
50
|
+
const outputName = basename(basename(file, '.ripple'), '.rsrx').replace(/\.tsrx$/, '') + '.js';
|
|
49
51
|
|
|
50
52
|
// Compile for client
|
|
51
53
|
const clientResult = compile(source, file, {
|
|
@@ -22,7 +22,7 @@ export function StaticTitle(__anchor, _, __block) {
|
|
|
22
22
|
|
|
23
23
|
var div_1 = root();
|
|
24
24
|
|
|
25
|
-
_$_.head('
|
|
25
|
+
_$_.head('p76zx7', (__anchor) => {
|
|
26
26
|
_$_.document.title = 'Static Test Title';
|
|
27
27
|
});
|
|
28
28
|
|
|
@@ -47,7 +47,7 @@ export function ReactiveTitle(__anchor, _, __block) {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
_$_.head('
|
|
50
|
+
_$_.head('1nb8jjx', (__anchor) => {
|
|
51
51
|
_$_.render(() => {
|
|
52
52
|
_$_.document.title = _$_.get(lazy);
|
|
53
53
|
});
|
|
@@ -62,7 +62,7 @@ export function MultipleHeadElements(__anchor, _, __block) {
|
|
|
62
62
|
|
|
63
63
|
var div_3 = root_2();
|
|
64
64
|
|
|
65
|
-
_$_.head('
|
|
65
|
+
_$_.head('8n8nfd', (__anchor) => {
|
|
66
66
|
var fragment = root_3();
|
|
67
67
|
|
|
68
68
|
_$_.document.title = 'Page Title';
|
|
@@ -87,7 +87,7 @@ export function ReactiveMetaTags(__anchor, _, __block) {
|
|
|
87
87
|
_$_.pop(div_4);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
_$_.head('
|
|
90
|
+
_$_.head('1u7li02', (__anchor) => {
|
|
91
91
|
var meta_1 = root_5();
|
|
92
92
|
|
|
93
93
|
_$_.document.title = 'My Page';
|
|
@@ -112,7 +112,7 @@ export function TitleWithTemplate(__anchor, _, __block) {
|
|
|
112
112
|
_$_.pop(div_5);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
_$_.head('
|
|
115
|
+
_$_.head('1wzb5pb', (__anchor) => {
|
|
116
116
|
_$_.render(() => {
|
|
117
117
|
_$_.document.title = `Hello ${_$_.get(lazy_2)}!`;
|
|
118
118
|
});
|
|
@@ -127,7 +127,7 @@ export function EmptyTitle(__anchor, _, __block) {
|
|
|
127
127
|
|
|
128
128
|
var div_6 = root_7();
|
|
129
129
|
|
|
130
|
-
_$_.head('
|
|
130
|
+
_$_.head('1vtxclq', (__anchor) => {
|
|
131
131
|
_$_.document.title = '';
|
|
132
132
|
});
|
|
133
133
|
|
|
@@ -149,7 +149,7 @@ export function ConditionalTitle(__anchor, _, __block) {
|
|
|
149
149
|
_$_.pop(div_7);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
_$_.head('
|
|
152
|
+
_$_.head('23prgg', (__anchor) => {
|
|
153
153
|
_$_.render(() => {
|
|
154
154
|
_$_.document.title = _$_.get(lazy_3) ? 'App - ' + _$_.get(lazy_4) : _$_.get(lazy_4);
|
|
155
155
|
});
|
|
@@ -177,7 +177,7 @@ export function ComputedTitle(__anchor, _, __block) {
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
_$_.head('
|
|
180
|
+
_$_.head('dlz6ig', (__anchor) => {
|
|
181
181
|
_$_.render(() => {
|
|
182
182
|
_$_.document.title = prefix + _$_.get(lazy_5);
|
|
183
183
|
});
|
|
@@ -192,11 +192,11 @@ export function MultipleHeadBlocks(__anchor, _, __block) {
|
|
|
192
192
|
|
|
193
193
|
var div_9 = root_10();
|
|
194
194
|
|
|
195
|
-
_$_.head('
|
|
195
|
+
_$_.head('143y0j8', (__anchor) => {
|
|
196
196
|
_$_.document.title = 'First Head';
|
|
197
197
|
});
|
|
198
198
|
|
|
199
|
-
_$_.head('
|
|
199
|
+
_$_.head('ejrkl6', (__anchor) => {
|
|
200
200
|
var meta_2 = root_11();
|
|
201
201
|
|
|
202
202
|
_$_.append(__anchor, meta_2);
|
|
@@ -211,7 +211,7 @@ export function HeadWithStyle(__anchor, _, __block) {
|
|
|
211
211
|
|
|
212
212
|
var div_10 = root_12();
|
|
213
213
|
|
|
214
|
-
_$_.head('
|
|
214
|
+
_$_.head('1k4vrqu', (__anchor) => {
|
|
215
215
|
_$_.document.title = 'Styled Page';
|
|
216
216
|
});
|
|
217
217
|
|
|
@@ -28,7 +28,7 @@ var root_19 = _$_.template(`<!>`, 1, 1);
|
|
|
28
28
|
var root_18 = _$_.template(`<div class="before">before</div><!>`, 1, 2);
|
|
29
29
|
var root_25 = _$_.template(`<div class="resolved-row"> </div>`, 0);
|
|
30
30
|
|
|
31
|
-
import { track } from 'ripple';
|
|
31
|
+
import { track, trackAsync } from 'ripple';
|
|
32
32
|
|
|
33
33
|
export function MixedControlFlowStatic(__anchor, _, __block) {
|
|
34
34
|
_$_.push_component();
|
|
@@ -62,22 +62,20 @@ export function MixedControlFlowStatic(__anchor, _, __block) {
|
|
|
62
62
|
_$_.try(
|
|
63
63
|
node_2,
|
|
64
64
|
(__anchor) => {
|
|
65
|
-
|
|
66
|
-
var div_1 = root_4();
|
|
65
|
+
var div_1 = root_4();
|
|
67
66
|
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
{
|
|
68
|
+
var expression = _$_.child(div_1, true);
|
|
70
69
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
_$_.expression(expression, () => `A-${_$_.get(pattern).id}`);
|
|
71
|
+
_$_.pop(div_1);
|
|
72
|
+
}
|
|
74
73
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
_$_.append(__anchor, div_1);
|
|
74
|
+
_$_.render(() => {
|
|
75
|
+
_$_.set_class(div_1, `row row-${_$_.get(pattern).id} kind-a`, void 0, true);
|
|
80
76
|
});
|
|
77
|
+
|
|
78
|
+
_$_.append(__anchor, div_1);
|
|
81
79
|
},
|
|
82
80
|
null,
|
|
83
81
|
(__anchor) => {
|
|
@@ -101,22 +99,20 @@ export function MixedControlFlowStatic(__anchor, _, __block) {
|
|
|
101
99
|
_$_.try(
|
|
102
100
|
node_3,
|
|
103
101
|
(__anchor) => {
|
|
104
|
-
|
|
105
|
-
var div_3 = root_7();
|
|
102
|
+
var div_3 = root_7();
|
|
106
103
|
|
|
107
|
-
|
|
108
|
-
|
|
104
|
+
{
|
|
105
|
+
var expression_1 = _$_.child(div_3, true);
|
|
109
106
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
_$_.expression(expression_1, () => `B-${_$_.get(pattern).id}`);
|
|
108
|
+
_$_.pop(div_3);
|
|
109
|
+
}
|
|
113
110
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
_$_.append(__anchor, div_3);
|
|
111
|
+
_$_.render(() => {
|
|
112
|
+
_$_.set_class(div_3, `row row-${_$_.get(pattern).id} kind-b`, void 0, true);
|
|
119
113
|
});
|
|
114
|
+
|
|
115
|
+
_$_.append(__anchor, div_3);
|
|
120
116
|
},
|
|
121
117
|
null,
|
|
122
118
|
(__anchor) => {
|
|
@@ -216,22 +212,20 @@ export function MixedControlFlowReactive(__anchor, _, __block) {
|
|
|
216
212
|
_$_.try(
|
|
217
213
|
node_6,
|
|
218
214
|
(__anchor) => {
|
|
219
|
-
|
|
220
|
-
var p_1 = root_13();
|
|
221
|
-
|
|
222
|
-
{
|
|
223
|
-
var expression_2 = _$_.child(p_1, true);
|
|
215
|
+
var p_1 = root_13();
|
|
224
216
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
}
|
|
217
|
+
{
|
|
218
|
+
var expression_2 = _$_.child(p_1, true);
|
|
228
219
|
|
|
229
|
-
_$_.
|
|
230
|
-
|
|
231
|
-
|
|
220
|
+
_$_.expression(expression_2, () => `A:${_$_.get(pattern_1).label}`);
|
|
221
|
+
_$_.pop(p_1);
|
|
222
|
+
}
|
|
232
223
|
|
|
233
|
-
|
|
224
|
+
_$_.render(() => {
|
|
225
|
+
_$_.set_class(p_1, `item item-${_$_.get(pattern_1).id}`, void 0, true);
|
|
234
226
|
});
|
|
227
|
+
|
|
228
|
+
_$_.append(__anchor, p_1);
|
|
235
229
|
},
|
|
236
230
|
null,
|
|
237
231
|
(__anchor) => {
|
|
@@ -251,22 +245,20 @@ export function MixedControlFlowReactive(__anchor, _, __block) {
|
|
|
251
245
|
_$_.try(
|
|
252
246
|
node_7,
|
|
253
247
|
(__anchor) => {
|
|
254
|
-
|
|
255
|
-
var p_3 = root_16();
|
|
248
|
+
var p_3 = root_16();
|
|
256
249
|
|
|
257
|
-
|
|
258
|
-
|
|
250
|
+
{
|
|
251
|
+
var expression_3 = _$_.child(p_3, true);
|
|
259
252
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
253
|
+
_$_.expression(expression_3, () => `B:${_$_.get(pattern_1).label}`);
|
|
254
|
+
_$_.pop(p_3);
|
|
255
|
+
}
|
|
263
256
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
});
|
|
267
|
-
|
|
268
|
-
_$_.append(__anchor, p_3);
|
|
257
|
+
_$_.render(() => {
|
|
258
|
+
_$_.set_class(p_3, `item item-${_$_.get(pattern_1).id}`, void 0, true);
|
|
269
259
|
});
|
|
260
|
+
|
|
261
|
+
_$_.append(__anchor, p_3);
|
|
270
262
|
},
|
|
271
263
|
null,
|
|
272
264
|
(__anchor) => {
|
|
@@ -344,13 +336,11 @@ export function MixedControlFlowAsyncPending(__anchor, _, __block) {
|
|
|
344
336
|
_$_.try(
|
|
345
337
|
node_11,
|
|
346
338
|
(__anchor) => {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
var node_12 = _$_.first_child_frag(fragment_12);
|
|
339
|
+
var fragment_12 = root_22();
|
|
340
|
+
var node_12 = _$_.first_child_frag(fragment_12);
|
|
350
341
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
});
|
|
342
|
+
AsyncRow(node_12, { label: `row-${row}` }, _$_.active_block);
|
|
343
|
+
_$_.append(__anchor, fragment_12);
|
|
354
344
|
},
|
|
355
345
|
null,
|
|
356
346
|
(__anchor) => {
|
|
@@ -411,25 +401,20 @@ export function MixedControlFlowAsyncPending(__anchor, _, __block) {
|
|
|
411
401
|
}
|
|
412
402
|
|
|
413
403
|
function AsyncRow(__anchor, { label }, __block) {
|
|
414
|
-
_$_.
|
|
415
|
-
_$_.push_component();
|
|
416
|
-
|
|
417
|
-
let value = (await _$_.maybe_tracked(_$_.with_scope(__block, async () => Promise.resolve(label))))();
|
|
418
|
-
|
|
419
|
-
if (_$_.aborted()) return;
|
|
404
|
+
_$_.push_component();
|
|
420
405
|
|
|
421
|
-
|
|
406
|
+
let lazy_3 = _$_.track_async(() => _$_.with_scope(__block, () => Promise.resolve(label)), __block);
|
|
407
|
+
var div_9 = root_25();
|
|
422
408
|
|
|
423
|
-
|
|
424
|
-
|
|
409
|
+
{
|
|
410
|
+
var expression_5 = _$_.child(div_9, true);
|
|
425
411
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
412
|
+
_$_.expression(expression_5, () => _$_.get(lazy_3));
|
|
413
|
+
_$_.pop(div_9);
|
|
414
|
+
}
|
|
429
415
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
});
|
|
416
|
+
_$_.append(__anchor, div_9);
|
|
417
|
+
_$_.pop_component();
|
|
433
418
|
}
|
|
434
419
|
|
|
435
420
|
_$_.delegate(['click']);
|
|
@@ -621,11 +621,9 @@ export function SwitchTry(__anchor, _, __block) {
|
|
|
621
621
|
_$_.try(
|
|
622
622
|
node_13,
|
|
623
623
|
(__anchor) => {
|
|
624
|
-
|
|
625
|
-
var p_3 = root_32();
|
|
624
|
+
var p_3 = root_32();
|
|
626
625
|
|
|
627
|
-
|
|
628
|
-
});
|
|
626
|
+
_$_.append(__anchor, p_3);
|
|
629
627
|
},
|
|
630
628
|
null,
|
|
631
629
|
(__anchor) => {
|
|
@@ -688,22 +686,20 @@ export function ForSwitchTry(__anchor, _, __block) {
|
|
|
688
686
|
_$_.try(
|
|
689
687
|
node_15,
|
|
690
688
|
(__anchor) => {
|
|
691
|
-
|
|
692
|
-
var li_10 = root_38();
|
|
693
|
-
|
|
694
|
-
{
|
|
695
|
-
var expression_9 = _$_.child(li_10, true);
|
|
689
|
+
var li_10 = root_38();
|
|
696
690
|
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
}
|
|
691
|
+
{
|
|
692
|
+
var expression_9 = _$_.child(li_10, true);
|
|
700
693
|
|
|
701
|
-
_$_.
|
|
702
|
-
|
|
703
|
-
|
|
694
|
+
_$_.expression(expression_9, () => `A-${_$_.get(pattern_5).id}`);
|
|
695
|
+
_$_.pop(li_10);
|
|
696
|
+
}
|
|
704
697
|
|
|
705
|
-
|
|
698
|
+
_$_.render(() => {
|
|
699
|
+
_$_.set_class(li_10, `item item-${_$_.get(pattern_5).id} kind-a`, void 0, true);
|
|
706
700
|
});
|
|
701
|
+
|
|
702
|
+
_$_.append(__anchor, li_10);
|
|
707
703
|
},
|
|
708
704
|
null,
|
|
709
705
|
(__anchor) => {
|
|
@@ -734,22 +730,20 @@ export function ForSwitchTry(__anchor, _, __block) {
|
|
|
734
730
|
_$_.try(
|
|
735
731
|
node_16,
|
|
736
732
|
(__anchor) => {
|
|
737
|
-
|
|
738
|
-
var li_12 = root_41();
|
|
739
|
-
|
|
740
|
-
{
|
|
741
|
-
var expression_11 = _$_.child(li_12, true);
|
|
733
|
+
var li_12 = root_41();
|
|
742
734
|
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
}
|
|
735
|
+
{
|
|
736
|
+
var expression_11 = _$_.child(li_12, true);
|
|
746
737
|
|
|
747
|
-
_$_.
|
|
748
|
-
|
|
749
|
-
|
|
738
|
+
_$_.expression(expression_11, () => `B-${_$_.get(pattern_5).id}`);
|
|
739
|
+
_$_.pop(li_12);
|
|
740
|
+
}
|
|
750
741
|
|
|
751
|
-
|
|
742
|
+
_$_.render(() => {
|
|
743
|
+
_$_.set_class(li_12, `item item-${_$_.get(pattern_5).id} kind-b`, void 0, true);
|
|
752
744
|
});
|
|
745
|
+
|
|
746
|
+
_$_.append(__anchor, li_12);
|
|
753
747
|
},
|
|
754
748
|
null,
|
|
755
749
|
(__anchor) => {
|
|
@@ -823,22 +817,20 @@ export function ForIfTry(__anchor, _, __block) {
|
|
|
823
817
|
_$_.try(
|
|
824
818
|
node_18,
|
|
825
819
|
(__anchor) => {
|
|
826
|
-
|
|
827
|
-
var li_14 = root_46();
|
|
820
|
+
var li_14 = root_46();
|
|
828
821
|
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
_$_.expression(expression_13, () => `item-${_$_.get(pattern_6).id}`);
|
|
833
|
-
_$_.pop(li_14);
|
|
834
|
-
}
|
|
822
|
+
{
|
|
823
|
+
var expression_13 = _$_.child(li_14, true);
|
|
835
824
|
|
|
836
|
-
_$_.
|
|
837
|
-
|
|
838
|
-
|
|
825
|
+
_$_.expression(expression_13, () => `item-${_$_.get(pattern_6).id}`);
|
|
826
|
+
_$_.pop(li_14);
|
|
827
|
+
}
|
|
839
828
|
|
|
840
|
-
|
|
829
|
+
_$_.render(() => {
|
|
830
|
+
_$_.set_class(li_14, `item item-${_$_.get(pattern_6).id}`, void 0, true);
|
|
841
831
|
});
|
|
832
|
+
|
|
833
|
+
_$_.append(__anchor, li_14);
|
|
842
834
|
},
|
|
843
835
|
null,
|
|
844
836
|
(__anchor) => {
|
|
@@ -907,22 +899,20 @@ export function ForIfSwitchTrySingle(__anchor, _, __block) {
|
|
|
907
899
|
_$_.try(
|
|
908
900
|
node_21,
|
|
909
901
|
(__anchor) => {
|
|
910
|
-
|
|
911
|
-
var li_16 = root_52();
|
|
912
|
-
|
|
913
|
-
{
|
|
914
|
-
var expression_15 = _$_.child(li_16, true);
|
|
902
|
+
var li_16 = root_52();
|
|
915
903
|
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
}
|
|
904
|
+
{
|
|
905
|
+
var expression_15 = _$_.child(li_16, true);
|
|
919
906
|
|
|
920
|
-
_$_.
|
|
921
|
-
|
|
922
|
-
|
|
907
|
+
_$_.expression(expression_15, () => `A-${_$_.get(pattern_7).id}`);
|
|
908
|
+
_$_.pop(li_16);
|
|
909
|
+
}
|
|
923
910
|
|
|
924
|
-
|
|
911
|
+
_$_.render(() => {
|
|
912
|
+
_$_.set_class(li_16, `item item-${_$_.get(pattern_7).id} kind-a`, void 0, true);
|
|
925
913
|
});
|
|
914
|
+
|
|
915
|
+
_$_.append(__anchor, li_16);
|
|
926
916
|
},
|
|
927
917
|
null,
|
|
928
918
|
(__anchor) => {
|
|
@@ -953,22 +943,20 @@ export function ForIfSwitchTrySingle(__anchor, _, __block) {
|
|
|
953
943
|
_$_.try(
|
|
954
944
|
node_22,
|
|
955
945
|
(__anchor) => {
|
|
956
|
-
|
|
957
|
-
var li_18 = root_55();
|
|
958
|
-
|
|
959
|
-
{
|
|
960
|
-
var expression_17 = _$_.child(li_18, true);
|
|
946
|
+
var li_18 = root_55();
|
|
961
947
|
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
}
|
|
948
|
+
{
|
|
949
|
+
var expression_17 = _$_.child(li_18, true);
|
|
965
950
|
|
|
966
|
-
_$_.
|
|
967
|
-
|
|
968
|
-
|
|
951
|
+
_$_.expression(expression_17, () => `D-${_$_.get(pattern_7).id}`);
|
|
952
|
+
_$_.pop(li_18);
|
|
953
|
+
}
|
|
969
954
|
|
|
970
|
-
|
|
955
|
+
_$_.render(() => {
|
|
956
|
+
_$_.set_class(li_18, `item item-${_$_.get(pattern_7).id} kind-default`, void 0, true);
|
|
971
957
|
});
|
|
958
|
+
|
|
959
|
+
_$_.append(__anchor, li_18);
|
|
972
960
|
},
|
|
973
961
|
null,
|
|
974
962
|
(__anchor) => {
|
|
@@ -1059,22 +1047,20 @@ export function ForIfSwitchTryMulti(__anchor, _, __block) {
|
|
|
1059
1047
|
_$_.try(
|
|
1060
1048
|
node_25,
|
|
1061
1049
|
(__anchor) => {
|
|
1062
|
-
|
|
1063
|
-
var li_20 = root_61();
|
|
1064
|
-
|
|
1065
|
-
{
|
|
1066
|
-
var expression_19 = _$_.child(li_20, true);
|
|
1050
|
+
var li_20 = root_61();
|
|
1067
1051
|
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
}
|
|
1052
|
+
{
|
|
1053
|
+
var expression_19 = _$_.child(li_20, true);
|
|
1071
1054
|
|
|
1072
|
-
_$_.
|
|
1073
|
-
|
|
1074
|
-
|
|
1055
|
+
_$_.expression(expression_19, () => `A-${_$_.get(pattern_8).id}`);
|
|
1056
|
+
_$_.pop(li_20);
|
|
1057
|
+
}
|
|
1075
1058
|
|
|
1076
|
-
|
|
1059
|
+
_$_.render(() => {
|
|
1060
|
+
_$_.set_class(li_20, `item item-${_$_.get(pattern_8).id} kind-a`, void 0, true);
|
|
1077
1061
|
});
|
|
1062
|
+
|
|
1063
|
+
_$_.append(__anchor, li_20);
|
|
1078
1064
|
},
|
|
1079
1065
|
null,
|
|
1080
1066
|
(__anchor) => {
|
|
@@ -1105,22 +1091,20 @@ export function ForIfSwitchTryMulti(__anchor, _, __block) {
|
|
|
1105
1091
|
_$_.try(
|
|
1106
1092
|
node_26,
|
|
1107
1093
|
(__anchor) => {
|
|
1108
|
-
|
|
1109
|
-
var li_22 = root_64();
|
|
1110
|
-
|
|
1111
|
-
{
|
|
1112
|
-
var expression_21 = _$_.child(li_22, true);
|
|
1094
|
+
var li_22 = root_64();
|
|
1113
1095
|
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
}
|
|
1096
|
+
{
|
|
1097
|
+
var expression_21 = _$_.child(li_22, true);
|
|
1117
1098
|
|
|
1118
|
-
_$_.
|
|
1119
|
-
|
|
1120
|
-
|
|
1099
|
+
_$_.expression(expression_21, () => `B-${_$_.get(pattern_8).id}`);
|
|
1100
|
+
_$_.pop(li_22);
|
|
1101
|
+
}
|
|
1121
1102
|
|
|
1122
|
-
|
|
1103
|
+
_$_.render(() => {
|
|
1104
|
+
_$_.set_class(li_22, `item item-${_$_.get(pattern_8).id} kind-b`, void 0, true);
|
|
1123
1105
|
});
|
|
1106
|
+
|
|
1107
|
+
_$_.append(__anchor, li_22);
|
|
1124
1108
|
},
|
|
1125
1109
|
null,
|
|
1126
1110
|
(__anchor) => {
|