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.
Files changed (128) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/package.json +2 -2
  3. package/src/compiler/identifier-utils.js +0 -2
  4. package/src/compiler/phases/1-parse/index.js +101 -195
  5. package/src/compiler/phases/2-analyze/index.js +82 -174
  6. package/src/compiler/phases/2-analyze/prune.js +2 -2
  7. package/src/compiler/phases/3-transform/client/index.js +174 -264
  8. package/src/compiler/phases/3-transform/segments.js +0 -22
  9. package/src/compiler/phases/3-transform/server/index.js +185 -42
  10. package/src/compiler/types/index.d.ts +14 -33
  11. package/src/compiler/utils.js +32 -20
  12. package/src/runtime/index-client.js +0 -17
  13. package/src/runtime/internal/client/bindings.js +118 -7
  14. package/src/runtime/internal/client/render.js +5 -1
  15. package/src/runtime/internal/client/runtime.js +1 -1
  16. package/src/runtime/internal/client/types.d.ts +4 -0
  17. package/tests/client/array/array.copy-within.test.ripple +7 -7
  18. package/tests/client/array/array.derived.test.ripple +24 -24
  19. package/tests/client/array/array.iteration.test.ripple +7 -7
  20. package/tests/client/array/array.mutations.test.ripple +17 -17
  21. package/tests/client/array/array.to-methods.test.ripple +4 -4
  22. package/tests/client/async-suspend.test.ripple +3 -3
  23. package/tests/client/basic/basic.attributes.test.ripple +31 -31
  24. package/tests/client/basic/basic.collections.test.ripple +6 -6
  25. package/tests/client/basic/basic.components.test.ripple +8 -8
  26. package/tests/client/basic/basic.errors.test.ripple +31 -34
  27. package/tests/client/basic/basic.events.test.ripple +11 -11
  28. package/tests/client/basic/basic.get-set.test.ripple +18 -18
  29. package/tests/client/basic/basic.reactivity.test.ripple +36 -36
  30. package/tests/client/basic/basic.rendering.test.ripple +7 -7
  31. package/tests/client/basic/basic.utilities.test.ripple +4 -4
  32. package/tests/client/boundaries.test.ripple +7 -7
  33. package/tests/client/compiler/__snapshots__/compiler.typescript.test.ripple.snap +24 -0
  34. package/tests/client/compiler/compiler.assignments.test.ripple +12 -10
  35. package/tests/client/compiler/compiler.basic.test.ripple +58 -60
  36. package/tests/client/compiler/compiler.tracked-access.test.ripple +14 -8
  37. package/tests/client/compiler/compiler.typescript.test.ripple +31 -0
  38. package/tests/client/composite/composite.dynamic-components.test.ripple +6 -6
  39. package/tests/client/composite/composite.props.test.ripple +9 -9
  40. package/tests/client/composite/composite.reactivity.test.ripple +23 -23
  41. package/tests/client/composite/composite.render.test.ripple +52 -4
  42. package/tests/client/computed-properties.test.ripple +3 -3
  43. package/tests/client/context.test.ripple +3 -3
  44. package/tests/client/css/global-additional-cases.test.ripple +5 -2
  45. package/tests/client/css/style-identifier.test.ripple +40 -49
  46. package/tests/client/date.test.ripple +39 -39
  47. package/tests/client/dynamic-elements.test.ripple +37 -37
  48. package/tests/client/events.test.ripple +25 -25
  49. package/tests/client/for.test.ripple +8 -8
  50. package/tests/client/head.test.ripple +7 -7
  51. package/tests/client/html.test.ripple +2 -2
  52. package/tests/client/input-value.test.ripple +376 -177
  53. package/tests/client/lazy-destructuring.test.ripple +185 -0
  54. package/tests/client/map.test.ripple +20 -20
  55. package/tests/client/media-query.test.ripple +4 -4
  56. package/tests/client/object.test.ripple +5 -5
  57. package/tests/client/portal.test.ripple +4 -4
  58. package/tests/client/ref.test.ripple +3 -3
  59. package/tests/client/return.test.ripple +17 -17
  60. package/tests/client/set.test.ripple +10 -10
  61. package/tests/client/svg.test.ripple +6 -5
  62. package/tests/client/switch.test.ripple +10 -10
  63. package/tests/client/tracked-expression.test.ripple +3 -1
  64. package/tests/client/try.test.ripple +4 -4
  65. package/tests/client/url/url.derived.test.ripple +6 -7
  66. package/tests/client/url/url.parsing.test.ripple +9 -9
  67. package/tests/client/url/url.partial-removal.test.ripple +9 -9
  68. package/tests/client/url/url.reactivity.test.ripple +16 -16
  69. package/tests/client/url/url.serialization.test.ripple +3 -3
  70. package/tests/client/url-search-params/url-search-params.derived.test.ripple +7 -8
  71. package/tests/client/url-search-params/url-search-params.initialization.test.ripple +6 -4
  72. package/tests/client/url-search-params/url-search-params.iteration.test.ripple +12 -12
  73. package/tests/client/url-search-params/url-search-params.mutation.test.ripple +18 -18
  74. package/tests/client/url-search-params/url-search-params.retrieval.test.ripple +16 -16
  75. package/tests/client/url-search-params/url-search-params.serialization.test.ripple +4 -4
  76. package/tests/client/url-search-params/url-search-params.tracked-url.test.ripple +3 -3
  77. package/tests/hydration/build-components.js +4 -10
  78. package/tests/hydration/compiled/client/basic.js +4 -4
  79. package/tests/hydration/compiled/client/events.js +2 -0
  80. package/tests/hydration/compiled/client/for.js +2 -0
  81. package/tests/hydration/compiled/client/head.js +13 -11
  82. package/tests/hydration/compiled/client/hmr.js +4 -2
  83. package/tests/hydration/compiled/client/html.js +82 -95
  84. package/tests/hydration/compiled/client/if-children.js +8 -9
  85. package/tests/hydration/compiled/client/if.js +2 -0
  86. package/tests/hydration/compiled/client/mixed-control-flow.js +4 -2
  87. package/tests/hydration/compiled/client/portal.js +1 -1
  88. package/tests/hydration/compiled/client/reactivity.js +2 -0
  89. package/tests/hydration/compiled/client/return.js +2 -0
  90. package/tests/hydration/compiled/client/switch.js +2 -0
  91. package/tests/hydration/compiled/server/composite.js +2 -2
  92. package/tests/hydration/compiled/server/events.js +2 -0
  93. package/tests/hydration/compiled/server/for.js +2 -0
  94. package/tests/hydration/compiled/server/head.js +13 -11
  95. package/tests/hydration/compiled/server/hmr.js +2 -0
  96. package/tests/hydration/compiled/server/html.js +2 -0
  97. package/tests/hydration/compiled/server/if-children.js +2 -0
  98. package/tests/hydration/compiled/server/if.js +2 -0
  99. package/tests/hydration/compiled/server/mixed-control-flow.js +2 -0
  100. package/tests/hydration/compiled/server/portal.js +1 -1
  101. package/tests/hydration/compiled/server/reactivity.js +2 -0
  102. package/tests/hydration/compiled/server/return.js +2 -0
  103. package/tests/hydration/compiled/server/switch.js +2 -0
  104. package/tests/hydration/components/composite.ripple +1 -1
  105. package/tests/hydration/components/events.ripple +10 -8
  106. package/tests/hydration/components/for.ripple +22 -20
  107. package/tests/hydration/components/head.ripple +8 -6
  108. package/tests/hydration/components/hmr.ripple +3 -1
  109. package/tests/hydration/components/html.ripple +3 -1
  110. package/tests/hydration/components/if-children.ripple +9 -7
  111. package/tests/hydration/components/if.ripple +7 -5
  112. package/tests/hydration/components/mixed-control-flow.ripple +5 -3
  113. package/tests/hydration/components/portal.ripple +2 -2
  114. package/tests/hydration/components/reactivity.ripple +11 -9
  115. package/tests/hydration/components/return.ripple +13 -11
  116. package/tests/hydration/components/switch.ripple +6 -4
  117. package/tests/server/__snapshots__/compiler.test.ripple.snap +22 -0
  118. package/tests/server/await.test.ripple +2 -2
  119. package/tests/server/basic.attributes.test.ripple +21 -19
  120. package/tests/server/basic.components.test.ripple +5 -4
  121. package/tests/server/basic.test.ripple +21 -20
  122. package/tests/server/compiler.test.ripple +36 -5
  123. package/tests/server/composite.props.test.ripple +7 -6
  124. package/tests/server/context.test.ripple +3 -1
  125. package/tests/server/dynamic-elements.test.ripple +24 -24
  126. package/tests/server/head.test.ripple +7 -5
  127. package/tests/server/style-identifier.test.ripple +95 -16
  128. 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 = #ripple.urlSearchParams('foo=bar');
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 = #ripple.urlSearchParams('foo=bar');
32
- let allFoo = #ripple.track(() => params.getAll('foo'));
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 = #ripple.urlSearchParams('foo=bar&baz=qux');
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 = #ripple.urlSearchParams('foo=bar&foo=baz&foo=qux');
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 = #ripple.urlSearchParams('foo=bar');
111
- let reactiveSize = #ripple.track(() => params.size);
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 = #ripple.urlSearchParams('foo=bar');
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 = #ripple.urlSearchParams('foo=bar&foo=baz&foo=qux');
171
- let allFoo = #ripple.track(() => params.getAll('foo'));
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 = #ripple.urlSearchParams('foo=bar');
197
- let reactiveString = #ripple.track(() => params.toString());
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 = #ripple.urlSearchParams('z=last&a=first&m=middle');
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 = #ripple.url('https://example.com?foo=bar&baz=qux');
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 = #ripple.urlSearchParams();
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 = #ripple.urlSearchParams();
315
- let tags = #ripple.track(() => params.getAll('tag'));
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 = #ripple.urlSearchParams('foo=bar&baz=qux');
7
- let foo = #ripple.track(() => params.get('foo'));
8
- let baz = #ripple.track(() => params.get('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 = #ripple.urlSearchParams('foo=bar');
34
- let nonexistent = #ripple.track(() => params.get('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 = #ripple.urlSearchParams('foo=bar&foo=baz');
47
- let allFoo = #ripple.track(() => params.getAll('foo'));
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 = #ripple.urlSearchParams('foo=bar');
70
- let hasFoo = #ripple.track(() => params.has('foo'));
71
- let hasBaz = #ripple.track(() => params.has('baz'));
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 = #ripple.urlSearchParams('foo=bar&foo=baz');
106
- let hasBarValue = #ripple.track(() => params.has('foo', 'bar'));
107
- let hasQuxValue = #ripple.track(() => params.has('foo', 'qux'));
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 = #ripple.urlSearchParams('foo=bar');
133
- let size = #ripple.track(() => params.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 = #ripple.urlSearchParams('foo=bar');
7
- let string = #ripple.track(() => params.toString());
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 = #ripple.urlSearchParams();
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 = #ripple.url('https://example.com?foo=bar');
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 = #ripple.url('https://example.com');
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 { track } from 'ripple'` with server version
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
- let transformed = code.replace(
33
- /import\s*\{\s*track\s*\}\s*from\s*['"]ripple['"]/g,
34
- "import { track } from 'ripple/server'",
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, __props, __block) {
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 (_$_.fallback(__props.playgroundVisible, false)) __render(consequent);
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, __props, __block) {
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
- _$_.composite(() => __props.children, node_6, {});
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('df6gdi', (__anchor) => {
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('13wropz', (__anchor) => {
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('jbv4cs', (__anchor) => {
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('t794k2', (__anchor) => {
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('betaue', (__anchor) => {
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('11sq4o6', (__anchor) => {
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('xxkmhn', (__anchor) => {
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('1hj0can', (__anchor) => {
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('15ucmy3', (__anchor) => {
210
+ _$_.head('14rv3le', (__anchor) => {
209
211
  _$_.document.title = 'First Head';
210
212
  });
211
213
 
212
- _$_.head('1xolofp', (__anchor) => {
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('q5et2p', (__anchor) => {
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
- export function Layout(__anchor, __props, __block) {
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
- _$_.composite(() => __props.children, node, {});
24
+ children(node, {}, _$_.active_block);
23
25
  _$_.pop(main_1);
24
26
  }
25
27
  }