ripple 0.3.7 → 0.3.8
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 +7 -0
- package/package.json +2 -2
- package/src/compiler/phases/1-parse/index.js +37 -194
- package/src/compiler/phases/2-analyze/index.js +63 -18
- package/src/compiler/phases/3-transform/client/index.js +19 -3
- package/src/compiler/phases/3-transform/server/index.js +16 -24
- package/src/compiler/types/parse.d.ts +0 -8
- package/src/runtime/internal/client/composite.js +2 -2
- package/tests/client/array/array.copy-within.test.ripple +12 -12
- package/tests/client/array/array.derived.test.ripple +46 -46
- package/tests/client/array/array.iteration.test.ripple +10 -10
- package/tests/client/array/array.mutations.test.ripple +20 -20
- package/tests/client/array/array.to-methods.test.ripple +6 -6
- package/tests/client/async-suspend.test.ripple +5 -5
- package/tests/client/basic/basic.attributes.test.ripple +81 -81
- package/tests/client/basic/basic.collections.test.ripple +9 -9
- package/tests/client/basic/basic.components.test.ripple +28 -28
- package/tests/client/basic/basic.errors.test.ripple +18 -18
- package/tests/client/basic/basic.events.test.ripple +37 -37
- package/tests/client/basic/basic.get-set.test.ripple +6 -6
- package/tests/client/basic/basic.reactivity.test.ripple +68 -68
- package/tests/client/basic/basic.rendering.test.ripple +19 -19
- package/tests/client/basic/basic.utilities.test.ripple +3 -3
- package/tests/client/boundaries.test.ripple +12 -12
- package/tests/client/compiler/__snapshots__/compiler.assignments.test.ripple.snap +5 -5
- package/tests/client/compiler/compiler.assignments.test.ripple +19 -19
- package/tests/client/compiler/compiler.basic.test.ripple +16 -16
- package/tests/client/compiler/compiler.tracked-access.test.ripple +2 -2
- package/tests/client/composite/composite.dynamic-components.test.ripple +9 -9
- package/tests/client/composite/composite.props.test.ripple +11 -11
- package/tests/client/composite/composite.reactivity.test.ripple +43 -43
- package/tests/client/composite/composite.render.test.ripple +3 -3
- package/tests/client/computed-properties.test.ripple +4 -4
- package/tests/client/date.test.ripple +42 -42
- package/tests/client/dynamic-elements.test.ripple +42 -42
- package/tests/client/events.test.ripple +70 -70
- package/tests/client/for.test.ripple +25 -25
- package/tests/client/head.test.ripple +19 -19
- package/tests/client/html.test.ripple +3 -3
- package/tests/client/input-value.test.ripple +84 -84
- package/tests/client/lazy-destructuring.test.ripple +71 -16
- package/tests/client/map.test.ripple +16 -16
- package/tests/client/media-query.test.ripple +7 -7
- package/tests/client/portal.test.ripple +11 -11
- package/tests/client/ref.test.ripple +4 -4
- package/tests/client/return.test.ripple +52 -52
- package/tests/client/set.test.ripple +6 -6
- package/tests/client/svg.test.ripple +5 -5
- package/tests/client/switch.test.ripple +44 -44
- package/tests/client/try.test.ripple +5 -5
- package/tests/client/url/url.derived.test.ripple +6 -6
- package/tests/client/url-search-params/url-search-params.derived.test.ripple +8 -8
- package/tests/client/url-search-params/url-search-params.iteration.test.ripple +10 -10
- package/tests/client/url-search-params/url-search-params.mutation.test.ripple +10 -10
- package/tests/client/url-search-params/url-search-params.retrieval.test.ripple +18 -18
- package/tests/client/url-search-params/url-search-params.serialization.test.ripple +2 -2
- package/tests/hydration/compiled/client/events.js +25 -25
- package/tests/hydration/compiled/client/for.js +70 -66
- package/tests/hydration/compiled/client/head.js +25 -25
- package/tests/hydration/compiled/client/hmr.js +2 -2
- package/tests/hydration/compiled/client/html.js +3 -3
- package/tests/hydration/compiled/client/if-children.js +24 -24
- package/tests/hydration/compiled/client/if.js +18 -18
- package/tests/hydration/compiled/client/mixed-control-flow.js +9 -9
- package/tests/hydration/compiled/client/portal.js +3 -3
- package/tests/hydration/compiled/client/reactivity.js +16 -16
- package/tests/hydration/compiled/client/return.js +40 -40
- package/tests/hydration/compiled/client/switch.js +12 -12
- package/tests/hydration/compiled/server/events.js +19 -19
- package/tests/hydration/compiled/server/for.js +41 -41
- package/tests/hydration/compiled/server/head.js +26 -26
- package/tests/hydration/compiled/server/hmr.js +2 -2
- package/tests/hydration/compiled/server/html.js +2 -2
- package/tests/hydration/compiled/server/if-children.js +16 -16
- package/tests/hydration/compiled/server/if.js +11 -11
- package/tests/hydration/compiled/server/mixed-control-flow.js +6 -6
- package/tests/hydration/compiled/server/portal.js +2 -2
- package/tests/hydration/compiled/server/reactivity.js +16 -16
- package/tests/hydration/compiled/server/return.js +25 -25
- package/tests/hydration/compiled/server/switch.js +8 -8
- package/tests/hydration/components/events.ripple +25 -25
- package/tests/hydration/components/for.ripple +66 -66
- package/tests/hydration/components/head.ripple +16 -16
- package/tests/hydration/components/hmr.ripple +2 -2
- package/tests/hydration/components/html.ripple +3 -3
- package/tests/hydration/components/if-children.ripple +24 -24
- package/tests/hydration/components/if.ripple +18 -18
- package/tests/hydration/components/mixed-control-flow.ripple +9 -9
- package/tests/hydration/components/portal.ripple +3 -3
- package/tests/hydration/components/reactivity.ripple +16 -16
- package/tests/hydration/components/return.ripple +40 -40
- package/tests/hydration/components/switch.ripple +20 -20
- package/tests/server/await.test.ripple +3 -3
- package/tests/server/basic.attributes.test.ripple +34 -34
- package/tests/server/basic.components.test.ripple +10 -10
- package/tests/server/basic.test.ripple +38 -40
- package/tests/server/composite.props.test.ripple +9 -9
- package/tests/server/dynamic-elements.test.ripple +13 -12
- package/tests/server/head.test.ripple +11 -11
- package/tests/server/lazy-destructuring.test.ripple +27 -4
|
@@ -7,7 +7,7 @@ export async function IfWithChildren(__output, { children }) {
|
|
|
7
7
|
return _$_.async(async () => {
|
|
8
8
|
_$_.push_component();
|
|
9
9
|
|
|
10
|
-
let
|
|
10
|
+
let lazy = _$_.track(true);
|
|
11
11
|
|
|
12
12
|
__output.push('<div');
|
|
13
13
|
__output.push(' class="container"');
|
|
@@ -26,7 +26,7 @@ export async function IfWithChildren(__output, { children }) {
|
|
|
26
26
|
__output.push('</div>');
|
|
27
27
|
__output.push('<!--[-->');
|
|
28
28
|
|
|
29
|
-
if (_$_.get(
|
|
29
|
+
if (_$_.get(lazy)) {
|
|
30
30
|
__output.push('<div');
|
|
31
31
|
__output.push(' class="content"');
|
|
32
32
|
__output.push('>');
|
|
@@ -111,7 +111,7 @@ export function TestIfWithChildren(__output) {
|
|
|
111
111
|
export function IfWithStaticChildren(__output) {
|
|
112
112
|
_$_.push_component();
|
|
113
113
|
|
|
114
|
-
let
|
|
114
|
+
let lazy_1 = _$_.track(true);
|
|
115
115
|
|
|
116
116
|
__output.push('<div');
|
|
117
117
|
__output.push(' class="container"');
|
|
@@ -130,7 +130,7 @@ export function IfWithStaticChildren(__output) {
|
|
|
130
130
|
__output.push('</div>');
|
|
131
131
|
__output.push('<!--[-->');
|
|
132
132
|
|
|
133
|
-
if (_$_.get(
|
|
133
|
+
if (_$_.get(lazy_1)) {
|
|
134
134
|
__output.push('<div');
|
|
135
135
|
__output.push(' class="content"');
|
|
136
136
|
__output.push('>');
|
|
@@ -168,7 +168,7 @@ export async function IfWithSiblingsAndChildren(__output, { children }) {
|
|
|
168
168
|
return _$_.async(async () => {
|
|
169
169
|
_$_.push_component();
|
|
170
170
|
|
|
171
|
-
let
|
|
171
|
+
let lazy_2 = _$_.track(true);
|
|
172
172
|
|
|
173
173
|
__output.push('<section');
|
|
174
174
|
__output.push(' class="group"');
|
|
@@ -222,7 +222,7 @@ export async function IfWithSiblingsAndChildren(__output, { children }) {
|
|
|
222
222
|
__output.push('</div>');
|
|
223
223
|
__output.push('<!--[-->');
|
|
224
224
|
|
|
225
|
-
if (_$_.get(
|
|
225
|
+
if (_$_.get(lazy_2)) {
|
|
226
226
|
__output.push('<div');
|
|
227
227
|
__output.push(' class="items"');
|
|
228
228
|
__output.push('>');
|
|
@@ -293,7 +293,7 @@ export function TestIfWithSiblingsAndChildren(__output) {
|
|
|
293
293
|
export function ElementWithChildrenThenIf(__output) {
|
|
294
294
|
_$_.push_component();
|
|
295
295
|
|
|
296
|
-
let
|
|
296
|
+
let lazy_3 = _$_.track(true);
|
|
297
297
|
|
|
298
298
|
__output.push('<div');
|
|
299
299
|
__output.push(' class="wrapper"');
|
|
@@ -327,7 +327,7 @@ export function ElementWithChildrenThenIf(__output) {
|
|
|
327
327
|
__output.push('</div>');
|
|
328
328
|
__output.push('<!--[-->');
|
|
329
329
|
|
|
330
|
-
if (_$_.get(
|
|
330
|
+
if (_$_.get(lazy_3)) {
|
|
331
331
|
__output.push('<div');
|
|
332
332
|
__output.push(' class="conditional"');
|
|
333
333
|
__output.push('>');
|
|
@@ -358,7 +358,7 @@ export function ElementWithChildrenThenIf(__output) {
|
|
|
358
358
|
export function DeepNestingThenIf(__output) {
|
|
359
359
|
_$_.push_component();
|
|
360
360
|
|
|
361
|
-
let
|
|
361
|
+
let lazy_4 = _$_.track(true);
|
|
362
362
|
|
|
363
363
|
__output.push('<section');
|
|
364
364
|
__output.push(' class="outer"');
|
|
@@ -407,7 +407,7 @@ export function DeepNestingThenIf(__output) {
|
|
|
407
407
|
__output.push('</article>');
|
|
408
408
|
__output.push('<!--[-->');
|
|
409
409
|
|
|
410
|
-
if (_$_.get(
|
|
410
|
+
if (_$_.get(lazy_4)) {
|
|
411
411
|
__output.push('<footer');
|
|
412
412
|
__output.push(' class="footer"');
|
|
413
413
|
__output.push('>');
|
|
@@ -438,7 +438,7 @@ export function DeepNestingThenIf(__output) {
|
|
|
438
438
|
export function DomElementChildrenThenSibling(__output) {
|
|
439
439
|
_$_.push_component();
|
|
440
440
|
|
|
441
|
-
let
|
|
441
|
+
let lazy_5 = _$_.track('code');
|
|
442
442
|
|
|
443
443
|
__output.push('<div');
|
|
444
444
|
__output.push(' class="tabs"');
|
|
@@ -451,7 +451,7 @@ export function DomElementChildrenThenSibling(__output) {
|
|
|
451
451
|
|
|
452
452
|
{
|
|
453
453
|
__output.push('<button');
|
|
454
|
-
__output.push(_$_.attr('aria-selected', _$_.get(
|
|
454
|
+
__output.push(_$_.attr('aria-selected', _$_.get(lazy_5) === 'code' ? 'true' : 'false', false));
|
|
455
455
|
__output.push(' class="tab"');
|
|
456
456
|
__output.push('>');
|
|
457
457
|
|
|
@@ -461,7 +461,7 @@ export function DomElementChildrenThenSibling(__output) {
|
|
|
461
461
|
|
|
462
462
|
__output.push('</button>');
|
|
463
463
|
__output.push('<button');
|
|
464
|
-
__output.push(_$_.attr('aria-selected', _$_.get(
|
|
464
|
+
__output.push(_$_.attr('aria-selected', _$_.get(lazy_5) === 'preview' ? 'true' : 'false', false));
|
|
465
465
|
__output.push(' class="tab"');
|
|
466
466
|
__output.push('>');
|
|
467
467
|
|
|
@@ -480,7 +480,7 @@ export function DomElementChildrenThenSibling(__output) {
|
|
|
480
480
|
{
|
|
481
481
|
__output.push('<!--[-->');
|
|
482
482
|
|
|
483
|
-
if (_$_.get(
|
|
483
|
+
if (_$_.get(lazy_5) === 'code') {
|
|
484
484
|
__output.push('<pre');
|
|
485
485
|
__output.push(' class="code"');
|
|
486
486
|
__output.push('>');
|
|
@@ -515,7 +515,7 @@ export function DomElementChildrenThenSibling(__output) {
|
|
|
515
515
|
export function DomChildrenThenStaticSiblings(__output) {
|
|
516
516
|
_$_.push_component();
|
|
517
517
|
|
|
518
|
-
let
|
|
518
|
+
let lazy_6 = _$_.track(0);
|
|
519
519
|
|
|
520
520
|
__output.push('<div');
|
|
521
521
|
__output.push(' class="container"');
|
|
@@ -532,7 +532,7 @@ export function DomChildrenThenStaticSiblings(__output) {
|
|
|
532
532
|
__output.push('>');
|
|
533
533
|
|
|
534
534
|
{
|
|
535
|
-
__output.push(_$_.escape('Item count: ' + String(_$_.get(
|
|
535
|
+
__output.push(_$_.escape('Item count: ' + String(_$_.get(lazy_6))));
|
|
536
536
|
}
|
|
537
537
|
|
|
538
538
|
__output.push('</li>');
|
|
@@ -85,7 +85,7 @@ export function IfElse(__output) {
|
|
|
85
85
|
export function ReactiveIf(__output) {
|
|
86
86
|
_$_.push_component();
|
|
87
87
|
|
|
88
|
-
let
|
|
88
|
+
let lazy = _$_.track(true);
|
|
89
89
|
|
|
90
90
|
__output.push('<button');
|
|
91
91
|
__output.push(' class="toggle"');
|
|
@@ -98,7 +98,7 @@ export function ReactiveIf(__output) {
|
|
|
98
98
|
__output.push('</button>');
|
|
99
99
|
__output.push('<!--[-->');
|
|
100
100
|
|
|
101
|
-
if (_$_.get(
|
|
101
|
+
if (_$_.get(lazy)) {
|
|
102
102
|
__output.push('<div');
|
|
103
103
|
__output.push(' class="content"');
|
|
104
104
|
__output.push('>');
|
|
@@ -117,7 +117,7 @@ export function ReactiveIf(__output) {
|
|
|
117
117
|
export function ReactiveIfElse(__output) {
|
|
118
118
|
_$_.push_component();
|
|
119
119
|
|
|
120
|
-
let
|
|
120
|
+
let lazy_1 = _$_.track(false);
|
|
121
121
|
|
|
122
122
|
__output.push('<button');
|
|
123
123
|
__output.push(' class="toggle"');
|
|
@@ -130,7 +130,7 @@ export function ReactiveIfElse(__output) {
|
|
|
130
130
|
__output.push('</button>');
|
|
131
131
|
__output.push('<!--[-->');
|
|
132
132
|
|
|
133
|
-
if (_$_.get(
|
|
133
|
+
if (_$_.get(lazy_1)) {
|
|
134
134
|
__output.push('<div');
|
|
135
135
|
__output.push(' class="on"');
|
|
136
136
|
__output.push('>');
|
|
@@ -159,8 +159,8 @@ export function ReactiveIfElse(__output) {
|
|
|
159
159
|
export function NestedIf(__output) {
|
|
160
160
|
_$_.push_component();
|
|
161
161
|
|
|
162
|
-
let
|
|
163
|
-
let
|
|
162
|
+
let lazy_2 = _$_.track(true);
|
|
163
|
+
let lazy_3 = _$_.track(true);
|
|
164
164
|
|
|
165
165
|
__output.push('<button');
|
|
166
166
|
__output.push(' class="outer-toggle"');
|
|
@@ -182,7 +182,7 @@ export function NestedIf(__output) {
|
|
|
182
182
|
__output.push('</button>');
|
|
183
183
|
__output.push('<!--[-->');
|
|
184
184
|
|
|
185
|
-
if (_$_.get(
|
|
185
|
+
if (_$_.get(lazy_2)) {
|
|
186
186
|
__output.push('<div');
|
|
187
187
|
__output.push(' class="outer-content"');
|
|
188
188
|
__output.push('>');
|
|
@@ -191,7 +191,7 @@ export function NestedIf(__output) {
|
|
|
191
191
|
__output.push('Outer');
|
|
192
192
|
__output.push('<!--[-->');
|
|
193
193
|
|
|
194
|
-
if (_$_.get(
|
|
194
|
+
if (_$_.get(lazy_3)) {
|
|
195
195
|
__output.push('<span');
|
|
196
196
|
__output.push(' class="inner-content"');
|
|
197
197
|
__output.push('>');
|
|
@@ -216,7 +216,7 @@ export function NestedIf(__output) {
|
|
|
216
216
|
export function IfElseIfChain(__output) {
|
|
217
217
|
_$_.push_component();
|
|
218
218
|
|
|
219
|
-
let
|
|
219
|
+
let lazy_4 = _$_.track('loading');
|
|
220
220
|
|
|
221
221
|
__output.push('<div');
|
|
222
222
|
__output.push('>');
|
|
@@ -251,7 +251,7 @@ export function IfElseIfChain(__output) {
|
|
|
251
251
|
__output.push('</button>');
|
|
252
252
|
__output.push('<!--[-->');
|
|
253
253
|
|
|
254
|
-
if (_$_.get(
|
|
254
|
+
if (_$_.get(lazy_4) === 'loading') {
|
|
255
255
|
__output.push('<div');
|
|
256
256
|
__output.push(' class="state"');
|
|
257
257
|
__output.push('>');
|
|
@@ -264,7 +264,7 @@ export function IfElseIfChain(__output) {
|
|
|
264
264
|
} else {
|
|
265
265
|
__output.push('<!--[-->');
|
|
266
266
|
|
|
267
|
-
if (_$_.get(
|
|
267
|
+
if (_$_.get(lazy_4) === 'success') {
|
|
268
268
|
__output.push('<div');
|
|
269
269
|
__output.push(' class="state"');
|
|
270
270
|
__output.push('>');
|
|
@@ -97,9 +97,9 @@ export async function MixedControlFlowReactive(__output) {
|
|
|
97
97
|
return _$_.async(async () => {
|
|
98
98
|
_$_.push_component();
|
|
99
99
|
|
|
100
|
-
let
|
|
101
|
-
let
|
|
102
|
-
let
|
|
100
|
+
let lazy = _$_.track(true);
|
|
101
|
+
let lazy_1 = _$_.track('a');
|
|
102
|
+
let lazy_2 = _$_.track([{ id: 1, label: 'One' }, { id: 2, label: 'Two' }]);
|
|
103
103
|
|
|
104
104
|
__output.push('<button');
|
|
105
105
|
__output.push(' class="toggle-show"');
|
|
@@ -130,7 +130,7 @@ export async function MixedControlFlowReactive(__output) {
|
|
|
130
130
|
__output.push('</button>');
|
|
131
131
|
__output.push('<!--[-->');
|
|
132
132
|
|
|
133
|
-
if (_$_.get(
|
|
133
|
+
if (_$_.get(lazy)) {
|
|
134
134
|
__output.push('<div');
|
|
135
135
|
__output.push(' class="mixed-reactive-list"');
|
|
136
136
|
__output.push('>');
|
|
@@ -138,10 +138,10 @@ export async function MixedControlFlowReactive(__output) {
|
|
|
138
138
|
{
|
|
139
139
|
__output.push('<!--[-->');
|
|
140
140
|
|
|
141
|
-
for (const item of _$_.get(
|
|
141
|
+
for (const item of _$_.get(lazy_2)) {
|
|
142
142
|
__output.push('<!--[-->');
|
|
143
143
|
|
|
144
|
-
switch (_$_.get(
|
|
144
|
+
switch (_$_.get(lazy_1)) {
|
|
145
145
|
case 'a':
|
|
146
146
|
__output.push('<!--[-->');
|
|
147
147
|
var __pending_pos_2 = __output.body.length;
|
|
@@ -62,7 +62,7 @@ export async function ConditionalPortal(__output) {
|
|
|
62
62
|
return _$_.async(async () => {
|
|
63
63
|
_$_.push_component();
|
|
64
64
|
|
|
65
|
-
let
|
|
65
|
+
let lazy = _$_.track(true);
|
|
66
66
|
|
|
67
67
|
__output.push('<div');
|
|
68
68
|
__output.push(' class="container"');
|
|
@@ -80,7 +80,7 @@ export async function ConditionalPortal(__output) {
|
|
|
80
80
|
__output.push('</button>');
|
|
81
81
|
__output.push('<!--[-->');
|
|
82
82
|
|
|
83
|
-
if (_$_.get(
|
|
83
|
+
if (_$_.get(lazy)) {
|
|
84
84
|
{
|
|
85
85
|
const comp = Portal;
|
|
86
86
|
|
|
@@ -6,14 +6,14 @@ import { track } from 'ripple/server';
|
|
|
6
6
|
export function TrackedState(__output) {
|
|
7
7
|
_$_.push_component();
|
|
8
8
|
|
|
9
|
-
let
|
|
9
|
+
let lazy = _$_.track(0);
|
|
10
10
|
|
|
11
11
|
__output.push('<div');
|
|
12
12
|
__output.push(' class="count"');
|
|
13
13
|
__output.push('>');
|
|
14
14
|
|
|
15
15
|
{
|
|
16
|
-
__output.push(_$_.escape(_$_.get(
|
|
16
|
+
__output.push(_$_.escape(_$_.get(lazy)));
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
__output.push('</div>');
|
|
@@ -23,7 +23,7 @@ export function TrackedState(__output) {
|
|
|
23
23
|
export function CounterWithInitial(__output, props) {
|
|
24
24
|
_$_.push_component();
|
|
25
25
|
|
|
26
|
-
let
|
|
26
|
+
let lazy_1 = _$_.track(props.initial);
|
|
27
27
|
|
|
28
28
|
__output.push('<div');
|
|
29
29
|
__output.push('>');
|
|
@@ -34,7 +34,7 @@ export function CounterWithInitial(__output, props) {
|
|
|
34
34
|
__output.push('>');
|
|
35
35
|
|
|
36
36
|
{
|
|
37
|
-
__output.push(_$_.escape(_$_.get(
|
|
37
|
+
__output.push(_$_.escape(_$_.get(lazy_1)));
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
__output.push('</span>');
|
|
@@ -60,9 +60,9 @@ export function CounterWrapper(__output) {
|
|
|
60
60
|
export function ComputedValues(__output) {
|
|
61
61
|
_$_.push_component();
|
|
62
62
|
|
|
63
|
-
let
|
|
64
|
-
let
|
|
65
|
-
const sum = () => _$_.get(
|
|
63
|
+
let lazy_2 = _$_.track(2);
|
|
64
|
+
let lazy_3 = _$_.track(3);
|
|
65
|
+
const sum = () => _$_.get(lazy_2) + _$_.get(lazy_3);
|
|
66
66
|
|
|
67
67
|
__output.push('<div');
|
|
68
68
|
__output.push(' class="sum"');
|
|
@@ -79,16 +79,16 @@ export function ComputedValues(__output) {
|
|
|
79
79
|
export function MultipleTracked(__output) {
|
|
80
80
|
_$_.push_component();
|
|
81
81
|
|
|
82
|
-
let
|
|
83
|
-
let
|
|
84
|
-
let
|
|
82
|
+
let lazy_4 = _$_.track(10);
|
|
83
|
+
let lazy_5 = _$_.track(20);
|
|
84
|
+
let lazy_6 = _$_.track(30);
|
|
85
85
|
|
|
86
86
|
__output.push('<div');
|
|
87
87
|
__output.push(' class="x"');
|
|
88
88
|
__output.push('>');
|
|
89
89
|
|
|
90
90
|
{
|
|
91
|
-
__output.push(_$_.escape(_$_.get(
|
|
91
|
+
__output.push(_$_.escape(_$_.get(lazy_4)));
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
__output.push('</div>');
|
|
@@ -97,7 +97,7 @@ export function MultipleTracked(__output) {
|
|
|
97
97
|
__output.push('>');
|
|
98
98
|
|
|
99
99
|
{
|
|
100
|
-
__output.push(_$_.escape(_$_.get(
|
|
100
|
+
__output.push(_$_.escape(_$_.get(lazy_5)));
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
__output.push('</div>');
|
|
@@ -106,7 +106,7 @@ export function MultipleTracked(__output) {
|
|
|
106
106
|
__output.push('>');
|
|
107
107
|
|
|
108
108
|
{
|
|
109
|
-
__output.push(_$_.escape(_$_.get(
|
|
109
|
+
__output.push(_$_.escape(_$_.get(lazy_6)));
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
__output.push('</div>');
|
|
@@ -116,9 +116,9 @@ export function MultipleTracked(__output) {
|
|
|
116
116
|
export function DerivedState(__output) {
|
|
117
117
|
_$_.push_component();
|
|
118
118
|
|
|
119
|
-
let
|
|
120
|
-
let
|
|
121
|
-
const fullName = () => `${_$_.get(
|
|
119
|
+
let lazy_7 = _$_.track('John');
|
|
120
|
+
let lazy_8 = _$_.track('Doe');
|
|
121
|
+
const fullName = () => `${_$_.get(lazy_7)} ${_$_.get(lazy_8)}`;
|
|
122
122
|
|
|
123
123
|
__output.push('<div');
|
|
124
124
|
__output.push(' class="name"');
|
|
@@ -1034,7 +1034,7 @@ export function ReactiveReturnTrueToFalse(__output) {
|
|
|
1034
1034
|
_$_.push_component();
|
|
1035
1035
|
|
|
1036
1036
|
var __r_28 = false;
|
|
1037
|
-
let
|
|
1037
|
+
let lazy = _$_.track(true);
|
|
1038
1038
|
|
|
1039
1039
|
__output.push('<button');
|
|
1040
1040
|
__output.push(' class="toggle"');
|
|
@@ -1047,7 +1047,7 @@ export function ReactiveReturnTrueToFalse(__output) {
|
|
|
1047
1047
|
__output.push('</button>');
|
|
1048
1048
|
__output.push('<!--[-->');
|
|
1049
1049
|
|
|
1050
|
-
if (_$_.get(
|
|
1050
|
+
if (_$_.get(lazy)) {
|
|
1051
1051
|
__output.push('<div');
|
|
1052
1052
|
__output.push(' class="guard"');
|
|
1053
1053
|
__output.push('>');
|
|
@@ -1083,7 +1083,7 @@ export function ReactiveReturnFalseToTrue(__output) {
|
|
|
1083
1083
|
_$_.push_component();
|
|
1084
1084
|
|
|
1085
1085
|
var __r_29 = false;
|
|
1086
|
-
let
|
|
1086
|
+
let lazy_1 = _$_.track(false);
|
|
1087
1087
|
|
|
1088
1088
|
__output.push('<button');
|
|
1089
1089
|
__output.push(' class="toggle"');
|
|
@@ -1096,7 +1096,7 @@ export function ReactiveReturnFalseToTrue(__output) {
|
|
|
1096
1096
|
__output.push('</button>');
|
|
1097
1097
|
__output.push('<!--[-->');
|
|
1098
1098
|
|
|
1099
|
-
if (_$_.get(
|
|
1099
|
+
if (_$_.get(lazy_1)) {
|
|
1100
1100
|
__output.push('<div');
|
|
1101
1101
|
__output.push(' class="guard"');
|
|
1102
1102
|
__output.push('>');
|
|
@@ -1133,7 +1133,7 @@ export function ReactiveNestedReturn(__output) {
|
|
|
1133
1133
|
|
|
1134
1134
|
var __r_30 = false;
|
|
1135
1135
|
let a = true;
|
|
1136
|
-
let
|
|
1136
|
+
let lazy_2 = _$_.track(true);
|
|
1137
1137
|
|
|
1138
1138
|
__output.push('<button');
|
|
1139
1139
|
__output.push(' class="toggle"');
|
|
@@ -1158,7 +1158,7 @@ export function ReactiveNestedReturn(__output) {
|
|
|
1158
1158
|
__output.push('</div>');
|
|
1159
1159
|
__output.push('<!--[-->');
|
|
1160
1160
|
|
|
1161
|
-
if (_$_.get(
|
|
1161
|
+
if (_$_.get(lazy_2)) {
|
|
1162
1162
|
__output.push('<div');
|
|
1163
1163
|
__output.push(' class="b"');
|
|
1164
1164
|
__output.push('>');
|
|
@@ -1507,7 +1507,7 @@ export function ReactiveSiblingReturns(__output) {
|
|
|
1507
1507
|
|
|
1508
1508
|
var __r_38 = false;
|
|
1509
1509
|
var __r_39 = false;
|
|
1510
|
-
let
|
|
1510
|
+
let lazy_3 = _$_.track('first');
|
|
1511
1511
|
|
|
1512
1512
|
__output.push('<button');
|
|
1513
1513
|
__output.push(' class="toggle"');
|
|
@@ -1520,7 +1520,7 @@ export function ReactiveSiblingReturns(__output) {
|
|
|
1520
1520
|
__output.push('</button>');
|
|
1521
1521
|
__output.push('<!--[-->');
|
|
1522
1522
|
|
|
1523
|
-
if (_$_.get(
|
|
1523
|
+
if (_$_.get(lazy_3) === 'first') {
|
|
1524
1524
|
__output.push('<div');
|
|
1525
1525
|
__output.push(' class="first"');
|
|
1526
1526
|
__output.push('>');
|
|
@@ -1539,7 +1539,7 @@ export function ReactiveSiblingReturns(__output) {
|
|
|
1539
1539
|
if (!__r_38) {
|
|
1540
1540
|
__output.push('<!--[-->');
|
|
1541
1541
|
|
|
1542
|
-
if (_$_.get(
|
|
1542
|
+
if (_$_.get(lazy_3) === 'second') {
|
|
1543
1543
|
__output.push('<div');
|
|
1544
1544
|
__output.push(' class="second"');
|
|
1545
1545
|
__output.push('>');
|
|
@@ -1578,8 +1578,8 @@ export function ReactiveOuterInnerReturns(__output) {
|
|
|
1578
1578
|
_$_.push_component();
|
|
1579
1579
|
|
|
1580
1580
|
var __r_40 = false;
|
|
1581
|
-
let
|
|
1582
|
-
let
|
|
1581
|
+
let lazy_4 = _$_.track(true);
|
|
1582
|
+
let lazy_5 = _$_.track(true);
|
|
1583
1583
|
|
|
1584
1584
|
__output.push('<button');
|
|
1585
1585
|
__output.push(' class="toggle-a"');
|
|
@@ -1601,7 +1601,7 @@ export function ReactiveOuterInnerReturns(__output) {
|
|
|
1601
1601
|
__output.push('</button>');
|
|
1602
1602
|
__output.push('<!--[-->');
|
|
1603
1603
|
|
|
1604
|
-
if (_$_.get(
|
|
1604
|
+
if (_$_.get(lazy_4)) {
|
|
1605
1605
|
__output.push('<div');
|
|
1606
1606
|
__output.push(' class="a"');
|
|
1607
1607
|
__output.push('>');
|
|
@@ -1613,7 +1613,7 @@ export function ReactiveOuterInnerReturns(__output) {
|
|
|
1613
1613
|
__output.push('</div>');
|
|
1614
1614
|
__output.push('<!--[-->');
|
|
1615
1615
|
|
|
1616
|
-
if (_$_.get(
|
|
1616
|
+
if (_$_.get(lazy_5)) {
|
|
1617
1617
|
__output.push('<div');
|
|
1618
1618
|
__output.push(' class="b"');
|
|
1619
1619
|
__output.push('>');
|
|
@@ -1638,7 +1638,7 @@ export function ReactiveOuterInnerReturns(__output) {
|
|
|
1638
1638
|
__output.push('>');
|
|
1639
1639
|
|
|
1640
1640
|
{
|
|
1641
|
-
__output.push(_$_.escape(_$_.get(
|
|
1641
|
+
__output.push(_$_.escape(_$_.get(lazy_4) ? 'a-on rest' : 'a-off rest'));
|
|
1642
1642
|
}
|
|
1643
1643
|
|
|
1644
1644
|
__output.push('</div>');
|
|
@@ -1653,7 +1653,7 @@ export function ReactiveElseIfReturns(__output) {
|
|
|
1653
1653
|
|
|
1654
1654
|
var __r_41 = false;
|
|
1655
1655
|
var __r_42 = false;
|
|
1656
|
-
let
|
|
1656
|
+
let lazy_6 = _$_.track(0);
|
|
1657
1657
|
|
|
1658
1658
|
__output.push('<button');
|
|
1659
1659
|
__output.push(' class="toggle"');
|
|
@@ -1666,7 +1666,7 @@ export function ReactiveElseIfReturns(__output) {
|
|
|
1666
1666
|
__output.push('</button>');
|
|
1667
1667
|
__output.push('<!--[-->');
|
|
1668
1668
|
|
|
1669
|
-
if (_$_.get(
|
|
1669
|
+
if (_$_.get(lazy_6) === 0) {
|
|
1670
1670
|
__output.push('<div');
|
|
1671
1671
|
__output.push(' class="zero"');
|
|
1672
1672
|
__output.push('>');
|
|
@@ -1680,7 +1680,7 @@ export function ReactiveElseIfReturns(__output) {
|
|
|
1680
1680
|
} else {
|
|
1681
1681
|
__output.push('<!--[-->');
|
|
1682
1682
|
|
|
1683
|
-
if (_$_.get(
|
|
1683
|
+
if (_$_.get(lazy_6) === 1) {
|
|
1684
1684
|
__output.push('<div');
|
|
1685
1685
|
__output.push(' class="one"');
|
|
1686
1686
|
__output.push('>');
|
|
@@ -1731,10 +1731,10 @@ export function ReactiveDeepNestedIndependentReturns(__output) {
|
|
|
1731
1731
|
var __r_44 = false;
|
|
1732
1732
|
var __r_45 = false;
|
|
1733
1733
|
var __r_46 = false;
|
|
1734
|
-
let
|
|
1735
|
-
let
|
|
1736
|
-
let
|
|
1737
|
-
let
|
|
1734
|
+
let lazy_7 = _$_.track(false);
|
|
1735
|
+
let lazy_8 = _$_.track(false);
|
|
1736
|
+
let lazy_9 = _$_.track(false);
|
|
1737
|
+
let lazy_10 = _$_.track(false);
|
|
1738
1738
|
|
|
1739
1739
|
__output.push('<button');
|
|
1740
1740
|
__output.push(' class="toggle-c1"');
|
|
@@ -1783,7 +1783,7 @@ export function ReactiveDeepNestedIndependentReturns(__output) {
|
|
|
1783
1783
|
__output.push('</div>');
|
|
1784
1784
|
__output.push('<!--[-->');
|
|
1785
1785
|
|
|
1786
|
-
if (_$_.get(
|
|
1786
|
+
if (_$_.get(lazy_7)) {
|
|
1787
1787
|
__output.push('<div');
|
|
1788
1788
|
__output.push(' class="hit-1"');
|
|
1789
1789
|
__output.push('>');
|
|
@@ -1825,7 +1825,7 @@ export function ReactiveDeepNestedIndependentReturns(__output) {
|
|
|
1825
1825
|
__output.push('</div>');
|
|
1826
1826
|
__output.push('<!--[-->');
|
|
1827
1827
|
|
|
1828
|
-
if (_$_.get(
|
|
1828
|
+
if (_$_.get(lazy_8)) {
|
|
1829
1829
|
__output.push('<div');
|
|
1830
1830
|
__output.push(' class="hit-2"');
|
|
1831
1831
|
__output.push('>');
|
|
@@ -1867,7 +1867,7 @@ export function ReactiveDeepNestedIndependentReturns(__output) {
|
|
|
1867
1867
|
__output.push('</div>');
|
|
1868
1868
|
__output.push('<!--[-->');
|
|
1869
1869
|
|
|
1870
|
-
if (_$_.get(
|
|
1870
|
+
if (_$_.get(lazy_9)) {
|
|
1871
1871
|
__output.push('<div');
|
|
1872
1872
|
__output.push(' class="hit-3"');
|
|
1873
1873
|
__output.push('>');
|
|
@@ -1895,7 +1895,7 @@ export function ReactiveDeepNestedIndependentReturns(__output) {
|
|
|
1895
1895
|
__output.push('</div>');
|
|
1896
1896
|
__output.push('<!--[-->');
|
|
1897
1897
|
|
|
1898
|
-
if (_$_.get(
|
|
1898
|
+
if (_$_.get(lazy_10)) {
|
|
1899
1899
|
__output.push('<div');
|
|
1900
1900
|
__output.push(' class="hit-4"');
|
|
1901
1901
|
__output.push('>');
|
|
@@ -48,7 +48,7 @@ export function SwitchStatic(__output) {
|
|
|
48
48
|
export function SwitchReactive(__output) {
|
|
49
49
|
_$_.push_component();
|
|
50
50
|
|
|
51
|
-
let
|
|
51
|
+
let lazy = _$_.track('a');
|
|
52
52
|
|
|
53
53
|
__output.push('<button');
|
|
54
54
|
__output.push(' class="toggle"');
|
|
@@ -61,7 +61,7 @@ export function SwitchReactive(__output) {
|
|
|
61
61
|
__output.push('</button>');
|
|
62
62
|
__output.push('<!--[-->');
|
|
63
63
|
|
|
64
|
-
switch (_$_.get(
|
|
64
|
+
switch (_$_.get(lazy)) {
|
|
65
65
|
case 'a':
|
|
66
66
|
__output.push('<div');
|
|
67
67
|
__output.push(' class="case-a"');
|
|
@@ -133,7 +133,7 @@ export function SwitchFallthrough(__output) {
|
|
|
133
133
|
export function SwitchNumericLevels(__output) {
|
|
134
134
|
_$_.push_component();
|
|
135
135
|
|
|
136
|
-
let
|
|
136
|
+
let lazy_1 = _$_.track(1);
|
|
137
137
|
|
|
138
138
|
__output.push('<button');
|
|
139
139
|
__output.push(' class="level-toggle"');
|
|
@@ -146,7 +146,7 @@ export function SwitchNumericLevels(__output) {
|
|
|
146
146
|
__output.push('</button>');
|
|
147
147
|
__output.push('<!--[-->');
|
|
148
148
|
|
|
149
|
-
switch (_$_.get(
|
|
149
|
+
switch (_$_.get(lazy_1)) {
|
|
150
150
|
case 1:
|
|
151
151
|
__output.push('<div');
|
|
152
152
|
__output.push(' class="level-1"');
|
|
@@ -185,7 +185,7 @@ export function SwitchNumericLevels(__output) {
|
|
|
185
185
|
export function SwitchBlockScoped(__output) {
|
|
186
186
|
_$_.push_component();
|
|
187
187
|
|
|
188
|
-
let
|
|
188
|
+
let lazy_2 = _$_.track(1);
|
|
189
189
|
|
|
190
190
|
__output.push('<button');
|
|
191
191
|
__output.push(' class="block-toggle"');
|
|
@@ -198,7 +198,7 @@ export function SwitchBlockScoped(__output) {
|
|
|
198
198
|
__output.push('</button>');
|
|
199
199
|
__output.push('<!--[-->');
|
|
200
200
|
|
|
201
|
-
switch (_$_.get(
|
|
201
|
+
switch (_$_.get(lazy_2)) {
|
|
202
202
|
case 1:
|
|
203
203
|
__output.push('<div');
|
|
204
204
|
__output.push(' class="block-1"');
|
|
@@ -237,7 +237,7 @@ export function SwitchBlockScoped(__output) {
|
|
|
237
237
|
export function SwitchNoBreak(__output) {
|
|
238
238
|
_$_.push_component();
|
|
239
239
|
|
|
240
|
-
let
|
|
240
|
+
let lazy_3 = _$_.track(1);
|
|
241
241
|
|
|
242
242
|
__output.push('<button');
|
|
243
243
|
__output.push(' class="nobreak-toggle"');
|
|
@@ -250,7 +250,7 @@ export function SwitchNoBreak(__output) {
|
|
|
250
250
|
__output.push('</button>');
|
|
251
251
|
__output.push('<!--[-->');
|
|
252
252
|
|
|
253
|
-
switch (_$_.get(
|
|
253
|
+
switch (_$_.get(lazy_3)) {
|
|
254
254
|
case 1:
|
|
255
255
|
__output.push('<div');
|
|
256
256
|
__output.push(' class="nobreak-1"');
|