ripple 0.3.68 → 0.3.70
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 +57 -0
- package/package.json +3 -3
- package/src/jsx-runtime.d.ts +2 -2
- package/src/runtime/element.js +1 -1
- package/src/runtime/index-client.js +11 -11
- package/src/runtime/index-server.js +7 -4
- package/src/runtime/internal/client/bindings.js +1 -1
- package/src/runtime/internal/client/blocks.js +13 -4
- package/src/runtime/internal/client/component.js +55 -0
- package/src/runtime/internal/client/composite.js +4 -2
- package/src/runtime/internal/client/expression.js +65 -7
- package/src/runtime/internal/client/hmr.js +54 -43
- package/src/runtime/internal/client/index.js +5 -1
- package/src/runtime/internal/client/portal.js +70 -69
- package/src/runtime/internal/client/render.js +3 -0
- package/src/runtime/internal/server/index.js +92 -8
- package/tests/client/__snapshots__/html.test.tsrx.snap +3 -3
- package/tests/client/array/array.copy-within.test.tsrx +33 -31
- package/tests/client/array/array.derived.test.tsrx +186 -169
- package/tests/client/array/array.iteration.test.tsrx +40 -37
- package/tests/client/array/array.mutations.test.tsrx +113 -101
- package/tests/client/array/array.static.test.tsrx +119 -101
- package/tests/client/array/array.to-methods.test.tsrx +24 -21
- package/tests/client/async-suspend.test.tsrx +247 -246
- package/tests/client/basic/__snapshots__/basic.rendering.test.tsrx.snap +0 -1
- package/tests/client/basic/basic.attributes.test.tsrx +428 -423
- package/tests/client/basic/basic.collections.test.tsrx +109 -102
- package/tests/client/basic/basic.components.test.tsrx +323 -205
- package/tests/client/basic/basic.errors.test.tsrx +91 -91
- package/tests/client/basic/basic.events.test.tsrx +114 -115
- package/tests/client/basic/basic.get-set.test.tsrx +97 -87
- package/tests/client/basic/basic.hmr.test.tsrx +19 -16
- package/tests/client/basic/basic.reactivity.test.tsrx +199 -191
- package/tests/client/basic/basic.rendering.test.tsrx +272 -182
- package/tests/client/basic/basic.styling.test.tsrx +23 -22
- package/tests/client/basic/basic.utilities.test.tsrx +10 -8
- package/tests/client/boundaries.test.tsrx +26 -26
- package/tests/client/compiler/__snapshots__/compiler.assignments.test.rsrx.snap +5 -5
- package/tests/client/compiler/__snapshots__/compiler.assignments.test.tsrx.snap +5 -5
- package/tests/client/compiler/compiler.assignments.test.tsrx +77 -81
- package/tests/client/compiler/compiler.attributes.test.tsrx +15 -15
- package/tests/client/compiler/compiler.basic.test.tsrx +322 -314
- package/tests/client/compiler/compiler.regex.test.tsrx +44 -47
- package/tests/client/compiler/compiler.tracked-access.test.tsrx +38 -38
- package/tests/client/compiler/compiler.try-in-function.test.tsrx +16 -16
- package/tests/client/compiler/compiler.typescript.test.tsrx +2 -2
- package/tests/client/composite/composite.dynamic-components.test.tsrx +47 -48
- package/tests/client/composite/composite.generics.test.tsrx +168 -192
- package/tests/client/composite/composite.props.test.tsrx +97 -81
- package/tests/client/composite/composite.reactivity.test.tsrx +177 -147
- package/tests/client/composite/composite.render.test.tsrx +122 -105
- package/tests/client/computed-properties.test.tsrx +28 -28
- package/tests/client/context.test.tsrx +21 -21
- package/tests/client/css/global-additional-cases.test.tsrx +58 -58
- package/tests/client/css/global-advanced-selectors.test.tsrx +16 -16
- package/tests/client/css/global-at-rules.test.tsrx +10 -10
- package/tests/client/css/global-basic.test.tsrx +14 -14
- package/tests/client/css/global-classes-ids.test.tsrx +14 -14
- package/tests/client/css/global-combinators.test.tsrx +10 -10
- package/tests/client/css/global-complex-nesting.test.tsrx +14 -14
- package/tests/client/css/global-edge-cases.test.tsrx +18 -18
- package/tests/client/css/global-keyframes.test.tsrx +12 -12
- package/tests/client/css/global-nested.test.tsrx +10 -10
- package/tests/client/css/global-pseudo.test.tsrx +12 -12
- package/tests/client/css/global-scoping.test.tsrx +20 -20
- package/tests/client/css/style-identifier.test.tsrx +126 -259
- package/tests/client/date.test.tsrx +146 -133
- package/tests/client/dynamic-elements.test.tsrx +398 -365
- package/tests/client/events.test.tsrx +292 -290
- package/tests/client/for.test.tsrx +156 -153
- package/tests/client/head.test.tsrx +105 -96
- package/tests/client/html.test.tsrx +122 -26
- package/tests/client/input-value.test.tsrx +1361 -1314
- package/tests/client/lazy-array.test.tsrx +16 -13
- package/tests/client/lazy-destructuring.test.tsrx +257 -213
- package/tests/client/map.test.tsrx +65 -60
- package/tests/client/media-query.test.tsrx +22 -20
- package/tests/client/object.test.tsrx +87 -81
- package/tests/client/portal.test.tsrx +57 -51
- package/tests/client/ref.test.tsrx +233 -202
- package/tests/client/return.test.tsrx +71 -2560
- package/tests/client/set.test.tsrx +54 -45
- package/tests/client/svg.test.tsrx +216 -186
- package/tests/client/switch.test.tsrx +194 -193
- package/tests/client/track-async-hydration.test.tsrx +18 -14
- package/tests/client/tracked-index-access.test.tsrx +28 -18
- package/tests/client/try.test.tsrx +675 -548
- package/tests/client/tsx.test.tsrx +373 -311
- package/tests/client/typescript-generics.test.tsrx +145 -145
- package/tests/client/url/url.derived.test.tsrx +33 -28
- package/tests/client/url/url.parsing.test.tsrx +61 -51
- package/tests/client/url/url.partial-removal.test.tsrx +56 -48
- package/tests/client/url/url.reactivity.test.tsrx +142 -125
- package/tests/client/url/url.serialization.test.tsrx +13 -11
- package/tests/client/url-search-params/url-search-params.derived.test.tsrx +34 -29
- package/tests/client/url-search-params/url-search-params.initialization.test.tsrx +25 -21
- package/tests/client/url-search-params/url-search-params.iteration.test.tsrx +50 -45
- package/tests/client/url-search-params/url-search-params.mutation.test.tsrx +111 -99
- package/tests/client/url-search-params/url-search-params.retrieval.test.tsrx +49 -43
- package/tests/client/url-search-params/url-search-params.serialization.test.tsrx +14 -12
- package/tests/client/url-search-params/url-search-params.tracked-url.test.tsrx +16 -14
- package/tests/hydration/basic.test.js +3 -3
- package/tests/hydration/compiled/client/basic.js +586 -651
- package/tests/hydration/compiled/client/composite.js +79 -104
- package/tests/hydration/compiled/client/events.js +140 -148
- package/tests/hydration/compiled/client/for.js +1005 -1018
- package/tests/hydration/compiled/client/head.js +124 -134
- package/tests/hydration/compiled/client/hmr.js +41 -48
- package/tests/hydration/compiled/client/html-in-template.js +38 -41
- package/tests/hydration/compiled/client/html.js +970 -1314
- package/tests/hydration/compiled/client/if-children.js +234 -249
- package/tests/hydration/compiled/client/if.js +182 -189
- package/tests/hydration/compiled/client/mixed-control-flow.js +347 -303
- package/tests/hydration/compiled/client/nested-control-flow.js +1084 -832
- package/tests/hydration/compiled/client/portal.js +65 -85
- package/tests/hydration/compiled/client/reactivity.js +84 -90
- package/tests/hydration/compiled/client/return.js +38 -1939
- package/tests/hydration/compiled/client/switch.js +218 -224
- package/tests/hydration/compiled/client/track-async-serialization.js +250 -259
- package/tests/hydration/compiled/client/try.js +123 -132
- package/tests/hydration/compiled/server/basic.js +773 -831
- package/tests/hydration/compiled/server/composite.js +166 -191
- package/tests/hydration/compiled/server/events.js +170 -184
- package/tests/hydration/compiled/server/for.js +851 -909
- package/tests/hydration/compiled/server/head.js +206 -216
- package/tests/hydration/compiled/server/hmr.js +64 -72
- package/tests/hydration/compiled/server/html-in-template.js +42 -76
- package/tests/hydration/compiled/server/html.js +1362 -1667
- package/tests/hydration/compiled/server/if-children.js +419 -445
- package/tests/hydration/compiled/server/if.js +194 -208
- package/tests/hydration/compiled/server/mixed-control-flow.js +249 -257
- package/tests/hydration/compiled/server/nested-control-flow.js +491 -515
- package/tests/hydration/compiled/server/portal.js +152 -160
- package/tests/hydration/compiled/server/reactivity.js +94 -106
- package/tests/hydration/compiled/server/return.js +28 -2172
- package/tests/hydration/compiled/server/switch.js +274 -286
- package/tests/hydration/compiled/server/track-async-serialization.js +340 -358
- package/tests/hydration/compiled/server/try.js +167 -185
- package/tests/hydration/components/basic.tsrx +320 -272
- package/tests/hydration/components/composite.tsrx +44 -32
- package/tests/hydration/components/events.tsrx +101 -91
- package/tests/hydration/components/for.tsrx +510 -452
- package/tests/hydration/components/head.tsrx +87 -80
- package/tests/hydration/components/hmr.tsrx +22 -17
- package/tests/hydration/components/html-in-template.tsrx +22 -17
- package/tests/hydration/components/html.tsrx +525 -443
- package/tests/hydration/components/if-children.tsrx +158 -148
- package/tests/hydration/components/if.tsrx +109 -95
- package/tests/hydration/components/mixed-control-flow.tsrx +100 -96
- package/tests/hydration/components/nested-control-flow.tsrx +215 -203
- package/tests/hydration/components/portal.tsrx +41 -34
- package/tests/hydration/components/reactivity.tsrx +37 -27
- package/tests/hydration/components/return.tsrx +12 -556
- package/tests/hydration/components/switch.tsrx +120 -114
- package/tests/hydration/components/track-async-serialization.tsrx +107 -91
- package/tests/hydration/components/try.tsrx +55 -40
- package/tests/hydration/html.test.js +4 -4
- package/tests/hydration/return.test.js +13 -532
- package/tests/server/await.test.tsrx +3 -3
- package/tests/server/basic.attributes.test.tsrx +264 -195
- package/tests/server/basic.components.test.tsrx +296 -169
- package/tests/server/basic.test.tsrx +300 -198
- package/tests/server/compiler.test.tsrx +62 -60
- package/tests/server/composite.props.test.tsrx +77 -63
- package/tests/server/composite.test.tsrx +168 -192
- package/tests/server/context.test.tsrx +18 -12
- package/tests/server/dynamic-elements.test.tsrx +197 -180
- package/tests/server/for.test.tsrx +85 -78
- package/tests/server/head.test.tsrx +50 -43
- package/tests/server/html-nesting-validation.test.tsrx +8 -8
- package/tests/server/if.test.tsrx +57 -51
- package/tests/server/lazy-destructuring.test.tsrx +366 -294
- package/tests/server/return.test.tsrx +76 -1355
- package/tests/server/streaming-ssr.test.tsrx +4 -75
- package/tests/server/style-identifier.test.tsrx +169 -131
- package/tests/server/switch.test.tsrx +91 -85
- package/tests/server/track-async-serialization.test.tsrx +105 -85
- package/tests/server/try.test.tsrx +374 -280
- package/tests/utils/compiler-compat-config.test.js +2 -2
- package/tests/utils/runtime-imports.test.js +10 -0
- package/types/index.d.ts +8 -0
- package/tests/client/__snapshots__/html.test.rsrx.snap +0 -40
|
@@ -4,324 +4,314 @@ import * as _$_ from 'ripple/internal/server';
|
|
|
4
4
|
import { track } from 'ripple/server';
|
|
5
5
|
|
|
6
6
|
export function StaticTitle() {
|
|
7
|
-
_$_.
|
|
7
|
+
return _$_.tsrx_element(() => {
|
|
8
|
+
_$_.regular_block(() => {
|
|
9
|
+
_$_.output_push('<div');
|
|
10
|
+
_$_.output_push('>');
|
|
11
|
+
|
|
12
|
+
{
|
|
13
|
+
_$_.output_push('Content');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
_$_.output_push('</div>');
|
|
17
|
+
});
|
|
8
18
|
|
|
9
|
-
|
|
10
|
-
_$_.output_push('
|
|
19
|
+
_$_.set_output_target('head');
|
|
20
|
+
_$_.output_push('<!--10f9ad59-->');
|
|
21
|
+
_$_.output_push('<title');
|
|
11
22
|
_$_.output_push('>');
|
|
12
23
|
|
|
13
24
|
{
|
|
14
|
-
_$_.output_push('
|
|
25
|
+
_$_.output_push('Static Test Title');
|
|
15
26
|
}
|
|
16
27
|
|
|
17
|
-
_$_.output_push('</
|
|
28
|
+
_$_.output_push('</title>');
|
|
29
|
+
_$_.set_output_target(null);
|
|
18
30
|
});
|
|
19
|
-
|
|
20
|
-
_$_.set_output_target('head');
|
|
21
|
-
_$_.output_push('<!--c8908187-->');
|
|
22
|
-
_$_.output_push('<title');
|
|
23
|
-
_$_.output_push('>');
|
|
24
|
-
|
|
25
|
-
{
|
|
26
|
-
_$_.output_push('Static Test Title');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
_$_.output_push('</title>');
|
|
30
|
-
_$_.set_output_target(null);
|
|
31
|
-
_$_.pop_component();
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
export function ReactiveTitle() {
|
|
35
|
-
_$_.
|
|
36
|
-
|
|
37
|
-
let lazy = _$_.track('Initial Title', 'cbca63e3');
|
|
38
|
-
|
|
39
|
-
_$_.regular_block(() => {
|
|
40
|
-
_$_.output_push('<div');
|
|
41
|
-
_$_.output_push('>');
|
|
34
|
+
return _$_.tsrx_element(() => {
|
|
35
|
+
let lazy = _$_.track('Initial Title', 'cbca63e3');
|
|
42
36
|
|
|
43
|
-
{
|
|
44
|
-
_$_.output_push('<
|
|
37
|
+
_$_.regular_block(() => {
|
|
38
|
+
_$_.output_push('<div');
|
|
45
39
|
_$_.output_push('>');
|
|
46
40
|
|
|
47
41
|
{
|
|
48
|
-
_$_.output_push(
|
|
49
|
-
|
|
42
|
+
_$_.output_push('<span');
|
|
43
|
+
_$_.output_push('>');
|
|
50
44
|
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
{
|
|
46
|
+
_$_.output_push(_$_.escape(lazy.value));
|
|
47
|
+
}
|
|
53
48
|
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
_$_.output_push('</span>');
|
|
50
|
+
}
|
|
56
51
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
_$_.output_push('<title');
|
|
60
|
-
_$_.output_push('>');
|
|
52
|
+
_$_.output_push('</div>');
|
|
53
|
+
});
|
|
61
54
|
|
|
62
|
-
|
|
63
|
-
_$_.output_push(
|
|
64
|
-
|
|
55
|
+
_$_.set_output_target('head');
|
|
56
|
+
_$_.output_push('<!--13811860-->');
|
|
57
|
+
_$_.output_push('<title');
|
|
58
|
+
_$_.output_push('>');
|
|
65
59
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
60
|
+
{
|
|
61
|
+
_$_.output_push(_$_.escape(lazy.value));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
_$_.output_push('</title>');
|
|
65
|
+
_$_.set_output_target(null);
|
|
66
|
+
});
|
|
69
67
|
}
|
|
70
68
|
|
|
71
69
|
export function MultipleHeadElements() {
|
|
72
|
-
_$_.
|
|
70
|
+
return _$_.tsrx_element(() => {
|
|
71
|
+
_$_.regular_block(() => {
|
|
72
|
+
_$_.output_push('<div');
|
|
73
|
+
_$_.output_push('>');
|
|
74
|
+
|
|
75
|
+
{
|
|
76
|
+
_$_.output_push('Page content');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
_$_.output_push('</div>');
|
|
80
|
+
});
|
|
73
81
|
|
|
74
|
-
|
|
75
|
-
_$_.output_push('
|
|
82
|
+
_$_.set_output_target('head');
|
|
83
|
+
_$_.output_push('<!--478d48ee-->');
|
|
84
|
+
_$_.output_push('<title');
|
|
76
85
|
_$_.output_push('>');
|
|
77
86
|
|
|
78
87
|
{
|
|
79
|
-
_$_.output_push('Page
|
|
88
|
+
_$_.output_push('Page Title');
|
|
80
89
|
}
|
|
81
90
|
|
|
82
|
-
_$_.output_push('</
|
|
91
|
+
_$_.output_push('</title>');
|
|
92
|
+
_$_.output_push('<meta');
|
|
93
|
+
_$_.output_push(' name="description"');
|
|
94
|
+
_$_.output_push(' content="Page description"');
|
|
95
|
+
_$_.output_push(' />');
|
|
96
|
+
_$_.output_push('<link');
|
|
97
|
+
_$_.output_push(' rel="stylesheet"');
|
|
98
|
+
_$_.output_push(' href="/styles.css"');
|
|
99
|
+
_$_.output_push(' />');
|
|
100
|
+
_$_.set_output_target(null);
|
|
83
101
|
});
|
|
84
|
-
|
|
85
|
-
_$_.set_output_target('head');
|
|
86
|
-
_$_.output_push('<!--3a79945b-->');
|
|
87
|
-
_$_.output_push('<title');
|
|
88
|
-
_$_.output_push('>');
|
|
89
|
-
|
|
90
|
-
{
|
|
91
|
-
_$_.output_push('Page Title');
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
_$_.output_push('</title>');
|
|
95
|
-
_$_.output_push('<meta');
|
|
96
|
-
_$_.output_push(' name="description"');
|
|
97
|
-
_$_.output_push(' content="Page description"');
|
|
98
|
-
_$_.output_push(' />');
|
|
99
|
-
_$_.output_push('<link');
|
|
100
|
-
_$_.output_push(' rel="stylesheet"');
|
|
101
|
-
_$_.output_push(' href="/styles.css"');
|
|
102
|
-
_$_.output_push(' />');
|
|
103
|
-
_$_.set_output_target(null);
|
|
104
|
-
_$_.pop_component();
|
|
105
102
|
}
|
|
106
103
|
|
|
107
104
|
export function ReactiveMetaTags() {
|
|
108
|
-
_$_.
|
|
105
|
+
return _$_.tsrx_element(() => {
|
|
106
|
+
let lazy_1 = _$_.track('Initial description', '38bfa3b2');
|
|
107
|
+
|
|
108
|
+
_$_.regular_block(() => {
|
|
109
|
+
_$_.output_push('<div');
|
|
110
|
+
_$_.output_push('>');
|
|
111
|
+
|
|
112
|
+
{
|
|
113
|
+
_$_.output_push(_$_.escape(lazy_1.value));
|
|
114
|
+
}
|
|
109
115
|
|
|
110
|
-
|
|
116
|
+
_$_.output_push('</div>');
|
|
117
|
+
});
|
|
111
118
|
|
|
112
|
-
|
|
113
|
-
_$_.output_push('
|
|
119
|
+
_$_.set_output_target('head');
|
|
120
|
+
_$_.output_push('<!--36dd8c9f-->');
|
|
121
|
+
_$_.output_push('<title');
|
|
114
122
|
_$_.output_push('>');
|
|
115
123
|
|
|
116
124
|
{
|
|
117
|
-
_$_.output_push(
|
|
125
|
+
_$_.output_push('My Page');
|
|
118
126
|
}
|
|
119
127
|
|
|
120
|
-
_$_.output_push('</
|
|
128
|
+
_$_.output_push('</title>');
|
|
129
|
+
_$_.output_push('<meta');
|
|
130
|
+
_$_.output_push(' name="description"');
|
|
131
|
+
_$_.output_push(_$_.attr('content', lazy_1.value, false));
|
|
132
|
+
_$_.output_push(' />');
|
|
133
|
+
_$_.set_output_target(null);
|
|
121
134
|
});
|
|
122
|
-
|
|
123
|
-
_$_.set_output_target('head');
|
|
124
|
-
_$_.output_push('<!--c9fd7b0f-->');
|
|
125
|
-
_$_.output_push('<title');
|
|
126
|
-
_$_.output_push('>');
|
|
127
|
-
|
|
128
|
-
{
|
|
129
|
-
_$_.output_push('My Page');
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
_$_.output_push('</title>');
|
|
133
|
-
_$_.output_push('<meta');
|
|
134
|
-
_$_.output_push(' name="description"');
|
|
135
|
-
_$_.output_push(_$_.attr('content', lazy_1.value, false));
|
|
136
|
-
_$_.output_push(' />');
|
|
137
|
-
_$_.set_output_target(null);
|
|
138
|
-
_$_.pop_component();
|
|
139
135
|
}
|
|
140
136
|
|
|
141
137
|
export function TitleWithTemplate() {
|
|
142
|
-
_$_.
|
|
138
|
+
return _$_.tsrx_element(() => {
|
|
139
|
+
let lazy_2 = _$_.track('World', 'f3925cd5');
|
|
140
|
+
|
|
141
|
+
_$_.regular_block(() => {
|
|
142
|
+
_$_.output_push('<div');
|
|
143
|
+
_$_.output_push('>');
|
|
144
|
+
|
|
145
|
+
{
|
|
146
|
+
_$_.output_push(_$_.escape(lazy_2.value));
|
|
147
|
+
}
|
|
143
148
|
|
|
144
|
-
|
|
149
|
+
_$_.output_push('</div>');
|
|
150
|
+
});
|
|
145
151
|
|
|
146
|
-
|
|
147
|
-
_$_.output_push('
|
|
152
|
+
_$_.set_output_target('head');
|
|
153
|
+
_$_.output_push('<!--bf58d07e-->');
|
|
154
|
+
_$_.output_push('<title');
|
|
148
155
|
_$_.output_push('>');
|
|
149
156
|
|
|
150
157
|
{
|
|
151
|
-
_$_.output_push(_$_.escape(lazy_2.value));
|
|
158
|
+
_$_.output_push(_$_.escape(`Hello ${lazy_2.value}!`));
|
|
152
159
|
}
|
|
153
160
|
|
|
154
|
-
_$_.output_push('</
|
|
161
|
+
_$_.output_push('</title>');
|
|
162
|
+
_$_.set_output_target(null);
|
|
155
163
|
});
|
|
156
|
-
|
|
157
|
-
_$_.set_output_target('head');
|
|
158
|
-
_$_.output_push('<!--72f81455-->');
|
|
159
|
-
_$_.output_push('<title');
|
|
160
|
-
_$_.output_push('>');
|
|
161
|
-
|
|
162
|
-
{
|
|
163
|
-
_$_.output_push(_$_.escape(`Hello ${lazy_2.value}!`));
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
_$_.output_push('</title>');
|
|
167
|
-
_$_.set_output_target(null);
|
|
168
|
-
_$_.pop_component();
|
|
169
164
|
}
|
|
170
165
|
|
|
171
166
|
export function EmptyTitle() {
|
|
172
|
-
_$_.
|
|
167
|
+
return _$_.tsrx_element(() => {
|
|
168
|
+
_$_.regular_block(() => {
|
|
169
|
+
_$_.output_push('<div');
|
|
170
|
+
_$_.output_push('>');
|
|
173
171
|
|
|
174
|
-
|
|
175
|
-
|
|
172
|
+
{
|
|
173
|
+
_$_.output_push('Empty title test');
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
_$_.output_push('</div>');
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
_$_.set_output_target('head');
|
|
180
|
+
_$_.output_push('<!--146bbd6b-->');
|
|
181
|
+
_$_.output_push('<title');
|
|
176
182
|
_$_.output_push('>');
|
|
177
183
|
|
|
178
184
|
{
|
|
179
|
-
_$_.output_push('
|
|
185
|
+
_$_.output_push('');
|
|
180
186
|
}
|
|
181
187
|
|
|
182
|
-
_$_.output_push('</
|
|
188
|
+
_$_.output_push('</title>');
|
|
189
|
+
_$_.set_output_target(null);
|
|
183
190
|
});
|
|
184
|
-
|
|
185
|
-
_$_.set_output_target('head');
|
|
186
|
-
_$_.output_push('<!--35a7fe4a-->');
|
|
187
|
-
_$_.output_push('<title');
|
|
188
|
-
_$_.output_push('>');
|
|
189
|
-
|
|
190
|
-
{
|
|
191
|
-
_$_.output_push('');
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
_$_.output_push('</title>');
|
|
195
|
-
_$_.set_output_target(null);
|
|
196
|
-
_$_.pop_component();
|
|
197
191
|
}
|
|
198
192
|
|
|
199
193
|
export function ConditionalTitle() {
|
|
200
|
-
_$_.
|
|
194
|
+
return _$_.tsrx_element(() => {
|
|
195
|
+
let lazy_3 = _$_.track(true, 'ff71bf1f');
|
|
196
|
+
let lazy_4 = _$_.track('Main Page', '7cd7d671');
|
|
197
|
+
|
|
198
|
+
_$_.regular_block(() => {
|
|
199
|
+
_$_.output_push('<div');
|
|
200
|
+
_$_.output_push('>');
|
|
201
201
|
|
|
202
|
-
|
|
203
|
-
|
|
202
|
+
{
|
|
203
|
+
_$_.output_push(_$_.escape(lazy_4.value));
|
|
204
|
+
}
|
|
204
205
|
|
|
205
|
-
|
|
206
|
-
|
|
206
|
+
_$_.output_push('</div>');
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
_$_.set_output_target('head');
|
|
210
|
+
_$_.output_push('<!--79341264-->');
|
|
211
|
+
_$_.output_push('<title');
|
|
207
212
|
_$_.output_push('>');
|
|
208
213
|
|
|
209
214
|
{
|
|
210
|
-
_$_.output_push(_$_.escape(lazy_4.value));
|
|
215
|
+
_$_.output_push(_$_.escape(lazy_3.value ? 'App - ' + lazy_4.value : lazy_4.value));
|
|
211
216
|
}
|
|
212
217
|
|
|
213
|
-
_$_.output_push('</
|
|
218
|
+
_$_.output_push('</title>');
|
|
219
|
+
_$_.set_output_target(null);
|
|
214
220
|
});
|
|
215
|
-
|
|
216
|
-
_$_.set_output_target('head');
|
|
217
|
-
_$_.output_push('<!--453e9ed4-->');
|
|
218
|
-
_$_.output_push('<title');
|
|
219
|
-
_$_.output_push('>');
|
|
220
|
-
|
|
221
|
-
{
|
|
222
|
-
_$_.output_push(_$_.escape(lazy_3.value ? 'App - ' + lazy_4.value : lazy_4.value));
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
_$_.output_push('</title>');
|
|
226
|
-
_$_.set_output_target(null);
|
|
227
|
-
_$_.pop_component();
|
|
228
221
|
}
|
|
229
222
|
|
|
230
223
|
export function ComputedTitle() {
|
|
231
|
-
_$_.
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
let prefix = 'Count: ';
|
|
224
|
+
return _$_.tsrx_element(() => {
|
|
225
|
+
let lazy_5 = _$_.track(0, 'b6a48610');
|
|
226
|
+
let prefix = 'Count: ';
|
|
235
227
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
_$_.output_push('>');
|
|
239
|
-
|
|
240
|
-
{
|
|
241
|
-
_$_.output_push('<span');
|
|
228
|
+
_$_.regular_block(() => {
|
|
229
|
+
_$_.output_push('<div');
|
|
242
230
|
_$_.output_push('>');
|
|
243
231
|
|
|
244
232
|
{
|
|
245
|
-
_$_.output_push(
|
|
246
|
-
|
|
233
|
+
_$_.output_push('<span');
|
|
234
|
+
_$_.output_push('>');
|
|
247
235
|
|
|
248
|
-
|
|
249
|
-
|
|
236
|
+
{
|
|
237
|
+
_$_.output_push(_$_.escape(lazy_5.value));
|
|
238
|
+
}
|
|
250
239
|
|
|
251
|
-
|
|
252
|
-
|
|
240
|
+
_$_.output_push('</span>');
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
_$_.output_push('</div>');
|
|
244
|
+
});
|
|
253
245
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
246
|
+
_$_.set_output_target('head');
|
|
247
|
+
_$_.output_push('<!--624d9ef2-->');
|
|
248
|
+
_$_.output_push('<title');
|
|
249
|
+
_$_.output_push('>');
|
|
258
250
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
251
|
+
{
|
|
252
|
+
_$_.output_push(_$_.escape(prefix + lazy_5.value));
|
|
253
|
+
}
|
|
262
254
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
255
|
+
_$_.output_push('</title>');
|
|
256
|
+
_$_.set_output_target(null);
|
|
257
|
+
});
|
|
266
258
|
}
|
|
267
259
|
|
|
268
260
|
export function MultipleHeadBlocks() {
|
|
269
|
-
_$_.
|
|
261
|
+
return _$_.tsrx_element(() => {
|
|
262
|
+
_$_.regular_block(() => {
|
|
263
|
+
_$_.output_push('<div');
|
|
264
|
+
_$_.output_push('>');
|
|
265
|
+
|
|
266
|
+
{
|
|
267
|
+
_$_.output_push('Content');
|
|
268
|
+
}
|
|
270
269
|
|
|
271
|
-
|
|
272
|
-
|
|
270
|
+
_$_.output_push('</div>');
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
_$_.set_output_target('head');
|
|
274
|
+
_$_.output_push('<!--111100ce-->');
|
|
275
|
+
_$_.output_push('<title');
|
|
273
276
|
_$_.output_push('>');
|
|
274
277
|
|
|
275
278
|
{
|
|
276
|
-
_$_.output_push('
|
|
279
|
+
_$_.output_push('First Head');
|
|
277
280
|
}
|
|
278
281
|
|
|
279
|
-
_$_.output_push('</
|
|
282
|
+
_$_.output_push('</title>');
|
|
283
|
+
_$_.output_push('<!--423883ee-->');
|
|
284
|
+
_$_.output_push('<meta');
|
|
285
|
+
_$_.output_push(' name="author"');
|
|
286
|
+
_$_.output_push(' content="Test Author"');
|
|
287
|
+
_$_.output_push(' />');
|
|
288
|
+
_$_.set_output_target(null);
|
|
280
289
|
});
|
|
281
|
-
|
|
282
|
-
_$_.set_output_target('head');
|
|
283
|
-
_$_.output_push('<!--43cf39fd-->');
|
|
284
|
-
_$_.output_push('<title');
|
|
285
|
-
_$_.output_push('>');
|
|
286
|
-
|
|
287
|
-
{
|
|
288
|
-
_$_.output_push('First Head');
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
_$_.output_push('</title>');
|
|
292
|
-
_$_.output_push('<!--e9abd92f-->');
|
|
293
|
-
_$_.output_push('<meta');
|
|
294
|
-
_$_.output_push(' name="author"');
|
|
295
|
-
_$_.output_push(' content="Test Author"');
|
|
296
|
-
_$_.output_push(' />');
|
|
297
|
-
_$_.set_output_target(null);
|
|
298
|
-
_$_.pop_component();
|
|
299
290
|
}
|
|
300
291
|
|
|
301
292
|
export function HeadWithStyle() {
|
|
302
|
-
_$_.
|
|
293
|
+
return _$_.tsrx_element(() => {
|
|
294
|
+
_$_.regular_block(() => {
|
|
295
|
+
_$_.output_push('<div');
|
|
296
|
+
_$_.output_push('>');
|
|
297
|
+
|
|
298
|
+
{
|
|
299
|
+
_$_.output_push('Styled content');
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
_$_.output_push('</div>');
|
|
303
|
+
});
|
|
303
304
|
|
|
304
|
-
|
|
305
|
-
_$_.output_push('
|
|
305
|
+
_$_.set_output_target('head');
|
|
306
|
+
_$_.output_push('<!--f3524d73-->');
|
|
307
|
+
_$_.output_push('<title');
|
|
306
308
|
_$_.output_push('>');
|
|
307
309
|
|
|
308
310
|
{
|
|
309
|
-
_$_.output_push('Styled
|
|
311
|
+
_$_.output_push('Styled Page');
|
|
310
312
|
}
|
|
311
313
|
|
|
312
|
-
_$_.output_push('</
|
|
314
|
+
_$_.output_push('</title>');
|
|
315
|
+
_$_.set_output_target(null);
|
|
313
316
|
});
|
|
314
|
-
|
|
315
|
-
_$_.set_output_target('head');
|
|
316
|
-
_$_.output_push('<!--d246667e-->');
|
|
317
|
-
_$_.output_push('<title');
|
|
318
|
-
_$_.output_push('>');
|
|
319
|
-
|
|
320
|
-
{
|
|
321
|
-
_$_.output_push('Styled Page');
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
_$_.output_push('</title>');
|
|
325
|
-
_$_.set_output_target(null);
|
|
326
|
-
_$_.pop_component();
|
|
327
317
|
}
|
|
@@ -4,101 +4,93 @@ import * as _$_ from 'ripple/internal/server';
|
|
|
4
4
|
import { track } from 'ripple/server';
|
|
5
5
|
|
|
6
6
|
export function Layout({ children }) {
|
|
7
|
-
_$_.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
_$_.output_push(' class="layout"');
|
|
12
|
-
_$_.output_push('>');
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
_$_.output_push('<nav');
|
|
16
|
-
_$_.output_push(' class="nav"');
|
|
7
|
+
return _$_.tsrx_element(() => {
|
|
8
|
+
_$_.regular_block(() => {
|
|
9
|
+
_$_.output_push('<div');
|
|
10
|
+
_$_.output_push(' class="layout"');
|
|
17
11
|
_$_.output_push('>');
|
|
18
12
|
|
|
19
13
|
{
|
|
20
|
-
_$_.output_push('
|
|
21
|
-
|
|
14
|
+
_$_.output_push('<nav');
|
|
15
|
+
_$_.output_push(' class="nav"');
|
|
16
|
+
_$_.output_push('>');
|
|
22
17
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
_$_.output_push('>');
|
|
18
|
+
{
|
|
19
|
+
_$_.output_push('Navigation');
|
|
20
|
+
}
|
|
27
21
|
|
|
28
|
-
|
|
29
|
-
_$_.
|
|
30
|
-
|
|
22
|
+
_$_.output_push('</nav>');
|
|
23
|
+
_$_.output_push('<main');
|
|
24
|
+
_$_.output_push(' class="main"');
|
|
25
|
+
_$_.output_push('>');
|
|
26
|
+
|
|
27
|
+
{
|
|
28
|
+
_$_.render_expression(children);
|
|
29
|
+
}
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
_$_.output_push('</main>');
|
|
32
|
+
}
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
_$_.output_push('</div>');
|
|
35
|
+
});
|
|
36
36
|
});
|
|
37
|
-
|
|
38
|
-
_$_.pop_component();
|
|
39
37
|
}
|
|
40
38
|
|
|
41
39
|
export function Content() {
|
|
42
|
-
_$_.
|
|
40
|
+
return _$_.tsrx_element(() => {
|
|
41
|
+
let lazy = _$_.track(true, '0bdb1500');
|
|
43
42
|
|
|
44
|
-
|
|
43
|
+
_$_.regular_block(() => {
|
|
44
|
+
_$_.output_push('<div');
|
|
45
|
+
_$_.output_push(' class="content"');
|
|
46
|
+
_$_.output_push('>');
|
|
45
47
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
_$_.output_push(' class="content"');
|
|
49
|
-
_$_.output_push('>');
|
|
48
|
+
{
|
|
49
|
+
_$_.output_push('<!--[-->');
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
if (lazy.value) {
|
|
52
|
+
_$_.output_push('<p');
|
|
53
|
+
_$_.output_push(' class="text"');
|
|
54
|
+
_$_.output_push('>');
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
_$_.output_push('>');
|
|
56
|
+
{
|
|
57
|
+
_$_.output_push('Hello world');
|
|
58
|
+
}
|
|
58
59
|
|
|
59
|
-
|
|
60
|
-
_$_.output_push('Hello world');
|
|
60
|
+
_$_.output_push('</p>');
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
_$_.output_push('
|
|
63
|
+
_$_.output_push('<!--]-->');
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
_$_.output_push('
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
_$_.output_push('</div>');
|
|
66
|
+
_$_.output_push('</div>');
|
|
67
|
+
});
|
|
70
68
|
});
|
|
71
|
-
|
|
72
|
-
_$_.pop_component();
|
|
73
69
|
}
|
|
74
70
|
|
|
75
71
|
export function LayoutWithContent() {
|
|
76
|
-
_$_.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
comp(...args);
|
|
100
|
-
}
|
|
72
|
+
return _$_.tsrx_element(() => {
|
|
73
|
+
_$_.regular_block(() => {
|
|
74
|
+
{
|
|
75
|
+
const comp = Layout;
|
|
76
|
+
|
|
77
|
+
const args = [
|
|
78
|
+
{
|
|
79
|
+
children: _$_.tsrx_element(() => {
|
|
80
|
+
return _$_.tsrx_element(() => {
|
|
81
|
+
{
|
|
82
|
+
const comp = Content;
|
|
83
|
+
const args = [{}];
|
|
84
|
+
|
|
85
|
+
_$_.render_component(comp, ...args);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
];
|
|
91
|
+
|
|
92
|
+
_$_.render_component(comp, ...args);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
101
95
|
});
|
|
102
|
-
|
|
103
|
-
_$_.pop_component();
|
|
104
96
|
}
|