ripple 0.3.128 → 0.4.0
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 +267 -0
- package/package.json +10 -4
- package/src/runtime/element.js +23 -6
- package/src/runtime/index-client.js +81 -41
- package/src/runtime/index-server.js +1 -0
- package/src/runtime/internal/client/blocks.js +173 -91
- package/src/runtime/internal/client/component.js +4 -30
- package/src/runtime/internal/client/composite.js +12 -13
- package/src/runtime/internal/client/constants.js +9 -0
- package/src/runtime/internal/client/context.js +12 -19
- package/src/runtime/internal/client/css.js +7 -9
- package/src/runtime/internal/client/events.js +178 -90
- package/src/runtime/internal/client/expression.js +45 -25
- package/src/runtime/internal/client/for.js +409 -129
- package/src/runtime/internal/client/head.js +10 -5
- package/src/runtime/internal/client/html.js +1 -0
- package/src/runtime/internal/client/hydration.js +152 -10
- package/src/runtime/internal/client/if.js +239 -50
- package/src/runtime/internal/client/index.js +4 -12
- package/src/runtime/internal/client/operations.js +40 -61
- package/src/runtime/internal/client/portal.js +163 -85
- package/src/runtime/internal/client/render.js +39 -39
- package/src/runtime/internal/client/rpc.js +3 -3
- package/src/runtime/internal/client/runtime.js +592 -433
- package/src/runtime/internal/client/selector.js +5 -2
- package/src/runtime/internal/client/template.js +133 -158
- package/src/runtime/internal/client/transport.js +38 -0
- package/src/runtime/internal/client/try.js +465 -426
- package/src/runtime/internal/client/types.d.ts +56 -23
- package/src/runtime/internal/client/utils.js +1 -3
- package/src/runtime/internal/server/dynamic.js +20 -21
- package/src/runtime/internal/server/index.js +325 -275
- package/src/runtime/internal/server/rpc.js +3 -2
- package/src/runtime/internal/server/transport.js +16 -0
- package/src/runtime/transport.js +21 -0
- package/tests/client/__snapshots__/for.test.tsrx.snap +0 -5
- package/tests/client/array/array.copy-within.test.tsrx +12 -12
- package/tests/client/array/array.derived.test.tsrx +46 -46
- package/tests/client/array/array.iteration.test.tsrx +10 -10
- package/tests/client/array/array.mutations.test.tsrx +20 -20
- package/tests/client/array/array.static.test.tsrx +11 -11
- package/tests/client/array/array.to-methods.test.tsrx +6 -6
- package/tests/client/async-suspend.test.tsrx +74 -75
- package/tests/client/basic/basic.attributes.test.tsrx +86 -83
- package/tests/client/basic/basic.collections.test.tsrx +12 -12
- package/tests/client/basic/basic.components.test.tsrx +99 -25
- package/tests/client/basic/basic.errors.test.tsrx +18 -18
- package/tests/client/basic/basic.events.test.tsrx +42 -42
- package/tests/client/basic/basic.get-set.test.tsrx +8 -8
- package/tests/client/basic/basic.reactivity.test.tsrx +73 -38
- package/tests/client/basic/basic.rendering.test.tsrx +25 -25
- package/tests/client/basic/basic.utilities.test.tsrx +3 -3
- package/tests/client/boundaries.test.tsrx +8 -8
- package/tests/client/boxed-locals.test.tsrx +452 -0
- package/tests/client/compiler/__snapshots__/compiler.assignments.test.tsrx.snap +6 -6
- package/tests/client/compiler/compiler.assignments.test.tsrx +9 -73
- package/tests/client/compiler/compiler.attributes.test.tsrx +23 -23
- package/tests/client/compiler/compiler.basic.test.tsrx +15 -60
- package/tests/client/compiler/compiler.tracked-access.test.tsrx +18 -43
- package/tests/client/compiler/compiler.try-in-function.test.tsrx +2 -2
- package/tests/client/composite/__snapshots__/composite.render.test.tsrx.snap +0 -1
- package/tests/client/composite/composite.dynamic-components.test.tsrx +77 -6
- package/tests/client/composite/composite.props.test.tsrx +149 -12
- package/tests/client/composite/composite.reactivity.test.tsrx +51 -52
- package/tests/client/composite/composite.render.test.tsrx +26 -9
- package/tests/client/css/scoped-styles.test.tsrx +8 -8
- package/tests/client/date.test.tsrx +42 -42
- package/tests/client/derived-release.test.tsrx +370 -0
- package/tests/client/dynamic-elements.test.tsrx +45 -45
- package/tests/client/events.test.tsrx +97 -71
- package/tests/client/for-selector.test.tsrx +14 -14
- package/tests/client/for-single-root-items.test.tsrx +118 -3
- package/tests/client/for.test.tsrx +332 -31
- package/tests/client/head.test.tsrx +19 -19
- package/tests/client/html.test.tsrx +11 -9
- package/tests/client/if-block.test.tsrx +80 -0
- package/tests/client/map.test.tsrx +16 -16
- package/tests/client/media-query.test.tsrx +7 -7
- package/tests/client/portal.test.tsrx +224 -26
- package/tests/client/primitive-text.test.tsrx +50 -0
- package/tests/client/prop-kind-switch.test.tsrx +141 -0
- package/tests/client/ref.test.tsrx +17 -17
- package/tests/client/return.test.tsrx +26 -3
- package/tests/client/root-boundary.test.tsrx +42 -0
- package/tests/client/scoped-flush.test.tsrx +8 -8
- package/tests/client/set.test.tsrx +6 -6
- package/tests/client/svg.test.tsrx +11 -11
- package/tests/client/switch.test.tsrx +44 -44
- package/tests/client/track-async-hydration.test.tsrx +4 -4
- package/tests/client/try.test.tsrx +151 -83
- package/tests/client/tsx.test.tsrx +43 -40
- package/tests/client/url/url.derived.test.tsrx +6 -6
- package/tests/client/url-search-params/url-search-params.derived.test.tsrx +8 -8
- package/tests/client/url-search-params/url-search-params.iteration.test.tsrx +10 -10
- package/tests/client/url-search-params/url-search-params.mutation.test.tsrx +10 -10
- package/tests/client/url-search-params/url-search-params.retrieval.test.tsrx +18 -18
- package/tests/client/url-search-params/url-search-params.serialization.test.tsrx +2 -2
- package/tests/hydration/basic.test.js +74 -1
- package/tests/hydration/build-components.js +22 -1
- package/tests/hydration/compiled/client/basic.js +1142 -713
- package/tests/hydration/compiled/client/composite.js +151 -100
- package/tests/hydration/compiled/client/events.js +184 -171
- package/tests/hydration/compiled/client/for.js +1472 -1132
- package/tests/hydration/compiled/client/fragment-cursor.js +2341 -0
- package/tests/hydration/compiled/client/head.js +254 -201
- package/tests/hydration/compiled/client/hmr.js +54 -41
- package/tests/hydration/compiled/client/html-in-template.js +54 -39
- package/tests/hydration/compiled/client/html.js +1633 -1263
- package/tests/hydration/compiled/client/if-children.js +420 -270
- package/tests/hydration/compiled/client/if-fragment-controlflow.js +363 -317
- package/tests/hydration/compiled/client/if.js +229 -219
- package/tests/hydration/compiled/client/mixed-control-flow.js +420 -404
- package/tests/hydration/compiled/client/nested-control-flow.js +1326 -1277
- package/tests/hydration/compiled/client/portal.js +87 -95
- package/tests/hydration/compiled/client/reactivity.js +135 -101
- package/tests/hydration/compiled/client/return.js +28 -19
- package/tests/hydration/compiled/client/streaming.js +390 -306
- package/tests/hydration/compiled/client/switch.js +258 -266
- package/tests/hydration/compiled/client/track-async-serialization.js +448 -280
- package/tests/hydration/compiled/client/try.js +173 -129
- package/tests/hydration/compiled/client/typed-text.js +71 -0
- package/tests/hydration/compiled/fixtures/money.js +10 -0
- package/tests/hydration/compiled/server/basic.js +123 -6
- package/tests/hydration/compiled/server/composite.js +16 -30
- package/tests/hydration/compiled/server/events.js +66 -18
- package/tests/hydration/compiled/server/for.js +117 -41
- package/tests/hydration/compiled/server/fragment-cursor.js +1687 -0
- package/tests/hydration/compiled/server/head.js +20 -20
- package/tests/hydration/compiled/server/hmr.js +2 -2
- package/tests/hydration/compiled/server/html.js +70 -238
- package/tests/hydration/compiled/server/if-children.js +107 -15
- package/tests/hydration/compiled/server/if.js +11 -15
- package/tests/hydration/compiled/server/mixed-control-flow.js +8 -8
- package/tests/hydration/compiled/server/portal.js +14 -22
- package/tests/hydration/compiled/server/reactivity.js +14 -14
- package/tests/hydration/compiled/server/streaming.js +19 -19
- package/tests/hydration/compiled/server/switch.js +8 -8
- package/tests/hydration/compiled/server/track-async-serialization.js +150 -23
- package/tests/hydration/compiled/server/try.js +8 -8
- package/tests/hydration/compiled/server/typed-text.js +17 -0
- package/tests/hydration/components/basic.tsrx +44 -8
- package/tests/hydration/components/composite.tsrx +2 -2
- package/tests/hydration/components/events.tsrx +25 -25
- package/tests/hydration/components/for.tsrx +115 -67
- package/tests/hydration/components/fragment-cursor.tsrx +650 -0
- package/tests/hydration/components/head.tsrx +16 -16
- package/tests/hydration/components/hmr.tsrx +2 -2
- package/tests/hydration/components/html.tsrx +7 -7
- package/tests/hydration/components/if-children.tsrx +72 -25
- package/tests/hydration/components/if.tsrx +18 -18
- package/tests/hydration/components/mixed-control-flow.tsrx +11 -11
- package/tests/hydration/components/portal.tsrx +3 -3
- package/tests/hydration/components/reactivity.tsrx +16 -16
- package/tests/hydration/components/streaming.tsrx +20 -20
- package/tests/hydration/components/switch.tsrx +20 -20
- package/tests/hydration/components/text-types.ts +4 -0
- package/tests/hydration/components/track-async-serialization.tsrx +80 -26
- package/tests/hydration/components/try.tsrx +8 -8
- package/tests/hydration/components/typed-text.tsrx +22 -0
- package/tests/hydration/fixtures/money.js +10 -0
- package/tests/hydration/for.test.js +36 -0
- package/tests/hydration/fragment-cursor.test.js +111 -0
- package/tests/hydration/if-children.test.js +24 -0
- package/tests/hydration/streaming.test.js +19 -0
- package/tests/hydration/track-async-serialization.test.js +87 -2
- package/tests/hydration/tsconfig.text-types.json +10 -0
- package/tests/hydration/typed-text.test.js +34 -0
- package/tests/server/await.test.tsrx +3 -3
- package/tests/server/basic.attributes.test.tsrx +42 -42
- package/tests/server/basic.components.test.tsrx +64 -8
- package/tests/server/basic.test.tsrx +34 -32
- package/tests/server/compiler.test.tsrx +1 -70
- package/tests/server/composite.props.test.tsrx +6 -6
- package/tests/server/dynamic-elements.test.tsrx +31 -8
- package/tests/server/for.test.tsrx +94 -0
- package/tests/server/head.test.tsrx +11 -11
- package/tests/server/scoped-styles.test.tsrx +2 -2
- package/tests/server/streaming-ssr.test.tsrx +48 -43
- package/tests/server/track-async-serialization.test.tsrx +204 -21
- package/tests/server/try.test.tsrx +48 -48
- package/tests/types/transport.ts +40 -0
- package/tests/utils/vite-plugin-config.test.js +23 -0
- package/types/index.d.ts +48 -7
- package/types/server.d.ts +3 -0
- package/types/transport.d.ts +15 -0
- package/src/runtime/internal/client/switch.js +0 -113
- package/src/utils/errors.js +0 -13
- package/tests/client/lazy-array.test.tsrx +0 -31
- package/tests/client/lazy-destructuring.test.tsrx +0 -438
- package/tests/client/tracked-index-access.test.tsrx +0 -113
- package/tests/server/lazy-destructuring.test.tsrx +0 -595
- package/tests/server/tracked-index-access.test.tsrx +0 -76
|
@@ -23,7 +23,7 @@ export function StaticTitle() {
|
|
|
23
23
|
|
|
24
24
|
export function ReactiveTitle() {
|
|
25
25
|
return _$_.tsrx_element(() => {
|
|
26
|
-
|
|
26
|
+
const title = _$_.track('Initial Title', 'cbca63e3');
|
|
27
27
|
|
|
28
28
|
_$_.regular_block(() => {
|
|
29
29
|
let __out = '';
|
|
@@ -33,14 +33,14 @@ export function ReactiveTitle() {
|
|
|
33
33
|
{
|
|
34
34
|
_$_.output_push(__out);
|
|
35
35
|
__out = '';
|
|
36
|
-
_$_.render_expression(
|
|
36
|
+
_$_.render_expression(title.value);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
__out += '</span></div>';
|
|
40
40
|
_$_.output_push(__out);
|
|
41
41
|
__out = '';
|
|
42
42
|
_$_.set_output_target('head');
|
|
43
|
-
__out += '<!--
|
|
43
|
+
__out += '<!--56ee4dab--><title>' + _$_.escape(title.value) + '</title>';
|
|
44
44
|
_$_.output_push(__out);
|
|
45
45
|
__out = '';
|
|
46
46
|
_$_.set_output_target(null);
|
|
@@ -58,7 +58,7 @@ export function MultipleHeadElements() {
|
|
|
58
58
|
_$_.output_push(__out);
|
|
59
59
|
__out = '';
|
|
60
60
|
_$_.set_output_target('head');
|
|
61
|
-
__out += '<!--
|
|
61
|
+
__out += '<!--a718096c--><title>Page Title</title><meta name="description" content="Page description" /><link rel="stylesheet" href="/styles.css" />';
|
|
62
62
|
_$_.output_push(__out);
|
|
63
63
|
__out = '';
|
|
64
64
|
_$_.set_output_target(null);
|
|
@@ -69,7 +69,7 @@ export function MultipleHeadElements() {
|
|
|
69
69
|
|
|
70
70
|
export function ReactiveMetaTags() {
|
|
71
71
|
return _$_.tsrx_element(() => {
|
|
72
|
-
|
|
72
|
+
const description = _$_.track('Initial description', '38bfa3b2');
|
|
73
73
|
|
|
74
74
|
_$_.regular_block(() => {
|
|
75
75
|
let __out = '';
|
|
@@ -79,14 +79,14 @@ export function ReactiveMetaTags() {
|
|
|
79
79
|
{
|
|
80
80
|
_$_.output_push(__out);
|
|
81
81
|
__out = '';
|
|
82
|
-
_$_.render_expression(
|
|
82
|
+
_$_.render_expression(description.value);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
__out += '</div>';
|
|
86
86
|
_$_.output_push(__out);
|
|
87
87
|
__out = '';
|
|
88
88
|
_$_.set_output_target('head');
|
|
89
|
-
__out += '<!--
|
|
89
|
+
__out += '<!--c297b350--><title>My Page</title><meta name="description"' + _$_.attr('content', description.value, false) + ' />';
|
|
90
90
|
_$_.output_push(__out);
|
|
91
91
|
__out = '';
|
|
92
92
|
_$_.set_output_target(null);
|
|
@@ -97,7 +97,7 @@ export function ReactiveMetaTags() {
|
|
|
97
97
|
|
|
98
98
|
export function TitleWithTemplate() {
|
|
99
99
|
return _$_.tsrx_element(() => {
|
|
100
|
-
|
|
100
|
+
const name = _$_.track('World', 'f3925cd5');
|
|
101
101
|
|
|
102
102
|
_$_.regular_block(() => {
|
|
103
103
|
let __out = '';
|
|
@@ -107,14 +107,14 @@ export function TitleWithTemplate() {
|
|
|
107
107
|
{
|
|
108
108
|
_$_.output_push(__out);
|
|
109
109
|
__out = '';
|
|
110
|
-
_$_.render_expression(
|
|
110
|
+
_$_.render_expression(name.value);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
__out += '</div>';
|
|
114
114
|
_$_.output_push(__out);
|
|
115
115
|
__out = '';
|
|
116
116
|
_$_.set_output_target('head');
|
|
117
|
-
__out += '<!--
|
|
117
|
+
__out += '<!--9ab2373c--><title>' + _$_.escape(`Hello ${name.value}!`) + '</title>';
|
|
118
118
|
_$_.output_push(__out);
|
|
119
119
|
__out = '';
|
|
120
120
|
_$_.set_output_target(null);
|
|
@@ -132,7 +132,7 @@ export function EmptyTitle() {
|
|
|
132
132
|
_$_.output_push(__out);
|
|
133
133
|
__out = '';
|
|
134
134
|
_$_.set_output_target('head');
|
|
135
|
-
__out += '<!--
|
|
135
|
+
__out += '<!--50cc7ae2--><title></title>';
|
|
136
136
|
_$_.output_push(__out);
|
|
137
137
|
__out = '';
|
|
138
138
|
_$_.set_output_target(null);
|
|
@@ -143,8 +143,8 @@ export function EmptyTitle() {
|
|
|
143
143
|
|
|
144
144
|
export function ConditionalTitle() {
|
|
145
145
|
return _$_.tsrx_element(() => {
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
const showPrefix = _$_.track(true, 'ff71bf1f');
|
|
147
|
+
const title = _$_.track('Main Page', '7cd7d671');
|
|
148
148
|
|
|
149
149
|
_$_.regular_block(() => {
|
|
150
150
|
let __out = '';
|
|
@@ -154,14 +154,14 @@ export function ConditionalTitle() {
|
|
|
154
154
|
{
|
|
155
155
|
_$_.output_push(__out);
|
|
156
156
|
__out = '';
|
|
157
|
-
_$_.render_expression(
|
|
157
|
+
_$_.render_expression(title.value);
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
__out += '</div>';
|
|
161
161
|
_$_.output_push(__out);
|
|
162
162
|
__out = '';
|
|
163
163
|
_$_.set_output_target('head');
|
|
164
|
-
__out += '<!--
|
|
164
|
+
__out += '<!--0877ba8e--><title>' + _$_.escape(showPrefix.value ? 'App - ' + title.value : title.value) + '</title>';
|
|
165
165
|
_$_.output_push(__out);
|
|
166
166
|
__out = '';
|
|
167
167
|
_$_.set_output_target(null);
|
|
@@ -172,17 +172,17 @@ export function ConditionalTitle() {
|
|
|
172
172
|
|
|
173
173
|
export function ComputedTitle() {
|
|
174
174
|
return _$_.tsrx_element(() => {
|
|
175
|
-
|
|
175
|
+
const count = _$_.track(0, 'b6a48610');
|
|
176
176
|
let prefix = 'Count: ';
|
|
177
177
|
|
|
178
178
|
_$_.regular_block(() => {
|
|
179
179
|
let __out = '';
|
|
180
180
|
|
|
181
|
-
__out += '<div><span>' + _$_.escape(
|
|
181
|
+
__out += '<div><span>' + _$_.escape(count.value) + '</span></div>';
|
|
182
182
|
_$_.output_push(__out);
|
|
183
183
|
__out = '';
|
|
184
184
|
_$_.set_output_target('head');
|
|
185
|
-
__out += '<!--
|
|
185
|
+
__out += '<!--60e9fce1--><title>' + _$_.escape(prefix + count.value) + '</title>';
|
|
186
186
|
_$_.output_push(__out);
|
|
187
187
|
__out = '';
|
|
188
188
|
_$_.set_output_target(null);
|
|
@@ -200,7 +200,7 @@ export function MultipleHeadBlocks() {
|
|
|
200
200
|
_$_.output_push(__out);
|
|
201
201
|
__out = '';
|
|
202
202
|
_$_.set_output_target('head');
|
|
203
|
-
__out += '<!--
|
|
203
|
+
__out += '<!--e56fc100--><title>First Head</title><!--ba797fb2--><meta name="author" content="Test Author" />';
|
|
204
204
|
_$_.output_push(__out);
|
|
205
205
|
__out = '';
|
|
206
206
|
_$_.set_output_target(null);
|
|
@@ -218,7 +218,7 @@ export function HeadWithStyle() {
|
|
|
218
218
|
_$_.output_push(__out);
|
|
219
219
|
__out = '';
|
|
220
220
|
_$_.set_output_target('head');
|
|
221
|
-
__out += '<!--
|
|
221
|
+
__out += '<!--872692a0--><title>Styled Page</title>';
|
|
222
222
|
_$_.output_push(__out);
|
|
223
223
|
__out = '';
|
|
224
224
|
_$_.set_output_target(null);
|
|
@@ -24,14 +24,14 @@ export function Layout({ children }) {
|
|
|
24
24
|
|
|
25
25
|
export function Content() {
|
|
26
26
|
return _$_.tsrx_element(() => {
|
|
27
|
-
|
|
27
|
+
const visible = _$_.track(true, '0bdb1500');
|
|
28
28
|
|
|
29
29
|
_$_.regular_block(() => {
|
|
30
30
|
let __out = '';
|
|
31
31
|
|
|
32
32
|
__out += '<div class="content"><!--[-->';
|
|
33
33
|
|
|
34
|
-
if (
|
|
34
|
+
if (visible.value) {
|
|
35
35
|
__out += '<p class="text">Hello world</p>';
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -269,7 +269,7 @@ function DocFooter() {
|
|
|
269
269
|
});
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
export function DocLayout(
|
|
272
|
+
export function DocLayout({ children, editPath = '', nextLink = null, toc = [] }) {
|
|
273
273
|
return _$_.tsrx_element(() => {
|
|
274
274
|
_$_.regular_block(() => {
|
|
275
275
|
let __out = '';
|
|
@@ -279,55 +279,27 @@ export function DocLayout(__props) {
|
|
|
279
279
|
{
|
|
280
280
|
_$_.output_push(__out);
|
|
281
281
|
__out = '';
|
|
282
|
-
_$_.render_expression(
|
|
282
|
+
_$_.render_expression(children);
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
__out += '</div></article><!--[-->';
|
|
286
|
-
_$_.output_push(__out);
|
|
287
|
-
__out = '';
|
|
288
|
-
|
|
289
|
-
if (_$_.fallback(__props.editPath, '')) {
|
|
290
|
-
_$_.output_push('<div');
|
|
291
|
-
_$_.output_push(' class="edit-link"');
|
|
292
|
-
_$_.output_push('>');
|
|
293
|
-
|
|
294
|
-
{
|
|
295
|
-
_$_.output_push('<a');
|
|
296
|
-
_$_.output_push(_$_.attr('href', `https://github.com/edit/${_$_.fallback(__props.editPath, '')}`, false));
|
|
297
|
-
_$_.output_push('>');
|
|
298
|
-
|
|
299
|
-
{
|
|
300
|
-
_$_.output_push('Edit');
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
_$_.output_push('</a>');
|
|
304
|
-
}
|
|
305
286
|
|
|
306
|
-
|
|
287
|
+
if (editPath) {
|
|
288
|
+
__out += '<div class="edit-link"><a' + _$_.attr('href', `https://github.com/edit/${editPath}`, false) + '>Edit</a></div>';
|
|
307
289
|
}
|
|
308
290
|
|
|
309
291
|
__out += '<!--]--><!--[-->';
|
|
310
|
-
_$_.output_push(__out);
|
|
311
|
-
__out = '';
|
|
312
292
|
|
|
313
|
-
if (
|
|
314
|
-
_$_.
|
|
315
|
-
_$_.output_push(' class="prev-next"');
|
|
316
|
-
_$_.output_push('>');
|
|
293
|
+
if (nextLink) {
|
|
294
|
+
__out += '<nav class="prev-next"><a' + _$_.attr('href', nextLink.href, false) + '>';
|
|
317
295
|
|
|
318
296
|
{
|
|
319
|
-
_$_.output_push(
|
|
320
|
-
|
|
321
|
-
_$_.
|
|
322
|
-
|
|
323
|
-
{
|
|
324
|
-
_$_.render_expression(_$_.fallback(__props.nextLink, null).text);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
_$_.output_push('</a>');
|
|
297
|
+
_$_.output_push(__out);
|
|
298
|
+
__out = '';
|
|
299
|
+
_$_.render_expression(nextLink.text);
|
|
328
300
|
}
|
|
329
301
|
|
|
330
|
-
|
|
302
|
+
__out += '</a></nav>';
|
|
331
303
|
}
|
|
332
304
|
|
|
333
305
|
__out += '<!--]-->';
|
|
@@ -342,47 +314,15 @@ export function DocLayout(__props) {
|
|
|
342
314
|
}
|
|
343
315
|
|
|
344
316
|
__out += '</div><aside><!--[-->';
|
|
345
|
-
_$_.output_push(__out);
|
|
346
|
-
__out = '';
|
|
347
|
-
|
|
348
|
-
if (_$_.fallback(__props.toc, []).length > 0) {
|
|
349
|
-
_$_.output_push('<div');
|
|
350
|
-
_$_.output_push(' class="toc"');
|
|
351
|
-
_$_.output_push('>');
|
|
352
|
-
|
|
353
|
-
{
|
|
354
|
-
_$_.output_push('<ul');
|
|
355
|
-
_$_.output_push('>');
|
|
356
|
-
|
|
357
|
-
{
|
|
358
|
-
_$_.output_push('<!--[-->');
|
|
359
|
-
|
|
360
|
-
for (const item of _$_.fallback(__props.toc, [])) {
|
|
361
|
-
_$_.output_push('<li');
|
|
362
|
-
_$_.output_push('>');
|
|
363
317
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
_$_.output_push(_$_.attr('href', item.href, false));
|
|
367
|
-
_$_.output_push('>');
|
|
318
|
+
if (toc.length > 0) {
|
|
319
|
+
__out += '<div class="toc"><ul><!--[-->';
|
|
368
320
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
_$_.output_push('</a>');
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
_$_.output_push('</li>');
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
_$_.output_push('<!--]-->');
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
_$_.output_push('</ul>');
|
|
321
|
+
for (const item of toc) {
|
|
322
|
+
__out += '<li><a' + _$_.attr('href', item.href, false) + '>' + _$_.escape(item.text) + '</a></li>';
|
|
383
323
|
}
|
|
384
324
|
|
|
385
|
-
|
|
325
|
+
__out += '<!--]--></ul></div>';
|
|
386
326
|
}
|
|
387
327
|
|
|
388
328
|
__out += '<!--]--></aside></div>';
|
|
@@ -941,31 +881,18 @@ export function HtmlAfterComponentInChildren() {
|
|
|
941
881
|
});
|
|
942
882
|
}
|
|
943
883
|
|
|
944
|
-
function NavItem(
|
|
884
|
+
function NavItem({ href, text: label, active = false }) {
|
|
945
885
|
return _$_.tsrx_element(() => {
|
|
946
886
|
_$_.regular_block(() => {
|
|
947
887
|
let __out = '';
|
|
948
888
|
|
|
949
|
-
__out += '<div' + _$_.attr('class', `nav-item${
|
|
950
|
-
_$_.output_push(__out);
|
|
951
|
-
__out = '';
|
|
952
|
-
|
|
953
|
-
if (_$_.fallback(__props.active, false)) {
|
|
954
|
-
_$_.output_push('<div');
|
|
955
|
-
_$_.output_push(' class="indicator"');
|
|
956
|
-
_$_.output_push('>');
|
|
957
|
-
_$_.output_push('</div>');
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
__out += '<!--]--><a' + _$_.attr('href', __props.href, false) + '><span>';
|
|
889
|
+
__out += '<div' + _$_.attr('class', `nav-item${active ? ' active' : ''}`) + '><!--[-->';
|
|
961
890
|
|
|
962
|
-
{
|
|
963
|
-
|
|
964
|
-
__out = '';
|
|
965
|
-
_$_.render_expression(__props.text);
|
|
891
|
+
if (active) {
|
|
892
|
+
__out += '<div class="indicator"></div>';
|
|
966
893
|
}
|
|
967
894
|
|
|
968
|
-
__out += '</span></a></div>';
|
|
895
|
+
__out += '<!--]--><a' + _$_.attr('href', href, false) + '><span>' + _$_.escape(label) + '</span></a></div>';
|
|
969
896
|
_$_.output_push(__out);
|
|
970
897
|
});
|
|
971
898
|
});
|
|
@@ -973,14 +900,14 @@ function NavItem(__props) {
|
|
|
973
900
|
|
|
974
901
|
function SidebarSection({ title, children }) {
|
|
975
902
|
return _$_.tsrx_element(() => {
|
|
976
|
-
|
|
903
|
+
const expanded = _$_.track(true, '6ac6906f');
|
|
977
904
|
|
|
978
905
|
_$_.regular_block(() => {
|
|
979
906
|
let __out = '';
|
|
980
907
|
|
|
981
908
|
__out += '<section class="sidebar-section"><div class="section-header"><h2>' + _$_.escape(title) + '</h2><button>Toggle</button></div><!--[-->';
|
|
982
909
|
|
|
983
|
-
if (
|
|
910
|
+
if (expanded.value) {
|
|
984
911
|
__out += '<div class="section-items">';
|
|
985
912
|
|
|
986
913
|
{
|
|
@@ -1416,7 +1343,7 @@ function FooterStub() {
|
|
|
1416
1343
|
});
|
|
1417
1344
|
}
|
|
1418
1345
|
|
|
1419
|
-
function DocsLayoutInner(
|
|
1346
|
+
function DocsLayoutInner({ children, editPath = '', nextLink = null }) {
|
|
1420
1347
|
return _$_.tsrx_element(() => {
|
|
1421
1348
|
_$_.regular_block(() => {
|
|
1422
1349
|
let __out = '';
|
|
@@ -1448,55 +1375,27 @@ function DocsLayoutInner(__props) {
|
|
|
1448
1375
|
{
|
|
1449
1376
|
_$_.output_push(__out);
|
|
1450
1377
|
__out = '';
|
|
1451
|
-
_$_.render_expression(
|
|
1378
|
+
_$_.render_expression(children);
|
|
1452
1379
|
}
|
|
1453
1380
|
|
|
1454
1381
|
__out += '</div></article><!--[-->';
|
|
1455
|
-
_$_.output_push(__out);
|
|
1456
|
-
__out = '';
|
|
1457
|
-
|
|
1458
|
-
if (_$_.fallback(__props.editPath, '')) {
|
|
1459
|
-
_$_.output_push('<div');
|
|
1460
|
-
_$_.output_push(' class="edit-link"');
|
|
1461
|
-
_$_.output_push('>');
|
|
1462
|
-
|
|
1463
|
-
{
|
|
1464
|
-
_$_.output_push('<a');
|
|
1465
|
-
_$_.output_push(' href="/edit"');
|
|
1466
|
-
_$_.output_push('>');
|
|
1467
|
-
|
|
1468
|
-
{
|
|
1469
|
-
_$_.output_push('Edit on GitHub');
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
_$_.output_push('</a>');
|
|
1473
|
-
}
|
|
1474
1382
|
|
|
1475
|
-
|
|
1383
|
+
if (editPath) {
|
|
1384
|
+
__out += '<div class="edit-link"><a href="/edit">Edit on GitHub</a></div>';
|
|
1476
1385
|
}
|
|
1477
1386
|
|
|
1478
1387
|
__out += '<!--]--><!--[-->';
|
|
1479
|
-
_$_.output_push(__out);
|
|
1480
|
-
__out = '';
|
|
1481
1388
|
|
|
1482
|
-
if (
|
|
1483
|
-
_$_.
|
|
1484
|
-
_$_.output_push(' class="prev-next"');
|
|
1485
|
-
_$_.output_push('>');
|
|
1389
|
+
if (nextLink) {
|
|
1390
|
+
__out += '<nav class="prev-next"><a' + _$_.attr('href', nextLink.href, false) + '>';
|
|
1486
1391
|
|
|
1487
1392
|
{
|
|
1488
|
-
_$_.output_push(
|
|
1489
|
-
|
|
1490
|
-
_$_.
|
|
1491
|
-
|
|
1492
|
-
{
|
|
1493
|
-
_$_.render_expression(_$_.fallback(__props.nextLink, null).text);
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
_$_.output_push('</a>');
|
|
1393
|
+
_$_.output_push(__out);
|
|
1394
|
+
__out = '';
|
|
1395
|
+
_$_.render_expression(nextLink.text);
|
|
1497
1396
|
}
|
|
1498
1397
|
|
|
1499
|
-
|
|
1398
|
+
__out += '</a></nav>';
|
|
1500
1399
|
}
|
|
1501
1400
|
|
|
1502
1401
|
__out += '<!--]-->';
|
|
@@ -1572,7 +1471,15 @@ export function DocsLayoutWithoutData() {
|
|
|
1572
1471
|
});
|
|
1573
1472
|
}
|
|
1574
1473
|
|
|
1575
|
-
function DocsLayoutExact(
|
|
1474
|
+
function DocsLayoutExact(
|
|
1475
|
+
{
|
|
1476
|
+
children,
|
|
1477
|
+
editPath = '',
|
|
1478
|
+
prevLink = null,
|
|
1479
|
+
nextLink = null,
|
|
1480
|
+
toc = []
|
|
1481
|
+
}
|
|
1482
|
+
) {
|
|
1576
1483
|
return _$_.tsrx_element(() => {
|
|
1577
1484
|
_$_.regular_block(() => {
|
|
1578
1485
|
let __out = '';
|
|
@@ -1604,98 +1511,49 @@ function DocsLayoutExact(__props) {
|
|
|
1604
1511
|
{
|
|
1605
1512
|
_$_.output_push(__out);
|
|
1606
1513
|
__out = '';
|
|
1607
|
-
_$_.render_expression(
|
|
1514
|
+
_$_.render_expression(children);
|
|
1608
1515
|
}
|
|
1609
1516
|
|
|
1610
1517
|
__out += '</div></article><!--[-->';
|
|
1611
|
-
_$_.output_push(__out);
|
|
1612
|
-
__out = '';
|
|
1613
|
-
|
|
1614
|
-
if (_$_.fallback(__props.editPath, '')) {
|
|
1615
|
-
_$_.output_push('<div');
|
|
1616
|
-
_$_.output_push(' class="edit-link"');
|
|
1617
|
-
_$_.output_push('>');
|
|
1618
|
-
|
|
1619
|
-
{
|
|
1620
|
-
_$_.output_push('<a');
|
|
1621
|
-
_$_.output_push(_$_.attr('href', `/edit/${_$_.fallback(__props.editPath, '')}`, false));
|
|
1622
|
-
_$_.output_push('>');
|
|
1623
|
-
|
|
1624
|
-
{
|
|
1625
|
-
_$_.output_push('Edit on GitHub');
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
|
-
_$_.output_push('</a>');
|
|
1629
|
-
}
|
|
1630
1518
|
|
|
1631
|
-
|
|
1519
|
+
if (editPath) {
|
|
1520
|
+
__out += '<div class="edit-link"><a' + _$_.attr('href', `/edit/${editPath}`, false) + '>Edit on GitHub</a></div>';
|
|
1632
1521
|
}
|
|
1633
1522
|
|
|
1634
1523
|
__out += '<!--]--><!--[-->';
|
|
1635
|
-
_$_.output_push(__out);
|
|
1636
|
-
__out = '';
|
|
1637
|
-
|
|
1638
|
-
if (_$_.fallback(__props.prevLink, null) || _$_.fallback(__props.nextLink, null)) {
|
|
1639
|
-
_$_.output_push('<nav');
|
|
1640
|
-
_$_.output_push(' class="prev-next"');
|
|
1641
|
-
_$_.output_push('>');
|
|
1642
|
-
|
|
1643
|
-
{
|
|
1644
|
-
_$_.output_push('<!--[-->');
|
|
1645
|
-
|
|
1646
|
-
if (_$_.fallback(__props.prevLink, null)) {
|
|
1647
|
-
_$_.output_push('<a');
|
|
1648
|
-
_$_.output_push(_$_.attr('href', _$_.fallback(__props.prevLink, null).href, false));
|
|
1649
|
-
_$_.output_push(' class="pager prev"');
|
|
1650
|
-
_$_.output_push('>');
|
|
1651
|
-
|
|
1652
|
-
{
|
|
1653
|
-
_$_.output_push('<span');
|
|
1654
|
-
_$_.output_push(' class="title"');
|
|
1655
|
-
_$_.output_push('>');
|
|
1656
1524
|
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
}
|
|
1525
|
+
if (prevLink || nextLink) {
|
|
1526
|
+
__out += '<nav class="prev-next"><!--[-->';
|
|
1660
1527
|
|
|
1661
|
-
|
|
1662
|
-
|
|
1528
|
+
if (prevLink) {
|
|
1529
|
+
__out += '<a' + _$_.attr('href', prevLink.href, false) + ' class="pager prev"><span class="title">';
|
|
1663
1530
|
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
_$_.
|
|
1668
|
-
_$_.output_push('</span>');
|
|
1531
|
+
{
|
|
1532
|
+
_$_.output_push(__out);
|
|
1533
|
+
__out = '';
|
|
1534
|
+
_$_.render_expression(prevLink.text);
|
|
1669
1535
|
}
|
|
1670
1536
|
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
_$_.output_push('<a');
|
|
1676
|
-
_$_.output_push(_$_.attr('href', _$_.fallback(__props.nextLink, null).href, false));
|
|
1677
|
-
_$_.output_push(' class="pager next"');
|
|
1678
|
-
_$_.output_push('>');
|
|
1679
|
-
|
|
1680
|
-
{
|
|
1681
|
-
_$_.output_push('<span');
|
|
1682
|
-
_$_.output_push(' class="title"');
|
|
1683
|
-
_$_.output_push('>');
|
|
1537
|
+
__out += '</span></a>';
|
|
1538
|
+
} else {
|
|
1539
|
+
__out += '<span></span>';
|
|
1540
|
+
}
|
|
1684
1541
|
|
|
1685
|
-
|
|
1686
|
-
_$_.render_expression(_$_.fallback(__props.nextLink, null).text);
|
|
1687
|
-
}
|
|
1542
|
+
__out += '<!--]--><!--[-->';
|
|
1688
1543
|
|
|
1689
|
-
|
|
1690
|
-
|
|
1544
|
+
if (nextLink) {
|
|
1545
|
+
__out += '<a' + _$_.attr('href', nextLink.href, false) + ' class="pager next"><span class="title">';
|
|
1691
1546
|
|
|
1692
|
-
|
|
1547
|
+
{
|
|
1548
|
+
_$_.output_push(__out);
|
|
1549
|
+
__out = '';
|
|
1550
|
+
_$_.render_expression(nextLink.text);
|
|
1693
1551
|
}
|
|
1694
1552
|
|
|
1695
|
-
|
|
1553
|
+
__out += '</span></a>';
|
|
1696
1554
|
}
|
|
1697
1555
|
|
|
1698
|
-
|
|
1556
|
+
__out += '<!--]--></nav>';
|
|
1699
1557
|
}
|
|
1700
1558
|
|
|
1701
1559
|
__out += '<!--]-->';
|
|
@@ -1710,41 +1568,15 @@ function DocsLayoutExact(__props) {
|
|
|
1710
1568
|
}
|
|
1711
1569
|
|
|
1712
1570
|
__out += '</div></div><aside class="aside"><!--[-->';
|
|
1713
|
-
_$_.output_push(__out);
|
|
1714
|
-
__out = '';
|
|
1715
|
-
|
|
1716
|
-
if (_$_.fallback(__props.toc, []).length > 0) {
|
|
1717
|
-
_$_.output_push('<div');
|
|
1718
|
-
_$_.output_push(' class="aside-content"');
|
|
1719
|
-
_$_.output_push('>');
|
|
1720
|
-
|
|
1721
|
-
{
|
|
1722
|
-
_$_.output_push('<nav');
|
|
1723
|
-
_$_.output_push(' class="outline"');
|
|
1724
|
-
_$_.output_push('>');
|
|
1725
|
-
|
|
1726
|
-
{
|
|
1727
|
-
_$_.output_push('<!--[-->');
|
|
1728
|
-
|
|
1729
|
-
for (const item of _$_.fallback(__props.toc, [])) {
|
|
1730
|
-
_$_.output_push('<a');
|
|
1731
|
-
_$_.output_push(_$_.attr('href', item.href, false));
|
|
1732
|
-
_$_.output_push('>');
|
|
1733
|
-
|
|
1734
|
-
{
|
|
1735
|
-
_$_.render_expression(item.text);
|
|
1736
|
-
}
|
|
1737
1571
|
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
_$_.output_push('<!--]-->');
|
|
1742
|
-
}
|
|
1572
|
+
if (toc.length > 0) {
|
|
1573
|
+
__out += '<div class="aside-content"><nav class="outline"><!--[-->';
|
|
1743
1574
|
|
|
1744
|
-
|
|
1575
|
+
for (const item of toc) {
|
|
1576
|
+
__out += '<a' + _$_.attr('href', item.href, false) + '>' + _$_.escape(item.text) + '</a>';
|
|
1745
1577
|
}
|
|
1746
1578
|
|
|
1747
|
-
|
|
1579
|
+
__out += '<!--]--></nav></div>';
|
|
1748
1580
|
}
|
|
1749
1581
|
|
|
1750
1582
|
__out += '<!--]--></aside></div></main></div></div>';
|