@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.
Files changed (113) hide show
  1. package/dist/anchor/anchor.d.ts +33 -7
  2. package/dist/anchor/anchor.d.ts.map +1 -1
  3. package/dist/anchor/anchor.js +102 -15
  4. package/dist/anchor/public.d.ts +1 -1
  5. package/dist/anchor/public.d.ts.map +1 -1
  6. package/dist/anchor/public.js +1 -1
  7. package/dist/animation/index.d.ts +3 -0
  8. package/dist/animation/index.d.ts.map +1 -1
  9. package/dist/animation/schema.d.ts +13 -4
  10. package/dist/animation/schema.d.ts.map +1 -1
  11. package/dist/animation/schema.js +8 -4
  12. package/dist/animation/update.d.ts +15 -5
  13. package/dist/animation/update.d.ts.map +1 -1
  14. package/dist/animation/update.js +59 -27
  15. package/dist/calendar/index.d.ts.map +1 -1
  16. package/dist/calendar/index.js +27 -19
  17. package/dist/checkbox/index.d.ts +1 -1
  18. package/dist/checkbox/index.js +1 -1
  19. package/dist/combobox/multi.d.ts +5 -0
  20. package/dist/combobox/multi.d.ts.map +1 -1
  21. package/dist/combobox/multi.js +2 -2
  22. package/dist/combobox/shared.d.ts +19 -7
  23. package/dist/combobox/shared.d.ts.map +1 -1
  24. package/dist/combobox/shared.js +28 -28
  25. package/dist/combobox/single.d.ts +5 -0
  26. package/dist/combobox/single.d.ts.map +1 -1
  27. package/dist/combobox/single.js +4 -4
  28. package/dist/datePicker/index.d.ts +13 -2
  29. package/dist/datePicker/index.d.ts.map +1 -1
  30. package/dist/datePicker/index.js +10 -10
  31. package/dist/dialog/index.d.ts +13 -2
  32. package/dist/dialog/index.d.ts.map +1 -1
  33. package/dist/dialog/index.js +28 -14
  34. package/dist/disclosure/index.d.ts +2 -2
  35. package/dist/disclosure/index.js +1 -1
  36. package/dist/dragAndDrop/index.js +14 -14
  37. package/dist/fileDrop/index.d.ts.map +1 -1
  38. package/dist/fileDrop/index.js +7 -5
  39. package/dist/hoverIntent/hoverIntent.d.ts.map +1 -1
  40. package/dist/hoverIntent/hoverIntent.js +16 -16
  41. package/dist/index.d.ts +2 -0
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +2 -0
  44. package/dist/internal/accessibleName.d.ts +9 -0
  45. package/dist/internal/accessibleName.d.ts.map +1 -0
  46. package/dist/internal/accessibleName.js +12 -0
  47. package/dist/internal/range.d.ts +7 -0
  48. package/dist/internal/range.d.ts.map +1 -0
  49. package/dist/internal/range.js +12 -0
  50. package/dist/listbox/multi.d.ts +5 -0
  51. package/dist/listbox/multi.d.ts.map +1 -1
  52. package/dist/listbox/shared.d.ts +15 -4
  53. package/dist/listbox/shared.d.ts.map +1 -1
  54. package/dist/listbox/shared.js +32 -29
  55. package/dist/listbox/single.d.ts +5 -0
  56. package/dist/listbox/single.d.ts.map +1 -1
  57. package/dist/menu/index.d.ts +16 -4
  58. package/dist/menu/index.d.ts.map +1 -1
  59. package/dist/menu/index.js +35 -28
  60. package/dist/meter/index.d.ts +26 -0
  61. package/dist/meter/index.d.ts.map +1 -0
  62. package/dist/meter/index.js +67 -0
  63. package/dist/meter/public.d.ts +3 -0
  64. package/dist/meter/public.d.ts.map +1 -0
  65. package/dist/meter/public.js +1 -0
  66. package/dist/popover/index.d.ts +20 -4
  67. package/dist/popover/index.d.ts.map +1 -1
  68. package/dist/popover/index.js +20 -18
  69. package/dist/progress/index.d.ts +24 -0
  70. package/dist/progress/index.d.ts.map +1 -0
  71. package/dist/progress/index.js +85 -0
  72. package/dist/progress/public.d.ts +3 -0
  73. package/dist/progress/public.d.ts.map +1 -0
  74. package/dist/progress/public.js +1 -0
  75. package/dist/radioGroup/index.d.ts.map +1 -1
  76. package/dist/radioGroup/index.js +5 -3
  77. package/dist/slider/index.d.ts +61 -28
  78. package/dist/slider/index.d.ts.map +1 -1
  79. package/dist/slider/index.js +163 -87
  80. package/dist/slider/public.d.ts +1 -1
  81. package/dist/slider/public.d.ts.map +1 -1
  82. package/dist/slider/public.js +1 -1
  83. package/dist/switch/index.d.ts +1 -1
  84. package/dist/switch/index.js +1 -1
  85. package/dist/tabs/index.d.ts.map +1 -1
  86. package/dist/tabs/index.js +5 -3
  87. package/dist/test/apps/disabledButton.d.ts +12 -4
  88. package/dist/test/apps/disabledButton.d.ts.map +1 -1
  89. package/dist/test/apps/disabledButton.js +3 -3
  90. package/dist/toast/index.d.ts +869 -45
  91. package/dist/toast/index.d.ts.map +1 -1
  92. package/dist/toast/index.js +77 -17
  93. package/dist/toast/public.d.ts +2 -2
  94. package/dist/toast/public.d.ts.map +1 -1
  95. package/dist/toast/public.js +1 -1
  96. package/dist/toast/schema.d.ts +160 -6
  97. package/dist/toast/schema.d.ts.map +1 -1
  98. package/dist/toast/schema.js +69 -2
  99. package/dist/toast/swipeTarget.d.ts +5 -0
  100. package/dist/toast/swipeTarget.d.ts.map +1 -0
  101. package/dist/toast/swipeTarget.js +18 -0
  102. package/dist/toast/test.d.ts +7 -1
  103. package/dist/toast/test.d.ts.map +1 -1
  104. package/dist/toast/test.js +37 -3
  105. package/dist/toast/update.d.ts +768 -7
  106. package/dist/toast/update.d.ts.map +1 -1
  107. package/dist/toast/update.js +283 -68
  108. package/dist/tooltip/tooltip.d.ts +7 -7
  109. package/dist/tooltip/tooltip.d.ts.map +1 -1
  110. package/dist/tooltip/tooltip.js +14 -12
  111. package/dist/virtualList/index.d.ts.map +1 -1
  112. package/dist/virtualList/index.js +8 -6
  113. package/package.json +9 -9
