ripple 0.3.8 → 0.3.10
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 +19 -0
- package/package.json +2 -2
- package/src/compiler/phases/1-parse/index.js +38 -172
- package/src/compiler/phases/2-analyze/index.js +308 -115
- package/src/compiler/phases/2-analyze/prune.js +13 -5
- package/src/compiler/phases/3-transform/client/index.js +197 -213
- package/src/compiler/phases/3-transform/segments.js +0 -7
- package/src/compiler/phases/3-transform/server/index.js +77 -170
- package/src/compiler/types/acorn.d.ts +1 -1
- package/src/compiler/types/estree.d.ts +1 -1
- package/src/compiler/types/import.d.ts +0 -2
- package/src/compiler/types/index.d.ts +14 -18
- package/src/compiler/types/parse.d.ts +3 -9
- package/src/compiler/utils.js +154 -21
- package/src/runtime/element.js +39 -0
- package/src/runtime/index-client.js +2 -13
- package/src/runtime/index-server.js +2 -2
- package/src/runtime/internal/client/bindings.js +3 -1
- package/src/runtime/internal/client/composite.js +11 -6
- package/src/runtime/internal/client/events.js +1 -1
- package/src/runtime/internal/client/expression.js +218 -0
- package/src/runtime/internal/client/head.js +3 -4
- package/src/runtime/internal/client/index.js +4 -1
- package/src/runtime/internal/client/portal.js +12 -6
- package/src/runtime/internal/client/runtime.js +0 -52
- package/src/runtime/internal/server/index.js +57 -56
- package/tests/client/basic/basic.components.test.ripple +85 -87
- package/tests/client/basic/basic.errors.test.ripple +28 -4
- package/tests/client/basic/basic.reactivity.test.ripple +10 -155
- package/tests/client/basic/basic.rendering.test.ripple +23 -8
- package/tests/client/capture-error.js +12 -0
- package/tests/client/compiler/compiler.basic.test.ripple +107 -18
- package/tests/client/composite/composite.props.test.ripple +5 -9
- package/tests/client/composite/composite.reactivity.test.ripple +35 -36
- package/tests/client/composite/composite.render.test.ripple +45 -13
- package/tests/client/css/global-additional-cases.test.ripple +3 -3
- package/tests/client/dynamic-elements.test.ripple +3 -4
- package/tests/client/lazy-destructuring.test.ripple +69 -12
- package/tests/client/svg.test.ripple +4 -4
- package/tests/hydration/basic.test.js +23 -0
- package/tests/hydration/compiled/client/basic.js +118 -66
- package/tests/hydration/compiled/client/composite.js +90 -37
- package/tests/hydration/compiled/client/events.js +18 -18
- package/tests/hydration/compiled/client/for.js +62 -62
- package/tests/hydration/compiled/client/head.js +10 -10
- package/tests/hydration/compiled/client/hmr.js +13 -10
- package/tests/hydration/compiled/client/html.js +274 -236
- package/tests/hydration/compiled/client/if-children.js +41 -35
- package/tests/hydration/compiled/client/if.js +2 -2
- package/tests/hydration/compiled/client/mixed-control-flow.js +12 -12
- package/tests/hydration/compiled/client/nested-control-flow.js +46 -46
- package/tests/hydration/compiled/client/portal.js +8 -8
- package/tests/hydration/compiled/client/reactivity.js +14 -14
- package/tests/hydration/compiled/client/return.js +2 -2
- package/tests/hydration/compiled/client/try.js +4 -4
- package/tests/hydration/compiled/server/basic.js +64 -31
- package/tests/hydration/compiled/server/composite.js +62 -29
- package/tests/hydration/compiled/server/hmr.js +24 -37
- package/tests/hydration/compiled/server/html.js +472 -611
- package/tests/hydration/compiled/server/if-children.js +77 -103
- package/tests/hydration/compiled/server/portal.js +8 -8
- package/tests/hydration/components/basic.ripple +15 -5
- package/tests/hydration/components/composite.ripple +13 -1
- package/tests/hydration/components/hmr.ripple +1 -3
- package/tests/hydration/components/html.ripple +13 -35
- package/tests/hydration/components/if-children.ripple +4 -8
- package/tests/hydration/composite.test.js +11 -0
- package/tests/server/basic.attributes.test.ripple +50 -0
- package/tests/server/basic.components.test.ripple +22 -28
- package/tests/server/basic.test.ripple +12 -0
- package/tests/server/compiler.test.ripple +43 -4
- package/tests/server/composite.props.test.ripple +5 -9
- package/tests/server/dynamic-elements.test.ripple +3 -4
- package/tests/server/lazy-destructuring.test.ripple +68 -12
- package/tests/server/style-identifier.test.ripple +2 -4
- package/tsconfig.typecheck.json +4 -0
- package/types/index.d.ts +9 -21
- package/tests/client/__snapshots__/tracked-expression.test.ripple.snap +0 -34
- package/tests/client/tracked-expression.test.ripple +0 -26
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropsWithExtras } from 'ripple';
|
|
2
|
-
import { createRefKey, flushSync, track
|
|
2
|
+
import { createRefKey, flushSync, track } from 'ripple';
|
|
3
3
|
|
|
4
4
|
describe('dynamic DOM elements', () => {
|
|
5
5
|
it('renders static dynamic element', () => {
|
|
@@ -405,14 +405,13 @@ describe('dynamic DOM elements', () => {
|
|
|
405
405
|
});
|
|
406
406
|
|
|
407
407
|
it('handles spread attributes with class and CSS scoping ', () => {
|
|
408
|
-
component DynamicButton(
|
|
408
|
+
component DynamicButton(&{ ...rest }: PropsWithExtras<{
|
|
409
409
|
class: string;
|
|
410
410
|
id: string;
|
|
411
411
|
onClick: EventListener;
|
|
412
412
|
}>) {
|
|
413
413
|
const tag = track('button');
|
|
414
|
-
|
|
415
|
-
<@tag {...rest.value}>{rest.value.class}</@tag>
|
|
414
|
+
<@tag {...rest}>{rest.class}</@tag>
|
|
416
415
|
|
|
417
416
|
<style>
|
|
418
417
|
.even {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { flushSync, track
|
|
1
|
+
import { flushSync, track } from 'ripple';
|
|
2
2
|
|
|
3
3
|
describe('lazy destructuring', () => {
|
|
4
4
|
it('supports tracked value getter and setter', () => {
|
|
@@ -126,6 +126,38 @@ describe('lazy destructuring', () => {
|
|
|
126
126
|
expect(container.querySelector('pre')!.textContent).toBe('1');
|
|
127
127
|
});
|
|
128
128
|
|
|
129
|
+
it('supports nested lazy destructuring in non-lazy component params', () => {
|
|
130
|
+
component Inner({ something: &[first, second] }) {
|
|
131
|
+
first = second.value + 1;
|
|
132
|
+
<pre>{`${first}-${second.value}`}</pre>
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
component Test() {
|
|
136
|
+
<Inner something={track(1)} />
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
render(Test);
|
|
140
|
+
expect(container.querySelector('pre')!.textContent).toBe('2-2');
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
it(
|
|
144
|
+
'preserves lazy getter/setter behavior for nested rest destructuring in non-lazy component params',
|
|
145
|
+
() => {
|
|
146
|
+
component Inner({ values: [head, ...&{ length: rest_length, 0: first_rest }] }) {
|
|
147
|
+
const before = `${first_rest?.value ?? 'nil'}-${rest_length}`;
|
|
148
|
+
rest_length = 0;
|
|
149
|
+
<pre>{`${head}-${before}-${first_rest?.value ?? 'nil'}-${rest_length}`}</pre>
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
component Test() {
|
|
153
|
+
<Inner values={[10, track(20), track(30)]} />
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
render(Test);
|
|
157
|
+
expect(container.querySelector('pre')!.textContent).toBe('10-20-2-nil-0');
|
|
158
|
+
},
|
|
159
|
+
);
|
|
160
|
+
|
|
129
161
|
it('supports lazy destructuring in function params', () => {
|
|
130
162
|
component Test() {
|
|
131
163
|
function getInfo(&{ x, y }: { x: number; y: number }) {
|
|
@@ -139,6 +171,42 @@ describe('lazy destructuring', () => {
|
|
|
139
171
|
expect(container.querySelector('pre')!.textContent).toBe('10');
|
|
140
172
|
});
|
|
141
173
|
|
|
174
|
+
it('supports nested lazy destructuring in non-lazy function params', () => {
|
|
175
|
+
component Test() {
|
|
176
|
+
const something = track(1);
|
|
177
|
+
|
|
178
|
+
function getInfo({ something: &[first, second] }) {
|
|
179
|
+
first = second.value + 1;
|
|
180
|
+
return `${first}-${second.value}`;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const result = getInfo({ something });
|
|
184
|
+
<pre>{result}</pre>
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
render(Test);
|
|
188
|
+
expect(container.querySelector('pre')!.textContent).toBe('2-2');
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
it(
|
|
192
|
+
'preserves lazy getter/setter behavior for nested rest destructuring in non-lazy function params',
|
|
193
|
+
() => {
|
|
194
|
+
component Test() {
|
|
195
|
+
function summarize({ values: [head, ...&{ length: rest_length, 0: first_rest }] }) {
|
|
196
|
+
const before = `${first_rest?.value ?? 'nil'}-${rest_length}`;
|
|
197
|
+
rest_length = 0;
|
|
198
|
+
return `${head}-${before}-${first_rest?.value ?? 'nil'}-${rest_length}`;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const result = summarize({ values: [5, track(6), track(7)] });
|
|
202
|
+
<pre>{result}</pre>
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
render(Test);
|
|
206
|
+
expect(container.querySelector('pre')!.textContent).toBe('5-6-2-nil-0');
|
|
207
|
+
},
|
|
208
|
+
);
|
|
209
|
+
|
|
142
210
|
it('supports let lazy destructuring with assignment writeback', () => {
|
|
143
211
|
component Test() {
|
|
144
212
|
const obj = { a: 1, b: 2 };
|
|
@@ -205,17 +273,6 @@ describe('lazy destructuring', () => {
|
|
|
205
273
|
expect(container.querySelector('pre')!.textContent).toBe('1-99');
|
|
206
274
|
});
|
|
207
275
|
|
|
208
|
-
it('does not apply the track tuple fast-path to trackSplit lazy arrays', () => {
|
|
209
|
-
component Test() {
|
|
210
|
-
const source = { a: 1, b: 2, c: 3 };
|
|
211
|
-
let [a, b, rest] = trackSplit(source, ['a', 'b']);
|
|
212
|
-
<pre>{`${a.value}-${b.value}-${rest.value.c}`}</pre>
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
render(Test);
|
|
216
|
-
expect(container.querySelector('pre')!.textContent).toBe('1-2-3');
|
|
217
|
-
});
|
|
218
|
-
|
|
219
276
|
it('supports rest destructuring from iterable array-like tracked values', () => {
|
|
220
277
|
component Test() {
|
|
221
278
|
let &[value, ...rest] = track(0);
|
|
@@ -234,7 +234,7 @@ describe('SVG namespace handling', () => {
|
|
|
234
234
|
it('should render SVG with children as svg elements', () => {
|
|
235
235
|
component SVG({ children }: PropsWithChildren<{}>) {
|
|
236
236
|
<svg width={20} height={20} fill="blue" viewBox="0 0 30 10" preserveAspectRatio="none">
|
|
237
|
-
|
|
237
|
+
{children}
|
|
238
238
|
</svg>
|
|
239
239
|
}
|
|
240
240
|
|
|
@@ -285,7 +285,7 @@ describe('SVG namespace handling', () => {
|
|
|
285
285
|
it('should render SVG with children as dynamic elements', () => {
|
|
286
286
|
component SVG({ children }: PropsWithChildren<{}>) {
|
|
287
287
|
<svg width={20} height={20} fill="blue" viewBox="0 0 30 10" preserveAspectRatio="none">
|
|
288
|
-
|
|
288
|
+
{children}
|
|
289
289
|
</svg>
|
|
290
290
|
}
|
|
291
291
|
|
|
@@ -308,7 +308,7 @@ describe('SVG namespace handling', () => {
|
|
|
308
308
|
it('should render SVG with children as dynamic components', () => {
|
|
309
309
|
component SVG({ children }: PropsWithChildren<{}>) {
|
|
310
310
|
<svg width={20} height={20} fill="blue" viewBox="0 0 30 10" preserveAspectRatio="none">
|
|
311
|
-
|
|
311
|
+
{children}
|
|
312
312
|
</svg>
|
|
313
313
|
}
|
|
314
314
|
|
|
@@ -336,7 +336,7 @@ describe('SVG namespace handling', () => {
|
|
|
336
336
|
component SVG({ children }: PropsWithChildren<{}>) {
|
|
337
337
|
let &[tag] = track('svg');
|
|
338
338
|
<@tag width={100} height={50} fill="red" viewBox="0 0 30 10" preserveAspectRatio="none">
|
|
339
|
-
|
|
339
|
+
{children}
|
|
340
340
|
</@tag>
|
|
341
341
|
}
|
|
342
342
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { flushSync } from 'ripple';
|
|
2
3
|
import { hydrateComponent, container } from '../setup-hydration.js';
|
|
3
4
|
|
|
4
5
|
// Import server-compiled components
|
|
@@ -59,6 +60,28 @@ describe('hydration > basic', () => {
|
|
|
59
60
|
expect(container.innerHTML).toBeHtml('<div>42</div><span>COMPUTED</span>');
|
|
60
61
|
});
|
|
61
62
|
|
|
63
|
+
it('restores text children after hydrating away initial server text', async () => {
|
|
64
|
+
await hydrateComponent(
|
|
65
|
+
ServerComponents.TextPropWithToggle,
|
|
66
|
+
ClientComponents.TextPropWithToggle,
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
expect(container.querySelector('.text-prop')?.textContent).toBe('');
|
|
70
|
+
|
|
71
|
+
/** @type {any} */ (container.querySelector('.show-text'))?.click();
|
|
72
|
+
flushSync();
|
|
73
|
+
|
|
74
|
+
expect(container.querySelector('.text-prop')?.textContent).toBe('hello');
|
|
75
|
+
|
|
76
|
+
// Verify text is placed between hydration markers, not before anchor
|
|
77
|
+
const innerHTML = container.querySelector('.text-prop')?.innerHTML ?? '';
|
|
78
|
+
const textIndex = innerHTML.indexOf('hello');
|
|
79
|
+
const startMarker = innerHTML.indexOf('<!--[-->');
|
|
80
|
+
const endMarker = innerHTML.indexOf('<!--]-->');
|
|
81
|
+
expect(textIndex).toBeGreaterThan(startMarker);
|
|
82
|
+
expect(textIndex).toBeLessThan(endMarker);
|
|
83
|
+
});
|
|
84
|
+
|
|
62
85
|
it('hydrates static child component followed by sibling content', async () => {
|
|
63
86
|
await hydrateComponent(
|
|
64
87
|
ServerComponents.StaticChildWithSiblings,
|
|
@@ -13,19 +13,23 @@ var root_8 = _$_.template(`<!><!>`, 1, 2);
|
|
|
13
13
|
var root_9 = _$_.template(`<div> </div>`, 0);
|
|
14
14
|
var root_10 = _$_.template(`<!>`, 1, 1);
|
|
15
15
|
var root_11 = _$_.template(`<div> </div><span> </span>`, 1, 2);
|
|
16
|
-
var root_12 = _$_.template(`<
|
|
17
|
-
var root_13 = _$_.template(`<!><
|
|
18
|
-
var root_14 = _$_.template(`<h1 class="sr-only">
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var root_23 = _$_.template(`<
|
|
28
|
-
var root_24 = _$_.template(`<
|
|
16
|
+
var root_12 = _$_.template(`<div class="text-prop"><!></div>`, 0);
|
|
17
|
+
var root_13 = _$_.template(`<!><button class="show-text">Show</button>`, 1, 2);
|
|
18
|
+
var root_14 = _$_.template(`<h1 class="sr-only">heading</h1><p class="subtitle">first paragraph</p><p class="subtitle">second paragraph</p>`, 1, 3);
|
|
19
|
+
var root_15 = _$_.template(`<!><span class="sibling1"> </span><span class="sibling2"> </span>`, 1, 3);
|
|
20
|
+
var root_16 = _$_.template(`<h1 class="sr-only">Ripple</h1><img src="/images/logo.png" alt="Logo" class="logo"><p class="subtitle">the elegant TypeScript UI framework</p>`, 1, 3);
|
|
21
|
+
var root_18 = _$_.template(`<a href="/playground" class="playground-link">Playground</a>`, 0);
|
|
22
|
+
var root_17 = _$_.template(`<div class="social-links"><a href="https://github.com" class="github-link">GitHub</a><a href="https://discord.com" class="discord-link">Discord</a><!></div>`, 0);
|
|
23
|
+
var root_19 = _$_.template(`<main><div class="container"><!></div></main>`, 0);
|
|
24
|
+
var root_20 = _$_.template(`<div class="content"><p>Some content here</p></div>`, 0);
|
|
25
|
+
var root_22 = _$_.template(`<!><!><!><!>`, 1, 4);
|
|
26
|
+
var root_21 = _$_.template(`<!>`, 1, 1);
|
|
27
|
+
var root_23 = _$_.template(`<footer class="last-child">I am the last child</footer>`, 0);
|
|
28
|
+
var root_24 = _$_.template(`<div class="wrapper"><h1>Header</h1><p>Some content</p><!></div>`, 0);
|
|
29
|
+
var root_25 = _$_.template(`<div class="inner"><span>Inner text</span><!></div>`, 0);
|
|
30
|
+
var root_26 = _$_.template(`<section class="outer"><h2>Section title</h2><!></section>`, 0);
|
|
31
|
+
|
|
32
|
+
import { track } from 'ripple';
|
|
29
33
|
|
|
30
34
|
export function StaticText(__anchor, _, __block) {
|
|
31
35
|
_$_.push_component();
|
|
@@ -129,13 +133,13 @@ export function Greeting(__anchor, props, __block) {
|
|
|
129
133
|
var div_6 = root_9();
|
|
130
134
|
|
|
131
135
|
{
|
|
132
|
-
var
|
|
136
|
+
var expression = _$_.child(div_6, true);
|
|
133
137
|
|
|
134
138
|
_$_.pop(div_6);
|
|
135
139
|
}
|
|
136
140
|
|
|
137
141
|
_$_.render(() => {
|
|
138
|
-
_$_.set_text(
|
|
142
|
+
_$_.set_text(expression, 'Hello ' + _$_.with_scope(__block, () => String(props.name)));
|
|
139
143
|
});
|
|
140
144
|
|
|
141
145
|
_$_.append(__anchor, div_6);
|
|
@@ -157,21 +161,21 @@ export function ExpressionContent(__anchor, _, __block) {
|
|
|
157
161
|
_$_.push_component();
|
|
158
162
|
|
|
159
163
|
const value = 42;
|
|
160
|
-
const
|
|
164
|
+
const label = 'computed';
|
|
161
165
|
var fragment_4 = root_11();
|
|
162
166
|
var div_7 = _$_.first_child_frag(fragment_4);
|
|
163
167
|
|
|
164
168
|
{
|
|
165
|
-
var
|
|
169
|
+
var expression_1 = _$_.child(div_7, true);
|
|
166
170
|
|
|
167
|
-
|
|
171
|
+
expression_1.nodeValue = value;
|
|
168
172
|
_$_.pop(div_7);
|
|
169
173
|
}
|
|
170
174
|
|
|
171
175
|
var span_2 = _$_.sibling(div_7);
|
|
172
176
|
|
|
173
177
|
{
|
|
174
|
-
var
|
|
178
|
+
var expression_2 = _$_.child(span_2, true);
|
|
175
179
|
|
|
176
180
|
_$_.pop(span_2);
|
|
177
181
|
}
|
|
@@ -179,20 +183,63 @@ export function ExpressionContent(__anchor, _, __block) {
|
|
|
179
183
|
_$_.next();
|
|
180
184
|
|
|
181
185
|
_$_.render(() => {
|
|
182
|
-
_$_.set_text(
|
|
186
|
+
_$_.set_text(expression_2, _$_.with_scope(__block, () => label.toUpperCase()));
|
|
183
187
|
});
|
|
184
188
|
|
|
185
189
|
_$_.append(__anchor, fragment_4, true);
|
|
186
190
|
_$_.pop_component();
|
|
187
191
|
}
|
|
188
192
|
|
|
193
|
+
function TextProp(__anchor, __props, __block) {
|
|
194
|
+
_$_.push_component();
|
|
195
|
+
|
|
196
|
+
var div_8 = root_12();
|
|
197
|
+
|
|
198
|
+
{
|
|
199
|
+
var expression_3 = _$_.child(div_8);
|
|
200
|
+
|
|
201
|
+
_$_.pop(div_8);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
_$_.render(() => {
|
|
205
|
+
_$_.expression(expression_3, () => __props.children);
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
_$_.append(__anchor, div_8);
|
|
209
|
+
_$_.pop_component();
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export function TextPropWithToggle(__anchor, _, __block) {
|
|
213
|
+
_$_.push_component();
|
|
214
|
+
|
|
215
|
+
let lazy = _$_.track(false, void 0, void 0, __block);
|
|
216
|
+
var fragment_5 = root_13();
|
|
217
|
+
var node_4 = _$_.first_child_frag(fragment_5);
|
|
218
|
+
|
|
219
|
+
TextProp(
|
|
220
|
+
node_4,
|
|
221
|
+
{
|
|
222
|
+
get children() {
|
|
223
|
+
return _$_.normalize_children(_$_.get(lazy) ? 'hello' : '');
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
_$_.active_block
|
|
227
|
+
);
|
|
228
|
+
|
|
229
|
+
var button_1 = _$_.sibling(node_4);
|
|
230
|
+
|
|
231
|
+
button_1.__click = () => _$_.set(lazy, true);
|
|
232
|
+
_$_.append(__anchor, fragment_5);
|
|
233
|
+
_$_.pop_component();
|
|
234
|
+
}
|
|
235
|
+
|
|
189
236
|
function StaticHeader(__anchor, _, __block) {
|
|
190
237
|
_$_.push_component();
|
|
191
238
|
|
|
192
|
-
var
|
|
239
|
+
var fragment_6 = root_14();
|
|
193
240
|
|
|
194
241
|
_$_.next(2);
|
|
195
|
-
_$_.append(__anchor,
|
|
242
|
+
_$_.append(__anchor, fragment_6, true);
|
|
196
243
|
_$_.pop_component();
|
|
197
244
|
}
|
|
198
245
|
|
|
@@ -200,89 +247,92 @@ export function StaticChildWithSiblings(__anchor, _, __block) {
|
|
|
200
247
|
_$_.push_component();
|
|
201
248
|
|
|
202
249
|
const foo = 'bar';
|
|
203
|
-
var
|
|
204
|
-
var
|
|
250
|
+
var fragment_7 = root_15();
|
|
251
|
+
var node_5 = _$_.first_child_frag(fragment_7);
|
|
205
252
|
|
|
206
|
-
StaticHeader(
|
|
253
|
+
StaticHeader(node_5, {}, _$_.active_block);
|
|
207
254
|
|
|
208
|
-
var span_3 = _$_.sibling(
|
|
255
|
+
var span_3 = _$_.sibling(node_5);
|
|
209
256
|
|
|
210
257
|
{
|
|
211
|
-
var
|
|
258
|
+
var expression_4 = _$_.child(span_3, true);
|
|
212
259
|
|
|
213
|
-
|
|
260
|
+
expression_4.nodeValue = foo;
|
|
214
261
|
_$_.pop(span_3);
|
|
215
262
|
}
|
|
216
263
|
|
|
217
264
|
var span_4 = _$_.sibling(span_3);
|
|
218
265
|
|
|
219
266
|
{
|
|
220
|
-
var
|
|
267
|
+
var expression_5 = _$_.child(span_4, true);
|
|
221
268
|
|
|
222
|
-
|
|
269
|
+
expression_5.nodeValue = foo;
|
|
223
270
|
_$_.pop(span_4);
|
|
224
271
|
}
|
|
225
272
|
|
|
226
273
|
_$_.next();
|
|
227
|
-
_$_.append(__anchor,
|
|
274
|
+
_$_.append(__anchor, fragment_7, true);
|
|
228
275
|
_$_.pop_component();
|
|
229
276
|
}
|
|
230
277
|
|
|
231
278
|
function Header(__anchor, _, __block) {
|
|
232
279
|
_$_.push_component();
|
|
233
280
|
|
|
234
|
-
var
|
|
281
|
+
var fragment_8 = root_16();
|
|
235
282
|
|
|
236
283
|
_$_.next(2);
|
|
237
|
-
_$_.append(__anchor,
|
|
284
|
+
_$_.append(__anchor, fragment_8, true);
|
|
238
285
|
_$_.pop_component();
|
|
239
286
|
}
|
|
240
287
|
|
|
241
288
|
function Actions(__anchor, { playgroundVisible = false }, __block) {
|
|
242
289
|
_$_.push_component();
|
|
243
290
|
|
|
244
|
-
var
|
|
291
|
+
var div_9 = root_17();
|
|
245
292
|
|
|
246
293
|
{
|
|
247
|
-
var a_2 = _$_.child(
|
|
294
|
+
var a_2 = _$_.child(div_9);
|
|
248
295
|
var a_1 = _$_.sibling(a_2);
|
|
249
|
-
var
|
|
296
|
+
var node_6 = _$_.sibling(a_1);
|
|
250
297
|
|
|
251
298
|
{
|
|
252
299
|
var consequent = (__anchor) => {
|
|
253
|
-
var a_3 =
|
|
300
|
+
var a_3 = root_18();
|
|
254
301
|
|
|
255
302
|
_$_.append(__anchor, a_3);
|
|
256
303
|
};
|
|
257
304
|
|
|
258
|
-
_$_.if(
|
|
305
|
+
_$_.if(node_6, (__render) => {
|
|
259
306
|
if (playgroundVisible) __render(consequent);
|
|
260
307
|
});
|
|
261
308
|
}
|
|
262
309
|
|
|
263
|
-
_$_.pop(
|
|
310
|
+
_$_.pop(div_9);
|
|
264
311
|
}
|
|
265
312
|
|
|
266
|
-
_$_.append(__anchor,
|
|
313
|
+
_$_.append(__anchor, div_9);
|
|
267
314
|
_$_.pop_component();
|
|
268
315
|
}
|
|
269
316
|
|
|
270
317
|
function Layout(__anchor, { children }, __block) {
|
|
271
318
|
_$_.push_component();
|
|
272
319
|
|
|
273
|
-
var main_1 =
|
|
320
|
+
var main_1 = root_19();
|
|
274
321
|
|
|
275
322
|
{
|
|
276
|
-
var
|
|
323
|
+
var div_10 = _$_.child(main_1);
|
|
277
324
|
|
|
278
325
|
{
|
|
279
|
-
var
|
|
326
|
+
var expression_6 = _$_.child(div_10);
|
|
280
327
|
|
|
281
|
-
|
|
282
|
-
_$_.pop(div_9);
|
|
328
|
+
_$_.pop(div_10);
|
|
283
329
|
}
|
|
284
330
|
}
|
|
285
331
|
|
|
332
|
+
_$_.render(() => {
|
|
333
|
+
_$_.expression(expression_6, () => children);
|
|
334
|
+
});
|
|
335
|
+
|
|
286
336
|
_$_.append(__anchor, main_1);
|
|
287
337
|
_$_.pop_component();
|
|
288
338
|
}
|
|
@@ -290,26 +340,26 @@ function Layout(__anchor, { children }, __block) {
|
|
|
290
340
|
function Content(__anchor, _, __block) {
|
|
291
341
|
_$_.push_component();
|
|
292
342
|
|
|
293
|
-
var
|
|
343
|
+
var div_11 = root_20();
|
|
294
344
|
|
|
295
|
-
_$_.append(__anchor,
|
|
345
|
+
_$_.append(__anchor, div_11);
|
|
296
346
|
_$_.pop_component();
|
|
297
347
|
}
|
|
298
348
|
|
|
299
349
|
export function WebsiteIndex(__anchor, _, __block) {
|
|
300
350
|
_$_.push_component();
|
|
301
351
|
|
|
302
|
-
var
|
|
303
|
-
var node_7 = _$_.first_child_frag(
|
|
352
|
+
var fragment_9 = root_21();
|
|
353
|
+
var node_7 = _$_.first_child_frag(fragment_9);
|
|
304
354
|
|
|
305
355
|
Layout(
|
|
306
356
|
node_7,
|
|
307
357
|
{
|
|
308
|
-
children(__anchor, _, __block) {
|
|
358
|
+
children: _$_.ripple_element(function render_children(__anchor, _, __block) {
|
|
309
359
|
_$_.push_component();
|
|
310
360
|
|
|
311
|
-
var
|
|
312
|
-
var node_8 = _$_.first_child_frag(
|
|
361
|
+
var fragment_10 = root_22();
|
|
362
|
+
var node_8 = _$_.first_child_frag(fragment_10);
|
|
313
363
|
|
|
314
364
|
Header(node_8, {}, _$_.active_block);
|
|
315
365
|
|
|
@@ -324,21 +374,21 @@ export function WebsiteIndex(__anchor, _, __block) {
|
|
|
324
374
|
var node_11 = _$_.sibling(node_10);
|
|
325
375
|
|
|
326
376
|
Actions(node_11, { playgroundVisible: false }, _$_.active_block);
|
|
327
|
-
_$_.append(__anchor,
|
|
377
|
+
_$_.append(__anchor, fragment_10);
|
|
328
378
|
_$_.pop_component();
|
|
329
|
-
}
|
|
379
|
+
})
|
|
330
380
|
},
|
|
331
381
|
_$_.active_block
|
|
332
382
|
);
|
|
333
383
|
|
|
334
|
-
_$_.append(__anchor,
|
|
384
|
+
_$_.append(__anchor, fragment_9);
|
|
335
385
|
_$_.pop_component();
|
|
336
386
|
}
|
|
337
387
|
|
|
338
388
|
function LastChild(__anchor, _, __block) {
|
|
339
389
|
_$_.push_component();
|
|
340
390
|
|
|
341
|
-
var footer_1 =
|
|
391
|
+
var footer_1 = root_23();
|
|
342
392
|
|
|
343
393
|
_$_.append(__anchor, footer_1);
|
|
344
394
|
_$_.pop_component();
|
|
@@ -347,42 +397,42 @@ function LastChild(__anchor, _, __block) {
|
|
|
347
397
|
export function ComponentAsLastSibling(__anchor, _, __block) {
|
|
348
398
|
_$_.push_component();
|
|
349
399
|
|
|
350
|
-
var
|
|
400
|
+
var div_12 = root_24();
|
|
351
401
|
|
|
352
402
|
{
|
|
353
|
-
var h1_1 = _$_.child(
|
|
403
|
+
var h1_1 = _$_.child(div_12);
|
|
354
404
|
var p_1 = _$_.sibling(h1_1);
|
|
355
405
|
var node_12 = _$_.sibling(p_1);
|
|
356
406
|
|
|
357
407
|
LastChild(node_12, {}, _$_.active_block);
|
|
358
|
-
_$_.pop(
|
|
408
|
+
_$_.pop(div_12);
|
|
359
409
|
}
|
|
360
410
|
|
|
361
|
-
_$_.append(__anchor,
|
|
411
|
+
_$_.append(__anchor, div_12);
|
|
362
412
|
_$_.pop_component();
|
|
363
413
|
}
|
|
364
414
|
|
|
365
415
|
function InnerContent(__anchor, _, __block) {
|
|
366
416
|
_$_.push_component();
|
|
367
417
|
|
|
368
|
-
var
|
|
418
|
+
var div_13 = root_25();
|
|
369
419
|
|
|
370
420
|
{
|
|
371
|
-
var span_5 = _$_.child(
|
|
421
|
+
var span_5 = _$_.child(div_13);
|
|
372
422
|
var node_13 = _$_.sibling(span_5);
|
|
373
423
|
|
|
374
424
|
LastChild(node_13, {}, _$_.active_block);
|
|
375
|
-
_$_.pop(
|
|
425
|
+
_$_.pop(div_13);
|
|
376
426
|
}
|
|
377
427
|
|
|
378
|
-
_$_.append(__anchor,
|
|
428
|
+
_$_.append(__anchor, div_13);
|
|
379
429
|
_$_.pop_component();
|
|
380
430
|
}
|
|
381
431
|
|
|
382
432
|
export function NestedComponentAsLastSibling(__anchor, _, __block) {
|
|
383
433
|
_$_.push_component();
|
|
384
434
|
|
|
385
|
-
var section_1 =
|
|
435
|
+
var section_1 = root_26();
|
|
386
436
|
|
|
387
437
|
{
|
|
388
438
|
var h2_1 = _$_.child(section_1);
|
|
@@ -394,4 +444,6 @@ export function NestedComponentAsLastSibling(__anchor, _, __block) {
|
|
|
394
444
|
|
|
395
445
|
_$_.append(__anchor, section_1);
|
|
396
446
|
_$_.pop_component();
|
|
397
|
-
}
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
_$_.delegate(['click']);
|