ripple 0.3.2 → 0.3.4
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 +85 -0
- package/package.json +2 -2
- package/src/compiler/identifier-utils.js +0 -2
- package/src/compiler/phases/1-parse/index.js +101 -195
- package/src/compiler/phases/2-analyze/index.js +82 -174
- package/src/compiler/phases/2-analyze/prune.js +2 -2
- package/src/compiler/phases/3-transform/client/index.js +174 -264
- package/src/compiler/phases/3-transform/segments.js +0 -22
- package/src/compiler/phases/3-transform/server/index.js +185 -42
- package/src/compiler/types/index.d.ts +14 -33
- package/src/compiler/utils.js +32 -20
- package/src/runtime/index-client.js +0 -17
- package/src/runtime/internal/client/bindings.js +118 -7
- package/src/runtime/internal/client/render.js +5 -1
- package/src/runtime/internal/client/runtime.js +1 -1
- package/src/runtime/internal/client/types.d.ts +4 -0
- package/tests/client/array/array.copy-within.test.ripple +7 -7
- package/tests/client/array/array.derived.test.ripple +24 -24
- package/tests/client/array/array.iteration.test.ripple +7 -7
- package/tests/client/array/array.mutations.test.ripple +17 -17
- package/tests/client/array/array.to-methods.test.ripple +4 -4
- package/tests/client/async-suspend.test.ripple +3 -3
- package/tests/client/basic/basic.attributes.test.ripple +31 -31
- package/tests/client/basic/basic.collections.test.ripple +6 -6
- package/tests/client/basic/basic.components.test.ripple +8 -8
- package/tests/client/basic/basic.errors.test.ripple +31 -34
- package/tests/client/basic/basic.events.test.ripple +11 -11
- package/tests/client/basic/basic.get-set.test.ripple +18 -18
- package/tests/client/basic/basic.reactivity.test.ripple +36 -36
- package/tests/client/basic/basic.rendering.test.ripple +7 -7
- package/tests/client/basic/basic.utilities.test.ripple +4 -4
- package/tests/client/boundaries.test.ripple +7 -7
- package/tests/client/compiler/__snapshots__/compiler.typescript.test.ripple.snap +24 -0
- package/tests/client/compiler/compiler.assignments.test.ripple +12 -10
- package/tests/client/compiler/compiler.basic.test.ripple +58 -60
- package/tests/client/compiler/compiler.tracked-access.test.ripple +14 -8
- package/tests/client/compiler/compiler.typescript.test.ripple +31 -0
- package/tests/client/composite/composite.dynamic-components.test.ripple +6 -6
- package/tests/client/composite/composite.props.test.ripple +9 -9
- package/tests/client/composite/composite.reactivity.test.ripple +23 -23
- package/tests/client/composite/composite.render.test.ripple +52 -4
- package/tests/client/computed-properties.test.ripple +3 -3
- package/tests/client/context.test.ripple +3 -3
- package/tests/client/css/global-additional-cases.test.ripple +5 -2
- package/tests/client/css/style-identifier.test.ripple +40 -49
- package/tests/client/date.test.ripple +39 -39
- package/tests/client/dynamic-elements.test.ripple +37 -37
- package/tests/client/events.test.ripple +25 -25
- package/tests/client/for.test.ripple +8 -8
- package/tests/client/head.test.ripple +7 -7
- package/tests/client/html.test.ripple +2 -2
- package/tests/client/input-value.test.ripple +376 -177
- package/tests/client/lazy-destructuring.test.ripple +185 -0
- package/tests/client/map.test.ripple +20 -20
- package/tests/client/media-query.test.ripple +4 -4
- package/tests/client/object.test.ripple +5 -5
- package/tests/client/portal.test.ripple +4 -4
- package/tests/client/ref.test.ripple +3 -3
- package/tests/client/return.test.ripple +17 -17
- package/tests/client/set.test.ripple +10 -10
- package/tests/client/svg.test.ripple +6 -5
- package/tests/client/switch.test.ripple +10 -10
- package/tests/client/tracked-expression.test.ripple +3 -1
- package/tests/client/try.test.ripple +4 -4
- package/tests/client/url/url.derived.test.ripple +6 -7
- package/tests/client/url/url.parsing.test.ripple +9 -9
- package/tests/client/url/url.partial-removal.test.ripple +9 -9
- package/tests/client/url/url.reactivity.test.ripple +16 -16
- package/tests/client/url/url.serialization.test.ripple +3 -3
- package/tests/client/url-search-params/url-search-params.derived.test.ripple +7 -8
- package/tests/client/url-search-params/url-search-params.initialization.test.ripple +6 -4
- package/tests/client/url-search-params/url-search-params.iteration.test.ripple +12 -12
- package/tests/client/url-search-params/url-search-params.mutation.test.ripple +18 -18
- package/tests/client/url-search-params/url-search-params.retrieval.test.ripple +16 -16
- package/tests/client/url-search-params/url-search-params.serialization.test.ripple +4 -4
- package/tests/client/url-search-params/url-search-params.tracked-url.test.ripple +3 -3
- package/tests/hydration/build-components.js +4 -10
- package/tests/hydration/compiled/client/basic.js +4 -4
- package/tests/hydration/compiled/client/events.js +2 -0
- package/tests/hydration/compiled/client/for.js +2 -0
- package/tests/hydration/compiled/client/head.js +13 -11
- package/tests/hydration/compiled/client/hmr.js +4 -2
- package/tests/hydration/compiled/client/html.js +82 -95
- package/tests/hydration/compiled/client/if-children.js +8 -9
- package/tests/hydration/compiled/client/if.js +2 -0
- package/tests/hydration/compiled/client/mixed-control-flow.js +4 -2
- package/tests/hydration/compiled/client/portal.js +1 -1
- package/tests/hydration/compiled/client/reactivity.js +2 -0
- package/tests/hydration/compiled/client/return.js +2 -0
- package/tests/hydration/compiled/client/switch.js +2 -0
- package/tests/hydration/compiled/server/composite.js +2 -2
- package/tests/hydration/compiled/server/events.js +2 -0
- package/tests/hydration/compiled/server/for.js +2 -0
- package/tests/hydration/compiled/server/head.js +13 -11
- package/tests/hydration/compiled/server/hmr.js +2 -0
- package/tests/hydration/compiled/server/html.js +2 -0
- package/tests/hydration/compiled/server/if-children.js +2 -0
- package/tests/hydration/compiled/server/if.js +2 -0
- package/tests/hydration/compiled/server/mixed-control-flow.js +2 -0
- package/tests/hydration/compiled/server/portal.js +1 -1
- package/tests/hydration/compiled/server/reactivity.js +2 -0
- package/tests/hydration/compiled/server/return.js +2 -0
- package/tests/hydration/compiled/server/switch.js +2 -0
- package/tests/hydration/components/composite.ripple +1 -1
- package/tests/hydration/components/events.ripple +10 -8
- package/tests/hydration/components/for.ripple +22 -20
- package/tests/hydration/components/head.ripple +8 -6
- package/tests/hydration/components/hmr.ripple +3 -1
- package/tests/hydration/components/html.ripple +3 -1
- package/tests/hydration/components/if-children.ripple +9 -7
- package/tests/hydration/components/if.ripple +7 -5
- package/tests/hydration/components/mixed-control-flow.ripple +5 -3
- package/tests/hydration/components/portal.ripple +2 -2
- package/tests/hydration/components/reactivity.ripple +11 -9
- package/tests/hydration/components/return.ripple +13 -11
- package/tests/hydration/components/switch.ripple +6 -4
- package/tests/server/__snapshots__/compiler.test.ripple.snap +22 -0
- package/tests/server/await.test.ripple +2 -2
- package/tests/server/basic.attributes.test.ripple +21 -19
- package/tests/server/basic.components.test.ripple +5 -4
- package/tests/server/basic.test.ripple +21 -20
- package/tests/server/compiler.test.ripple +36 -5
- package/tests/server/composite.props.test.ripple +7 -6
- package/tests/server/context.test.ripple +3 -1
- package/tests/server/dynamic-elements.test.ripple +24 -24
- package/tests/server/head.test.ripple +7 -5
- package/tests/server/style-identifier.test.ripple +95 -16
- package/types/index.d.ts +4 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { flushSync } from 'ripple';
|
|
1
|
+
import { RippleURL, RippleURLSearchParams, flushSync, track } from 'ripple';
|
|
2
2
|
|
|
3
3
|
describe('RippleURLSearchParams > mutation', () => {
|
|
4
4
|
it('handles append operation with reactivity', () => {
|
|
5
5
|
component URLTest() {
|
|
6
|
-
const params =
|
|
6
|
+
const params = RippleURLSearchParams('foo=bar');
|
|
7
7
|
|
|
8
8
|
<button onClick={() => params.append('baz', 'qux')}>{'append'}</button>
|
|
9
9
|
<pre>{params.toString()}</pre>
|
|
@@ -28,8 +28,8 @@ describe('RippleURLSearchParams > mutation', () => {
|
|
|
28
28
|
|
|
29
29
|
it('handles append with multiple values for same key', () => {
|
|
30
30
|
component URLTest() {
|
|
31
|
-
const params =
|
|
32
|
-
let allFoo =
|
|
31
|
+
const params = RippleURLSearchParams('foo=bar');
|
|
32
|
+
let allFoo = track(() => params.getAll('foo'));
|
|
33
33
|
|
|
34
34
|
<button onClick={() => params.append('foo', 'baz')}>{'append foo'}</button>
|
|
35
35
|
<pre>{params.toString()}</pre>
|
|
@@ -54,7 +54,7 @@ describe('RippleURLSearchParams > mutation', () => {
|
|
|
54
54
|
|
|
55
55
|
it('handles delete operation with reactivity', () => {
|
|
56
56
|
component URLTest() {
|
|
57
|
-
const params =
|
|
57
|
+
const params = RippleURLSearchParams('foo=bar&baz=qux');
|
|
58
58
|
|
|
59
59
|
<button onClick={() => params.delete('foo')}>{'delete foo'}</button>
|
|
60
60
|
<pre>{params.toString()}</pre>
|
|
@@ -82,7 +82,7 @@ describe('RippleURLSearchParams > mutation', () => {
|
|
|
82
82
|
|
|
83
83
|
it('handles delete with specific value', () => {
|
|
84
84
|
component URLTest() {
|
|
85
|
-
const params =
|
|
85
|
+
const params = RippleURLSearchParams('foo=bar&foo=baz&foo=qux');
|
|
86
86
|
|
|
87
87
|
<button onClick={() => params.delete('foo', 'baz')}>{'delete foo=baz'}</button>
|
|
88
88
|
<pre>{params.toString()}</pre>
|
|
@@ -107,8 +107,8 @@ describe('RippleURLSearchParams > mutation', () => {
|
|
|
107
107
|
|
|
108
108
|
it('handles delete when key does not exist', () => {
|
|
109
109
|
component URLTest() {
|
|
110
|
-
const params =
|
|
111
|
-
let reactiveSize =
|
|
110
|
+
const params = RippleURLSearchParams('foo=bar');
|
|
111
|
+
let reactiveSize = track(() => params.size);
|
|
112
112
|
|
|
113
113
|
<button onClick={() => params.delete('nonexistent')}>{'delete nonexistent'}</button>
|
|
114
114
|
<pre>{params.toString()}</pre>
|
|
@@ -133,7 +133,7 @@ describe('RippleURLSearchParams > mutation', () => {
|
|
|
133
133
|
|
|
134
134
|
it('handles set operation with reactivity', () => {
|
|
135
135
|
component URLTest() {
|
|
136
|
-
const params =
|
|
136
|
+
const params = RippleURLSearchParams('foo=bar');
|
|
137
137
|
|
|
138
138
|
<button onClick={() => params.set('foo', 'updated')}>{'update foo'}</button>
|
|
139
139
|
<button onClick={() => params.set('baz', 'qux')}>{'add baz'}</button>
|
|
@@ -167,8 +167,8 @@ describe('RippleURLSearchParams > mutation', () => {
|
|
|
167
167
|
|
|
168
168
|
it('handles set with multiple existing values', () => {
|
|
169
169
|
component URLTest() {
|
|
170
|
-
const params =
|
|
171
|
-
let allFoo =
|
|
170
|
+
const params = RippleURLSearchParams('foo=bar&foo=baz&foo=qux');
|
|
171
|
+
let allFoo = track(() => params.getAll('foo'));
|
|
172
172
|
|
|
173
173
|
<button onClick={() => params.set('foo', 'single')}>{'set foo'}</button>
|
|
174
174
|
<pre>{params.toString()}</pre>
|
|
@@ -193,8 +193,8 @@ describe('RippleURLSearchParams > mutation', () => {
|
|
|
193
193
|
|
|
194
194
|
it('handles set when value is the same', () => {
|
|
195
195
|
component URLTest() {
|
|
196
|
-
const params =
|
|
197
|
-
let reactiveString =
|
|
196
|
+
const params = RippleURLSearchParams('foo=bar');
|
|
197
|
+
let reactiveString = track(() => params.toString());
|
|
198
198
|
|
|
199
199
|
<button onClick={() => params.set('foo', 'bar')}>{'set same value'}</button>
|
|
200
200
|
<pre>{@reactiveString}</pre>
|
|
@@ -218,7 +218,7 @@ describe('RippleURLSearchParams > mutation', () => {
|
|
|
218
218
|
|
|
219
219
|
it('handles sort operation with reactivity', () => {
|
|
220
220
|
component URLTest() {
|
|
221
|
-
const params =
|
|
221
|
+
const params = RippleURLSearchParams('z=last&a=first&m=middle');
|
|
222
222
|
|
|
223
223
|
<button onClick={() => params.sort()}>{'sort'}</button>
|
|
224
224
|
<pre>{params.toString()}</pre>
|
|
@@ -240,7 +240,7 @@ describe('RippleURLSearchParams > mutation', () => {
|
|
|
240
240
|
|
|
241
241
|
it('handles clearing all params via delete', () => {
|
|
242
242
|
component URLTest() {
|
|
243
|
-
const url =
|
|
243
|
+
const url = RippleURL('https://example.com?foo=bar&baz=qux');
|
|
244
244
|
const params = url.searchParams;
|
|
245
245
|
|
|
246
246
|
<button
|
|
@@ -275,7 +275,7 @@ describe('RippleURLSearchParams > mutation', () => {
|
|
|
275
275
|
|
|
276
276
|
it('handles multiple operations in sequence', () => {
|
|
277
277
|
component URLTest() {
|
|
278
|
-
const params =
|
|
278
|
+
const params = RippleURLSearchParams();
|
|
279
279
|
|
|
280
280
|
<button
|
|
281
281
|
onClick={() => {
|
|
@@ -311,8 +311,8 @@ describe('RippleURLSearchParams > mutation', () => {
|
|
|
311
311
|
|
|
312
312
|
it('handles duplicate keys with different values', () => {
|
|
313
313
|
component URLTest() {
|
|
314
|
-
const params =
|
|
315
|
-
let tags =
|
|
314
|
+
const params = RippleURLSearchParams();
|
|
315
|
+
let tags = track(() => params.getAll('tag'));
|
|
316
316
|
|
|
317
317
|
<button onClick={() => params.append('tag', 'javascript')}>{'add js'}</button>
|
|
318
318
|
<button onClick={() => params.append('tag', 'typescript')}>{'add ts'}</button>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { flushSync } from 'ripple';
|
|
1
|
+
import { RippleURL, RippleURLSearchParams, flushSync, track } from 'ripple';
|
|
2
2
|
|
|
3
3
|
describe('RippleURLSearchParams > retrieval', () => {
|
|
4
4
|
it('handles get operation with reactivity', () => {
|
|
5
5
|
component URLTest() {
|
|
6
|
-
const params =
|
|
7
|
-
let foo =
|
|
8
|
-
let baz =
|
|
6
|
+
const params = RippleURLSearchParams('foo=bar&baz=qux');
|
|
7
|
+
let foo = track(() => params.get('foo'));
|
|
8
|
+
let baz = track(() => params.get('baz'));
|
|
9
9
|
|
|
10
10
|
<button onClick={() => params.set('foo', 'updated')}>{'update foo'}</button>
|
|
11
11
|
<pre>{@foo}</pre>
|
|
@@ -30,8 +30,8 @@ describe('RippleURLSearchParams > retrieval', () => {
|
|
|
30
30
|
|
|
31
31
|
it('handles get for nonexistent key', () => {
|
|
32
32
|
component URLTest() {
|
|
33
|
-
const params =
|
|
34
|
-
let nonexistent =
|
|
33
|
+
const params = RippleURLSearchParams('foo=bar');
|
|
34
|
+
let nonexistent = track(() => params.get('nonexistent'));
|
|
35
35
|
|
|
36
36
|
<pre>{String(@nonexistent)}</pre>
|
|
37
37
|
}
|
|
@@ -43,8 +43,8 @@ describe('RippleURLSearchParams > retrieval', () => {
|
|
|
43
43
|
|
|
44
44
|
it('handles getAll operation with reactivity', () => {
|
|
45
45
|
component URLTest() {
|
|
46
|
-
const params =
|
|
47
|
-
let allFoo =
|
|
46
|
+
const params = RippleURLSearchParams('foo=bar&foo=baz');
|
|
47
|
+
let allFoo = track(() => params.getAll('foo'));
|
|
48
48
|
|
|
49
49
|
<button onClick={() => params.append('foo', 'qux')}>{'append foo'}</button>
|
|
50
50
|
<pre>{JSON.stringify(@allFoo)}</pre>
|
|
@@ -66,9 +66,9 @@ describe('RippleURLSearchParams > retrieval', () => {
|
|
|
66
66
|
|
|
67
67
|
it('handles has operation with reactivity', () => {
|
|
68
68
|
component URLTest() {
|
|
69
|
-
const params =
|
|
70
|
-
let hasFoo =
|
|
71
|
-
let hasBaz =
|
|
69
|
+
const params = RippleURLSearchParams('foo=bar');
|
|
70
|
+
let hasFoo = track(() => params.has('foo'));
|
|
71
|
+
let hasBaz = track(() => params.has('baz'));
|
|
72
72
|
|
|
73
73
|
<button onClick={() => params.append('baz', 'qux')}>{'add baz'}</button>
|
|
74
74
|
<button onClick={() => params.delete('foo')}>{'delete foo'}</button>
|
|
@@ -102,9 +102,9 @@ describe('RippleURLSearchParams > retrieval', () => {
|
|
|
102
102
|
|
|
103
103
|
it('handles has with specific value', () => {
|
|
104
104
|
component URLTest() {
|
|
105
|
-
const params =
|
|
106
|
-
let hasBarValue =
|
|
107
|
-
let hasQuxValue =
|
|
105
|
+
const params = RippleURLSearchParams('foo=bar&foo=baz');
|
|
106
|
+
let hasBarValue = track(() => params.has('foo', 'bar'));
|
|
107
|
+
let hasQuxValue = track(() => params.has('foo', 'qux'));
|
|
108
108
|
|
|
109
109
|
<button onClick={() => params.append('foo', 'qux')}>{'add qux'}</button>
|
|
110
110
|
<pre>{@hasBarValue.toString()}</pre>
|
|
@@ -129,8 +129,8 @@ describe('RippleURLSearchParams > retrieval', () => {
|
|
|
129
129
|
|
|
130
130
|
it('handles size property with reactivity', () => {
|
|
131
131
|
component URLTest() {
|
|
132
|
-
const params =
|
|
133
|
-
let size =
|
|
132
|
+
const params = RippleURLSearchParams('foo=bar');
|
|
133
|
+
let size = track(() => params.size);
|
|
134
134
|
|
|
135
135
|
<button onClick={() => params.append('baz', 'qux')}>{'add'}</button>
|
|
136
136
|
<button onClick={() => params.delete('foo')}>{'delete'}</button>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { flushSync } from 'ripple';
|
|
1
|
+
import { RippleURL, RippleURLSearchParams, flushSync, track } from 'ripple';
|
|
2
2
|
|
|
3
3
|
describe('RippleURLSearchParams > serialization', () => {
|
|
4
4
|
it('handles toString method with reactivity', () => {
|
|
5
5
|
component URLTest() {
|
|
6
|
-
const params =
|
|
7
|
-
let string =
|
|
6
|
+
const params = RippleURLSearchParams('foo=bar');
|
|
7
|
+
let string = track(() => params.toString());
|
|
8
8
|
|
|
9
9
|
<button onClick={() => params.append('baz', 'qux')}>{'add'}</button>
|
|
10
10
|
<pre>{@string}</pre>
|
|
@@ -26,7 +26,7 @@ describe('RippleURLSearchParams > serialization', () => {
|
|
|
26
26
|
|
|
27
27
|
it('handles special characters encoding', () => {
|
|
28
28
|
component URLTest() {
|
|
29
|
-
const params =
|
|
29
|
+
const params = RippleURLSearchParams();
|
|
30
30
|
|
|
31
31
|
<button onClick={() => params.set('key', 'value with spaces')}>{'add spaces'}</button>
|
|
32
32
|
<button onClick={() => params.set('special', '!@#$%^&*()')}>{'add special'}</button>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { flushSync } from 'ripple';
|
|
1
|
+
import { RippleURL, flushSync } from 'ripple';
|
|
2
2
|
|
|
3
3
|
describe('RippleURLSearchParams > RippleURL integration', () => {
|
|
4
4
|
it('integrates with RippleURL', () => {
|
|
5
5
|
component URLTest() {
|
|
6
|
-
const url =
|
|
6
|
+
const url = RippleURL('https://example.com?foo=bar');
|
|
7
7
|
const params = url.searchParams;
|
|
8
8
|
|
|
9
9
|
<button onClick={() => params.append('baz', 'qux')}>{'add param'}</button>
|
|
@@ -31,7 +31,7 @@ describe('RippleURLSearchParams > RippleURL integration', () => {
|
|
|
31
31
|
|
|
32
32
|
it('handles empty search string in URL', () => {
|
|
33
33
|
component URLTest() {
|
|
34
|
-
const url =
|
|
34
|
+
const url = RippleURL('https://example.com');
|
|
35
35
|
const params = url.searchParams;
|
|
36
36
|
|
|
37
37
|
<button onClick={() => params.append('foo', 'bar')}>{'add first param'}</button>
|
|
@@ -25,19 +25,13 @@ const serverOutDir = join(__dirname, 'compiled', 'server');
|
|
|
25
25
|
* @returns {string} - Transformed code with server-compatible imports
|
|
26
26
|
*/
|
|
27
27
|
function transformServerImports(code) {
|
|
28
|
-
// Replace `import {
|
|
29
|
-
// Replace `import { Portal } from 'ripple'` with server version
|
|
28
|
+
// Replace `import { ... } from 'ripple'` with server version
|
|
30
29
|
// Use 'ripple/server' which always points to the server runtime,
|
|
31
30
|
// bypassing the browser/default condition resolution
|
|
32
|
-
|
|
33
|
-
/import\s*\{\
|
|
34
|
-
|
|
31
|
+
return code.replace(
|
|
32
|
+
/import\s*\{([^}]+)\}\s*from\s*['"]ripple['"]/g,
|
|
33
|
+
(match, specifiers) => `import {${specifiers}} from 'ripple/server'`,
|
|
35
34
|
);
|
|
36
|
-
transformed = transformed.replace(
|
|
37
|
-
/import\s*\{\s*Portal\s*\}\s*from\s*['"]ripple['"]/g,
|
|
38
|
-
"import { Portal } from 'ripple/server'",
|
|
39
|
-
);
|
|
40
|
-
return transformed;
|
|
41
35
|
}
|
|
42
36
|
|
|
43
37
|
function buildComponents() {
|
|
@@ -238,7 +238,7 @@ function Header(__anchor, _, __block) {
|
|
|
238
238
|
_$_.pop_component();
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
function Actions(__anchor,
|
|
241
|
+
function Actions(__anchor, { playgroundVisible = false }, __block) {
|
|
242
242
|
_$_.push_component();
|
|
243
243
|
|
|
244
244
|
var div_8 = root_15();
|
|
@@ -256,7 +256,7 @@ function Actions(__anchor, __props, __block) {
|
|
|
256
256
|
};
|
|
257
257
|
|
|
258
258
|
_$_.if(node_5, (__render) => {
|
|
259
|
-
if (
|
|
259
|
+
if (playgroundVisible) __render(consequent);
|
|
260
260
|
});
|
|
261
261
|
}
|
|
262
262
|
|
|
@@ -267,7 +267,7 @@ function Actions(__anchor, __props, __block) {
|
|
|
267
267
|
_$_.pop_component();
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
function Layout(__anchor,
|
|
270
|
+
function Layout(__anchor, { children }, __block) {
|
|
271
271
|
_$_.push_component();
|
|
272
272
|
|
|
273
273
|
var main_1 = root_17();
|
|
@@ -278,7 +278,7 @@ function Layout(__anchor, __props, __block) {
|
|
|
278
278
|
{
|
|
279
279
|
var node_6 = _$_.child(div_9);
|
|
280
280
|
|
|
281
|
-
|
|
281
|
+
children(node_6, {}, _$_.active_block);
|
|
282
282
|
_$_.pop(div_9);
|
|
283
283
|
}
|
|
284
284
|
}
|
|
@@ -9,6 +9,8 @@ var root_4 = _$_.template(`<div><button class="toggle"> </button></div>`, 0);
|
|
|
9
9
|
var root_5 = _$_.template(`<button class="child-btn"> </button>`, 0);
|
|
10
10
|
var root_6 = _$_.template(`<div><!><span class="count"> </span></div>`, 0);
|
|
11
11
|
|
|
12
|
+
import { track } from 'ripple';
|
|
13
|
+
|
|
12
14
|
export function ClickCounter(__anchor, _, __block) {
|
|
13
15
|
_$_.push_component();
|
|
14
16
|
|
|
@@ -64,6 +64,8 @@ var root_58 = _$_.template(`<button class="swap">Swap First and Last</button><ul
|
|
|
64
64
|
var root_61 = _$_.template(`<li> </li>`, 0);
|
|
65
65
|
var root_60 = _$_.template(`<button class="reverse">Reverse</button><ul></ul>`, 1, 2);
|
|
66
66
|
|
|
67
|
+
import { track } from 'ripple';
|
|
68
|
+
|
|
67
69
|
export function StaticForLoop(__anchor, _, __block) {
|
|
68
70
|
_$_.push_component();
|
|
69
71
|
|
|
@@ -15,12 +15,14 @@ var root_11 = _$_.template(`<meta name="author" content="Test Author">`, 0);
|
|
|
15
15
|
var root_10 = _$_.template(`<div>Content</div>`, 0);
|
|
16
16
|
var root_12 = _$_.template(`<div>Styled content</div>`, 0);
|
|
17
17
|
|
|
18
|
+
import { track } from 'ripple';
|
|
19
|
+
|
|
18
20
|
export function StaticTitle(__anchor, _, __block) {
|
|
19
21
|
_$_.push_component();
|
|
20
22
|
|
|
21
23
|
var div_1 = root();
|
|
22
24
|
|
|
23
|
-
_$_.head('
|
|
25
|
+
_$_.head('qwqurq', (__anchor) => {
|
|
24
26
|
_$_.document.title = 'Static Test Title';
|
|
25
27
|
});
|
|
26
28
|
|
|
@@ -44,7 +46,7 @@ export function ReactiveTitle(__anchor, _, __block) {
|
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
_$_.head('
|
|
49
|
+
_$_.head('1h8nm28', (__anchor) => {
|
|
48
50
|
_$_.render(() => {
|
|
49
51
|
_$_.document.title = _$_.get(title);
|
|
50
52
|
});
|
|
@@ -63,7 +65,7 @@ export function MultipleHeadElements(__anchor, _, __block) {
|
|
|
63
65
|
|
|
64
66
|
var div_3 = root_2();
|
|
65
67
|
|
|
66
|
-
_$_.head('
|
|
68
|
+
_$_.head('9v67ol', (__anchor) => {
|
|
67
69
|
var fragment = root_3();
|
|
68
70
|
|
|
69
71
|
_$_.document.title = 'Page Title';
|
|
@@ -87,7 +89,7 @@ export function ReactiveMetaTags(__anchor, _, __block) {
|
|
|
87
89
|
_$_.pop(div_4);
|
|
88
90
|
}
|
|
89
91
|
|
|
90
|
-
_$_.head('
|
|
92
|
+
_$_.head('166unm', (__anchor) => {
|
|
91
93
|
var meta_1 = root_5();
|
|
92
94
|
|
|
93
95
|
_$_.document.title = 'My Page';
|
|
@@ -115,7 +117,7 @@ export function TitleWithTemplate(__anchor, _, __block) {
|
|
|
115
117
|
_$_.pop(div_5);
|
|
116
118
|
}
|
|
117
119
|
|
|
118
|
-
_$_.head('
|
|
120
|
+
_$_.head('3o3mh2', (__anchor) => {
|
|
119
121
|
_$_.render(() => {
|
|
120
122
|
_$_.document.title = `Hello ${_$_.get(name)}!`;
|
|
121
123
|
});
|
|
@@ -134,7 +136,7 @@ export function EmptyTitle(__anchor, _, __block) {
|
|
|
134
136
|
|
|
135
137
|
var div_6 = root_7();
|
|
136
138
|
|
|
137
|
-
_$_.head('
|
|
139
|
+
_$_.head('kwo3k6', (__anchor) => {
|
|
138
140
|
_$_.document.title = '';
|
|
139
141
|
});
|
|
140
142
|
|
|
@@ -155,7 +157,7 @@ export function ConditionalTitle(__anchor, _, __block) {
|
|
|
155
157
|
_$_.pop(div_7);
|
|
156
158
|
}
|
|
157
159
|
|
|
158
|
-
_$_.head('
|
|
160
|
+
_$_.head('c2i5xr', (__anchor) => {
|
|
159
161
|
_$_.render(() => {
|
|
160
162
|
_$_.document.title = _$_.get(showPrefix) ? 'App - ' + _$_.get(title) : _$_.get(title);
|
|
161
163
|
});
|
|
@@ -186,7 +188,7 @@ export function ComputedTitle(__anchor, _, __block) {
|
|
|
186
188
|
}
|
|
187
189
|
}
|
|
188
190
|
|
|
189
|
-
_$_.head('
|
|
191
|
+
_$_.head('1h2z3z5', (__anchor) => {
|
|
190
192
|
_$_.render(() => {
|
|
191
193
|
_$_.document.title = prefix + _$_.get(count);
|
|
192
194
|
});
|
|
@@ -205,11 +207,11 @@ export function MultipleHeadBlocks(__anchor, _, __block) {
|
|
|
205
207
|
|
|
206
208
|
var div_9 = root_10();
|
|
207
209
|
|
|
208
|
-
_$_.head('
|
|
210
|
+
_$_.head('14rv3le', (__anchor) => {
|
|
209
211
|
_$_.document.title = 'First Head';
|
|
210
212
|
});
|
|
211
213
|
|
|
212
|
-
_$_.head('
|
|
214
|
+
_$_.head('1eh1mn5', (__anchor) => {
|
|
213
215
|
var meta_2 = root_11();
|
|
214
216
|
|
|
215
217
|
_$_.append(__anchor, meta_2);
|
|
@@ -224,7 +226,7 @@ export function HeadWithStyle(__anchor, _, __block) {
|
|
|
224
226
|
|
|
225
227
|
var div_10 = root_12();
|
|
226
228
|
|
|
227
|
-
_$_.head('
|
|
229
|
+
_$_.head('1dxk6yg', (__anchor) => {
|
|
228
230
|
_$_.document.title = 'Styled Page';
|
|
229
231
|
});
|
|
230
232
|
|
|
@@ -7,7 +7,9 @@ var root_1 = _$_.template(`<div class="content"><!></div>`, 0);
|
|
|
7
7
|
var root_4 = _$_.template(`<!>`, 1, 1);
|
|
8
8
|
var root_3 = _$_.template(`<!>`, 1, 1);
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
import { track } from 'ripple';
|
|
11
|
+
|
|
12
|
+
export function Layout(__anchor, { children }, __block) {
|
|
11
13
|
_$_.push_component();
|
|
12
14
|
|
|
13
15
|
var div_1 = root();
|
|
@@ -19,7 +21,7 @@ export function Layout(__anchor, __props, __block) {
|
|
|
19
21
|
{
|
|
20
22
|
var node = _$_.child(main_1);
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
children(node, {}, _$_.active_block);
|
|
23
25
|
_$_.pop(main_1);
|
|
24
26
|
}
|
|
25
27
|
}
|