@foldkit/ui 0.116.0 → 0.117.0

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 (39) hide show
  1. package/dist/animation/index.d.ts +13 -13
  2. package/dist/calendar/index.d.ts +80 -80
  3. package/dist/checkbox/index.d.ts +9 -9
  4. package/dist/combobox/multi.d.ts +101 -109
  5. package/dist/combobox/multi.d.ts.map +1 -1
  6. package/dist/combobox/shared.d.ts +81 -89
  7. package/dist/combobox/shared.d.ts.map +1 -1
  8. package/dist/combobox/single.d.ts +103 -111
  9. package/dist/combobox/single.d.ts.map +1 -1
  10. package/dist/datePicker/index.d.ts +107 -161
  11. package/dist/datePicker/index.d.ts.map +1 -1
  12. package/dist/dialog/index.d.ts +22 -30
  13. package/dist/dialog/index.d.ts.map +1 -1
  14. package/dist/disclosure/index.d.ts +10 -10
  15. package/dist/dragAndDrop/index.d.ts +326 -346
  16. package/dist/dragAndDrop/index.d.ts.map +1 -1
  17. package/dist/fileDrop/index.d.ts +13 -13
  18. package/dist/listbox/multi.d.ts +104 -112
  19. package/dist/listbox/multi.d.ts.map +1 -1
  20. package/dist/listbox/shared.d.ts +78 -86
  21. package/dist/listbox/shared.d.ts.map +1 -1
  22. package/dist/listbox/single.d.ts +104 -112
  23. package/dist/listbox/single.d.ts.map +1 -1
  24. package/dist/menu/index.d.ts +15 -15
  25. package/dist/menu/index.d.ts.map +1 -1
  26. package/dist/popover/index.d.ts +61 -69
  27. package/dist/popover/index.d.ts.map +1 -1
  28. package/dist/slider/index.d.ts +139 -154
  29. package/dist/slider/index.d.ts.map +1 -1
  30. package/dist/switch/index.d.ts +9 -9
  31. package/dist/toast/index.d.ts +414 -462
  32. package/dist/toast/index.d.ts.map +1 -1
  33. package/dist/toast/update.d.ts +348 -388
  34. package/dist/toast/update.d.ts.map +1 -1
  35. package/dist/tooltip/index.d.ts +32 -32
  36. package/dist/tooltip/index.d.ts.map +1 -1
  37. package/dist/virtualList/index.d.ts +24 -30
  38. package/dist/virtualList/index.d.ts.map +1 -1
  39. package/package.json +5 -5
