foldkit 0.52.0 → 0.54.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.
- package/dist/devtools/overlay-styles.d.ts +1 -1
- package/dist/devtools/overlay-styles.d.ts.map +1 -1
- package/dist/devtools/overlay-styles.js +80 -0
- package/dist/devtools/overlay.d.ts.map +1 -1
- package/dist/devtools/overlay.js +166 -32
- package/dist/test/internal.d.ts +5 -3
- package/dist/test/internal.d.ts.map +1 -1
- package/dist/test/internal.js +35 -3
- package/dist/test/query.d.ts.map +1 -1
- package/dist/test/query.js +9 -2
- package/dist/test/scene.d.ts +3 -3
- package/dist/test/scene.d.ts.map +1 -1
- package/dist/test/scene.js +4 -33
- package/dist/test/story.d.ts +3 -3
- package/dist/test/story.d.ts.map +1 -1
- package/dist/test/story.js +4 -33
- package/dist/ui/combobox/multi.d.ts +35 -35
- package/dist/ui/combobox/shared.d.ts +23 -23
- package/dist/ui/combobox/single.d.ts +35 -35
- package/dist/ui/dragAndDrop/index.d.ts +2 -2
- package/dist/ui/listbox/multi.d.ts +34 -34
- package/dist/ui/listbox/shared.d.ts +25 -25
- package/dist/ui/listbox/single.d.ts +34 -34
- package/package.json +1 -1
|
@@ -31,73 +31,55 @@ export declare const init: (config: InitConfig) => Model;
|
|
|
31
31
|
/** Processes a listbox message and returns the next model and commands. Stays open on selection and toggles item membership (multi-select behavior). */
|
|
32
32
|
export declare const update: (model: {
|
|
33
33
|
readonly id: string;
|
|
34
|
-
readonly orientation: "Horizontal" | "Vertical";
|
|
35
34
|
readonly isOpen: boolean;
|
|
36
35
|
readonly isAnimated: boolean;
|
|
37
36
|
readonly isModal: boolean;
|
|
37
|
+
readonly orientation: "Vertical" | "Horizontal";
|
|
38
38
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
39
39
|
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
40
40
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
41
|
+
readonly searchQuery: string;
|
|
42
|
+
readonly searchVersion: number;
|
|
41
43
|
readonly maybeLastPointerPosition: Option.Option<{
|
|
42
44
|
readonly screenX: number;
|
|
43
45
|
readonly screenY: number;
|
|
44
46
|
}>;
|
|
45
|
-
readonly searchQuery: string;
|
|
46
|
-
readonly searchVersion: number;
|
|
47
47
|
readonly maybeLastButtonPointerType: Option.Option<string>;
|
|
48
48
|
} & {
|
|
49
49
|
readonly selectedItems: readonly string[];
|
|
50
50
|
}, message: import("./shared").Message) => readonly [{
|
|
51
51
|
readonly id: string;
|
|
52
|
-
readonly orientation: "Horizontal" | "Vertical";
|
|
53
52
|
readonly isOpen: boolean;
|
|
54
53
|
readonly isAnimated: boolean;
|
|
55
54
|
readonly isModal: boolean;
|
|
55
|
+
readonly orientation: "Vertical" | "Horizontal";
|
|
56
56
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
57
57
|
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
58
58
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
59
|
+
readonly searchQuery: string;
|
|
60
|
+
readonly searchVersion: number;
|
|
59
61
|
readonly maybeLastPointerPosition: Option.Option<{
|
|
60
62
|
readonly screenX: number;
|
|
61
63
|
readonly screenY: number;
|
|
62
64
|
}>;
|
|
63
|
-
readonly searchQuery: string;
|
|
64
|
-
readonly searchVersion: number;
|
|
65
65
|
readonly maybeLastButtonPointerType: Option.Option<string>;
|
|
66
66
|
} & {
|
|
67
67
|
readonly selectedItems: readonly string[];
|
|
68
68
|
}, readonly Readonly<{
|
|
69
69
|
name: string;
|
|
70
70
|
effect: import("effect/Effect").Effect<{
|
|
71
|
+
readonly _tag: "Opened";
|
|
72
|
+
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
73
|
+
} | {
|
|
71
74
|
readonly _tag: "Closed";
|
|
72
75
|
} | {
|
|
73
76
|
readonly _tag: "ClosedByTab";
|
|
74
|
-
} | {
|
|
75
|
-
readonly _tag: "DeactivatedItem";
|
|
76
|
-
} | {
|
|
77
|
-
readonly _tag: "CompletedLockScroll";
|
|
78
|
-
} | {
|
|
79
|
-
readonly _tag: "CompletedUnlockScroll";
|
|
80
|
-
} | {
|
|
81
|
-
readonly _tag: "CompletedSetupInert";
|
|
82
|
-
} | {
|
|
83
|
-
readonly _tag: "CompletedTeardownInert";
|
|
84
|
-
} | {
|
|
85
|
-
readonly _tag: "CompletedScrollIntoView";
|
|
86
|
-
} | {
|
|
87
|
-
readonly _tag: "CompletedClickItem";
|
|
88
|
-
} | {
|
|
89
|
-
readonly _tag: "AdvancedTransitionFrame";
|
|
90
|
-
} | {
|
|
91
|
-
readonly _tag: "EndedTransition";
|
|
92
|
-
} | {
|
|
93
|
-
readonly _tag: "CompletedFocusButton";
|
|
94
|
-
} | {
|
|
95
|
-
readonly _tag: "Opened";
|
|
96
|
-
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
97
77
|
} | {
|
|
98
78
|
readonly _tag: "ActivatedItem";
|
|
99
|
-
readonly index: number;
|
|
100
79
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
80
|
+
readonly index: number;
|
|
81
|
+
} | {
|
|
82
|
+
readonly _tag: "DeactivatedItem";
|
|
101
83
|
} | {
|
|
102
84
|
readonly _tag: "SelectedItem";
|
|
103
85
|
readonly item: string;
|
|
@@ -113,15 +95,33 @@ export declare const update: (model: {
|
|
|
113
95
|
readonly version: number;
|
|
114
96
|
} | {
|
|
115
97
|
readonly _tag: "MovedPointerOverItem";
|
|
116
|
-
readonly index: number;
|
|
117
98
|
readonly screenX: number;
|
|
118
99
|
readonly screenY: number;
|
|
100
|
+
readonly index: number;
|
|
101
|
+
} | {
|
|
102
|
+
readonly _tag: "CompletedLockScroll";
|
|
103
|
+
} | {
|
|
104
|
+
readonly _tag: "CompletedUnlockScroll";
|
|
105
|
+
} | {
|
|
106
|
+
readonly _tag: "CompletedSetupInert";
|
|
107
|
+
} | {
|
|
108
|
+
readonly _tag: "CompletedTeardownInert";
|
|
109
|
+
} | {
|
|
110
|
+
readonly _tag: "CompletedFocusButton";
|
|
119
111
|
} | {
|
|
120
112
|
readonly _tag: "CompletedFocusItems";
|
|
113
|
+
} | {
|
|
114
|
+
readonly _tag: "CompletedScrollIntoView";
|
|
115
|
+
} | {
|
|
116
|
+
readonly _tag: "CompletedClickItem";
|
|
121
117
|
} | {
|
|
122
118
|
readonly _tag: "IgnoredMouseClick";
|
|
123
119
|
} | {
|
|
124
120
|
readonly _tag: "SuppressedSpaceScroll";
|
|
121
|
+
} | {
|
|
122
|
+
readonly _tag: "AdvancedTransitionFrame";
|
|
123
|
+
} | {
|
|
124
|
+
readonly _tag: "EndedTransition";
|
|
125
125
|
} | {
|
|
126
126
|
readonly _tag: "DetectedButtonMovement";
|
|
127
127
|
} | {
|
|
@@ -136,19 +136,19 @@ export type ViewConfig<Message, Item> = BaseViewConfig<Message, Item, Model>;
|
|
|
136
136
|
export declare const view: <Message, Item>(config: Readonly<{
|
|
137
137
|
model: {
|
|
138
138
|
readonly id: string;
|
|
139
|
-
readonly orientation: "Horizontal" | "Vertical";
|
|
140
139
|
readonly isOpen: boolean;
|
|
141
140
|
readonly isAnimated: boolean;
|
|
142
141
|
readonly isModal: boolean;
|
|
142
|
+
readonly orientation: "Vertical" | "Horizontal";
|
|
143
143
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
144
144
|
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
145
145
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
146
|
+
readonly searchQuery: string;
|
|
147
|
+
readonly searchVersion: number;
|
|
146
148
|
readonly maybeLastPointerPosition: Option.Option<{
|
|
147
149
|
readonly screenX: number;
|
|
148
150
|
readonly screenY: number;
|
|
149
151
|
}>;
|
|
150
|
-
readonly searchQuery: string;
|
|
151
|
-
readonly searchVersion: number;
|
|
152
152
|
readonly maybeLastButtonPointerType: Option.Option<string>;
|
|
153
153
|
} & {
|
|
154
154
|
readonly selectedItems: readonly string[];
|
|
@@ -218,36 +218,18 @@ export declare const DetectMovementOrTransitionEnd: Command.CommandDefinition<"D
|
|
|
218
218
|
export declare const makeUpdate: <Model extends BaseModel>(handleSelectedItem: (model: Model, item: string, context: SelectedItemContext) => [Model, ReadonlyArray<Command.Command<Message>>]) => (model: Model, message: Message) => readonly [Model, readonly Readonly<{
|
|
219
219
|
name: string;
|
|
220
220
|
effect: Effect.Effect<{
|
|
221
|
+
readonly _tag: "Opened";
|
|
222
|
+
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
223
|
+
} | {
|
|
221
224
|
readonly _tag: "Closed";
|
|
222
225
|
} | {
|
|
223
226
|
readonly _tag: "ClosedByTab";
|
|
224
|
-
} | {
|
|
225
|
-
readonly _tag: "DeactivatedItem";
|
|
226
|
-
} | {
|
|
227
|
-
readonly _tag: "CompletedLockScroll";
|
|
228
|
-
} | {
|
|
229
|
-
readonly _tag: "CompletedUnlockScroll";
|
|
230
|
-
} | {
|
|
231
|
-
readonly _tag: "CompletedSetupInert";
|
|
232
|
-
} | {
|
|
233
|
-
readonly _tag: "CompletedTeardownInert";
|
|
234
|
-
} | {
|
|
235
|
-
readonly _tag: "CompletedScrollIntoView";
|
|
236
|
-
} | {
|
|
237
|
-
readonly _tag: "CompletedClickItem";
|
|
238
|
-
} | {
|
|
239
|
-
readonly _tag: "AdvancedTransitionFrame";
|
|
240
|
-
} | {
|
|
241
|
-
readonly _tag: "EndedTransition";
|
|
242
|
-
} | {
|
|
243
|
-
readonly _tag: "CompletedFocusButton";
|
|
244
|
-
} | {
|
|
245
|
-
readonly _tag: "Opened";
|
|
246
|
-
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
247
227
|
} | {
|
|
248
228
|
readonly _tag: "ActivatedItem";
|
|
249
|
-
readonly index: number;
|
|
250
229
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
230
|
+
readonly index: number;
|
|
231
|
+
} | {
|
|
232
|
+
readonly _tag: "DeactivatedItem";
|
|
251
233
|
} | {
|
|
252
234
|
readonly _tag: "SelectedItem";
|
|
253
235
|
readonly item: string;
|
|
@@ -263,15 +245,33 @@ export declare const makeUpdate: <Model extends BaseModel>(handleSelectedItem: (
|
|
|
263
245
|
readonly version: number;
|
|
264
246
|
} | {
|
|
265
247
|
readonly _tag: "MovedPointerOverItem";
|
|
266
|
-
readonly index: number;
|
|
267
248
|
readonly screenX: number;
|
|
268
249
|
readonly screenY: number;
|
|
250
|
+
readonly index: number;
|
|
251
|
+
} | {
|
|
252
|
+
readonly _tag: "CompletedLockScroll";
|
|
253
|
+
} | {
|
|
254
|
+
readonly _tag: "CompletedUnlockScroll";
|
|
255
|
+
} | {
|
|
256
|
+
readonly _tag: "CompletedSetupInert";
|
|
257
|
+
} | {
|
|
258
|
+
readonly _tag: "CompletedTeardownInert";
|
|
259
|
+
} | {
|
|
260
|
+
readonly _tag: "CompletedFocusButton";
|
|
269
261
|
} | {
|
|
270
262
|
readonly _tag: "CompletedFocusItems";
|
|
263
|
+
} | {
|
|
264
|
+
readonly _tag: "CompletedScrollIntoView";
|
|
265
|
+
} | {
|
|
266
|
+
readonly _tag: "CompletedClickItem";
|
|
271
267
|
} | {
|
|
272
268
|
readonly _tag: "IgnoredMouseClick";
|
|
273
269
|
} | {
|
|
274
270
|
readonly _tag: "SuppressedSpaceScroll";
|
|
271
|
+
} | {
|
|
272
|
+
readonly _tag: "AdvancedTransitionFrame";
|
|
273
|
+
} | {
|
|
274
|
+
readonly _tag: "EndedTransition";
|
|
275
275
|
} | {
|
|
276
276
|
readonly _tag: "DetectedButtonMovement";
|
|
277
277
|
} | {
|
|
@@ -32,73 +32,55 @@ export declare const init: (config: InitConfig) => Model;
|
|
|
32
32
|
/** Processes a listbox message and returns the next model and commands. Closes the listbox on selection (single-select behavior). */
|
|
33
33
|
export declare const update: (model: {
|
|
34
34
|
readonly id: string;
|
|
35
|
-
readonly orientation: "Horizontal" | "Vertical";
|
|
36
35
|
readonly isOpen: boolean;
|
|
37
36
|
readonly isAnimated: boolean;
|
|
38
37
|
readonly isModal: boolean;
|
|
38
|
+
readonly orientation: "Vertical" | "Horizontal";
|
|
39
39
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
40
40
|
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
41
41
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
42
|
+
readonly searchQuery: string;
|
|
43
|
+
readonly searchVersion: number;
|
|
42
44
|
readonly maybeLastPointerPosition: Option.Option<{
|
|
43
45
|
readonly screenX: number;
|
|
44
46
|
readonly screenY: number;
|
|
45
47
|
}>;
|
|
46
|
-
readonly searchQuery: string;
|
|
47
|
-
readonly searchVersion: number;
|
|
48
48
|
readonly maybeLastButtonPointerType: Option.Option<string>;
|
|
49
49
|
} & {
|
|
50
50
|
readonly maybeSelectedItem: Option.Option<string>;
|
|
51
51
|
}, message: Message) => readonly [{
|
|
52
52
|
readonly id: string;
|
|
53
|
-
readonly orientation: "Horizontal" | "Vertical";
|
|
54
53
|
readonly isOpen: boolean;
|
|
55
54
|
readonly isAnimated: boolean;
|
|
56
55
|
readonly isModal: boolean;
|
|
56
|
+
readonly orientation: "Vertical" | "Horizontal";
|
|
57
57
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
58
58
|
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
59
59
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
60
|
+
readonly searchQuery: string;
|
|
61
|
+
readonly searchVersion: number;
|
|
60
62
|
readonly maybeLastPointerPosition: Option.Option<{
|
|
61
63
|
readonly screenX: number;
|
|
62
64
|
readonly screenY: number;
|
|
63
65
|
}>;
|
|
64
|
-
readonly searchQuery: string;
|
|
65
|
-
readonly searchVersion: number;
|
|
66
66
|
readonly maybeLastButtonPointerType: Option.Option<string>;
|
|
67
67
|
} & {
|
|
68
68
|
readonly maybeSelectedItem: Option.Option<string>;
|
|
69
69
|
}, readonly Readonly<{
|
|
70
70
|
name: string;
|
|
71
71
|
effect: import("effect/Effect").Effect<{
|
|
72
|
+
readonly _tag: "Opened";
|
|
73
|
+
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
74
|
+
} | {
|
|
72
75
|
readonly _tag: "Closed";
|
|
73
76
|
} | {
|
|
74
77
|
readonly _tag: "ClosedByTab";
|
|
75
|
-
} | {
|
|
76
|
-
readonly _tag: "DeactivatedItem";
|
|
77
|
-
} | {
|
|
78
|
-
readonly _tag: "CompletedLockScroll";
|
|
79
|
-
} | {
|
|
80
|
-
readonly _tag: "CompletedUnlockScroll";
|
|
81
|
-
} | {
|
|
82
|
-
readonly _tag: "CompletedSetupInert";
|
|
83
|
-
} | {
|
|
84
|
-
readonly _tag: "CompletedTeardownInert";
|
|
85
|
-
} | {
|
|
86
|
-
readonly _tag: "CompletedScrollIntoView";
|
|
87
|
-
} | {
|
|
88
|
-
readonly _tag: "CompletedClickItem";
|
|
89
|
-
} | {
|
|
90
|
-
readonly _tag: "AdvancedTransitionFrame";
|
|
91
|
-
} | {
|
|
92
|
-
readonly _tag: "EndedTransition";
|
|
93
|
-
} | {
|
|
94
|
-
readonly _tag: "CompletedFocusButton";
|
|
95
|
-
} | {
|
|
96
|
-
readonly _tag: "Opened";
|
|
97
|
-
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
98
78
|
} | {
|
|
99
79
|
readonly _tag: "ActivatedItem";
|
|
100
|
-
readonly index: number;
|
|
101
80
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
81
|
+
readonly index: number;
|
|
82
|
+
} | {
|
|
83
|
+
readonly _tag: "DeactivatedItem";
|
|
102
84
|
} | {
|
|
103
85
|
readonly _tag: "SelectedItem";
|
|
104
86
|
readonly item: string;
|
|
@@ -114,15 +96,33 @@ export declare const update: (model: {
|
|
|
114
96
|
readonly version: number;
|
|
115
97
|
} | {
|
|
116
98
|
readonly _tag: "MovedPointerOverItem";
|
|
117
|
-
readonly index: number;
|
|
118
99
|
readonly screenX: number;
|
|
119
100
|
readonly screenY: number;
|
|
101
|
+
readonly index: number;
|
|
102
|
+
} | {
|
|
103
|
+
readonly _tag: "CompletedLockScroll";
|
|
104
|
+
} | {
|
|
105
|
+
readonly _tag: "CompletedUnlockScroll";
|
|
106
|
+
} | {
|
|
107
|
+
readonly _tag: "CompletedSetupInert";
|
|
108
|
+
} | {
|
|
109
|
+
readonly _tag: "CompletedTeardownInert";
|
|
110
|
+
} | {
|
|
111
|
+
readonly _tag: "CompletedFocusButton";
|
|
120
112
|
} | {
|
|
121
113
|
readonly _tag: "CompletedFocusItems";
|
|
114
|
+
} | {
|
|
115
|
+
readonly _tag: "CompletedScrollIntoView";
|
|
116
|
+
} | {
|
|
117
|
+
readonly _tag: "CompletedClickItem";
|
|
122
118
|
} | {
|
|
123
119
|
readonly _tag: "IgnoredMouseClick";
|
|
124
120
|
} | {
|
|
125
121
|
readonly _tag: "SuppressedSpaceScroll";
|
|
122
|
+
} | {
|
|
123
|
+
readonly _tag: "AdvancedTransitionFrame";
|
|
124
|
+
} | {
|
|
125
|
+
readonly _tag: "EndedTransition";
|
|
126
126
|
} | {
|
|
127
127
|
readonly _tag: "DetectedButtonMovement";
|
|
128
128
|
} | {
|
|
@@ -140,19 +140,19 @@ export type ViewConfig<Message, Item> = BaseViewConfig<Message, Item, Model>;
|
|
|
140
140
|
export declare const view: <Message, Item>(config: Readonly<{
|
|
141
141
|
model: {
|
|
142
142
|
readonly id: string;
|
|
143
|
-
readonly orientation: "Horizontal" | "Vertical";
|
|
144
143
|
readonly isOpen: boolean;
|
|
145
144
|
readonly isAnimated: boolean;
|
|
146
145
|
readonly isModal: boolean;
|
|
146
|
+
readonly orientation: "Vertical" | "Horizontal";
|
|
147
147
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
148
148
|
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
149
149
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
150
|
+
readonly searchQuery: string;
|
|
151
|
+
readonly searchVersion: number;
|
|
150
152
|
readonly maybeLastPointerPosition: Option.Option<{
|
|
151
153
|
readonly screenX: number;
|
|
152
154
|
readonly screenY: number;
|
|
153
155
|
}>;
|
|
154
|
-
readonly searchQuery: string;
|
|
155
|
-
readonly searchVersion: number;
|
|
156
156
|
readonly maybeLastButtonPointerType: Option.Option<string>;
|
|
157
157
|
} & {
|
|
158
158
|
readonly maybeSelectedItem: Option.Option<string>;
|