@gxpl/sdk 0.0.12 → 0.0.14

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.
Files changed (55) hide show
  1. package/lib/sdk/Client/Client.d.ts +3 -7
  2. package/lib/sdk/Client/Client.js +9 -38
  3. package/lib/sdk/schemas/project/Project.schema.d.ts +28 -57
  4. package/lib/sdk/schemas/project/Project.schema.js +7 -10
  5. package/lib/sdk/transitions/transitionMachine.d.ts +616 -0
  6. package/lib/sdk/transitions/transitionMachine.js +258 -0
  7. package/lib/sdk/transitions/utils/findRelation.d.ts +2 -0
  8. package/lib/sdk/transitions/utils/findRelation.js +10 -0
  9. package/lib/sdk/transitions/utils/getAvailableTransitions.d.ts +7 -0
  10. package/lib/sdk/transitions/utils/getAvailableTransitions.js +12 -0
  11. package/lib/sdk/transitions/utils/getAxis.d.ts +2 -0
  12. package/lib/sdk/transitions/utils/getAxis.js +6 -0
  13. package/lib/sdk/transitions/utils/getDeltaAndProgress.d.ts +11 -0
  14. package/lib/sdk/transitions/utils/getDeltaAndProgress.js +13 -0
  15. package/lib/sdk/transitions/utils/getScenesOnEnd.d.ts +21 -0
  16. package/lib/sdk/transitions/utils/getScenesOnEnd.js +30 -0
  17. package/lib/sdk/transitions/utils/getScenesOnInit.d.ts +6 -0
  18. package/lib/sdk/transitions/utils/getScenesOnInit.js +20 -0
  19. package/lib/sdk/transitions/utils/getScenesOnInstantTransition.d.ts +2 -0
  20. package/lib/sdk/transitions/utils/getScenesOnInstantTransition.js +38 -0
  21. package/lib/sdk/transitions/utils/getScenesOnProgressUpdate.d.ts +26 -0
  22. package/lib/sdk/transitions/utils/getScenesOnProgressUpdate.js +15 -0
  23. package/lib/sdk/transitions/utils/getScenesOnStart.d.ts +21 -0
  24. package/lib/sdk/transitions/utils/getScenesOnStart.js +52 -0
  25. package/lib/sdk/transitions/utils/isActiveSwipeTransition.d.ts +2 -0
  26. package/lib/sdk/transitions/utils/isActiveSwipeTransition.js +12 -0
  27. package/lib/sdk/transitions/utils/isOverThreshold.d.ts +1 -0
  28. package/lib/sdk/transitions/utils/isOverThreshold.js +6 -0
  29. package/lib/sdk/transitions/utils/isTransitionSuccess.d.ts +2 -0
  30. package/lib/sdk/transitions/utils/isTransitionSuccess.js +15 -0
  31. package/lib/sdk/transitions/utils/normalizeOpacity.d.ts +1 -0
  32. package/lib/sdk/transitions/utils/normalizeOpacity.js +8 -0
  33. package/lib/sdk/transitions/utils/types.d.ts +49 -0
  34. package/lib/sdk/transitions/utils/types.js +2 -0
  35. package/lib/sdk/types/project/Page.d.ts +0 -7
  36. package/lib/sdk/types/project/Project.d.ts +2 -0
  37. package/lib/sdk/types/project/Relation.d.ts +8 -0
  38. package/lib/sdk/types/project/Relation.js +2 -0
  39. package/lib/sdk-nextjs/components/Article.d.ts +9 -2
  40. package/lib/sdk-nextjs/components/Article.js +8 -5
  41. package/lib/sdk-nextjs/components/ArticleWrapper.d.ts +12 -1
  42. package/lib/sdk-nextjs/components/ArticleWrapper.js +155 -2
  43. package/lib/sdk-nextjs/components/Head.d.ts +0 -2
  44. package/lib/sdk-nextjs/components/Head.js +2 -1
  45. package/lib/sdk-nextjs/components/Page.d.ts +4 -7
  46. package/lib/sdk-nextjs/components/Page.js +13 -7
  47. package/lib/sdk-nextjs/components/Scenes/Scenes.d.ts +11 -0
  48. package/lib/sdk-nextjs/components/Scenes/Scenes.js +16 -0
  49. package/lib/sdk-nextjs/components/items/Item.js +2 -2
  50. package/lib/sdk-nextjs/components/items/RectangleItem/RectangleItem.js +3 -3
  51. package/lib/sdk-nextjs/provider/CntrlSdkContext.d.ts +2 -2
  52. package/lib/sdk-nextjs/provider/CntrlSdkContext.js +4 -2
  53. package/lib/sdk-nextjs/provider/TransitionMachineContext.d.ts +2186 -0
  54. package/lib/sdk-nextjs/provider/TransitionMachineContext.js +6 -0
  55. package/package.json +3 -1
