ripple 0.2.215 → 0.3.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 +86 -0
- package/package.json +16 -7
- package/src/compiler/errors.js +1 -1
- package/src/compiler/identifier-utils.js +2 -0
- package/src/compiler/index.d.ts +2 -6
- package/src/compiler/phases/1-parse/index.js +171 -233
- package/src/compiler/phases/2-analyze/index.js +216 -16
- package/src/compiler/phases/2-analyze/prune.js +2 -2
- package/src/compiler/phases/3-transform/client/index.js +326 -94
- package/src/compiler/phases/3-transform/segments.js +43 -15
- package/src/compiler/phases/3-transform/server/index.js +71 -21
- package/src/compiler/scope.js +31 -12
- package/src/compiler/source-map-utils.js +4 -6
- package/src/compiler/types/acorn.d.ts +11 -0
- package/src/compiler/types/estree-jsx.d.ts +11 -0
- package/src/compiler/types/estree.d.ts +11 -0
- package/src/compiler/types/import.d.ts +32 -18
- package/src/compiler/types/index.d.ts +75 -23
- package/src/compiler/types/parse.d.ts +7 -10
- package/src/compiler/utils.js +48 -0
- package/src/runtime/array.js +53 -22
- package/src/runtime/date.js +15 -5
- package/src/runtime/index-client.js +41 -7
- package/src/runtime/index-server.js +7 -7
- package/src/runtime/internal/client/bindings.js +2 -2
- package/src/runtime/internal/client/blocks.js +40 -1
- package/src/runtime/internal/client/context.js +8 -0
- package/src/runtime/internal/client/for.js +3 -3
- package/src/runtime/internal/client/index.js +32 -5
- package/src/runtime/internal/client/render.js +20 -8
- package/src/runtime/internal/client/runtime.js +9 -7
- package/src/runtime/internal/client/template.js +1 -1
- package/src/runtime/internal/client/try.js +15 -22
- package/src/runtime/internal/client/utils.js +1 -1
- package/src/runtime/internal/server/context.js +8 -0
- package/src/runtime/internal/server/index.js +99 -6
- package/src/runtime/map.js +7 -7
- package/src/runtime/media-query.js +10 -1
- package/src/runtime/object.js +6 -6
- package/src/runtime/proxy.js +6 -6
- package/src/runtime/set.js +11 -11
- package/src/runtime/url-search-params.js +13 -2
- package/src/runtime/url.js +15 -5
- package/src/utils/builders.js +13 -3
- package/tests/client/array/array.copy-within.test.ripple +11 -11
- package/tests/client/array/array.derived.test.ripple +42 -42
- package/tests/client/array/array.iteration.test.ripple +12 -12
- package/tests/client/array/array.mutations.test.ripple +25 -25
- package/tests/client/array/array.static.test.ripple +103 -106
- package/tests/client/array/array.to-methods.test.ripple +8 -8
- package/tests/client/async-suspend.test.ripple +94 -0
- package/tests/client/basic/basic.attributes.test.ripple +31 -31
- package/tests/client/basic/basic.collections.test.ripple +7 -7
- package/tests/client/basic/basic.components.test.ripple +48 -10
- package/tests/client/basic/basic.errors.test.ripple +111 -30
- package/tests/client/basic/basic.events.test.ripple +11 -11
- package/tests/client/basic/basic.get-set.test.ripple +18 -18
- package/tests/client/basic/basic.reactivity.test.ripple +47 -42
- package/tests/client/basic/basic.rendering.test.ripple +7 -7
- package/tests/client/basic/basic.utilities.test.ripple +4 -4
- package/tests/client/boundaries.test.ripple +7 -7
- package/tests/client/compiler/__snapshots__/compiler.assignments.test.ripple.snap +2 -2
- package/tests/client/compiler/compiler.assignments.test.ripple +21 -21
- package/tests/client/compiler/compiler.basic.test.ripple +223 -82
- package/tests/client/compiler/compiler.tracked-access.test.ripple +8 -9
- package/tests/client/composite/composite.dynamic-components.test.ripple +8 -8
- package/tests/client/composite/composite.generics.test.ripple +4 -4
- package/tests/client/composite/composite.props.test.ripple +9 -9
- package/tests/client/composite/composite.reactivity.test.ripple +32 -26
- package/tests/client/composite/composite.render.test.ripple +13 -4
- package/tests/client/computed-properties.test.ripple +3 -3
- package/tests/client/context.test.ripple +3 -3
- package/tests/client/css/global-additional-cases.test.ripple +4 -4
- package/tests/client/css/style-identifier.test.ripple +49 -41
- package/tests/client/date.test.ripple +40 -40
- package/tests/client/dynamic-elements.test.ripple +165 -30
- package/tests/client/events.test.ripple +25 -25
- package/tests/client/for.test.ripple +76 -8
- package/tests/client/function-overload.test.ripple +0 -1
- package/tests/client/head.test.ripple +7 -7
- package/tests/client/html.test.ripple +2 -2
- package/tests/client/input-value.test.ripple +174 -176
- package/tests/client/map.test.ripple +21 -21
- package/tests/client/media-query.test.ripple +4 -4
- package/tests/client/object.test.ripple +12 -12
- package/tests/client/portal.test.ripple +4 -4
- package/tests/client/ref.test.ripple +5 -5
- package/tests/client/return.test.ripple +17 -17
- package/tests/client/set.test.ripple +16 -16
- package/tests/client/svg.test.ripple +6 -7
- package/tests/client/switch.test.ripple +10 -10
- package/tests/client/tracked-expression.test.ripple +1 -3
- package/tests/client/try.test.ripple +56 -4
- package/tests/client/url/url.derived.test.ripple +10 -9
- package/tests/client/url/url.parsing.test.ripple +10 -10
- package/tests/client/url/url.partial-removal.test.ripple +10 -10
- package/tests/client/url/url.reactivity.test.ripple +17 -17
- package/tests/client/url/url.serialization.test.ripple +4 -4
- package/tests/client/url-search-params/url-search-params.derived.test.ripple +11 -10
- package/tests/client/url-search-params/url-search-params.initialization.test.ripple +5 -7
- package/tests/client/url-search-params/url-search-params.iteration.test.ripple +13 -13
- package/tests/client/url-search-params/url-search-params.mutation.test.ripple +19 -19
- package/tests/client/url-search-params/url-search-params.retrieval.test.ripple +17 -17
- package/tests/client/url-search-params/url-search-params.serialization.test.ripple +5 -5
- package/tests/client/url-search-params/url-search-params.tracked-url.test.ripple +5 -5
- package/tests/hydration/compiled/client/events.js +8 -11
- package/tests/hydration/compiled/client/for.js +20 -23
- package/tests/hydration/compiled/client/head.js +17 -19
- package/tests/hydration/compiled/client/hmr.js +84 -0
- package/tests/hydration/compiled/client/html.js +1 -15
- package/tests/hydration/compiled/client/if-children.js +7 -9
- package/tests/hydration/compiled/client/if.js +5 -7
- package/tests/hydration/compiled/client/mixed-control-flow.js +3 -5
- package/tests/hydration/compiled/client/portal.js +1 -1
- package/tests/hydration/compiled/client/reactivity.js +9 -11
- package/tests/hydration/compiled/client/return.js +11 -13
- package/tests/hydration/compiled/client/switch.js +4 -6
- package/tests/hydration/compiled/server/basic.js +0 -1
- package/tests/hydration/compiled/server/composite.js +0 -3
- package/tests/hydration/compiled/server/events.js +8 -12
- package/tests/hydration/compiled/server/for.js +20 -23
- package/tests/hydration/compiled/server/head.js +17 -19
- package/tests/hydration/compiled/server/hmr.js +107 -0
- package/tests/hydration/compiled/server/html.js +1 -35
- package/tests/hydration/compiled/server/if-children.js +7 -11
- package/tests/hydration/compiled/server/if.js +5 -7
- package/tests/hydration/compiled/server/mixed-control-flow.js +3 -5
- package/tests/hydration/compiled/server/portal.js +1 -9
- package/tests/hydration/compiled/server/reactivity.js +9 -11
- package/tests/hydration/compiled/server/return.js +11 -13
- package/tests/hydration/compiled/server/switch.js +4 -6
- package/tests/hydration/components/events.ripple +8 -9
- package/tests/hydration/components/for.ripple +20 -21
- package/tests/hydration/components/head.ripple +6 -8
- package/tests/hydration/components/hmr.ripple +34 -0
- package/tests/hydration/components/html.ripple +1 -3
- package/tests/hydration/components/if-children.ripple +7 -8
- package/tests/hydration/components/if.ripple +5 -6
- package/tests/hydration/components/mixed-control-flow.ripple +4 -6
- package/tests/hydration/components/portal.ripple +1 -1
- package/tests/hydration/components/reactivity.ripple +9 -10
- package/tests/hydration/components/return.ripple +11 -12
- package/tests/hydration/components/switch.ripple +6 -8
- package/tests/hydration/hmr.test.js +74 -0
- package/tests/server/await.test.ripple +2 -2
- package/tests/server/basic.attributes.test.ripple +19 -21
- package/tests/server/basic.components.test.ripple +13 -7
- package/tests/server/basic.test.ripple +20 -21
- package/tests/server/compiler.test.ripple +5 -5
- package/tests/server/composite.props.test.ripple +6 -7
- package/tests/server/composite.test.ripple +4 -4
- package/tests/server/context.test.ripple +1 -3
- package/tests/server/dynamic-elements.test.ripple +24 -24
- package/tests/server/head.test.ripple +5 -7
- package/tests/server/style-identifier.test.ripple +16 -17
- package/types/index.d.ts +266 -62
- package/types/server.d.ts +6 -6
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import * as _$_ from 'ripple/internal/server';
|
|
3
3
|
|
|
4
|
-
import { track } from 'ripple/server';
|
|
5
|
-
|
|
6
4
|
export function StaticForLoop(__output) {
|
|
7
5
|
_$_.push_component();
|
|
8
6
|
|
|
@@ -100,7 +98,7 @@ export function KeyedForLoop(__output) {
|
|
|
100
98
|
export function ReactiveForLoopAdd(__output) {
|
|
101
99
|
_$_.push_component();
|
|
102
100
|
|
|
103
|
-
let items = track(['A', 'B']);
|
|
101
|
+
let items = _$_.track(['A', 'B']);
|
|
104
102
|
|
|
105
103
|
__output.push('<button');
|
|
106
104
|
__output.push(' class="add"');
|
|
@@ -138,7 +136,7 @@ export function ReactiveForLoopAdd(__output) {
|
|
|
138
136
|
export function ReactiveForLoopRemove(__output) {
|
|
139
137
|
_$_.push_component();
|
|
140
138
|
|
|
141
|
-
let items = track(['A', 'B', 'C']);
|
|
139
|
+
let items = _$_.track(['A', 'B', 'C']);
|
|
142
140
|
|
|
143
141
|
__output.push('<button');
|
|
144
142
|
__output.push(' class="remove"');
|
|
@@ -176,7 +174,7 @@ export function ReactiveForLoopRemove(__output) {
|
|
|
176
174
|
export function ForLoopInteractive(__output) {
|
|
177
175
|
_$_.push_component();
|
|
178
176
|
|
|
179
|
-
let counts = track([0, 0, 0]);
|
|
177
|
+
let counts = _$_.track([0, 0, 0]);
|
|
180
178
|
|
|
181
179
|
__output.push('<div');
|
|
182
180
|
__output.push('>');
|
|
@@ -357,7 +355,7 @@ export function ForLoopComplexObjects(__output) {
|
|
|
357
355
|
export function KeyedForLoopReorder(__output) {
|
|
358
356
|
_$_.push_component();
|
|
359
357
|
|
|
360
|
-
let items = track([
|
|
358
|
+
let items = _$_.track([
|
|
361
359
|
{ id: 1, name: 'First' },
|
|
362
360
|
{ id: 2, name: 'Second' },
|
|
363
361
|
{ id: 3, name: 'Third' }
|
|
@@ -400,7 +398,7 @@ export function KeyedForLoopReorder(__output) {
|
|
|
400
398
|
export function KeyedForLoopUpdate(__output) {
|
|
401
399
|
_$_.push_component();
|
|
402
400
|
|
|
403
|
-
let items = track([{ id: 1, name: 'Item 1' }, { id: 2, name: 'Item 2' }]);
|
|
401
|
+
let items = _$_.track([{ id: 1, name: 'Item 1' }, { id: 2, name: 'Item 2' }]);
|
|
404
402
|
|
|
405
403
|
__output.push('<button');
|
|
406
404
|
__output.push(' class="update"');
|
|
@@ -439,7 +437,7 @@ export function KeyedForLoopUpdate(__output) {
|
|
|
439
437
|
export function ForLoopMixedOperations(__output) {
|
|
440
438
|
_$_.push_component();
|
|
441
439
|
|
|
442
|
-
let items = track(['A', 'B', 'C', 'D']);
|
|
440
|
+
let items = _$_.track(['A', 'B', 'C', 'D']);
|
|
443
441
|
|
|
444
442
|
__output.push('<button');
|
|
445
443
|
__output.push(' class="shuffle"');
|
|
@@ -478,8 +476,8 @@ export function ForLoopMixedOperations(__output) {
|
|
|
478
476
|
export function ForLoopInsideIf(__output) {
|
|
479
477
|
_$_.push_component();
|
|
480
478
|
|
|
481
|
-
let showList = track(true);
|
|
482
|
-
let items = track(['X', 'Y', 'Z']);
|
|
479
|
+
let showList = _$_.track(true);
|
|
480
|
+
let items = _$_.track(['X', 'Y', 'Z']);
|
|
483
481
|
|
|
484
482
|
__output.push('<button');
|
|
485
483
|
__output.push(' class="toggle"');
|
|
@@ -533,7 +531,7 @@ export function ForLoopInsideIf(__output) {
|
|
|
533
531
|
export function ForLoopEmptyToPopulated(__output) {
|
|
534
532
|
_$_.push_component();
|
|
535
533
|
|
|
536
|
-
let items = track([]);
|
|
534
|
+
let items = _$_.track([]);
|
|
537
535
|
|
|
538
536
|
__output.push('<button');
|
|
539
537
|
__output.push(' class="populate"');
|
|
@@ -572,7 +570,7 @@ export function ForLoopEmptyToPopulated(__output) {
|
|
|
572
570
|
export function ForLoopPopulatedToEmpty(__output) {
|
|
573
571
|
_$_.push_component();
|
|
574
572
|
|
|
575
|
-
let items = track(['One', 'Two', 'Three']);
|
|
573
|
+
let items = _$_.track(['One', 'Two', 'Three']);
|
|
576
574
|
|
|
577
575
|
__output.push('<button');
|
|
578
576
|
__output.push(' class="clear"');
|
|
@@ -611,7 +609,7 @@ export function ForLoopPopulatedToEmpty(__output) {
|
|
|
611
609
|
export function NestedForLoopReactive(__output) {
|
|
612
610
|
_$_.push_component();
|
|
613
611
|
|
|
614
|
-
let grid = track([[1, 2], [3, 4]]);
|
|
612
|
+
let grid = _$_.track([[1, 2], [3, 4]]);
|
|
615
613
|
|
|
616
614
|
__output.push('<button');
|
|
617
615
|
__output.push(' class="add-row"');
|
|
@@ -684,7 +682,6 @@ export function ForLoopDeeplyNested(__output) {
|
|
|
684
682
|
{
|
|
685
683
|
id: 'd1',
|
|
686
684
|
name: 'Engineering',
|
|
687
|
-
|
|
688
685
|
teams: [
|
|
689
686
|
{ id: 't1', name: 'Frontend', members: ['Alice', 'Bob'] },
|
|
690
687
|
{ id: 't2', name: 'Backend', members: ['Charlie'] }
|
|
@@ -780,7 +777,7 @@ export function ForLoopDeeplyNested(__output) {
|
|
|
780
777
|
export function ForLoopIndexUpdate(__output) {
|
|
781
778
|
_$_.push_component();
|
|
782
779
|
|
|
783
|
-
let items = track(['First', 'Second', 'Third']);
|
|
780
|
+
let items = _$_.track(['First', 'Second', 'Third']);
|
|
784
781
|
|
|
785
782
|
__output.push('<button');
|
|
786
783
|
__output.push(' class="prepend"');
|
|
@@ -822,7 +819,7 @@ export function ForLoopIndexUpdate(__output) {
|
|
|
822
819
|
export function KeyedForLoopWithIndex(__output) {
|
|
823
820
|
_$_.push_component();
|
|
824
821
|
|
|
825
|
-
let items = track([
|
|
822
|
+
let items = _$_.track([
|
|
826
823
|
{ id: 'a', value: 'Alpha' },
|
|
827
824
|
{ id: 'b', value: 'Beta' },
|
|
828
825
|
{ id: 'c', value: 'Gamma' }
|
|
@@ -869,7 +866,7 @@ export function KeyedForLoopWithIndex(__output) {
|
|
|
869
866
|
export function ForLoopWithSiblings(__output) {
|
|
870
867
|
_$_.push_component();
|
|
871
868
|
|
|
872
|
-
let items = track(['A', 'B']);
|
|
869
|
+
let items = _$_.track(['A', 'B']);
|
|
873
870
|
|
|
874
871
|
__output.push('<div');
|
|
875
872
|
__output.push(' class="wrapper"');
|
|
@@ -958,7 +955,7 @@ export function ForLoopItemState(__output) {
|
|
|
958
955
|
function TodoItem(__output, props) {
|
|
959
956
|
_$_.push_component();
|
|
960
957
|
|
|
961
|
-
let done = track(false);
|
|
958
|
+
let done = _$_.track(false);
|
|
962
959
|
|
|
963
960
|
__output.push('<div');
|
|
964
961
|
__output.push(_$_.attr('class', `todo-${props.id}`));
|
|
@@ -1018,7 +1015,7 @@ export function ForLoopSingleItem(__output) {
|
|
|
1018
1015
|
export function ForLoopAddAtBeginning(__output) {
|
|
1019
1016
|
_$_.push_component();
|
|
1020
1017
|
|
|
1021
|
-
let items = track(['B', 'C']);
|
|
1018
|
+
let items = _$_.track(['B', 'C']);
|
|
1022
1019
|
|
|
1023
1020
|
__output.push('<button');
|
|
1024
1021
|
__output.push(' class="prepend"');
|
|
@@ -1057,7 +1054,7 @@ export function ForLoopAddAtBeginning(__output) {
|
|
|
1057
1054
|
export function ForLoopAddInMiddle(__output) {
|
|
1058
1055
|
_$_.push_component();
|
|
1059
1056
|
|
|
1060
|
-
let items = track(['A', 'C']);
|
|
1057
|
+
let items = _$_.track(['A', 'C']);
|
|
1061
1058
|
|
|
1062
1059
|
__output.push('<button');
|
|
1063
1060
|
__output.push(' class="insert"');
|
|
@@ -1096,7 +1093,7 @@ export function ForLoopAddInMiddle(__output) {
|
|
|
1096
1093
|
export function ForLoopRemoveFromMiddle(__output) {
|
|
1097
1094
|
_$_.push_component();
|
|
1098
1095
|
|
|
1099
|
-
let items = track(['A', 'B', 'C']);
|
|
1096
|
+
let items = _$_.track(['A', 'B', 'C']);
|
|
1100
1097
|
|
|
1101
1098
|
__output.push('<button');
|
|
1102
1099
|
__output.push(' class="remove-middle"');
|
|
@@ -1169,7 +1166,7 @@ export function ForLoopLargeList(__output) {
|
|
|
1169
1166
|
export function ForLoopSwap(__output) {
|
|
1170
1167
|
_$_.push_component();
|
|
1171
1168
|
|
|
1172
|
-
let items = track(['A', 'B', 'C', 'D']);
|
|
1169
|
+
let items = _$_.track(['A', 'B', 'C', 'D']);
|
|
1173
1170
|
|
|
1174
1171
|
__output.push('<button');
|
|
1175
1172
|
__output.push(' class="swap"');
|
|
@@ -1208,7 +1205,7 @@ export function ForLoopSwap(__output) {
|
|
|
1208
1205
|
export function ForLoopReverse(__output) {
|
|
1209
1206
|
_$_.push_component();
|
|
1210
1207
|
|
|
1211
|
-
let items = track(['A', 'B', 'C', 'D']);
|
|
1208
|
+
let items = _$_.track(['A', 'B', 'C', 'D']);
|
|
1212
1209
|
|
|
1213
1210
|
__output.push('<button');
|
|
1214
1211
|
__output.push(' class="reverse"');
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import * as _$_ from 'ripple/internal/server';
|
|
3
3
|
|
|
4
|
-
import { track } from 'ripple/server';
|
|
5
|
-
|
|
6
4
|
export function StaticTitle(__output) {
|
|
7
5
|
_$_.push_component();
|
|
8
6
|
__output.push('<div');
|
|
@@ -14,7 +12,7 @@ export function StaticTitle(__output) {
|
|
|
14
12
|
|
|
15
13
|
__output.push('</div>');
|
|
16
14
|
__output.target = 'head';
|
|
17
|
-
__output.push('<!--
|
|
15
|
+
__output.push('<!--df6gdi-->');
|
|
18
16
|
__output.push('<title');
|
|
19
17
|
__output.push('>');
|
|
20
18
|
|
|
@@ -30,7 +28,7 @@ export function StaticTitle(__output) {
|
|
|
30
28
|
export function ReactiveTitle(__output) {
|
|
31
29
|
_$_.push_component();
|
|
32
30
|
|
|
33
|
-
let title = track('Initial Title');
|
|
31
|
+
let title = _$_.track('Initial Title');
|
|
34
32
|
|
|
35
33
|
__output.push('<div');
|
|
36
34
|
__output.push('>');
|
|
@@ -48,7 +46,7 @@ export function ReactiveTitle(__output) {
|
|
|
48
46
|
|
|
49
47
|
__output.push('</div>');
|
|
50
48
|
__output.target = 'head';
|
|
51
|
-
__output.push('<!--
|
|
49
|
+
__output.push('<!--13wropz-->');
|
|
52
50
|
__output.push('<title');
|
|
53
51
|
__output.push('>');
|
|
54
52
|
|
|
@@ -72,7 +70,7 @@ export function MultipleHeadElements(__output) {
|
|
|
72
70
|
|
|
73
71
|
__output.push('</div>');
|
|
74
72
|
__output.target = 'head';
|
|
75
|
-
__output.push('<!--
|
|
73
|
+
__output.push('<!--jbv4cs-->');
|
|
76
74
|
__output.push('<title');
|
|
77
75
|
__output.push('>');
|
|
78
76
|
|
|
@@ -96,7 +94,7 @@ export function MultipleHeadElements(__output) {
|
|
|
96
94
|
export function ReactiveMetaTags(__output) {
|
|
97
95
|
_$_.push_component();
|
|
98
96
|
|
|
99
|
-
let description = track('Initial description');
|
|
97
|
+
let description = _$_.track('Initial description');
|
|
100
98
|
|
|
101
99
|
__output.push('<div');
|
|
102
100
|
__output.push('>');
|
|
@@ -107,7 +105,7 @@ export function ReactiveMetaTags(__output) {
|
|
|
107
105
|
|
|
108
106
|
__output.push('</div>');
|
|
109
107
|
__output.target = 'head';
|
|
110
|
-
__output.push('<!--
|
|
108
|
+
__output.push('<!--t794k2-->');
|
|
111
109
|
__output.push('<title');
|
|
112
110
|
__output.push('>');
|
|
113
111
|
|
|
@@ -127,7 +125,7 @@ export function ReactiveMetaTags(__output) {
|
|
|
127
125
|
export function TitleWithTemplate(__output) {
|
|
128
126
|
_$_.push_component();
|
|
129
127
|
|
|
130
|
-
let name = track('World');
|
|
128
|
+
let name = _$_.track('World');
|
|
131
129
|
|
|
132
130
|
__output.push('<div');
|
|
133
131
|
__output.push('>');
|
|
@@ -138,7 +136,7 @@ export function TitleWithTemplate(__output) {
|
|
|
138
136
|
|
|
139
137
|
__output.push('</div>');
|
|
140
138
|
__output.target = 'head';
|
|
141
|
-
__output.push('<!--
|
|
139
|
+
__output.push('<!--betaue-->');
|
|
142
140
|
__output.push('<title');
|
|
143
141
|
__output.push('>');
|
|
144
142
|
|
|
@@ -162,7 +160,7 @@ export function EmptyTitle(__output) {
|
|
|
162
160
|
|
|
163
161
|
__output.push('</div>');
|
|
164
162
|
__output.target = 'head';
|
|
165
|
-
__output.push('<!--
|
|
163
|
+
__output.push('<!--11sq4o6-->');
|
|
166
164
|
__output.push('<title');
|
|
167
165
|
__output.push('>');
|
|
168
166
|
|
|
@@ -178,8 +176,8 @@ export function EmptyTitle(__output) {
|
|
|
178
176
|
export function ConditionalTitle(__output) {
|
|
179
177
|
_$_.push_component();
|
|
180
178
|
|
|
181
|
-
let showPrefix = track(true);
|
|
182
|
-
let title = track('Main Page');
|
|
179
|
+
let showPrefix = _$_.track(true);
|
|
180
|
+
let title = _$_.track('Main Page');
|
|
183
181
|
|
|
184
182
|
__output.push('<div');
|
|
185
183
|
__output.push('>');
|
|
@@ -190,7 +188,7 @@ export function ConditionalTitle(__output) {
|
|
|
190
188
|
|
|
191
189
|
__output.push('</div>');
|
|
192
190
|
__output.target = 'head';
|
|
193
|
-
__output.push('<!--
|
|
191
|
+
__output.push('<!--xxkmhn-->');
|
|
194
192
|
__output.push('<title');
|
|
195
193
|
__output.push('>');
|
|
196
194
|
|
|
@@ -206,7 +204,7 @@ export function ConditionalTitle(__output) {
|
|
|
206
204
|
export function ComputedTitle(__output) {
|
|
207
205
|
_$_.push_component();
|
|
208
206
|
|
|
209
|
-
let count = track(0);
|
|
207
|
+
let count = _$_.track(0);
|
|
210
208
|
let prefix = 'Count: ';
|
|
211
209
|
|
|
212
210
|
__output.push('<div');
|
|
@@ -225,7 +223,7 @@ export function ComputedTitle(__output) {
|
|
|
225
223
|
|
|
226
224
|
__output.push('</div>');
|
|
227
225
|
__output.target = 'head';
|
|
228
|
-
__output.push('<!--
|
|
226
|
+
__output.push('<!--1hj0can-->');
|
|
229
227
|
__output.push('<title');
|
|
230
228
|
__output.push('>');
|
|
231
229
|
|
|
@@ -249,7 +247,7 @@ export function MultipleHeadBlocks(__output) {
|
|
|
249
247
|
|
|
250
248
|
__output.push('</div>');
|
|
251
249
|
__output.target = 'head';
|
|
252
|
-
__output.push('<!--
|
|
250
|
+
__output.push('<!--15ucmy3-->');
|
|
253
251
|
__output.push('<title');
|
|
254
252
|
__output.push('>');
|
|
255
253
|
|
|
@@ -258,7 +256,7 @@ export function MultipleHeadBlocks(__output) {
|
|
|
258
256
|
}
|
|
259
257
|
|
|
260
258
|
__output.push('</title>');
|
|
261
|
-
__output.push('<!--
|
|
259
|
+
__output.push('<!--1xolofp-->');
|
|
262
260
|
__output.push('<meta');
|
|
263
261
|
__output.push(' name="author"');
|
|
264
262
|
__output.push(' content="Test Author"');
|
|
@@ -278,7 +276,7 @@ export function HeadWithStyle(__output) {
|
|
|
278
276
|
|
|
279
277
|
__output.push('</div>');
|
|
280
278
|
__output.target = 'head';
|
|
281
|
-
__output.push('<!--
|
|
279
|
+
__output.push('<!--q5et2p-->');
|
|
282
280
|
__output.push('<title');
|
|
283
281
|
__output.push('>');
|
|
284
282
|
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import * as _$_ from 'ripple/internal/server';
|
|
3
|
+
|
|
4
|
+
export async function Layout(__output, { children }) {
|
|
5
|
+
return _$_.async(async () => {
|
|
6
|
+
_$_.push_component();
|
|
7
|
+
__output.push('<div');
|
|
8
|
+
__output.push(' class="layout"');
|
|
9
|
+
__output.push('>');
|
|
10
|
+
|
|
11
|
+
{
|
|
12
|
+
__output.push('<nav');
|
|
13
|
+
__output.push(' class="nav"');
|
|
14
|
+
__output.push('>');
|
|
15
|
+
|
|
16
|
+
{
|
|
17
|
+
__output.push('Navigation');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
__output.push('</nav>');
|
|
21
|
+
__output.push('<main');
|
|
22
|
+
__output.push(' class="main"');
|
|
23
|
+
__output.push('>');
|
|
24
|
+
|
|
25
|
+
{
|
|
26
|
+
{
|
|
27
|
+
const comp = children;
|
|
28
|
+
const args = [__output, {}];
|
|
29
|
+
|
|
30
|
+
if (comp?.async) {
|
|
31
|
+
await comp(...args);
|
|
32
|
+
} else if (comp) {
|
|
33
|
+
comp(...args);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
__output.push('</main>');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
__output.push('</div>');
|
|
42
|
+
_$_.pop_component();
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
Layout.async = true;
|
|
47
|
+
|
|
48
|
+
export function Content(__output) {
|
|
49
|
+
_$_.push_component();
|
|
50
|
+
|
|
51
|
+
let visible = _$_.track(true);
|
|
52
|
+
|
|
53
|
+
__output.push('<div');
|
|
54
|
+
__output.push(' class="content"');
|
|
55
|
+
__output.push('>');
|
|
56
|
+
|
|
57
|
+
{
|
|
58
|
+
__output.push('<!--[-->');
|
|
59
|
+
|
|
60
|
+
if (_$_.get(visible)) {
|
|
61
|
+
__output.push('<p');
|
|
62
|
+
__output.push(' class="text"');
|
|
63
|
+
__output.push('>');
|
|
64
|
+
|
|
65
|
+
{
|
|
66
|
+
__output.push('Hello world');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
__output.push('</p>');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
__output.push('<!--]-->');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
__output.push('</div>');
|
|
76
|
+
_$_.pop_component();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function LayoutWithContent(__output) {
|
|
80
|
+
_$_.push_component();
|
|
81
|
+
|
|
82
|
+
{
|
|
83
|
+
const comp = Layout;
|
|
84
|
+
|
|
85
|
+
const args = [
|
|
86
|
+
__output,
|
|
87
|
+
{
|
|
88
|
+
children: function children(__output) {
|
|
89
|
+
_$_.push_component();
|
|
90
|
+
|
|
91
|
+
{
|
|
92
|
+
const comp = Content;
|
|
93
|
+
const args = [__output, {}];
|
|
94
|
+
|
|
95
|
+
comp(...args);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
_$_.pop_component();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
];
|
|
102
|
+
|
|
103
|
+
comp(...args);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
_$_.pop_component();
|
|
107
|
+
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import * as _$_ from 'ripple/internal/server';
|
|
3
3
|
|
|
4
|
-
import { track } from 'ripple/server';
|
|
5
|
-
|
|
6
4
|
export function StaticHtml(__output) {
|
|
7
5
|
_$_.push_component();
|
|
8
6
|
|
|
@@ -178,7 +176,6 @@ export function HtmlInChildren(__output) {
|
|
|
178
176
|
|
|
179
177
|
const args = [
|
|
180
178
|
__output,
|
|
181
|
-
|
|
182
179
|
{
|
|
183
180
|
children: function children(__output) {
|
|
184
181
|
_$_.push_component();
|
|
@@ -216,7 +213,6 @@ export function HtmlInChildrenWithSiblings(__output) {
|
|
|
216
213
|
|
|
217
214
|
const args = [
|
|
218
215
|
__output,
|
|
219
|
-
|
|
220
216
|
{
|
|
221
217
|
children: function children(__output) {
|
|
222
218
|
_$_.push_component();
|
|
@@ -263,7 +259,6 @@ export function MultipleHtmlInChildren(__output) {
|
|
|
263
259
|
|
|
264
260
|
const args = [
|
|
265
261
|
__output,
|
|
266
|
-
|
|
267
262
|
{
|
|
268
263
|
children: function children(__output) {
|
|
269
264
|
_$_.push_component();
|
|
@@ -347,7 +342,6 @@ export function HtmlWithCommentsInChildren(__output) {
|
|
|
347
342
|
|
|
348
343
|
const args = [
|
|
349
344
|
__output,
|
|
350
|
-
|
|
351
345
|
{
|
|
352
346
|
children: function children(__output) {
|
|
353
347
|
_$_.push_component();
|
|
@@ -554,11 +548,9 @@ export function HtmlWithServerData(__output) {
|
|
|
554
548
|
|
|
555
549
|
const args = [
|
|
556
550
|
__output,
|
|
557
|
-
|
|
558
551
|
{
|
|
559
552
|
editPath: "docs/introduction.md",
|
|
560
553
|
nextLink: { href: '/docs/quick-start', text: 'Quick Start' },
|
|
561
|
-
|
|
562
554
|
toc: [
|
|
563
555
|
{ href: '#intro', text: 'Introduction' },
|
|
564
556
|
{ href: '#features', text: 'Features' }
|
|
@@ -600,7 +592,6 @@ export function HtmlWithClientDefaults(__output) {
|
|
|
600
592
|
|
|
601
593
|
const args = [
|
|
602
594
|
__output,
|
|
603
|
-
|
|
604
595
|
{
|
|
605
596
|
children: function children(__output) {
|
|
606
597
|
_$_.push_component();
|
|
@@ -638,7 +629,6 @@ export function HtmlWithUndefinedContent(__output) {
|
|
|
638
629
|
|
|
639
630
|
const args = [
|
|
640
631
|
__output,
|
|
641
|
-
|
|
642
632
|
{
|
|
643
633
|
children: function children(__output) {
|
|
644
634
|
_$_.push_component();
|
|
@@ -813,7 +803,6 @@ export function HtmlAfterSwitchInChildren(__output) {
|
|
|
813
803
|
|
|
814
804
|
const args = [
|
|
815
805
|
__output,
|
|
816
|
-
|
|
817
806
|
{
|
|
818
807
|
children: function children(__output) {
|
|
819
808
|
_$_.push_component();
|
|
@@ -823,10 +812,8 @@ export function HtmlAfterSwitchInChildren(__output) {
|
|
|
823
812
|
|
|
824
813
|
const args = [
|
|
825
814
|
__output,
|
|
826
|
-
|
|
827
815
|
{
|
|
828
816
|
level: 1,
|
|
829
|
-
|
|
830
817
|
children: function children(__output) {
|
|
831
818
|
_$_.push_component();
|
|
832
819
|
__output.push('Title');
|
|
@@ -924,7 +911,7 @@ async function SidebarSection(__output, { title, children }) {
|
|
|
924
911
|
return _$_.async(async () => {
|
|
925
912
|
_$_.push_component();
|
|
926
913
|
|
|
927
|
-
let expanded = track(true);
|
|
914
|
+
let expanded = _$_.track(true);
|
|
928
915
|
|
|
929
916
|
__output.push('<section');
|
|
930
917
|
__output.push(' class="sidebar-section"');
|
|
@@ -1009,10 +996,8 @@ function SideNav(__output, { currentPath }) {
|
|
|
1009
996
|
|
|
1010
997
|
const args = [
|
|
1011
998
|
__output,
|
|
1012
|
-
|
|
1013
999
|
{
|
|
1014
1000
|
title: "Getting Started",
|
|
1015
|
-
|
|
1016
1001
|
children: function children(__output) {
|
|
1017
1002
|
_$_.push_component();
|
|
1018
1003
|
|
|
@@ -1021,7 +1006,6 @@ function SideNav(__output, { currentPath }) {
|
|
|
1021
1006
|
|
|
1022
1007
|
const args = [
|
|
1023
1008
|
__output,
|
|
1024
|
-
|
|
1025
1009
|
{
|
|
1026
1010
|
href: "/intro",
|
|
1027
1011
|
text: "Introduction",
|
|
@@ -1037,7 +1021,6 @@ function SideNav(__output, { currentPath }) {
|
|
|
1037
1021
|
|
|
1038
1022
|
const args = [
|
|
1039
1023
|
__output,
|
|
1040
|
-
|
|
1041
1024
|
{
|
|
1042
1025
|
href: "/start",
|
|
1043
1026
|
text: "Quick Start",
|
|
@@ -1068,10 +1051,8 @@ function SideNav(__output, { currentPath }) {
|
|
|
1068
1051
|
|
|
1069
1052
|
const args = [
|
|
1070
1053
|
__output,
|
|
1071
|
-
|
|
1072
1054
|
{
|
|
1073
1055
|
title: "Guide",
|
|
1074
|
-
|
|
1075
1056
|
children: function children(__output) {
|
|
1076
1057
|
_$_.push_component();
|
|
1077
1058
|
|
|
@@ -1080,7 +1061,6 @@ function SideNav(__output, { currentPath }) {
|
|
|
1080
1061
|
|
|
1081
1062
|
const args = [
|
|
1082
1063
|
__output,
|
|
1083
|
-
|
|
1084
1064
|
{
|
|
1085
1065
|
href: "/guide/app",
|
|
1086
1066
|
text: "Application",
|
|
@@ -1096,7 +1076,6 @@ function SideNav(__output, { currentPath }) {
|
|
|
1096
1076
|
|
|
1097
1077
|
const args = [
|
|
1098
1078
|
__output,
|
|
1099
|
-
|
|
1100
1079
|
{
|
|
1101
1080
|
href: "/guide/syntax",
|
|
1102
1081
|
text: "Syntax",
|
|
@@ -1312,7 +1291,6 @@ export function ArticleWithChildrenThenSibling(__output) {
|
|
|
1312
1291
|
|
|
1313
1292
|
const args = [
|
|
1314
1293
|
__output,
|
|
1315
|
-
|
|
1316
1294
|
{
|
|
1317
1295
|
children: function children(__output) {
|
|
1318
1296
|
_$_.push_component();
|
|
@@ -1414,7 +1392,6 @@ export function ArticleWithHtmlChildThenSibling(__output) {
|
|
|
1414
1392
|
|
|
1415
1393
|
const args = [
|
|
1416
1394
|
__output,
|
|
1417
|
-
|
|
1418
1395
|
{
|
|
1419
1396
|
children: function children(__output) {
|
|
1420
1397
|
_$_.push_component();
|
|
@@ -1557,7 +1534,6 @@ export function InlineArticleWithHtmlChild(__output) {
|
|
|
1557
1534
|
|
|
1558
1535
|
const args = [
|
|
1559
1536
|
__output,
|
|
1560
|
-
|
|
1561
1537
|
{
|
|
1562
1538
|
children: function children(__output) {
|
|
1563
1539
|
_$_.push_component();
|
|
@@ -1786,11 +1762,9 @@ export function DocsLayoutWithData(__output) {
|
|
|
1786
1762
|
|
|
1787
1763
|
const args = [
|
|
1788
1764
|
__output,
|
|
1789
|
-
|
|
1790
1765
|
{
|
|
1791
1766
|
editPath: "docs/styling.md",
|
|
1792
1767
|
nextLink: { href: '/next', text: 'Next' },
|
|
1793
|
-
|
|
1794
1768
|
children: function children(__output) {
|
|
1795
1769
|
_$_.push_component();
|
|
1796
1770
|
__output.push('<div');
|
|
@@ -1827,7 +1801,6 @@ export function DocsLayoutWithoutData(__output) {
|
|
|
1827
1801
|
|
|
1828
1802
|
const args = [
|
|
1829
1803
|
__output,
|
|
1830
|
-
|
|
1831
1804
|
{
|
|
1832
1805
|
children: function children(__output) {
|
|
1833
1806
|
_$_.push_component();
|
|
@@ -1857,7 +1830,6 @@ export function DocsLayoutWithoutData(__output) {
|
|
|
1857
1830
|
|
|
1858
1831
|
async function DocsLayoutExact(
|
|
1859
1832
|
__output,
|
|
1860
|
-
|
|
1861
1833
|
{
|
|
1862
1834
|
children,
|
|
1863
1835
|
editPath = '',
|
|
@@ -2112,12 +2084,10 @@ export function DocsLayoutExactWithData(__output) {
|
|
|
2112
2084
|
|
|
2113
2085
|
const args = [
|
|
2114
2086
|
__output,
|
|
2115
|
-
|
|
2116
2087
|
{
|
|
2117
2088
|
editPath: "docs/guide/styling.md",
|
|
2118
2089
|
prevLink: { href: '/prev', text: 'Previous' },
|
|
2119
2090
|
nextLink: { href: '/next', text: 'Next' },
|
|
2120
|
-
|
|
2121
2091
|
toc: [
|
|
2122
2092
|
{ href: '#intro', text: 'Introduction' },
|
|
2123
2093
|
{ href: '#usage', text: 'Usage' }
|
|
@@ -2163,13 +2133,11 @@ export function DocsLayoutExactWithoutData(__output) {
|
|
|
2163
2133
|
|
|
2164
2134
|
const args = [
|
|
2165
2135
|
__output,
|
|
2166
|
-
|
|
2167
2136
|
{
|
|
2168
2137
|
editPath,
|
|
2169
2138
|
prevLink,
|
|
2170
2139
|
nextLink,
|
|
2171
2140
|
toc,
|
|
2172
|
-
|
|
2173
2141
|
children: function children(__output) {
|
|
2174
2142
|
_$_.push_component();
|
|
2175
2143
|
__output.push('<div');
|
|
@@ -2336,10 +2304,8 @@ export function NestedTemplateInLayout(__output) {
|
|
|
2336
2304
|
|
|
2337
2305
|
const args = [
|
|
2338
2306
|
__output,
|
|
2339
|
-
|
|
2340
2307
|
{
|
|
2341
2308
|
data: doc,
|
|
2342
|
-
|
|
2343
2309
|
children: function children(__output) {
|
|
2344
2310
|
_$_.push_component();
|
|
2345
2311
|
__output.push('<div');
|