@foldkit/ui 0.168.0-canary.1ce3d4b05055 → 0.168.0-canary.2b17b02abfeb

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.
@@ -1,3 +1,5 @@
1
1
  export { init, update, draggable, droppable, sortable, ghostStyle, isDragging, maybeDraggedItemId, maybeDropTarget, subscriptions, DragState, Model, Message, OutMessage, FocusItem, ResolveKeyboardMove, } from './index.js';
2
+ export * as test from './test.js';
2
3
  export type { InitConfig, DraggableConfig, DraggableMessage } from './index.js';
4
+ export type { SettleFocusInput, ResolveKeyboardMoveInput } from './test.js';
3
5
  //# sourceMappingURL=public.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/dragAndDrop/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,SAAS,EACT,SAAS,EACT,QAAQ,EACR,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,SAAS,EACT,KAAK,EACL,OAAO,EACP,UAAU,EACV,SAAS,EACT,mBAAmB,GACpB,MAAM,YAAY,CAAA;AAEnB,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/dragAndDrop/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,SAAS,EACT,SAAS,EACT,QAAQ,EACR,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,SAAS,EACT,KAAK,EACL,OAAO,EACP,UAAU,EACV,SAAS,EACT,mBAAmB,GACpB,MAAM,YAAY,CAAA;AAEnB,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAEjC,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC/E,YAAY,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA"}
@@ -1 +1,2 @@
1
1
  export { init, update, draggable, droppable, sortable, ghostStyle, isDragging, maybeDraggedItemId, maybeDropTarget, subscriptions, DragState, Model, Message, OutMessage, FocusItem, ResolveKeyboardMove, } from './index.js';
