@foldkit/ui 0.150.0 → 0.151.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 (78) hide show
  1. package/dist/animation/update.d.ts +10 -9
  2. package/dist/animation/update.d.ts.map +1 -1
  3. package/dist/animation/update.js +27 -35
  4. package/dist/calendar/index.d.ts +100 -11
  5. package/dist/calendar/index.d.ts.map +1 -1
  6. package/dist/calendar/index.js +66 -80
  7. package/dist/checkbox/index.d.ts +3 -4
  8. package/dist/checkbox/index.d.ts.map +1 -1
  9. package/dist/checkbox/index.js +3 -4
  10. package/dist/combobox/multi.d.ts +40 -51
  11. package/dist/combobox/multi.d.ts.map +1 -1
  12. package/dist/combobox/multi.js +19 -16
  13. package/dist/combobox/shared.d.ts +20 -20
  14. package/dist/combobox/shared.d.ts.map +1 -1
  15. package/dist/combobox/shared.js +134 -128
  16. package/dist/combobox/single.d.ts +38 -51
  17. package/dist/combobox/single.d.ts.map +1 -1
  18. package/dist/combobox/single.js +21 -17
  19. package/dist/datePicker/index.d.ts +182 -15
  20. package/dist/datePicker/index.d.ts.map +1 -1
  21. package/dist/datePicker/index.js +37 -54
  22. package/dist/dialog/index.d.ts +45 -7
  23. package/dist/dialog/index.d.ts.map +1 -1
  24. package/dist/dialog/index.js +54 -49
  25. package/dist/disclosure/index.d.ts +3 -4
  26. package/dist/disclosure/index.d.ts.map +1 -1
  27. package/dist/disclosure/index.js +3 -4
  28. package/dist/dragAndDrop/index.d.ts +96 -7
  29. package/dist/dragAndDrop/index.d.ts.map +1 -1
  30. package/dist/dragAndDrop/index.js +49 -61
  31. package/dist/fileDrop/index.d.ts +26 -11
  32. package/dist/fileDrop/index.d.ts.map +1 -1
  33. package/dist/fileDrop/index.js +16 -23
  34. package/dist/listbox/multi.d.ts +39 -52
  35. package/dist/listbox/multi.d.ts.map +1 -1
  36. package/dist/listbox/multi.js +9 -7
  37. package/dist/listbox/shared.d.ts +14 -22
  38. package/dist/listbox/shared.d.ts.map +1 -1
  39. package/dist/listbox/shared.js +113 -114
  40. package/dist/listbox/single.d.ts +40 -55
  41. package/dist/listbox/single.d.ts.map +1 -1
  42. package/dist/listbox/single.js +8 -7
  43. package/dist/menu/index.d.ts +131 -37
  44. package/dist/menu/index.d.ts.map +1 -1
  45. package/dist/menu/index.js +111 -120
  46. package/dist/popover/index.d.ts +71 -10
  47. package/dist/popover/index.d.ts.map +1 -1
  48. package/dist/popover/index.js +80 -73
  49. package/dist/radioGroup/index.d.ts +31 -19
  50. package/dist/radioGroup/index.d.ts.map +1 -1
  51. package/dist/radioGroup/index.js +18 -18
  52. package/dist/slider/index.d.ts +44 -13
  53. package/dist/slider/index.d.ts.map +1 -1
  54. package/dist/slider/index.js +33 -38
  55. package/dist/switch/index.d.ts +3 -4
  56. package/dist/switch/index.d.ts.map +1 -1
  57. package/dist/switch/index.js +3 -4
  58. package/dist/tabs/index.d.ts +31 -17
  59. package/dist/tabs/index.d.ts.map +1 -1
  60. package/dist/tabs/index.js +17 -17
  61. package/dist/test/apps/disabledButton.d.ts +17 -17
  62. package/dist/test/apps/disabledButton.d.ts.map +1 -1
  63. package/dist/test/apps/disabledButton.js +6 -4
  64. package/dist/toast/index.d.ts +96 -100
  65. package/dist/toast/index.d.ts.map +1 -1
  66. package/dist/toast/update.d.ts +97 -100
  67. package/dist/toast/update.d.ts.map +1 -1
  68. package/dist/toast/update.js +60 -58
  69. package/dist/tooltip/index.d.ts +2 -1
  70. package/dist/tooltip/index.d.ts.map +1 -1
  71. package/dist/tooltip/index.js +1 -1
  72. package/dist/tooltip/tooltip.d.ts +5 -10
  73. package/dist/tooltip/tooltip.d.ts.map +1 -1
  74. package/dist/tooltip/tooltip.js +45 -48
  75. package/dist/virtualList/index.d.ts +30 -29
  76. package/dist/virtualList/index.d.ts.map +1 -1
  77. package/dist/virtualList/index.js +21 -21
  78. package/package.json +3 -3
