@gxpl/sdk 0.0.40 → 0.0.41
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/lib/sdk/transitions/transitionMachine.d.ts +27 -0
- package/lib/sdk/transitions/transitionMachine.js +11 -16
- package/lib/sdk/transitions/utils/getDeltaAndProgress.d.ts +1 -1
- package/lib/sdk/transitions/utils/getDeltaAndProgress.js +1 -1
- package/lib/sdk/transitions/utils/getScenesOnInstantTransition.d.ts +1 -1
- package/lib/sdk/transitions/utils/getScenesOnInstantTransition.js +3 -3
- package/lib/sdk/transitions/utils/getScenesOnStart.d.ts +1 -1
- package/lib/sdk/transitions/utils/getScenesOnStart.js +5 -5
- package/lib/sdk/transitions/utils/types.d.ts +2 -0
- package/lib/sdk/types/article/Interaction.d.ts +6 -1
- package/lib/sdk-nextjs/components/Page.js +3 -8
- package/lib/sdk-nextjs/components/Preview/PreviewListener.js +1 -0
- package/lib/sdk-nextjs/components/Scene.js +42 -6
- package/lib/sdk-nextjs/components/items/LinkWrapper.js +1 -0
- package/lib/sdk-nextjs/components/items/RichTextItem/RichTextItem.js +1 -1
- package/lib/sdk-nextjs/fixedLayers/FixedLayerTransitionsRegistry.d.ts +1 -1
- package/lib/sdk-nextjs/fixedLayers/FixedLayerTransitionsRegistry.js +2 -2
- package/lib/sdk-nextjs/interactions/InteractionsRegistry.d.ts +9 -1
- package/lib/sdk-nextjs/interactions/InteractionsRegistry.js +100 -3
- package/lib/sdk-nextjs/provider/InOutTransitionContext.d.ts +8 -0
- package/lib/sdk-nextjs/provider/InOutTransitionContext.js +14 -0
- package/lib/sdk-nextjs/provider/InteractionsContext.js +10 -2
- package/lib/sdk-nextjs/provider/TransitionMachineContext.d.ts +96 -0
- package/lib/sdk-nextjs/provider/TransitionMachineContextProvider.d.ts +11 -0
- package/lib/sdk-nextjs/provider/TransitionMachineContextProvider.js +18 -0
- package/package.json +2 -1
|
@@ -10,10 +10,12 @@ export declare const TransitionMachineContext: {
|
|
|
10
10
|
transition: "slide";
|
|
11
11
|
to: string;
|
|
12
12
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
13
|
+
duration: number;
|
|
13
14
|
} | {
|
|
14
15
|
type: "TRANSITION_TRIGGER";
|
|
15
16
|
transition: "fade";
|
|
16
17
|
to: string;
|
|
18
|
+
duration: number;
|
|
17
19
|
} | {
|
|
18
20
|
type: "SWIPE_START";
|
|
19
21
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -79,10 +81,12 @@ export declare const TransitionMachineContext: {
|
|
|
79
81
|
transition: "slide";
|
|
80
82
|
to: string;
|
|
81
83
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
84
|
+
duration: number;
|
|
82
85
|
} | {
|
|
83
86
|
type: "TRANSITION_TRIGGER";
|
|
84
87
|
transition: "fade";
|
|
85
88
|
to: string;
|
|
89
|
+
duration: number;
|
|
86
90
|
} | {
|
|
87
91
|
type: "SWIPE_START";
|
|
88
92
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -113,10 +117,12 @@ export declare const TransitionMachineContext: {
|
|
|
113
117
|
transition: "slide";
|
|
114
118
|
to: string;
|
|
115
119
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
120
|
+
duration: number;
|
|
116
121
|
} | {
|
|
117
122
|
type: "TRANSITION_TRIGGER";
|
|
118
123
|
transition: "fade";
|
|
119
124
|
to: string;
|
|
125
|
+
duration: number;
|
|
120
126
|
} | {
|
|
121
127
|
type: "SWIPE_START";
|
|
122
128
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -170,10 +176,12 @@ export declare const TransitionMachineContext: {
|
|
|
170
176
|
transition: "slide";
|
|
171
177
|
to: string;
|
|
172
178
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
179
|
+
duration: number;
|
|
173
180
|
} | {
|
|
174
181
|
type: "TRANSITION_TRIGGER";
|
|
175
182
|
transition: "fade";
|
|
176
183
|
to: string;
|
|
184
|
+
duration: number;
|
|
177
185
|
} | {
|
|
178
186
|
type: "SWIPE_START";
|
|
179
187
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -206,10 +214,12 @@ export declare const TransitionMachineContext: {
|
|
|
206
214
|
transition: "slide";
|
|
207
215
|
to: string;
|
|
208
216
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
217
|
+
duration: number;
|
|
209
218
|
} | {
|
|
210
219
|
type: "TRANSITION_TRIGGER";
|
|
211
220
|
transition: "fade";
|
|
212
221
|
to: string;
|
|
222
|
+
duration: number;
|
|
213
223
|
}, {
|
|
214
224
|
type: "SWIPE_PREPARE";
|
|
215
225
|
touchData: {
|
|
@@ -221,10 +231,12 @@ export declare const TransitionMachineContext: {
|
|
|
221
231
|
transition: "slide";
|
|
222
232
|
to: string;
|
|
223
233
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
234
|
+
duration: number;
|
|
224
235
|
} | {
|
|
225
236
|
type: "TRANSITION_TRIGGER";
|
|
226
237
|
transition: "fade";
|
|
227
238
|
to: string;
|
|
239
|
+
duration: number;
|
|
228
240
|
} | {
|
|
229
241
|
type: "SWIPE_START";
|
|
230
242
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -274,10 +286,12 @@ export declare const TransitionMachineContext: {
|
|
|
274
286
|
transition: "slide";
|
|
275
287
|
to: string;
|
|
276
288
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
289
|
+
duration: number;
|
|
277
290
|
} | {
|
|
278
291
|
type: "TRANSITION_TRIGGER";
|
|
279
292
|
transition: "fade";
|
|
280
293
|
to: string;
|
|
294
|
+
duration: number;
|
|
281
295
|
} | {
|
|
282
296
|
type: "SWIPE_START";
|
|
283
297
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -318,10 +332,12 @@ export declare const TransitionMachineContext: {
|
|
|
318
332
|
transition: "slide";
|
|
319
333
|
to: string;
|
|
320
334
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
335
|
+
duration: number;
|
|
321
336
|
} | {
|
|
322
337
|
type: "TRANSITION_TRIGGER";
|
|
323
338
|
transition: "fade";
|
|
324
339
|
to: string;
|
|
340
|
+
duration: number;
|
|
325
341
|
} | {
|
|
326
342
|
type: "SWIPE_START";
|
|
327
343
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -369,10 +385,12 @@ export declare const TransitionMachineContext: {
|
|
|
369
385
|
transition: "slide";
|
|
370
386
|
to: string;
|
|
371
387
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
388
|
+
duration: number;
|
|
372
389
|
} | {
|
|
373
390
|
type: "TRANSITION_TRIGGER";
|
|
374
391
|
transition: "fade";
|
|
375
392
|
to: string;
|
|
393
|
+
duration: number;
|
|
376
394
|
} | {
|
|
377
395
|
type: "SWIPE_START";
|
|
378
396
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -413,10 +431,12 @@ export declare const TransitionMachineContext: {
|
|
|
413
431
|
transition: "slide";
|
|
414
432
|
to: string;
|
|
415
433
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
434
|
+
duration: number;
|
|
416
435
|
} | {
|
|
417
436
|
type: "TRANSITION_TRIGGER";
|
|
418
437
|
transition: "fade";
|
|
419
438
|
to: string;
|
|
439
|
+
duration: number;
|
|
420
440
|
} | {
|
|
421
441
|
type: "SWIPE_START";
|
|
422
442
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -460,10 +480,12 @@ export declare const TransitionMachineContext: {
|
|
|
460
480
|
transition: "slide";
|
|
461
481
|
to: string;
|
|
462
482
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
483
|
+
duration: number;
|
|
463
484
|
} | {
|
|
464
485
|
type: "TRANSITION_TRIGGER";
|
|
465
486
|
transition: "fade";
|
|
466
487
|
to: string;
|
|
488
|
+
duration: number;
|
|
467
489
|
} | {
|
|
468
490
|
type: "SWIPE_START";
|
|
469
491
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -508,10 +530,12 @@ export declare const TransitionMachineContext: {
|
|
|
508
530
|
transition: "slide";
|
|
509
531
|
to: string;
|
|
510
532
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
533
|
+
duration: number;
|
|
511
534
|
} | {
|
|
512
535
|
type: "TRANSITION_TRIGGER";
|
|
513
536
|
transition: "fade";
|
|
514
537
|
to: string;
|
|
538
|
+
duration: number;
|
|
515
539
|
} | {
|
|
516
540
|
type: "SWIPE_START";
|
|
517
541
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -552,10 +576,12 @@ export declare const TransitionMachineContext: {
|
|
|
552
576
|
transition: "slide";
|
|
553
577
|
to: string;
|
|
554
578
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
579
|
+
duration: number;
|
|
555
580
|
} | {
|
|
556
581
|
type: "TRANSITION_TRIGGER";
|
|
557
582
|
transition: "fade";
|
|
558
583
|
to: string;
|
|
584
|
+
duration: number;
|
|
559
585
|
} | {
|
|
560
586
|
type: "SWIPE_START";
|
|
561
587
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -625,10 +651,12 @@ export declare const TransitionMachineContext: {
|
|
|
625
651
|
transition: "slide";
|
|
626
652
|
to: string;
|
|
627
653
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
654
|
+
duration: number;
|
|
628
655
|
} | {
|
|
629
656
|
type: "TRANSITION_TRIGGER";
|
|
630
657
|
transition: "fade";
|
|
631
658
|
to: string;
|
|
659
|
+
duration: number;
|
|
632
660
|
} | {
|
|
633
661
|
type: "SWIPE_START";
|
|
634
662
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -659,10 +687,12 @@ export declare const TransitionMachineContext: {
|
|
|
659
687
|
transition: "slide";
|
|
660
688
|
to: string;
|
|
661
689
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
690
|
+
duration: number;
|
|
662
691
|
} | {
|
|
663
692
|
type: "TRANSITION_TRIGGER";
|
|
664
693
|
transition: "fade";
|
|
665
694
|
to: string;
|
|
695
|
+
duration: number;
|
|
666
696
|
} | {
|
|
667
697
|
type: "SWIPE_START";
|
|
668
698
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -716,10 +746,12 @@ export declare const TransitionMachineContext: {
|
|
|
716
746
|
transition: "slide";
|
|
717
747
|
to: string;
|
|
718
748
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
749
|
+
duration: number;
|
|
719
750
|
} | {
|
|
720
751
|
type: "TRANSITION_TRIGGER";
|
|
721
752
|
transition: "fade";
|
|
722
753
|
to: string;
|
|
754
|
+
duration: number;
|
|
723
755
|
} | {
|
|
724
756
|
type: "SWIPE_START";
|
|
725
757
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -752,10 +784,12 @@ export declare const TransitionMachineContext: {
|
|
|
752
784
|
transition: "slide";
|
|
753
785
|
to: string;
|
|
754
786
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
787
|
+
duration: number;
|
|
755
788
|
} | {
|
|
756
789
|
type: "TRANSITION_TRIGGER";
|
|
757
790
|
transition: "fade";
|
|
758
791
|
to: string;
|
|
792
|
+
duration: number;
|
|
759
793
|
}, {
|
|
760
794
|
type: "SWIPE_PREPARE";
|
|
761
795
|
touchData: {
|
|
@@ -767,10 +801,12 @@ export declare const TransitionMachineContext: {
|
|
|
767
801
|
transition: "slide";
|
|
768
802
|
to: string;
|
|
769
803
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
804
|
+
duration: number;
|
|
770
805
|
} | {
|
|
771
806
|
type: "TRANSITION_TRIGGER";
|
|
772
807
|
transition: "fade";
|
|
773
808
|
to: string;
|
|
809
|
+
duration: number;
|
|
774
810
|
} | {
|
|
775
811
|
type: "SWIPE_START";
|
|
776
812
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -820,10 +856,12 @@ export declare const TransitionMachineContext: {
|
|
|
820
856
|
transition: "slide";
|
|
821
857
|
to: string;
|
|
822
858
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
859
|
+
duration: number;
|
|
823
860
|
} | {
|
|
824
861
|
type: "TRANSITION_TRIGGER";
|
|
825
862
|
transition: "fade";
|
|
826
863
|
to: string;
|
|
864
|
+
duration: number;
|
|
827
865
|
} | {
|
|
828
866
|
type: "SWIPE_START";
|
|
829
867
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -864,10 +902,12 @@ export declare const TransitionMachineContext: {
|
|
|
864
902
|
transition: "slide";
|
|
865
903
|
to: string;
|
|
866
904
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
905
|
+
duration: number;
|
|
867
906
|
} | {
|
|
868
907
|
type: "TRANSITION_TRIGGER";
|
|
869
908
|
transition: "fade";
|
|
870
909
|
to: string;
|
|
910
|
+
duration: number;
|
|
871
911
|
} | {
|
|
872
912
|
type: "SWIPE_START";
|
|
873
913
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -915,10 +955,12 @@ export declare const TransitionMachineContext: {
|
|
|
915
955
|
transition: "slide";
|
|
916
956
|
to: string;
|
|
917
957
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
958
|
+
duration: number;
|
|
918
959
|
} | {
|
|
919
960
|
type: "TRANSITION_TRIGGER";
|
|
920
961
|
transition: "fade";
|
|
921
962
|
to: string;
|
|
963
|
+
duration: number;
|
|
922
964
|
} | {
|
|
923
965
|
type: "SWIPE_START";
|
|
924
966
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -959,10 +1001,12 @@ export declare const TransitionMachineContext: {
|
|
|
959
1001
|
transition: "slide";
|
|
960
1002
|
to: string;
|
|
961
1003
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1004
|
+
duration: number;
|
|
962
1005
|
} | {
|
|
963
1006
|
type: "TRANSITION_TRIGGER";
|
|
964
1007
|
transition: "fade";
|
|
965
1008
|
to: string;
|
|
1009
|
+
duration: number;
|
|
966
1010
|
} | {
|
|
967
1011
|
type: "SWIPE_START";
|
|
968
1012
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1006,10 +1050,12 @@ export declare const TransitionMachineContext: {
|
|
|
1006
1050
|
transition: "slide";
|
|
1007
1051
|
to: string;
|
|
1008
1052
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1053
|
+
duration: number;
|
|
1009
1054
|
} | {
|
|
1010
1055
|
type: "TRANSITION_TRIGGER";
|
|
1011
1056
|
transition: "fade";
|
|
1012
1057
|
to: string;
|
|
1058
|
+
duration: number;
|
|
1013
1059
|
} | {
|
|
1014
1060
|
type: "SWIPE_START";
|
|
1015
1061
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1054,10 +1100,12 @@ export declare const TransitionMachineContext: {
|
|
|
1054
1100
|
transition: "slide";
|
|
1055
1101
|
to: string;
|
|
1056
1102
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1103
|
+
duration: number;
|
|
1057
1104
|
} | {
|
|
1058
1105
|
type: "TRANSITION_TRIGGER";
|
|
1059
1106
|
transition: "fade";
|
|
1060
1107
|
to: string;
|
|
1108
|
+
duration: number;
|
|
1061
1109
|
} | {
|
|
1062
1110
|
type: "SWIPE_START";
|
|
1063
1111
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1100,10 +1148,12 @@ export declare const TransitionMachineContext: {
|
|
|
1100
1148
|
transition: "slide";
|
|
1101
1149
|
to: string;
|
|
1102
1150
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1151
|
+
duration: number;
|
|
1103
1152
|
} | {
|
|
1104
1153
|
type: "TRANSITION_TRIGGER";
|
|
1105
1154
|
transition: "fade";
|
|
1106
1155
|
to: string;
|
|
1156
|
+
duration: number;
|
|
1107
1157
|
} | {
|
|
1108
1158
|
type: "SWIPE_START";
|
|
1109
1159
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1173,10 +1223,12 @@ export declare const TransitionMachineContext: {
|
|
|
1173
1223
|
transition: "slide";
|
|
1174
1224
|
to: string;
|
|
1175
1225
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1226
|
+
duration: number;
|
|
1176
1227
|
} | {
|
|
1177
1228
|
type: "TRANSITION_TRIGGER";
|
|
1178
1229
|
transition: "fade";
|
|
1179
1230
|
to: string;
|
|
1231
|
+
duration: number;
|
|
1180
1232
|
} | {
|
|
1181
1233
|
type: "SWIPE_START";
|
|
1182
1234
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1207,10 +1259,12 @@ export declare const TransitionMachineContext: {
|
|
|
1207
1259
|
transition: "slide";
|
|
1208
1260
|
to: string;
|
|
1209
1261
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1262
|
+
duration: number;
|
|
1210
1263
|
} | {
|
|
1211
1264
|
type: "TRANSITION_TRIGGER";
|
|
1212
1265
|
transition: "fade";
|
|
1213
1266
|
to: string;
|
|
1267
|
+
duration: number;
|
|
1214
1268
|
} | {
|
|
1215
1269
|
type: "SWIPE_START";
|
|
1216
1270
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1264,10 +1318,12 @@ export declare const TransitionMachineContext: {
|
|
|
1264
1318
|
transition: "slide";
|
|
1265
1319
|
to: string;
|
|
1266
1320
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1321
|
+
duration: number;
|
|
1267
1322
|
} | {
|
|
1268
1323
|
type: "TRANSITION_TRIGGER";
|
|
1269
1324
|
transition: "fade";
|
|
1270
1325
|
to: string;
|
|
1326
|
+
duration: number;
|
|
1271
1327
|
} | {
|
|
1272
1328
|
type: "SWIPE_START";
|
|
1273
1329
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1300,10 +1356,12 @@ export declare const TransitionMachineContext: {
|
|
|
1300
1356
|
transition: "slide";
|
|
1301
1357
|
to: string;
|
|
1302
1358
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1359
|
+
duration: number;
|
|
1303
1360
|
} | {
|
|
1304
1361
|
type: "TRANSITION_TRIGGER";
|
|
1305
1362
|
transition: "fade";
|
|
1306
1363
|
to: string;
|
|
1364
|
+
duration: number;
|
|
1307
1365
|
}, {
|
|
1308
1366
|
type: "SWIPE_PREPARE";
|
|
1309
1367
|
touchData: {
|
|
@@ -1315,10 +1373,12 @@ export declare const TransitionMachineContext: {
|
|
|
1315
1373
|
transition: "slide";
|
|
1316
1374
|
to: string;
|
|
1317
1375
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1376
|
+
duration: number;
|
|
1318
1377
|
} | {
|
|
1319
1378
|
type: "TRANSITION_TRIGGER";
|
|
1320
1379
|
transition: "fade";
|
|
1321
1380
|
to: string;
|
|
1381
|
+
duration: number;
|
|
1322
1382
|
} | {
|
|
1323
1383
|
type: "SWIPE_START";
|
|
1324
1384
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1368,10 +1428,12 @@ export declare const TransitionMachineContext: {
|
|
|
1368
1428
|
transition: "slide";
|
|
1369
1429
|
to: string;
|
|
1370
1430
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1431
|
+
duration: number;
|
|
1371
1432
|
} | {
|
|
1372
1433
|
type: "TRANSITION_TRIGGER";
|
|
1373
1434
|
transition: "fade";
|
|
1374
1435
|
to: string;
|
|
1436
|
+
duration: number;
|
|
1375
1437
|
} | {
|
|
1376
1438
|
type: "SWIPE_START";
|
|
1377
1439
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1412,10 +1474,12 @@ export declare const TransitionMachineContext: {
|
|
|
1412
1474
|
transition: "slide";
|
|
1413
1475
|
to: string;
|
|
1414
1476
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1477
|
+
duration: number;
|
|
1415
1478
|
} | {
|
|
1416
1479
|
type: "TRANSITION_TRIGGER";
|
|
1417
1480
|
transition: "fade";
|
|
1418
1481
|
to: string;
|
|
1482
|
+
duration: number;
|
|
1419
1483
|
} | {
|
|
1420
1484
|
type: "SWIPE_START";
|
|
1421
1485
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1463,10 +1527,12 @@ export declare const TransitionMachineContext: {
|
|
|
1463
1527
|
transition: "slide";
|
|
1464
1528
|
to: string;
|
|
1465
1529
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1530
|
+
duration: number;
|
|
1466
1531
|
} | {
|
|
1467
1532
|
type: "TRANSITION_TRIGGER";
|
|
1468
1533
|
transition: "fade";
|
|
1469
1534
|
to: string;
|
|
1535
|
+
duration: number;
|
|
1470
1536
|
} | {
|
|
1471
1537
|
type: "SWIPE_START";
|
|
1472
1538
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1507,10 +1573,12 @@ export declare const TransitionMachineContext: {
|
|
|
1507
1573
|
transition: "slide";
|
|
1508
1574
|
to: string;
|
|
1509
1575
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1576
|
+
duration: number;
|
|
1510
1577
|
} | {
|
|
1511
1578
|
type: "TRANSITION_TRIGGER";
|
|
1512
1579
|
transition: "fade";
|
|
1513
1580
|
to: string;
|
|
1581
|
+
duration: number;
|
|
1514
1582
|
} | {
|
|
1515
1583
|
type: "SWIPE_START";
|
|
1516
1584
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1554,10 +1622,12 @@ export declare const TransitionMachineContext: {
|
|
|
1554
1622
|
transition: "slide";
|
|
1555
1623
|
to: string;
|
|
1556
1624
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1625
|
+
duration: number;
|
|
1557
1626
|
} | {
|
|
1558
1627
|
type: "TRANSITION_TRIGGER";
|
|
1559
1628
|
transition: "fade";
|
|
1560
1629
|
to: string;
|
|
1630
|
+
duration: number;
|
|
1561
1631
|
} | {
|
|
1562
1632
|
type: "SWIPE_START";
|
|
1563
1633
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1602,10 +1672,12 @@ export declare const TransitionMachineContext: {
|
|
|
1602
1672
|
transition: "slide";
|
|
1603
1673
|
to: string;
|
|
1604
1674
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1675
|
+
duration: number;
|
|
1605
1676
|
} | {
|
|
1606
1677
|
type: "TRANSITION_TRIGGER";
|
|
1607
1678
|
transition: "fade";
|
|
1608
1679
|
to: string;
|
|
1680
|
+
duration: number;
|
|
1609
1681
|
} | {
|
|
1610
1682
|
type: "SWIPE_START";
|
|
1611
1683
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1647,10 +1719,12 @@ export declare const TransitionMachineContext: {
|
|
|
1647
1719
|
transition: "slide";
|
|
1648
1720
|
to: string;
|
|
1649
1721
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1722
|
+
duration: number;
|
|
1650
1723
|
} | {
|
|
1651
1724
|
type: "TRANSITION_TRIGGER";
|
|
1652
1725
|
transition: "fade";
|
|
1653
1726
|
to: string;
|
|
1727
|
+
duration: number;
|
|
1654
1728
|
} | {
|
|
1655
1729
|
type: "SWIPE_START";
|
|
1656
1730
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1720,10 +1794,12 @@ export declare const TransitionMachineContext: {
|
|
|
1720
1794
|
transition: "slide";
|
|
1721
1795
|
to: string;
|
|
1722
1796
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1797
|
+
duration: number;
|
|
1723
1798
|
} | {
|
|
1724
1799
|
type: "TRANSITION_TRIGGER";
|
|
1725
1800
|
transition: "fade";
|
|
1726
1801
|
to: string;
|
|
1802
|
+
duration: number;
|
|
1727
1803
|
} | {
|
|
1728
1804
|
type: "SWIPE_START";
|
|
1729
1805
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1754,10 +1830,12 @@ export declare const TransitionMachineContext: {
|
|
|
1754
1830
|
transition: "slide";
|
|
1755
1831
|
to: string;
|
|
1756
1832
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1833
|
+
duration: number;
|
|
1757
1834
|
} | {
|
|
1758
1835
|
type: "TRANSITION_TRIGGER";
|
|
1759
1836
|
transition: "fade";
|
|
1760
1837
|
to: string;
|
|
1838
|
+
duration: number;
|
|
1761
1839
|
} | {
|
|
1762
1840
|
type: "SWIPE_START";
|
|
1763
1841
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1811,10 +1889,12 @@ export declare const TransitionMachineContext: {
|
|
|
1811
1889
|
transition: "slide";
|
|
1812
1890
|
to: string;
|
|
1813
1891
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1892
|
+
duration: number;
|
|
1814
1893
|
} | {
|
|
1815
1894
|
type: "TRANSITION_TRIGGER";
|
|
1816
1895
|
transition: "fade";
|
|
1817
1896
|
to: string;
|
|
1897
|
+
duration: number;
|
|
1818
1898
|
} | {
|
|
1819
1899
|
type: "SWIPE_START";
|
|
1820
1900
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1847,10 +1927,12 @@ export declare const TransitionMachineContext: {
|
|
|
1847
1927
|
transition: "slide";
|
|
1848
1928
|
to: string;
|
|
1849
1929
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1930
|
+
duration: number;
|
|
1850
1931
|
} | {
|
|
1851
1932
|
type: "TRANSITION_TRIGGER";
|
|
1852
1933
|
transition: "fade";
|
|
1853
1934
|
to: string;
|
|
1935
|
+
duration: number;
|
|
1854
1936
|
}, {
|
|
1855
1937
|
type: "SWIPE_PREPARE";
|
|
1856
1938
|
touchData: {
|
|
@@ -1862,10 +1944,12 @@ export declare const TransitionMachineContext: {
|
|
|
1862
1944
|
transition: "slide";
|
|
1863
1945
|
to: string;
|
|
1864
1946
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
1947
|
+
duration: number;
|
|
1865
1948
|
} | {
|
|
1866
1949
|
type: "TRANSITION_TRIGGER";
|
|
1867
1950
|
transition: "fade";
|
|
1868
1951
|
to: string;
|
|
1952
|
+
duration: number;
|
|
1869
1953
|
} | {
|
|
1870
1954
|
type: "SWIPE_START";
|
|
1871
1955
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1915,10 +1999,12 @@ export declare const TransitionMachineContext: {
|
|
|
1915
1999
|
transition: "slide";
|
|
1916
2000
|
to: string;
|
|
1917
2001
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
2002
|
+
duration: number;
|
|
1918
2003
|
} | {
|
|
1919
2004
|
type: "TRANSITION_TRIGGER";
|
|
1920
2005
|
transition: "fade";
|
|
1921
2006
|
to: string;
|
|
2007
|
+
duration: number;
|
|
1922
2008
|
} | {
|
|
1923
2009
|
type: "SWIPE_START";
|
|
1924
2010
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -1959,10 +2045,12 @@ export declare const TransitionMachineContext: {
|
|
|
1959
2045
|
transition: "slide";
|
|
1960
2046
|
to: string;
|
|
1961
2047
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
2048
|
+
duration: number;
|
|
1962
2049
|
} | {
|
|
1963
2050
|
type: "TRANSITION_TRIGGER";
|
|
1964
2051
|
transition: "fade";
|
|
1965
2052
|
to: string;
|
|
2053
|
+
duration: number;
|
|
1966
2054
|
} | {
|
|
1967
2055
|
type: "SWIPE_START";
|
|
1968
2056
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -2010,10 +2098,12 @@ export declare const TransitionMachineContext: {
|
|
|
2010
2098
|
transition: "slide";
|
|
2011
2099
|
to: string;
|
|
2012
2100
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
2101
|
+
duration: number;
|
|
2013
2102
|
} | {
|
|
2014
2103
|
type: "TRANSITION_TRIGGER";
|
|
2015
2104
|
transition: "fade";
|
|
2016
2105
|
to: string;
|
|
2106
|
+
duration: number;
|
|
2017
2107
|
} | {
|
|
2018
2108
|
type: "SWIPE_START";
|
|
2019
2109
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -2054,10 +2144,12 @@ export declare const TransitionMachineContext: {
|
|
|
2054
2144
|
transition: "slide";
|
|
2055
2145
|
to: string;
|
|
2056
2146
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
2147
|
+
duration: number;
|
|
2057
2148
|
} | {
|
|
2058
2149
|
type: "TRANSITION_TRIGGER";
|
|
2059
2150
|
transition: "fade";
|
|
2060
2151
|
to: string;
|
|
2152
|
+
duration: number;
|
|
2061
2153
|
} | {
|
|
2062
2154
|
type: "SWIPE_START";
|
|
2063
2155
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -2101,10 +2193,12 @@ export declare const TransitionMachineContext: {
|
|
|
2101
2193
|
transition: "slide";
|
|
2102
2194
|
to: string;
|
|
2103
2195
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
2196
|
+
duration: number;
|
|
2104
2197
|
} | {
|
|
2105
2198
|
type: "TRANSITION_TRIGGER";
|
|
2106
2199
|
transition: "fade";
|
|
2107
2200
|
to: string;
|
|
2201
|
+
duration: number;
|
|
2108
2202
|
} | {
|
|
2109
2203
|
type: "SWIPE_START";
|
|
2110
2204
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -2149,10 +2243,12 @@ export declare const TransitionMachineContext: {
|
|
|
2149
2243
|
transition: "slide";
|
|
2150
2244
|
to: string;
|
|
2151
2245
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
2246
|
+
duration: number;
|
|
2152
2247
|
} | {
|
|
2153
2248
|
type: "TRANSITION_TRIGGER";
|
|
2154
2249
|
transition: "fade";
|
|
2155
2250
|
to: string;
|
|
2251
|
+
duration: number;
|
|
2156
2252
|
} | {
|
|
2157
2253
|
type: "SWIPE_START";
|
|
2158
2254
|
direction: import("../../sdk/transitions/utils/types").Direction;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import { Relation } from '../../sdk/types/project/Relation';
|
|
3
|
+
interface Props {
|
|
4
|
+
startScene: string;
|
|
5
|
+
relations: Relation[];
|
|
6
|
+
scenes: {
|
|
7
|
+
id: string;
|
|
8
|
+
}[];
|
|
9
|
+
}
|
|
10
|
+
export declare const TransitionMachineContextProvider: FC<PropsWithChildren<Props>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransitionMachineContextProvider = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const TransitionMachineContext_1 = require("./TransitionMachineContext");
|
|
6
|
+
const IframePreviewWindowContext_1 = require("../components/Preview/IframePreviewWindowContext");
|
|
7
|
+
const TransitionMachineContextProvider = ({ children, startScene, relations, scenes }) => {
|
|
8
|
+
const iframePreviewWindow = (0, IframePreviewWindowContext_1.useIframePreviewWindow)();
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(TransitionMachineContext_1.TransitionMachineContext.Provider, { options: {
|
|
10
|
+
input: {
|
|
11
|
+
startScene,
|
|
12
|
+
relations,
|
|
13
|
+
scenes,
|
|
14
|
+
previewWindow: iframePreviewWindow,
|
|
15
|
+
}
|
|
16
|
+
}, children: children }));
|
|
17
|
+
};
|
|
18
|
+
exports.TransitionMachineContextProvider = TransitionMachineContextProvider;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gxpl/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.41",
|
|
4
4
|
"description": "Generic SDK for use in public websites.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"styled-jsx": "^5.0.2",
|
|
61
61
|
"ts-node": "^10.9.1",
|
|
62
62
|
"ua-parser-js": "^1.0.37",
|
|
63
|
+
"ulid": "^3.0.2",
|
|
63
64
|
"url": "^0.11.0",
|
|
64
65
|
"xstate": "^5.24.0",
|
|
65
66
|
"zod": "^3.22.4"
|