@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
@@ -4,7 +4,9 @@ import * as Animation from '../animation/index.js';
4
4
  import { Message } from './schema.js';
5
5
  import { WaitBeforeDismissal } from './update.js';
6
6
  const DEFAULT_VERSION = 0;
7
- /** Builds a {@link Story.Command.resolveAll} step that drains a single toast
7
+ const ENTER_TRANSITION_GENERATION = 1;
8
+ const LEAVE_TRANSITION_GENERATION = 2;
9
+ /** Builds a `Story.Command.resolveAll` step that drains a single toast
8
10
  * entry's full animation and dismiss lifecycle. Resolving these Commands in
9
11
  * order takes a freshly shown entry from its enter animation through
10
12
  * auto-dismiss and its exit animation, ending with the entry removed from the
@@ -21,6 +23,12 @@ const DEFAULT_VERSION = 0;
21
23
  * - exit animation: `WaitForPaint` then `CompletedWaitForPaint`
22
24
  * - exit settle: `WaitForAnimationSettled` then `EndedAnimation`
23
25
  *
26
+ * The enter steps match animation transition generation `1`, which the
27
+ * entry's `Showed` starts, and the exit steps match generation `2`, which its
28
+ * `Hid` starts. Each step matches only its own generation, so the helper also
29
+ * an entry whose enter the test has already resolved. These versions are
30
+ * separate from the auto-dismiss timer `version`.
31
+ *
24
32
  * Each step resolves with the child's raw result Message. `resolveAll` replays
25
33
  * the matched Command's own recorded wrapping, so a parent that embeds the
26
34
  * toast Submodel drains the same way without restating its `Got*` lift.
@@ -35,7 +43,33 @@ const DEFAULT_VERSION = 0;
35
43
  * )
36
44
  * ```
37
45
  */
38
- export const drainEntry = ({ entryId, version = DEFAULT_VERSION, }) => __foldkitBrandViewResult((Story.Command.resolveAll([Animation.WaitForPaint, Animation.Message.CompletedWaitForPaint()], [Animation.WaitForAnimationSettled, Animation.Message.EndedAnimation()], [
46
+ export const drainEntry = ({ entryId, version = DEFAULT_VERSION, }) => __foldkitBrandViewResult((Story.Command.resolveAll([
47
+ Animation.WaitForPaint({ generation: ENTER_TRANSITION_GENERATION }),
48
+ Animation.Message.CompletedWaitForPaint({
49
+ generation: ENTER_TRANSITION_GENERATION,
50
+ }),
51
+ ], [
52
+ Animation.WaitForAnimationSettled({
53
+ id: entryId,
54
+ generation: ENTER_TRANSITION_GENERATION,
55
+ }),
56
+ Animation.Message.EndedAnimation({
57
+ generation: ENTER_TRANSITION_GENERATION,
58
+ }),
59
+ ], [
39
60
  WaitBeforeDismissal,
40
61
  Message.CompletedWaitBeforeDismissal({ entryId, version }),
41
- ], [Animation.WaitForPaint, Animation.Message.CompletedWaitForPaint()], [Animation.WaitForAnimationSettled, Animation.Message.EndedAnimation()])), "@foldkit/ui/toast/test.js#drainEntry");
62
+ ], [
63
+ Animation.WaitForPaint({ generation: LEAVE_TRANSITION_GENERATION }),
64
+ Animation.Message.CompletedWaitForPaint({
65
+ generation: LEAVE_TRANSITION_GENERATION,
66
+ }),
67
+ ], [
68
+ Animation.WaitForAnimationSettled({
69
+ id: entryId,
70
+ generation: LEAVE_TRANSITION_GENERATION,
71
+ }),
72
+ Animation.Message.EndedAnimation({
73
+ generation: LEAVE_TRANSITION_GENERATION,
74
+ }),
75
+ ])), "@foldkit/ui/toast/test.js#drainEntry");