ripple 0.3.9 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/package.json +2 -2
- package/src/compiler/errors.js +1 -1
- package/src/compiler/index.d.ts +3 -1
- package/src/compiler/phases/1-parse/index.js +195 -23
- package/src/compiler/phases/2-analyze/index.js +266 -108
- package/src/compiler/phases/2-analyze/prune.js +13 -5
- package/src/compiler/phases/3-transform/client/index.js +304 -80
- package/src/compiler/phases/3-transform/server/index.js +108 -43
- package/src/compiler/types/index.d.ts +28 -3
- package/src/compiler/types/parse.d.ts +3 -1
- package/src/compiler/utils.js +275 -1
- package/src/runtime/element.js +39 -0
- package/src/runtime/index-client.js +14 -4
- package/src/runtime/internal/client/composite.js +10 -6
- package/src/runtime/internal/client/expression.js +280 -0
- package/src/runtime/internal/client/index.js +4 -0
- package/src/runtime/internal/client/portal.js +12 -6
- package/src/runtime/internal/server/index.js +26 -1
- package/src/utils/builders.js +30 -0
- package/tests/client/basic/__snapshots__/basic.rendering.test.ripple.snap +1 -0
- package/tests/client/basic/basic.components.test.ripple +85 -87
- package/tests/client/basic/basic.errors.test.ripple +4 -8
- package/tests/client/basic/basic.rendering.test.ripple +27 -10
- package/tests/client/capture-error.js +12 -0
- package/tests/client/compiler/compiler.basic.test.ripple +76 -6
- package/tests/client/composite/composite.props.test.ripple +1 -3
- package/tests/client/composite/composite.render.test.ripple +91 -13
- package/tests/client/css/global-additional-cases.test.ripple +3 -3
- package/tests/client/return.test.ripple +101 -0
- package/tests/client/svg.test.ripple +4 -4
- package/tests/client/tsx.test.ripple +486 -0
- package/tests/hydration/basic.test.js +23 -0
- package/tests/hydration/compiled/client/basic.js +111 -75
- package/tests/hydration/compiled/client/composite.js +81 -46
- package/tests/hydration/compiled/client/events.js +18 -63
- package/tests/hydration/compiled/client/for.js +90 -183
- package/tests/hydration/compiled/client/head.js +10 -25
- package/tests/hydration/compiled/client/hmr.js +10 -13
- package/tests/hydration/compiled/client/html.js +251 -380
- package/tests/hydration/compiled/client/if-children.js +35 -45
- package/tests/hydration/compiled/client/if.js +2 -2
- package/tests/hydration/compiled/client/mixed-control-flow.js +24 -72
- package/tests/hydration/compiled/client/nested-control-flow.js +115 -391
- package/tests/hydration/compiled/client/portal.js +8 -20
- package/tests/hydration/compiled/client/reactivity.js +14 -47
- package/tests/hydration/compiled/client/return.js +2 -5
- 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 +25 -8
- package/tests/server/composite.props.test.ripple +1 -3
- package/tests/server/style-identifier.test.ripple +2 -4
- package/tests/utils/compiler-compat-config.test.js +38 -0
- package/tests/utils/vite-plugin-config.test.js +113 -0
- package/tsconfig.typecheck.json +2 -1
- package/types/index.d.ts +8 -11
|
@@ -29,14 +29,11 @@ export function SimplePortal(__anchor, _, __block) {
|
|
|
29
29
|
return typeof document !== 'undefined' ? document.body : null;
|
|
30
30
|
},
|
|
31
31
|
|
|
32
|
-
children(__anchor,
|
|
33
|
-
_$_.push_component();
|
|
34
|
-
|
|
32
|
+
children: _$_.ripple_element(function render_children(__anchor, __block) {
|
|
35
33
|
var div_2 = root_1();
|
|
36
34
|
|
|
37
35
|
_$_.append(__anchor, div_2);
|
|
38
|
-
|
|
39
|
-
}
|
|
36
|
+
})
|
|
40
37
|
},
|
|
41
38
|
_$_.active_block
|
|
42
39
|
);
|
|
@@ -73,14 +70,11 @@ export function ConditionalPortal(__anchor, _, __block) {
|
|
|
73
70
|
return typeof document !== 'undefined' ? document.body : null;
|
|
74
71
|
},
|
|
75
72
|
|
|
76
|
-
children(__anchor,
|
|
77
|
-
_$_.push_component();
|
|
78
|
-
|
|
73
|
+
children: _$_.ripple_element(function render_children(__anchor, __block) {
|
|
79
74
|
var div_4 = root_4();
|
|
80
75
|
|
|
81
76
|
_$_.append(__anchor, div_4);
|
|
82
|
-
|
|
83
|
-
}
|
|
77
|
+
})
|
|
84
78
|
},
|
|
85
79
|
_$_.active_block
|
|
86
80
|
);
|
|
@@ -116,14 +110,11 @@ export function PortalWithMainContent(__anchor, _, __block) {
|
|
|
116
110
|
return typeof document !== 'undefined' ? document.body : null;
|
|
117
111
|
},
|
|
118
112
|
|
|
119
|
-
children(__anchor,
|
|
120
|
-
_$_.push_component();
|
|
121
|
-
|
|
113
|
+
children: _$_.ripple_element(function render_children(__anchor, __block) {
|
|
122
114
|
var div_7 = root_6();
|
|
123
115
|
|
|
124
116
|
_$_.append(__anchor, div_7);
|
|
125
|
-
|
|
126
|
-
}
|
|
117
|
+
})
|
|
127
118
|
},
|
|
128
119
|
_$_.active_block
|
|
129
120
|
);
|
|
@@ -154,14 +145,11 @@ export function NestedContentWithPortal(__anchor, _, __block) {
|
|
|
154
145
|
return typeof document !== 'undefined' ? document.body : null;
|
|
155
146
|
},
|
|
156
147
|
|
|
157
|
-
children(__anchor,
|
|
158
|
-
_$_.push_component();
|
|
159
|
-
|
|
148
|
+
children: _$_.ripple_element(function render_children(__anchor, __block) {
|
|
160
149
|
var div_10 = root_8();
|
|
161
150
|
|
|
162
151
|
_$_.append(__anchor, div_10);
|
|
163
|
-
|
|
164
|
-
}
|
|
152
|
+
})
|
|
165
153
|
},
|
|
166
154
|
_$_.active_block
|
|
167
155
|
);
|
|
@@ -17,15 +17,12 @@ export function TrackedState(__anchor, _, __block) {
|
|
|
17
17
|
var div_1 = root();
|
|
18
18
|
|
|
19
19
|
{
|
|
20
|
-
var
|
|
20
|
+
var expression = _$_.child(div_1, true);
|
|
21
21
|
|
|
22
|
+
_$_.expression(expression, () => _$_.get(lazy));
|
|
22
23
|
_$_.pop(div_1);
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
_$_.render(() => {
|
|
26
|
-
_$_.set_text(text, _$_.get(lazy));
|
|
27
|
-
});
|
|
28
|
-
|
|
29
26
|
_$_.append(__anchor, div_1);
|
|
30
27
|
_$_.pop_component();
|
|
31
28
|
}
|
|
@@ -40,16 +37,13 @@ export function CounterWithInitial(__anchor, props, __block) {
|
|
|
40
37
|
var span_1 = _$_.child(div_2);
|
|
41
38
|
|
|
42
39
|
{
|
|
43
|
-
var
|
|
40
|
+
var expression_1 = _$_.child(span_1, true);
|
|
44
41
|
|
|
42
|
+
_$_.expression(expression_1, () => _$_.get(lazy_1));
|
|
45
43
|
_$_.pop(span_1);
|
|
46
44
|
}
|
|
47
45
|
}
|
|
48
46
|
|
|
49
|
-
_$_.render(() => {
|
|
50
|
-
_$_.set_text(text_1, _$_.get(lazy_1));
|
|
51
|
-
});
|
|
52
|
-
|
|
53
47
|
_$_.append(__anchor, div_2);
|
|
54
48
|
_$_.pop_component();
|
|
55
49
|
}
|
|
@@ -74,15 +68,12 @@ export function ComputedValues(__anchor, _, __block) {
|
|
|
74
68
|
var div_3 = root_3();
|
|
75
69
|
|
|
76
70
|
{
|
|
77
|
-
var
|
|
71
|
+
var expression_2 = _$_.child(div_3, true);
|
|
78
72
|
|
|
73
|
+
_$_.expression(expression_2, sum);
|
|
79
74
|
_$_.pop(div_3);
|
|
80
75
|
}
|
|
81
76
|
|
|
82
|
-
_$_.render(() => {
|
|
83
|
-
_$_.set_text(text_2, sum());
|
|
84
|
-
});
|
|
85
|
-
|
|
86
77
|
_$_.append(__anchor, div_3);
|
|
87
78
|
_$_.pop_component();
|
|
88
79
|
}
|
|
@@ -97,52 +88,31 @@ export function MultipleTracked(__anchor, _, __block) {
|
|
|
97
88
|
var div_4 = _$_.first_child_frag(fragment_1);
|
|
98
89
|
|
|
99
90
|
{
|
|
100
|
-
var
|
|
91
|
+
var expression_3 = _$_.child(div_4, true);
|
|
101
92
|
|
|
93
|
+
_$_.expression(expression_3, () => _$_.get(lazy_4));
|
|
102
94
|
_$_.pop(div_4);
|
|
103
95
|
}
|
|
104
96
|
|
|
105
97
|
var div_5 = _$_.sibling(div_4);
|
|
106
98
|
|
|
107
99
|
{
|
|
108
|
-
var
|
|
100
|
+
var expression_4 = _$_.child(div_5, true);
|
|
109
101
|
|
|
102
|
+
_$_.expression(expression_4, () => _$_.get(lazy_5));
|
|
110
103
|
_$_.pop(div_5);
|
|
111
104
|
}
|
|
112
105
|
|
|
113
106
|
var div_6 = _$_.sibling(div_5);
|
|
114
107
|
|
|
115
108
|
{
|
|
116
|
-
var
|
|
109
|
+
var expression_5 = _$_.child(div_6, true);
|
|
117
110
|
|
|
111
|
+
_$_.expression(expression_5, () => _$_.get(lazy_6));
|
|
118
112
|
_$_.pop(div_6);
|
|
119
113
|
}
|
|
120
114
|
|
|
121
115
|
_$_.next(2);
|
|
122
|
-
|
|
123
|
-
_$_.render(
|
|
124
|
-
(__prev) => {
|
|
125
|
-
var __a = _$_.get(lazy_4);
|
|
126
|
-
|
|
127
|
-
if (__prev.a !== __a) {
|
|
128
|
-
_$_.set_text(text_3, __prev.a = __a);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
var __b = _$_.get(lazy_5);
|
|
132
|
-
|
|
133
|
-
if (__prev.b !== __b) {
|
|
134
|
-
_$_.set_text(text_4, __prev.b = __b);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
var __c = _$_.get(lazy_6);
|
|
138
|
-
|
|
139
|
-
if (__prev.c !== __c) {
|
|
140
|
-
_$_.set_text(text_5, __prev.c = __c);
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
{ a: ' ', b: ' ', c: ' ' }
|
|
144
|
-
);
|
|
145
|
-
|
|
146
116
|
_$_.append(__anchor, fragment_1, true);
|
|
147
117
|
_$_.pop_component();
|
|
148
118
|
}
|
|
@@ -156,15 +126,12 @@ export function DerivedState(__anchor, _, __block) {
|
|
|
156
126
|
var div_7 = root_5();
|
|
157
127
|
|
|
158
128
|
{
|
|
159
|
-
var
|
|
129
|
+
var expression_6 = _$_.child(div_7, true);
|
|
160
130
|
|
|
131
|
+
_$_.expression(expression_6, fullName);
|
|
161
132
|
_$_.pop(div_7);
|
|
162
133
|
}
|
|
163
134
|
|
|
164
|
-
_$_.render(() => {
|
|
165
|
-
_$_.set_text(text_6, fullName());
|
|
166
|
-
});
|
|
167
|
-
|
|
168
135
|
_$_.append(__anchor, div_7);
|
|
169
136
|
_$_.pop_component();
|
|
170
137
|
}
|
|
@@ -1709,15 +1709,12 @@ export function ReactiveOuterInnerReturns(__anchor, _, __block) {
|
|
|
1709
1709
|
var div_39 = root_113();
|
|
1710
1710
|
|
|
1711
1711
|
{
|
|
1712
|
-
var
|
|
1712
|
+
var expression = _$_.child(div_39, true);
|
|
1713
1713
|
|
|
1714
|
+
_$_.expression(expression, () => _$_.get(lazy_4) ? 'a-on rest' : 'a-off rest');
|
|
1714
1715
|
_$_.pop(div_39);
|
|
1715
1716
|
}
|
|
1716
1717
|
|
|
1717
|
-
_$_.render(() => {
|
|
1718
|
-
_$_.set_text(text, _$_.get(lazy_4) ? 'a-on rest' : 'a-off rest');
|
|
1719
|
-
});
|
|
1720
|
-
|
|
1721
1718
|
_$_.append(__anchor, div_39);
|
|
1722
1719
|
};
|
|
1723
1720
|
|
|
@@ -58,9 +58,9 @@ function AsyncList(__anchor, _, __block) {
|
|
|
58
58
|
var li_1 = root_4();
|
|
59
59
|
|
|
60
60
|
{
|
|
61
|
-
var
|
|
61
|
+
var expression = _$_.child(li_1, true);
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
_$_.expression(expression, () => item);
|
|
64
64
|
_$_.pop(li_1);
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -118,9 +118,9 @@ function AsyncContent(__anchor, _, __block) {
|
|
|
118
118
|
var div_3 = root_8();
|
|
119
119
|
|
|
120
120
|
{
|
|
121
|
-
var
|
|
121
|
+
var expression_1 = _$_.child(div_3, true);
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
_$_.expression(expression_1, () => value);
|
|
124
124
|
_$_.pop(div_3);
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import * as _$_ from 'ripple/internal/server';
|
|
3
3
|
|
|
4
|
+
import { track } from 'ripple/server';
|
|
5
|
+
|
|
4
6
|
export function StaticText(__output) {
|
|
5
7
|
_$_.push_component();
|
|
6
8
|
__output.push('<div');
|
|
@@ -203,7 +205,7 @@ export function ExpressionContent(__output) {
|
|
|
203
205
|
_$_.push_component();
|
|
204
206
|
|
|
205
207
|
const value = 42;
|
|
206
|
-
const
|
|
208
|
+
const label = 'computed';
|
|
207
209
|
|
|
208
210
|
__output.push('<div');
|
|
209
211
|
__output.push('>');
|
|
@@ -217,13 +219,57 @@ export function ExpressionContent(__output) {
|
|
|
217
219
|
__output.push('>');
|
|
218
220
|
|
|
219
221
|
{
|
|
220
|
-
__output.push(_$_.escape(
|
|
222
|
+
__output.push(_$_.escape(label.toUpperCase()));
|
|
221
223
|
}
|
|
222
224
|
|
|
223
225
|
__output.push('</span>');
|
|
224
226
|
_$_.pop_component();
|
|
225
227
|
}
|
|
226
228
|
|
|
229
|
+
function TextProp(__output, __props) {
|
|
230
|
+
_$_.push_component();
|
|
231
|
+
__output.push('<div');
|
|
232
|
+
__output.push(' class="text-prop"');
|
|
233
|
+
__output.push('>');
|
|
234
|
+
|
|
235
|
+
{
|
|
236
|
+
_$_.render_expression(__output, __props.children);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
__output.push('</div>');
|
|
240
|
+
_$_.pop_component();
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export function TextPropWithToggle(__output) {
|
|
244
|
+
_$_.push_component();
|
|
245
|
+
|
|
246
|
+
let lazy = _$_.track(false);
|
|
247
|
+
|
|
248
|
+
{
|
|
249
|
+
const comp = TextProp;
|
|
250
|
+
|
|
251
|
+
const args = [
|
|
252
|
+
__output,
|
|
253
|
+
{
|
|
254
|
+
children: _$_.normalize_children(_$_.get(lazy) ? 'hello' : '')
|
|
255
|
+
}
|
|
256
|
+
];
|
|
257
|
+
|
|
258
|
+
comp(...args);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
__output.push('<button');
|
|
262
|
+
__output.push(' class="show-text"');
|
|
263
|
+
__output.push('>');
|
|
264
|
+
|
|
265
|
+
{
|
|
266
|
+
__output.push('Show');
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
__output.push('</button>');
|
|
270
|
+
_$_.pop_component();
|
|
271
|
+
}
|
|
272
|
+
|
|
227
273
|
function StaticHeader(__output) {
|
|
228
274
|
_$_.push_component();
|
|
229
275
|
__output.push('<h1');
|
|
@@ -366,39 +412,26 @@ function Actions(__output, { playgroundVisible = false }) {
|
|
|
366
412
|
_$_.pop_component();
|
|
367
413
|
}
|
|
368
414
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
415
|
+
function Layout(__output, { children }) {
|
|
416
|
+
_$_.push_component();
|
|
417
|
+
__output.push('<main');
|
|
418
|
+
__output.push('>');
|
|
419
|
+
|
|
420
|
+
{
|
|
421
|
+
__output.push('<div');
|
|
422
|
+
__output.push(' class="container"');
|
|
373
423
|
__output.push('>');
|
|
374
424
|
|
|
375
425
|
{
|
|
376
|
-
|
|
377
|
-
__output.push(' class="container"');
|
|
378
|
-
__output.push('>');
|
|
379
|
-
|
|
380
|
-
{
|
|
381
|
-
{
|
|
382
|
-
const comp = children;
|
|
383
|
-
const args = [__output, {}];
|
|
384
|
-
|
|
385
|
-
if (comp?.async) {
|
|
386
|
-
await comp(...args);
|
|
387
|
-
} else if (comp) {
|
|
388
|
-
comp(...args);
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
__output.push('</div>');
|
|
426
|
+
_$_.render_expression(__output, children);
|
|
394
427
|
}
|
|
395
428
|
|
|
396
|
-
__output.push('</
|
|
397
|
-
|
|
398
|
-
});
|
|
399
|
-
}
|
|
429
|
+
__output.push('</div>');
|
|
430
|
+
}
|
|
400
431
|
|
|
401
|
-
|
|
432
|
+
__output.push('</main>');
|
|
433
|
+
_$_.pop_component();
|
|
434
|
+
}
|
|
402
435
|
|
|
403
436
|
function Content(__output) {
|
|
404
437
|
_$_.push_component();
|
|
@@ -430,7 +463,7 @@ export function WebsiteIndex(__output) {
|
|
|
430
463
|
const args = [
|
|
431
464
|
__output,
|
|
432
465
|
{
|
|
433
|
-
children: function
|
|
466
|
+
children: _$_.ripple_element(function render_children(__output) {
|
|
434
467
|
_$_.push_component();
|
|
435
468
|
|
|
436
469
|
{
|
|
@@ -462,7 +495,7 @@ export function WebsiteIndex(__output) {
|
|
|
462
495
|
}
|
|
463
496
|
|
|
464
497
|
_$_.pop_component();
|
|
465
|
-
}
|
|
498
|
+
})
|
|
466
499
|
}
|
|
467
500
|
];
|
|
468
501
|
|
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import * as _$_ from 'ripple/internal/server';
|
|
3
3
|
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const comp = __props.children;
|
|
14
|
-
const args = [__output, {}];
|
|
15
|
-
|
|
16
|
-
if (comp?.async) {
|
|
17
|
-
await comp(...args);
|
|
18
|
-
} else if (comp) {
|
|
19
|
-
comp(...args);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
4
|
+
export function Layout(__output, __props) {
|
|
5
|
+
_$_.push_component();
|
|
6
|
+
__output.push('<div');
|
|
7
|
+
__output.push(' class="layout"');
|
|
8
|
+
__output.push('>');
|
|
9
|
+
|
|
10
|
+
{
|
|
11
|
+
_$_.render_expression(__output, __props.children);
|
|
12
|
+
}
|
|
23
13
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
});
|
|
14
|
+
__output.push('</div>');
|
|
15
|
+
_$_.pop_component();
|
|
27
16
|
}
|
|
28
17
|
|
|
29
|
-
|
|
18
|
+
export function TextWrappedLayout(__output, __props) {
|
|
19
|
+
_$_.push_component();
|
|
20
|
+
__output.push('<div');
|
|
21
|
+
__output.push(' class="layout"');
|
|
22
|
+
__output.push('>');
|
|
23
|
+
|
|
24
|
+
{
|
|
25
|
+
__output.push('before');
|
|
26
|
+
_$_.render_expression(__output, __props.children);
|
|
27
|
+
__output.push('after');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
__output.push('</div>');
|
|
31
|
+
_$_.pop_component();
|
|
32
|
+
}
|
|
30
33
|
|
|
31
34
|
export function SingleChild(__output) {
|
|
32
35
|
_$_.push_component();
|
|
@@ -85,7 +88,7 @@ export function LayoutWithSingleChild(__output) {
|
|
|
85
88
|
const args = [
|
|
86
89
|
__output,
|
|
87
90
|
{
|
|
88
|
-
children: function
|
|
91
|
+
children: _$_.ripple_element(function render_children(__output) {
|
|
89
92
|
_$_.push_component();
|
|
90
93
|
|
|
91
94
|
{
|
|
@@ -96,7 +99,7 @@ export function LayoutWithSingleChild(__output) {
|
|
|
96
99
|
}
|
|
97
100
|
|
|
98
101
|
_$_.pop_component();
|
|
99
|
-
}
|
|
102
|
+
})
|
|
100
103
|
}
|
|
101
104
|
];
|
|
102
105
|
|
|
@@ -115,7 +118,7 @@ export function LayoutWithMultipleChildren(__output) {
|
|
|
115
118
|
const args = [
|
|
116
119
|
__output,
|
|
117
120
|
{
|
|
118
|
-
children: function
|
|
121
|
+
children: _$_.ripple_element(function render_children(__output) {
|
|
119
122
|
_$_.push_component();
|
|
120
123
|
|
|
121
124
|
{
|
|
@@ -135,7 +138,7 @@ export function LayoutWithMultipleChildren(__output) {
|
|
|
135
138
|
|
|
136
139
|
__output.push('</div>');
|
|
137
140
|
_$_.pop_component();
|
|
138
|
-
}
|
|
141
|
+
})
|
|
139
142
|
}
|
|
140
143
|
];
|
|
141
144
|
|
|
@@ -154,7 +157,7 @@ export function LayoutWithMultiRootChild(__output) {
|
|
|
154
157
|
const args = [
|
|
155
158
|
__output,
|
|
156
159
|
{
|
|
157
|
-
children: function
|
|
160
|
+
children: _$_.ripple_element(function render_children(__output) {
|
|
158
161
|
_$_.push_component();
|
|
159
162
|
|
|
160
163
|
{
|
|
@@ -165,7 +168,37 @@ export function LayoutWithMultiRootChild(__output) {
|
|
|
165
168
|
}
|
|
166
169
|
|
|
167
170
|
_$_.pop_component();
|
|
168
|
-
}
|
|
171
|
+
})
|
|
172
|
+
}
|
|
173
|
+
];
|
|
174
|
+
|
|
175
|
+
comp(...args);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
_$_.pop_component();
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export function LayoutWithTextAroundChildren(__output) {
|
|
182
|
+
_$_.push_component();
|
|
183
|
+
|
|
184
|
+
{
|
|
185
|
+
const comp = TextWrappedLayout;
|
|
186
|
+
|
|
187
|
+
const args = [
|
|
188
|
+
__output,
|
|
189
|
+
{
|
|
190
|
+
children: _$_.ripple_element(function render_children(__output) {
|
|
191
|
+
_$_.push_component();
|
|
192
|
+
|
|
193
|
+
{
|
|
194
|
+
const comp = SingleChild;
|
|
195
|
+
const args = [__output, {}];
|
|
196
|
+
|
|
197
|
+
comp(...args);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
_$_.pop_component();
|
|
201
|
+
})
|
|
169
202
|
}
|
|
170
203
|
];
|
|
171
204
|
|
|
@@ -3,49 +3,36 @@ import * as _$_ from 'ripple/internal/server';
|
|
|
3
3
|
|
|
4
4
|
import { track } from 'ripple/server';
|
|
5
5
|
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export function Layout(__output, { children }) {
|
|
7
|
+
_$_.push_component();
|
|
8
|
+
__output.push('<div');
|
|
9
|
+
__output.push(' class="layout"');
|
|
10
|
+
__output.push('>');
|
|
11
|
+
|
|
12
|
+
{
|
|
13
|
+
__output.push('<nav');
|
|
14
|
+
__output.push(' class="nav"');
|
|
11
15
|
__output.push('>');
|
|
12
16
|
|
|
13
17
|
{
|
|
14
|
-
__output.push('
|
|
15
|
-
|
|
16
|
-
__output.push('>');
|
|
17
|
-
|
|
18
|
-
{
|
|
19
|
-
__output.push('Navigation');
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
__output.push('</nav>');
|
|
23
|
-
__output.push('<main');
|
|
24
|
-
__output.push(' class="main"');
|
|
25
|
-
__output.push('>');
|
|
26
|
-
|
|
27
|
-
{
|
|
28
|
-
{
|
|
29
|
-
const comp = children;
|
|
30
|
-
const args = [__output, {}];
|
|
18
|
+
__output.push('Navigation');
|
|
19
|
+
}
|
|
31
20
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
21
|
+
__output.push('</nav>');
|
|
22
|
+
__output.push('<main');
|
|
23
|
+
__output.push(' class="main"');
|
|
24
|
+
__output.push('>');
|
|
39
25
|
|
|
40
|
-
|
|
26
|
+
{
|
|
27
|
+
_$_.render_expression(__output, children);
|
|
41
28
|
}
|
|
42
29
|
|
|
43
|
-
__output.push('</
|
|
44
|
-
|
|
45
|
-
});
|
|
46
|
-
}
|
|
30
|
+
__output.push('</main>');
|
|
31
|
+
}
|
|
47
32
|
|
|
48
|
-
|
|
33
|
+
__output.push('</div>');
|
|
34
|
+
_$_.pop_component();
|
|
35
|
+
}
|
|
49
36
|
|
|
50
37
|
export function Content(__output) {
|
|
51
38
|
_$_.push_component();
|
|
@@ -87,7 +74,7 @@ export function LayoutWithContent(__output) {
|
|
|
87
74
|
const args = [
|
|
88
75
|
__output,
|
|
89
76
|
{
|
|
90
|
-
children: function
|
|
77
|
+
children: _$_.ripple_element(function render_children(__output) {
|
|
91
78
|
_$_.push_component();
|
|
92
79
|
|
|
93
80
|
{
|
|
@@ -98,7 +85,7 @@ export function LayoutWithContent(__output) {
|
|
|
98
85
|
}
|
|
99
86
|
|
|
100
87
|
_$_.pop_component();
|
|
101
|
-
}
|
|
88
|
+
})
|
|
102
89
|
}
|
|
103
90
|
];
|
|
104
91
|
|