@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.
- package/dist/anchor/anchor.d.ts +33 -7
- package/dist/anchor/anchor.d.ts.map +1 -1
- package/dist/anchor/anchor.js +102 -15
- package/dist/anchor/public.d.ts +1 -1
- package/dist/anchor/public.d.ts.map +1 -1
- package/dist/anchor/public.js +1 -1
- package/dist/animation/index.d.ts +3 -0
- package/dist/animation/index.d.ts.map +1 -1
- package/dist/animation/schema.d.ts +13 -4
- package/dist/animation/schema.d.ts.map +1 -1
- package/dist/animation/schema.js +8 -4
- package/dist/animation/update.d.ts +15 -5
- package/dist/animation/update.d.ts.map +1 -1
- package/dist/animation/update.js +59 -27
- package/dist/calendar/index.d.ts.map +1 -1
- package/dist/calendar/index.js +27 -19
- package/dist/checkbox/index.d.ts +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/combobox/multi.d.ts +5 -0
- package/dist/combobox/multi.d.ts.map +1 -1
- package/dist/combobox/multi.js +2 -2
- package/dist/combobox/shared.d.ts +19 -7
- package/dist/combobox/shared.d.ts.map +1 -1
- package/dist/combobox/shared.js +28 -28
- package/dist/combobox/single.d.ts +5 -0
- package/dist/combobox/single.d.ts.map +1 -1
- package/dist/combobox/single.js +4 -4
- package/dist/datePicker/index.d.ts +13 -2
- package/dist/datePicker/index.d.ts.map +1 -1
- package/dist/datePicker/index.js +10 -10
- package/dist/dialog/index.d.ts +13 -2
- package/dist/dialog/index.d.ts.map +1 -1
- package/dist/dialog/index.js +28 -14
- package/dist/disclosure/index.d.ts +2 -2
- package/dist/disclosure/index.js +1 -1
- package/dist/dragAndDrop/index.js +14 -14
- package/dist/fileDrop/index.d.ts.map +1 -1
- package/dist/fileDrop/index.js +7 -5
- package/dist/hoverIntent/hoverIntent.d.ts.map +1 -1
- package/dist/hoverIntent/hoverIntent.js +16 -16
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/internal/accessibleName.d.ts +9 -0
- package/dist/internal/accessibleName.d.ts.map +1 -0
- package/dist/internal/accessibleName.js +12 -0
- package/dist/internal/range.d.ts +7 -0
- package/dist/internal/range.d.ts.map +1 -0
- package/dist/internal/range.js +12 -0
- package/dist/listbox/multi.d.ts +5 -0
- package/dist/listbox/multi.d.ts.map +1 -1
- package/dist/listbox/shared.d.ts +15 -4
- package/dist/listbox/shared.d.ts.map +1 -1
- package/dist/listbox/shared.js +32 -29
- package/dist/listbox/single.d.ts +5 -0
- package/dist/listbox/single.d.ts.map +1 -1
- package/dist/menu/index.d.ts +16 -4
- package/dist/menu/index.d.ts.map +1 -1
- package/dist/menu/index.js +35 -28
- package/dist/meter/index.d.ts +26 -0
- package/dist/meter/index.d.ts.map +1 -0
- package/dist/meter/index.js +67 -0
- package/dist/meter/public.d.ts +3 -0
- package/dist/meter/public.d.ts.map +1 -0
- package/dist/meter/public.js +1 -0
- package/dist/popover/index.d.ts +20 -4
- package/dist/popover/index.d.ts.map +1 -1
- package/dist/popover/index.js +20 -18
- package/dist/progress/index.d.ts +24 -0
- package/dist/progress/index.d.ts.map +1 -0
- package/dist/progress/index.js +85 -0
- package/dist/progress/public.d.ts +3 -0
- package/dist/progress/public.d.ts.map +1 -0
- package/dist/progress/public.js +1 -0
- package/dist/radioGroup/index.d.ts.map +1 -1
- package/dist/radioGroup/index.js +5 -3
- package/dist/slider/index.d.ts +61 -28
- package/dist/slider/index.d.ts.map +1 -1
- package/dist/slider/index.js +163 -87
- package/dist/slider/public.d.ts +1 -1
- package/dist/slider/public.d.ts.map +1 -1
- package/dist/slider/public.js +1 -1
- package/dist/switch/index.d.ts +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/tabs/index.d.ts.map +1 -1
- package/dist/tabs/index.js +5 -3
- package/dist/test/apps/disabledButton.d.ts +12 -4
- package/dist/test/apps/disabledButton.d.ts.map +1 -1
- package/dist/test/apps/disabledButton.js +3 -3
- package/dist/toast/index.d.ts +869 -45
- package/dist/toast/index.d.ts.map +1 -1
- package/dist/toast/index.js +77 -17
- package/dist/toast/public.d.ts +2 -2
- package/dist/toast/public.d.ts.map +1 -1
- package/dist/toast/public.js +1 -1
- package/dist/toast/schema.d.ts +160 -6
- package/dist/toast/schema.d.ts.map +1 -1
- package/dist/toast/schema.js +69 -2
- package/dist/toast/swipeTarget.d.ts +5 -0
- package/dist/toast/swipeTarget.d.ts.map +1 -0
- package/dist/toast/swipeTarget.js +18 -0
- package/dist/toast/test.d.ts +7 -1
- package/dist/toast/test.d.ts.map +1 -1
- package/dist/toast/test.js +37 -3
- package/dist/toast/update.d.ts +768 -7
- package/dist/toast/update.d.ts.map +1 -1
- package/dist/toast/update.js +283 -68
- package/dist/tooltip/tooltip.d.ts +7 -7
- package/dist/tooltip/tooltip.d.ts.map +1 -1
- package/dist/tooltip/tooltip.js +14 -12
- package/dist/virtualList/index.d.ts.map +1 -1
- package/dist/virtualList/index.js +8 -6
- package/package.json +9 -9
package/dist/toast/test.js
CHANGED
|
@@ -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
|
-
|
|
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([
|
|
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
|
-
], [
|
|
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");
|