@@ -297,28 +297,26 @@ export declare const make: <A, I>(payloadSchema: S.Codec<A, I>) => {
297
297
  readonly isHovered: boolean;
298
298
  readonly payload: A;
299
299
  };
300
- }) => readonly [{
301
- readonly id: string;
302
- readonly defaultDuration: import("effect/Duration").Duration;
303
- readonly entries: readonly {
300
+ }) => Readonly<{
301
+ model: {
304
302
  readonly id: string;
305
- readonly variant: "Error" | "Info" | "Success" | "Warning";
306
- readonly animation: {
303
+ readonly defaultDuration: import("effect/Duration").Duration;
304
+ readonly entries: readonly {
307
305
  readonly id: string;
308
- readonly isShowing: boolean;
309
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
310
- };
311
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
312
- readonly pendingDismissVersion: number;
313
- readonly isHovered: boolean;
314
- readonly payload: A;
315
- }[];
316
- readonly nextEntryKey: number;
317
- }, readonly Readonly<{
318
- name: string;
319
- args?: Record<string, unknown>;
320
- key?: string;
321
- effect: import("effect/Effect").Effect<{
306
+ readonly variant: "Error" | "Info" | "Success" | "Warning";
307
+ readonly animation: {
308
+ readonly id: string;
309
+ readonly isShowing: boolean;
310
+ readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
311
+ };
312
+ readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
313
+ readonly pendingDismissVersion: number;
314
+ readonly isHovered: boolean;
315
+ readonly payload: A;
316
+ }[];
317
+ readonly nextEntryKey: number;
318
+ };
319
+ commands?: import("foldkit/update").Commands<{
322
320
  readonly _tag: "DismissedAll";
323
321
  } | {
324
322
  readonly _tag: "GotAnimationMessage";
@@ -360,11 +358,12 @@ export declare const make: <A, I>(payloadSchema: S.Codec<A, I>) => {
360
358
  readonly isHovered: boolean;
361
359
  readonly payload: A;
362
360
  };
363
- }, never, never>;
364
- }>[], import("effect/Option").Option<{
365
- readonly _tag: "DismissedToast";
366
- readonly payload: A;
367
- }>];
361
+ }, never>;
362
+ outMessage?: {
363
+ readonly _tag: "DismissedToast";
364
+ readonly payload: A;
365
+ };
366
+ }>;
368
367
  readonly show: (model: {
369
368
  readonly id: string;
370
369
  readonly defaultDuration: import("effect/Duration").Duration;
@@ -387,28 +386,26 @@ export declare const make: <A, I>(payloadSchema: S.Codec<A, I>) => {
387
386
  variant?: Variant;
388
387
  duration?: import("effect/Duration").Input;
389
388
  sticky?: boolean;
390
- }>) => readonly [{
391
- readonly id: string;
392
- readonly defaultDuration: import("effect/Duration").Duration;
393
- readonly entries: readonly {
389
+ }>) => Readonly<{
390
+ model: {
394
391
  readonly id: string;
395
- readonly variant: "Error" | "Info" | "Success" | "Warning";
396
- readonly animation: {
392
+ readonly defaultDuration: import("effect/Duration").Duration;
393
+ readonly entries: readonly {
397
394
  readonly id: string;
398
- readonly isShowing: boolean;
399
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
400
- };
401
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
402
- readonly pendingDismissVersion: number;
403
- readonly isHovered: boolean;
404
- readonly payload: A;
405
- }[];
406
- readonly nextEntryKey: number;
407
- }, readonly Readonly<{
408
- name: string;
409
- args?: Record<string, unknown>;
410
- key?: string;
411
- effect: import("effect/Effect").Effect<{
395
+ readonly variant: "Error" | "Info" | "Success" | "Warning";
396
+ readonly animation: {
397
+ readonly id: string;
398
+ readonly isShowing: boolean;
399
+ readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
400
+ };
401
+ readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
402
+ readonly pendingDismissVersion: number;
403
+ readonly isHovered: boolean;
404
+ readonly payload: A;
405
+ }[];
406
+ readonly nextEntryKey: number;
407
+ };
408
+ commands?: import("foldkit/update").Commands<{
412
409
  readonly _tag: "DismissedAll";
413
410
  } | {
414
411
  readonly _tag: "GotAnimationMessage";
@@ -450,11 +447,12 @@ export declare const make: <A, I>(payloadSchema: S.Codec<A, I>) => {
450
447
  readonly isHovered: boolean;
451
448
  readonly payload: A;
452
449
  };
453
- }, never, never>;
454
- }>[], import("effect/Option").Option<{
455
- readonly _tag: "DismissedToast";
456
- readonly payload: A;
457
- }>];
450
+ }, never>;
451
+ outMessage?: {
452
+ readonly _tag: "DismissedToast";
453
+ readonly payload: A;
454
+ };
455
+ }>;
458
456
  readonly dismiss: (model: {
459
457
  readonly id: string;
460
458
  readonly defaultDuration: import("effect/Duration").Duration;
@@ -472,28 +470,26 @@ export declare const make: <A, I>(payloadSchema: S.Codec<A, I>) => {
472
470
  readonly payload: A;
473
471
  }[];
474
472
  readonly nextEntryKey: number;
475
- }, entryId: string) => readonly [{
476
- readonly id: string;
477
- readonly defaultDuration: import("effect/Duration").Duration;
478
- readonly entries: readonly {
473
+ }, entryId: string) => Readonly<{
474
+ model: {
479
475
  readonly id: string;
480
- readonly variant: "Error" | "Info" | "Success" | "Warning";
481
- readonly animation: {
476
+ readonly defaultDuration: import("effect/Duration").Duration;
477
+ readonly entries: readonly {
482
478
  readonly id: string;
483
- readonly isShowing: boolean;
484
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
485
- };
486
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
487
- readonly pendingDismissVersion: number;
488
- readonly isHovered: boolean;
489
- readonly payload: A;
490
- }[];
491
- readonly nextEntryKey: number;
492
- }, readonly Readonly<{
493
- name: string;
494
- args?: Record<string, unknown>;
495
- key?: string;
496
- effect: import("effect/Effect").Effect<{
479
+ readonly variant: "Error" | "Info" | "Success" | "Warning";
480
+ readonly animation: {
481
+ readonly id: string;
482
+ readonly isShowing: boolean;
483
+ readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
484
+ };
485
+ readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
486
+ readonly pendingDismissVersion: number;
487
+ readonly isHovered: boolean;
488
+ readonly payload: A;
489
+ }[];
490
+ readonly nextEntryKey: number;
491
+ };
492
+ commands?: import("foldkit/update").Commands<{
497
493
  readonly _tag: "DismissedAll";
498
494
  } | {
499
495
  readonly _tag: "GotAnimationMessage";
@@ -535,11 +531,12 @@ export declare const make: <A, I>(payloadSchema: S.Codec<A, I>) => {
535
531
  readonly isHovered: boolean;
536
532
  readonly payload: A;
537
533
  };
538
- }, never, never>;
539
- }>[], import("effect/Option").Option<{
540
- readonly _tag: "DismissedToast";
541
- readonly payload: A;
542
- }>];
534
+ }, never>;
535
+ outMessage?: {
536
+ readonly _tag: "DismissedToast";
537
+ readonly payload: A;
538
+ };
539
+ }>;
543
540
  readonly dismissAll: (model: {
544
541
  readonly id: string;
545
542
  readonly defaultDuration: import("effect/Duration").Duration;
@@ -557,28 +554,26 @@ export declare const make: <A, I>(payloadSchema: S.Codec<A, I>) => {
557
554
  readonly payload: A;
558
555
  }[];
559
556
  readonly nextEntryKey: number;
560
- }) => readonly [{
561
- readonly id: string;
562
- readonly defaultDuration: import("effect/Duration").Duration;
563
- readonly entries: readonly {
557
+ }) => Readonly<{
558
+ model: {
564
559
  readonly id: string;
565
- readonly variant: "Error" | "Info" | "Success" | "Warning";
566
- readonly animation: {
560
+ readonly defaultDuration: import("effect/Duration").Duration;
561
+ readonly entries: readonly {
567
562
  readonly id: string;
568
- readonly isShowing: boolean;
569
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
570
- };
571
- readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
572
- readonly pendingDismissVersion: number;
573
- readonly isHovered: boolean;
574
- readonly payload: A;
575
- }[];
576
- readonly nextEntryKey: number;
577
- }, readonly Readonly<{
578
- name: string;
579
- args?: Record<string, unknown>;
580
- key?: string;
581
- effect: import("effect/Effect").Effect<{
563
+ readonly variant: "Error" | "Info" | "Success" | "Warning";
564
+ readonly animation: {
565
+ readonly id: string;
566
+ readonly isShowing: boolean;
567
+ readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
568
+ };
569
+ readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
570
+ readonly pendingDismissVersion: number;
571
+ readonly isHovered: boolean;
572
+ readonly payload: A;
573
+ }[];
574
+ readonly nextEntryKey: number;
575
+ };
576
+ commands?: import("foldkit/update").Commands<{
582
577
  readonly _tag: "DismissedAll";
583
578
  } | {
584
579
  readonly _tag: "GotAnimationMessage";
@@ -620,10 +615,11 @@ export declare const make: <A, I>(payloadSchema: S.Codec<A, I>) => {
620
615
  readonly isHovered: boolean;
621
616
  readonly payload: A;
622
617
  };
623
- }, never, never>;
624
- }>[], import("effect/Option").Option<{
625
- readonly _tag: "DismissedToast";
626
- readonly payload: A;
627
- }>];
618
+ }, never>;
619
+ outMessage?: {
620
+ readonly _tag: "DismissedToast";
621
+ readonly payload: A;
622
+ };
623
+ }>;
628
624
  };
