foldkit 0.23.0 → 0.25.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/fieldValidation/index.d.ts +3 -4
- package/dist/fieldValidation/index.d.ts.map +1 -1
- package/dist/fieldValidation/index.js +11 -15
- package/dist/html/index.d.ts +42 -0
- package/dist/html/index.d.ts.map +1 -1
- package/dist/html/index.js +15 -3
- package/dist/html/lazy.d.ts +12 -0
- package/dist/html/lazy.d.ts.map +1 -0
- package/dist/html/lazy.js +35 -0
- package/dist/html/public.d.ts +1 -0
- package/dist/html/public.d.ts.map +1 -1
- package/dist/html/public.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/managedResource/index.d.ts +38 -0
- package/dist/managedResource/index.d.ts.map +1 -0
- package/dist/managedResource/index.js +20 -0
- package/dist/managedResource/public.d.ts +5 -0
- package/dist/managedResource/public.d.ts.map +1 -0
- package/dist/managedResource/public.js +2 -0
- package/dist/runtime/managedResource.d.ts +114 -0
- package/dist/runtime/managedResource.d.ts.map +1 -0
- package/dist/runtime/managedResource.js +92 -0
- package/dist/runtime/public.d.ts +2 -2
- package/dist/runtime/public.d.ts.map +1 -1
- package/dist/runtime/public.js +1 -1
- package/dist/runtime/runtime.d.ts +79 -90
- package/dist/runtime/runtime.d.ts.map +1 -1
- package/dist/runtime/runtime.js +95 -19
- package/dist/runtime/subscription.d.ts +25 -0
- package/dist/runtime/subscription.d.ts.map +1 -0
- package/dist/runtime/subscription.js +7 -0
- package/dist/struct/index.d.ts +2 -0
- package/dist/struct/index.d.ts.map +1 -1
- package/dist/struct/index.js +4 -0
- package/dist/struct/public.d.ts +1 -1
- package/dist/struct/public.d.ts.map +1 -1
- package/dist/struct/public.js +1 -1
- package/dist/subscription/public.d.ts +3 -0
- package/dist/subscription/public.d.ts.map +1 -0
- package/dist/subscription/public.js +1 -0
- package/dist/ui/disclosure/index.d.ts.map +1 -1
- package/dist/ui/disclosure/index.js +3 -2
- package/dist/ui/group.d.ts +8 -0
- package/dist/ui/group.d.ts.map +1 -0
- package/dist/ui/group.js +13 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +1 -0
- package/dist/ui/keyboard.d.ts +2 -0
- package/dist/ui/keyboard.d.ts.map +1 -1
- package/dist/ui/keyboard.js +2 -0
- package/dist/ui/listbox/multi.d.ts +172 -0
- package/dist/ui/listbox/multi.d.ts.map +1 -0
- package/dist/ui/listbox/multi.js +25 -0
- package/dist/ui/listbox/multiPublic.d.ts +3 -0
- package/dist/ui/listbox/multiPublic.d.ts.map +1 -0
- package/dist/ui/listbox/multiPublic.js +1 -0
- package/dist/ui/listbox/public.d.ts +7 -0
- package/dist/ui/listbox/public.d.ts.map +1 -0
- package/dist/ui/listbox/public.js +3 -0
- package/dist/ui/listbox/shared.d.ts +236 -0
- package/dist/ui/listbox/shared.d.ts.map +1 -0
- package/dist/ui/listbox/shared.js +519 -0
- package/dist/ui/listbox/single.d.ts +172 -0
- package/dist/ui/listbox/single.d.ts.map +1 -0
- package/dist/ui/listbox/single.js +29 -0
- package/dist/ui/menu/index.d.ts +4 -9
- package/dist/ui/menu/index.d.ts.map +1 -1
- package/dist/ui/menu/index.js +9 -29
- package/dist/ui/typeahead.d.ts +4 -0
- package/dist/ui/typeahead.d.ts.map +1 -0
- package/dist/ui/typeahead.js +14 -0
- package/package.json +13 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/struct/index.ts"],"names":[],"mappings":"AAEA,KAAK,eAAe,CAAC,CAAC,IAAI,OAAO,CAAC;KAC/B,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AAEF,KAAK,UAAU,CAAC,CAAC,EAAE,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Ae,CAAC,UAAU,CAAC,KACtC,KAE+C,CAAA"}
|
package/dist/struct/index.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { Struct } from 'effect';
|
|
2
2
|
/** Immutably updates fields of a struct by applying transform functions. Wraps Effect's `Struct.evolve` with stricter key checking. */
|
|
3
3
|
export const evo = Struct.evolve;
|
|
4
|
+
/** Creates a variant of `evo` whose transforms are checked against a supertype. Useful in generic contexts where `evo`'s `StrictKeys` can't resolve `keyof` on an open type parameter. The returned function evolves a subtype model, preserving all fields not in the transform, and returns the subtype. */
|
|
5
|
+
export const makeConstrainedEvo = () => (model, transforms) =>
|
|
6
|
+
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
7
|
+
Struct.evolve(model, transforms);
|
package/dist/struct/public.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { evo } from './index';
|
|
1
|
+
export { evo, makeConstrainedEvo } from './index';
|
|
2
2
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/struct/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/struct/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA"}
|
package/dist/struct/public.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { evo } from './index';
|
|
1
|
+
export { evo, makeConstrainedEvo } from './index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/subscription/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAE3D,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { makeSubscriptions } from '../runtime/subscription';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/disclosure/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAEhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAO/C,kGAAkG;AAClG,eAAO,MAAM,KAAK;;;EAGhB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,iFAAiF;AACjF,eAAO,MAAM,OAAO,4DAAe,CAAA;AACnC,gFAAgF;AAChF,eAAO,MAAM,MAAM,2DAAc,CAAA;AACjC,kGAAkG;AAClG,eAAO,MAAM,IAAI,yDAAY,CAAA;AAE7B,kEAAkE;AAClE,eAAO,MAAM,OAAO,2LAAiC,CAAA;AAErD,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AACzC,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAA;AACvC,MAAM,MAAM,IAAI,GAAG,OAAO,IAAI,CAAC,IAAI,CAAA;AAEnC,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AAIzC,iEAAiE;AACjE,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC,CAAA;AAEF,6EAA6E;AAC7E,eAAO,MAAM,IAAI,GAAI,QAAQ,UAAU,KAAG,KAGxC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/disclosure/index.ts"],"names":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,CAAA;IACZ,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,KAAK,OAAO,CAAA;IACxD,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,IAAI,CAAA;IACnB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,IAAI,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC,CAAA;AAEF,oGAAoG;AACpG,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,QAAQ,UAAU,CAAC,OAAO,CAAC,KAAG,IAyF3D,CAAA"}
|
|
@@ -25,18 +25,19 @@ export const init = (config) => ({
|
|
|
25
25
|
});
|
|
26
26
|
// UPDATE
|
|
27
27
|
const buttonId = (id) => `${id}-button`;
|
|
28
|
+
const buttonSelector = (id) => `#${CSS.escape(buttonId(id))}`;
|
|
28
29
|
const panelId = (id) => `${id}-panel`;
|
|
29
30
|
/** Processes a disclosure message and returns the next model and commands. */
|
|
30
31
|
export const update = (model, message) => M.value(message).pipe(M.withReturnType(), M.tagsExhaustive({
|
|
31
32
|
Toggled: () => {
|
|
32
|
-
const maybeFocus = Option.liftPredicate(Task.focus(
|
|
33
|
+
const maybeFocus = Option.liftPredicate(Task.focus(buttonSelector(model.id)).pipe(Effect.ignore, Effect.as(NoOp())), () => model.isOpen);
|
|
33
34
|
return [
|
|
34
35
|
evo(model, { isOpen: () => !model.isOpen }),
|
|
35
36
|
Option.toArray(maybeFocus),
|
|
36
37
|
];
|
|
37
38
|
},
|
|
38
39
|
Closed: () => {
|
|
39
|
-
const maybeFocus = Option.liftPredicate(Task.focus(
|
|
40
|
+
const maybeFocus = Option.liftPredicate(Task.focus(buttonSelector(model.id)).pipe(Effect.ignore, Effect.as(NoOp())), () => model.isOpen);
|
|
40
41
|
return [evo(model, { isOpen: () => false }), Option.toArray(maybeFocus)];
|
|
41
42
|
},
|
|
42
43
|
NoOp: () => [model, []],
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** A contiguous segment of items sharing the same group key. */
|
|
2
|
+
export type Segment<A> = Readonly<{
|
|
3
|
+
key: string;
|
|
4
|
+
items: ReadonlyArray<A>;
|
|
5
|
+
}>;
|
|
6
|
+
/** Groups items into contiguous segments by a key function. Adjacent items with the same key are collected into a single segment. */
|
|
7
|
+
export declare const groupContiguous: <A>(items: ReadonlyArray<A>, toKey: (item: A, index: number) => string) => ReadonlyArray<Segment<A>>;
|
|
8
|
+
//# sourceMappingURL=group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../src/ui/group.ts"],"names":[],"mappings":"AAEA,gEAAgE;AAChE,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,QAAQ,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;CAAE,CAAC,CAAA;AAE3E,qIAAqI;AACrI,eAAO,MAAM,eAAe,GAAI,CAAC,EAC/B,OAAO,aAAa,CAAC,CAAC,CAAC,EACvB,OAAO,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,KACxC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAW1B,CAAA"}
|
package/dist/ui/group.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Array } from 'effect';
|
|
2
|
+
/** Groups items into contiguous segments by a key function. Adjacent items with the same key are collected into a single segment. */
|
|
3
|
+
export const groupContiguous = (items, toKey) => {
|
|
4
|
+
const tagged = Array.map(items, (item, index) => ({
|
|
5
|
+
key: toKey(item, index),
|
|
6
|
+
item,
|
|
7
|
+
}));
|
|
8
|
+
return Array.chop(tagged, nonEmpty => {
|
|
9
|
+
const key = Array.headNonEmpty(nonEmpty).key;
|
|
10
|
+
const [matching, rest] = Array.span(nonEmpty, tagged => tagged.key === key);
|
|
11
|
+
return [{ key, items: Array.map(matching, ({ item }) => item) }, rest];
|
|
12
|
+
});
|
|
13
|
+
};
|
package/dist/ui/index.d.ts
CHANGED
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AACzC,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAA;AACjD,OAAO,KAAK,IAAI,MAAM,eAAe,CAAA;AACrC,OAAO,KAAK,IAAI,MAAM,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AACzC,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAA;AACjD,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAA;AAC3C,OAAO,KAAK,IAAI,MAAM,eAAe,CAAA;AACrC,OAAO,KAAK,IAAI,MAAM,eAAe,CAAA"}
|
package/dist/ui/index.js
CHANGED
package/dist/ui/keyboard.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Whether a keyboard event key is a single printable character (not a named key like "Enter" or "ArrowDown"). */
|
|
2
|
+
export declare const isPrintableKey: (key: string) => boolean;
|
|
1
3
|
export declare const wrapIndex: (index: number, length: number) => number;
|
|
2
4
|
export declare const findFirstEnabledIndex: (itemCount: number, focusedIndex: number, isDisabled: (index: number) => boolean) => (startIndex: number, direction: 1 | -1) => number;
|
|
3
5
|
export declare const keyToIndex: (nextKey: string, previousKey: string, itemCount: number, focusedIndex: number, isDisabled: (index: number) => boolean) => ((key: string) => number);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../src/ui/keyboard.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,EAAE,QAAQ,MAAM,KAAG,MACpB,CAAA;AAEtC,eAAO,MAAM,qBAAqB,GAE9B,WAAW,MAAM,EACjB,cAAc,MAAM,EACpB,YAAY,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,MAEvC,YAAY,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,KAAG,MAMtC,CAAA;AAEL,eAAO,MAAM,UAAU,GACrB,SAAS,MAAM,EACf,aAAa,MAAM,EACnB,WAAW,MAAM,EACjB,cAAc,MAAM,EACpB,YAAY,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,KACrC,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAW1B,CAAA"}
|
|
1
|
+
{"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../src/ui/keyboard.ts"],"names":[],"mappings":"AAEA,kHAAkH;AAClH,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,KAAG,OAA2B,CAAA;AAExE,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,EAAE,QAAQ,MAAM,KAAG,MACpB,CAAA;AAEtC,eAAO,MAAM,qBAAqB,GAE9B,WAAW,MAAM,EACjB,cAAc,MAAM,EACpB,YAAY,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,MAEvC,YAAY,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,KAAG,MAMtC,CAAA;AAEL,eAAO,MAAM,UAAU,GACrB,SAAS,MAAM,EACf,aAAa,MAAM,EACnB,WAAW,MAAM,EACjB,cAAc,MAAM,EACpB,YAAY,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,KACrC,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAW1B,CAAA"}
|
package/dist/ui/keyboard.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Array, Match as M, Option, Predicate, pipe } from 'effect';
|
|
2
|
+
/** Whether a keyboard event key is a single printable character (not a named key like "Enter" or "ArrowDown"). */
|
|
3
|
+
export const isPrintableKey = (key) => key.length === 1;
|
|
2
4
|
export const wrapIndex = (index, length) => ((index % length) + length) % length;
|
|
3
5
|
export const findFirstEnabledIndex = (itemCount, focusedIndex, isDisabled) => (startIndex, direction) => pipe(itemCount, Array.makeBy(step => wrapIndex(startIndex + step * direction, itemCount)), Array.findFirst(Predicate.not(isDisabled)), Option.getOrElse(() => focusedIndex));
|
|
4
6
|
export const keyToIndex = (nextKey, previousKey, itemCount, focusedIndex, isDisabled) => {
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { Option, Schema as S } from 'effect';
|
|
2
|
+
import { type BaseInitConfig, type BaseViewConfig } from './shared';
|
|
3
|
+
/** Schema for the multi-select listbox component's state, tracking open/closed status, active item, selected items, activation trigger, and typeahead search. */
|
|
4
|
+
export declare const Model: S.extend<S.Struct<{
|
|
5
|
+
id: typeof S.String;
|
|
6
|
+
isOpen: typeof S.Boolean;
|
|
7
|
+
isAnimated: typeof S.Boolean;
|
|
8
|
+
isModal: typeof S.Boolean;
|
|
9
|
+
orientation: S.Literal<["Vertical", "Horizontal"]>;
|
|
10
|
+
transitionState: S.Literal<["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
11
|
+
maybeActiveItemIndex: S.OptionFromSelf<typeof S.Number>;
|
|
12
|
+
activationTrigger: S.Literal<["Pointer", "Keyboard"]>;
|
|
13
|
+
searchQuery: typeof S.String;
|
|
14
|
+
searchVersion: typeof S.Number;
|
|
15
|
+
maybeLastPointerPosition: S.OptionFromSelf<S.Struct<{
|
|
16
|
+
screenX: typeof S.Number;
|
|
17
|
+
screenY: typeof S.Number;
|
|
18
|
+
}>>;
|
|
19
|
+
maybeLastButtonPointerType: S.OptionFromSelf<typeof S.String>;
|
|
20
|
+
}>, S.Struct<{
|
|
21
|
+
selectedItems: S.Array$<typeof S.String>;
|
|
22
|
+
}>>;
|
|
23
|
+
export type Model = typeof Model.Type;
|
|
24
|
+
/** Configuration for creating a multi-select listbox model with `init`. `isAnimated` enables CSS transition coordination (default `false`). `isModal` locks page scroll and inerts other elements when open (default `false`). `selectedItems` sets the initial selection (default `[]`). */
|
|
25
|
+
export type InitConfig = BaseInitConfig & Readonly<{
|
|
26
|
+
selectedItems?: ReadonlyArray<string>;
|
|
27
|
+
}>;
|
|
28
|
+
/** Creates an initial multi-select listbox model from a config. Defaults to closed with no active item and no selection. */
|
|
29
|
+
export declare const init: (config: InitConfig) => Model;
|
|
30
|
+
/** Processes a listbox message and returns the next model and commands. Stays open on selection and toggles item membership (multi-select behavior). */
|
|
31
|
+
export declare const update: (model: {
|
|
32
|
+
readonly id: string;
|
|
33
|
+
readonly isOpen: boolean;
|
|
34
|
+
readonly isAnimated: boolean;
|
|
35
|
+
readonly isModal: boolean;
|
|
36
|
+
readonly orientation: "Vertical" | "Horizontal";
|
|
37
|
+
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
38
|
+
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
39
|
+
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
40
|
+
readonly searchQuery: string;
|
|
41
|
+
readonly searchVersion: number;
|
|
42
|
+
readonly maybeLastPointerPosition: Option.Option<{
|
|
43
|
+
readonly screenX: number;
|
|
44
|
+
readonly screenY: number;
|
|
45
|
+
}>;
|
|
46
|
+
readonly maybeLastButtonPointerType: Option.Option<string>;
|
|
47
|
+
} & {
|
|
48
|
+
readonly selectedItems: readonly string[];
|
|
49
|
+
}, message: import("./shared").Message) => [{
|
|
50
|
+
readonly id: string;
|
|
51
|
+
readonly isOpen: boolean;
|
|
52
|
+
readonly isAnimated: boolean;
|
|
53
|
+
readonly isModal: boolean;
|
|
54
|
+
readonly orientation: "Vertical" | "Horizontal";
|
|
55
|
+
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
56
|
+
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
57
|
+
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
58
|
+
readonly searchQuery: string;
|
|
59
|
+
readonly searchVersion: number;
|
|
60
|
+
readonly maybeLastPointerPosition: Option.Option<{
|
|
61
|
+
readonly screenX: number;
|
|
62
|
+
readonly screenY: number;
|
|
63
|
+
}>;
|
|
64
|
+
readonly maybeLastButtonPointerType: Option.Option<string>;
|
|
65
|
+
} & {
|
|
66
|
+
readonly selectedItems: readonly string[];
|
|
67
|
+
}, readonly import("../../command").Command<{
|
|
68
|
+
readonly _tag: "Closed";
|
|
69
|
+
} | {
|
|
70
|
+
readonly _tag: "NoOp";
|
|
71
|
+
} | {
|
|
72
|
+
readonly _tag: "Opened";
|
|
73
|
+
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
74
|
+
} | {
|
|
75
|
+
readonly _tag: "ClosedByTab";
|
|
76
|
+
} | {
|
|
77
|
+
readonly _tag: "ActivatedItem";
|
|
78
|
+
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
79
|
+
readonly index: number;
|
|
80
|
+
} | {
|
|
81
|
+
readonly _tag: "DeactivatedItem";
|
|
82
|
+
} | {
|
|
83
|
+
readonly _tag: "SelectedItem";
|
|
84
|
+
readonly item: string;
|
|
85
|
+
} | {
|
|
86
|
+
readonly _tag: "MovedPointerOverItem";
|
|
87
|
+
readonly screenX: number;
|
|
88
|
+
readonly screenY: number;
|
|
89
|
+
readonly index: number;
|
|
90
|
+
} | {
|
|
91
|
+
readonly _tag: "RequestedItemClick";
|
|
92
|
+
readonly index: number;
|
|
93
|
+
} | {
|
|
94
|
+
readonly _tag: "Searched";
|
|
95
|
+
readonly key: string;
|
|
96
|
+
readonly maybeTargetIndex: Option.Option<number>;
|
|
97
|
+
} | {
|
|
98
|
+
readonly _tag: "ClearedSearch";
|
|
99
|
+
readonly version: number;
|
|
100
|
+
} | {
|
|
101
|
+
readonly _tag: "AdvancedTransitionFrame";
|
|
102
|
+
} | {
|
|
103
|
+
readonly _tag: "EndedTransition";
|
|
104
|
+
} | {
|
|
105
|
+
readonly _tag: "DetectedButtonMovement";
|
|
106
|
+
} | {
|
|
107
|
+
readonly _tag: "PressedPointerOnButton";
|
|
108
|
+
readonly button: number;
|
|
109
|
+
readonly pointerType: string;
|
|
110
|
+
}>[]];
|
|
111
|
+
/** Configuration for rendering a multi-select listbox with `view`. */
|
|
112
|
+
export type ViewConfig<Message, Item> = BaseViewConfig<Message, Item, Model>;
|
|
113
|
+
/** Renders a headless multi-select listbox with typeahead search, keyboard navigation, selection tracking, and aria-activedescendant focus management. */
|
|
114
|
+
export declare const view: <Message, Item>(config: Readonly<{
|
|
115
|
+
model: {
|
|
116
|
+
readonly id: string;
|
|
117
|
+
readonly isOpen: boolean;
|
|
118
|
+
readonly isAnimated: boolean;
|
|
119
|
+
readonly isModal: boolean;
|
|
120
|
+
readonly orientation: "Vertical" | "Horizontal";
|
|
121
|
+
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
122
|
+
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
123
|
+
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
124
|
+
readonly searchQuery: string;
|
|
125
|
+
readonly searchVersion: number;
|
|
126
|
+
readonly maybeLastPointerPosition: Option.Option<{
|
|
127
|
+
readonly screenX: number;
|
|
128
|
+
readonly screenY: number;
|
|
129
|
+
}>;
|
|
130
|
+
readonly maybeLastButtonPointerType: Option.Option<string>;
|
|
131
|
+
} & {
|
|
132
|
+
readonly selectedItems: readonly string[];
|
|
133
|
+
};
|
|
134
|
+
toMessage: (message: import("./shared").Opened | import("./shared").Closed | import("./shared").ClosedByTab | import("./shared").ActivatedItem | import("./shared").DeactivatedItem | import("./shared").SelectedItem | import("./shared").MovedPointerOverItem | import("./shared").RequestedItemClick | import("./shared").Searched | import("./shared").PressedPointerOnButton | import("./shared").NoOp) => Message;
|
|
135
|
+
items: readonly Item[];
|
|
136
|
+
itemToConfig: (item: Item, context: Readonly<{
|
|
137
|
+
isActive: boolean;
|
|
138
|
+
isDisabled: boolean;
|
|
139
|
+
isSelected: boolean;
|
|
140
|
+
}>) => Readonly<{
|
|
141
|
+
className: string;
|
|
142
|
+
content: import("../../html").Html;
|
|
143
|
+
}>;
|
|
144
|
+
isItemDisabled?: (item: Item, index: number) => boolean;
|
|
145
|
+
itemToSearchText?: (item: Item, index: number) => string;
|
|
146
|
+
itemToValue?: (item: Item) => string;
|
|
147
|
+
isButtonDisabled?: boolean;
|
|
148
|
+
buttonContent: import("../../html").Html;
|
|
149
|
+
buttonClassName: string;
|
|
150
|
+
itemsClassName: string;
|
|
151
|
+
backdropClassName: string;
|
|
152
|
+
className?: string;
|
|
153
|
+
itemGroupKey?: (item: Item, index: number) => string;
|
|
154
|
+
groupToHeading?: (groupKey: string) => Readonly<{
|
|
155
|
+
content: import("../../html").Html;
|
|
156
|
+
className: string;
|
|
157
|
+
}> | undefined;
|
|
158
|
+
groupClassName?: string;
|
|
159
|
+
separatorClassName?: string;
|
|
160
|
+
anchor?: Readonly<{
|
|
161
|
+
placement?: import("@floating-ui/dom").Placement;
|
|
162
|
+
gap?: number;
|
|
163
|
+
offset?: number;
|
|
164
|
+
padding?: number;
|
|
165
|
+
portal?: boolean;
|
|
166
|
+
}>;
|
|
167
|
+
name?: string;
|
|
168
|
+
form?: string;
|
|
169
|
+
isDisabled?: boolean;
|
|
170
|
+
isInvalid?: boolean;
|
|
171
|
+
}>) => import("../../html").Html;
|
|
172
|
+
//# sourceMappingURL=multi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/multi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,IAAI,CAAC,EAAQ,MAAM,QAAQ,CAAA;AAGzD,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,cAAc,EAIpB,MAAM,UAAU,CAAA;AAIjB,iKAAiK;AACjK,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;GAEjB,CAAA;AAED,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,6RAA6R;AAC7R,MAAM,MAAM,UAAU,GAAG,cAAc,GACrC,QAAQ,CAAC;IACP,aAAa,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CACtC,CAAC,CAAA;AAEJ,4HAA4H;AAC5H,eAAO,MAAM,IAAI,GAAI,QAAQ,UAAU,KAAG,KAGxC,CAAA;AAIF,wJAAwJ;AACxJ,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAMjB,CAAA;AAIF,sEAAsE;AACtE,MAAM,MAAM,UAAU,CAAC,OAAO,EAAE,IAAI,IAAI,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;AAE5E,0JAA0J;AAC1J,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAYf,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Array, Option, Schema as S, pipe } from 'effect';
|
|
2
|
+
import { evo } from '../../struct';
|
|
3
|
+
import { BaseModel, baseInit, makeUpdate, makeView, } from './shared';
|
|
4
|
+
// MODEL
|
|
5
|
+
/** Schema for the multi-select listbox component's state, tracking open/closed status, active item, selected items, activation trigger, and typeahead search. */
|
|
6
|
+
export const Model = BaseModel.pipe(S.extend(S.Struct({ selectedItems: S.Array(S.String) })));
|
|
7
|
+
/** Creates an initial multi-select listbox model from a config. Defaults to closed with no active item and no selection. */
|
|
8
|
+
export const init = (config) => ({
|
|
9
|
+
...baseInit(config),
|
|
10
|
+
selectedItems: config.selectedItems ?? [],
|
|
11
|
+
});
|
|
12
|
+
// UPDATE
|
|
13
|
+
/** Processes a listbox message and returns the next model and commands. Stays open on selection and toggles item membership (multi-select behavior). */
|
|
14
|
+
export const update = makeUpdate((model, item) => {
|
|
15
|
+
const nextSelectedItems = Array.contains(model.selectedItems, item)
|
|
16
|
+
? Array.filter(model.selectedItems, selected => selected !== item)
|
|
17
|
+
: Array.append(model.selectedItems, item);
|
|
18
|
+
return [evo(model, { selectedItems: () => nextSelectedItems }), []];
|
|
19
|
+
});
|
|
20
|
+
/** Renders a headless multi-select listbox with typeahead search, keyboard navigation, selection tracking, and aria-activedescendant focus management. */
|
|
21
|
+
export const view = makeView({
|
|
22
|
+
isItemSelected: (model, itemValue) => Array.contains(model.selectedItems, itemValue),
|
|
23
|
+
selectedItemIndex: (model, items, itemToValue) => pipe(model.selectedItems, Array.head, Option.flatMap(selectedItem => Array.findFirstIndex(items, item => itemToValue(item) === selectedItem))),
|
|
24
|
+
ariaMultiSelectable: true,
|
|
25
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multiPublic.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/multiPublic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACnD,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { init, update, view, Model } from './multi';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { init, update, view, Model } from './single';
|
|
2
|
+
export { Message, TransitionState, Orientation } from './shared';
|
|
3
|
+
export type { ActivationTrigger, Opened, Closed, ClosedByTab, ActivatedItem, DeactivatedItem, SelectedItem, MovedPointerOverItem, Searched, ClearedSearch, NoOp, AdvancedTransitionFrame, EndedTransition, ItemConfig, GroupHeading, } from './shared';
|
|
4
|
+
export type { InitConfig, ViewConfig } from './single';
|
|
5
|
+
export type { AnchorConfig } from '../menu/anchor';
|
|
6
|
+
export * as Multi from './multiPublic';
|
|
7
|
+
//# sourceMappingURL=public.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAEpD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAEhE,YAAY,EACV,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,WAAW,EACX,aAAa,EACb,eAAe,EACf,YAAY,EACZ,oBAAoB,EACpB,QAAQ,EACR,aAAa,EACb,IAAI,EACJ,uBAAuB,EACvB,eAAe,EACf,UAAU,EACV,YAAY,GACb,MAAM,UAAU,CAAA;AAEjB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAEtD,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA"}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { Option, Schema as S } from 'effect';
|
|
2
|
+
import type { Command } from '../../command';
|
|
3
|
+
import { type Html } from '../../html';
|
|
4
|
+
import type { AnchorConfig } from '../menu/anchor';
|
|
5
|
+
import { resolveTypeaheadMatch } from '../typeahead';
|
|
6
|
+
export { resolveTypeaheadMatch };
|
|
7
|
+
/** Schema for the activation trigger — whether the user interacted via mouse or keyboard. */
|
|
8
|
+
export declare const ActivationTrigger: S.Literal<["Pointer", "Keyboard"]>;
|
|
9
|
+
export type ActivationTrigger = typeof ActivationTrigger.Type;
|
|
10
|
+
/** Schema for the transition animation state, tracking enter/leave phases for CSS transition coordination. */
|
|
11
|
+
export declare const TransitionState: S.Literal<["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
12
|
+
export type TransitionState = typeof TransitionState.Type;
|
|
13
|
+
/** Schema for the listbox orientation — whether items flow vertically or horizontally. */
|
|
14
|
+
export declare const Orientation: S.Literal<["Vertical", "Horizontal"]>;
|
|
15
|
+
export type Orientation = typeof Orientation.Type;
|
|
16
|
+
/** Schema fields shared by all listbox variants (single-select and multi-select). Spread into each variant's `S.Struct` to avoid duplicating field definitions. */
|
|
17
|
+
export declare const BaseModel: S.Struct<{
|
|
18
|
+
id: typeof S.String;
|
|
19
|
+
isOpen: typeof S.Boolean;
|
|
20
|
+
isAnimated: typeof S.Boolean;
|
|
21
|
+
isModal: typeof S.Boolean;
|
|
22
|
+
orientation: S.Literal<["Vertical", "Horizontal"]>;
|
|
23
|
+
transitionState: S.Literal<["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
24
|
+
maybeActiveItemIndex: S.OptionFromSelf<typeof S.Number>;
|
|
25
|
+
activationTrigger: S.Literal<["Pointer", "Keyboard"]>;
|
|
26
|
+
searchQuery: typeof S.String;
|
|
27
|
+
searchVersion: typeof S.Number;
|
|
28
|
+
maybeLastPointerPosition: S.OptionFromSelf<S.Struct<{
|
|
29
|
+
screenX: typeof S.Number;
|
|
30
|
+
screenY: typeof S.Number;
|
|
31
|
+
}>>;
|
|
32
|
+
maybeLastButtonPointerType: S.OptionFromSelf<typeof S.String>;
|
|
33
|
+
}>;
|
|
34
|
+
export type BaseModel = typeof BaseModel.Type;
|
|
35
|
+
/** Configuration fields shared by all listbox variant `init` functions. */
|
|
36
|
+
export type BaseInitConfig = Readonly<{
|
|
37
|
+
id: string;
|
|
38
|
+
isAnimated?: boolean;
|
|
39
|
+
isModal?: boolean;
|
|
40
|
+
orientation?: typeof Orientation.Type;
|
|
41
|
+
}>;
|
|
42
|
+
/** Creates the shared base fields for a listbox model from a config. Each variant spreads this and adds its selection field. */
|
|
43
|
+
export declare const baseInit: (config: BaseInitConfig) => BaseModel;
|
|
44
|
+
/** Sent when the listbox opens via button click or keyboard. Contains an optional initial active item index — None for pointer, Some for keyboard. */
|
|
45
|
+
export declare const Opened: import("../../schema").CallableTaggedStruct<"Opened", {
|
|
46
|
+
maybeActiveItemIndex: S.OptionFromSelf<typeof S.Number>;
|
|
47
|
+
}>;
|
|
48
|
+
/** Sent when the listbox closes via Escape key or backdrop click. */
|
|
49
|
+
export declare const Closed: import("../../schema").CallableTaggedStruct<"Closed", {}>;
|
|
50
|
+
/** Sent when focus leaves the listbox items container via Tab key or blur. */
|
|
51
|
+
export declare const ClosedByTab: import("../../schema").CallableTaggedStruct<"ClosedByTab", {}>;
|
|
52
|
+
/** Sent when an item is highlighted via arrow keys or mouse hover. Includes activation trigger. */
|
|
53
|
+
export declare const ActivatedItem: import("../../schema").CallableTaggedStruct<"ActivatedItem", {
|
|
54
|
+
index: typeof S.Number;
|
|
55
|
+
activationTrigger: S.Literal<["Pointer", "Keyboard"]>;
|
|
56
|
+
}>;
|
|
57
|
+
/** Sent when the mouse leaves an enabled item. */
|
|
58
|
+
export declare const DeactivatedItem: import("../../schema").CallableTaggedStruct<"DeactivatedItem", {}>;
|
|
59
|
+
/** Sent when an item is selected via Enter, Space, or click. Contains the item's string value. */
|
|
60
|
+
export declare const SelectedItem: import("../../schema").CallableTaggedStruct<"SelectedItem", {
|
|
61
|
+
item: typeof S.String;
|
|
62
|
+
}>;
|
|
63
|
+
/** Sent when Enter or Space is pressed on the active item, triggering a programmatic click on the DOM element. */
|
|
64
|
+
export declare const RequestedItemClick: import("../../schema").CallableTaggedStruct<"RequestedItemClick", {
|
|
65
|
+
index: typeof S.Number;
|
|
66
|
+
}>;
|
|
67
|
+
/** Sent when a printable character is typed for typeahead search. */
|
|
68
|
+
export declare const Searched: import("../../schema").CallableTaggedStruct<"Searched", {
|
|
69
|
+
key: typeof S.String;
|
|
70
|
+
maybeTargetIndex: S.OptionFromSelf<typeof S.Number>;
|
|
71
|
+
}>;
|
|
72
|
+
/** Sent after the search debounce period to clear the accumulated query. */
|
|
73
|
+
export declare const ClearedSearch: import("../../schema").CallableTaggedStruct<"ClearedSearch", {
|
|
74
|
+
version: typeof S.Number;
|
|
75
|
+
}>;
|
|
76
|
+
/** Sent when the pointer moves over a listbox item, carrying screen coordinates for tracked-pointer comparison. */
|
|
77
|
+
export declare const MovedPointerOverItem: import("../../schema").CallableTaggedStruct<"MovedPointerOverItem", {
|
|
78
|
+
index: typeof S.Number;
|
|
79
|
+
screenX: typeof S.Number;
|
|
80
|
+
screenY: typeof S.Number;
|
|
81
|
+
}>;
|
|
82
|
+
/** Placeholder message used when no action is needed. */
|
|
83
|
+
export declare const NoOp: import("../../schema").CallableTaggedStruct<"NoOp", {}>;
|
|
84
|
+
/** Sent internally when a double-rAF completes, advancing the transition to its animating phase. */
|
|
85
|
+
export declare const AdvancedTransitionFrame: import("../../schema").CallableTaggedStruct<"AdvancedTransitionFrame", {}>;
|
|
86
|
+
/** Sent internally when all CSS transitions on the listbox items container have completed. */
|
|
87
|
+
export declare const EndedTransition: import("../../schema").CallableTaggedStruct<"EndedTransition", {}>;
|
|
88
|
+
/** Sent internally when the listbox button moves in the viewport during a leave transition, cancelling the animation. */
|
|
89
|
+
export declare const DetectedButtonMovement: import("../../schema").CallableTaggedStruct<"DetectedButtonMovement", {}>;
|
|
90
|
+
/** Sent when the user presses a pointer device on the listbox button. Records pointer type for click handling. */
|
|
91
|
+
export declare const PressedPointerOnButton: import("../../schema").CallableTaggedStruct<"PressedPointerOnButton", {
|
|
92
|
+
pointerType: typeof S.String;
|
|
93
|
+
button: typeof S.Number;
|
|
94
|
+
}>;
|
|
95
|
+
/** Union of all messages the listbox component can produce. */
|
|
96
|
+
export declare const Message: S.Union<[import("../../schema").CallableTaggedStruct<"Opened", {
|
|
97
|
+
maybeActiveItemIndex: S.OptionFromSelf<typeof S.Number>;
|
|
98
|
+
}>, import("../../schema").CallableTaggedStruct<"Closed", {}>, import("../../schema").CallableTaggedStruct<"ClosedByTab", {}>, import("../../schema").CallableTaggedStruct<"ActivatedItem", {
|
|
99
|
+
index: typeof S.Number;
|
|
100
|
+
activationTrigger: S.Literal<["Pointer", "Keyboard"]>;
|
|
101
|
+
}>, import("../../schema").CallableTaggedStruct<"DeactivatedItem", {}>, import("../../schema").CallableTaggedStruct<"SelectedItem", {
|
|
102
|
+
item: typeof S.String;
|
|
103
|
+
}>, import("../../schema").CallableTaggedStruct<"MovedPointerOverItem", {
|
|
104
|
+
index: typeof S.Number;
|
|
105
|
+
screenX: typeof S.Number;
|
|
106
|
+
screenY: typeof S.Number;
|
|
107
|
+
}>, import("../../schema").CallableTaggedStruct<"RequestedItemClick", {
|
|
108
|
+
index: typeof S.Number;
|
|
109
|
+
}>, import("../../schema").CallableTaggedStruct<"Searched", {
|
|
110
|
+
key: typeof S.String;
|
|
111
|
+
maybeTargetIndex: S.OptionFromSelf<typeof S.Number>;
|
|
112
|
+
}>, import("../../schema").CallableTaggedStruct<"ClearedSearch", {
|
|
113
|
+
version: typeof S.Number;
|
|
114
|
+
}>, import("../../schema").CallableTaggedStruct<"NoOp", {}>, import("../../schema").CallableTaggedStruct<"AdvancedTransitionFrame", {}>, import("../../schema").CallableTaggedStruct<"EndedTransition", {}>, import("../../schema").CallableTaggedStruct<"DetectedButtonMovement", {}>, import("../../schema").CallableTaggedStruct<"PressedPointerOnButton", {
|
|
115
|
+
pointerType: typeof S.String;
|
|
116
|
+
button: typeof S.Number;
|
|
117
|
+
}>]>;
|
|
118
|
+
export type Opened = typeof Opened.Type;
|
|
119
|
+
export type Closed = typeof Closed.Type;
|
|
120
|
+
export type ClosedByTab = typeof ClosedByTab.Type;
|
|
121
|
+
export type ActivatedItem = typeof ActivatedItem.Type;
|
|
122
|
+
export type DeactivatedItem = typeof DeactivatedItem.Type;
|
|
123
|
+
export type SelectedItem = typeof SelectedItem.Type;
|
|
124
|
+
export type MovedPointerOverItem = typeof MovedPointerOverItem.Type;
|
|
125
|
+
export type RequestedItemClick = typeof RequestedItemClick.Type;
|
|
126
|
+
export type Searched = typeof Searched.Type;
|
|
127
|
+
export type ClearedSearch = typeof ClearedSearch.Type;
|
|
128
|
+
export type NoOp = typeof NoOp.Type;
|
|
129
|
+
export type AdvancedTransitionFrame = typeof AdvancedTransitionFrame.Type;
|
|
130
|
+
export type EndedTransition = typeof EndedTransition.Type;
|
|
131
|
+
export type DetectedButtonMovement = typeof DetectedButtonMovement.Type;
|
|
132
|
+
export type PressedPointerOnButton = typeof PressedPointerOnButton.Type;
|
|
133
|
+
export type Message = typeof Message.Type;
|
|
134
|
+
export declare const SEARCH_DEBOUNCE_MILLISECONDS = 350;
|
|
135
|
+
export declare const LEFT_MOUSE_BUTTON = 0;
|
|
136
|
+
export declare const buttonSelector: (id: string) => string;
|
|
137
|
+
export declare const itemsSelector: (id: string) => string;
|
|
138
|
+
export declare const itemSelector: (id: string, index: number) => string;
|
|
139
|
+
export declare const itemId: (id: string, index: number) => string;
|
|
140
|
+
export declare const closedModel: <Model extends BaseModel>(model: Model) => Model;
|
|
141
|
+
type SelectedItemContext = Readonly<{
|
|
142
|
+
focusButton: Command<Message>;
|
|
143
|
+
maybeNextFrame: Option.Option<Command<Message>>;
|
|
144
|
+
maybeUnlockScroll: Option.Option<Command<Message>>;
|
|
145
|
+
maybeRestoreInert: Option.Option<Command<Message>>;
|
|
146
|
+
}>;
|
|
147
|
+
export declare const makeUpdate: <Model extends BaseModel>(handleSelectedItem: (model: Model, item: string, context: SelectedItemContext) => [Model, ReadonlyArray<Command<Message>>]) => (model: Model, message: Message) => [Model, readonly Command<{
|
|
148
|
+
readonly _tag: "Closed";
|
|
149
|
+
} | {
|
|
150
|
+
readonly _tag: "NoOp";
|
|
151
|
+
} | {
|
|
152
|
+
readonly _tag: "Opened";
|
|
153
|
+
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
154
|
+
} | {
|
|
155
|
+
readonly _tag: "ClosedByTab";
|
|
156
|
+
} | {
|
|
157
|
+
readonly _tag: "ActivatedItem";
|
|
158
|
+
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
159
|
+
readonly index: number;
|
|
160
|
+
} | {
|
|
161
|
+
readonly _tag: "DeactivatedItem";
|
|
162
|
+
} | {
|
|
163
|
+
readonly _tag: "SelectedItem";
|
|
164
|
+
readonly item: string;
|
|
165
|
+
} | {
|
|
166
|
+
readonly _tag: "MovedPointerOverItem";
|
|
167
|
+
readonly screenX: number;
|
|
168
|
+
readonly screenY: number;
|
|
169
|
+
readonly index: number;
|
|
170
|
+
} | {
|
|
171
|
+
readonly _tag: "RequestedItemClick";
|
|
172
|
+
readonly index: number;
|
|
173
|
+
} | {
|
|
174
|
+
readonly _tag: "Searched";
|
|
175
|
+
readonly key: string;
|
|
176
|
+
readonly maybeTargetIndex: Option.Option<number>;
|
|
177
|
+
} | {
|
|
178
|
+
readonly _tag: "ClearedSearch";
|
|
179
|
+
readonly version: number;
|
|
180
|
+
} | {
|
|
181
|
+
readonly _tag: "AdvancedTransitionFrame";
|
|
182
|
+
} | {
|
|
183
|
+
readonly _tag: "EndedTransition";
|
|
184
|
+
} | {
|
|
185
|
+
readonly _tag: "DetectedButtonMovement";
|
|
186
|
+
} | {
|
|
187
|
+
readonly _tag: "PressedPointerOnButton";
|
|
188
|
+
readonly button: number;
|
|
189
|
+
readonly pointerType: string;
|
|
190
|
+
}>[]];
|
|
191
|
+
/** Configuration for an individual listbox item's appearance. */
|
|
192
|
+
export type ItemConfig = Readonly<{
|
|
193
|
+
className: string;
|
|
194
|
+
content: Html;
|
|
195
|
+
}>;
|
|
196
|
+
/** Configuration for a group heading rendered above a group of items. */
|
|
197
|
+
export type GroupHeading = Readonly<{
|
|
198
|
+
content: Html;
|
|
199
|
+
className: string;
|
|
200
|
+
}>;
|
|
201
|
+
/** Configuration for rendering a listbox with `view`. */
|
|
202
|
+
export type BaseViewConfig<Message, Item, Model extends BaseModel> = Readonly<{
|
|
203
|
+
model: Model;
|
|
204
|
+
toMessage: (message: Opened | Closed | ClosedByTab | ActivatedItem | DeactivatedItem | SelectedItem | MovedPointerOverItem | RequestedItemClick | Searched | PressedPointerOnButton | NoOp) => Message;
|
|
205
|
+
items: ReadonlyArray<Item>;
|
|
206
|
+
itemToConfig: (item: Item, context: Readonly<{
|
|
207
|
+
isActive: boolean;
|
|
208
|
+
isDisabled: boolean;
|
|
209
|
+
isSelected: boolean;
|
|
210
|
+
}>) => ItemConfig;
|
|
211
|
+
isItemDisabled?: (item: Item, index: number) => boolean;
|
|
212
|
+
itemToSearchText?: (item: Item, index: number) => string;
|
|
213
|
+
itemToValue?: (item: Item) => string;
|
|
214
|
+
isButtonDisabled?: boolean;
|
|
215
|
+
buttonContent: Html;
|
|
216
|
+
buttonClassName: string;
|
|
217
|
+
itemsClassName: string;
|
|
218
|
+
backdropClassName: string;
|
|
219
|
+
className?: string;
|
|
220
|
+
itemGroupKey?: (item: Item, index: number) => string;
|
|
221
|
+
groupToHeading?: (groupKey: string) => GroupHeading | undefined;
|
|
222
|
+
groupClassName?: string;
|
|
223
|
+
separatorClassName?: string;
|
|
224
|
+
anchor?: AnchorConfig;
|
|
225
|
+
name?: string;
|
|
226
|
+
form?: string;
|
|
227
|
+
isDisabled?: boolean;
|
|
228
|
+
isInvalid?: boolean;
|
|
229
|
+
}>;
|
|
230
|
+
type ViewBehavior<Model extends BaseModel> = Readonly<{
|
|
231
|
+
isItemSelected: (model: Model, itemValue: string) => boolean;
|
|
232
|
+
selectedItemIndex: <Item>(model: Model, items: ReadonlyArray<Item>, itemToValue: (item: Item) => string) => Option.Option<number>;
|
|
233
|
+
ariaMultiSelectable: boolean;
|
|
234
|
+
}>;
|
|
235
|
+
export declare const makeView: <Model extends BaseModel>(behavior: ViewBehavior<Model>) => <Message, Item>(config: BaseViewConfig<Message, Item, Model>) => Html;
|
|
236
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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