@foldkit/ui 0.162.0 → 0.163.0-canary.085c0174a32b
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/dist/anchor/anchor.d.ts +33 -7
- package/dist/anchor/anchor.d.ts.map +1 -1
- package/dist/anchor/anchor.js +102 -15
- package/dist/anchor/public.d.ts +1 -1
- package/dist/anchor/public.d.ts.map +1 -1
- package/dist/anchor/public.js +1 -1
- package/dist/animation/index.d.ts +3 -0
- package/dist/animation/index.d.ts.map +1 -1
- package/dist/animation/schema.d.ts +13 -4
- package/dist/animation/schema.d.ts.map +1 -1
- package/dist/animation/schema.js +8 -4
- package/dist/animation/update.d.ts +15 -5
- package/dist/animation/update.d.ts.map +1 -1
- package/dist/animation/update.js +59 -27
- package/dist/calendar/index.d.ts.map +1 -1
- package/dist/calendar/index.js +27 -19
- package/dist/checkbox/index.d.ts +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/combobox/multi.d.ts +5 -0
- package/dist/combobox/multi.d.ts.map +1 -1
- package/dist/combobox/multi.js +2 -2
- package/dist/combobox/shared.d.ts +19 -7
- package/dist/combobox/shared.d.ts.map +1 -1
- package/dist/combobox/shared.js +28 -28
- package/dist/combobox/single.d.ts +5 -0
- package/dist/combobox/single.d.ts.map +1 -1
- package/dist/combobox/single.js +4 -4
- package/dist/datePicker/index.d.ts +13 -2
- package/dist/datePicker/index.d.ts.map +1 -1
- package/dist/datePicker/index.js +10 -10
- package/dist/dialog/index.d.ts +13 -2
- package/dist/dialog/index.d.ts.map +1 -1
- package/dist/dialog/index.js +28 -14
- package/dist/disclosure/index.d.ts +2 -2
- package/dist/disclosure/index.js +1 -1
- package/dist/dragAndDrop/index.js +14 -14
- package/dist/fileDrop/index.d.ts.map +1 -1
- package/dist/fileDrop/index.js +7 -5
- package/dist/hoverIntent/hoverIntent.d.ts.map +1 -1
- package/dist/hoverIntent/hoverIntent.js +16 -16
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/internal/accessibleName.d.ts +9 -0
- package/dist/internal/accessibleName.d.ts.map +1 -0
- package/dist/internal/accessibleName.js +12 -0
- package/dist/internal/range.d.ts +7 -0
- package/dist/internal/range.d.ts.map +1 -0
- package/dist/internal/range.js +12 -0
- package/dist/listbox/multi.d.ts +5 -0
- package/dist/listbox/multi.d.ts.map +1 -1
- package/dist/listbox/shared.d.ts +15 -4
- package/dist/listbox/shared.d.ts.map +1 -1
- package/dist/listbox/shared.js +32 -29
- package/dist/listbox/single.d.ts +5 -0
- package/dist/listbox/single.d.ts.map +1 -1
- package/dist/menu/index.d.ts +16 -4
- package/dist/menu/index.d.ts.map +1 -1
- package/dist/menu/index.js +35 -28
- package/dist/meter/index.d.ts +26 -0
- package/dist/meter/index.d.ts.map +1 -0
- package/dist/meter/index.js +67 -0
- package/dist/meter/public.d.ts +3 -0
- package/dist/meter/public.d.ts.map +1 -0
- package/dist/meter/public.js +1 -0
- package/dist/popover/index.d.ts +20 -4
- package/dist/popover/index.d.ts.map +1 -1
- package/dist/popover/index.js +20 -18
- package/dist/progress/index.d.ts +24 -0
- package/dist/progress/index.d.ts.map +1 -0
- package/dist/progress/index.js +85 -0
- package/dist/progress/public.d.ts +3 -0
- package/dist/progress/public.d.ts.map +1 -0
- package/dist/progress/public.js +1 -0
- package/dist/radioGroup/index.d.ts.map +1 -1
- package/dist/radioGroup/index.js +5 -3
- package/dist/slider/index.d.ts +61 -28
- package/dist/slider/index.d.ts.map +1 -1
- package/dist/slider/index.js +163 -87
- package/dist/slider/public.d.ts +1 -1
- package/dist/slider/public.d.ts.map +1 -1
- package/dist/slider/public.js +1 -1
- package/dist/switch/index.d.ts +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/tabs/index.d.ts.map +1 -1
- package/dist/tabs/index.js +5 -3
- package/dist/test/apps/disabledButton.d.ts +12 -4
- package/dist/test/apps/disabledButton.d.ts.map +1 -1
- package/dist/test/apps/disabledButton.js +3 -3
- package/dist/toast/index.d.ts +869 -45
- package/dist/toast/index.d.ts.map +1 -1
- package/dist/toast/index.js +77 -17
- package/dist/toast/public.d.ts +2 -2
- package/dist/toast/public.d.ts.map +1 -1
- package/dist/toast/public.js +1 -1
- package/dist/toast/schema.d.ts +160 -6
- package/dist/toast/schema.d.ts.map +1 -1
- package/dist/toast/schema.js +69 -2
- package/dist/toast/swipeTarget.d.ts +5 -0
- package/dist/toast/swipeTarget.d.ts.map +1 -0
- package/dist/toast/swipeTarget.js +18 -0
- package/dist/toast/test.d.ts +7 -1
- package/dist/toast/test.d.ts.map +1 -1
- package/dist/toast/test.js +37 -3
- package/dist/toast/update.d.ts +768 -7
- package/dist/toast/update.d.ts.map +1 -1
- package/dist/toast/update.js +283 -68
- package/dist/tooltip/tooltip.d.ts +7 -7
- package/dist/tooltip/tooltip.d.ts.map +1 -1
- package/dist/tooltip/tooltip.js +14 -12
- package/dist/virtualList/index.d.ts.map +1 -1
- package/dist/virtualList/index.js +8 -6
- package/package.json +9 -9
package/dist/toast/update.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Duration, Effect, Option, Schema } from 'effect';
|
|
2
2
|
import * as Command from 'foldkit/command';
|
|
3
|
+
import * as Subscription from 'foldkit/subscription';
|
|
3
4
|
import * as Update from 'foldkit/update';
|
|
4
|
-
import { type InitConfig, type Variant } from './schema.js';
|
|
5
|
+
import { type InitConfig, SwipeState, type Variant } from './schema.js';
|
|
5
6
|
/** Input for `show()`. `payload` is the consumer-defined content shape for an
|
|
6
7
|
* entry. Omit `duration` to use the container's `defaultDuration`; pass
|
|
7
8
|
* `sticky: true` to skip auto-dismiss entirely. */
|
|
@@ -11,10 +12,8 @@ export type ShowInput<A> = Readonly<{
|
|
|
11
12
|
duration?: Duration.Input;
|
|
12
13
|
sticky?: boolean;
|
|
13
14
|
}>;
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* the update function. Static. The Command definition doesn't depend on
|
|
17
|
-
* payload. */
|
|
15
|
+
/** Waits for an entry's auto-dismiss duration, then emits a versioned
|
|
16
|
+
* `CompletedWaitBeforeDismissal` Message so update can ignore stale timers. */
|
|
18
17
|
export declare const WaitBeforeDismissal: Command.CommandDefinitionWithArgs<"WaitBeforeDismissal", {
|
|
19
18
|
entryId: Schema.String;
|
|
20
19
|
version: Schema.Number;
|
|
@@ -24,6 +23,20 @@ export declare const WaitBeforeDismissal: Command.CommandDefinitionWithArgs<"Wai
|
|
|
24
23
|
readonly entryId: string;
|
|
25
24
|
readonly version: number;
|
|
26
25
|
}, never, never>>;
|
|
26
|
+
/** Waits for a short or cancelled swipe to animate back, then emits
|
|
27
|
+
* `CompletedWaitForSwipeSettled` so update can clear `Settling`. */
|
|
28
|
+
export declare const WaitForSwipeSettled: Command.CommandDefinitionWithArgs<"WaitForSwipeSettled", {
|
|
29
|
+
entryId: Schema.String;
|
|
30
|
+
version: Schema.Number;
|
|
31
|
+
}, Effect.Effect<{
|
|
32
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
33
|
+
readonly entryId: string;
|
|
34
|
+
readonly version: number;
|
|
35
|
+
}, never, never>>;
|
|
36
|
+
/** Horizontal offset in pixels for an entry's swipe state. `Dragging`
|
|
37
|
+
* reports the distance travelled from the press point; `Dismissing` reports
|
|
38
|
+
* the offset the release left behind; `Idle` and `Settling` report zero. */
|
|
39
|
+
export declare const swipeOffset: (swipeState: typeof SwipeState.Type) => number;
|
|
27
40
|
/** Factory that binds Toast's runtime (update fn, helpers, commands) to a
|
|
28
41
|
* specific payload schema. Called by `make` in index.ts; inner helpers close
|
|
29
42
|
* over the payload-specific Entry / Model / Added types so generics don't
|
|
@@ -39,10 +52,27 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
39
52
|
readonly id: Schema.String;
|
|
40
53
|
readonly isShowing: Schema.Boolean;
|
|
41
54
|
readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
55
|
+
readonly transitionGeneration: Schema.Number;
|
|
42
56
|
}>;
|
|
43
57
|
readonly maybeDuration: Schema.Option<Schema.DurationFromMillis>;
|
|
44
58
|
readonly pendingDismissVersion: Schema.Number;
|
|
45
59
|
readonly isHovered: Schema.Boolean;
|
|
60
|
+
readonly swipeState: import("foldkit/schema").TaggedUnion<{
|
|
61
|
+
readonly Idle: {};
|
|
62
|
+
readonly Dragging: {
|
|
63
|
+
pointerId: Schema.Number;
|
|
64
|
+
startX: Schema.Number;
|
|
65
|
+
currentX: Schema.Number;
|
|
66
|
+
};
|
|
67
|
+
readonly Settling: {
|
|
68
|
+
offsetX: Schema.Number;
|
|
69
|
+
};
|
|
70
|
+
readonly Dismissing: {
|
|
71
|
+
offsetX: Schema.Number;
|
|
72
|
+
direction: Schema.Literals<readonly ["Left", "Right"]>;
|
|
73
|
+
};
|
|
74
|
+
}>;
|
|
75
|
+
readonly swipeVersion: Schema.Number;
|
|
46
76
|
readonly payload: Schema.Codec<A, I, never, never>;
|
|
47
77
|
}>;
|
|
48
78
|
readonly Model: Schema.Struct<{
|
|
@@ -55,13 +85,34 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
55
85
|
readonly id: Schema.String;
|
|
56
86
|
readonly isShowing: Schema.Boolean;
|
|
57
87
|
readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
88
|
+
readonly transitionGeneration: Schema.Number;
|
|
58
89
|
}>;
|
|
59
90
|
readonly maybeDuration: Schema.Option<Schema.DurationFromMillis>;
|
|
60
91
|
readonly pendingDismissVersion: Schema.Number;
|
|
61
92
|
readonly isHovered: Schema.Boolean;
|
|
93
|
+
readonly swipeState: import("foldkit/schema").TaggedUnion<{
|
|
94
|
+
readonly Idle: {};
|
|
95
|
+
readonly Dragging: {
|
|
96
|
+
pointerId: Schema.Number;
|
|
97
|
+
startX: Schema.Number;
|
|
98
|
+
currentX: Schema.Number;
|
|
99
|
+
};
|
|
100
|
+
readonly Settling: {
|
|
101
|
+
offsetX: Schema.Number;
|
|
102
|
+
};
|
|
103
|
+
readonly Dismissing: {
|
|
104
|
+
offsetX: Schema.Number;
|
|
105
|
+
direction: Schema.Literals<readonly ["Left", "Right"]>;
|
|
106
|
+
};
|
|
107
|
+
}>;
|
|
108
|
+
readonly swipeVersion: Schema.Number;
|
|
62
109
|
readonly payload: Schema.Codec<A, I, never, never>;
|
|
63
110
|
}>>;
|
|
64
111
|
readonly nextEntryKey: Schema.Number;
|
|
112
|
+
readonly maybeSwipeConfig: Schema.Option<Schema.Struct<{
|
|
113
|
+
readonly direction: Schema.Literals<readonly ["Left", "Right"]>;
|
|
114
|
+
readonly threshold: Schema.Number;
|
|
115
|
+
}>>;
|
|
65
116
|
}>;
|
|
66
117
|
readonly Message: import("foldkit/message").MessageUnion<{
|
|
67
118
|
readonly Added: {
|
|
@@ -72,10 +123,27 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
72
123
|
readonly id: Schema.String;
|
|
73
124
|
readonly isShowing: Schema.Boolean;
|
|
74
125
|
readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
126
|
+
readonly transitionGeneration: Schema.Number;
|
|
75
127
|
}>;
|
|
76
128
|
readonly maybeDuration: Schema.Option<Schema.DurationFromMillis>;
|
|
77
129
|
readonly pendingDismissVersion: Schema.Number;
|
|
78
130
|
readonly isHovered: Schema.Boolean;
|
|
131
|
+
readonly swipeState: import("foldkit/schema").TaggedUnion<{
|
|
132
|
+
readonly Idle: {};
|
|
133
|
+
readonly Dragging: {
|
|
134
|
+
pointerId: Schema.Number;
|
|
135
|
+
startX: Schema.Number;
|
|
136
|
+
currentX: Schema.Number;
|
|
137
|
+
};
|
|
138
|
+
readonly Settling: {
|
|
139
|
+
offsetX: Schema.Number;
|
|
140
|
+
};
|
|
141
|
+
readonly Dismissing: {
|
|
142
|
+
offsetX: Schema.Number;
|
|
143
|
+
direction: Schema.Literals<readonly ["Left", "Right"]>;
|
|
144
|
+
};
|
|
145
|
+
}>;
|
|
146
|
+
readonly swipeVersion: Schema.Number;
|
|
79
147
|
readonly payload: Schema.Codec<A, I, never, never>;
|
|
80
148
|
}>;
|
|
81
149
|
};
|
|
@@ -98,10 +166,35 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
98
166
|
message: import("foldkit/message").MessageUnion<{
|
|
99
167
|
readonly Showed: {};
|
|
100
168
|
readonly Hid: {};
|
|
101
|
-
readonly CompletedWaitForPaint: {
|
|
102
|
-
|
|
169
|
+
readonly CompletedWaitForPaint: {
|
|
170
|
+
generation: Schema.Number;
|
|
171
|
+
};
|
|
172
|
+
readonly EndedAnimation: {
|
|
173
|
+
generation: Schema.Number;
|
|
174
|
+
};
|
|
103
175
|
}>;
|
|
104
176
|
};
|
|
177
|
+
readonly PressedEntryPointer: {
|
|
178
|
+
entryId: Schema.String;
|
|
179
|
+
pointerId: Schema.Number;
|
|
180
|
+
clientX: Schema.Number;
|
|
181
|
+
};
|
|
182
|
+
readonly MovedSwipePointer: {
|
|
183
|
+
pointerId: Schema.Number;
|
|
184
|
+
clientX: Schema.Number;
|
|
185
|
+
};
|
|
186
|
+
readonly ReleasedSwipePointer: {
|
|
187
|
+
pointerId: Schema.Number;
|
|
188
|
+
clientX: Schema.Number;
|
|
189
|
+
};
|
|
190
|
+
readonly CancelledSwipe: {
|
|
191
|
+
pointerId: Schema.Number;
|
|
192
|
+
};
|
|
193
|
+
readonly PressedEscape: {};
|
|
194
|
+
readonly CompletedWaitForSwipeSettled: {
|
|
195
|
+
entryId: Schema.String;
|
|
196
|
+
version: Schema.Number;
|
|
197
|
+
};
|
|
105
198
|
}>;
|
|
106
199
|
readonly OutMessage: import("foldkit/message").MessageUnion<{
|
|
107
200
|
readonly DismissedToast: {
|
|
@@ -116,10 +209,27 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
116
209
|
readonly id: Schema.String;
|
|
117
210
|
readonly isShowing: Schema.Boolean;
|
|
118
211
|
readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
212
|
+
readonly transitionGeneration: Schema.Number;
|
|
119
213
|
}>;
|
|
120
214
|
readonly maybeDuration: Schema.Option<Schema.DurationFromMillis>;
|
|
121
215
|
readonly pendingDismissVersion: Schema.Number;
|
|
122
216
|
readonly isHovered: Schema.Boolean;
|
|
217
|
+
readonly swipeState: import("foldkit/schema").TaggedUnion<{
|
|
218
|
+
readonly Idle: {};
|
|
219
|
+
readonly Dragging: {
|
|
220
|
+
pointerId: Schema.Number;
|
|
221
|
+
startX: Schema.Number;
|
|
222
|
+
currentX: Schema.Number;
|
|
223
|
+
};
|
|
224
|
+
readonly Settling: {
|
|
225
|
+
offsetX: Schema.Number;
|
|
226
|
+
};
|
|
227
|
+
readonly Dismissing: {
|
|
228
|
+
offsetX: Schema.Number;
|
|
229
|
+
direction: Schema.Literals<readonly ["Left", "Right"]>;
|
|
230
|
+
};
|
|
231
|
+
}>;
|
|
232
|
+
readonly swipeVersion: Schema.Number;
|
|
123
233
|
readonly payload: Schema.Codec<A, I, never, never>;
|
|
124
234
|
}>;
|
|
125
235
|
}>;
|
|
@@ -136,13 +246,34 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
136
246
|
readonly id: string;
|
|
137
247
|
readonly isShowing: boolean;
|
|
138
248
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
249
|
+
readonly transitionGeneration: number;
|
|
139
250
|
};
|
|
140
251
|
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
141
252
|
readonly pendingDismissVersion: number;
|
|
142
253
|
readonly isHovered: boolean;
|
|
254
|
+
readonly swipeState: {
|
|
255
|
+
readonly _tag: "Dismissing";
|
|
256
|
+
readonly offsetX: number;
|
|
257
|
+
readonly direction: "Left" | "Right";
|
|
258
|
+
} | {
|
|
259
|
+
readonly _tag: "Dragging";
|
|
260
|
+
readonly pointerId: number;
|
|
261
|
+
readonly startX: number;
|
|
262
|
+
readonly currentX: number;
|
|
263
|
+
} | {
|
|
264
|
+
readonly _tag: "Idle";
|
|
265
|
+
} | {
|
|
266
|
+
readonly _tag: "Settling";
|
|
267
|
+
readonly offsetX: number;
|
|
268
|
+
};
|
|
269
|
+
readonly swipeVersion: number;
|
|
143
270
|
readonly payload: A;
|
|
144
271
|
}[];
|
|
145
272
|
readonly nextEntryKey: number;
|
|
273
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
274
|
+
readonly direction: "Left" | "Right";
|
|
275
|
+
readonly threshold: number;
|
|
276
|
+
}>;
|
|
146
277
|
};
|
|
147
278
|
readonly update: (model: {
|
|
148
279
|
readonly id: string;
|
|
@@ -154,13 +285,34 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
154
285
|
readonly id: string;
|
|
155
286
|
readonly isShowing: boolean;
|
|
156
287
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
288
|
+
readonly transitionGeneration: number;
|
|
157
289
|
};
|
|
158
290
|
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
159
291
|
readonly pendingDismissVersion: number;
|
|
160
292
|
readonly isHovered: boolean;
|
|
293
|
+
readonly swipeState: {
|
|
294
|
+
readonly _tag: "Dismissing";
|
|
295
|
+
readonly offsetX: number;
|
|
296
|
+
readonly direction: "Left" | "Right";
|
|
297
|
+
} | {
|
|
298
|
+
readonly _tag: "Dragging";
|
|
299
|
+
readonly pointerId: number;
|
|
300
|
+
readonly startX: number;
|
|
301
|
+
readonly currentX: number;
|
|
302
|
+
} | {
|
|
303
|
+
readonly _tag: "Idle";
|
|
304
|
+
} | {
|
|
305
|
+
readonly _tag: "Settling";
|
|
306
|
+
readonly offsetX: number;
|
|
307
|
+
};
|
|
308
|
+
readonly swipeVersion: number;
|
|
161
309
|
readonly payload: A;
|
|
162
310
|
}[];
|
|
163
311
|
readonly nextEntryKey: number;
|
|
312
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
313
|
+
readonly direction: "Left" | "Right";
|
|
314
|
+
readonly threshold: number;
|
|
315
|
+
}>;
|
|
164
316
|
}, message: {
|
|
165
317
|
readonly _tag: "Added";
|
|
166
318
|
readonly entry: {
|
|
@@ -170,16 +322,40 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
170
322
|
readonly id: string;
|
|
171
323
|
readonly isShowing: boolean;
|
|
172
324
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
325
|
+
readonly transitionGeneration: number;
|
|
173
326
|
};
|
|
174
327
|
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
175
328
|
readonly pendingDismissVersion: number;
|
|
176
329
|
readonly isHovered: boolean;
|
|
330
|
+
readonly swipeState: {
|
|
331
|
+
readonly _tag: "Dismissing";
|
|
332
|
+
readonly offsetX: number;
|
|
333
|
+
readonly direction: "Left" | "Right";
|
|
334
|
+
} | {
|
|
335
|
+
readonly _tag: "Dragging";
|
|
336
|
+
readonly pointerId: number;
|
|
337
|
+
readonly startX: number;
|
|
338
|
+
readonly currentX: number;
|
|
339
|
+
} | {
|
|
340
|
+
readonly _tag: "Idle";
|
|
341
|
+
} | {
|
|
342
|
+
readonly _tag: "Settling";
|
|
343
|
+
readonly offsetX: number;
|
|
344
|
+
};
|
|
345
|
+
readonly swipeVersion: number;
|
|
177
346
|
readonly payload: A;
|
|
178
347
|
};
|
|
348
|
+
} | {
|
|
349
|
+
readonly _tag: "CancelledSwipe";
|
|
350
|
+
readonly pointerId: number;
|
|
179
351
|
} | {
|
|
180
352
|
readonly _tag: "CompletedWaitBeforeDismissal";
|
|
181
353
|
readonly entryId: string;
|
|
182
354
|
readonly version: number;
|
|
355
|
+
} | {
|
|
356
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
357
|
+
readonly entryId: string;
|
|
358
|
+
readonly version: number;
|
|
183
359
|
} | {
|
|
184
360
|
readonly _tag: "Dismissed";
|
|
185
361
|
readonly entryId: string;
|
|
@@ -190,8 +366,10 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
190
366
|
readonly entryId: string;
|
|
191
367
|
readonly message: {
|
|
192
368
|
readonly _tag: "CompletedWaitForPaint";
|
|
369
|
+
readonly generation: number;
|
|
193
370
|
} | {
|
|
194
371
|
readonly _tag: "EndedAnimation";
|
|
372
|
+
readonly generation: number;
|
|
195
373
|
} | {
|
|
196
374
|
readonly _tag: "Hid";
|
|
197
375
|
} | {
|
|
@@ -203,6 +381,21 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
203
381
|
} | {
|
|
204
382
|
readonly _tag: "LeftEntry";
|
|
205
383
|
readonly entryId: string;
|
|
384
|
+
} | {
|
|
385
|
+
readonly _tag: "MovedSwipePointer";
|
|
386
|
+
readonly pointerId: number;
|
|
387
|
+
readonly clientX: number;
|
|
388
|
+
} | {
|
|
389
|
+
readonly _tag: "PressedEntryPointer";
|
|
390
|
+
readonly entryId: string;
|
|
391
|
+
readonly pointerId: number;
|
|
392
|
+
readonly clientX: number;
|
|
393
|
+
} | {
|
|
394
|
+
readonly _tag: "PressedEscape";
|
|
395
|
+
} | {
|
|
396
|
+
readonly _tag: "ReleasedSwipePointer";
|
|
397
|
+
readonly pointerId: number;
|
|
398
|
+
readonly clientX: number;
|
|
206
399
|
}) => Readonly<{
|
|
207
400
|
model: {
|
|
208
401
|
readonly id: string;
|
|
@@ -214,13 +407,34 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
214
407
|
readonly id: string;
|
|
215
408
|
readonly isShowing: boolean;
|
|
216
409
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
410
|
+
readonly transitionGeneration: number;
|
|
217
411
|
};
|
|
218
412
|
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
219
413
|
readonly pendingDismissVersion: number;
|
|
220
414
|
readonly isHovered: boolean;
|
|
415
|
+
readonly swipeState: {
|
|
416
|
+
readonly _tag: "Dismissing";
|
|
417
|
+
readonly offsetX: number;
|
|
418
|
+
readonly direction: "Left" | "Right";
|
|
419
|
+
} | {
|
|
420
|
+
readonly _tag: "Dragging";
|
|
421
|
+
readonly pointerId: number;
|
|
422
|
+
readonly startX: number;
|
|
423
|
+
readonly currentX: number;
|
|
424
|
+
} | {
|
|
425
|
+
readonly _tag: "Idle";
|
|
426
|
+
} | {
|
|
427
|
+
readonly _tag: "Settling";
|
|
428
|
+
readonly offsetX: number;
|
|
429
|
+
};
|
|
430
|
+
readonly swipeVersion: number;
|
|
221
431
|
readonly payload: A;
|
|
222
432
|
}[];
|
|
223
433
|
readonly nextEntryKey: number;
|
|
434
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
435
|
+
readonly direction: "Left" | "Right";
|
|
436
|
+
readonly threshold: number;
|
|
437
|
+
}>;
|
|
224
438
|
};
|
|
225
439
|
commands?: Update.Commands<{
|
|
226
440
|
readonly _tag: "Added";
|
|
@@ -231,16 +445,40 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
231
445
|
readonly id: string;
|
|
232
446
|
readonly isShowing: boolean;
|
|
233
447
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
448
|
+
readonly transitionGeneration: number;
|
|
234
449
|
};
|
|
235
450
|
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
236
451
|
readonly pendingDismissVersion: number;
|
|
237
452
|
readonly isHovered: boolean;
|
|
453
|
+
readonly swipeState: {
|
|
454
|
+
readonly _tag: "Dismissing";
|
|
455
|
+
readonly offsetX: number;
|
|
456
|
+
readonly direction: "Left" | "Right";
|
|
457
|
+
} | {
|
|
458
|
+
readonly _tag: "Dragging";
|
|
459
|
+
readonly pointerId: number;
|
|
460
|
+
readonly startX: number;
|
|
461
|
+
readonly currentX: number;
|
|
462
|
+
} | {
|
|
463
|
+
readonly _tag: "Idle";
|
|
464
|
+
} | {
|
|
465
|
+
readonly _tag: "Settling";
|
|
466
|
+
readonly offsetX: number;
|
|
467
|
+
};
|
|
468
|
+
readonly swipeVersion: number;
|
|
238
469
|
readonly payload: A;
|
|
239
470
|
};
|
|
471
|
+
} | {
|
|
472
|
+
readonly _tag: "CancelledSwipe";
|
|
473
|
+
readonly pointerId: number;
|
|
240
474
|
} | {
|
|
241
475
|
readonly _tag: "CompletedWaitBeforeDismissal";
|
|
242
476
|
readonly entryId: string;
|
|
243
477
|
readonly version: number;
|
|
478
|
+
} | {
|
|
479
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
480
|
+
readonly entryId: string;
|
|
481
|
+
readonly version: number;
|
|
244
482
|
} | {
|
|
245
483
|
readonly _tag: "Dismissed";
|
|
246
484
|
readonly entryId: string;
|
|
@@ -251,8 +489,10 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
251
489
|
readonly entryId: string;
|
|
252
490
|
readonly message: {
|
|
253
491
|
readonly _tag: "CompletedWaitForPaint";
|
|
492
|
+
readonly generation: number;
|
|
254
493
|
} | {
|
|
255
494
|
readonly _tag: "EndedAnimation";
|
|
495
|
+
readonly generation: number;
|
|
256
496
|
} | {
|
|
257
497
|
readonly _tag: "Hid";
|
|
258
498
|
} | {
|
|
@@ -264,6 +504,21 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
264
504
|
} | {
|
|
265
505
|
readonly _tag: "LeftEntry";
|
|
266
506
|
readonly entryId: string;
|
|
507
|
+
} | {
|
|
508
|
+
readonly _tag: "MovedSwipePointer";
|
|
509
|
+
readonly pointerId: number;
|
|
510
|
+
readonly clientX: number;
|
|
511
|
+
} | {
|
|
512
|
+
readonly _tag: "PressedEntryPointer";
|
|
513
|
+
readonly entryId: string;
|
|
514
|
+
readonly pointerId: number;
|
|
515
|
+
readonly clientX: number;
|
|
516
|
+
} | {
|
|
517
|
+
readonly _tag: "PressedEscape";
|
|
518
|
+
} | {
|
|
519
|
+
readonly _tag: "ReleasedSwipePointer";
|
|
520
|
+
readonly pointerId: number;
|
|
521
|
+
readonly clientX: number;
|
|
267
522
|
}, never>;
|
|
268
523
|
outMessage?: {
|
|
269
524
|
readonly _tag: "DismissedToast";
|
|
@@ -280,13 +535,34 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
280
535
|
readonly id: string;
|
|
281
536
|
readonly isShowing: boolean;
|
|
282
537
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
538
|
+
readonly transitionGeneration: number;
|
|
283
539
|
};
|
|
284
540
|
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
285
541
|
readonly pendingDismissVersion: number;
|
|
286
542
|
readonly isHovered: boolean;
|
|
543
|
+
readonly swipeState: {
|
|
544
|
+
readonly _tag: "Dismissing";
|
|
545
|
+
readonly offsetX: number;
|
|
546
|
+
readonly direction: "Left" | "Right";
|
|
547
|
+
} | {
|
|
548
|
+
readonly _tag: "Dragging";
|
|
549
|
+
readonly pointerId: number;
|
|
550
|
+
readonly startX: number;
|
|
551
|
+
readonly currentX: number;
|
|
552
|
+
} | {
|
|
553
|
+
readonly _tag: "Idle";
|
|
554
|
+
} | {
|
|
555
|
+
readonly _tag: "Settling";
|
|
556
|
+
readonly offsetX: number;
|
|
557
|
+
};
|
|
558
|
+
readonly swipeVersion: number;
|
|
287
559
|
readonly payload: A;
|
|
288
560
|
}[];
|
|
289
561
|
readonly nextEntryKey: number;
|
|
562
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
563
|
+
readonly direction: "Left" | "Right";
|
|
564
|
+
readonly threshold: number;
|
|
565
|
+
}>;
|
|
290
566
|
}, input: ShowInput<A>) => Readonly<{
|
|
291
567
|
model: {
|
|
292
568
|
readonly id: string;
|
|
@@ -298,13 +574,34 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
298
574
|
readonly id: string;
|
|
299
575
|
readonly isShowing: boolean;
|
|
300
576
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
577
|
+
readonly transitionGeneration: number;
|
|
301
578
|
};
|
|
302
579
|
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
303
580
|
readonly pendingDismissVersion: number;
|
|
304
581
|
readonly isHovered: boolean;
|
|
582
|
+
readonly swipeState: {
|
|
583
|
+
readonly _tag: "Dismissing";
|
|
584
|
+
readonly offsetX: number;
|
|
585
|
+
readonly direction: "Left" | "Right";
|
|
586
|
+
} | {
|
|
587
|
+
readonly _tag: "Dragging";
|
|
588
|
+
readonly pointerId: number;
|
|
589
|
+
readonly startX: number;
|
|
590
|
+
readonly currentX: number;
|
|
591
|
+
} | {
|
|
592
|
+
readonly _tag: "Idle";
|
|
593
|
+
} | {
|
|
594
|
+
readonly _tag: "Settling";
|
|
595
|
+
readonly offsetX: number;
|
|
596
|
+
};
|
|
597
|
+
readonly swipeVersion: number;
|
|
305
598
|
readonly payload: A;
|
|
306
599
|
}[];
|
|
307
600
|
readonly nextEntryKey: number;
|
|
601
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
602
|
+
readonly direction: "Left" | "Right";
|
|
603
|
+
readonly threshold: number;
|
|
604
|
+
}>;
|
|
308
605
|
};
|
|
309
606
|
commands?: Update.Commands<{
|
|
310
607
|
readonly _tag: "Added";
|
|
@@ -315,16 +612,40 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
315
612
|
readonly id: string;
|
|
316
613
|
readonly isShowing: boolean;
|
|
317
614
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
615
|
+
readonly transitionGeneration: number;
|
|
318
616
|
};
|
|
319
617
|
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
320
618
|
readonly pendingDismissVersion: number;
|
|
321
619
|
readonly isHovered: boolean;
|
|
620
|
+
readonly swipeState: {
|
|
621
|
+
readonly _tag: "Dismissing";
|
|
622
|
+
readonly offsetX: number;
|
|
623
|
+
readonly direction: "Left" | "Right";
|
|
624
|
+
} | {
|
|
625
|
+
readonly _tag: "Dragging";
|
|
626
|
+
readonly pointerId: number;
|
|
627
|
+
readonly startX: number;
|
|
628
|
+
readonly currentX: number;
|
|
629
|
+
} | {
|
|
630
|
+
readonly _tag: "Idle";
|
|
631
|
+
} | {
|
|
632
|
+
readonly _tag: "Settling";
|
|
633
|
+
readonly offsetX: number;
|
|
634
|
+
};
|
|
635
|
+
readonly swipeVersion: number;
|
|
322
636
|
readonly payload: A;
|
|
323
637
|
};
|
|
638
|
+
} | {
|
|
639
|
+
readonly _tag: "CancelledSwipe";
|
|
640
|
+
readonly pointerId: number;
|
|
324
641
|
} | {
|
|
325
642
|
readonly _tag: "CompletedWaitBeforeDismissal";
|
|
326
643
|
readonly entryId: string;
|
|
327
644
|
readonly version: number;
|
|
645
|
+
} | {
|
|
646
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
647
|
+
readonly entryId: string;
|
|
648
|
+
readonly version: number;
|
|
328
649
|
} | {
|
|
329
650
|
readonly _tag: "Dismissed";
|
|
330
651
|
readonly entryId: string;
|
|
@@ -335,8 +656,10 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
335
656
|
readonly entryId: string;
|
|
336
657
|
readonly message: {
|
|
337
658
|
readonly _tag: "CompletedWaitForPaint";
|
|
659
|
+
readonly generation: number;
|
|
338
660
|
} | {
|
|
339
661
|
readonly _tag: "EndedAnimation";
|
|
662
|
+
readonly generation: number;
|
|
340
663
|
} | {
|
|
341
664
|
readonly _tag: "Hid";
|
|
342
665
|
} | {
|
|
@@ -348,6 +671,21 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
348
671
|
} | {
|
|
349
672
|
readonly _tag: "LeftEntry";
|
|
350
673
|
readonly entryId: string;
|
|
674
|
+
} | {
|
|
675
|
+
readonly _tag: "MovedSwipePointer";
|
|
676
|
+
readonly pointerId: number;
|
|
677
|
+
readonly clientX: number;
|
|
678
|
+
} | {
|
|
679
|
+
readonly _tag: "PressedEntryPointer";
|
|
680
|
+
readonly entryId: string;
|
|
681
|
+
readonly pointerId: number;
|
|
682
|
+
readonly clientX: number;
|
|
683
|
+
} | {
|
|
684
|
+
readonly _tag: "PressedEscape";
|
|
685
|
+
} | {
|
|
686
|
+
readonly _tag: "ReleasedSwipePointer";
|
|
687
|
+
readonly pointerId: number;
|
|
688
|
+
readonly clientX: number;
|
|
351
689
|
}, never>;
|
|
352
690
|
outMessage?: {
|
|
353
691
|
readonly _tag: "DismissedToast";
|
|
@@ -364,13 +702,34 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
364
702
|
readonly id: string;
|
|
365
703
|
readonly isShowing: boolean;
|
|
366
704
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
705
|
+
readonly transitionGeneration: number;
|
|
367
706
|
};
|
|
368
707
|
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
369
708
|
readonly pendingDismissVersion: number;
|
|
370
709
|
readonly isHovered: boolean;
|
|
710
|
+
readonly swipeState: {
|
|
711
|
+
readonly _tag: "Dismissing";
|
|
712
|
+
readonly offsetX: number;
|
|
713
|
+
readonly direction: "Left" | "Right";
|
|
714
|
+
} | {
|
|
715
|
+
readonly _tag: "Dragging";
|
|
716
|
+
readonly pointerId: number;
|
|
717
|
+
readonly startX: number;
|
|
718
|
+
readonly currentX: number;
|
|
719
|
+
} | {
|
|
720
|
+
readonly _tag: "Idle";
|
|
721
|
+
} | {
|
|
722
|
+
readonly _tag: "Settling";
|
|
723
|
+
readonly offsetX: number;
|
|
724
|
+
};
|
|
725
|
+
readonly swipeVersion: number;
|
|
371
726
|
readonly payload: A;
|
|
372
727
|
}[];
|
|
373
728
|
readonly nextEntryKey: number;
|
|
729
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
730
|
+
readonly direction: "Left" | "Right";
|
|
731
|
+
readonly threshold: number;
|
|
732
|
+
}>;
|
|
374
733
|
}, entryId: string) => Readonly<{
|
|
375
734
|
model: {
|
|
376
735
|
readonly id: string;
|
|
@@ -382,13 +741,34 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
382
741
|
readonly id: string;
|
|
383
742
|
readonly isShowing: boolean;
|
|
384
743
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
744
|
+
readonly transitionGeneration: number;
|
|
385
745
|
};
|
|
386
746
|
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
387
747
|
readonly pendingDismissVersion: number;
|
|
388
748
|
readonly isHovered: boolean;
|
|
749
|
+
readonly swipeState: {
|
|
750
|
+
readonly _tag: "Dismissing";
|
|
751
|
+
readonly offsetX: number;
|
|
752
|
+
readonly direction: "Left" | "Right";
|
|
753
|
+
} | {
|
|
754
|
+
readonly _tag: "Dragging";
|
|
755
|
+
readonly pointerId: number;
|
|
756
|
+
readonly startX: number;
|
|
757
|
+
readonly currentX: number;
|
|
758
|
+
} | {
|
|
759
|
+
readonly _tag: "Idle";
|
|
760
|
+
} | {
|
|
761
|
+
readonly _tag: "Settling";
|
|
762
|
+
readonly offsetX: number;
|
|
763
|
+
};
|
|
764
|
+
readonly swipeVersion: number;
|
|
389
765
|
readonly payload: A;
|
|
390
766
|
}[];
|
|
391
767
|
readonly nextEntryKey: number;
|
|
768
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
769
|
+
readonly direction: "Left" | "Right";
|
|
770
|
+
readonly threshold: number;
|
|
771
|
+
}>;
|
|
392
772
|
};
|
|
393
773
|
commands?: Update.Commands<{
|
|
394
774
|
readonly _tag: "Added";
|
|
@@ -399,16 +779,40 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
399
779
|
readonly id: string;
|
|
400
780
|
readonly isShowing: boolean;
|
|
401
781
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
782
|
+
readonly transitionGeneration: number;
|
|
402
783
|
};
|
|
403
784
|
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
404
785
|
readonly pendingDismissVersion: number;
|
|
405
786
|
readonly isHovered: boolean;
|
|
787
|
+
readonly swipeState: {
|
|
788
|
+
readonly _tag: "Dismissing";
|
|
789
|
+
readonly offsetX: number;
|
|
790
|
+
readonly direction: "Left" | "Right";
|
|
791
|
+
} | {
|
|
792
|
+
readonly _tag: "Dragging";
|
|
793
|
+
readonly pointerId: number;
|
|
794
|
+
readonly startX: number;
|
|
795
|
+
readonly currentX: number;
|
|
796
|
+
} | {
|
|
797
|
+
readonly _tag: "Idle";
|
|
798
|
+
} | {
|
|
799
|
+
readonly _tag: "Settling";
|
|
800
|
+
readonly offsetX: number;
|
|
801
|
+
};
|
|
802
|
+
readonly swipeVersion: number;
|
|
406
803
|
readonly payload: A;
|
|
407
804
|
};
|
|
805
|
+
} | {
|
|
806
|
+
readonly _tag: "CancelledSwipe";
|
|
807
|
+
readonly pointerId: number;
|
|
408
808
|
} | {
|
|
409
809
|
readonly _tag: "CompletedWaitBeforeDismissal";
|
|
410
810
|
readonly entryId: string;
|
|
411
811
|
readonly version: number;
|
|
812
|
+
} | {
|
|
813
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
814
|
+
readonly entryId: string;
|
|
815
|
+
readonly version: number;
|
|
412
816
|
} | {
|
|
413
817
|
readonly _tag: "Dismissed";
|
|
414
818
|
readonly entryId: string;
|
|
@@ -419,8 +823,10 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
419
823
|
readonly entryId: string;
|
|
420
824
|
readonly message: {
|
|
421
825
|
readonly _tag: "CompletedWaitForPaint";
|
|
826
|
+
readonly generation: number;
|
|
422
827
|
} | {
|
|
423
828
|
readonly _tag: "EndedAnimation";
|
|
829
|
+
readonly generation: number;
|
|
424
830
|
} | {
|
|
425
831
|
readonly _tag: "Hid";
|
|
426
832
|
} | {
|
|
@@ -432,6 +838,21 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
432
838
|
} | {
|
|
433
839
|
readonly _tag: "LeftEntry";
|
|
434
840
|
readonly entryId: string;
|
|
841
|
+
} | {
|
|
842
|
+
readonly _tag: "MovedSwipePointer";
|
|
843
|
+
readonly pointerId: number;
|
|
844
|
+
readonly clientX: number;
|
|
845
|
+
} | {
|
|
846
|
+
readonly _tag: "PressedEntryPointer";
|
|
847
|
+
readonly entryId: string;
|
|
848
|
+
readonly pointerId: number;
|
|
849
|
+
readonly clientX: number;
|
|
850
|
+
} | {
|
|
851
|
+
readonly _tag: "PressedEscape";
|
|
852
|
+
} | {
|
|
853
|
+
readonly _tag: "ReleasedSwipePointer";
|
|
854
|
+
readonly pointerId: number;
|
|
855
|
+
readonly clientX: number;
|
|
435
856
|
}, never>;
|
|
436
857
|
outMessage?: {
|
|
437
858
|
readonly _tag: "DismissedToast";
|
|
@@ -448,13 +869,34 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
448
869
|
readonly id: string;
|
|
449
870
|
readonly isShowing: boolean;
|
|
450
871
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
872
|
+
readonly transitionGeneration: number;
|
|
451
873
|
};
|
|
452
874
|
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
453
875
|
readonly pendingDismissVersion: number;
|
|
454
876
|
readonly isHovered: boolean;
|
|
877
|
+
readonly swipeState: {
|
|
878
|
+
readonly _tag: "Dismissing";
|
|
879
|
+
readonly offsetX: number;
|
|
880
|
+
readonly direction: "Left" | "Right";
|
|
881
|
+
} | {
|
|
882
|
+
readonly _tag: "Dragging";
|
|
883
|
+
readonly pointerId: number;
|
|
884
|
+
readonly startX: number;
|
|
885
|
+
readonly currentX: number;
|
|
886
|
+
} | {
|
|
887
|
+
readonly _tag: "Idle";
|
|
888
|
+
} | {
|
|
889
|
+
readonly _tag: "Settling";
|
|
890
|
+
readonly offsetX: number;
|
|
891
|
+
};
|
|
892
|
+
readonly swipeVersion: number;
|
|
455
893
|
readonly payload: A;
|
|
456
894
|
}[];
|
|
457
895
|
readonly nextEntryKey: number;
|
|
896
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
897
|
+
readonly direction: "Left" | "Right";
|
|
898
|
+
readonly threshold: number;
|
|
899
|
+
}>;
|
|
458
900
|
}) => Readonly<{
|
|
459
901
|
model: {
|
|
460
902
|
readonly id: string;
|
|
@@ -466,13 +908,34 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
466
908
|
readonly id: string;
|
|
467
909
|
readonly isShowing: boolean;
|
|
468
910
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
911
|
+
readonly transitionGeneration: number;
|
|
469
912
|
};
|
|
470
913
|
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
471
914
|
readonly pendingDismissVersion: number;
|
|
472
915
|
readonly isHovered: boolean;
|
|
916
|
+
readonly swipeState: {
|
|
917
|
+
readonly _tag: "Dismissing";
|
|
918
|
+
readonly offsetX: number;
|
|
919
|
+
readonly direction: "Left" | "Right";
|
|
920
|
+
} | {
|
|
921
|
+
readonly _tag: "Dragging";
|
|
922
|
+
readonly pointerId: number;
|
|
923
|
+
readonly startX: number;
|
|
924
|
+
readonly currentX: number;
|
|
925
|
+
} | {
|
|
926
|
+
readonly _tag: "Idle";
|
|
927
|
+
} | {
|
|
928
|
+
readonly _tag: "Settling";
|
|
929
|
+
readonly offsetX: number;
|
|
930
|
+
};
|
|
931
|
+
readonly swipeVersion: number;
|
|
473
932
|
readonly payload: A;
|
|
474
933
|
}[];
|
|
475
934
|
readonly nextEntryKey: number;
|
|
935
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
936
|
+
readonly direction: "Left" | "Right";
|
|
937
|
+
readonly threshold: number;
|
|
938
|
+
}>;
|
|
476
939
|
};
|
|
477
940
|
commands?: Update.Commands<{
|
|
478
941
|
readonly _tag: "Added";
|
|
@@ -483,16 +946,40 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
483
946
|
readonly id: string;
|
|
484
947
|
readonly isShowing: boolean;
|
|
485
948
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
949
|
+
readonly transitionGeneration: number;
|
|
486
950
|
};
|
|
487
951
|
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
488
952
|
readonly pendingDismissVersion: number;
|
|
489
953
|
readonly isHovered: boolean;
|
|
954
|
+
readonly swipeState: {
|
|
955
|
+
readonly _tag: "Dismissing";
|
|
956
|
+
readonly offsetX: number;
|
|
957
|
+
readonly direction: "Left" | "Right";
|
|
958
|
+
} | {
|
|
959
|
+
readonly _tag: "Dragging";
|
|
960
|
+
readonly pointerId: number;
|
|
961
|
+
readonly startX: number;
|
|
962
|
+
readonly currentX: number;
|
|
963
|
+
} | {
|
|
964
|
+
readonly _tag: "Idle";
|
|
965
|
+
} | {
|
|
966
|
+
readonly _tag: "Settling";
|
|
967
|
+
readonly offsetX: number;
|
|
968
|
+
};
|
|
969
|
+
readonly swipeVersion: number;
|
|
490
970
|
readonly payload: A;
|
|
491
971
|
};
|
|
972
|
+
} | {
|
|
973
|
+
readonly _tag: "CancelledSwipe";
|
|
974
|
+
readonly pointerId: number;
|
|
492
975
|
} | {
|
|
493
976
|
readonly _tag: "CompletedWaitBeforeDismissal";
|
|
494
977
|
readonly entryId: string;
|
|
495
978
|
readonly version: number;
|
|
979
|
+
} | {
|
|
980
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
981
|
+
readonly entryId: string;
|
|
982
|
+
readonly version: number;
|
|
496
983
|
} | {
|
|
497
984
|
readonly _tag: "Dismissed";
|
|
498
985
|
readonly entryId: string;
|
|
@@ -503,8 +990,10 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
503
990
|
readonly entryId: string;
|
|
504
991
|
readonly message: {
|
|
505
992
|
readonly _tag: "CompletedWaitForPaint";
|
|
993
|
+
readonly generation: number;
|
|
506
994
|
} | {
|
|
507
995
|
readonly _tag: "EndedAnimation";
|
|
996
|
+
readonly generation: number;
|
|
508
997
|
} | {
|
|
509
998
|
readonly _tag: "Hid";
|
|
510
999
|
} | {
|
|
@@ -516,11 +1005,283 @@ export declare const makeRuntime: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
516
1005
|
} | {
|
|
517
1006
|
readonly _tag: "LeftEntry";
|
|
518
1007
|
readonly entryId: string;
|
|
1008
|
+
} | {
|
|
1009
|
+
readonly _tag: "MovedSwipePointer";
|
|
1010
|
+
readonly pointerId: number;
|
|
1011
|
+
readonly clientX: number;
|
|
1012
|
+
} | {
|
|
1013
|
+
readonly _tag: "PressedEntryPointer";
|
|
1014
|
+
readonly entryId: string;
|
|
1015
|
+
readonly pointerId: number;
|
|
1016
|
+
readonly clientX: number;
|
|
1017
|
+
} | {
|
|
1018
|
+
readonly _tag: "PressedEscape";
|
|
1019
|
+
} | {
|
|
1020
|
+
readonly _tag: "ReleasedSwipePointer";
|
|
1021
|
+
readonly pointerId: number;
|
|
1022
|
+
readonly clientX: number;
|
|
519
1023
|
}, never>;
|
|
520
1024
|
outMessage?: {
|
|
521
1025
|
readonly _tag: "DismissedToast";
|
|
522
1026
|
readonly payload: A;
|
|
523
1027
|
};
|
|
524
1028
|
}>;
|
|
1029
|
+
readonly subscriptions: {
|
|
1030
|
+
readonly swipePointer: Subscription.EntryWithoutKeepAlive<{
|
|
1031
|
+
readonly id: string;
|
|
1032
|
+
readonly defaultDuration: Duration.Duration;
|
|
1033
|
+
readonly entries: readonly {
|
|
1034
|
+
readonly id: string;
|
|
1035
|
+
readonly variant: "Error" | "Info" | "Success" | "Warning";
|
|
1036
|
+
readonly animation: {
|
|
1037
|
+
readonly id: string;
|
|
1038
|
+
readonly isShowing: boolean;
|
|
1039
|
+
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
1040
|
+
readonly transitionGeneration: number;
|
|
1041
|
+
};
|
|
1042
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
1043
|
+
readonly pendingDismissVersion: number;
|
|
1044
|
+
readonly isHovered: boolean;
|
|
1045
|
+
readonly swipeState: {
|
|
1046
|
+
readonly _tag: "Dismissing";
|
|
1047
|
+
readonly offsetX: number;
|
|
1048
|
+
readonly direction: "Left" | "Right";
|
|
1049
|
+
} | {
|
|
1050
|
+
readonly _tag: "Dragging";
|
|
1051
|
+
readonly pointerId: number;
|
|
1052
|
+
readonly startX: number;
|
|
1053
|
+
readonly currentX: number;
|
|
1054
|
+
} | {
|
|
1055
|
+
readonly _tag: "Idle";
|
|
1056
|
+
} | {
|
|
1057
|
+
readonly _tag: "Settling";
|
|
1058
|
+
readonly offsetX: number;
|
|
1059
|
+
};
|
|
1060
|
+
readonly swipeVersion: number;
|
|
1061
|
+
readonly payload: A;
|
|
1062
|
+
}[];
|
|
1063
|
+
readonly nextEntryKey: number;
|
|
1064
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
1065
|
+
readonly direction: "Left" | "Right";
|
|
1066
|
+
readonly threshold: number;
|
|
1067
|
+
}>;
|
|
1068
|
+
}, {
|
|
1069
|
+
readonly _tag: "Added";
|
|
1070
|
+
readonly entry: {
|
|
1071
|
+
readonly id: string;
|
|
1072
|
+
readonly variant: "Error" | "Info" | "Success" | "Warning";
|
|
1073
|
+
readonly animation: {
|
|
1074
|
+
readonly id: string;
|
|
1075
|
+
readonly isShowing: boolean;
|
|
1076
|
+
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
1077
|
+
readonly transitionGeneration: number;
|
|
1078
|
+
};
|
|
1079
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
1080
|
+
readonly pendingDismissVersion: number;
|
|
1081
|
+
readonly isHovered: boolean;
|
|
1082
|
+
readonly swipeState: {
|
|
1083
|
+
readonly _tag: "Dismissing";
|
|
1084
|
+
readonly offsetX: number;
|
|
1085
|
+
readonly direction: "Left" | "Right";
|
|
1086
|
+
} | {
|
|
1087
|
+
readonly _tag: "Dragging";
|
|
1088
|
+
readonly pointerId: number;
|
|
1089
|
+
readonly startX: number;
|
|
1090
|
+
readonly currentX: number;
|
|
1091
|
+
} | {
|
|
1092
|
+
readonly _tag: "Idle";
|
|
1093
|
+
} | {
|
|
1094
|
+
readonly _tag: "Settling";
|
|
1095
|
+
readonly offsetX: number;
|
|
1096
|
+
};
|
|
1097
|
+
readonly swipeVersion: number;
|
|
1098
|
+
readonly payload: A;
|
|
1099
|
+
};
|
|
1100
|
+
} | {
|
|
1101
|
+
readonly _tag: "CancelledSwipe";
|
|
1102
|
+
readonly pointerId: number;
|
|
1103
|
+
} | {
|
|
1104
|
+
readonly _tag: "CompletedWaitBeforeDismissal";
|
|
1105
|
+
readonly entryId: string;
|
|
1106
|
+
readonly version: number;
|
|
1107
|
+
} | {
|
|
1108
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
1109
|
+
readonly entryId: string;
|
|
1110
|
+
readonly version: number;
|
|
1111
|
+
} | {
|
|
1112
|
+
readonly _tag: "Dismissed";
|
|
1113
|
+
readonly entryId: string;
|
|
1114
|
+
} | {
|
|
1115
|
+
readonly _tag: "DismissedAll";
|
|
1116
|
+
} | {
|
|
1117
|
+
readonly _tag: "GotAnimationMessage";
|
|
1118
|
+
readonly entryId: string;
|
|
1119
|
+
readonly message: {
|
|
1120
|
+
readonly _tag: "CompletedWaitForPaint";
|
|
1121
|
+
readonly generation: number;
|
|
1122
|
+
} | {
|
|
1123
|
+
readonly _tag: "EndedAnimation";
|
|
1124
|
+
readonly generation: number;
|
|
1125
|
+
} | {
|
|
1126
|
+
readonly _tag: "Hid";
|
|
1127
|
+
} | {
|
|
1128
|
+
readonly _tag: "Showed";
|
|
1129
|
+
};
|
|
1130
|
+
} | {
|
|
1131
|
+
readonly _tag: "HoveredEntry";
|
|
1132
|
+
readonly entryId: string;
|
|
1133
|
+
} | {
|
|
1134
|
+
readonly _tag: "LeftEntry";
|
|
1135
|
+
readonly entryId: string;
|
|
1136
|
+
} | {
|
|
1137
|
+
readonly _tag: "MovedSwipePointer";
|
|
1138
|
+
readonly pointerId: number;
|
|
1139
|
+
readonly clientX: number;
|
|
1140
|
+
} | {
|
|
1141
|
+
readonly _tag: "PressedEntryPointer";
|
|
1142
|
+
readonly entryId: string;
|
|
1143
|
+
readonly pointerId: number;
|
|
1144
|
+
readonly clientX: number;
|
|
1145
|
+
} | {
|
|
1146
|
+
readonly _tag: "PressedEscape";
|
|
1147
|
+
} | {
|
|
1148
|
+
readonly _tag: "ReleasedSwipePointer";
|
|
1149
|
+
readonly pointerId: number;
|
|
1150
|
+
readonly clientX: number;
|
|
1151
|
+
}, {
|
|
1152
|
+
readonly isSwipeEnabled: boolean;
|
|
1153
|
+
readonly isAnyDragging: boolean;
|
|
1154
|
+
}, never> & {
|
|
1155
|
+
readonly __subscription: never;
|
|
1156
|
+
};
|
|
1157
|
+
readonly swipeEscape: Subscription.EntryWithoutKeepAlive<{
|
|
1158
|
+
readonly id: string;
|
|
1159
|
+
readonly defaultDuration: Duration.Duration;
|
|
1160
|
+
readonly entries: readonly {
|
|
1161
|
+
readonly id: string;
|
|
1162
|
+
readonly variant: "Error" | "Info" | "Success" | "Warning";
|
|
1163
|
+
readonly animation: {
|
|
1164
|
+
readonly id: string;
|
|
1165
|
+
readonly isShowing: boolean;
|
|
1166
|
+
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
1167
|
+
readonly transitionGeneration: number;
|
|
1168
|
+
};
|
|
1169
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
1170
|
+
readonly pendingDismissVersion: number;
|
|
1171
|
+
readonly isHovered: boolean;
|
|
1172
|
+
readonly swipeState: {
|
|
1173
|
+
readonly _tag: "Dismissing";
|
|
1174
|
+
readonly offsetX: number;
|
|
1175
|
+
readonly direction: "Left" | "Right";
|
|
1176
|
+
} | {
|
|
1177
|
+
readonly _tag: "Dragging";
|
|
1178
|
+
readonly pointerId: number;
|
|
1179
|
+
readonly startX: number;
|
|
1180
|
+
readonly currentX: number;
|
|
1181
|
+
} | {
|
|
1182
|
+
readonly _tag: "Idle";
|
|
1183
|
+
} | {
|
|
1184
|
+
readonly _tag: "Settling";
|
|
1185
|
+
readonly offsetX: number;
|
|
1186
|
+
};
|
|
1187
|
+
readonly swipeVersion: number;
|
|
1188
|
+
readonly payload: A;
|
|
1189
|
+
}[];
|
|
1190
|
+
readonly nextEntryKey: number;
|
|
1191
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
1192
|
+
readonly direction: "Left" | "Right";
|
|
1193
|
+
readonly threshold: number;
|
|
1194
|
+
}>;
|
|
1195
|
+
}, {
|
|
1196
|
+
readonly _tag: "Added";
|
|
1197
|
+
readonly entry: {
|
|
1198
|
+
readonly id: string;
|
|
1199
|
+
readonly variant: "Error" | "Info" | "Success" | "Warning";
|
|
1200
|
+
readonly animation: {
|
|
1201
|
+
readonly id: string;
|
|
1202
|
+
readonly isShowing: boolean;
|
|
1203
|
+
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
1204
|
+
readonly transitionGeneration: number;
|
|
1205
|
+
};
|
|
1206
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
1207
|
+
readonly pendingDismissVersion: number;
|
|
1208
|
+
readonly isHovered: boolean;
|
|
1209
|
+
readonly swipeState: {
|
|
1210
|
+
readonly _tag: "Dismissing";
|
|
1211
|
+
readonly offsetX: number;
|
|
1212
|
+
readonly direction: "Left" | "Right";
|
|
1213
|
+
} | {
|
|
1214
|
+
readonly _tag: "Dragging";
|
|
1215
|
+
readonly pointerId: number;
|
|
1216
|
+
readonly startX: number;
|
|
1217
|
+
readonly currentX: number;
|
|
1218
|
+
} | {
|
|
1219
|
+
readonly _tag: "Idle";
|
|
1220
|
+
} | {
|
|
1221
|
+
readonly _tag: "Settling";
|
|
1222
|
+
readonly offsetX: number;
|
|
1223
|
+
};
|
|
1224
|
+
readonly swipeVersion: number;
|
|
1225
|
+
readonly payload: A;
|
|
1226
|
+
};
|
|
1227
|
+
} | {
|
|
1228
|
+
readonly _tag: "CancelledSwipe";
|
|
1229
|
+
readonly pointerId: number;
|
|
1230
|
+
} | {
|
|
1231
|
+
readonly _tag: "CompletedWaitBeforeDismissal";
|
|
1232
|
+
readonly entryId: string;
|
|
1233
|
+
readonly version: number;
|
|
1234
|
+
} | {
|
|
1235
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
1236
|
+
readonly entryId: string;
|
|
1237
|
+
readonly version: number;
|
|
1238
|
+
} | {
|
|
1239
|
+
readonly _tag: "Dismissed";
|
|
1240
|
+
readonly entryId: string;
|
|
1241
|
+
} | {
|
|
1242
|
+
readonly _tag: "DismissedAll";
|
|
1243
|
+
} | {
|
|
1244
|
+
readonly _tag: "GotAnimationMessage";
|
|
1245
|
+
readonly entryId: string;
|
|
1246
|
+
readonly message: {
|
|
1247
|
+
readonly _tag: "CompletedWaitForPaint";
|
|
1248
|
+
readonly generation: number;
|
|
1249
|
+
} | {
|
|
1250
|
+
readonly _tag: "EndedAnimation";
|
|
1251
|
+
readonly generation: number;
|
|
1252
|
+
} | {
|
|
1253
|
+
readonly _tag: "Hid";
|
|
1254
|
+
} | {
|
|
1255
|
+
readonly _tag: "Showed";
|
|
1256
|
+
};
|
|
1257
|
+
} | {
|
|
1258
|
+
readonly _tag: "HoveredEntry";
|
|
1259
|
+
readonly entryId: string;
|
|
1260
|
+
} | {
|
|
1261
|
+
readonly _tag: "LeftEntry";
|
|
1262
|
+
readonly entryId: string;
|
|
1263
|
+
} | {
|
|
1264
|
+
readonly _tag: "MovedSwipePointer";
|
|
1265
|
+
readonly pointerId: number;
|
|
1266
|
+
readonly clientX: number;
|
|
1267
|
+
} | {
|
|
1268
|
+
readonly _tag: "PressedEntryPointer";
|
|
1269
|
+
readonly entryId: string;
|
|
1270
|
+
readonly pointerId: number;
|
|
1271
|
+
readonly clientX: number;
|
|
1272
|
+
} | {
|
|
1273
|
+
readonly _tag: "PressedEscape";
|
|
1274
|
+
} | {
|
|
1275
|
+
readonly _tag: "ReleasedSwipePointer";
|
|
1276
|
+
readonly pointerId: number;
|
|
1277
|
+
readonly clientX: number;
|
|
1278
|
+
}, {
|
|
1279
|
+
readonly isSwipeEnabled: boolean;
|
|
1280
|
+
readonly isAnyDragging: boolean;
|
|
1281
|
+
}, never> & {
|
|
1282
|
+
readonly __subscription: never;
|
|
1283
|
+
};
|
|
1284
|
+
};
|
|
1285
|
+
readonly swipeOffset: typeof swipeOffset;
|
|
525
1286
|
};
|
|
526
1287
|
//# sourceMappingURL=update.d.ts.map
|