629
625
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAChD,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,IAAI,EAAmB,MAAM,cAAc,CAAA;AAG9E,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAe,MAAM,aAAa,CAAA;AAE9D,YAAY,EACV,4BAA4B,EAC5B,SAAS,EACT,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,SAAS,GACV,MAAM,aAAa,CAAA;AACpB,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAEjC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,CAAA;AA0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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyF1B,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import { Duration, Effect, Option, Schema as S } from 'effect';
2
2
  import * as Command from 'foldkit/command';
3
+ import * as Update from 'foldkit/update';
3
4
  import { type InitConfig, type Variant } from './schema.js';
4
5
  /** Input for `show()`. `payload` is the consumer-defined content shape for an
5
6
  * entry. Omit `duration` to use the container's `defaultDuration`; pass
@@ -202,28 +203,26 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
202
203
  readonly isHovered: boolean;
203
204
  readonly payload: A;
204
205
  };
205
- }) => readonly [{
206
- readonly id: string;
207
- readonly defaultDuration: Duration.Duration;
208
- readonly entries: readonly {
206
+ }) => Readonly<{
207
+ model: {
209
208
  readonly id: string;
210
- readonly variant: "Error" | "Info" | "Success" | "Warning";
211
- readonly animation: {
209
+ readonly defaultDuration: Duration.Duration;
210
+ readonly entries: readonly {
212
211
  readonly id: string;
213
- readonly isShowing: boolean;
214
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
215
- };
216
- readonly maybeDuration: Option.Option<Duration.Duration>;
217
- readonly pendingDismissVersion: number;
218
- readonly isHovered: boolean;
219
- readonly payload: A;
220
- }[];
221
- readonly nextEntryKey: number;
222
- }, readonly Readonly<{
223
- name: string;
224
- args?: Record<string, unknown>;
225
- key?: string;
226
- effect: Effect.Effect<{
212
+ readonly variant: "Error" | "Info" | "Success" | "Warning";
213
+ readonly animation: {
214
+ readonly id: string;
215
+ readonly isShowing: boolean;
216
+ readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
217
+ };
218
+ readonly maybeDuration: Option.Option<Duration.Duration>;
219
+ readonly pendingDismissVersion: number;
220
+ readonly isHovered: boolean;
221
+ readonly payload: A;
222
+ }[];
223
+ readonly nextEntryKey: number;
224
+ };
225
+ commands?: Update.Commands<{
227
226
  readonly _tag: "GotAnimationMessage";
228
227
  readonly entryId: string;
229
228
  readonly message: {
@@ -265,11 +264,12 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
265
264
  readonly isHovered: boolean;
266
265
  readonly payload: A;
267
266
  };
268
- }, never, never>;
269
- }>[], Option.Option<{
270
- readonly _tag: "DismissedToast";
271
- readonly payload: A;
272
- }>];
267
+ }, never>;
268
+ outMessage?: {
269
+ readonly _tag: "DismissedToast";
270
+ readonly payload: A;
271
+ };
272
+ }>;
273
273
  readonly show: (model: {
274
274
  readonly id: string;
275
275
  readonly defaultDuration: Duration.Duration;
@@ -287,28 +287,26 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
287
287
  readonly payload: A;
288
288
  }[];
289
289
  readonly nextEntryKey: number;
290
- }, input: ShowInput<A>) => readonly [{
291
- readonly id: string;
292
- readonly defaultDuration: Duration.Duration;
293
- readonly entries: readonly {
290
+ }, input: ShowInput<A>) => Readonly<{
291
+ model: {
294
292
  readonly id: string;
295
- readonly variant: "Error" | "Info" | "Success" | "Warning";
296
- readonly animation: {
293
+ readonly defaultDuration: Duration.Duration;
294
+ readonly entries: readonly {
297
295
  readonly id: string;
298
- readonly isShowing: boolean;
299
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
300
- };
301
- readonly maybeDuration: Option.Option<Duration.Duration>;
302
- readonly pendingDismissVersion: number;
303
- readonly isHovered: boolean;
304
- readonly payload: A;
305
- }[];
306
- readonly nextEntryKey: number;
307
- }, readonly Readonly<{
308
- name: string;
309
- args?: Record<string, unknown>;
310
- key?: string;
311
- effect: Effect.Effect<{
296
+ readonly variant: "Error" | "Info" | "Success" | "Warning";
297
+ readonly animation: {
298
+ readonly id: string;
299
+ readonly isShowing: boolean;
300
+ readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
301
+ };
302
+ readonly maybeDuration: Option.Option<Duration.Duration>;
303
+ readonly pendingDismissVersion: number;
304
+ readonly isHovered: boolean;
305
+ readonly payload: A;
306
+ }[];
307
+ readonly nextEntryKey: number;
308
+ };
309
+ commands?: Update.Commands<{
312
310
  readonly _tag: "GotAnimationMessage";
313
311
  readonly entryId: string;
314
312
  readonly message: {
@@ -350,11 +348,12 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
350
348
  readonly isHovered: boolean;
351
349
  readonly payload: A;
352
350
  };
353
- }, never, never>;
354
- }>[], Option.Option<{
355
- readonly _tag: "DismissedToast";
356
- readonly payload: A;
357
- }>];
351
+ }, never>;
352
+ outMessage?: {
353
+ readonly _tag: "DismissedToast";
354
+ readonly payload: A;
355
+ };
356
+ }>;
358
357
  readonly dismiss: (model: {
359
358
  readonly id: string;
360
359
  readonly defaultDuration: Duration.Duration;
@@ -372,28 +371,26 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
372
371
  readonly payload: A;
373
372
  }[];
374
373
  readonly nextEntryKey: number;
375
- }, entryId: string) => readonly [{
376
- readonly id: string;
377
- readonly defaultDuration: Duration.Duration;
378
- readonly entries: readonly {
374
+ }, entryId: string) => Readonly<{
375
+ model: {
379
376
  readonly id: string;
380
- readonly variant: "Error" | "Info" | "Success" | "Warning";
381
- readonly animation: {
377
+ readonly defaultDuration: Duration.Duration;
378
+ readonly entries: readonly {
382
379
  readonly id: string;
383
- readonly isShowing: boolean;
384
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
385
- };
386
- readonly maybeDuration: Option.Option<Duration.Duration>;
387
- readonly pendingDismissVersion: number;
388
- readonly isHovered: boolean;
389
- readonly payload: A;
390
- }[];
391
- readonly nextEntryKey: number;
392
- }, readonly Readonly<{
393
- name: string;
394
- args?: Record<string, unknown>;
395
- key?: string;
396
- effect: Effect.Effect<{
380
+ readonly variant: "Error" | "Info" | "Success" | "Warning";
381
+ readonly animation: {
382
+ readonly id: string;
383
+ readonly isShowing: boolean;
384
+ readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
385
+ };
386
+ readonly maybeDuration: Option.Option<Duration.Duration>;
387
+ readonly pendingDismissVersion: number;
388
+ readonly isHovered: boolean;
389
+ readonly payload: A;
390
+ }[];
391
+ readonly nextEntryKey: number;
392
+ };
393
+ commands?: Update.Commands<{
397
394
  readonly _tag: "GotAnimationMessage";
398
395
  readonly entryId: string;
399
396
  readonly message: {
@@ -435,11 +432,12 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
435
432
  readonly isHovered: boolean;
436
433
  readonly payload: A;
437
434
  };
438
- }, never, never>;
439
- }>[], Option.Option<{
440
- readonly _tag: "DismissedToast";
441
- readonly payload: A;
442
- }>];
435
+ }, never>;
436
+ outMessage?: {
437
+ readonly _tag: "DismissedToast";
438
+ readonly payload: A;
439
+ };
440
+ }>;
443
441
  readonly dismissAll: (model: {
444
442
  readonly id: string;
445
443
  readonly defaultDuration: Duration.Duration;
@@ -457,28 +455,26 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
457
455
  readonly payload: A;
458
456
  }[];
459
457
  readonly nextEntryKey: number;
460
- }) => readonly [{
461
- readonly id: string;
462
- readonly defaultDuration: Duration.Duration;
463
- readonly entries: readonly {
458
+ }) => Readonly<{
459
+ model: {
464
460
  readonly id: string;
465
- readonly variant: "Error" | "Info" | "Success" | "Warning";
466
- readonly animation: {
461
+ readonly defaultDuration: Duration.Duration;
462
+ readonly entries: readonly {
467
463
  readonly id: string;
468
- readonly isShowing: boolean;
469
- readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
470
- };
471
- readonly maybeDuration: Option.Option<Duration.Duration>;
472
- readonly pendingDismissVersion: number;
473
- readonly isHovered: boolean;
474
- readonly payload: A;
475
- }[];
476
- readonly nextEntryKey: number;
477
- }, readonly Readonly<{
478
- name: string;
479
- args?: Record<string, unknown>;
480
- key?: string;
481
- effect: Effect.Effect<{
464
+ readonly variant: "Error" | "Info" | "Success" | "Warning";
465
+ readonly animation: {
466
+ readonly id: string;
467
+ readonly isShowing: boolean;
468
+ readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
469
+ };
470
+ readonly maybeDuration: Option.Option<Duration.Duration>;
471
+ readonly pendingDismissVersion: number;
472
+ readonly isHovered: boolean;
473
+ readonly payload: A;
474
+ }[];
475
+ readonly nextEntryKey: number;
476
+ };
477
+ commands?: Update.Commands<{
482
478
  readonly _tag: "GotAnimationMessage";
483
479
  readonly entryId: string;
484
480
  readonly message: {
@@ -520,10 +516,11 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
520
516
  readonly isHovered: boolean;
521
517
  readonly payload: A;
522
518
  };
523
- }, never, never>;
524
- }>[], Option.Option<{
525
- readonly _tag: "DismissedToast";
526
- readonly payload: A;
527
- }>];
519
+ }, never>;
520
+ outMessage?: {
521
+ readonly _tag: "DismissedToast";
522
+ readonly payload: A;
523
+ };
524
+ }>;
528
525
  };
529
526
  //# sourceMappingURL=update.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/toast/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,MAAM,EAGN,MAAM,EACN,MAAM,IAAI,CAAC,EAEZ,MAAM,QAAQ,CAAA;AACf,OAAO,KAA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