@foldkit/ui 0.162.0 → 0.163.0-canary.b415a3e22be5
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.map +1 -1
- package/dist/anchor/anchor.js +10 -1
- package/dist/animation/update.d.ts.map +1 -1
- package/dist/animation/update.js +11 -7
- 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.js +2 -2
- package/dist/combobox/shared.js +15 -15
- package/dist/combobox/single.js +4 -4
- package/dist/datePicker/index.d.ts.map +1 -1
- package/dist/datePicker/index.js +10 -10
- package/dist/dialog/index.js +9 -9
- 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/listbox/shared.d.ts.map +1 -1
- package/dist/listbox/shared.js +20 -18
- package/dist/menu/index.d.ts.map +1 -1
- package/dist/menu/index.js +23 -17
- package/dist/popover/index.d.ts.map +1 -1
- package/dist/popover/index.js +12 -10
- package/dist/radioGroup/index.d.ts.map +1 -1
- package/dist/radioGroup/index.js +5 -3
- package/dist/slider/index.js +6 -6
- 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 +4 -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 +822 -43
- 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 +145 -2
- 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 +1 -1
- package/dist/toast/test.js +1 -1
- package/dist/toast/update.d.ts +726 -5
- package/dist/toast/update.d.ts.map +1 -1
- package/dist/toast/update.js +283 -68
- package/dist/tooltip/tooltip.d.ts +2 -2
- 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 +7 -7
package/dist/toast/index.d.ts
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
1
|
+
import { Option, Schema } from 'effect';
|
|
2
2
|
import { type ChildAttribute, type Html } from 'foldkit/html';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export type { CompletedWaitBeforeDismissal, Dismissed, DismissedAll, GotAnimationMessage, HoveredEntry, InitConfig, LeftEntry, } from './schema.js';
|
|
3
|
+
import { Position, Variant } from './schema.js';
|
|
4
|
+
export type { CompletedWaitBeforeDismissal, Dismissed, DismissedAll, GotAnimationMessage, PressedEntryPointer, MovedSwipePointer, ReleasedSwipePointer, CancelledSwipe, PressedEscape, CompletedWaitForSwipeSettled, HoveredEntry, InitConfig, LeftEntry, SwipeToDismissConfig, } from './schema.js';
|
|
6
5
|
export type { ShowInput } from './update.js';
|
|
7
6
|
export * as test from './test.js';
|
|
8
|
-
export { Message, Variant, Position,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* to
|
|
12
|
-
* Toast's dismiss handler bound to this entry's id; it routes through
|
|
13
|
-
* the Toast boundary's wrap chain at click time. */
|
|
7
|
+
export { Message, Variant, Position, SwipeDirection, SwipeState, DEFAULT_SWIPE_DIRECTION, DEFAULT_SWIPE_THRESHOLD, SWIPE_SETTLE_DURATION, } from './schema.js';
|
|
8
|
+
export { WaitBeforeDismissal, WaitForSwipeSettled, swipeOffset, } from './update.js';
|
|
9
|
+
/** Handlers passed to `entryToView`. Spread `dismiss` onto a close button's
|
|
10
|
+
* attributes to dispatch `Dismissed` for this entry. */
|
|
14
11
|
export type EntryHandlers = Readonly<{
|
|
15
12
|
dismiss: ReadonlyArray<ChildAttribute>;
|
|
16
13
|
}>;
|
|
@@ -21,16 +18,15 @@ export type EntryHandlers = Readonly<{
|
|
|
21
18
|
*
|
|
22
19
|
* The payload is whatever content shape the consumer supplies via Schema.
|
|
23
20
|
* The component never reads it. It flows through to `entryToView`. The
|
|
24
|
-
* component
|
|
25
|
-
*
|
|
21
|
+
* component owns the entry's lifecycle, accessibility role, dismiss timer,
|
|
22
|
+
* hover state, and swipe state.
|
|
26
23
|
*
|
|
27
24
|
* Consume the bound module's exports everywhere. `Toast.Model` in your app
|
|
28
25
|
* Model, `Toast.Message` in your parent Message union, `Toast.show` /
|
|
29
26
|
* `Toast.dismiss` in your update, `Toast.view` in your view. The top-level
|
|
30
|
-
* exports
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* bound module, but the typical path is through the factory return.
|
|
27
|
+
* exports provide payload-independent Schemas, constants, and Commands.
|
|
28
|
+
* Use the bound module for the payload-specific Model, Message, helpers,
|
|
29
|
+
* and view.
|
|
34
30
|
*
|
|
35
31
|
* @example
|
|
36
32
|
* ```ts
|
|
@@ -56,6 +52,22 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
56
52
|
readonly maybeDuration: Schema.Option<Schema.DurationFromMillis>;
|
|
57
53
|
readonly pendingDismissVersion: Schema.Number;
|
|
58
54
|
readonly isHovered: Schema.Boolean;
|
|
55
|
+
readonly swipeState: import("foldkit/schema").TaggedUnion<{
|
|
56
|
+
readonly Idle: {};
|
|
57
|
+
readonly Dragging: {
|
|
58
|
+
pointerId: Schema.Number;
|
|
59
|
+
startX: Schema.Number;
|
|
60
|
+
currentX: Schema.Number;
|
|
61
|
+
};
|
|
62
|
+
readonly Settling: {
|
|
63
|
+
offsetX: Schema.Number;
|
|
64
|
+
};
|
|
65
|
+
readonly Dismissing: {
|
|
66
|
+
offsetX: Schema.Number;
|
|
67
|
+
direction: Schema.Literals<readonly ["Left", "Right"]>;
|
|
68
|
+
};
|
|
69
|
+
}>;
|
|
70
|
+
readonly swipeVersion: Schema.Number;
|
|
59
71
|
readonly payload: Schema.Codec<A, I, never, never>;
|
|
60
72
|
}>;
|
|
61
73
|
readonly Model: Schema.Struct<{
|
|
@@ -72,9 +84,29 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
72
84
|
readonly maybeDuration: Schema.Option<Schema.DurationFromMillis>;
|
|
73
85
|
readonly pendingDismissVersion: Schema.Number;
|
|
74
86
|
readonly isHovered: Schema.Boolean;
|
|
87
|
+
readonly swipeState: import("foldkit/schema").TaggedUnion<{
|
|
88
|
+
readonly Idle: {};
|
|
89
|
+
readonly Dragging: {
|
|
90
|
+
pointerId: Schema.Number;
|
|
91
|
+
startX: Schema.Number;
|
|
92
|
+
currentX: Schema.Number;
|
|
93
|
+
};
|
|
94
|
+
readonly Settling: {
|
|
95
|
+
offsetX: Schema.Number;
|
|
96
|
+
};
|
|
97
|
+
readonly Dismissing: {
|
|
98
|
+
offsetX: Schema.Number;
|
|
99
|
+
direction: Schema.Literals<readonly ["Left", "Right"]>;
|
|
100
|
+
};
|
|
101
|
+
}>;
|
|
102
|
+
readonly swipeVersion: Schema.Number;
|
|
75
103
|
readonly payload: Schema.Codec<A, I, never, never>;
|
|
76
104
|
}>>;
|
|
77
105
|
readonly nextEntryKey: Schema.Number;
|
|
106
|
+
readonly maybeSwipeConfig: Schema.Option<Schema.Struct<{
|
|
107
|
+
readonly direction: Schema.Literals<readonly ["Left", "Right"]>;
|
|
108
|
+
readonly threshold: Schema.Number;
|
|
109
|
+
}>>;
|
|
78
110
|
}>;
|
|
79
111
|
readonly Message: import("foldkit/message").MessageUnion<{
|
|
80
112
|
readonly Added: {
|
|
@@ -89,6 +121,22 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
89
121
|
readonly maybeDuration: Schema.Option<Schema.DurationFromMillis>;
|
|
90
122
|
readonly pendingDismissVersion: Schema.Number;
|
|
91
123
|
readonly isHovered: Schema.Boolean;
|
|
124
|
+
readonly swipeState: import("foldkit/schema").TaggedUnion<{
|
|
125
|
+
readonly Idle: {};
|
|
126
|
+
readonly Dragging: {
|
|
127
|
+
pointerId: Schema.Number;
|
|
128
|
+
startX: Schema.Number;
|
|
129
|
+
currentX: Schema.Number;
|
|
130
|
+
};
|
|
131
|
+
readonly Settling: {
|
|
132
|
+
offsetX: Schema.Number;
|
|
133
|
+
};
|
|
134
|
+
readonly Dismissing: {
|
|
135
|
+
offsetX: Schema.Number;
|
|
136
|
+
direction: Schema.Literals<readonly ["Left", "Right"]>;
|
|
137
|
+
};
|
|
138
|
+
}>;
|
|
139
|
+
readonly swipeVersion: Schema.Number;
|
|
92
140
|
readonly payload: Schema.Codec<A, I, never, never>;
|
|
93
141
|
}>;
|
|
94
142
|
};
|
|
@@ -115,6 +163,27 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
115
163
|
readonly EndedAnimation: {};
|
|
116
164
|
}>;
|
|
117
165
|
};
|
|
166
|
+
readonly PressedEntryPointer: {
|
|
167
|
+
entryId: Schema.String;
|
|
168
|
+
pointerId: Schema.Number;
|
|
169
|
+
clientX: Schema.Number;
|
|
170
|
+
};
|
|
171
|
+
readonly MovedSwipePointer: {
|
|
172
|
+
pointerId: Schema.Number;
|
|
173
|
+
clientX: Schema.Number;
|
|
174
|
+
};
|
|
175
|
+
readonly ReleasedSwipePointer: {
|
|
176
|
+
pointerId: Schema.Number;
|
|
177
|
+
clientX: Schema.Number;
|
|
178
|
+
};
|
|
179
|
+
readonly CancelledSwipe: {
|
|
180
|
+
pointerId: Schema.Number;
|
|
181
|
+
};
|
|
182
|
+
readonly PressedEscape: {};
|
|
183
|
+
readonly CompletedWaitForSwipeSettled: {
|
|
184
|
+
entryId: Schema.String;
|
|
185
|
+
version: Schema.Number;
|
|
186
|
+
};
|
|
118
187
|
}>;
|
|
119
188
|
readonly OutMessage: import("foldkit/message").MessageUnion<{
|
|
120
189
|
readonly DismissedToast: {
|
|
@@ -133,6 +202,22 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
133
202
|
readonly maybeDuration: Schema.Option<Schema.DurationFromMillis>;
|
|
134
203
|
readonly pendingDismissVersion: Schema.Number;
|
|
135
204
|
readonly isHovered: Schema.Boolean;
|
|
205
|
+
readonly swipeState: import("foldkit/schema").TaggedUnion<{
|
|
206
|
+
readonly Idle: {};
|
|
207
|
+
readonly Dragging: {
|
|
208
|
+
pointerId: Schema.Number;
|
|
209
|
+
startX: Schema.Number;
|
|
210
|
+
currentX: Schema.Number;
|
|
211
|
+
};
|
|
212
|
+
readonly Settling: {
|
|
213
|
+
offsetX: Schema.Number;
|
|
214
|
+
};
|
|
215
|
+
readonly Dismissing: {
|
|
216
|
+
offsetX: Schema.Number;
|
|
217
|
+
direction: Schema.Literals<readonly ["Left", "Right"]>;
|
|
218
|
+
};
|
|
219
|
+
}>;
|
|
220
|
+
readonly swipeVersion: Schema.Number;
|
|
136
221
|
readonly payload: Schema.Codec<A, I, never, never>;
|
|
137
222
|
}>;
|
|
138
223
|
}>;
|
|
@@ -142,6 +227,7 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
142
227
|
readonly init: (config: Readonly<{
|
|
143
228
|
id: string;
|
|
144
229
|
defaultDuration?: import("effect/Duration").Input;
|
|
230
|
+
swipeToDismiss?: import("./schema.js").SwipeToDismissConfig;
|
|
145
231
|
}>) => {
|
|
146
232
|
readonly id: string;
|
|
147
233
|
readonly defaultDuration: import("effect/Duration").Duration;
|
|
@@ -153,12 +239,32 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
153
239
|
readonly isShowing: boolean;
|
|
154
240
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
155
241
|
};
|
|
156
|
-
readonly maybeDuration:
|
|
242
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
157
243
|
readonly pendingDismissVersion: number;
|
|
158
244
|
readonly isHovered: boolean;
|
|
245
|
+
readonly swipeState: {
|
|
246
|
+
readonly _tag: "Dismissing";
|
|
247
|
+
readonly offsetX: number;
|
|
248
|
+
readonly direction: "Left" | "Right";
|
|
249
|
+
} | {
|
|
250
|
+
readonly _tag: "Dragging";
|
|
251
|
+
readonly pointerId: number;
|
|
252
|
+
readonly startX: number;
|
|
253
|
+
readonly currentX: number;
|
|
254
|
+
} | {
|
|
255
|
+
readonly _tag: "Idle";
|
|
256
|
+
} | {
|
|
257
|
+
readonly _tag: "Settling";
|
|
258
|
+
readonly offsetX: number;
|
|
259
|
+
};
|
|
260
|
+
readonly swipeVersion: number;
|
|
159
261
|
readonly payload: A;
|
|
160
262
|
}[];
|
|
161
263
|
readonly nextEntryKey: number;
|
|
264
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
265
|
+
readonly direction: "Left" | "Right";
|
|
266
|
+
readonly threshold: number;
|
|
267
|
+
}>;
|
|
162
268
|
};
|
|
163
269
|
readonly update: (model: {
|
|
164
270
|
readonly id: string;
|
|
@@ -171,15 +277,33 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
171
277
|
readonly isShowing: boolean;
|
|
172
278
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
173
279
|
};
|
|
174
|
-
readonly maybeDuration:
|
|
280
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
175
281
|
readonly pendingDismissVersion: number;
|
|
176
282
|
readonly isHovered: boolean;
|
|
283
|
+
readonly swipeState: {
|
|
284
|
+
readonly _tag: "Dismissing";
|
|
285
|
+
readonly offsetX: number;
|
|
286
|
+
readonly direction: "Left" | "Right";
|
|
287
|
+
} | {
|
|
288
|
+
readonly _tag: "Dragging";
|
|
289
|
+
readonly pointerId: number;
|
|
290
|
+
readonly startX: number;
|
|
291
|
+
readonly currentX: number;
|
|
292
|
+
} | {
|
|
293
|
+
readonly _tag: "Idle";
|
|
294
|
+
} | {
|
|
295
|
+
readonly _tag: "Settling";
|
|
296
|
+
readonly offsetX: number;
|
|
297
|
+
};
|
|
298
|
+
readonly swipeVersion: number;
|
|
177
299
|
readonly payload: A;
|
|
178
300
|
}[];
|
|
179
301
|
readonly nextEntryKey: number;
|
|
302
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
303
|
+
readonly direction: "Left" | "Right";
|
|
304
|
+
readonly threshold: number;
|
|
305
|
+
}>;
|
|
180
306
|
}, message: {
|
|
181
|
-
readonly _tag: "DismissedAll";
|
|
182
|
-
} | {
|
|
183
307
|
readonly _tag: "Added";
|
|
184
308
|
readonly entry: {
|
|
185
309
|
readonly id: string;
|
|
@@ -189,15 +313,38 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
189
313
|
readonly isShowing: boolean;
|
|
190
314
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
191
315
|
};
|
|
192
|
-
readonly maybeDuration:
|
|
316
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
193
317
|
readonly pendingDismissVersion: number;
|
|
194
318
|
readonly isHovered: boolean;
|
|
319
|
+
readonly swipeState: {
|
|
320
|
+
readonly _tag: "Dismissing";
|
|
321
|
+
readonly offsetX: number;
|
|
322
|
+
readonly direction: "Left" | "Right";
|
|
323
|
+
} | {
|
|
324
|
+
readonly _tag: "Dragging";
|
|
325
|
+
readonly pointerId: number;
|
|
326
|
+
readonly startX: number;
|
|
327
|
+
readonly currentX: number;
|
|
328
|
+
} | {
|
|
329
|
+
readonly _tag: "Idle";
|
|
330
|
+
} | {
|
|
331
|
+
readonly _tag: "Settling";
|
|
332
|
+
readonly offsetX: number;
|
|
333
|
+
};
|
|
334
|
+
readonly swipeVersion: number;
|
|
195
335
|
readonly payload: A;
|
|
196
336
|
};
|
|
337
|
+
} | {
|
|
338
|
+
readonly _tag: "CancelledSwipe";
|
|
339
|
+
readonly pointerId: number;
|
|
197
340
|
} | {
|
|
198
341
|
readonly _tag: "CompletedWaitBeforeDismissal";
|
|
199
342
|
readonly entryId: string;
|
|
200
343
|
readonly version: number;
|
|
344
|
+
} | {
|
|
345
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
346
|
+
readonly entryId: string;
|
|
347
|
+
readonly version: number;
|
|
201
348
|
} | {
|
|
202
349
|
readonly _tag: "Dismissed";
|
|
203
350
|
readonly entryId: string;
|
|
@@ -219,6 +366,23 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
219
366
|
} | {
|
|
220
367
|
readonly _tag: "LeftEntry";
|
|
221
368
|
readonly entryId: string;
|
|
369
|
+
} | {
|
|
370
|
+
readonly _tag: "MovedSwipePointer";
|
|
371
|
+
readonly pointerId: number;
|
|
372
|
+
readonly clientX: number;
|
|
373
|
+
} | {
|
|
374
|
+
readonly _tag: "PressedEntryPointer";
|
|
375
|
+
readonly entryId: string;
|
|
376
|
+
readonly pointerId: number;
|
|
377
|
+
readonly clientX: number;
|
|
378
|
+
} | {
|
|
379
|
+
readonly _tag: "ReleasedSwipePointer";
|
|
380
|
+
readonly pointerId: number;
|
|
381
|
+
readonly clientX: number;
|
|
382
|
+
} | {
|
|
383
|
+
readonly _tag: "DismissedAll";
|
|
384
|
+
} | {
|
|
385
|
+
readonly _tag: "PressedEscape";
|
|
222
386
|
}) => Readonly<{
|
|
223
387
|
model: {
|
|
224
388
|
readonly id: string;
|
|
@@ -231,16 +395,34 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
231
395
|
readonly isShowing: boolean;
|
|
232
396
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
233
397
|
};
|
|
234
|
-
readonly maybeDuration:
|
|
398
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
235
399
|
readonly pendingDismissVersion: number;
|
|
236
400
|
readonly isHovered: boolean;
|
|
401
|
+
readonly swipeState: {
|
|
402
|
+
readonly _tag: "Dismissing";
|
|
403
|
+
readonly offsetX: number;
|
|
404
|
+
readonly direction: "Left" | "Right";
|
|
405
|
+
} | {
|
|
406
|
+
readonly _tag: "Dragging";
|
|
407
|
+
readonly pointerId: number;
|
|
408
|
+
readonly startX: number;
|
|
409
|
+
readonly currentX: number;
|
|
410
|
+
} | {
|
|
411
|
+
readonly _tag: "Idle";
|
|
412
|
+
} | {
|
|
413
|
+
readonly _tag: "Settling";
|
|
414
|
+
readonly offsetX: number;
|
|
415
|
+
};
|
|
416
|
+
readonly swipeVersion: number;
|
|
237
417
|
readonly payload: A;
|
|
238
418
|
}[];
|
|
239
419
|
readonly nextEntryKey: number;
|
|
420
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
421
|
+
readonly direction: "Left" | "Right";
|
|
422
|
+
readonly threshold: number;
|
|
423
|
+
}>;
|
|
240
424
|
};
|
|
241
425
|
commands?: import("foldkit/update").Commands<{
|
|
242
|
-
readonly _tag: "DismissedAll";
|
|
243
|
-
} | {
|
|
244
426
|
readonly _tag: "Added";
|
|
245
427
|
readonly entry: {
|
|
246
428
|
readonly id: string;
|
|
@@ -250,15 +432,38 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
250
432
|
readonly isShowing: boolean;
|
|
251
433
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
252
434
|
};
|
|
253
|
-
readonly maybeDuration:
|
|
435
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
254
436
|
readonly pendingDismissVersion: number;
|
|
255
437
|
readonly isHovered: boolean;
|
|
438
|
+
readonly swipeState: {
|
|
439
|
+
readonly _tag: "Dismissing";
|
|
440
|
+
readonly offsetX: number;
|
|
441
|
+
readonly direction: "Left" | "Right";
|
|
442
|
+
} | {
|
|
443
|
+
readonly _tag: "Dragging";
|
|
444
|
+
readonly pointerId: number;
|
|
445
|
+
readonly startX: number;
|
|
446
|
+
readonly currentX: number;
|
|
447
|
+
} | {
|
|
448
|
+
readonly _tag: "Idle";
|
|
449
|
+
} | {
|
|
450
|
+
readonly _tag: "Settling";
|
|
451
|
+
readonly offsetX: number;
|
|
452
|
+
};
|
|
453
|
+
readonly swipeVersion: number;
|
|
256
454
|
readonly payload: A;
|
|
257
455
|
};
|
|
456
|
+
} | {
|
|
457
|
+
readonly _tag: "CancelledSwipe";
|
|
458
|
+
readonly pointerId: number;
|
|
258
459
|
} | {
|
|
259
460
|
readonly _tag: "CompletedWaitBeforeDismissal";
|
|
260
461
|
readonly entryId: string;
|
|
261
462
|
readonly version: number;
|
|
463
|
+
} | {
|
|
464
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
465
|
+
readonly entryId: string;
|
|
466
|
+
readonly version: number;
|
|
262
467
|
} | {
|
|
263
468
|
readonly _tag: "Dismissed";
|
|
264
469
|
readonly entryId: string;
|
|
@@ -280,6 +485,23 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
280
485
|
} | {
|
|
281
486
|
readonly _tag: "LeftEntry";
|
|
282
487
|
readonly entryId: string;
|
|
488
|
+
} | {
|
|
489
|
+
readonly _tag: "MovedSwipePointer";
|
|
490
|
+
readonly pointerId: number;
|
|
491
|
+
readonly clientX: number;
|
|
492
|
+
} | {
|
|
493
|
+
readonly _tag: "PressedEntryPointer";
|
|
494
|
+
readonly entryId: string;
|
|
495
|
+
readonly pointerId: number;
|
|
496
|
+
readonly clientX: number;
|
|
497
|
+
} | {
|
|
498
|
+
readonly _tag: "ReleasedSwipePointer";
|
|
499
|
+
readonly pointerId: number;
|
|
500
|
+
readonly clientX: number;
|
|
501
|
+
} | {
|
|
502
|
+
readonly _tag: "DismissedAll";
|
|
503
|
+
} | {
|
|
504
|
+
readonly _tag: "PressedEscape";
|
|
283
505
|
}, never>;
|
|
284
506
|
outMessage?: {
|
|
285
507
|
readonly _tag: "DismissedToast";
|
|
@@ -297,12 +519,32 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
297
519
|
readonly isShowing: boolean;
|
|
298
520
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
299
521
|
};
|
|
300
|
-
readonly maybeDuration:
|
|
522
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
301
523
|
readonly pendingDismissVersion: number;
|
|
302
524
|
readonly isHovered: boolean;
|
|
525
|
+
readonly swipeState: {
|
|
526
|
+
readonly _tag: "Dismissing";
|
|
527
|
+
readonly offsetX: number;
|
|
528
|
+
readonly direction: "Left" | "Right";
|
|
529
|
+
} | {
|
|
530
|
+
readonly _tag: "Dragging";
|
|
531
|
+
readonly pointerId: number;
|
|
532
|
+
readonly startX: number;
|
|
533
|
+
readonly currentX: number;
|
|
534
|
+
} | {
|
|
535
|
+
readonly _tag: "Idle";
|
|
536
|
+
} | {
|
|
537
|
+
readonly _tag: "Settling";
|
|
538
|
+
readonly offsetX: number;
|
|
539
|
+
};
|
|
540
|
+
readonly swipeVersion: number;
|
|
303
541
|
readonly payload: A;
|
|
304
542
|
}[];
|
|
305
543
|
readonly nextEntryKey: number;
|
|
544
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
545
|
+
readonly direction: "Left" | "Right";
|
|
546
|
+
readonly threshold: number;
|
|
547
|
+
}>;
|
|
306
548
|
}, input: Readonly<{
|
|
307
549
|
payload: A;
|
|
308
550
|
variant?: Variant;
|
|
@@ -320,16 +562,34 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
320
562
|
readonly isShowing: boolean;
|
|
321
563
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
322
564
|
};
|
|
323
|
-
readonly maybeDuration:
|
|
565
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
324
566
|
readonly pendingDismissVersion: number;
|
|
325
567
|
readonly isHovered: boolean;
|
|
568
|
+
readonly swipeState: {
|
|
569
|
+
readonly _tag: "Dismissing";
|
|
570
|
+
readonly offsetX: number;
|
|
571
|
+
readonly direction: "Left" | "Right";
|
|
572
|
+
} | {
|
|
573
|
+
readonly _tag: "Dragging";
|
|
574
|
+
readonly pointerId: number;
|
|
575
|
+
readonly startX: number;
|
|
576
|
+
readonly currentX: number;
|
|
577
|
+
} | {
|
|
578
|
+
readonly _tag: "Idle";
|
|
579
|
+
} | {
|
|
580
|
+
readonly _tag: "Settling";
|
|
581
|
+
readonly offsetX: number;
|
|
582
|
+
};
|
|
583
|
+
readonly swipeVersion: number;
|
|
326
584
|
readonly payload: A;
|
|
327
585
|
}[];
|
|
328
586
|
readonly nextEntryKey: number;
|
|
587
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
588
|
+
readonly direction: "Left" | "Right";
|
|
589
|
+
readonly threshold: number;
|
|
590
|
+
}>;
|
|
329
591
|
};
|
|
330
592
|
commands?: import("foldkit/update").Commands<{
|
|
331
|
-
readonly _tag: "DismissedAll";
|
|
332
|
-
} | {
|
|
333
593
|
readonly _tag: "Added";
|
|
334
594
|
readonly entry: {
|
|
335
595
|
readonly id: string;
|
|
@@ -339,15 +599,38 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
339
599
|
readonly isShowing: boolean;
|
|
340
600
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
341
601
|
};
|
|
342
|
-
readonly maybeDuration:
|
|
602
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
343
603
|
readonly pendingDismissVersion: number;
|
|
344
604
|
readonly isHovered: boolean;
|
|
605
|
+
readonly swipeState: {
|
|
606
|
+
readonly _tag: "Dismissing";
|
|
607
|
+
readonly offsetX: number;
|
|
608
|
+
readonly direction: "Left" | "Right";
|
|
609
|
+
} | {
|
|
610
|
+
readonly _tag: "Dragging";
|
|
611
|
+
readonly pointerId: number;
|
|
612
|
+
readonly startX: number;
|
|
613
|
+
readonly currentX: number;
|
|
614
|
+
} | {
|
|
615
|
+
readonly _tag: "Idle";
|
|
616
|
+
} | {
|
|
617
|
+
readonly _tag: "Settling";
|
|
618
|
+
readonly offsetX: number;
|
|
619
|
+
};
|
|
620
|
+
readonly swipeVersion: number;
|
|
345
621
|
readonly payload: A;
|
|
346
622
|
};
|
|
623
|
+
} | {
|
|
624
|
+
readonly _tag: "CancelledSwipe";
|
|
625
|
+
readonly pointerId: number;
|
|
347
626
|
} | {
|
|
348
627
|
readonly _tag: "CompletedWaitBeforeDismissal";
|
|
349
628
|
readonly entryId: string;
|
|
350
629
|
readonly version: number;
|
|
630
|
+
} | {
|
|
631
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
632
|
+
readonly entryId: string;
|
|
633
|
+
readonly version: number;
|
|
351
634
|
} | {
|
|
352
635
|
readonly _tag: "Dismissed";
|
|
353
636
|
readonly entryId: string;
|
|
@@ -369,6 +652,23 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
369
652
|
} | {
|
|
370
653
|
readonly _tag: "LeftEntry";
|
|
371
654
|
readonly entryId: string;
|
|
655
|
+
} | {
|
|
656
|
+
readonly _tag: "MovedSwipePointer";
|
|
657
|
+
readonly pointerId: number;
|
|
658
|
+
readonly clientX: number;
|
|
659
|
+
} | {
|
|
660
|
+
readonly _tag: "PressedEntryPointer";
|
|
661
|
+
readonly entryId: string;
|
|
662
|
+
readonly pointerId: number;
|
|
663
|
+
readonly clientX: number;
|
|
664
|
+
} | {
|
|
665
|
+
readonly _tag: "ReleasedSwipePointer";
|
|
666
|
+
readonly pointerId: number;
|
|
667
|
+
readonly clientX: number;
|
|
668
|
+
} | {
|
|
669
|
+
readonly _tag: "DismissedAll";
|
|
670
|
+
} | {
|
|
671
|
+
readonly _tag: "PressedEscape";
|
|
372
672
|
}, never>;
|
|
373
673
|
outMessage?: {
|
|
374
674
|
readonly _tag: "DismissedToast";
|
|
@@ -386,12 +686,32 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
386
686
|
readonly isShowing: boolean;
|
|
387
687
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
388
688
|
};
|
|
389
|
-
readonly maybeDuration:
|
|
689
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
390
690
|
readonly pendingDismissVersion: number;
|
|
391
691
|
readonly isHovered: boolean;
|
|
692
|
+
readonly swipeState: {
|
|
693
|
+
readonly _tag: "Dismissing";
|
|
694
|
+
readonly offsetX: number;
|
|
695
|
+
readonly direction: "Left" | "Right";
|
|
696
|
+
} | {
|
|
697
|
+
readonly _tag: "Dragging";
|
|
698
|
+
readonly pointerId: number;
|
|
699
|
+
readonly startX: number;
|
|
700
|
+
readonly currentX: number;
|
|
701
|
+
} | {
|
|
702
|
+
readonly _tag: "Idle";
|
|
703
|
+
} | {
|
|
704
|
+
readonly _tag: "Settling";
|
|
705
|
+
readonly offsetX: number;
|
|
706
|
+
};
|
|
707
|
+
readonly swipeVersion: number;
|
|
392
708
|
readonly payload: A;
|
|
393
709
|
}[];
|
|
394
710
|
readonly nextEntryKey: number;
|
|
711
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
712
|
+
readonly direction: "Left" | "Right";
|
|
713
|
+
readonly threshold: number;
|
|
714
|
+
}>;
|
|
395
715
|
}, entryId: string) => Readonly<{
|
|
396
716
|
model: {
|
|
397
717
|
readonly id: string;
|
|
@@ -404,16 +724,34 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
404
724
|
readonly isShowing: boolean;
|
|
405
725
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
406
726
|
};
|
|
407
|
-
readonly maybeDuration:
|
|
727
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
408
728
|
readonly pendingDismissVersion: number;
|
|
409
729
|
readonly isHovered: boolean;
|
|
730
|
+
readonly swipeState: {
|
|
731
|
+
readonly _tag: "Dismissing";
|
|
732
|
+
readonly offsetX: number;
|
|
733
|
+
readonly direction: "Left" | "Right";
|
|
734
|
+
} | {
|
|
735
|
+
readonly _tag: "Dragging";
|
|
736
|
+
readonly pointerId: number;
|
|
737
|
+
readonly startX: number;
|
|
738
|
+
readonly currentX: number;
|
|
739
|
+
} | {
|
|
740
|
+
readonly _tag: "Idle";
|
|
741
|
+
} | {
|
|
742
|
+
readonly _tag: "Settling";
|
|
743
|
+
readonly offsetX: number;
|
|
744
|
+
};
|
|
745
|
+
readonly swipeVersion: number;
|
|
410
746
|
readonly payload: A;
|
|
411
747
|
}[];
|
|
412
748
|
readonly nextEntryKey: number;
|
|
749
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
750
|
+
readonly direction: "Left" | "Right";
|
|
751
|
+
readonly threshold: number;
|
|
752
|
+
}>;
|
|
413
753
|
};
|
|
414
754
|
commands?: import("foldkit/update").Commands<{
|
|
415
|
-
readonly _tag: "DismissedAll";
|
|
416
|
-
} | {
|
|
417
755
|
readonly _tag: "Added";
|
|
418
756
|
readonly entry: {
|
|
419
757
|
readonly id: string;
|
|
@@ -423,15 +761,38 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
423
761
|
readonly isShowing: boolean;
|
|
424
762
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
425
763
|
};
|
|
426
|
-
readonly maybeDuration:
|
|
764
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
427
765
|
readonly pendingDismissVersion: number;
|
|
428
766
|
readonly isHovered: boolean;
|
|
767
|
+
readonly swipeState: {
|
|
768
|
+
readonly _tag: "Dismissing";
|
|
769
|
+
readonly offsetX: number;
|
|
770
|
+
readonly direction: "Left" | "Right";
|
|
771
|
+
} | {
|
|
772
|
+
readonly _tag: "Dragging";
|
|
773
|
+
readonly pointerId: number;
|
|
774
|
+
readonly startX: number;
|
|
775
|
+
readonly currentX: number;
|
|
776
|
+
} | {
|
|
777
|
+
readonly _tag: "Idle";
|
|
778
|
+
} | {
|
|
779
|
+
readonly _tag: "Settling";
|
|
780
|
+
readonly offsetX: number;
|
|
781
|
+
};
|
|
782
|
+
readonly swipeVersion: number;
|
|
429
783
|
readonly payload: A;
|
|
430
784
|
};
|
|
785
|
+
} | {
|
|
786
|
+
readonly _tag: "CancelledSwipe";
|
|
787
|
+
readonly pointerId: number;
|
|
431
788
|
} | {
|
|
432
789
|
readonly _tag: "CompletedWaitBeforeDismissal";
|
|
433
790
|
readonly entryId: string;
|
|
434
791
|
readonly version: number;
|
|
792
|
+
} | {
|
|
793
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
794
|
+
readonly entryId: string;
|
|
795
|
+
readonly version: number;
|
|
435
796
|
} | {
|
|
436
797
|
readonly _tag: "Dismissed";
|
|
437
798
|
readonly entryId: string;
|
|
@@ -453,6 +814,23 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
453
814
|
} | {
|
|
454
815
|
readonly _tag: "LeftEntry";
|
|
455
816
|
readonly entryId: string;
|
|
817
|
+
} | {
|
|
818
|
+
readonly _tag: "MovedSwipePointer";
|
|
819
|
+
readonly pointerId: number;
|
|
820
|
+
readonly clientX: number;
|
|
821
|
+
} | {
|
|
822
|
+
readonly _tag: "PressedEntryPointer";
|
|
823
|
+
readonly entryId: string;
|
|
824
|
+
readonly pointerId: number;
|
|
825
|
+
readonly clientX: number;
|
|
826
|
+
} | {
|
|
827
|
+
readonly _tag: "ReleasedSwipePointer";
|
|
828
|
+
readonly pointerId: number;
|
|
829
|
+
readonly clientX: number;
|
|
830
|
+
} | {
|
|
831
|
+
readonly _tag: "DismissedAll";
|
|
832
|
+
} | {
|
|
833
|
+
readonly _tag: "PressedEscape";
|
|
456
834
|
}, never>;
|
|
457
835
|
outMessage?: {
|
|
458
836
|
readonly _tag: "DismissedToast";
|
|
@@ -470,12 +848,32 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
470
848
|
readonly isShowing: boolean;
|
|
471
849
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
472
850
|
};
|
|
473
|
-
readonly maybeDuration:
|
|
851
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
474
852
|
readonly pendingDismissVersion: number;
|
|
475
853
|
readonly isHovered: boolean;
|
|
854
|
+
readonly swipeState: {
|
|
855
|
+
readonly _tag: "Dismissing";
|
|
856
|
+
readonly offsetX: number;
|
|
857
|
+
readonly direction: "Left" | "Right";
|
|
858
|
+
} | {
|
|
859
|
+
readonly _tag: "Dragging";
|
|
860
|
+
readonly pointerId: number;
|
|
861
|
+
readonly startX: number;
|
|
862
|
+
readonly currentX: number;
|
|
863
|
+
} | {
|
|
864
|
+
readonly _tag: "Idle";
|
|
865
|
+
} | {
|
|
866
|
+
readonly _tag: "Settling";
|
|
867
|
+
readonly offsetX: number;
|
|
868
|
+
};
|
|
869
|
+
readonly swipeVersion: number;
|
|
476
870
|
readonly payload: A;
|
|
477
871
|
}[];
|
|
478
872
|
readonly nextEntryKey: number;
|
|
873
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
874
|
+
readonly direction: "Left" | "Right";
|
|
875
|
+
readonly threshold: number;
|
|
876
|
+
}>;
|
|
479
877
|
}) => Readonly<{
|
|
480
878
|
model: {
|
|
481
879
|
readonly id: string;
|
|
@@ -488,16 +886,34 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
488
886
|
readonly isShowing: boolean;
|
|
489
887
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
490
888
|
};
|
|
491
|
-
readonly maybeDuration:
|
|
889
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
492
890
|
readonly pendingDismissVersion: number;
|
|
493
891
|
readonly isHovered: boolean;
|
|
892
|
+
readonly swipeState: {
|
|
893
|
+
readonly _tag: "Dismissing";
|
|
894
|
+
readonly offsetX: number;
|
|
895
|
+
readonly direction: "Left" | "Right";
|
|
896
|
+
} | {
|
|
897
|
+
readonly _tag: "Dragging";
|
|
898
|
+
readonly pointerId: number;
|
|
899
|
+
readonly startX: number;
|
|
900
|
+
readonly currentX: number;
|
|
901
|
+
} | {
|
|
902
|
+
readonly _tag: "Idle";
|
|
903
|
+
} | {
|
|
904
|
+
readonly _tag: "Settling";
|
|
905
|
+
readonly offsetX: number;
|
|
906
|
+
};
|
|
907
|
+
readonly swipeVersion: number;
|
|
494
908
|
readonly payload: A;
|
|
495
909
|
}[];
|
|
496
910
|
readonly nextEntryKey: number;
|
|
911
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
912
|
+
readonly direction: "Left" | "Right";
|
|
913
|
+
readonly threshold: number;
|
|
914
|
+
}>;
|
|
497
915
|
};
|
|
498
916
|
commands?: import("foldkit/update").Commands<{
|
|
499
|
-
readonly _tag: "DismissedAll";
|
|
500
|
-
} | {
|
|
501
917
|
readonly _tag: "Added";
|
|
502
918
|
readonly entry: {
|
|
503
919
|
readonly id: string;
|
|
@@ -507,15 +923,38 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
507
923
|
readonly isShowing: boolean;
|
|
508
924
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
509
925
|
};
|
|
510
|
-
readonly maybeDuration:
|
|
926
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
511
927
|
readonly pendingDismissVersion: number;
|
|
512
928
|
readonly isHovered: boolean;
|
|
929
|
+
readonly swipeState: {
|
|
930
|
+
readonly _tag: "Dismissing";
|
|
931
|
+
readonly offsetX: number;
|
|
932
|
+
readonly direction: "Left" | "Right";
|
|
933
|
+
} | {
|
|
934
|
+
readonly _tag: "Dragging";
|
|
935
|
+
readonly pointerId: number;
|
|
936
|
+
readonly startX: number;
|
|
937
|
+
readonly currentX: number;
|
|
938
|
+
} | {
|
|
939
|
+
readonly _tag: "Idle";
|
|
940
|
+
} | {
|
|
941
|
+
readonly _tag: "Settling";
|
|
942
|
+
readonly offsetX: number;
|
|
943
|
+
};
|
|
944
|
+
readonly swipeVersion: number;
|
|
513
945
|
readonly payload: A;
|
|
514
946
|
};
|
|
947
|
+
} | {
|
|
948
|
+
readonly _tag: "CancelledSwipe";
|
|
949
|
+
readonly pointerId: number;
|
|
515
950
|
} | {
|
|
516
951
|
readonly _tag: "CompletedWaitBeforeDismissal";
|
|
517
952
|
readonly entryId: string;
|
|
518
953
|
readonly version: number;
|
|
954
|
+
} | {
|
|
955
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
956
|
+
readonly entryId: string;
|
|
957
|
+
readonly version: number;
|
|
519
958
|
} | {
|
|
520
959
|
readonly _tag: "Dismissed";
|
|
521
960
|
readonly entryId: string;
|
|
@@ -537,12 +976,278 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
537
976
|
} | {
|
|
538
977
|
readonly _tag: "LeftEntry";
|
|
539
978
|
readonly entryId: string;
|
|
979
|
+
} | {
|
|
980
|
+
readonly _tag: "MovedSwipePointer";
|
|
981
|
+
readonly pointerId: number;
|
|
982
|
+
readonly clientX: number;
|
|
983
|
+
} | {
|
|
984
|
+
readonly _tag: "PressedEntryPointer";
|
|
985
|
+
readonly entryId: string;
|
|
986
|
+
readonly pointerId: number;
|
|
987
|
+
readonly clientX: number;
|
|
988
|
+
} | {
|
|
989
|
+
readonly _tag: "ReleasedSwipePointer";
|
|
990
|
+
readonly pointerId: number;
|
|
991
|
+
readonly clientX: number;
|
|
992
|
+
} | {
|
|
993
|
+
readonly _tag: "DismissedAll";
|
|
994
|
+
} | {
|
|
995
|
+
readonly _tag: "PressedEscape";
|
|
540
996
|
}, never>;
|
|
541
997
|
outMessage?: {
|
|
542
998
|
readonly _tag: "DismissedToast";
|
|
543
999
|
readonly payload: A;
|
|
544
1000
|
};
|
|
545
1001
|
}>;
|
|
1002
|
+
readonly subscriptions: {
|
|
1003
|
+
readonly swipePointer: import("foldkit/subscription").EntryWithoutKeepAlive<{
|
|
1004
|
+
readonly id: string;
|
|
1005
|
+
readonly defaultDuration: import("effect/Duration").Duration;
|
|
1006
|
+
readonly entries: readonly {
|
|
1007
|
+
readonly id: string;
|
|
1008
|
+
readonly variant: "Error" | "Info" | "Success" | "Warning";
|
|
1009
|
+
readonly animation: {
|
|
1010
|
+
readonly id: string;
|
|
1011
|
+
readonly isShowing: boolean;
|
|
1012
|
+
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
1013
|
+
};
|
|
1014
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
1015
|
+
readonly pendingDismissVersion: number;
|
|
1016
|
+
readonly isHovered: boolean;
|
|
1017
|
+
readonly swipeState: {
|
|
1018
|
+
readonly _tag: "Dismissing";
|
|
1019
|
+
readonly offsetX: number;
|
|
1020
|
+
readonly direction: "Left" | "Right";
|
|
1021
|
+
} | {
|
|
1022
|
+
readonly _tag: "Dragging";
|
|
1023
|
+
readonly pointerId: number;
|
|
1024
|
+
readonly startX: number;
|
|
1025
|
+
readonly currentX: number;
|
|
1026
|
+
} | {
|
|
1027
|
+
readonly _tag: "Idle";
|
|
1028
|
+
} | {
|
|
1029
|
+
readonly _tag: "Settling";
|
|
1030
|
+
readonly offsetX: number;
|
|
1031
|
+
};
|
|
1032
|
+
readonly swipeVersion: number;
|
|
1033
|
+
readonly payload: A;
|
|
1034
|
+
}[];
|
|
1035
|
+
readonly nextEntryKey: number;
|
|
1036
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
1037
|
+
readonly direction: "Left" | "Right";
|
|
1038
|
+
readonly threshold: number;
|
|
1039
|
+
}>;
|
|
1040
|
+
}, {
|
|
1041
|
+
readonly _tag: "Added";
|
|
1042
|
+
readonly entry: {
|
|
1043
|
+
readonly id: string;
|
|
1044
|
+
readonly variant: "Error" | "Info" | "Success" | "Warning";
|
|
1045
|
+
readonly animation: {
|
|
1046
|
+
readonly id: string;
|
|
1047
|
+
readonly isShowing: boolean;
|
|
1048
|
+
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
1049
|
+
};
|
|
1050
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
1051
|
+
readonly pendingDismissVersion: number;
|
|
1052
|
+
readonly isHovered: boolean;
|
|
1053
|
+
readonly swipeState: {
|
|
1054
|
+
readonly _tag: "Dismissing";
|
|
1055
|
+
readonly offsetX: number;
|
|
1056
|
+
readonly direction: "Left" | "Right";
|
|
1057
|
+
} | {
|
|
1058
|
+
readonly _tag: "Dragging";
|
|
1059
|
+
readonly pointerId: number;
|
|
1060
|
+
readonly startX: number;
|
|
1061
|
+
readonly currentX: number;
|
|
1062
|
+
} | {
|
|
1063
|
+
readonly _tag: "Idle";
|
|
1064
|
+
} | {
|
|
1065
|
+
readonly _tag: "Settling";
|
|
1066
|
+
readonly offsetX: number;
|
|
1067
|
+
};
|
|
1068
|
+
readonly swipeVersion: number;
|
|
1069
|
+
readonly payload: A;
|
|
1070
|
+
};
|
|
1071
|
+
} | {
|
|
1072
|
+
readonly _tag: "CancelledSwipe";
|
|
1073
|
+
readonly pointerId: number;
|
|
1074
|
+
} | {
|
|
1075
|
+
readonly _tag: "CompletedWaitBeforeDismissal";
|
|
1076
|
+
readonly entryId: string;
|
|
1077
|
+
readonly version: number;
|
|
1078
|
+
} | {
|
|
1079
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
1080
|
+
readonly entryId: string;
|
|
1081
|
+
readonly version: number;
|
|
1082
|
+
} | {
|
|
1083
|
+
readonly _tag: "Dismissed";
|
|
1084
|
+
readonly entryId: string;
|
|
1085
|
+
} | {
|
|
1086
|
+
readonly _tag: "GotAnimationMessage";
|
|
1087
|
+
readonly entryId: string;
|
|
1088
|
+
readonly message: {
|
|
1089
|
+
readonly _tag: "CompletedWaitForPaint";
|
|
1090
|
+
} | {
|
|
1091
|
+
readonly _tag: "EndedAnimation";
|
|
1092
|
+
} | {
|
|
1093
|
+
readonly _tag: "Hid";
|
|
1094
|
+
} | {
|
|
1095
|
+
readonly _tag: "Showed";
|
|
1096
|
+
};
|
|
1097
|
+
} | {
|
|
1098
|
+
readonly _tag: "HoveredEntry";
|
|
1099
|
+
readonly entryId: string;
|
|
1100
|
+
} | {
|
|
1101
|
+
readonly _tag: "LeftEntry";
|
|
1102
|
+
readonly entryId: string;
|
|
1103
|
+
} | {
|
|
1104
|
+
readonly _tag: "MovedSwipePointer";
|
|
1105
|
+
readonly pointerId: number;
|
|
1106
|
+
readonly clientX: number;
|
|
1107
|
+
} | {
|
|
1108
|
+
readonly _tag: "PressedEntryPointer";
|
|
1109
|
+
readonly entryId: string;
|
|
1110
|
+
readonly pointerId: number;
|
|
1111
|
+
readonly clientX: number;
|
|
1112
|
+
} | {
|
|
1113
|
+
readonly _tag: "ReleasedSwipePointer";
|
|
1114
|
+
readonly pointerId: number;
|
|
1115
|
+
readonly clientX: number;
|
|
1116
|
+
} | {
|
|
1117
|
+
readonly _tag: "DismissedAll";
|
|
1118
|
+
} | {
|
|
1119
|
+
readonly _tag: "PressedEscape";
|
|
1120
|
+
}, {
|
|
1121
|
+
readonly isSwipeEnabled: boolean;
|
|
1122
|
+
readonly isAnyDragging: boolean;
|
|
1123
|
+
}, never> & {
|
|
1124
|
+
readonly __subscription: never;
|
|
1125
|
+
};
|
|
1126
|
+
readonly swipeEscape: import("foldkit/subscription").EntryWithoutKeepAlive<{
|
|
1127
|
+
readonly id: string;
|
|
1128
|
+
readonly defaultDuration: import("effect/Duration").Duration;
|
|
1129
|
+
readonly entries: readonly {
|
|
1130
|
+
readonly id: string;
|
|
1131
|
+
readonly variant: "Error" | "Info" | "Success" | "Warning";
|
|
1132
|
+
readonly animation: {
|
|
1133
|
+
readonly id: string;
|
|
1134
|
+
readonly isShowing: boolean;
|
|
1135
|
+
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
1136
|
+
};
|
|
1137
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
1138
|
+
readonly pendingDismissVersion: number;
|
|
1139
|
+
readonly isHovered: boolean;
|
|
1140
|
+
readonly swipeState: {
|
|
1141
|
+
readonly _tag: "Dismissing";
|
|
1142
|
+
readonly offsetX: number;
|
|
1143
|
+
readonly direction: "Left" | "Right";
|
|
1144
|
+
} | {
|
|
1145
|
+
readonly _tag: "Dragging";
|
|
1146
|
+
readonly pointerId: number;
|
|
1147
|
+
readonly startX: number;
|
|
1148
|
+
readonly currentX: number;
|
|
1149
|
+
} | {
|
|
1150
|
+
readonly _tag: "Idle";
|
|
1151
|
+
} | {
|
|
1152
|
+
readonly _tag: "Settling";
|
|
1153
|
+
readonly offsetX: number;
|
|
1154
|
+
};
|
|
1155
|
+
readonly swipeVersion: number;
|
|
1156
|
+
readonly payload: A;
|
|
1157
|
+
}[];
|
|
1158
|
+
readonly nextEntryKey: number;
|
|
1159
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
1160
|
+
readonly direction: "Left" | "Right";
|
|
1161
|
+
readonly threshold: number;
|
|
1162
|
+
}>;
|
|
1163
|
+
}, {
|
|
1164
|
+
readonly _tag: "Added";
|
|
1165
|
+
readonly entry: {
|
|
1166
|
+
readonly id: string;
|
|
1167
|
+
readonly variant: "Error" | "Info" | "Success" | "Warning";
|
|
1168
|
+
readonly animation: {
|
|
1169
|
+
readonly id: string;
|
|
1170
|
+
readonly isShowing: boolean;
|
|
1171
|
+
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
1172
|
+
};
|
|
1173
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
1174
|
+
readonly pendingDismissVersion: number;
|
|
1175
|
+
readonly isHovered: boolean;
|
|
1176
|
+
readonly swipeState: {
|
|
1177
|
+
readonly _tag: "Dismissing";
|
|
1178
|
+
readonly offsetX: number;
|
|
1179
|
+
readonly direction: "Left" | "Right";
|
|
1180
|
+
} | {
|
|
1181
|
+
readonly _tag: "Dragging";
|
|
1182
|
+
readonly pointerId: number;
|
|
1183
|
+
readonly startX: number;
|
|
1184
|
+
readonly currentX: number;
|
|
1185
|
+
} | {
|
|
1186
|
+
readonly _tag: "Idle";
|
|
1187
|
+
} | {
|
|
1188
|
+
readonly _tag: "Settling";
|
|
1189
|
+
readonly offsetX: number;
|
|
1190
|
+
};
|
|
1191
|
+
readonly swipeVersion: number;
|
|
1192
|
+
readonly payload: A;
|
|
1193
|
+
};
|
|
1194
|
+
} | {
|
|
1195
|
+
readonly _tag: "CancelledSwipe";
|
|
1196
|
+
readonly pointerId: number;
|
|
1197
|
+
} | {
|
|
1198
|
+
readonly _tag: "CompletedWaitBeforeDismissal";
|
|
1199
|
+
readonly entryId: string;
|
|
1200
|
+
readonly version: number;
|
|
1201
|
+
} | {
|
|
1202
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
1203
|
+
readonly entryId: string;
|
|
1204
|
+
readonly version: number;
|
|
1205
|
+
} | {
|
|
1206
|
+
readonly _tag: "Dismissed";
|
|
1207
|
+
readonly entryId: string;
|
|
1208
|
+
} | {
|
|
1209
|
+
readonly _tag: "GotAnimationMessage";
|
|
1210
|
+
readonly entryId: string;
|
|
1211
|
+
readonly message: {
|
|
1212
|
+
readonly _tag: "CompletedWaitForPaint";
|
|
1213
|
+
} | {
|
|
1214
|
+
readonly _tag: "EndedAnimation";
|
|
1215
|
+
} | {
|
|
1216
|
+
readonly _tag: "Hid";
|
|
1217
|
+
} | {
|
|
1218
|
+
readonly _tag: "Showed";
|
|
1219
|
+
};
|
|
1220
|
+
} | {
|
|
1221
|
+
readonly _tag: "HoveredEntry";
|
|
1222
|
+
readonly entryId: string;
|
|
1223
|
+
} | {
|
|
1224
|
+
readonly _tag: "LeftEntry";
|
|
1225
|
+
readonly entryId: string;
|
|
1226
|
+
} | {
|
|
1227
|
+
readonly _tag: "MovedSwipePointer";
|
|
1228
|
+
readonly pointerId: number;
|
|
1229
|
+
readonly clientX: number;
|
|
1230
|
+
} | {
|
|
1231
|
+
readonly _tag: "PressedEntryPointer";
|
|
1232
|
+
readonly entryId: string;
|
|
1233
|
+
readonly pointerId: number;
|
|
1234
|
+
readonly clientX: number;
|
|
1235
|
+
} | {
|
|
1236
|
+
readonly _tag: "ReleasedSwipePointer";
|
|
1237
|
+
readonly pointerId: number;
|
|
1238
|
+
readonly clientX: number;
|
|
1239
|
+
} | {
|
|
1240
|
+
readonly _tag: "DismissedAll";
|
|
1241
|
+
} | {
|
|
1242
|
+
readonly _tag: "PressedEscape";
|
|
1243
|
+
}, {
|
|
1244
|
+
readonly isSwipeEnabled: boolean;
|
|
1245
|
+
readonly isAnyDragging: boolean;
|
|
1246
|
+
}, never> & {
|
|
1247
|
+
readonly __subscription: never;
|
|
1248
|
+
};
|
|
1249
|
+
};
|
|
1250
|
+
readonly swipeOffset: typeof import("./update.js").swipeOffset;
|
|
546
1251
|
readonly view: import("foldkit/submodel").View<{
|
|
547
1252
|
readonly id: string;
|
|
548
1253
|
readonly defaultDuration: import("effect/Duration").Duration;
|
|
@@ -554,12 +1259,32 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
554
1259
|
readonly isShowing: boolean;
|
|
555
1260
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
556
1261
|
};
|
|
557
|
-
readonly maybeDuration:
|
|
1262
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
558
1263
|
readonly pendingDismissVersion: number;
|
|
559
1264
|
readonly isHovered: boolean;
|
|
1265
|
+
readonly swipeState: {
|
|
1266
|
+
readonly _tag: "Dismissing";
|
|
1267
|
+
readonly offsetX: number;
|
|
1268
|
+
readonly direction: "Left" | "Right";
|
|
1269
|
+
} | {
|
|
1270
|
+
readonly _tag: "Dragging";
|
|
1271
|
+
readonly pointerId: number;
|
|
1272
|
+
readonly startX: number;
|
|
1273
|
+
readonly currentX: number;
|
|
1274
|
+
} | {
|
|
1275
|
+
readonly _tag: "Idle";
|
|
1276
|
+
} | {
|
|
1277
|
+
readonly _tag: "Settling";
|
|
1278
|
+
readonly offsetX: number;
|
|
1279
|
+
};
|
|
1280
|
+
readonly swipeVersion: number;
|
|
560
1281
|
readonly payload: A;
|
|
561
1282
|
}[];
|
|
562
1283
|
readonly nextEntryKey: number;
|
|
1284
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
1285
|
+
readonly direction: "Left" | "Right";
|
|
1286
|
+
readonly threshold: number;
|
|
1287
|
+
}>;
|
|
563
1288
|
}, {
|
|
564
1289
|
readonly _tag: "Added";
|
|
565
1290
|
readonly entry: {
|
|
@@ -570,15 +1295,38 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
570
1295
|
readonly isShowing: boolean;
|
|
571
1296
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
572
1297
|
};
|
|
573
|
-
readonly maybeDuration:
|
|
1298
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
574
1299
|
readonly pendingDismissVersion: number;
|
|
575
1300
|
readonly isHovered: boolean;
|
|
1301
|
+
readonly swipeState: {
|
|
1302
|
+
readonly _tag: "Dismissing";
|
|
1303
|
+
readonly offsetX: number;
|
|
1304
|
+
readonly direction: "Left" | "Right";
|
|
1305
|
+
} | {
|
|
1306
|
+
readonly _tag: "Dragging";
|
|
1307
|
+
readonly pointerId: number;
|
|
1308
|
+
readonly startX: number;
|
|
1309
|
+
readonly currentX: number;
|
|
1310
|
+
} | {
|
|
1311
|
+
readonly _tag: "Idle";
|
|
1312
|
+
} | {
|
|
1313
|
+
readonly _tag: "Settling";
|
|
1314
|
+
readonly offsetX: number;
|
|
1315
|
+
};
|
|
1316
|
+
readonly swipeVersion: number;
|
|
576
1317
|
readonly payload: A;
|
|
577
1318
|
};
|
|
1319
|
+
} | {
|
|
1320
|
+
readonly _tag: "CancelledSwipe";
|
|
1321
|
+
readonly pointerId: number;
|
|
578
1322
|
} | {
|
|
579
1323
|
readonly _tag: "CompletedWaitBeforeDismissal";
|
|
580
1324
|
readonly entryId: string;
|
|
581
1325
|
readonly version: number;
|
|
1326
|
+
} | {
|
|
1327
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
1328
|
+
readonly entryId: string;
|
|
1329
|
+
readonly version: number;
|
|
582
1330
|
} | {
|
|
583
1331
|
readonly _tag: "Dismissed";
|
|
584
1332
|
readonly entryId: string;
|
|
@@ -602,6 +1350,21 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
602
1350
|
} | {
|
|
603
1351
|
readonly _tag: "LeftEntry";
|
|
604
1352
|
readonly entryId: string;
|
|
1353
|
+
} | {
|
|
1354
|
+
readonly _tag: "MovedSwipePointer";
|
|
1355
|
+
readonly pointerId: number;
|
|
1356
|
+
readonly clientX: number;
|
|
1357
|
+
} | {
|
|
1358
|
+
readonly _tag: "PressedEntryPointer";
|
|
1359
|
+
readonly entryId: string;
|
|
1360
|
+
readonly pointerId: number;
|
|
1361
|
+
readonly clientX: number;
|
|
1362
|
+
} | {
|
|
1363
|
+
readonly _tag: "PressedEscape";
|
|
1364
|
+
} | {
|
|
1365
|
+
readonly _tag: "ReleasedSwipePointer";
|
|
1366
|
+
readonly pointerId: number;
|
|
1367
|
+
readonly clientX: number;
|
|
605
1368
|
}, Readonly<{
|
|
606
1369
|
position: Position;
|
|
607
1370
|
entryToView: (entry: {
|
|
@@ -612,9 +1375,25 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
|
|
|
612
1375
|
readonly isShowing: boolean;
|
|
613
1376
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
614
1377
|
};
|
|
615
|
-
readonly maybeDuration:
|
|
1378
|
+
readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
|
|
616
1379
|
readonly pendingDismissVersion: number;
|
|
617
1380
|
readonly isHovered: boolean;
|
|
1381
|
+
readonly swipeState: {
|
|
1382
|
+
readonly _tag: "Dismissing";
|
|
1383
|
+
readonly offsetX: number;
|
|
1384
|
+
readonly direction: "Left" | "Right";
|
|
1385
|
+
} | {
|
|
1386
|
+
readonly _tag: "Dragging";
|
|
1387
|
+
readonly pointerId: number;
|
|
1388
|
+
readonly startX: number;
|
|
1389
|
+
readonly currentX: number;
|
|
1390
|
+
} | {
|
|
1391
|
+
readonly _tag: "Idle";
|
|
1392
|
+
} | {
|
|
1393
|
+
readonly _tag: "Settling";
|
|
1394
|
+
readonly offsetX: number;
|
|
1395
|
+
};
|
|
1396
|
+
readonly swipeVersion: number;
|
|
618
1397
|
readonly payload: A;
|
|
619
1398
|
}, handlers: EntryHandlers) => Html;
|
|
620
1399
|
ariaLabel?: string;
|