UNPKG

1.84 kBTypeScriptView Raw
1interface OverlayStateSchema {
2 states: {
3 closed: {};
4 opening: {
5 states: {
6 start: {};
7 transition: {};
8 immediately: {
9 states: {
10 open: {};
11 activating: {};
12 };
13 };
14 smoothly: {
15 states: {
16 visuallyHidden: {};
17 activating: {};
18 open: {};
19 };
20 };
21 end: {};
22 done: {};
23 };
24 };
25 open: {};
26 dragging: {};
27 snapping: {
28 states: {
29 start: {};
30 snappingSmoothly: {};
31 end: {};
32 done: {};
33 };
34 };
35 resizing: {
36 states: {
37 start: {};
38 resizingSmoothly: {};
39 end: {};
40 done: {};
41 };
42 };
43 closing: {
44 states: {
45 start: {};
46 deactivating: {};
47 closingSmoothly: {};
48 end: {};
49 done: {};
50 };
51 };
52 };
53}
54declare type OverlayEvent = {
55 type: 'OPEN';
56} | {
57 type: 'SNAP';
58 payload: {
59 y: number;
60 velocity: number;
61 source: 'dragging' | 'custom' | string;
62 };
63} | {
64 type: 'CLOSE';
65} | {
66 type: 'DRAG';
67} | {
68 type: 'RESIZE';
69};
70interface OverlayContext {
71 initialState: 'OPEN' | 'CLOSED';
72}
73export declare const overlayMachine: import("xstate").StateMachine<OverlayContext, OverlayStateSchema, OverlayEvent, {
74 value: any;
75 context: OverlayContext;
76}, import("xstate").ActionObject<OverlayContext, OverlayEvent>>;
77export {};