ripple 0.3.127 → 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 +293 -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 +192 -114
- 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 +14 -5
- 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 +185 -124
- package/src/runtime/internal/client/for.js +616 -264
- 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 +9 -13
- package/src/runtime/internal/client/operations.js +44 -51
- package/src/runtime/internal/client/portal.js +163 -85
- package/src/runtime/internal/client/render.js +44 -25
- package/src/runtime/internal/client/rpc.js +3 -3
- package/src/runtime/internal/client/runtime.js +799 -576
- package/src/runtime/internal/client/selector.js +77 -0
- 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 +65 -21
- 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 +327 -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 +97 -29
- 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 +221 -0
- 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 +190 -150
- package/tests/hydration/compiled/client/for.js +1472 -1126
- package/tests/hydration/compiled/client/fragment-cursor.js +2341 -0
- package/tests/hydration/compiled/client/head.js +255 -199
- 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 -400
- package/tests/hydration/compiled/client/nested-control-flow.js +1326 -1255
- package/tests/hydration/compiled/client/portal.js +87 -95
- package/tests/hydration/compiled/client/reactivity.js +140 -83
- 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 +19 -19
- package/tests/hydration/compiled/server/for.js +109 -49
- package/tests/hydration/compiled/server/fragment-cursor.js +1687 -0
- package/tests/hydration/compiled/server/head.js +20 -28
- package/tests/hydration/compiled/server/hmr.js +2 -2
- package/tests/hydration/compiled/server/html.js +71 -247
- 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 -46
- 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,25 +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>';
|
|
182
|
-
|
|
183
|
-
{
|
|
184
|
-
_$_.output_push(__out);
|
|
185
|
-
__out = '';
|
|
186
|
-
_$_.render_expression(lazy_5.value);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
__out += '</span></div>';
|
|
181
|
+
__out += '<div><span>' + _$_.escape(count.value) + '</span></div>';
|
|
190
182
|
_$_.output_push(__out);
|
|
191
183
|
__out = '';
|
|
192
184
|
_$_.set_output_target('head');
|
|
193
|
-
__out += '<!--
|
|
185
|
+
__out += '<!--60e9fce1--><title>' + _$_.escape(prefix + count.value) + '</title>';
|
|
194
186
|
_$_.output_push(__out);
|
|
195
187
|
__out = '';
|
|
196
188
|
_$_.set_output_target(null);
|
|
@@ -208,7 +200,7 @@ export function MultipleHeadBlocks() {
|
|
|
208
200
|
_$_.output_push(__out);
|
|
209
201
|
__out = '';
|
|
210
202
|
_$_.set_output_target('head');
|
|
211
|
-
__out += '<!--
|
|
203
|
+
__out += '<!--e56fc100--><title>First Head</title><!--ba797fb2--><meta name="author" content="Test Author" />';
|
|
212
204
|
_$_.output_push(__out);
|
|
213
205
|
__out = '';
|
|
214
206
|
_$_.set_output_target(null);
|
|
@@ -226,7 +218,7 @@ export function HeadWithStyle() {
|
|
|
226
218
|
_$_.output_push(__out);
|
|
227
219
|
__out = '';
|
|
228
220
|
_$_.set_output_target('head');
|
|
229
|
-
__out += '<!--
|
|
221
|
+
__out += '<!--872692a0--><title>Styled Page</title>';
|
|
230
222
|
_$_.output_push(__out);
|
|
231
223
|
__out = '';
|
|
232
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
286
|
|
|
289
|
-
if (
|
|
290
|
-
_$_.
|
|
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
|
-
|
|
306
|
-
_$_.output_push('</div>');
|
|
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
317
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
_$_.output_push('>');
|
|
318
|
+
if (toc.length > 0) {
|
|
319
|
+
__out += '<div class="toc"><ul><!--[-->';
|
|
356
320
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
for (const item of _$_.fallback(__props.toc, [])) {
|
|
361
|
-
_$_.output_push('<li');
|
|
362
|
-
_$_.output_push('>');
|
|
363
|
-
|
|
364
|
-
{
|
|
365
|
-
_$_.output_push('<a');
|
|
366
|
-
_$_.output_push(_$_.attr('href', item.href, false));
|
|
367
|
-
_$_.output_push('>');
|
|
368
|
-
|
|
369
|
-
{
|
|
370
|
-
_$_.render_expression(item.text);
|
|
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>';
|
|
@@ -711,15 +651,7 @@ function ForList({ items }) {
|
|
|
711
651
|
__out += '<!--[-->';
|
|
712
652
|
|
|
713
653
|
for (const item of items) {
|
|
714
|
-
__out += '<span class="for-item">';
|
|
715
|
-
|
|
716
|
-
{
|
|
717
|
-
_$_.output_push(__out);
|
|
718
|
-
__out = '';
|
|
719
|
-
_$_.render_expression(item);
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
__out += '</span>';
|
|
654
|
+
__out += '<span class="for-item">' + _$_.escape(item) + '</span>';
|
|
723
655
|
}
|
|
724
656
|
|
|
725
657
|
__out += '<!--]-->';
|
|
@@ -949,31 +881,18 @@ export function HtmlAfterComponentInChildren() {
|
|
|
949
881
|
});
|
|
950
882
|
}
|
|
951
883
|
|
|
952
|
-
function NavItem(
|
|
884
|
+
function NavItem({ href, text: label, active = false }) {
|
|
953
885
|
return _$_.tsrx_element(() => {
|
|
954
886
|
_$_.regular_block(() => {
|
|
955
887
|
let __out = '';
|
|
956
888
|
|
|
957
|
-
__out += '<div' + _$_.attr('class', `nav-item${
|
|
958
|
-
_$_.output_push(__out);
|
|
959
|
-
__out = '';
|
|
889
|
+
__out += '<div' + _$_.attr('class', `nav-item${active ? ' active' : ''}`) + '><!--[-->';
|
|
960
890
|
|
|
961
|
-
if (
|
|
962
|
-
|
|
963
|
-
_$_.output_push(' class="indicator"');
|
|
964
|
-
_$_.output_push('>');
|
|
965
|
-
_$_.output_push('</div>');
|
|
891
|
+
if (active) {
|
|
892
|
+
__out += '<div class="indicator"></div>';
|
|
966
893
|
}
|
|
967
894
|
|
|
968
|
-
__out += '<!--]--><a' + _$_.attr('href',
|
|
969
|
-
|
|
970
|
-
{
|
|
971
|
-
_$_.output_push(__out);
|
|
972
|
-
__out = '';
|
|
973
|
-
_$_.render_expression(__props.text);
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
__out += '</span></a></div>';
|
|
895
|
+
__out += '<!--]--><a' + _$_.attr('href', href, false) + '><span>' + _$_.escape(label) + '</span></a></div>';
|
|
977
896
|
_$_.output_push(__out);
|
|
978
897
|
});
|
|
979
898
|
});
|
|
@@ -981,14 +900,14 @@ function NavItem(__props) {
|
|
|
981
900
|
|
|
982
901
|
function SidebarSection({ title, children }) {
|
|
983
902
|
return _$_.tsrx_element(() => {
|
|
984
|
-
|
|
903
|
+
const expanded = _$_.track(true, '6ac6906f');
|
|
985
904
|
|
|
986
905
|
_$_.regular_block(() => {
|
|
987
906
|
let __out = '';
|
|
988
907
|
|
|
989
908
|
__out += '<section class="sidebar-section"><div class="section-header"><h2>' + _$_.escape(title) + '</h2><button>Toggle</button></div><!--[-->';
|
|
990
909
|
|
|
991
|
-
if (
|
|
910
|
+
if (expanded.value) {
|
|
992
911
|
__out += '<div class="section-items">';
|
|
993
912
|
|
|
994
913
|
{
|
|
@@ -1424,7 +1343,7 @@ function FooterStub() {
|
|
|
1424
1343
|
});
|
|
1425
1344
|
}
|
|
1426
1345
|
|
|
1427
|
-
function DocsLayoutInner(
|
|
1346
|
+
function DocsLayoutInner({ children, editPath = '', nextLink = null }) {
|
|
1428
1347
|
return _$_.tsrx_element(() => {
|
|
1429
1348
|
_$_.regular_block(() => {
|
|
1430
1349
|
let __out = '';
|
|
@@ -1456,55 +1375,27 @@ function DocsLayoutInner(__props) {
|
|
|
1456
1375
|
{
|
|
1457
1376
|
_$_.output_push(__out);
|
|
1458
1377
|
__out = '';
|
|
1459
|
-
_$_.render_expression(
|
|
1378
|
+
_$_.render_expression(children);
|
|
1460
1379
|
}
|
|
1461
1380
|
|
|
1462
1381
|
__out += '</div></article><!--[-->';
|
|
1463
|
-
_$_.output_push(__out);
|
|
1464
|
-
__out = '';
|
|
1465
|
-
|
|
1466
|
-
if (_$_.fallback(__props.editPath, '')) {
|
|
1467
|
-
_$_.output_push('<div');
|
|
1468
|
-
_$_.output_push(' class="edit-link"');
|
|
1469
|
-
_$_.output_push('>');
|
|
1470
|
-
|
|
1471
|
-
{
|
|
1472
|
-
_$_.output_push('<a');
|
|
1473
|
-
_$_.output_push(' href="/edit"');
|
|
1474
|
-
_$_.output_push('>');
|
|
1475
|
-
|
|
1476
|
-
{
|
|
1477
|
-
_$_.output_push('Edit on GitHub');
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
_$_.output_push('</a>');
|
|
1481
|
-
}
|
|
1482
1382
|
|
|
1483
|
-
|
|
1383
|
+
if (editPath) {
|
|
1384
|
+
__out += '<div class="edit-link"><a href="/edit">Edit on GitHub</a></div>';
|
|
1484
1385
|
}
|
|
1485
1386
|
|
|
1486
1387
|
__out += '<!--]--><!--[-->';
|
|
1487
|
-
_$_.output_push(__out);
|
|
1488
|
-
__out = '';
|
|
1489
1388
|
|
|
1490
|
-
if (
|
|
1491
|
-
_$_.
|
|
1492
|
-
_$_.output_push(' class="prev-next"');
|
|
1493
|
-
_$_.output_push('>');
|
|
1389
|
+
if (nextLink) {
|
|
1390
|
+
__out += '<nav class="prev-next"><a' + _$_.attr('href', nextLink.href, false) + '>';
|
|
1494
1391
|
|
|
1495
1392
|
{
|
|
1496
|
-
_$_.output_push(
|
|
1497
|
-
|
|
1498
|
-
_$_.
|
|
1499
|
-
|
|
1500
|
-
{
|
|
1501
|
-
_$_.render_expression(_$_.fallback(__props.nextLink, null).text);
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
_$_.output_push('</a>');
|
|
1393
|
+
_$_.output_push(__out);
|
|
1394
|
+
__out = '';
|
|
1395
|
+
_$_.render_expression(nextLink.text);
|
|
1505
1396
|
}
|
|
1506
1397
|
|
|
1507
|
-
|
|
1398
|
+
__out += '</a></nav>';
|
|
1508
1399
|
}
|
|
1509
1400
|
|
|
1510
1401
|
__out += '<!--]-->';
|
|
@@ -1580,7 +1471,15 @@ export function DocsLayoutWithoutData() {
|
|
|
1580
1471
|
});
|
|
1581
1472
|
}
|
|
1582
1473
|
|
|
1583
|
-
function DocsLayoutExact(
|
|
1474
|
+
function DocsLayoutExact(
|
|
1475
|
+
{
|
|
1476
|
+
children,
|
|
1477
|
+
editPath = '',
|
|
1478
|
+
prevLink = null,
|
|
1479
|
+
nextLink = null,
|
|
1480
|
+
toc = []
|
|
1481
|
+
}
|
|
1482
|
+
) {
|
|
1584
1483
|
return _$_.tsrx_element(() => {
|
|
1585
1484
|
_$_.regular_block(() => {
|
|
1586
1485
|
let __out = '';
|
|
@@ -1612,98 +1511,49 @@ function DocsLayoutExact(__props) {
|
|
|
1612
1511
|
{
|
|
1613
1512
|
_$_.output_push(__out);
|
|
1614
1513
|
__out = '';
|
|
1615
|
-
_$_.render_expression(
|
|
1514
|
+
_$_.render_expression(children);
|
|
1616
1515
|
}
|
|
1617
1516
|
|
|
1618
1517
|
__out += '</div></article><!--[-->';
|
|
1619
|
-
_$_.output_push(__out);
|
|
1620
|
-
__out = '';
|
|
1621
1518
|
|
|
1622
|
-
if (
|
|
1623
|
-
_$_.
|
|
1624
|
-
_$_.output_push(' class="edit-link"');
|
|
1625
|
-
_$_.output_push('>');
|
|
1626
|
-
|
|
1627
|
-
{
|
|
1628
|
-
_$_.output_push('<a');
|
|
1629
|
-
_$_.output_push(_$_.attr('href', `/edit/${_$_.fallback(__props.editPath, '')}`, false));
|
|
1630
|
-
_$_.output_push('>');
|
|
1631
|
-
|
|
1632
|
-
{
|
|
1633
|
-
_$_.output_push('Edit on GitHub');
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
|
-
_$_.output_push('</a>');
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
_$_.output_push('</div>');
|
|
1519
|
+
if (editPath) {
|
|
1520
|
+
__out += '<div class="edit-link"><a' + _$_.attr('href', `/edit/${editPath}`, false) + '>Edit on GitHub</a></div>';
|
|
1640
1521
|
}
|
|
1641
1522
|
|
|
1642
1523
|
__out += '<!--]--><!--[-->';
|
|
1643
|
-
_$_.output_push(__out);
|
|
1644
|
-
__out = '';
|
|
1645
|
-
|
|
1646
|
-
if (_$_.fallback(__props.prevLink, null) || _$_.fallback(__props.nextLink, null)) {
|
|
1647
|
-
_$_.output_push('<nav');
|
|
1648
|
-
_$_.output_push(' class="prev-next"');
|
|
1649
|
-
_$_.output_push('>');
|
|
1650
1524
|
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
if (_$_.fallback(__props.prevLink, null)) {
|
|
1655
|
-
_$_.output_push('<a');
|
|
1656
|
-
_$_.output_push(_$_.attr('href', _$_.fallback(__props.prevLink, null).href, false));
|
|
1657
|
-
_$_.output_push(' class="pager prev"');
|
|
1658
|
-
_$_.output_push('>');
|
|
1525
|
+
if (prevLink || nextLink) {
|
|
1526
|
+
__out += '<nav class="prev-next"><!--[-->';
|
|
1659
1527
|
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
_$_.output_push(' class="title"');
|
|
1663
|
-
_$_.output_push('>');
|
|
1528
|
+
if (prevLink) {
|
|
1529
|
+
__out += '<a' + _$_.attr('href', prevLink.href, false) + ' class="pager prev"><span class="title">';
|
|
1664
1530
|
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
_$_.output_push('</span>');
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
_$_.output_push('</a>');
|
|
1673
|
-
} else {
|
|
1674
|
-
_$_.output_push('<span');
|
|
1675
|
-
_$_.output_push('>');
|
|
1676
|
-
_$_.output_push('</span>');
|
|
1531
|
+
{
|
|
1532
|
+
_$_.output_push(__out);
|
|
1533
|
+
__out = '';
|
|
1534
|
+
_$_.render_expression(prevLink.text);
|
|
1677
1535
|
}
|
|
1678
1536
|
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
_$_.output_push('<a');
|
|
1684
|
-
_$_.output_push(_$_.attr('href', _$_.fallback(__props.nextLink, null).href, false));
|
|
1685
|
-
_$_.output_push(' class="pager next"');
|
|
1686
|
-
_$_.output_push('>');
|
|
1687
|
-
|
|
1688
|
-
{
|
|
1689
|
-
_$_.output_push('<span');
|
|
1690
|
-
_$_.output_push(' class="title"');
|
|
1691
|
-
_$_.output_push('>');
|
|
1537
|
+
__out += '</span></a>';
|
|
1538
|
+
} else {
|
|
1539
|
+
__out += '<span></span>';
|
|
1540
|
+
}
|
|
1692
1541
|
|
|
1693
|
-
|
|
1694
|
-
_$_.render_expression(_$_.fallback(__props.nextLink, null).text);
|
|
1695
|
-
}
|
|
1542
|
+
__out += '<!--]--><!--[-->';
|
|
1696
1543
|
|
|
1697
|
-
|
|
1698
|
-
|
|
1544
|
+
if (nextLink) {
|
|
1545
|
+
__out += '<a' + _$_.attr('href', nextLink.href, false) + ' class="pager next"><span class="title">';
|
|
1699
1546
|
|
|
1700
|
-
|
|
1547
|
+
{
|
|
1548
|
+
_$_.output_push(__out);
|
|
1549
|
+
__out = '';
|
|
1550
|
+
_$_.render_expression(nextLink.text);
|
|
1701
1551
|
}
|
|
1702
1552
|
|
|
1703
|
-
|
|
1553
|
+
__out += '</span></a>';
|
|
1704
1554
|
}
|
|
1705
1555
|
|
|
1706
|
-
|
|
1556
|
+
__out += '<!--]--></nav>';
|
|
1707
1557
|
}
|
|
1708
1558
|
|
|
1709
1559
|
__out += '<!--]-->';
|
|
@@ -1718,41 +1568,15 @@ function DocsLayoutExact(__props) {
|
|
|
1718
1568
|
}
|
|
1719
1569
|
|
|
1720
1570
|
__out += '</div></div><aside class="aside"><!--[-->';
|
|
1721
|
-
_$_.output_push(__out);
|
|
1722
|
-
__out = '';
|
|
1723
|
-
|
|
1724
|
-
if (_$_.fallback(__props.toc, []).length > 0) {
|
|
1725
|
-
_$_.output_push('<div');
|
|
1726
|
-
_$_.output_push(' class="aside-content"');
|
|
1727
|
-
_$_.output_push('>');
|
|
1728
|
-
|
|
1729
|
-
{
|
|
1730
|
-
_$_.output_push('<nav');
|
|
1731
|
-
_$_.output_push(' class="outline"');
|
|
1732
|
-
_$_.output_push('>');
|
|
1733
|
-
|
|
1734
|
-
{
|
|
1735
|
-
_$_.output_push('<!--[-->');
|
|
1736
|
-
|
|
1737
|
-
for (const item of _$_.fallback(__props.toc, [])) {
|
|
1738
|
-
_$_.output_push('<a');
|
|
1739
|
-
_$_.output_push(_$_.attr('href', item.href, false));
|
|
1740
|
-
_$_.output_push('>');
|
|
1741
|
-
|
|
1742
|
-
{
|
|
1743
|
-
_$_.render_expression(item.text);
|
|
1744
|
-
}
|
|
1745
1571
|
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
_$_.output_push('<!--]-->');
|
|
1750
|
-
}
|
|
1572
|
+
if (toc.length > 0) {
|
|
1573
|
+
__out += '<div class="aside-content"><nav class="outline"><!--[-->';
|
|
1751
1574
|
|
|
1752
|
-
|
|
1575
|
+
for (const item of toc) {
|
|
1576
|
+
__out += '<a' + _$_.attr('href', item.href, false) + '>' + _$_.escape(item.text) + '</a>';
|
|
1753
1577
|
}
|
|
1754
1578
|
|
|
1755
|
-
|
|
1579
|
+
__out += '<!--]--></nav></div>';
|
|
1756
1580
|
}
|
|
1757
1581
|
|
|
1758
1582
|
__out += '<!--]--></aside></div></main></div></div>';
|