2
+ export * as test from './test.js';
@@ -0,0 +1,65 @@
1
+ import * as Story from 'foldkit/story';
2
+ /** Identifies the item whose focus Command {@link settleFocus} resolves. */
3
+ export type SettleFocusInput = Readonly<{
4
+ itemId: string;
5
+ }>;
6
+ /** Returns a Story step that resolves `FocusItem({ itemId })` after a keyboard
7
+ * drop, cancellation, or move. The step fails if no matching Command is pending
8
+ * and leaves unrelated Commands pending.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * Story.story(
13
+ * update,
14
+ * Story.given(model),
15
+ * Story.message(
16
+ * ParentMessage.GotDragAndDropMessage({
17
+ * message: DragAndDrop.Message.ConfirmedKeyboardDrop(),
18
+ * }),
19
+ * ),
20
+ * DragAndDrop.test.settleFocus({ itemId: 'card-1' }),
21
+ * )
22
+ * ```
23
+ */
24
+ export declare const settleFocus: ({ itemId }: SettleFocusInput) => <Model, Message, OutMessage = undefined>(simulation: Story.StorySimulation<Model, Message, OutMessage>) => Story.StorySimulation<Model, Message, OutMessage>;
25
+ /** The dragged item and target position supplied to {@link resolveKeyboardMove}. */
26
+ export type ResolveKeyboardMoveInput = Readonly<{
27
+ itemId: string;
28
+ targetContainerId: string;
29
+ targetIndex: number;
30
+ }>;
31
+ /** Returns Story steps that resolve a pending `ResolveKeyboardMove` to the
32
+ * supplied container and index, then resolve `FocusItem` for `itemId`.
33
+ *
34
+ * The steps fail if either Command is missing or multiple keyboard moves are
35
+ * pending. Unrelated Commands stay pending.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * Story.story(
40
+ * update,
41
+ * Story.given(keyboardDraggingModel),
42
+ * Story.message(
43
+ * ParentMessage.GotDragAndDropMessage({
44
+ * message: DragAndDrop.Message.PressedArrowKey({
45
+ * direction: 'NextContainer',
46
+ * }),
47
+ * }),
48
+ * ),
49
+ * DragAndDrop.test.resolveKeyboardMove({
50
+ * itemId: 'card-1',
51
+ * targetContainerId: 'done',
52
+ * targetIndex: 0,
53
+ * }),
54
+ * )
55
+ * ```
56
+ */
57
+ export declare const resolveKeyboardMove: ({ itemId, targetContainerId, targetIndex, }: ResolveKeyboardMoveInput) => Readonly<{
58
+ _tag: 'StoryStepsStep';
59
+ _phantomGivenModel?: never;
60
+ _phantomModelAssertion?: never;
61
+ _phantomMessage?: never;
62
+ _phantomOutMessage?: never;
63
+ steps: ReadonlyArray<Story.StoryStep<any, any, any>>;
64
+ }>;
65
+ //# sourceMappingURL=test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/dragAndDrop/test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA;AAItC,4EAA4E;AAC5E,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IACtC,MAAM,EAAE,MAAM,CAAA;CACf,CAAC,CAAA;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,WAAW,eAAgB,gBAAgB,iKACoB,CAAA;AAE5E,oFAAoF;AACpF,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C,MAAM,EAAE,MAAM,CAAA;IACd,iBAAiB,EAAE,MAAM,CAAA;IACzB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAC,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,mBAAmB,gDAI7B,wBAAwB;;;;;;;EAOxB,CAAA"}
@@ -0,0 +1,49 @@
1
+ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
+ import * as Story from 'foldkit/story';
3
+ import { FocusItem, Message, ResolveKeyboardMove } from './index.js';
4
+ /** Returns a Story step that resolves `FocusItem({ itemId })` after a keyboard
5
+ * drop, cancellation, or move. The step fails if no matching Command is pending
6
+ * and leaves unrelated Commands pending.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * Story.story(
11
+ * update,
12
+ * Story.given(model),
13
+ * Story.message(
14
+ * ParentMessage.GotDragAndDropMessage({
15
+ * message: DragAndDrop.Message.ConfirmedKeyboardDrop(),
16
+ * }),
17
+ * ),
18
+ * DragAndDrop.test.settleFocus({ itemId: 'card-1' }),
19
+ * )
20
+ * ```
21
+ */
22
+ export const settleFocus = ({ itemId }) => __foldkitBrandViewResult((Story.Command.resolve(FocusItem({ itemId }), Message.CompletedFocusItem())), "@foldkit/ui/dragAndDrop/test.js#settleFocus");
23
+ /** Returns Story steps that resolve a pending `ResolveKeyboardMove` to the
24
+ * supplied container and index, then resolve `FocusItem` for `itemId`.
25
+ *
26
+ * The steps fail if either Command is missing or multiple keyboard moves are
27
+ * pending. Unrelated Commands stay pending.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * Story.story(
32
+ * update,
33
+ * Story.given(keyboardDraggingModel),
34
+ * Story.message(
35
+ * ParentMessage.GotDragAndDropMessage({
36
+ * message: DragAndDrop.Message.PressedArrowKey({
37
+ * direction: 'NextContainer',
38
+ * }),
39
+ * }),
40
+ * ),
41
+ * DragAndDrop.test.resolveKeyboardMove({
42
+ * itemId: 'card-1',
43
+ * targetContainerId: 'done',
44
+ * targetIndex: 0,
45
+ * }),
46
+ * )
47
+ * ```
48
+ */
49
+ export const resolveKeyboardMove = ({ itemId, targetContainerId, targetIndex, }) => __foldkitBrandViewResult((Story.steps(Story.Command.resolve(ResolveKeyboardMove, Message.CompletedResolveKeyboardMove({ targetContainerId, targetIndex })), settleFocus({ itemId }))), "@foldkit/ui/dragAndDrop/test.js#resolveKeyboardMove");
@@ -73,13 +73,13 @@ export declare const view: import("foldkit/submodel").View<{
73
73
  readonly pendingOpenVersion: number;
74
74
  readonly pendingCloseVersion: number;
75
75
  }, {
76
+ readonly _tag: "BlurredPanel";
77
+ } | {
76
78
  readonly _tag: "CompletedWaitBeforeOpening";
77
79
  readonly version: number;
78
80
  } | {
79
81
  readonly _tag: "CompletedWaitBeforeClosing";
80
82
  readonly version: number;
81
- } | {
82
- readonly _tag: "BlurredPanel";
83
83
  } | {
84
84
  readonly _tag: "BlurredTrigger";
85
85
  } | {
@@ -79,23 +79,21 @@ export declare const update: (model: {
79
79
  readonly maybeLastButtonPointerType: Option.Option<string>;
80
80
  };
81
81
  commands?: Update.Commands<{
82
- readonly _tag: "CompletedClickItem";
82
+ readonly _tag: "Closed";
83
+ } | {
84
+ readonly _tag: "CompletedFocusButton";
83
85
  } | {
84
86
  readonly _tag: "CompletedInertOthers";
85
87
  } | {
86
88
  readonly _tag: "CompletedLockScroll";
87
89
  } | {
88
90
  readonly _tag: "CompletedRestoreInert";
89
- } | {
90
- readonly _tag: "CompletedScrollIntoView";
91
91
  } | {
92
92
  readonly _tag: "CompletedUnlockScroll";
93
93
  } | {
94
- readonly _tag: "DeactivatedItem";
95
- } | {
96
- readonly _tag: "SuppressedItemCommit";
94
+ readonly _tag: "IgnoredMouseClick";
97
95
  } | {
98
- readonly _tag: "Closed";
96
+ readonly _tag: "SuppressedSpaceScroll";
99
97
  } | {
100
98
  readonly _tag: "ActivatedItem";
101
99
  readonly index: number;
@@ -104,15 +102,19 @@ export declare const update: (model: {
104
102
  readonly _tag: "BlurredItems";
105
103
  } | {
106
104
  readonly _tag: "CompletedAnchorListbox";
105
+ } | {
106
+ readonly _tag: "CompletedClickItem";
107
107
  } | {
108
108
  readonly _tag: "CompletedDelayClearSearch";
109
109
  readonly version: number;
110
- } | {
111
- readonly _tag: "CompletedFocusButton";
112
110
  } | {
113
111
  readonly _tag: "CompletedFocusItems";
114
112
  } | {
115
113
  readonly _tag: "CompletedPortalListboxBackdrop";
114
+ } | {
115
+ readonly _tag: "CompletedScrollIntoView";
116
+ } | {
117
+ readonly _tag: "DeactivatedItem";
116
118
  } | {
117
119
  readonly _tag: "GotAnimationMessage";
118
120
  readonly message: {
@@ -126,8 +128,6 @@ export declare const update: (model: {
126
128
  } | {
127
129
  readonly _tag: "Showed";
128
130
  };
129
- } | {
130
- readonly _tag: "IgnoredMouseClick";
131
131
  } | {
132
132
  readonly _tag: "MovedPointerOverItem";
133
133
  readonly index: number;
@@ -151,7 +151,7 @@ export declare const update: (model: {
151
151
  readonly _tag: "SelectedItem";
152
152
  readonly item: string;
153
153
  } | {
154
- readonly _tag: "SuppressedSpaceScroll";
154
+ readonly _tag: "SuppressedItemCommit";
155
155
  }, never>;
156
156
  outMessage?: Readonly<{
157
157
  readonly _tag: 'Selected';
@@ -227,21 +227,23 @@ export declare const DetectMovementOrAnimationEnd: Command.CommandDefinitionWith
227
227
  export declare const makeUpdate: <Model extends BaseModel>(handleSelectedItem: (model: Model, item: string, context: SelectedItemContext<Model>) => Update.ReturnWithOutMessage<Model, Message, OutMessage>) => (model: Model, message: Message) => Readonly<{
228
228
  model: Model;
229
229
  commands?: Update.Commands<{
230
- readonly _tag: "Closed";
231
- } | {
232
- readonly _tag: "CompletedFocusButton";
230
+ readonly _tag: "CompletedClickItem";
233
231
  } | {
234
232
  readonly _tag: "CompletedInertOthers";
235
233
  } | {
236
234
  readonly _tag: "CompletedLockScroll";
237
235
  } | {
238
236
  readonly _tag: "CompletedRestoreInert";
237
+ } | {
238
+ readonly _tag: "CompletedScrollIntoView";
239
239
  } | {
240
240
  readonly _tag: "CompletedUnlockScroll";
241
241
  } | {
242
- readonly _tag: "IgnoredMouseClick";
242
+ readonly _tag: "DeactivatedItem";
243
243
  } | {
244
- readonly _tag: "SuppressedSpaceScroll";
244
+ readonly _tag: "SuppressedItemCommit";
245
+ } | {
246
+ readonly _tag: "Closed";
245
247
  } | {
246
248
  readonly _tag: "Opened";
247
249
  readonly maybeActiveItemIndex: Option.Option<number>;
@@ -251,8 +253,6 @@ export declare const makeUpdate: <Model extends BaseModel>(handleSelectedItem: (
251
253
  readonly _tag: "ActivatedItem";
252
254
  readonly index: number;
253
255
  readonly activationTrigger: "Keyboard" | "Pointer";
254
- } | {
255
- readonly _tag: "DeactivatedItem";
256
256
  } | {
257
257
  readonly _tag: "SelectedItem";
258
258
  readonly item: string;
@@ -272,7 +272,9 @@ export declare const makeUpdate: <Model extends BaseModel>(handleSelectedItem: (
272
272
  readonly _tag: "CompletedDelayClearSearch";
273
273
  readonly version: number;
274
274
  } | {
275
- readonly _tag: "SuppressedItemCommit";
275
+ readonly _tag: "IgnoredMouseClick";
276
+ } | {
277
+ readonly _tag: "SuppressedSpaceScroll";
276
278
  } | {
277
279
  readonly _tag: "PressedPointerOnButton";
278
280
  readonly pointerType: string;
@@ -280,13 +282,11 @@ export declare const makeUpdate: <Model extends BaseModel>(handleSelectedItem: (
280
282
  } | {
281
283
  readonly _tag: "CompletedAnchorListbox";
282
284
  } | {
283
- readonly _tag: "CompletedClickItem";
285
+ readonly _tag: "CompletedFocusButton";
284
286
  } | {
285
287
  readonly _tag: "CompletedFocusItems";
286
288
  } | {
287
289
  readonly _tag: "CompletedPortalListboxBackdrop";
288
- } | {
289
- readonly _tag: "CompletedScrollIntoView";
290
290
  } | {
291
291
  readonly _tag: "GotAnimationMessage";
292
292
  readonly message: {
@@ -78,23 +78,29 @@ export declare const update: (model: {
78
78
  readonly maybeLastButtonPointerType: Option.Option<string>;
79
79
  };
80
80
  commands?: Update.Commands<{
81
- readonly _tag: "DeactivatedItem";
81
+ readonly _tag: "IgnoredMouseClick";
82
82
  } | {
83
- readonly _tag: "SuppressedItemCommit";
83
+ readonly _tag: "SuppressedSpaceScroll";
84
+ } | {
85
+ readonly _tag: "CompletedFocusButton";
86
+ } | {
87
+ readonly _tag: "CompletedInertOthers";
84
88
  } | {
85
89
  readonly _tag: "CompletedLockScroll";
90
+ } | {
91
+ readonly _tag: "CompletedRestoreInert";
86
92
  } | {
87
93
  readonly _tag: "CompletedUnlockScroll";
88
94
  } | {
89
- readonly _tag: "CompletedInertOthers";
95
+ readonly _tag: "Closed";
90
96
  } | {
91
- readonly _tag: "CompletedRestoreInert";
97
+ readonly _tag: "CompletedClickItem";
92
98
  } | {
93
99
  readonly _tag: "CompletedScrollIntoView";
94
100
  } | {
95
- readonly _tag: "CompletedClickItem";
101
+ readonly _tag: "DeactivatedItem";
96
102
  } | {
97
- readonly _tag: "Closed";
103
+ readonly _tag: "SuppressedItemCommit";
98
104
  } | {
99
105
  readonly _tag: "ActivatedItem";
100
106
  readonly index: number;
@@ -106,8 +112,6 @@ export declare const update: (model: {
106
112
  } | {
107
113
  readonly _tag: "CompletedDelayClearSearch";
108
114
  readonly version: number;
109
- } | {
110
- readonly _tag: "CompletedFocusButton";
111
115
  } | {
112
116
  readonly _tag: "CompletedFocusItems";
113
117
  } | {
@@ -125,8 +129,6 @@ export declare const update: (model: {
125
129
  } | {
126
130
  readonly _tag: "Showed";
127
131
  };
128
- } | {
129
- readonly _tag: "IgnoredMouseClick";
130
132
  } | {
131
133
  readonly _tag: "MovedPointerOverItem";
132
134
  readonly index: number;
@@ -149,8 +151,6 @@ export declare const update: (model: {
149
151
  } | {
150
152
  readonly _tag: "SelectedItem";
151
153
  readonly item: string;
152
- } | {
153
- readonly _tag: "SuppressedSpaceScroll";
154
154
  }, never>;
155
155
  outMessage?: Readonly<{
156
156
  readonly _tag: 'Selected';
@@ -253,31 +253,31 @@ export declare const update: (model: Model, message: Message) => Readonly<{
253
253
  }>;
254
254
  };
255
255
  commands?: Update.Commands<{
256
- readonly _tag: "DeactivatedItem";
256
+ readonly _tag: "IgnoredMouseClick";
257
257
  } | {
258
- readonly _tag: "CompletedLockScroll";
258
+ readonly _tag: "SuppressedSpaceScroll";
259
259
  } | {
260
- readonly _tag: "CompletedUnlockScroll";
260
+ readonly _tag: "CompletedFocusButton";
261
261
  } | {
262
262
  readonly _tag: "CompletedInertOthers";
263
263
  } | {
264
- readonly _tag: "CompletedRestoreInert";
264
+ readonly _tag: "CompletedLockScroll";
265
265
  } | {
266
- readonly _tag: "CompletedScrollIntoView";
266
+ readonly _tag: "CompletedRestoreInert";
267
267
  } | {
268
- readonly _tag: "CompletedClickItem";
268
+ readonly _tag: "CompletedUnlockScroll";
269
269
  } | {
270
270
  readonly _tag: "Closed";
271
271
  } | {
272
- readonly _tag: "BlurredItems";
272
+ readonly _tag: "CompletedClickItem";
273
273
  } | {
274
- readonly _tag: "CompletedFocusButton";
274
+ readonly _tag: "CompletedScrollIntoView";
275
275
  } | {
276
- readonly _tag: "CompletedFocusItems";
276
+ readonly _tag: "DeactivatedItem";
277
277
  } | {
278
- readonly _tag: "IgnoredMouseClick";
278
+ readonly _tag: "BlurredItems";
279
279
  } | {
280
- readonly _tag: "SuppressedSpaceScroll";
280
+ readonly _tag: "CompletedFocusItems";
281
281
  } | {
282
282
  readonly _tag: "ActivatedItem";
283
283
  readonly index: number;
@@ -71,10 +71,6 @@ export declare const update: (model: Model, message: Message) => Readonly<{
71
71
  } | {
72
72
  readonly _tag: "GotDialogMessage";
73
73
  readonly message: {
74
- readonly _tag: "RequestedClose";
75
- } | {
76
- readonly _tag: "RequestedOpen";
77
- } | {
78
74
  readonly _tag: "CompletedCloseDialog";
79
75
  } | {
80
76
  readonly _tag: "CompletedReleaseDialogResources";
@@ -95,6 +91,10 @@ export declare const update: (model: Model, message: Message) => Readonly<{
95
91
  } | {
96
92
  readonly _tag: "Showed";
97
93
  };
94
+ } | {
95
+ readonly _tag: "RequestedClose";
96
+ } | {
97
+ readonly _tag: "RequestedOpen";
98
98
  } | {
99
99
  readonly _tag: "SucceededAcquireResources";
100
100
  } | {
@@ -314,6 +314,10 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
314
314
  readonly threshold: number;
315
315
  }>;
316
316
  }, message: {
317
+ readonly _tag: "DismissedAll";
318
+ } | {
319
+ readonly _tag: "PressedEscape";
320
+ } | {
317
321
  readonly _tag: "Added";
318
322
  readonly entry: {
319
323
  readonly id: string;
@@ -392,10 +396,6 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
392
396
  readonly _tag: "ReleasedSwipePointer";
393
397
  readonly pointerId: number;
394
398
  readonly clientX: number;
395
- } | {
396
- readonly _tag: "DismissedAll";
397
- } | {
398
- readonly _tag: "PressedEscape";
399
399
  }) => Readonly<{
400
400
  model: {
401
401
  readonly id: string;
@@ -437,6 +437,10 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
437
437
  }>;
438
438
  };
439
439
  commands?: import("foldkit/update").Commands<{
440
+ readonly _tag: "DismissedAll";
441
+ } | {
442
+ readonly _tag: "PressedEscape";
443
+ } | {
440
444
  readonly _tag: "Added";
441
445
  readonly entry: {
442
446
  readonly id: string;
@@ -515,10 +519,6 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
515
519
  readonly _tag: "ReleasedSwipePointer";
516
520
  readonly pointerId: number;
517
521
  readonly clientX: number;
518
- } | {
519
- readonly _tag: "DismissedAll";
520
- } | {
521
- readonly _tag: "PressedEscape";
522
522
  }, never>;
523
523
  outMessage?: {
524
524
  readonly _tag: "DismissedToast";
@@ -609,6 +609,10 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
609
609
  }>;
610
610
  };
611
611
  commands?: import("foldkit/update").Commands<{
612
+ readonly _tag: "DismissedAll";
613
+ } | {
614
+ readonly _tag: "PressedEscape";
615
+ } | {
612
616
  readonly _tag: "Added";
613
617
  readonly entry: {
614
618
  readonly id: string;
@@ -687,10 +691,6 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
687
691
  readonly _tag: "ReleasedSwipePointer";
688
692
  readonly pointerId: number;
689
693
  readonly clientX: number;
690
- } | {
691
- readonly _tag: "DismissedAll";
692
- } | {
693
- readonly _tag: "PressedEscape";
694
694
  }, never>;
695
695
  outMessage?: {
696
696
  readonly _tag: "DismissedToast";
@@ -776,6 +776,10 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
776
776
  }>;
777
777
  };
778
778
  commands?: import("foldkit/update").Commands<{
779
+ readonly _tag: "DismissedAll";
780
+ } | {
781
+ readonly _tag: "PressedEscape";
782
+ } | {
779
783
  readonly _tag: "Added";
780
784
  readonly entry: {
781
785
  readonly id: string;
@@ -854,10 +858,6 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
854
858
  readonly _tag: "ReleasedSwipePointer";
855
859
  readonly pointerId: number;
856
860
  readonly clientX: number;
857
- } | {
858
- readonly _tag: "DismissedAll";
859
- } | {
860
- readonly _tag: "PressedEscape";
861
861
  }, never>;
862
862
  outMessage?: {
863
863
  readonly _tag: "DismissedToast";
@@ -943,6 +943,10 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
943
943
  }>;
944
944
  };
945
945
  commands?: import("foldkit/update").Commands<{
946
+ readonly _tag: "DismissedAll";
947
+ } | {
948
+ readonly _tag: "PressedEscape";
949
+ } | {
946
950
  readonly _tag: "Added";
947
951
  readonly entry: {
948
952
  readonly id: string;
@@ -1021,10 +1025,6 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
1021
1025
  readonly _tag: "ReleasedSwipePointer";
1022
1026
  readonly pointerId: number;
1023
1027
  readonly clientX: number;
1024
- } | {
1025
- readonly _tag: "DismissedAll";
1026
- } | {
1027
- readonly _tag: "PressedEscape";
1028
1028
  }, never>;
1029
1029
  outMessage?: {
1030
1030
  readonly _tag: "DismissedToast";
@@ -1071,6 +1071,10 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
1071
1071
  readonly threshold: number;
1072
1072
  }>;
1073
1073
  }, {
1074
+ readonly _tag: "DismissedAll";
1075
+ } | {
1076
+ readonly _tag: "PressedEscape";
1077
+ } | {
1074
1078
  readonly _tag: "Added";
1075
1079
  readonly entry: {
1076
1080
  readonly id: string;
@@ -1149,10 +1153,6 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
1149
1153
  readonly _tag: "ReleasedSwipePointer";
1150
1154
  readonly pointerId: number;
1151
1155
  readonly clientX: number;
1152
- } | {
1153
- readonly _tag: "DismissedAll";
1154
- } | {
1155
- readonly _tag: "PressedEscape";
1156
1156
  }, {
1157
1157
  readonly isSwipeEnabled: boolean;
1158
1158
  readonly isAnyDragging: boolean;
@@ -1198,6 +1198,10 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
1198
1198
  readonly threshold: number;
1199
1199
  }>;
1200
1200
  }, {
1201
+ readonly _tag: "DismissedAll";
1202
+ } | {
1203
+ readonly _tag: "PressedEscape";
1204
+ } | {
1201
1205
  readonly _tag: "Added";
1202
1206
  readonly entry: {
1203
1207
  readonly id: string;
@@ -1276,10 +1280,6 @@ export declare const make: <A, I>(payloadSchema: Schema.Codec<A, I>) => {
1276
1280
  readonly _tag: "ReleasedSwipePointer";
1277
1281
  readonly pointerId: number;
1278
1282
  readonly clientX: number;
1279
- } | {
1280
- readonly _tag: "DismissedAll";
1281
- } | {
1282
- readonly _tag: "PressedEscape";
1283
1283
  }, {
1284
1284
  readonly isSwipeEnabled: boolean;
1285
1285
  readonly isAnyDragging: boolean;
@@ -103,8 +103,6 @@ export declare const view: import("foldkit/submodel").View<{
103
103
  readonly pendingShowVersion: number;
104
104
  readonly maybeLastPointerType: Option.Option<string>;
105
105
  }, {
106
- readonly _tag: "PressedEscape";
107
- } | {
108
106
  readonly _tag: "CompletedWaitBeforeShowing";
109
107
  readonly version: number;
110
108
  } | {
@@ -117,6 +115,8 @@ export declare const view: import("foldkit/submodel").View<{
117
115
  readonly _tag: "FocusedTrigger";
118
116
  } | {
119
117
  readonly _tag: "LeftTrigger";
118
+ } | {
119
+ readonly _tag: "PressedEscape";
120
120
  } | {
121
121
  readonly _tag: "PressedPointerOnTrigger";
122
122
  readonly pointerType: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foldkit/ui",
3
- "version": "0.168.0-canary.1ce3d4b05055",
3
+ "version": "0.168.0-canary.2b17b02abfeb",
4
4
  "description": "Headless, accessible UI components for Foldkit",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -134,16 +134,16 @@
134
134
  ],
135
135
  "peerDependencies": {
136
136
  "effect": "4.0.0",
137
- "foldkit": "0.168.0-canary.1ce3d4b05055"
137
+ "foldkit": "0.168.0-canary.2b17b02abfeb"
138
138
  },
139
139
  "dependencies": {
140
140
  "@floating-ui/dom": "^1.8.0"
141
141
  },
142
142
  "devDependencies": {
143
143
  "@effect/vitest": "4.0.0",
144
- "@foldkit/vite-plugin": "0.27.1-canary.1ce3d4b05055",
144
+ "@foldkit/vite-plugin": "0.27.1-canary.2b17b02abfeb",
145
145
  "effect": "4.0.0",
146
- "foldkit": "0.168.0-canary.1ce3d4b05055",
146
+ "foldkit": "0.168.0-canary.2b17b02abfeb",
147
147
  "happy-dom": "^20.14.5",
148
148
  "rimraf": "^6.1.3",
149
149
  "typescript": "^7.0.2",