@@ -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 { Message, Position, Variant } from './schema.js';
4
- import { WaitBeforeDismissal } from './update.js';
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, WaitBeforeDismissal };
9
- /** Handlers passed to `entryToView`. Spread `dismiss` onto a close
10
- * button's attribute array (typically inside `h.button([...dismiss])`)
11
- * to let users dismiss the entry manually. The attribute carries the
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 itself owns only lifecycle and a11y fields (id, variant,
25
- * animation, dismiss timer, hover state).
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 (`Variant`, `Position`, static message tags,
31
- * `WaitBeforeDismissal`) are
32
- * payload-independent and safe to reference when you need them without a
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
@@ -52,10 +48,27 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
52
48
  readonly id: Schema.String;
53
49
  readonly isShowing: Schema.Boolean;
54
50
  readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
51
+ readonly transitionGeneration: Schema.Number;
55
52
  }>;
56
53
  readonly maybeDuration: Schema.Option<Schema.DurationFromMillis>;
57
54
  readonly pendingDismissVersion: Schema.Number;
58
55
  readonly isHovered: Schema.Boolean;
56
+ readonly swipeState: import("foldkit/schema").TaggedUnion<{
57
+ readonly Idle: {};
58
+ readonly Dragging: {
59
+ pointerId: Schema.Number;
60
+ startX: Schema.Number;
61
+ currentX: Schema.Number;
62
+ };
63
+ readonly Settling: {
64
+ offsetX: Schema.Number;
65
+ };
66
+ readonly Dismissing: {
67
+ offsetX: Schema.Number;
68
+ direction: Schema.Literals<readonly ["Left", "Right"]>;
69
+ };
70
+ }>;
71
+ readonly swipeVersion: Schema.Number;
59
72
  readonly payload: Schema.Codec<A, I, never, never>;
60
73
  }>;
61
74
  readonly Model: Schema.Struct<{
@@ -68,13 +81,34 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
68
81
  readonly id: Schema.String;
69
82
  readonly isShowing: Schema.Boolean;
70
83
  readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
84
+ readonly transitionGeneration: Schema.Number;
71
85
  }>;
72
86
  readonly maybeDuration: Schema.Option<Schema.DurationFromMillis>;
73
87
  readonly pendingDismissVersion: Schema.Number;
74
88
  readonly isHovered: Schema.Boolean;
89
+ readonly swipeState: import("foldkit/schema").TaggedUnion<{
90
+ readonly Idle: {};
91
+ readonly Dragging: {
92
+ pointerId: Schema.Number;
93
+ startX: Schema.Number;
94
+ currentX: Schema.Number;
95
+ };
96
+ readonly Settling: {
97
+ offsetX: Schema.Number;
98
+ };
99
+ readonly Dismissing: {
100
+ offsetX: Schema.Number;
101
+ direction: Schema.Literals<readonly ["Left", "Right"]>;
102
+ };
103
+ }>;
104
+ readonly swipeVersion: Schema.Number;
75
105
  readonly payload: Schema.Codec<A, I, never, never>;
76
106
  }>>;
77
107
  readonly nextEntryKey: Schema.Number;
108
+ readonly maybeSwipeConfig: Schema.Option<Schema.Struct<{
109
+ readonly direction: Schema.Literals<readonly ["Left", "Right"]>;
110
+ readonly threshold: Schema.Number;
111
+ }>>;
78
112
  }>;
79
113
  readonly Message: import("foldkit/message").MessageUnion<{
80
114
  readonly Added: {
@@ -85,10 +119,27 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
85
119
  readonly id: Schema.String;
86
120
  readonly isShowing: Schema.Boolean;
87
121
  readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
122
+ readonly transitionGeneration: Schema.Number;
88
123
  }>;
89
124
  readonly maybeDuration: Schema.Option<Schema.DurationFromMillis>;
90
125
  readonly pendingDismissVersion: Schema.Number;
91
126
  readonly isHovered: Schema.Boolean;
127
+ readonly swipeState: import("foldkit/schema").TaggedUnion<{
128
+ readonly Idle: {};
129
+ readonly Dragging: {
130
+ pointerId: Schema.Number;
131
+ startX: Schema.Number;
132
+ currentX: Schema.Number;
133
+ };
134
+ readonly Settling: {
135
+ offsetX: Schema.Number;
136
+ };
137
+ readonly Dismissing: {
138
+ offsetX: Schema.Number;
139
+ direction: Schema.Literals<readonly ["Left", "Right"]>;
140
+ };
141
+ }>;
142
+ readonly swipeVersion: Schema.Number;
92
143
  readonly payload: Schema.Codec<A, I, never, never>;
93
144
  }>;
94
145
  };
@@ -111,10 +162,35 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
111
162
  message: import("foldkit/message").MessageUnion<{
112
163
  readonly Showed: {};
113
164
  readonly Hid: {};
114
- readonly CompletedWaitForPaint: {};
115
- readonly EndedAnimation: {};
165
+ readonly CompletedWaitForPaint: {
166
+ generation: Schema.Number;
167
+ };
168
+ readonly EndedAnimation: {
169
+ generation: Schema.Number;
170
+ };
116
171
  }>;
117
172
  };
173
+ readonly PressedEntryPointer: {
174
+ entryId: Schema.String;
175
+ pointerId: Schema.Number;
176
+ clientX: Schema.Number;
177
+ };
178
+ readonly MovedSwipePointer: {
179
+ pointerId: Schema.Number;
180
+ clientX: Schema.Number;
181
+ };
182
+ readonly ReleasedSwipePointer: {
183
+ pointerId: Schema.Number;
184
+ clientX: Schema.Number;
185
+ };
186
+ readonly CancelledSwipe: {
187
+ pointerId: Schema.Number;
188
+ };
189
+ readonly PressedEscape: {};
190
+ readonly CompletedWaitForSwipeSettled: {
191
+ entryId: Schema.String;
192
+ version: Schema.Number;
193
+ };
118
194
  }>;
119
195
  readonly OutMessage: import("foldkit/message").MessageUnion<{
120
196
  readonly DismissedToast: {
@@ -129,10 +205,27 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
129
205
  readonly id: Schema.String;
130
206
  readonly isShowing: Schema.Boolean;
131
207
  readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
208
+ readonly transitionGeneration: Schema.Number;
132
209
  }>;
133
210
  readonly maybeDuration: Schema.Option<Schema.DurationFromMillis>;
134
211
  readonly pendingDismissVersion: Schema.Number;
135
212
  readonly isHovered: Schema.Boolean;
213
+ readonly swipeState: import("foldkit/schema").TaggedUnion<{
214
+ readonly Idle: {};
215
+ readonly Dragging: {
216
+ pointerId: Schema.Number;
217
+ startX: Schema.Number;
218
+ currentX: Schema.Number;
219
+ };
220
+ readonly Settling: {
221
+ offsetX: Schema.Number;
222
+ };
223
+ readonly Dismissing: {
224
+ offsetX: Schema.Number;
225
+ direction: Schema.Literals<readonly ["Left", "Right"]>;
226
+ };
227
+ }>;
228
+ readonly swipeVersion: Schema.Number;
136
229
  readonly payload: Schema.Codec<A, I, never, never>;
137
230
  }>;
138
231
  }>;
@@ -142,6 +235,7 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
142
235
  readonly init: (config: Readonly<{
143
236
  id: string;
144
237
  defaultDuration?: import("effect/Duration").Input;
238
+ swipeToDismiss?: import("./schema.js").SwipeToDismissConfig;
145
239
  }>) => {
146
240
  readonly id: string;
147
241
  readonly defaultDuration: import("effect/Duration").Duration;
@@ -152,13 +246,34 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
152
246
  readonly id: string;
153
247
  readonly isShowing: boolean;
154
248
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
249
+ readonly transitionGeneration: number;
155
250
  };
156
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
251
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
157
252
  readonly pendingDismissVersion: number;
158
253
  readonly isHovered: boolean;
254
+ readonly swipeState: {
255
+ readonly _tag: "Idle";
256
+ } | {
257
+ readonly _tag: "Dismissing";
258
+ readonly offsetX: number;
259
+ readonly direction: "Left" | "Right";
260
+ } | {
261
+ readonly _tag: "Dragging";
262
+ readonly pointerId: number;
263
+ readonly startX: number;
264
+ readonly currentX: number;
265
+ } | {
266
+ readonly _tag: "Settling";
267
+ readonly offsetX: number;
268
+ };
269
+ readonly swipeVersion: number;
159
270
  readonly payload: A;
160
271
  }[];
161
272
  readonly nextEntryKey: number;
273
+ readonly maybeSwipeConfig: Option.Option<{
274
+ readonly direction: "Left" | "Right";
275
+ readonly threshold: number;
276
+ }>;
162
277
  };
163
278
  readonly update: (model: {
164
279
  readonly id: string;
@@ -170,16 +285,35 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
170
285
  readonly id: string;
171
286
  readonly isShowing: boolean;
172
287
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
288
+ readonly transitionGeneration: number;
173
289
  };
174
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
290
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
175
291
  readonly pendingDismissVersion: number;
176
292
  readonly isHovered: boolean;
293
+ readonly swipeState: {
294
+ readonly _tag: "Idle";
295
+ } | {
296
+ readonly _tag: "Dismissing";
297
+ readonly offsetX: number;
298
+ readonly direction: "Left" | "Right";
299
+ } | {
300
+ readonly _tag: "Dragging";
301
+ readonly pointerId: number;
302
+ readonly startX: number;
303
+ readonly currentX: number;
304
+ } | {
305
+ readonly _tag: "Settling";
306
+ readonly offsetX: number;
307
+ };
308
+ readonly swipeVersion: number;
177
309
  readonly payload: A;
178
310
  }[];
179
311
  readonly nextEntryKey: number;
312
+ readonly maybeSwipeConfig: Option.Option<{
313
+ readonly direction: "Left" | "Right";
314
+ readonly threshold: number;
315
+ }>;
180
316
  }, message: {
181
- readonly _tag: "DismissedAll";
182
- } | {
183
317
  readonly _tag: "Added";
184
318
  readonly entry: {
185
319
  readonly id: string;
@@ -188,16 +322,40 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
188
322
  readonly id: string;
189
323
  readonly isShowing: boolean;
190
324
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
325
+ readonly transitionGeneration: number;
191
326
  };
192
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
327
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
193
328
  readonly pendingDismissVersion: number;
194
329
  readonly isHovered: boolean;
330
+ readonly swipeState: {
331
+ readonly _tag: "Idle";
332
+ } | {
333
+ readonly _tag: "Dismissing";
334
+ readonly offsetX: number;
335
+ readonly direction: "Left" | "Right";
336
+ } | {
337
+ readonly _tag: "Dragging";
338
+ readonly pointerId: number;
339
+ readonly startX: number;
340
+ readonly currentX: number;
341
+ } | {
342
+ readonly _tag: "Settling";
343
+ readonly offsetX: number;
344
+ };
345
+ readonly swipeVersion: number;
195
346
  readonly payload: A;
196
347
  };
348
+ } | {
349
+ readonly _tag: "CancelledSwipe";
350
+ readonly pointerId: number;
197
351
  } | {
198
352
  readonly _tag: "CompletedWaitBeforeDismissal";
199
353
  readonly entryId: string;
200
354
  readonly version: number;
355
+ } | {
356
+ readonly _tag: "CompletedWaitForSwipeSettled";
357
+ readonly entryId: string;
358
+ readonly version: number;
201
359
  } | {
202
360
  readonly _tag: "Dismissed";
203
361
  readonly entryId: string;
@@ -206,8 +364,10 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
206
364
  readonly entryId: string;
207
365
  readonly message: {
208
366
  readonly _tag: "CompletedWaitForPaint";
367
+ readonly generation: number;
209
368
  } | {
210
369
  readonly _tag: "EndedAnimation";
370
+ readonly generation: number;
211
371
  } | {
212
372
  readonly _tag: "Hid";
213
373
  } | {
@@ -219,6 +379,23 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
219
379
  } | {
220
380
  readonly _tag: "LeftEntry";
221
381
  readonly entryId: string;
382
+ } | {
383
+ readonly _tag: "MovedSwipePointer";
384
+ readonly pointerId: number;
385
+ readonly clientX: number;
386
+ } | {
387
+ readonly _tag: "PressedEntryPointer";
388
+ readonly entryId: string;
389
+ readonly pointerId: number;
390
+ readonly clientX: number;
391
+ } | {
392
+ readonly _tag: "ReleasedSwipePointer";
393
+ readonly pointerId: number;
394
+ readonly clientX: number;
395
+ } | {
396
+ readonly _tag: "DismissedAll";
397
+ } | {
398
+ readonly _tag: "PressedEscape";
222
399
  }) => Readonly<{
223
400
  model: {
224
401
  readonly id: string;
@@ -230,17 +407,36 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
230
407
  readonly id: string;
231
408
  readonly isShowing: boolean;
232
409
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
410
+ readonly transitionGeneration: number;
233
411
  };
234
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
412
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
235
413
  readonly pendingDismissVersion: number;
236
414
  readonly isHovered: boolean;
415
+ readonly swipeState: {
416
+ readonly _tag: "Idle";
417
+ } | {
418
+ readonly _tag: "Dismissing";
419
+ readonly offsetX: number;
420
+ readonly direction: "Left" | "Right";
421
+ } | {
422
+ readonly _tag: "Dragging";
423
+ readonly pointerId: number;
424
+ readonly startX: number;
425
+ readonly currentX: number;
426
+ } | {
427
+ readonly _tag: "Settling";
428
+ readonly offsetX: number;
429
+ };
430
+ readonly swipeVersion: number;
237
431
  readonly payload: A;
238
432
  }[];
239
433
  readonly nextEntryKey: number;
434
+ readonly maybeSwipeConfig: Option.Option<{
435
+ readonly direction: "Left" | "Right";
436
+ readonly threshold: number;
437
+ }>;
240
438
  };
241
439
  commands?: import("foldkit/update").Commands<{
242
- readonly _tag: "DismissedAll";
243
- } | {
244
440
  readonly _tag: "Added";
245
441
  readonly entry: {
246
442
  readonly id: string;
@@ -249,16 +445,40 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
249
445
  readonly id: string;
250
446
  readonly isShowing: boolean;
251
447
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
448
+ readonly transitionGeneration: number;
252
449
  };
253
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
450
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
254
451
  readonly pendingDismissVersion: number;
255
452
  readonly isHovered: boolean;
453
+ readonly swipeState: {
454
+ readonly _tag: "Idle";
455
+ } | {
456
+ readonly _tag: "Dismissing";
457
+ readonly offsetX: number;
458
+ readonly direction: "Left" | "Right";
459
+ } | {
460
+ readonly _tag: "Dragging";
461
+ readonly pointerId: number;
462
+ readonly startX: number;
463
+ readonly currentX: number;
464
+ } | {
465
+ readonly _tag: "Settling";
466
+ readonly offsetX: number;
467
+ };
468
+ readonly swipeVersion: number;
256
469
  readonly payload: A;
257
470
  };
471
+ } | {
472
+ readonly _tag: "CancelledSwipe";
473
+ readonly pointerId: number;
258
474
  } | {
259
475
  readonly _tag: "CompletedWaitBeforeDismissal";
260
476
  readonly entryId: string;
261
477
  readonly version: number;
478
+ } | {
479
+ readonly _tag: "CompletedWaitForSwipeSettled";
480
+ readonly entryId: string;
481
+ readonly version: number;
262
482
  } | {
263
483
  readonly _tag: "Dismissed";
264
484
  readonly entryId: string;
@@ -267,8 +487,10 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
267
487
  readonly entryId: string;
268
488
  readonly message: {
269
489
  readonly _tag: "CompletedWaitForPaint";
490
+ readonly generation: number;
270
491
  } | {
271
492
  readonly _tag: "EndedAnimation";
493
+ readonly generation: number;
272
494
  } | {
273
495
  readonly _tag: "Hid";
274
496
  } | {
@@ -280,6 +502,23 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
280
502
  } | {
281
503
  readonly _tag: "LeftEntry";
282
504
  readonly entryId: string;
505
+ } | {
506
+ readonly _tag: "MovedSwipePointer";
507
+ readonly pointerId: number;
508
+ readonly clientX: number;
509
+ } | {
510
+ readonly _tag: "PressedEntryPointer";
511
+ readonly entryId: string;
512
+ readonly pointerId: number;
513
+ readonly clientX: number;
514
+ } | {
515
+ readonly _tag: "ReleasedSwipePointer";
516
+ readonly pointerId: number;
517
+ readonly clientX: number;
518
+ } | {
519
+ readonly _tag: "DismissedAll";
520
+ } | {
521
+ readonly _tag: "PressedEscape";
283
522
  }, never>;
284
523
  outMessage?: {
285
524
  readonly _tag: "DismissedToast";
@@ -296,13 +535,34 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
296
535
  readonly id: string;
297
536
  readonly isShowing: boolean;
298
537
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
538
+ readonly transitionGeneration: number;
299
539
  };
300
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
540
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
301
541
  readonly pendingDismissVersion: number;
302
542
  readonly isHovered: boolean;
543
+ readonly swipeState: {
544
+ readonly _tag: "Idle";
545
+ } | {
546
+ readonly _tag: "Dismissing";
547
+ readonly offsetX: number;
548
+ readonly direction: "Left" | "Right";
549
+ } | {
550
+ readonly _tag: "Dragging";
551
+ readonly pointerId: number;
552
+ readonly startX: number;
553
+ readonly currentX: number;
554
+ } | {
555
+ readonly _tag: "Settling";
556
+ readonly offsetX: number;
557
+ };
558
+ readonly swipeVersion: number;
303
559
  readonly payload: A;
304
560
  }[];
305
561
  readonly nextEntryKey: number;
562
+ readonly maybeSwipeConfig: Option.Option<{
563
+ readonly direction: "Left" | "Right";
564
+ readonly threshold: number;
565
+ }>;
306
566
  }, input: Readonly<{
307
567
  payload: A;
308
568
  variant?: Variant;
@@ -319,17 +579,36 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
319
579
  readonly id: string;
320
580
  readonly isShowing: boolean;
321
581
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
582
+ readonly transitionGeneration: number;
322
583
  };
323
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
584
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
324
585
  readonly pendingDismissVersion: number;
325
586
  readonly isHovered: boolean;
587
+ readonly swipeState: {
588
+ readonly _tag: "Idle";
589
+ } | {
590
+ readonly _tag: "Dismissing";
591
+ readonly offsetX: number;
592
+ readonly direction: "Left" | "Right";
593
+ } | {
594
+ readonly _tag: "Dragging";
595
+ readonly pointerId: number;
596
+ readonly startX: number;
597
+ readonly currentX: number;
598
+ } | {
599
+ readonly _tag: "Settling";
600
+ readonly offsetX: number;
601
+ };
602
+ readonly swipeVersion: number;
326
603
  readonly payload: A;
327
604
  }[];
328
605
  readonly nextEntryKey: number;
606
+ readonly maybeSwipeConfig: Option.Option<{
607
+ readonly direction: "Left" | "Right";
608
+ readonly threshold: number;
609
+ }>;
329
610
  };
330
611
  commands?: import("foldkit/update").Commands<{
331
- readonly _tag: "DismissedAll";
332
- } | {
333
612
  readonly _tag: "Added";
334
613
  readonly entry: {
335
614
  readonly id: string;
@@ -338,16 +617,40 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
338
617
  readonly id: string;
339
618
  readonly isShowing: boolean;
340
619
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
620
+ readonly transitionGeneration: number;
341
621
  };
342
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
622
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
343
623
  readonly pendingDismissVersion: number;
344
624
  readonly isHovered: boolean;
625
+ readonly swipeState: {
626
+ readonly _tag: "Idle";
627
+ } | {
628
+ readonly _tag: "Dismissing";
629
+ readonly offsetX: number;
630
+ readonly direction: "Left" | "Right";
631
+ } | {
632
+ readonly _tag: "Dragging";
633
+ readonly pointerId: number;
634
+ readonly startX: number;
635
+ readonly currentX: number;
636
+ } | {
637
+ readonly _tag: "Settling";
638
+ readonly offsetX: number;
639
+ };
640
+ readonly swipeVersion: number;
345
641
  readonly payload: A;
346
642
  };
643
+ } | {
644
+ readonly _tag: "CancelledSwipe";
645
+ readonly pointerId: number;
347
646
  } | {
348
647
  readonly _tag: "CompletedWaitBeforeDismissal";
349
648
  readonly entryId: string;
350
649
  readonly version: number;
650
+ } | {
651
+ readonly _tag: "CompletedWaitForSwipeSettled";
652
+ readonly entryId: string;
653
+ readonly version: number;
351
654
  } | {
352
655
  readonly _tag: "Dismissed";
353
656
  readonly entryId: string;
@@ -356,8 +659,10 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
356
659
  readonly entryId: string;
357
660
  readonly message: {
358
661
  readonly _tag: "CompletedWaitForPaint";
662
+ readonly generation: number;
359
663
  } | {
360
664
  readonly _tag: "EndedAnimation";
665
+ readonly generation: number;
361
666
  } | {
362
667
  readonly _tag: "Hid";
363
668
  } | {
@@ -369,6 +674,23 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
369
674
  } | {
370
675
  readonly _tag: "LeftEntry";
371
676
  readonly entryId: string;
677
+ } | {
678
+ readonly _tag: "MovedSwipePointer";
679
+ readonly pointerId: number;
680
+ readonly clientX: number;
681
+ } | {
682
+ readonly _tag: "PressedEntryPointer";
683
+ readonly entryId: string;
684
+ readonly pointerId: number;
685
+ readonly clientX: number;
686
+ } | {
687
+ readonly _tag: "ReleasedSwipePointer";
688
+ readonly pointerId: number;
689
+ readonly clientX: number;
690
+ } | {
691
+ readonly _tag: "DismissedAll";
692
+ } | {
693
+ readonly _tag: "PressedEscape";
372
694
  }, never>;
373
695
  outMessage?: {
374
696
  readonly _tag: "DismissedToast";
@@ -385,13 +707,34 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
385
707
  readonly id: string;
386
708
  readonly isShowing: boolean;
387
709
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
710
+ readonly transitionGeneration: number;
388
711
  };
389
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
712
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
390
713
  readonly pendingDismissVersion: number;
391
714
  readonly isHovered: boolean;
715
+ readonly swipeState: {
716
+ readonly _tag: "Idle";
717
+ } | {
718
+ readonly _tag: "Dismissing";
719
+ readonly offsetX: number;
720
+ readonly direction: "Left" | "Right";
721
+ } | {
722
+ readonly _tag: "Dragging";
723
+ readonly pointerId: number;
724
+ readonly startX: number;
725
+ readonly currentX: number;
726
+ } | {
727
+ readonly _tag: "Settling";
728
+ readonly offsetX: number;
729
+ };
730
+ readonly swipeVersion: number;
392
731
  readonly payload: A;
393
732
  }[];
394
733
  readonly nextEntryKey: number;
734
+ readonly maybeSwipeConfig: Option.Option<{
735
+ readonly direction: "Left" | "Right";
736
+ readonly threshold: number;
737
+ }>;
395
738
  }, entryId: string) => Readonly<{
396
739
  model: {
397
740
  readonly id: string;
@@ -403,17 +746,36 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
403
746
  readonly id: string;
404
747
  readonly isShowing: boolean;
405
748
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
749
+ readonly transitionGeneration: number;
406
750
  };
407
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
751
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
408
752
  readonly pendingDismissVersion: number;
409
753
  readonly isHovered: boolean;
754
+ readonly swipeState: {
755
+ readonly _tag: "Idle";
756
+ } | {
757
+ readonly _tag: "Dismissing";
758
+ readonly offsetX: number;
759
+ readonly direction: "Left" | "Right";
760
+ } | {
761
+ readonly _tag: "Dragging";
762
+ readonly pointerId: number;
763
+ readonly startX: number;
764
+ readonly currentX: number;
765
+ } | {
766
+ readonly _tag: "Settling";
767
+ readonly offsetX: number;
768
+ };
769
+ readonly swipeVersion: number;
410
770
  readonly payload: A;
411
771
  }[];
412
772
  readonly nextEntryKey: number;
773
+ readonly maybeSwipeConfig: Option.Option<{
774
+ readonly direction: "Left" | "Right";
775
+ readonly threshold: number;
776
+ }>;
413
777
  };
414
778
  commands?: import("foldkit/update").Commands<{
415
- readonly _tag: "DismissedAll";
416
- } | {
417
779
  readonly _tag: "Added";
418
780
  readonly entry: {
419
781
  readonly id: string;
@@ -422,16 +784,40 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
422
784
  readonly id: string;
423
785
  readonly isShowing: boolean;
424
786
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
787
+ readonly transitionGeneration: number;
425
788
  };
426
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
789
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
427
790
  readonly pendingDismissVersion: number;
428
791
  readonly isHovered: boolean;
792
+ readonly swipeState: {
793
+ readonly _tag: "Idle";
794
+ } | {
795
+ readonly _tag: "Dismissing";
796
+ readonly offsetX: number;
797
+ readonly direction: "Left" | "Right";
798
+ } | {
799
+ readonly _tag: "Dragging";
800
+ readonly pointerId: number;
801
+ readonly startX: number;
802
+ readonly currentX: number;
803
+ } | {
804
+ readonly _tag: "Settling";
805
+ readonly offsetX: number;
806
+ };
807
+ readonly swipeVersion: number;
429
808
  readonly payload: A;
430
809
  };
810
+ } | {
811
+ readonly _tag: "CancelledSwipe";
812
+ readonly pointerId: number;
431
813
  } | {
432
814
  readonly _tag: "CompletedWaitBeforeDismissal";
433
815
  readonly entryId: string;
434
816
  readonly version: number;
817
+ } | {
818
+ readonly _tag: "CompletedWaitForSwipeSettled";
819
+ readonly entryId: string;
820
+ readonly version: number;
435
821
  } | {
436
822
  readonly _tag: "Dismissed";
437
823
  readonly entryId: string;
@@ -440,8 +826,10 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
440
826
  readonly entryId: string;
441
827
  readonly message: {
442
828
  readonly _tag: "CompletedWaitForPaint";
829
+ readonly generation: number;
443
830
  } | {
444
831
  readonly _tag: "EndedAnimation";
832
+ readonly generation: number;
445
833
  } | {
446
834
  readonly _tag: "Hid";
447
835
  } | {
@@ -453,6 +841,23 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
453
841
  } | {
454
842
  readonly _tag: "LeftEntry";
455
843
  readonly entryId: string;
844
+ } | {
845
+ readonly _tag: "MovedSwipePointer";
846
+ readonly pointerId: number;
847
+ readonly clientX: number;
848
+ } | {
849
+ readonly _tag: "PressedEntryPointer";
850
+ readonly entryId: string;
851
+ readonly pointerId: number;
852
+ readonly clientX: number;
853
+ } | {
854
+ readonly _tag: "ReleasedSwipePointer";
855
+ readonly pointerId: number;
856
+ readonly clientX: number;
857
+ } | {
858
+ readonly _tag: "DismissedAll";
859
+ } | {
860
+ readonly _tag: "PressedEscape";
456
861
  }, never>;
457
862
  outMessage?: {
458
863
  readonly _tag: "DismissedToast";
@@ -469,13 +874,34 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
469
874
  readonly id: string;
470
875
  readonly isShowing: boolean;
471
876
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
877
+ readonly transitionGeneration: number;
472
878
  };
473
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
879
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
474
880
  readonly pendingDismissVersion: number;
475
881
  readonly isHovered: boolean;
882
+ readonly swipeState: {
883
+ readonly _tag: "Idle";
884
+ } | {
885
+ readonly _tag: "Dismissing";
886
+ readonly offsetX: number;
887
+ readonly direction: "Left" | "Right";
888
+ } | {
889
+ readonly _tag: "Dragging";
890
+ readonly pointerId: number;
891
+ readonly startX: number;
892
+ readonly currentX: number;
893
+ } | {
894
+ readonly _tag: "Settling";
895
+ readonly offsetX: number;
896
+ };
897
+ readonly swipeVersion: number;
476
898
  readonly payload: A;
477
899
  }[];
478
900
  readonly nextEntryKey: number;
901
+ readonly maybeSwipeConfig: Option.Option<{
902
+ readonly direction: "Left" | "Right";
903
+ readonly threshold: number;
904
+ }>;
479
905
  }) => Readonly<{
480
906
  model: {
481
907
  readonly id: string;
@@ -487,17 +913,36 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
487
913
  readonly id: string;
488
914
  readonly isShowing: boolean;
489
915
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
916
+ readonly transitionGeneration: number;
490
917
  };
491
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
918
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
492
919
  readonly pendingDismissVersion: number;
493
920
  readonly isHovered: boolean;
921
+ readonly swipeState: {
922
+ readonly _tag: "Idle";
923
+ } | {
924
+ readonly _tag: "Dismissing";
925
+ readonly offsetX: number;
926
+ readonly direction: "Left" | "Right";
927
+ } | {
928
+ readonly _tag: "Dragging";
929
+ readonly pointerId: number;
930
+ readonly startX: number;
931
+ readonly currentX: number;
932
+ } | {
933
+ readonly _tag: "Settling";
934
+ readonly offsetX: number;
935
+ };
936
+ readonly swipeVersion: number;
494
937
  readonly payload: A;
495
938
  }[];
496
939
  readonly nextEntryKey: number;
940
+ readonly maybeSwipeConfig: Option.Option<{
941
+ readonly direction: "Left" | "Right";
942
+ readonly threshold: number;
943
+ }>;
497
944
  };
498
945
  commands?: import("foldkit/update").Commands<{
499
- readonly _tag: "DismissedAll";
500
- } | {
501
946
  readonly _tag: "Added";
502
947
  readonly entry: {
503
948
  readonly id: string;
@@ -506,16 +951,40 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
506
951
  readonly id: string;
507
952
  readonly isShowing: boolean;
508
953
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
954
+ readonly transitionGeneration: number;
509
955
  };
510
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
956
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
511
957
  readonly pendingDismissVersion: number;
512
958
  readonly isHovered: boolean;
959
+ readonly swipeState: {
960
+ readonly _tag: "Idle";
961
+ } | {
962
+ readonly _tag: "Dismissing";
963
+ readonly offsetX: number;
964
+ readonly direction: "Left" | "Right";
965
+ } | {
966
+ readonly _tag: "Dragging";
967
+ readonly pointerId: number;
968
+ readonly startX: number;
969
+ readonly currentX: number;
970
+ } | {
971
+ readonly _tag: "Settling";
972
+ readonly offsetX: number;
973
+ };
974
+ readonly swipeVersion: number;
513
975
  readonly payload: A;
514
976
  };
977
+ } | {
978
+ readonly _tag: "CancelledSwipe";
979
+ readonly pointerId: number;
515
980
  } | {
516
981
  readonly _tag: "CompletedWaitBeforeDismissal";
517
982
  readonly entryId: string;
518
983
  readonly version: number;
984
+ } | {
985
+ readonly _tag: "CompletedWaitForSwipeSettled";
986
+ readonly entryId: string;
987
+ readonly version: number;
519
988
  } | {
520
989
  readonly _tag: "Dismissed";
521
990
  readonly entryId: string;
@@ -524,8 +993,10 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
524
993
  readonly entryId: string;
525
994
  readonly message: {
526
995
  readonly _tag: "CompletedWaitForPaint";
996
+ readonly generation: number;
527
997
  } | {
528
998
  readonly _tag: "EndedAnimation";
999
+ readonly generation: number;
529
1000
  } | {
530
1001
  readonly _tag: "Hid";
531
1002
  } | {
@@ -537,12 +1008,286 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
537
1008
  } | {
538
1009
  readonly _tag: "LeftEntry";
539
1010
  readonly entryId: string;
1011
+ } | {
1012
+ readonly _tag: "MovedSwipePointer";
1013
+ readonly pointerId: number;
1014
+ readonly clientX: number;
1015
+ } | {
1016
+ readonly _tag: "PressedEntryPointer";
1017
+ readonly entryId: string;
1018
+ readonly pointerId: number;
1019
+ readonly clientX: number;
1020
+ } | {
1021
+ readonly _tag: "ReleasedSwipePointer";
1022
+ readonly pointerId: number;
1023
+ readonly clientX: number;
1024
+ } | {
1025
+ readonly _tag: "DismissedAll";
1026
+ } | {
1027
+ readonly _tag: "PressedEscape";
540
1028
  }, never>;
541
1029
  outMessage?: {
542
1030
  readonly _tag: "DismissedToast";
543
1031
  readonly payload: A;
544
1032
  };
545
1033
  }>;
1034
+ readonly subscriptions: {
1035
+ readonly swipePointer: import("foldkit/subscription").EntryWithoutKeepAlive<{
1036
+ readonly id: string;
1037
+ readonly defaultDuration: import("effect/Duration").Duration;
1038
+ readonly entries: readonly {
1039
+ readonly id: string;
1040
+ readonly variant: "Error" | "Info" | "Success" | "Warning";
1041
+ readonly animation: {
1042
+ readonly id: string;
1043
+ readonly isShowing: boolean;
1044
+ readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
1045
+ readonly transitionGeneration: number;
1046
+ };
1047
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
1048
+ readonly pendingDismissVersion: number;
1049
+ readonly isHovered: boolean;
1050
+ readonly swipeState: {
1051
+ readonly _tag: "Idle";
1052
+ } | {
1053
+ readonly _tag: "Dismissing";
1054
+ readonly offsetX: number;
1055
+ readonly direction: "Left" | "Right";
1056
+ } | {
1057
+ readonly _tag: "Dragging";
1058
+ readonly pointerId: number;
1059
+ readonly startX: number;
1060
+ readonly currentX: number;
1061
+ } | {
1062
+ readonly _tag: "Settling";
1063
+ readonly offsetX: number;
1064
+ };
1065
+ readonly swipeVersion: number;
1066
+ readonly payload: A;
1067
+ }[];
1068
+ readonly nextEntryKey: number;
1069
+ readonly maybeSwipeConfig: Option.Option<{
1070
+ readonly direction: "Left" | "Right";
1071
+ readonly threshold: number;
1072
+ }>;
1073
+ }, {
1074
+ readonly _tag: "Added";
1075
+ readonly entry: {
1076
+ readonly id: string;
1077
+ readonly variant: "Error" | "Info" | "Success" | "Warning";
1078
+ readonly animation: {
1079
+ readonly id: string;
1080
+ readonly isShowing: boolean;
1081
+ readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
1082
+ readonly transitionGeneration: number;
1083
+ };
1084
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
1085
+ readonly pendingDismissVersion: number;
1086
+ readonly isHovered: boolean;
1087
+ readonly swipeState: {
1088
+ readonly _tag: "Idle";
1089
+ } | {
1090
+ readonly _tag: "Dismissing";
1091
+ readonly offsetX: number;
1092
+ readonly direction: "Left" | "Right";
1093
+ } | {
1094
+ readonly _tag: "Dragging";
1095
+ readonly pointerId: number;
1096
+ readonly startX: number;
1097
+ readonly currentX: number;
1098
+ } | {
1099
+ readonly _tag: "Settling";
1100
+ readonly offsetX: number;
1101
+ };
1102
+ readonly swipeVersion: number;
1103
+ readonly payload: A;
1104
+ };
1105
+ } | {
1106
+ readonly _tag: "CancelledSwipe";
1107
+ readonly pointerId: number;
1108
+ } | {
1109
+ readonly _tag: "CompletedWaitBeforeDismissal";
1110
+ readonly entryId: string;
1111
+ readonly version: number;
1112
+ } | {
1113
+ readonly _tag: "CompletedWaitForSwipeSettled";
1114
+ readonly entryId: string;
1115
+ readonly version: number;
1116
+ } | {
1117
+ readonly _tag: "Dismissed";
1118
+ readonly entryId: string;
1119
+ } | {
1120
+ readonly _tag: "GotAnimationMessage";
1121
+ readonly entryId: string;
1122
+ readonly message: {
1123
+ readonly _tag: "CompletedWaitForPaint";
1124
+ readonly generation: number;
1125
+ } | {
1126
+ readonly _tag: "EndedAnimation";
1127
+ readonly generation: number;
1128
+ } | {
1129
+ readonly _tag: "Hid";
1130
+ } | {
1131
+ readonly _tag: "Showed";
1132
+ };
1133
+ } | {
1134
+ readonly _tag: "HoveredEntry";
1135
+ readonly entryId: string;
1136
+ } | {
1137
+ readonly _tag: "LeftEntry";
1138
+ readonly entryId: string;
1139
+ } | {
1140
+ readonly _tag: "MovedSwipePointer";
1141
+ readonly pointerId: number;
1142
+ readonly clientX: number;
1143
+ } | {
1144
+ readonly _tag: "PressedEntryPointer";
1145
+ readonly entryId: string;
1146
+ readonly pointerId: number;
1147
+ readonly clientX: number;
1148
+ } | {
1149
+ readonly _tag: "ReleasedSwipePointer";
1150
+ readonly pointerId: number;
1151
+ readonly clientX: number;
1152
+ } | {
1153
+ readonly _tag: "DismissedAll";
1154
+ } | {
1155
+ readonly _tag: "PressedEscape";
1156
+ }, {
1157
+ readonly isSwipeEnabled: boolean;
1158
+ readonly isAnyDragging: boolean;
1159
+ }, never> & {
1160
+ readonly __subscription: never;
1161
+ };
1162
+ readonly swipeEscape: import("foldkit/subscription").EntryWithoutKeepAlive<{
1163
+ readonly id: string;
1164
+ readonly defaultDuration: import("effect/Duration").Duration;
1165
+ readonly entries: readonly {
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
+ readonly transitionGeneration: number;
1173
+ };
1174
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
1175
+ readonly pendingDismissVersion: number;
1176
+ readonly isHovered: boolean;
1177
+ readonly swipeState: {
1178
+ readonly _tag: "Idle";
1179
+ } | {
1180
+ readonly _tag: "Dismissing";
1181
+ readonly offsetX: number;
1182
+ readonly direction: "Left" | "Right";
1183
+ } | {
1184
+ readonly _tag: "Dragging";
1185
+ readonly pointerId: number;
1186
+ readonly startX: number;
1187
+ readonly currentX: number;
1188
+ } | {
1189
+ readonly _tag: "Settling";
1190
+ readonly offsetX: number;
1191
+ };
1192
+ readonly swipeVersion: number;
1193
+ readonly payload: A;
1194
+ }[];
1195
+ readonly nextEntryKey: number;
1196
+ readonly maybeSwipeConfig: Option.Option<{
1197
+ readonly direction: "Left" | "Right";
1198
+ readonly threshold: number;
1199
+ }>;
1200
+ }, {
1201
+ readonly _tag: "Added";
1202
+ readonly entry: {
1203
+ readonly id: string;
1204
+ readonly variant: "Error" | "Info" | "Success" | "Warning";
1205
+ readonly animation: {
1206
+ readonly id: string;
1207
+ readonly isShowing: boolean;
1208
+ readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
1209
+ readonly transitionGeneration: number;
1210
+ };
1211
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
1212
+ readonly pendingDismissVersion: number;
1213
+ readonly isHovered: boolean;
1214
+ readonly swipeState: {
1215
+ readonly _tag: "Idle";
1216
+ } | {
1217
+ readonly _tag: "Dismissing";
1218
+ readonly offsetX: number;
1219
+ readonly direction: "Left" | "Right";
1220
+ } | {
1221
+ readonly _tag: "Dragging";
1222
+ readonly pointerId: number;
1223
+ readonly startX: number;
1224
+ readonly currentX: number;
1225
+ } | {
1226
+ readonly _tag: "Settling";
1227
+ readonly offsetX: number;
1228
+ };
1229
+ readonly swipeVersion: number;
1230
+ readonly payload: A;
1231
+ };
1232
+ } | {
1233
+ readonly _tag: "CancelledSwipe";
1234
+ readonly pointerId: number;
1235
+ } | {
1236
+ readonly _tag: "CompletedWaitBeforeDismissal";
1237
+ readonly entryId: string;
1238
+ readonly version: number;
1239
+ } | {
1240
+ readonly _tag: "CompletedWaitForSwipeSettled";
1241
+ readonly entryId: string;
1242
+ readonly version: number;
1243
+ } | {
1244
+ readonly _tag: "Dismissed";
1245
+ readonly entryId: string;
1246
+ } | {
1247
+ readonly _tag: "GotAnimationMessage";
1248
+ readonly entryId: string;
1249
+ readonly message: {
1250
+ readonly _tag: "CompletedWaitForPaint";
1251
+ readonly generation: number;
1252
+ } | {
1253
+ readonly _tag: "EndedAnimation";
1254
+ readonly generation: number;
1255
+ } | {
1256
+ readonly _tag: "Hid";
1257
+ } | {
1258
+ readonly _tag: "Showed";
1259
+ };
1260
+ } | {
1261
+ readonly _tag: "HoveredEntry";
1262
+ readonly entryId: string;
1263
+ } | {
1264
+ readonly _tag: "LeftEntry";
1265
+ readonly entryId: string;
1266
+ } | {
1267
+ readonly _tag: "MovedSwipePointer";
1268
+ readonly pointerId: number;
1269
+ readonly clientX: number;
1270
+ } | {
1271
+ readonly _tag: "PressedEntryPointer";
1272
+ readonly entryId: string;
1273
+ readonly pointerId: number;
1274
+ readonly clientX: number;
1275
+ } | {
1276
+ readonly _tag: "ReleasedSwipePointer";
1277
+ readonly pointerId: number;
1278
+ readonly clientX: number;
1279
+ } | {
1280
+ readonly _tag: "DismissedAll";
1281
+ } | {
1282
+ readonly _tag: "PressedEscape";
1283
+ }, {
1284
+ readonly isSwipeEnabled: boolean;
1285
+ readonly isAnyDragging: boolean;
1286
+ }, never> & {
1287
+ readonly __subscription: never;
1288
+ };
1289
+ };
1290
+ readonly swipeOffset: typeof import("./update.js").swipeOffset;
546
1291
  readonly view: import("foldkit/submodel").View<{
547
1292
  readonly id: string;
548
1293
  readonly defaultDuration: import("effect/Duration").Duration;
@@ -553,13 +1298,34 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
553
1298
  readonly id: string;
554
1299
  readonly isShowing: boolean;
555
1300
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
1301
+ readonly transitionGeneration: number;
556
1302
  };
557
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
1303
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
558
1304
  readonly pendingDismissVersion: number;
559
1305
  readonly isHovered: boolean;
1306
+ readonly swipeState: {
1307
+ readonly _tag: "Idle";
1308
+ } | {
1309
+ readonly _tag: "Dismissing";
1310
+ readonly offsetX: number;
1311
+ readonly direction: "Left" | "Right";
1312
+ } | {
1313
+ readonly _tag: "Dragging";
1314
+ readonly pointerId: number;
1315
+ readonly startX: number;
1316
+ readonly currentX: number;
1317
+ } | {
1318
+ readonly _tag: "Settling";
1319
+ readonly offsetX: number;
1320
+ };
1321
+ readonly swipeVersion: number;
560
1322
  readonly payload: A;
561
1323
  }[];
562
1324
  readonly nextEntryKey: number;
1325
+ readonly maybeSwipeConfig: Option.Option<{
1326
+ readonly direction: "Left" | "Right";
1327
+ readonly threshold: number;
1328
+ }>;
563
1329
  }, {
564
1330
  readonly _tag: "Added";
565
1331
  readonly entry: {
@@ -569,16 +1335,40 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
569
1335
  readonly id: string;
570
1336
  readonly isShowing: boolean;
571
1337
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
1338
+ readonly transitionGeneration: number;
572
1339
  };
573
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
1340
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
574
1341
  readonly pendingDismissVersion: number;
575
1342
  readonly isHovered: boolean;
1343
+ readonly swipeState: {
1344
+ readonly _tag: "Idle";
1345
+ } | {
1346
+ readonly _tag: "Dismissing";
1347
+ readonly offsetX: number;
1348
+ readonly direction: "Left" | "Right";
1349
+ } | {
1350
+ readonly _tag: "Dragging";
1351
+ readonly pointerId: number;
1352
+ readonly startX: number;
1353
+ readonly currentX: number;
1354
+ } | {
1355
+ readonly _tag: "Settling";
1356
+ readonly offsetX: number;
1357
+ };
1358
+ readonly swipeVersion: number;
576
1359
  readonly payload: A;
577
1360
  };
1361
+ } | {
1362
+ readonly _tag: "CancelledSwipe";
1363
+ readonly pointerId: number;
578
1364
  } | {
579
1365
  readonly _tag: "CompletedWaitBeforeDismissal";
580
1366
  readonly entryId: string;
581
1367
  readonly version: number;
1368
+ } | {
1369
+ readonly _tag: "CompletedWaitForSwipeSettled";
1370
+ readonly entryId: string;
1371
+ readonly version: number;
582
1372
  } | {
583
1373
  readonly _tag: "Dismissed";
584
1374
  readonly entryId: string;
@@ -589,8 +1379,10 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
589
1379
  readonly entryId: string;
590
1380
  readonly message: {
591
1381
  readonly _tag: "CompletedWaitForPaint";
1382
+ readonly generation: number;
592
1383
  } | {
593
1384
  readonly _tag: "EndedAnimation";
1385
+ readonly generation: number;
594
1386
  } | {
595
1387
  readonly _tag: "Hid";
596
1388
  } | {
@@ -602,6 +1394,21 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
602
1394
  } | {
603
1395
  readonly _tag: "LeftEntry";
604
1396
  readonly entryId: string;
1397
+ } | {
1398
+ readonly _tag: "MovedSwipePointer";
1399
+ readonly pointerId: number;
1400
+ readonly clientX: number;
1401
+ } | {
1402
+ readonly _tag: "PressedEntryPointer";
1403
+ readonly entryId: string;
1404
+ readonly pointerId: number;
1405
+ readonly clientX: number;
1406
+ } | {
1407
+ readonly _tag: "PressedEscape";
1408
+ } | {
1409
+ readonly _tag: "ReleasedSwipePointer";
1410
+ readonly pointerId: number;
1411
+ readonly clientX: number;
605
1412
  }, Readonly<{
606
1413
  position: Position;
607
1414
  entryToView: (entry: {
@@ -611,10 +1418,27 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
611
1418
  readonly id: string;
612
1419
  readonly isShowing: boolean;
613
1420
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
1421
+ readonly transitionGeneration: number;
614
1422
  };
615
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
1423
+ readonly maybeDuration: Option.Option<import("effect/Duration").Duration>;
616
1424
  readonly pendingDismissVersion: number;
617
1425
  readonly isHovered: boolean;
1426
+ readonly swipeState: {
1427
+ readonly _tag: "Idle";
1428
+ } | {
1429
+ readonly _tag: "Dismissing";
1430
+ readonly offsetX: number;
1431
+ readonly direction: "Left" | "Right";
1432
+ } | {
1433
+ readonly _tag: "Dragging";
1434
+ readonly pointerId: number;
1435
+ readonly startX: number;
1436
+ readonly currentX: number;
1437
+ } | {
1438
+ readonly _tag: "Settling";
1439
+ readonly offsetX: number;
1440
+ };
1441
+ readonly swipeVersion: number;
618
1442
  readonly payload: A;
619
1443
  }, handlers: EntryHandlers) => Html;
620
1444
  ariaLabel?: string;