@@ -43,80 +43,72 @@ export type EntryHandlers = Readonly<{
43
43
  * ```
44
44
  */
45
45
  export declare const make: <A, I>(payloadSchema: S.Codec<A, I>) => {
46
- readonly view: import("foldkit/submodel").View<{
47
- readonly id: string;
48
- readonly defaultDuration: import("effect/Duration").Duration;
49
- readonly entries: readonly {
50
- readonly id: string;
51
- readonly variant: "Error" | "Info" | "Success" | "Warning";
52
- readonly animation: {
53
- readonly id: string;
54
- readonly isShowing: boolean;
55
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
56
- };
57
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
58
- readonly pendingDismissVersion: number;
59
- readonly isHovered: boolean;
60
- readonly payload: A;
61
- }[];
62
- readonly nextEntryKey: number;
63
- }, {
64
- readonly _tag: "Dismissed";
65
- readonly entryId: string;
66
- } | {
67
- readonly _tag: "DismissedAll";
68
- } | {
69
- readonly _tag: "ElapsedDuration";
70
- readonly entryId: string;
71
- readonly version: number;
72
- } | {
73
- readonly _tag: "HoveredEntry";
74
- readonly entryId: string;
75
- } | {
76
- readonly _tag: "LeftEntry";
77
- readonly entryId: string;
78
- } | {
79
- readonly _tag: "GotAnimationMessage";
80
- readonly entryId: string;
81
- readonly message: {
82
- readonly _tag: "Showed";
83
- } | {
84
- readonly _tag: "Hid";
85
- } | {
86
- readonly _tag: "AdvancedAnimationFrame";
87
- } | {
88
- readonly _tag: "EndedAnimation";
89
- };
90
- } | {
91
- readonly _tag: "Added";
92
- readonly entry: {
93
- readonly id: string;
94
- readonly variant: "Error" | "Info" | "Success" | "Warning";
95
- readonly animation: {
96
- readonly id: string;
97
- readonly isShowing: boolean;
98
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
99
- };
100
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
101
- readonly pendingDismissVersion: number;
102
- readonly isHovered: boolean;
103
- readonly payload: A;
104
- };
105
- }, Readonly<{
46
+ readonly view: import("foldkit/submodel").View<S.Struct.ReadonlySide<{
47
+ readonly id: S.String;
48
+ readonly defaultDuration: S.DurationFromMillis;
49
+ readonly entries: S.$Array<S.Struct<{
50
+ readonly id: S.String;
51
+ readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
52
+ readonly animation: S.Struct<{
53
+ readonly id: S.String;
54
+ readonly isShowing: S.Boolean;
55
+ readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
56
+ }>;
57
+ readonly maybeDuration: S.Option<S.DurationFromMillis>;
58
+ readonly pendingDismissVersion: S.Number;
59
+ readonly isHovered: S.Boolean;
60
+ readonly payload: S.Codec<A, I, never, never>;
61
+ }>>;
62
+ readonly nextEntryKey: S.Number;
63
+ }, "Type">, S.Struct.ReadonlySide<{
64
+ readonly _tag: S.tag<"Dismissed">;
65
+ entryId: S.String;
66
+ }, "Type"> | S.Struct.ReadonlySide<{
67
+ readonly _tag: S.tag<"DismissedAll">;
68
+ }, "Type"> | S.Struct.ReadonlySide<{
69
+ readonly _tag: S.tag<"ElapsedDuration">;
70
+ entryId: S.String;
71
+ version: S.Number;
72
+ }, "Type"> | S.Struct.ReadonlySide<{
73
+ readonly _tag: S.tag<"HoveredEntry">;
74
+ entryId: S.String;
75
+ }, "Type"> | S.Struct.ReadonlySide<{
76
+ readonly _tag: S.tag<"LeftEntry">;
77
+ entryId: S.String;
78
+ }, "Type"> | S.Struct.ReadonlySide<{
79
+ readonly _tag: S.tag<"GotAnimationMessage">;
80
+ entryId: S.String;
81
+ message: S.Union<[import("foldkit/schema").CallableTaggedStruct<"Showed", {}>, import("foldkit/schema").CallableTaggedStruct<"Hid", {}>, import("foldkit/schema").CallableTaggedStruct<"AdvancedAnimationFrame", {}>, import("foldkit/schema").CallableTaggedStruct<"EndedAnimation", {}>]>;
82
+ }, "Type"> | S.Struct.ReadonlySide<{
83
+ readonly _tag: S.tag<"Added">;
84
+ entry: S.Struct<{
85
+ readonly id: S.String;
86
+ readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
87
+ readonly animation: S.Struct<{
88
+ readonly id: S.String;
89
+ readonly isShowing: S.Boolean;
90
+ readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
91
+ }>;
92
+ readonly maybeDuration: S.Option<S.DurationFromMillis>;
93
+ readonly pendingDismissVersion: S.Number;
94
+ readonly isHovered: S.Boolean;
95
+ readonly payload: S.Codec<A, I, never, never>;
96
+ }>;
97
+ }, "Type">, Readonly<{
106
98
  position: Position;
107
- entryToView: (entry: {
108
- readonly id: string;
109
- readonly variant: "Error" | "Info" | "Success" | "Warning";
110
- readonly animation: {
111
- readonly id: string;
112
- readonly isShowing: boolean;
113
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
114
- };
115
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
116
- readonly pendingDismissVersion: number;
117
- readonly isHovered: boolean;
118
- readonly payload: A;
119
- }, handlers: EntryHandlers) => Html;
99
+ entryToView: (entry: S.Struct.ReadonlySide<{
100
+ readonly id: S.String;
101
+ readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
102
+ readonly animation: S.Struct<{
103
+ readonly id: S.String;
104
+ readonly isShowing: S.Boolean;
105
+ readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
106
+ }>;
107
+ readonly maybeDuration: S.Option<S.DurationFromMillis>;
108
+ readonly pendingDismissVersion: S.Number;
109
+ readonly isHovered: S.Boolean;
110
+ readonly payload: S.Codec<A, I, never, never>;
111
+ }, "Type">, handlers: EntryHandlers) => Html;
120
112
  ariaLabel?: string;
121
113
  containerClassName?: string;
122
114
  entryClassName?: string;
@@ -203,406 +195,366 @@ export declare const make: <A, I>(payloadSchema: S.Codec<A, I>) => {
203
195
  readonly init: (config: Readonly<{
204
196
  id: string;
205
197
  defaultDuration?: import("effect/Duration").Input;
206
- }>) => {
207
- readonly id: string;
208
- readonly defaultDuration: import("effect/Duration").Duration;
209
- readonly entries: readonly {
210
- readonly id: string;
211
- readonly variant: "Error" | "Info" | "Success" | "Warning";
212
- readonly animation: {
213
- readonly id: string;
214
- readonly isShowing: boolean;
215
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
216
- };
217
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
218
- readonly pendingDismissVersion: number;
219
- readonly isHovered: boolean;
220
- readonly payload: A;
221
- }[];
222
- readonly nextEntryKey: number;
223
- };
224
- readonly update: (model: {
225
- readonly id: string;
226
- readonly defaultDuration: import("effect/Duration").Duration;
227
- readonly entries: readonly {
228
- readonly id: string;
229
- readonly variant: "Error" | "Info" | "Success" | "Warning";
230
- readonly animation: {
231
- readonly id: string;
232
- readonly isShowing: boolean;
233
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
234
- };
235
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
236
- readonly pendingDismissVersion: number;
237
- readonly isHovered: boolean;
238
- readonly payload: A;
239
- }[];
240
- readonly nextEntryKey: number;
241
- }, message: {
242
- readonly _tag: "Dismissed";
243
- readonly entryId: string;
244
- } | {
245
- readonly _tag: "DismissedAll";
246
- } | {
247
- readonly _tag: "ElapsedDuration";
248
- readonly entryId: string;
249
- readonly version: number;
250
- } | {
251
- readonly _tag: "HoveredEntry";
252
- readonly entryId: string;
253
- } | {
254
- readonly _tag: "LeftEntry";
255
- readonly entryId: string;
256
- } | {
257
- readonly _tag: "GotAnimationMessage";
258
- readonly entryId: string;
259
- readonly message: {
260
- readonly _tag: "Showed";
261
- } | {
262
- readonly _tag: "Hid";
263
- } | {
264
- readonly _tag: "AdvancedAnimationFrame";
265
- } | {
266
- readonly _tag: "EndedAnimation";
267
- };
268
- } | {
269
- readonly _tag: "Added";
270
- readonly entry: {
271
- readonly id: string;
272
- readonly variant: "Error" | "Info" | "Success" | "Warning";
273
- readonly animation: {
274
- readonly id: string;
275
- readonly isShowing: boolean;
276
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
277
- };
278
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
279
- readonly pendingDismissVersion: number;
280
- readonly isHovered: boolean;
281
- readonly payload: A;
282
- };
283
- }) => readonly [{
284
- readonly id: string;
285
- readonly defaultDuration: import("effect/Duration").Duration;
286
- readonly entries: readonly {
287
- readonly id: string;
288
- readonly variant: "Error" | "Info" | "Success" | "Warning";
289
- readonly animation: {
290
- readonly id: string;
291
- readonly isShowing: boolean;
292
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
293
- };
294
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
295
- readonly pendingDismissVersion: number;
296
- readonly isHovered: boolean;
297
- readonly payload: A;
298
- }[];
299
- readonly nextEntryKey: number;
300
- }, readonly Readonly<{
198
+ }>) => S.Struct.ReadonlySide<{
199
+ readonly id: S.String;
200
+ readonly defaultDuration: S.DurationFromMillis;
201
+ readonly entries: S.$Array<S.Struct<{
202
+ readonly id: S.String;
203
+ readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
204
+ readonly animation: S.Struct<{
205
+ readonly id: S.String;
206
+ readonly isShowing: S.Boolean;
207
+ readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
208
+ }>;
209
+ readonly maybeDuration: S.Option<S.DurationFromMillis>;
210
+ readonly pendingDismissVersion: S.Number;
211
+ readonly isHovered: S.Boolean;
212
+ readonly payload: S.Codec<A, I, never, never>;
213
+ }>>;
214
+ readonly nextEntryKey: S.Number;
215
+ }, "Type">;
216
+ readonly update: (model: S.Struct.ReadonlySide<{
217
+ readonly id: S.String;
218
+ readonly defaultDuration: S.DurationFromMillis;
219
+ readonly entries: S.$Array<S.Struct<{
220
+ readonly id: S.String;
221
+ readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
222
+ readonly animation: S.Struct<{
223
+ readonly id: S.String;
224
+ readonly isShowing: S.Boolean;
225
+ readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
226
+ }>;
227
+ readonly maybeDuration: S.Option<S.DurationFromMillis>;
228
+ readonly pendingDismissVersion: S.Number;
229
+ readonly isHovered: S.Boolean;
230
+ readonly payload: S.Codec<A, I, never, never>;
231
+ }>>;
232
+ readonly nextEntryKey: S.Number;
233
+ }, "Type">, message: S.Struct.ReadonlySide<{
234
+ readonly _tag: S.tag<"Dismissed">;
235
+ entryId: S.String;
236
+ }, "Type"> | S.Struct.ReadonlySide<{
237
+ readonly _tag: S.tag<"DismissedAll">;
238
+ }, "Type"> | S.Struct.ReadonlySide<{
239
+ readonly _tag: S.tag<"ElapsedDuration">;
240
+ entryId: S.String;
241
+ version: S.Number;
242
+ }, "Type"> | S.Struct.ReadonlySide<{
243
+ readonly _tag: S.tag<"HoveredEntry">;
244
+ entryId: S.String;
245
+ }, "Type"> | S.Struct.ReadonlySide<{
246
+ readonly _tag: S.tag<"LeftEntry">;
247
+ entryId: S.String;
248
+ }, "Type"> | S.Struct.ReadonlySide<{
249
+ readonly _tag: S.tag<"GotAnimationMessage">;
250
+ entryId: S.String;
251
+ message: S.Union<[import("foldkit/schema").CallableTaggedStruct<"Showed", {}>, import("foldkit/schema").CallableTaggedStruct<"Hid", {}>, import("foldkit/schema").CallableTaggedStruct<"AdvancedAnimationFrame", {}>, import("foldkit/schema").CallableTaggedStruct<"EndedAnimation", {}>]>;
252
+ }, "Type"> | S.Struct.ReadonlySide<{
253
+ readonly _tag: S.tag<"Added">;
254
+ entry: S.Struct<{
255
+ readonly id: S.String;
256
+ readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
257
+ readonly animation: S.Struct<{
258
+ readonly id: S.String;
259
+ readonly isShowing: S.Boolean;
260
+ readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
261
+ }>;
262
+ readonly maybeDuration: S.Option<S.DurationFromMillis>;
263
+ readonly pendingDismissVersion: S.Number;
264
+ readonly isHovered: S.Boolean;
265
+ readonly payload: S.Codec<A, I, never, never>;
266
+ }>;
267
+ }, "Type">) => readonly [S.Struct.ReadonlySide<{
268
+ readonly id: S.String;
269
+ readonly defaultDuration: S.DurationFromMillis;
270
+ readonly entries: S.$Array<S.Struct<{
271
+ readonly id: S.String;
272
+ readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
273
+ readonly animation: S.Struct<{
274
+ readonly id: S.String;
275
+ readonly isShowing: S.Boolean;
276
+ readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
277
+ }>;
278
+ readonly maybeDuration: S.Option<S.DurationFromMillis>;
279
+ readonly pendingDismissVersion: S.Number;
280
+ readonly isHovered: S.Boolean;
281
+ readonly payload: S.Codec<A, I, never, never>;
282
+ }>>;
283
+ readonly nextEntryKey: S.Number;
284
+ }, "Type">, readonly Readonly<{
301
285
  name: string;
302
286
  args?: Record<string, unknown>;
303
- effect: import("effect/Effect").Effect<{
304
- readonly _tag: "Dismissed";
305
- readonly entryId: string;
306
- } | {
307
- readonly _tag: "DismissedAll";
308
- } | {
309
- readonly _tag: "ElapsedDuration";
310
- readonly entryId: string;
311
- readonly version: number;
312
- } | {
313
- readonly _tag: "HoveredEntry";
314
- readonly entryId: string;
315
- } | {
316
- readonly _tag: "LeftEntry";
317
- readonly entryId: string;
318
- } | {
319
- readonly _tag: "GotAnimationMessage";
320
- readonly entryId: string;
321
- readonly message: {
322
- readonly _tag: "Showed";
323
- } | {
324
- readonly _tag: "Hid";
325
- } | {
326
- readonly _tag: "AdvancedAnimationFrame";
327
- } | {
328
- readonly _tag: "EndedAnimation";
329
- };
330
- } | {
331
- readonly _tag: "Added";
332
- readonly entry: {
333
- readonly id: string;
334
- readonly variant: "Error" | "Info" | "Success" | "Warning";
335
- readonly animation: {
336
- readonly id: string;
337
- readonly isShowing: boolean;
338
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
339
- };
340
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
341
- readonly pendingDismissVersion: number;
342
- readonly isHovered: boolean;
343
- readonly payload: A;
344
- };
345
- }, never, never>;
346
- }>[], import("effect/Option").Option<{
347
- readonly _tag: "DismissedToast";
348
- readonly payload: A;
349
- }>];
350
- readonly show: (model: {
351
- readonly id: string;
352
- readonly defaultDuration: import("effect/Duration").Duration;
353
- readonly entries: readonly {
354
- readonly id: string;
355
- readonly variant: "Error" | "Info" | "Success" | "Warning";
356
- readonly animation: {
357
- readonly id: string;
358
- readonly isShowing: boolean;
359
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
360
- };
361
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
362
- readonly pendingDismissVersion: number;
363
- readonly isHovered: boolean;
364
- readonly payload: A;
365
- }[];
366
- readonly nextEntryKey: number;
367
- }, input: Readonly<{
287
+ effect: import("effect/Effect").Effect<S.Struct.ReadonlySide<{
288
+ readonly _tag: S.tag<"Dismissed">;
289
+ entryId: S.String;
290
+ }, "Type"> | S.Struct.ReadonlySide<{
291
+ readonly _tag: S.tag<"DismissedAll">;
292
+ }, "Type"> | S.Struct.ReadonlySide<{
293
+ readonly _tag: S.tag<"ElapsedDuration">;
294
+ entryId: S.String;
295
+ version: S.Number;
296
+ }, "Type"> | S.Struct.ReadonlySide<{
297
+ readonly _tag: S.tag<"HoveredEntry">;
298
+ entryId: S.String;
299
+ }, "Type"> | S.Struct.ReadonlySide<{
300
+ readonly _tag: S.tag<"LeftEntry">;
301
+ entryId: S.String;
302
+ }, "Type"> | S.Struct.ReadonlySide<{
303
+ readonly _tag: S.tag<"GotAnimationMessage">;
304
+ entryId: S.String;
305
+ message: S.Union<[import("foldkit/schema").CallableTaggedStruct<"Showed", {}>, import("foldkit/schema").CallableTaggedStruct<"Hid", {}>, import("foldkit/schema").CallableTaggedStruct<"AdvancedAnimationFrame", {}>, import("foldkit/schema").CallableTaggedStruct<"EndedAnimation", {}>]>;
306
+ }, "Type"> | S.Struct.ReadonlySide<{
307
+ readonly _tag: S.tag<"Added">;
308
+ entry: S.Struct<{
309
+ readonly id: S.String;
310
+ readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
311
+ readonly animation: S.Struct<{
312
+ readonly id: S.String;
313
+ readonly isShowing: S.Boolean;
314
+ readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
315
+ }>;
316
+ readonly maybeDuration: S.Option<S.DurationFromMillis>;
317
+ readonly pendingDismissVersion: S.Number;
318
+ readonly isHovered: S.Boolean;
319
+ readonly payload: S.Codec<A, I, never, never>;
320
+ }>;
321
+ }, "Type">, never, never>;
322
+ }>[], import("effect/Option").Option<S.Struct.ReadonlySide<{
323
+ readonly _tag: S.tag<"DismissedToast">;
324
+ payload: S.Codec<A, I, never, never>;
325
+ }, "Type">>];
326
+ readonly show: (model: S.Struct.ReadonlySide<{
327
+ readonly id: S.String;
328
+ readonly defaultDuration: S.DurationFromMillis;
329
+ readonly entries: S.$Array<S.Struct<{
330
+ readonly id: S.String;
331
+ readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
332
+ readonly animation: S.Struct<{
333
+ readonly id: S.String;
334
+ readonly isShowing: S.Boolean;
335
+ readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
336
+ }>;
337
+ readonly maybeDuration: S.Option<S.DurationFromMillis>;
338
+ readonly pendingDismissVersion: S.Number;
339
+ readonly isHovered: S.Boolean;
340
+ readonly payload: S.Codec<A, I, never, never>;
341
+ }>>;
342
+ readonly nextEntryKey: S.Number;
343
+ }, "Type">, input: Readonly<{
368
344
  payload: A;
369
345
  variant?: Variant;
370
346
  duration?: import("effect/Duration").Input;
371
347
  sticky?: boolean;
372
- }>) => readonly [{
373
- readonly id: string;
374
- readonly defaultDuration: import("effect/Duration").Duration;
375
- readonly entries: readonly {
376
- readonly id: string;
377
- readonly variant: "Error" | "Info" | "Success" | "Warning";
378
- readonly animation: {
379
- readonly id: string;
380
- readonly isShowing: boolean;
381
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
382
- };
383
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
384
- readonly pendingDismissVersion: number;
385
- readonly isHovered: boolean;
386
- readonly payload: A;
387
- }[];
388
- readonly nextEntryKey: number;
389
- }, readonly Readonly<{
348
+ }>) => readonly [S.Struct.ReadonlySide<{
349
+ readonly id: S.String;
350
+ readonly defaultDuration: S.DurationFromMillis;
351
+ readonly entries: S.$Array<S.Struct<{
352
+ readonly id: S.String;
353
+ readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
354
+ readonly animation: S.Struct<{
355
+ readonly id: S.String;
356
+ readonly isShowing: S.Boolean;
357
+ readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
358
+ }>;
359
+ readonly maybeDuration: S.Option<S.DurationFromMillis>;
360
+ readonly pendingDismissVersion: S.Number;
361
+ readonly isHovered: S.Boolean;
362
+ readonly payload: S.Codec<A, I, never, never>;
363
+ }>>;
364
+ readonly nextEntryKey: S.Number;
365
+ }, "Type">, readonly Readonly<{
390
366
  name: string;
391
367
  args?: Record<string, unknown>;
392
- effect: import("effect/Effect").Effect<{
393
- readonly _tag: "Dismissed";
394
- readonly entryId: string;
395
- } | {
396
- readonly _tag: "DismissedAll";
397
- } | {
398
- readonly _tag: "ElapsedDuration";
399
- readonly entryId: string;
400
- readonly version: number;
401
- } | {
402
- readonly _tag: "HoveredEntry";
403
- readonly entryId: string;
404
- } | {
405
- readonly _tag: "LeftEntry";
406
- readonly entryId: string;
407
- } | {
408
- readonly _tag: "GotAnimationMessage";
409
- readonly entryId: string;
410
- readonly message: {
411
- readonly _tag: "Showed";
412
- } | {
413
- readonly _tag: "Hid";
414
- } | {
415
- readonly _tag: "AdvancedAnimationFrame";
416
- } | {
417
- readonly _tag: "EndedAnimation";
418
- };
419
- } | {
420
- readonly _tag: "Added";
421
- readonly entry: {
422
- readonly id: string;
423
- readonly variant: "Error" | "Info" | "Success" | "Warning";
424
- readonly animation: {
425
- readonly id: string;
426
- readonly isShowing: boolean;
427
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
428
- };
429
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
430
- readonly pendingDismissVersion: number;
431
- readonly isHovered: boolean;
432
- readonly payload: A;
433
- };
434
- }, never, never>;
435
- }>[], import("effect/Option").Option<{
436
- readonly _tag: "DismissedToast";
437
- readonly payload: A;
438
- }>];
439
- readonly dismiss: (model: {
440
- readonly id: string;
441
- readonly defaultDuration: import("effect/Duration").Duration;
442
- readonly entries: readonly {
443
- readonly id: string;
444
- readonly variant: "Error" | "Info" | "Success" | "Warning";
445
- readonly animation: {
446
- readonly id: string;
447
- readonly isShowing: boolean;
448
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
449
- };
450
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
451
- readonly pendingDismissVersion: number;
452
- readonly isHovered: boolean;
453
- readonly payload: A;
454
- }[];
455
- readonly nextEntryKey: number;
456
- }, entryId: string) => readonly [{
457
- readonly id: string;
458
- readonly defaultDuration: import("effect/Duration").Duration;
459
- readonly entries: readonly {
460
- readonly id: string;
461
- readonly variant: "Error" | "Info" | "Success" | "Warning";
462
- readonly animation: {
463
- readonly id: string;
464
- readonly isShowing: boolean;
465
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
466
- };
467
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
468
- readonly pendingDismissVersion: number;
469
- readonly isHovered: boolean;
470
- readonly payload: A;
471
- }[];
472
- readonly nextEntryKey: number;
473
- }, readonly Readonly<{
368
+ effect: import("effect/Effect").Effect<S.Struct.ReadonlySide<{
369
+ readonly _tag: S.tag<"Dismissed">;
370
+ entryId: S.String;
371
+ }, "Type"> | S.Struct.ReadonlySide<{
372
+ readonly _tag: S.tag<"DismissedAll">;
373
+ }, "Type"> | S.Struct.ReadonlySide<{
374
+ readonly _tag: S.tag<"ElapsedDuration">;
375
+ entryId: S.String;
376
+ version: S.Number;
377
+ }, "Type"> | S.Struct.ReadonlySide<{
378
+ readonly _tag: S.tag<"HoveredEntry">;
379
+ entryId: S.String;
380
+ }, "Type"> | S.Struct.ReadonlySide<{
381
+ readonly _tag: S.tag<"LeftEntry">;
382
+ entryId: S.String;
383
+ }, "Type"> | S.Struct.ReadonlySide<{
384
+ readonly _tag: S.tag<"GotAnimationMessage">;
385
+ entryId: S.String;
386
+ message: S.Union<[import("foldkit/schema").CallableTaggedStruct<"Showed", {}>, import("foldkit/schema").CallableTaggedStruct<"Hid", {}>, import("foldkit/schema").CallableTaggedStruct<"AdvancedAnimationFrame", {}>, import("foldkit/schema").CallableTaggedStruct<"EndedAnimation", {}>]>;
387
+ }, "Type"> | S.Struct.ReadonlySide<{
388
+ readonly _tag: S.tag<"Added">;
389
+ entry: S.Struct<{
390
+ readonly id: S.String;
391
+ readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
392
+ readonly animation: S.Struct<{
393
+ readonly id: S.String;
394
+ readonly isShowing: S.Boolean;
395
+ readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
396
+ }>;
397
+ readonly maybeDuration: S.Option<S.DurationFromMillis>;
398
+ readonly pendingDismissVersion: S.Number;
399
+ readonly isHovered: S.Boolean;
400
+ readonly payload: S.Codec<A, I, never, never>;
401
+ }>;
402
+ }, "Type">, never, never>;
403
+ }>[], import("effect/Option").Option<S.Struct.ReadonlySide<{
404
+ readonly _tag: S.tag<"DismissedToast">;
405
+ payload: S.Codec<A, I, never, never>;
406
+ }, "Type">>];
407
+ readonly dismiss: (model: S.Struct.ReadonlySide<{
408
+ readonly id: S.String;
409
+ readonly defaultDuration: S.DurationFromMillis;
410
+ readonly entries: S.$Array<S.Struct<{
411
+ readonly id: S.String;
412
+ readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
413
+ readonly animation: S.Struct<{
414
+ readonly id: S.String;
415
+ readonly isShowing: S.Boolean;
416
+ readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
417
+ }>;
418
+ readonly maybeDuration: S.Option<S.DurationFromMillis>;
419
+ readonly pendingDismissVersion: S.Number;
420
+ readonly isHovered: S.Boolean;
421
+ readonly payload: S.Codec<A, I, never, never>;
422
+ }>>;
423
+ readonly nextEntryKey: S.Number;
424
+ }, "Type">, entryId: string) => readonly [S.Struct.ReadonlySide<{
425
+ readonly id: S.String;
426
+ readonly defaultDuration: S.DurationFromMillis;
427
+ readonly entries: S.$Array<S.Struct<{
428
+ readonly id: S.String;
429
+ readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
430
+ readonly animation: S.Struct<{
431
+ readonly id: S.String;
432
+ readonly isShowing: S.Boolean;
433
+ readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
434
+ }>;
435
+ readonly maybeDuration: S.Option<S.DurationFromMillis>;
436
+ readonly pendingDismissVersion: S.Number;
437
+ readonly isHovered: S.Boolean;
438
+ readonly payload: S.Codec<A, I, never, never>;
439
+ }>>;
440
+ readonly nextEntryKey: S.Number;
441
+ }, "Type">, readonly Readonly<{
474
442
  name: string;
475
443
  args?: Record<string, unknown>;
476
- effect: import("effect/Effect").Effect<{
477
- readonly _tag: "Dismissed";
478
- readonly entryId: string;
479
- } | {
480
- readonly _tag: "DismissedAll";
481
- } | {
482
- readonly _tag: "ElapsedDuration";
483
- readonly entryId: string;
484
- readonly version: number;
485
- } | {
486
- readonly _tag: "HoveredEntry";
487
- readonly entryId: string;
488
- } | {
489
- readonly _tag: "LeftEntry";
490
- readonly entryId: string;
491
- } | {
492
- readonly _tag: "GotAnimationMessage";
493
- readonly entryId: string;
494
- readonly message: {
495
- readonly _tag: "Showed";
496
- } | {
497
- readonly _tag: "Hid";
498
- } | {
499
- readonly _tag: "AdvancedAnimationFrame";
500
- } | {
501
- readonly _tag: "EndedAnimation";
502
- };
503
- } | {
504
- readonly _tag: "Added";
505
- readonly entry: {
506
- readonly id: string;
507
- readonly variant: "Error" | "Info" | "Success" | "Warning";
508
- readonly animation: {
509
- readonly id: string;
510
- readonly isShowing: boolean;
511
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
512
- };
513
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
514
- readonly pendingDismissVersion: number;
515
- readonly isHovered: boolean;
516
- readonly payload: A;
517
- };
518
- }, never, never>;
519
- }>[], import("effect/Option").Option<{
520
- readonly _tag: "DismissedToast";
521
- readonly payload: A;
522
- }>];
523
- readonly dismissAll: (model: {
524
- readonly id: string;
525
- readonly defaultDuration: import("effect/Duration").Duration;
526
- readonly entries: readonly {
527
- readonly id: string;
528
- readonly variant: "Error" | "Info" | "Success" | "Warning";
529
- readonly animation: {
530
- readonly id: string;
531
- readonly isShowing: boolean;
532
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
533
- };
534
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
535
- readonly pendingDismissVersion: number;
536
- readonly isHovered: boolean;
537
- readonly payload: A;
538
- }[];
539
- readonly nextEntryKey: number;
540
- }) => readonly [{
541
- readonly id: string;
542
- readonly defaultDuration: import("effect/Duration").Duration;
543
- readonly entries: readonly {
544
- readonly id: string;
545
- readonly variant: "Error" | "Info" | "Success" | "Warning";
546
- readonly animation: {
547
- readonly id: string;
548
- readonly isShowing: boolean;
549
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
550
- };
551
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
552
- readonly pendingDismissVersion: number;
553
- readonly isHovered: boolean;
554
- readonly payload: A;
555
- }[];
556
- readonly nextEntryKey: number;
557
- }, readonly Readonly<{
444
+ effect: import("effect/Effect").Effect<S.Struct.ReadonlySide<{
445
+ readonly _tag: S.tag<"Dismissed">;
446
+ entryId: S.String;
447
+ }, "Type"> | S.Struct.ReadonlySide<{
448
+ readonly _tag: S.tag<"DismissedAll">;
449
+ }, "Type"> | S.Struct.ReadonlySide<{
450
+ readonly _tag: S.tag<"ElapsedDuration">;
451
+ entryId: S.String;
452
+ version: S.Number;
453
+ }, "Type"> | S.Struct.ReadonlySide<{
454
+ readonly _tag: S.tag<"HoveredEntry">;
455
+ entryId: S.String;
456
+ }, "Type"> | S.Struct.ReadonlySide<{
457
+ readonly _tag: S.tag<"LeftEntry">;
458
+ entryId: S.String;
459
+ }, "Type"> | S.Struct.ReadonlySide<{
460
+ readonly _tag: S.tag<"GotAnimationMessage">;
461
+ entryId: S.String;
462
+ message: S.Union<[import("foldkit/schema").CallableTaggedStruct<"Showed", {}>, import("foldkit/schema").CallableTaggedStruct<"Hid", {}>, import("foldkit/schema").CallableTaggedStruct<"AdvancedAnimationFrame", {}>, import("foldkit/schema").CallableTaggedStruct<"EndedAnimation", {}>]>;
463
+ }, "Type"> | S.Struct.ReadonlySide<{
464
+ readonly _tag: S.tag<"Added">;
465
+ entry: S.Struct<{
466
+ readonly id: S.String;
467
+ readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
468
+ readonly animation: S.Struct<{
469
+ readonly id: S.String;
470
+ readonly isShowing: S.Boolean;
471
+ readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
472
+ }>;
473
+ readonly maybeDuration: S.Option<S.DurationFromMillis>;
474
+ readonly pendingDismissVersion: S.Number;
475
+ readonly isHovered: S.Boolean;
476
+ readonly payload: S.Codec<A, I, never, never>;
477
+ }>;
478
+ }, "Type">, never, never>;
479
+ }>[], import("effect/Option").Option<S.Struct.ReadonlySide<{
480
+ readonly _tag: S.tag<"DismissedToast">;
481
+ payload: S.Codec<A, I, never, never>;
482
+ }, "Type">>];
483
+ readonly dismissAll: (model: S.Struct.ReadonlySide<{
484
+ readonly id: S.String;
485
+ readonly defaultDuration: S.DurationFromMillis;
486
+ readonly entries: S.$Array<S.Struct<{
487
+ readonly id: S.String;
488
+ readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
489
+ readonly animation: S.Struct<{
490
+ readonly id: S.String;
491
+ readonly isShowing: S.Boolean;
492
+ readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
493
+ }>;
494
+ readonly maybeDuration: S.Option<S.DurationFromMillis>;
495
+ readonly pendingDismissVersion: S.Number;
496
+ readonly isHovered: S.Boolean;
497
+ readonly payload: S.Codec<A, I, never, never>;
498
+ }>>;
499
+ readonly nextEntryKey: S.Number;
500
+ }, "Type">) => readonly [S.Struct.ReadonlySide<{
501
+ readonly id: S.String;
502
+ readonly defaultDuration: S.DurationFromMillis;
503
+ readonly entries: S.$Array<S.Struct<{
504
+ readonly id: S.String;
505
+ readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
506
+ readonly animation: S.Struct<{
507
+ readonly id: S.String;
508
+ readonly isShowing: S.Boolean;
509
+ readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
510
+ }>;
511
+ readonly maybeDuration: S.Option<S.DurationFromMillis>;
512
+ readonly pendingDismissVersion: S.Number;
513
+ readonly isHovered: S.Boolean;
514
+ readonly payload: S.Codec<A, I, never, never>;
515
+ }>>;
516
+ readonly nextEntryKey: S.Number;
517
+ }, "Type">, readonly Readonly<{
558
518
  name: string;
559
519
  args?: Record<string, unknown>;
560
- effect: import("effect/Effect").Effect<{
561
- readonly _tag: "Dismissed";
562
- readonly entryId: string;
563
- } | {
564
- readonly _tag: "DismissedAll";
565
- } | {
566
- readonly _tag: "ElapsedDuration";
567
- readonly entryId: string;
568
- readonly version: number;
569
- } | {
570
- readonly _tag: "HoveredEntry";
571
- readonly entryId: string;
572
- } | {
573
- readonly _tag: "LeftEntry";
574
- readonly entryId: string;
575
- } | {
576
- readonly _tag: "GotAnimationMessage";
577
- readonly entryId: string;
578
- readonly message: {
579
- readonly _tag: "Showed";
580
- } | {
581
- readonly _tag: "Hid";
582
- } | {
583
- readonly _tag: "AdvancedAnimationFrame";
584
- } | {
585
- readonly _tag: "EndedAnimation";
586
- };
587
- } | {
588
- readonly _tag: "Added";
589
- readonly entry: {
590
- readonly id: string;
591
- readonly variant: "Error" | "Info" | "Success" | "Warning";
592
- readonly animation: {
593
- readonly id: string;
594
- readonly isShowing: boolean;
595
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
596
- };
597
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
598
- readonly pendingDismissVersion: number;
599
- readonly isHovered: boolean;
600
- readonly payload: A;
601
- };
602
- }, never, never>;
603
- }>[], import("effect/Option").Option<{
604
- readonly _tag: "DismissedToast";
605
- readonly payload: A;
606
- }>];
520
+ effect: import("effect/Effect").Effect<S.Struct.ReadonlySide<{
521
+ readonly _tag: S.tag<"Dismissed">;
522
+ entryId: S.String;
523
+ }, "Type"> | S.Struct.ReadonlySide<{
524
+ readonly _tag: S.tag<"DismissedAll">;
525
+ }, "Type"> | S.Struct.ReadonlySide<{
526
+ readonly _tag: S.tag<"ElapsedDuration">;
527
+ entryId: S.String;
528
+ version: S.Number;
529
+ }, "Type"> | S.Struct.ReadonlySide<{
530
+ readonly _tag: S.tag<"HoveredEntry">;
531
+ entryId: S.String;
532
+ }, "Type"> | S.Struct.ReadonlySide<{
533
+ readonly _tag: S.tag<"LeftEntry">;
534
+ entryId: S.String;
535
+ }, "Type"> | S.Struct.ReadonlySide<{
536
+ readonly _tag: S.tag<"GotAnimationMessage">;
537
+ entryId: S.String;
538
+ message: S.Union<[import("foldkit/schema").CallableTaggedStruct<"Showed", {}>, import("foldkit/schema").CallableTaggedStruct<"Hid", {}>, import("foldkit/schema").CallableTaggedStruct<"AdvancedAnimationFrame", {}>, import("foldkit/schema").CallableTaggedStruct<"EndedAnimation", {}>]>;
539
+ }, "Type"> | S.Struct.ReadonlySide<{
540
+ readonly _tag: S.tag<"Added">;
541
+ entry: S.Struct<{
542
+ readonly id: S.String;
543
+ readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
544
+ readonly animation: S.Struct<{
545
+ readonly id: S.String;
546
+ readonly isShowing: S.Boolean;
547
+ readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
548
+ }>;
549
+ readonly maybeDuration: S.Option<S.DurationFromMillis>;
550
+ readonly pendingDismissVersion: S.Number;
551
+ readonly isHovered: S.Boolean;
552
+ readonly payload: S.Codec<A, I, never, never>;
553
+ }>;
554
+ }, "Type">, never, never>;
555
+ }>[], import("effect/Option").Option<S.Struct.ReadonlySide<{
556
+ readonly _tag: S.tag<"DismissedToast">;
557
+ payload: S.Codec<A, I, never, never>;
558
+ }, "Type">>];
607
559
  };
608
560
  //# sourceMappingURL=index.d.ts.map