ripple 0.4.2 → 0.4.4
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 +164 -0
- package/package.json +10 -4
- package/src/constants.js +6 -0
- package/src/jsx-runtime.d.ts +2 -1
- package/src/runtime/array.js +15 -9
- package/src/runtime/index-client.js +25 -7
- package/src/runtime/index-server.js +1 -0
- package/src/runtime/internal/client/attributes.js +439 -0
- package/src/runtime/internal/client/blocks.js +20 -20
- package/src/runtime/internal/client/component.js +2 -5
- package/src/runtime/internal/client/composite.js +295 -95
- package/src/runtime/internal/client/constants.js +14 -6
- package/src/runtime/internal/client/context.js +3 -2
- package/src/runtime/internal/client/css.js +11 -26
- package/src/runtime/internal/client/errors.js +188 -0
- package/src/runtime/internal/client/events.js +79 -34
- package/src/runtime/internal/client/expression.js +25 -120
- package/src/runtime/internal/client/for.js +113 -262
- package/src/runtime/internal/client/head.js +4 -3
- package/src/runtime/internal/client/html.js +5 -3
- package/src/runtime/internal/client/hydrate.js +484 -0
- package/src/runtime/internal/client/hydration-enabled.js +7 -0
- package/src/runtime/internal/client/hydration.js +16 -81
- package/src/runtime/internal/client/if.js +69 -10
- package/src/runtime/internal/client/index.js +18 -10
- package/src/runtime/internal/client/operations.js +11 -7
- package/src/runtime/internal/client/portal.js +3 -2
- package/src/runtime/internal/client/render.js +42 -325
- package/src/runtime/internal/client/root-boundary-enabled.js +7 -0
- package/src/runtime/internal/client/runtime.js +157 -371
- package/src/runtime/internal/client/template-ns.js +88 -0
- package/src/runtime/internal/client/template.js +118 -139
- package/src/runtime/internal/client/track-async.js +356 -0
- package/src/runtime/internal/client/try.js +133 -319
- package/src/runtime/internal/client/types.d.ts +48 -24
- package/src/runtime/internal/server/index.js +31 -29
- package/src/runtime/internal/server/prerender.js +27 -0
- package/src/server/index.js +1 -0
- package/src/utils/class-name.js +28 -0
- package/tests/client/basic/basic.errors.test.tsrx +3 -3
- package/tests/client/compiler/__snapshots__/compiler.typescript.test.tsrx.snap +0 -2
- package/tests/client/compiler/compiler.basic.test.tsrx +2 -2
- package/tests/client/compiler/compiler.tracked-access.test.tsrx +3 -3
- package/tests/client/composite/composite.dynamic-components.test.tsrx +40 -0
- package/tests/client/composite/composite.props.test.tsrx +10 -10
- package/tests/client/css/scoped-styles.test.tsrx +3 -1
- package/tests/client/derived-release.test.tsrx +3 -3
- package/tests/client/for-item.test.tsrx +39 -0
- package/tests/client/for-selector.test.tsrx +95 -0
- package/tests/client/svg.test.tsrx +273 -1
- package/tests/hydration/compiled/client/basic.js +88 -87
- package/tests/hydration/compiled/client/composite.js +15 -6
- package/tests/hydration/compiled/client/events.js +40 -48
- package/tests/hydration/compiled/client/for.js +191 -199
- package/tests/hydration/compiled/client/fragment-cursor.js +633 -334
- package/tests/hydration/compiled/client/head.js +22 -22
- package/tests/hydration/compiled/client/hmr.js +14 -5
- package/tests/hydration/compiled/client/html-in-template.js +5 -5
- package/tests/hydration/compiled/client/html.js +195 -177
- package/tests/hydration/compiled/client/if-children.js +136 -63
- package/tests/hydration/compiled/client/if-fragment-controlflow.js +63 -43
- package/tests/hydration/compiled/client/if.js +78 -30
- package/tests/hydration/compiled/client/mixed-control-flow.js +90 -72
- package/tests/hydration/compiled/client/nested-control-flow.js +266 -307
- package/tests/hydration/compiled/client/portal.js +20 -11
- package/tests/hydration/compiled/client/reactivity.js +29 -29
- package/tests/hydration/compiled/client/return.js +2 -2
- package/tests/hydration/compiled/client/streaming.js +33 -35
- package/tests/hydration/compiled/client/switch.js +25 -25
- package/tests/hydration/compiled/client/track-async-serialization.js +41 -41
- package/tests/hydration/compiled/client/try.js +15 -15
- package/tests/hydration/compiled/client/typed-text.js +8 -7
- package/tests/hydration/compiled/server/basic.js +6 -6
- package/tests/hydration/compiled/server/events.js +8 -8
- package/tests/hydration/compiled/server/for.js +22 -22
- package/tests/hydration/compiled/server/fragment-cursor.js +188 -52
- package/tests/hydration/compiled/server/head.js +6 -6
- package/tests/hydration/compiled/server/hmr.js +1 -1
- package/tests/hydration/compiled/server/html.js +1 -1
- package/tests/hydration/compiled/server/if-children.js +9 -9
- package/tests/hydration/compiled/server/if.js +5 -5
- package/tests/hydration/compiled/server/mixed-control-flow.js +4 -4
- package/tests/hydration/compiled/server/portal.js +1 -1
- package/tests/hydration/compiled/server/reactivity.js +9 -9
- package/tests/hydration/compiled/server/streaming.js +9 -9
- package/tests/hydration/compiled/server/switch.js +4 -4
- package/tests/hydration/compiled/server/track-async-serialization.js +16 -16
- package/tests/hydration/compiled/server/try.js +4 -4
- package/tests/hydration/compiled/server/typed-text.js +1 -1
- package/tests/hydration/components/fragment-cursor.tsrx +60 -0
- package/tests/hydration/components/track-async-serialization.tsrx +2 -2
- package/tests/hydration/fragment-cursor.test.js +34 -1
- package/tests/hydration/track-async-serialization.test.js +1 -1
- package/tests/server/basic.components.test.tsrx +3 -3
- package/tests/server/track-async-serialization.test.tsrx +6 -6
- package/tests/utils/tracked-types.test.js +3 -3
- package/types/index.d.ts +8 -8
- package/types/server.d.ts +17 -0
|
@@ -91,7 +91,7 @@ export function KeyedForLoop() {
|
|
|
91
91
|
|
|
92
92
|
export function ReactiveForLoopAdd() {
|
|
93
93
|
return _$_.tsrx_element(() => {
|
|
94
|
-
const items = _$_.track(['A', 'B'], '
|
|
94
|
+
const items = _$_.track(['A', 'B'], '1qi64qy');
|
|
95
95
|
|
|
96
96
|
_$_.regular_block(() => {
|
|
97
97
|
let __out = '';
|
|
@@ -118,7 +118,7 @@ export function ReactiveForLoopAdd() {
|
|
|
118
118
|
|
|
119
119
|
export function ReactiveForLoopRemove() {
|
|
120
120
|
return _$_.tsrx_element(() => {
|
|
121
|
-
const items = _$_.track(['A', 'B', 'C'], '
|
|
121
|
+
const items = _$_.track(['A', 'B', 'C'], '1e738lw');
|
|
122
122
|
|
|
123
123
|
_$_.regular_block(() => {
|
|
124
124
|
let __out = '';
|
|
@@ -145,7 +145,7 @@ export function ReactiveForLoopRemove() {
|
|
|
145
145
|
|
|
146
146
|
export function ForLoopInteractive() {
|
|
147
147
|
return _$_.tsrx_element(() => {
|
|
148
|
-
const counts = _$_.track([0, 0, 0], '
|
|
148
|
+
const counts = _$_.track([0, 0, 0], 'f8yrj3');
|
|
149
149
|
|
|
150
150
|
_$_.regular_block(() => {
|
|
151
151
|
let __out = '';
|
|
@@ -295,7 +295,7 @@ export function KeyedForLoopReorder() {
|
|
|
295
295
|
{ id: 2, name: 'Second' },
|
|
296
296
|
{ id: 3, name: 'Third' }
|
|
297
297
|
],
|
|
298
|
-
'
|
|
298
|
+
'1sa3hr7'
|
|
299
299
|
);
|
|
300
300
|
|
|
301
301
|
_$_.regular_block(() => {
|
|
@@ -323,7 +323,7 @@ export function KeyedForLoopReorder() {
|
|
|
323
323
|
|
|
324
324
|
export function KeyedForLoopUpdate() {
|
|
325
325
|
return _$_.tsrx_element(() => {
|
|
326
|
-
const items = _$_.track([{ id: 1, name: 'Item 1' }, { id: 2, name: 'Item 2' }], '
|
|
326
|
+
const items = _$_.track([{ id: 1, name: 'Item 1' }, { id: 2, name: 'Item 2' }], 'xwci56');
|
|
327
327
|
|
|
328
328
|
_$_.regular_block(() => {
|
|
329
329
|
let __out = '';
|
|
@@ -350,7 +350,7 @@ export function KeyedForLoopUpdate() {
|
|
|
350
350
|
|
|
351
351
|
export function ForLoopMixedOperations() {
|
|
352
352
|
return _$_.tsrx_element(() => {
|
|
353
|
-
const items = _$_.track(['A', 'B', 'C', 'D'], '
|
|
353
|
+
const items = _$_.track(['A', 'B', 'C', 'D'], 'h5qbw6');
|
|
354
354
|
|
|
355
355
|
_$_.regular_block(() => {
|
|
356
356
|
let __out = '';
|
|
@@ -377,8 +377,8 @@ export function ForLoopMixedOperations() {
|
|
|
377
377
|
|
|
378
378
|
export function ForLoopInsideIf() {
|
|
379
379
|
return _$_.tsrx_element(() => {
|
|
380
|
-
const showList = _$_.track(true, '
|
|
381
|
-
const items = _$_.track(['X', 'Y', 'Z'], '
|
|
380
|
+
const showList = _$_.track(true, '1fjdps');
|
|
381
|
+
const items = _$_.track(['X', 'Y', 'Z'], '1h205c3');
|
|
382
382
|
|
|
383
383
|
_$_.regular_block(() => {
|
|
384
384
|
let __out = '';
|
|
@@ -411,7 +411,7 @@ export function ForLoopInsideIf() {
|
|
|
411
411
|
|
|
412
412
|
export function ForLoopEmptyToPopulated() {
|
|
413
413
|
return _$_.tsrx_element(() => {
|
|
414
|
-
const items = _$_.track([], '
|
|
414
|
+
const items = _$_.track([], 'muog58');
|
|
415
415
|
|
|
416
416
|
_$_.regular_block(() => {
|
|
417
417
|
let __out = '';
|
|
@@ -430,7 +430,7 @@ export function ForLoopEmptyToPopulated() {
|
|
|
430
430
|
|
|
431
431
|
export function ForLoopPopulatedToEmpty() {
|
|
432
432
|
return _$_.tsrx_element(() => {
|
|
433
|
-
const items = _$_.track(['One', 'Two', 'Three'], '
|
|
433
|
+
const items = _$_.track(['One', 'Two', 'Three'], '1u44ewo');
|
|
434
434
|
|
|
435
435
|
_$_.regular_block(() => {
|
|
436
436
|
let __out = '';
|
|
@@ -457,7 +457,7 @@ export function ForLoopPopulatedToEmpty() {
|
|
|
457
457
|
|
|
458
458
|
export function NestedForLoopReactive() {
|
|
459
459
|
return _$_.tsrx_element(() => {
|
|
460
|
-
const grid = _$_.track([[1, 2], [3, 4]], '
|
|
460
|
+
const grid = _$_.track([[1, 2], [3, 4]], '197p4tv');
|
|
461
461
|
|
|
462
462
|
_$_.regular_block(() => {
|
|
463
463
|
let __out = '';
|
|
@@ -578,7 +578,7 @@ export function ForLoopDeeplyNested() {
|
|
|
578
578
|
|
|
579
579
|
export function ForLoopIndexUpdate() {
|
|
580
580
|
return _$_.tsrx_element(() => {
|
|
581
|
-
const items = _$_.track(['First', 'Second', 'Third'], '
|
|
581
|
+
const items = _$_.track(['First', 'Second', 'Third'], '1waej1i');
|
|
582
582
|
|
|
583
583
|
_$_.regular_block(() => {
|
|
584
584
|
let __out = '';
|
|
@@ -612,7 +612,7 @@ export function KeyedForLoopWithIndex() {
|
|
|
612
612
|
{ id: 'b', value: 'Beta' },
|
|
613
613
|
{ id: 'c', value: 'Gamma' }
|
|
614
614
|
],
|
|
615
|
-
'
|
|
615
|
+
'ejgeai'
|
|
616
616
|
);
|
|
617
617
|
|
|
618
618
|
_$_.regular_block(() => {
|
|
@@ -641,7 +641,7 @@ export function KeyedForLoopWithIndex() {
|
|
|
641
641
|
|
|
642
642
|
export function ForLoopWithSiblings() {
|
|
643
643
|
return _$_.tsrx_element(() => {
|
|
644
|
-
const items = _$_.track(['A', 'B'], '
|
|
644
|
+
const items = _$_.track(['A', 'B'], 'gs9c2a');
|
|
645
645
|
|
|
646
646
|
_$_.regular_block(() => {
|
|
647
647
|
let __out = '';
|
|
@@ -698,7 +698,7 @@ export function ForLoopItemState() {
|
|
|
698
698
|
|
|
699
699
|
function TodoItem(props) {
|
|
700
700
|
return _$_.tsrx_element(() => {
|
|
701
|
-
const done = _$_.track(false, '
|
|
701
|
+
const done = _$_.track(false, 'lyii78');
|
|
702
702
|
|
|
703
703
|
_$_.regular_block(() => {
|
|
704
704
|
let __out = '';
|
|
@@ -738,7 +738,7 @@ export function ForLoopSingleItem() {
|
|
|
738
738
|
|
|
739
739
|
export function ForLoopAddAtBeginning() {
|
|
740
740
|
return _$_.tsrx_element(() => {
|
|
741
|
-
const items = _$_.track(['B', 'C'], '
|
|
741
|
+
const items = _$_.track(['B', 'C'], '5xk2t6');
|
|
742
742
|
|
|
743
743
|
_$_.regular_block(() => {
|
|
744
744
|
let __out = '';
|
|
@@ -765,7 +765,7 @@ export function ForLoopAddAtBeginning() {
|
|
|
765
765
|
|
|
766
766
|
export function ForLoopAddInMiddle() {
|
|
767
767
|
return _$_.tsrx_element(() => {
|
|
768
|
-
const items = _$_.track(['A', 'C'], '
|
|
768
|
+
const items = _$_.track(['A', 'C'], '7pf806');
|
|
769
769
|
|
|
770
770
|
_$_.regular_block(() => {
|
|
771
771
|
let __out = '';
|
|
@@ -792,7 +792,7 @@ export function ForLoopAddInMiddle() {
|
|
|
792
792
|
|
|
793
793
|
export function ForLoopRemoveFromMiddle() {
|
|
794
794
|
return _$_.tsrx_element(() => {
|
|
795
|
-
const items = _$_.track(['A', 'B', 'C'], '
|
|
795
|
+
const items = _$_.track(['A', 'B', 'C'], '7wzmn3');
|
|
796
796
|
|
|
797
797
|
_$_.regular_block(() => {
|
|
798
798
|
let __out = '';
|
|
@@ -855,7 +855,7 @@ export function ForLoopLargeList() {
|
|
|
855
855
|
|
|
856
856
|
export function ForLoopSwap() {
|
|
857
857
|
return _$_.tsrx_element(() => {
|
|
858
|
-
const items = _$_.track(['A', 'B', 'C', 'D'], '
|
|
858
|
+
const items = _$_.track(['A', 'B', 'C', 'D'], 'qiflm7');
|
|
859
859
|
|
|
860
860
|
_$_.regular_block(() => {
|
|
861
861
|
let __out = '';
|
|
@@ -882,7 +882,7 @@ export function ForLoopSwap() {
|
|
|
882
882
|
|
|
883
883
|
export function ForLoopReverse() {
|
|
884
884
|
return _$_.tsrx_element(() => {
|
|
885
|
-
const items = _$_.track(['A', 'B', 'C', 'D'], '
|
|
885
|
+
const items = _$_.track(['A', 'B', 'C', 'D'], 'a3chgk');
|
|
886
886
|
|
|
887
887
|
_$_.regular_block(() => {
|
|
888
888
|
let __out = '';
|
|
@@ -909,7 +909,7 @@ export function ForLoopReverse() {
|
|
|
909
909
|
|
|
910
910
|
export function KeyedForLoopAppendAndRotate() {
|
|
911
911
|
return _$_.tsrx_element(() => {
|
|
912
|
-
const items = _$_.track([1, 2, 3], '
|
|
912
|
+
const items = _$_.track([1, 2, 3], '1at4qo4');
|
|
913
913
|
|
|
914
914
|
_$_.regular_block(() => {
|
|
915
915
|
let __out = '';
|
|
@@ -953,7 +953,7 @@ function RootKeyedList(props) {
|
|
|
953
953
|
|
|
954
954
|
export function RootKeyedForLoopAppendAndRotate() {
|
|
955
955
|
return _$_.tsrx_element(() => {
|
|
956
|
-
const items = _$_.track([1, 2, 3], '
|
|
956
|
+
const items = _$_.track([1, 2, 3], 'mdp2e8');
|
|
957
957
|
|
|
958
958
|
_$_.regular_block(() => {
|
|
959
959
|
let __out = '';
|