@@ -0,0 +1,616 @@
1
+ import type { Direction, Relation, Transition, TransitionScene } from './utils/types';
2
+ export declare const transitionMachine: import("xstate").StateMachine<TransitionContext, {
3
+ type: "SWIPE_PREPARE";
4
+ touchData: {
5
+ startX: number;
6
+ startY: number;
7
+ };
8
+ } | {
9
+ type: "TRANSITION_TRIGGER";
10
+ transition: "slide";
11
+ to: string;
12
+ direction: Direction;
13
+ } | {
14
+ type: "TRANSITION_TRIGGER";
15
+ transition: "fade";
16
+ to: string;
17
+ } | {
18
+ type: "SWIPE_START";
19
+ direction: Direction;
20
+ touchData: {
21
+ x: number;
22
+ y: number;
23
+ };
24
+ } | {
25
+ type: "SWIPE_CANCEL";
26
+ } | {
27
+ type: "SWIPE_END";
28
+ } | {
29
+ type: "SETTLE_END";
30
+ } | {
31
+ type: "SWIPE_PROGRESS_UPDATE";
32
+ touchData: {
33
+ x: number;
34
+ y: number;
35
+ };
36
+ }, {
37
+ [x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void, import("xstate").NonReducibleUnknown, import("xstate").EventObject>> | undefined;
38
+ }, {
39
+ src: "waitForNextFrame";
40
+ logic: import("xstate").PromiseActorLogic<void, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
41
+ id: string | undefined;
42
+ }, never, never, never, "preparing" | "active" | "settling" | "instant_transitioning" | "transitioning", string, TransitionMachineInput, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
43
+ /** @xstate-layout N4IgpgJg5mDOIC5QBcBOBDAdrAlsnA9pgHToDG+AbmAMQDKA6gJIAKAogPosBKbLAgrwDaABgC6iUAAcCufEUkgAHogBMqgOzEAHAEZdAVm0BmPSIMBOCxoBsAGhABPRABZdx4iI2qLLi9o1jHw0RYwBfMIc0LDlCEnIqWgAVbn4AOTomJKYAeTSOFKYAcSK2blEJJBAZWIUqlQRVGwMdA10rYw19AxttbQdnRpEbYg1-awsRdWMejQMIqIxsPDjiKVQwKXRUHEwoemZ2DjokwSSKxRqVutAGm31PDSftCxnQgyCB13dHnz8AoLWUILEDRZbyEjrTbbXb7RisTgAYXSiLYABkLlUrhDFA0ZhZiKp3ETOkEXF57E5EEFdMQgi9jC5tEYmT0QWDaiQOddMLCDgiuNwckVeHQ6BwAKosAAi-CSbEx0lkPNxiA0LhcxBcIXxIn0IRsGi+CBpdNUL2abimnQs7KWnOI3IhfPhRzYaWliuqypx9UQ-i0vhCUx6TMZRqpCDcHi8PnaNIMGuadpiPOIu1gyCwyA4TrifIgRDA6cwlAIAGti3miCXM9nc-aebCELsy2R0BCKl7sXFVQhbC1VC5TCILLo+pox8bVCJtISrKELG1jCINaoU+DVrAwMhkAAbF1sJJJNGcd2e8SXH29v0IaxaYzGQ0WVSddpdXTG4mjUcuV+BDU-3mEFMAICA4EUatMCvTk+26HR2nUSZVysSlBhcQdfxnbQ-10JkiQ3B0EhwagYJVW9dBsDw9BfHwRBQiw0LUHxRjmRMbHuHoDDGGxCLTKEth2PYyN9W5XENYhdD1Npmnce5R2NYcRhQtp1Q4ywTHCSJQUbCFHV0-NhKxa8bmURBtD1OlhmMfR6OMVDjEUp9PD8VSXHU-wtMWVM9IzLNMBzKDYREm8xIQAxZ1GGxWQXVQPg46dhkJNjGKXEkZ3XbSoOIbddwPIylVgiipJaQwIsfSx7N0Wxp1fYhosNYYXgMf9tF4iIwiAA */
44
+ readonly id: "transition";
45
+ readonly initial: "active";
46
+ readonly context: ({ input }: {
47
+ spawn: {
48
+ <TSrc extends "waitForNextFrame">(logic: TSrc, ...[options]: {
49
+ src: "waitForNextFrame";
50
+ logic: import("xstate").PromiseActorLogic<void, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
51
+ id: string | undefined;
52
+ } extends infer T ? T extends {
53
+ src: "waitForNextFrame";
54
+ logic: import("xstate").PromiseActorLogic<void, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
55
+ id: string | undefined;
56
+ } ? T extends {
57
+ src: TSrc;
58
+ } ? import("xstate").ConditionalRequired<[options?: ({
59
+ id?: T["id"] | undefined;
60
+ systemId?: string;
61
+ input?: import("xstate").InputFrom<T["logic"]> | undefined;
62
+ syncSnapshot?: boolean;
63
+ } & { [K in import("xstate").RequiredActorOptions<T>]: unknown; }) | undefined], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T>>> : never : never : never): import("xstate").ActorRefFromLogic<import("xstate").GetConcreteByKey<{
64
+ src: "waitForNextFrame";
65
+ logic: import("xstate").PromiseActorLogic<void, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
66
+ id: string | undefined;
67
+ }, "src", TSrc>["logic"]>;
68
+ <TLogic extends import("xstate").AnyActorLogic>(src: TLogic, ...[options]: import("xstate").ConditionalRequired<[options?: ({
69
+ id?: never;
70
+ systemId?: string;
71
+ input?: import("xstate").InputFrom<TLogic> | undefined;
72
+ syncSnapshot?: boolean;
73
+ } & { [K in import("xstate").RequiredLogicInput<TLogic>]: unknown; }) | undefined], import("xstate").IsNotNever<import("xstate").RequiredLogicInput<TLogic>>>): import("xstate").ActorRefFromLogic<TLogic>;
74
+ };
75
+ input: TransitionMachineInput;
76
+ self: import("xstate").ActorRef<import("xstate").MachineSnapshot<TransitionContext, {
77
+ type: "SWIPE_PREPARE";
78
+ touchData: {
79
+ startX: number;
80
+ startY: number;
81
+ };
82
+ } | {
83
+ type: "TRANSITION_TRIGGER";
84
+ transition: "slide";
85
+ to: string;
86
+ direction: Direction;
87
+ } | {
88
+ type: "TRANSITION_TRIGGER";
89
+ transition: "fade";
90
+ to: string;
91
+ } | {
92
+ type: "SWIPE_START";
93
+ direction: Direction;
94
+ touchData: {
95
+ x: number;
96
+ y: number;
97
+ };
98
+ } | {
99
+ type: "SWIPE_CANCEL";
100
+ } | {
101
+ type: "SWIPE_END";
102
+ } | {
103
+ type: "SETTLE_END";
104
+ } | {
105
+ type: "SWIPE_PROGRESS_UPDATE";
106
+ touchData: {
107
+ x: number;
108
+ y: number;
109
+ };
110
+ }, Record<string, import("xstate").AnyActorRef | undefined>, import("xstate").StateValue, string, unknown, any, any>, {
111
+ type: "SWIPE_PREPARE";
112
+ touchData: {
113
+ startX: number;
114
+ startY: number;
115
+ };
116
+ } | {
117
+ type: "TRANSITION_TRIGGER";
118
+ transition: "slide";
119
+ to: string;
120
+ direction: Direction;
121
+ } | {
122
+ type: "TRANSITION_TRIGGER";
123
+ transition: "fade";
124
+ to: string;
125
+ } | {
126
+ type: "SWIPE_START";
127
+ direction: Direction;
128
+ touchData: {
129
+ x: number;
130
+ y: number;
131
+ };
132
+ } | {
133
+ type: "SWIPE_CANCEL";
134
+ } | {
135
+ type: "SWIPE_END";
136
+ } | {
137
+ type: "SETTLE_END";
138
+ } | {
139
+ type: "SWIPE_PROGRESS_UPDATE";
140
+ touchData: {
141
+ x: number;
142
+ y: number;
143
+ };
144
+ }, import("xstate").AnyEventObject>;
145
+ }) => {
146
+ input: TransitionMachineInput;
147
+ transitionReady: {
148
+ north: boolean;
149
+ east: boolean;
150
+ south: boolean;
151
+ west: boolean;
152
+ };
153
+ transition: null;
154
+ scenes: TransitionScene[];
155
+ };
156
+ readonly states: {
157
+ readonly active: {
158
+ readonly on: {
159
+ readonly SWIPE_PREPARE: {
160
+ readonly target: "preparing";
161
+ readonly actions: import("xstate").ActionFunction<TransitionContext, {
162
+ type: "SWIPE_PREPARE";
163
+ touchData: {
164
+ startX: number;
165
+ startY: number;
166
+ };
167
+ }, {
168
+ type: "SWIPE_PREPARE";
169
+ touchData: {
170
+ startX: number;
171
+ startY: number;
172
+ };
173
+ } | {
174
+ type: "TRANSITION_TRIGGER";
175
+ transition: "slide";
176
+ to: string;
177
+ direction: Direction;
178
+ } | {
179
+ type: "TRANSITION_TRIGGER";
180
+ transition: "fade";
181
+ to: string;
182
+ } | {
183
+ type: "SWIPE_START";
184
+ direction: Direction;
185
+ touchData: {
186
+ x: number;
187
+ y: number;
188
+ };
189
+ } | {
190
+ type: "SWIPE_CANCEL";
191
+ } | {
192
+ type: "SWIPE_END";
193
+ } | {
194
+ type: "SETTLE_END";
195
+ } | {
196
+ type: "SWIPE_PROGRESS_UPDATE";
197
+ touchData: {
198
+ x: number;
199
+ y: number;
200
+ };
201
+ }, undefined, {
202
+ src: "waitForNextFrame";
203
+ logic: import("xstate").PromiseActorLogic<void, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
204
+ id: string | undefined;
205
+ }, never, never, never, never>;
206
+ };
207
+ readonly TRANSITION_TRIGGER: {
208
+ readonly target: "instant_transitioning";
209
+ readonly actions: import("xstate").ActionFunction<TransitionContext, {
210
+ type: "TRANSITION_TRIGGER";
211
+ transition: "slide";
212
+ to: string;
213
+ direction: Direction;
214
+ } | {
215
+ type: "TRANSITION_TRIGGER";
216
+ transition: "fade";
217
+ to: string;
218
+ }, {
219
+ type: "SWIPE_PREPARE";
220
+ touchData: {
221
+ startX: number;
222
+ startY: number;
223
+ };
224
+ } | {
225
+ type: "TRANSITION_TRIGGER";
226
+ transition: "slide";
227
+ to: string;
228
+ direction: Direction;
229
+ } | {
230
+ type: "TRANSITION_TRIGGER";
231
+ transition: "fade";
232
+ to: string;
233
+ } | {
234
+ type: "SWIPE_START";
235
+ direction: Direction;
236
+ touchData: {
237
+ x: number;
238
+ y: number;
239
+ };
240
+ } | {
241
+ type: "SWIPE_CANCEL";
242
+ } | {
243
+ type: "SWIPE_END";
244
+ } | {
245
+ type: "SETTLE_END";
246
+ } | {
247
+ type: "SWIPE_PROGRESS_UPDATE";
248
+ touchData: {
249
+ x: number;
250
+ y: number;
251
+ };
252
+ }, undefined, {
253
+ src: "waitForNextFrame";
254
+ logic: import("xstate").PromiseActorLogic<void, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
255
+ id: string | undefined;
256
+ }, never, never, never, never>;
257
+ };
258
+ };
259
+ };
260
+ readonly preparing: {
261
+ readonly on: {
262
+ readonly SWIPE_START: {
263
+ readonly target: "transitioning";
264
+ readonly actions: import("xstate").ActionFunction<TransitionContext, {
265
+ type: "SWIPE_START";
266
+ direction: Direction;
267
+ touchData: {
268
+ x: number;
269
+ y: number;
270
+ };
271
+ }, {
272
+ type: "SWIPE_PREPARE";
273
+ touchData: {
274
+ startX: number;
275
+ startY: number;
276
+ };
277
+ } | {
278
+ type: "TRANSITION_TRIGGER";
279
+ transition: "slide";
280
+ to: string;
281
+ direction: Direction;
282
+ } | {
283
+ type: "TRANSITION_TRIGGER";
284
+ transition: "fade";
285
+ to: string;
286
+ } | {
287
+ type: "SWIPE_START";
288
+ direction: Direction;
289
+ touchData: {
290
+ x: number;
291
+ y: number;
292
+ };
293
+ } | {
294
+ type: "SWIPE_CANCEL";
295
+ } | {
296
+ type: "SWIPE_END";
297
+ } | {
298
+ type: "SETTLE_END";
299
+ } | {
300
+ type: "SWIPE_PROGRESS_UPDATE";
301
+ touchData: {
302
+ x: number;
303
+ y: number;
304
+ };
305
+ }, undefined, {
306
+ src: "waitForNextFrame";
307
+ logic: import("xstate").PromiseActorLogic<void, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
308
+ id: string | undefined;
309
+ }, never, never, never, never>;
310
+ };
311
+ readonly SWIPE_CANCEL: {
312
+ readonly target: "active";
313
+ readonly actions: import("xstate").ActionFunction<TransitionContext, {
314
+ type: "SWIPE_CANCEL";
315
+ }, {
316
+ type: "SWIPE_PREPARE";
317
+ touchData: {
318
+ startX: number;
319
+ startY: number;
320
+ };
321
+ } | {
322
+ type: "TRANSITION_TRIGGER";
323
+ transition: "slide";
324
+ to: string;
325
+ direction: Direction;
326
+ } | {
327
+ type: "TRANSITION_TRIGGER";
328
+ transition: "fade";
329
+ to: string;
330
+ } | {
331
+ type: "SWIPE_START";
332
+ direction: Direction;
333
+ touchData: {
334
+ x: number;
335
+ y: number;
336
+ };
337
+ } | {
338
+ type: "SWIPE_CANCEL";
339
+ } | {
340
+ type: "SWIPE_END";
341
+ } | {
342
+ type: "SETTLE_END";
343
+ } | {
344
+ type: "SWIPE_PROGRESS_UPDATE";
345
+ touchData: {
346
+ x: number;
347
+ y: number;
348
+ };
349
+ }, undefined, {
350
+ src: "waitForNextFrame";
351
+ logic: import("xstate").PromiseActorLogic<void, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
352
+ id: string | undefined;
353
+ }, never, never, never, never>;
354
+ };
355
+ };
356
+ };
357
+ readonly transitioning: {
358
+ readonly on: {
359
+ readonly SWIPE_PROGRESS_UPDATE: {
360
+ readonly actions: import("xstate").ActionFunction<TransitionContext, {
361
+ type: "SWIPE_PROGRESS_UPDATE";
362
+ touchData: {
363
+ x: number;
364
+ y: number;
365
+ };
366
+ }, {
367
+ type: "SWIPE_PREPARE";
368
+ touchData: {
369
+ startX: number;
370
+ startY: number;
371
+ };
372
+ } | {
373
+ type: "TRANSITION_TRIGGER";
374
+ transition: "slide";
375
+ to: string;
376
+ direction: Direction;
377
+ } | {
378
+ type: "TRANSITION_TRIGGER";
379
+ transition: "fade";
380
+ to: string;
381
+ } | {
382
+ type: "SWIPE_START";
383
+ direction: Direction;
384
+ touchData: {
385
+ x: number;
386
+ y: number;
387
+ };
388
+ } | {
389
+ type: "SWIPE_CANCEL";
390
+ } | {
391
+ type: "SWIPE_END";
392
+ } | {
393
+ type: "SETTLE_END";
394
+ } | {
395
+ type: "SWIPE_PROGRESS_UPDATE";
396
+ touchData: {
397
+ x: number;
398
+ y: number;
399
+ };
400
+ }, undefined, {
401
+ src: "waitForNextFrame";
402
+ logic: import("xstate").PromiseActorLogic<void, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
403
+ id: string | undefined;
404
+ }, never, never, never, never>;
405
+ };
406
+ readonly SWIPE_END: {
407
+ readonly target: "settling";
408
+ readonly actions: import("xstate").ActionFunction<TransitionContext, {
409
+ type: "SWIPE_END";
410
+ }, {
411
+ type: "SWIPE_PREPARE";
412
+ touchData: {
413
+ startX: number;
414
+ startY: number;
415
+ };
416
+ } | {
417
+ type: "TRANSITION_TRIGGER";
418
+ transition: "slide";
419
+ to: string;
420
+ direction: Direction;
421
+ } | {
422
+ type: "TRANSITION_TRIGGER";
423
+ transition: "fade";
424
+ to: string;
425
+ } | {
426
+ type: "SWIPE_START";
427
+ direction: Direction;
428
+ touchData: {
429
+ x: number;
430
+ y: number;
431
+ };
432
+ } | {
433
+ type: "SWIPE_CANCEL";
434
+ } | {
435
+ type: "SWIPE_END";
436
+ } | {
437
+ type: "SETTLE_END";
438
+ } | {
439
+ type: "SWIPE_PROGRESS_UPDATE";
440
+ touchData: {
441
+ x: number;
442
+ y: number;
443
+ };
444
+ }, undefined, {
445
+ src: "waitForNextFrame";
446
+ logic: import("xstate").PromiseActorLogic<void, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
447
+ id: string | undefined;
448
+ }, never, never, never, never>;
449
+ };
450
+ };
451
+ };
452
+ readonly instant_transitioning: {
453
+ readonly invoke: {
454
+ readonly src: "waitForNextFrame";
455
+ readonly onDone: {
456
+ readonly target: "settling";
457
+ readonly actions: import("xstate").ActionFunction<TransitionContext, import("xstate").DoneActorEvent<void, string>, {
458
+ type: "SWIPE_PREPARE";
459
+ touchData: {
460
+ startX: number;
461
+ startY: number;
462
+ };
463
+ } | {
464
+ type: "TRANSITION_TRIGGER";
465
+ transition: "slide";
466
+ to: string;
467
+ direction: Direction;
468
+ } | {
469
+ type: "TRANSITION_TRIGGER";
470
+ transition: "fade";
471
+ to: string;
472
+ } | {
473
+ type: "SWIPE_START";
474
+ direction: Direction;
475
+ touchData: {
476
+ x: number;
477
+ y: number;
478
+ };
479
+ } | {
480
+ type: "SWIPE_CANCEL";
481
+ } | {
482
+ type: "SWIPE_END";
483
+ } | {
484
+ type: "SETTLE_END";
485
+ } | {
486
+ type: "SWIPE_PROGRESS_UPDATE";
487
+ touchData: {
488
+ x: number;
489
+ y: number;
490
+ };
491
+ }, undefined, {
492
+ src: "waitForNextFrame";
493
+ logic: import("xstate").PromiseActorLogic<void, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
494
+ id: string | undefined;
495
+ }, never, never, never, never>;
496
+ };
497
+ };
498
+ };
499
+ readonly settling: {
500
+ readonly on: {
501
+ readonly SETTLE_END: {
502
+ readonly target: "active";
503
+ readonly actions: import("xstate").ActionFunction<TransitionContext, {
504
+ type: "SETTLE_END";
505
+ }, {
506
+ type: "SWIPE_PREPARE";
507
+ touchData: {
508
+ startX: number;
509
+ startY: number;
510
+ };
511
+ } | {
512
+ type: "TRANSITION_TRIGGER";
513
+ transition: "slide";
514
+ to: string;
515
+ direction: Direction;
516
+ } | {
517
+ type: "TRANSITION_TRIGGER";
518
+ transition: "fade";
519
+ to: string;
520
+ } | {
521
+ type: "SWIPE_START";
522
+ direction: Direction;
523
+ touchData: {
524
+ x: number;
525
+ y: number;
526
+ };
527
+ } | {
528
+ type: "SWIPE_CANCEL";
529
+ } | {
530
+ type: "SWIPE_END";
531
+ } | {
532
+ type: "SETTLE_END";
533
+ } | {
534
+ type: "SWIPE_PROGRESS_UPDATE";
535
+ touchData: {
536
+ x: number;
537
+ y: number;
538
+ };
539
+ }, undefined, {
540
+ src: "waitForNextFrame";
541
+ logic: import("xstate").PromiseActorLogic<void, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
542
+ id: string | undefined;
543
+ }, never, never, never, never>;
544
+ };
545
+ };
546
+ };
547
+ };
548
+ }>;
549
+ export type TransitionContext = {
550
+ transitionReady: {
551
+ [key in Direction]: boolean;
552
+ };
553
+ transition: Transition | null;
554
+ scenes: TransitionScene[];
555
+ input: TransitionMachineInput;
556
+ };
557
+ export type TransitionEvents = {
558
+ type: 'SWIPE_PREPARE';
559
+ touchData: {
560
+ startX: number;
561
+ startY: number;
562
+ };
563
+ } | {
564
+ type: 'TRANSITION_TRIGGER';
565
+ transition: 'slide';
566
+ to: string;
567
+ direction: Direction;
568
+ } | {
569
+ type: 'TRANSITION_TRIGGER';
570
+ transition: 'fade';
571
+ to: string;
572
+ } | {
573
+ type: 'SWIPE_START';
574
+ direction: Direction;
575
+ touchData: {
576
+ x: number;
577
+ y: number;
578
+ };
579
+ } | {
580
+ type: 'SWIPE_CANCEL';
581
+ } | {
582
+ type: 'SWIPE_END';
583
+ } | {
584
+ type: 'SETTLE_END';
585
+ } | {
586
+ type: 'SWIPE_PROGRESS_UPDATE';
587
+ touchData: {
588
+ x: number;
589
+ y: number;
590
+ };
591
+ };
592
+ export type TransitionTypeStates = {
593
+ value: 'active';
594
+ context: TransitionContext;
595
+ } | {
596
+ value: 'preparing';
597
+ context: TransitionContext;
598
+ } | {
599
+ value: 'transitioning';
600
+ context: TransitionContext;
601
+ } | {
602
+ value: 'instant_transitioning';
603
+ context: TransitionContext;
604
+ } | {
605
+ value: 'settling';
606
+ context: TransitionContext;
607
+ };
608
+ export type TransitionMachineInput = {
609
+ startScene: string;
610
+ scenes: Scene[];
611
+ relations: Relation[];
612
+ };
613
+ type Scene = {
614
+ id: string;
615
+ };
616
+ export {};