foldkit 0.59.0 → 0.61.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/calendar/arithmetic.d.ts +140 -0
- package/dist/calendar/arithmetic.d.ts.map +1 -0
- package/dist/calendar/arithmetic.js +169 -0
- package/dist/calendar/calendarDate.d.ts +162 -0
- package/dist/calendar/calendarDate.d.ts.map +1 -0
- package/dist/calendar/calendarDate.js +196 -0
- package/dist/calendar/comparison.d.ts +163 -0
- package/dist/calendar/comparison.d.ts.map +1 -0
- package/dist/calendar/comparison.js +134 -0
- package/dist/calendar/index.d.ts +7 -0
- package/dist/calendar/index.d.ts.map +1 -0
- package/dist/calendar/index.js +6 -0
- package/dist/calendar/info.d.ts +76 -0
- package/dist/calendar/info.d.ts.map +1 -0
- package/dist/calendar/info.js +125 -0
- package/dist/calendar/locale.d.ts +71 -0
- package/dist/calendar/locale.d.ts.map +1 -0
- package/dist/calendar/locale.js +171 -0
- package/dist/calendar/public.d.ts +2 -0
- package/dist/calendar/public.d.ts.map +1 -0
- package/dist/calendar/public.js +1 -0
- package/dist/calendar/today.d.ts +41 -0
- package/dist/calendar/today.d.ts.map +1 -0
- package/dist/calendar/today.js +33 -0
- package/dist/html/index.d.ts +3 -3
- package/dist/html/index.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/test/apps/disabledButton.d.ts +2 -2
- package/dist/ui/calendar/index.d.ts +242 -0
- package/dist/ui/calendar/index.d.ts.map +1 -0
- package/dist/ui/calendar/index.js +515 -0
- package/dist/ui/calendar/public.d.ts +3 -0
- package/dist/ui/calendar/public.d.ts.map +1 -0
- package/dist/ui/calendar/public.js +1 -0
- package/dist/ui/combobox/multi.d.ts +7 -4
- package/dist/ui/combobox/multi.d.ts.map +1 -1
- package/dist/ui/combobox/multi.js +3 -1
- package/dist/ui/combobox/multiPublic.d.ts +1 -1
- package/dist/ui/combobox/multiPublic.d.ts.map +1 -1
- package/dist/ui/combobox/multiPublic.js +1 -1
- package/dist/ui/combobox/public.d.ts +1 -1
- package/dist/ui/combobox/public.d.ts.map +1 -1
- package/dist/ui/combobox/public.js +1 -1
- package/dist/ui/combobox/shared.d.ts +3 -3
- package/dist/ui/combobox/shared.js +3 -3
- package/dist/ui/combobox/single.d.ts +8 -4
- package/dist/ui/combobox/single.d.ts.map +1 -1
- package/dist/ui/combobox/single.js +4 -1
- package/dist/ui/dialog/index.d.ts +1 -1
- package/dist/ui/dialog/index.js +2 -2
- package/dist/ui/dragAndDrop/index.d.ts +1 -1
- 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/listbox/multi.d.ts +7 -4
- package/dist/ui/listbox/multi.d.ts.map +1 -1
- package/dist/ui/listbox/multi.js +3 -1
- package/dist/ui/listbox/multiPublic.d.ts +1 -1
- package/dist/ui/listbox/multiPublic.d.ts.map +1 -1
- package/dist/ui/listbox/multiPublic.js +1 -1
- package/dist/ui/listbox/shared.d.ts +3 -3
- package/dist/ui/listbox/shared.js +2 -2
- package/dist/ui/listbox/single.d.ts +1 -1
- package/dist/ui/menu/index.d.ts +2 -2
- package/dist/ui/menu/index.js +2 -2
- package/dist/ui/popover/index.d.ts +2 -2
- package/dist/ui/popover/index.js +2 -2
- package/dist/ui/transition/index.d.ts +2 -2
- package/dist/ui/transition/index.d.ts.map +1 -1
- package/dist/ui/transition/index.js +2 -2
- package/dist/ui/transition/public.d.ts +1 -1
- package/dist/ui/transition/public.d.ts.map +1 -1
- package/dist/ui/transition/public.js +1 -1
- package/dist/ui/transition/schema.d.ts +3 -3
- package/dist/ui/transition/schema.d.ts.map +1 -1
- package/dist/ui/transition/schema.js +2 -2
- package/dist/ui/transition/update.js +1 -1
- package/package.json +9 -1
|
@@ -91,7 +91,7 @@ export declare const CompletedScrollIntoView: import("../../schema").CallableTag
|
|
|
91
91
|
export declare const CompletedClickItem: import("../../schema").CallableTaggedStruct<"CompletedClickItem", {}>;
|
|
92
92
|
/** Wraps a Transition submodel message for delegation. */
|
|
93
93
|
export declare const GotTransitionMessage: import("../../schema").CallableTaggedStruct<"GotTransitionMessage", {
|
|
94
|
-
message: S.Union<[import("../../schema").CallableTaggedStruct<"Showed", {}>, import("../../schema").CallableTaggedStruct<"
|
|
94
|
+
message: S.Union<[import("../../schema").CallableTaggedStruct<"Showed", {}>, import("../../schema").CallableTaggedStruct<"Hid", {}>, import("../../schema").CallableTaggedStruct<"AdvancedTransitionFrame", {}>, import("../../schema").CallableTaggedStruct<"EndedTransition", {}>]>;
|
|
95
95
|
}>;
|
|
96
96
|
/** Sent when the user types in the input. */
|
|
97
97
|
export declare const UpdatedInputValue: import("../../schema").CallableTaggedStruct<"UpdatedInputValue", {
|
|
@@ -185,7 +185,7 @@ export declare const DetectMovementOrTransitionEnd: Command.CommandDefinition<"D
|
|
|
185
185
|
readonly message: {
|
|
186
186
|
readonly _tag: "Showed";
|
|
187
187
|
} | {
|
|
188
|
-
readonly _tag: "
|
|
188
|
+
readonly _tag: "Hid";
|
|
189
189
|
} | {
|
|
190
190
|
readonly _tag: "AdvancedTransitionFrame";
|
|
191
191
|
} | {
|
|
@@ -247,7 +247,7 @@ export declare const makeUpdate: <Model extends BaseModel>(handlers: Readonly<{
|
|
|
247
247
|
readonly message: {
|
|
248
248
|
readonly _tag: "Showed";
|
|
249
249
|
} | {
|
|
250
|
-
readonly _tag: "
|
|
250
|
+
readonly _tag: "Hid";
|
|
251
251
|
} | {
|
|
252
252
|
readonly _tag: "AdvancedTransitionFrame";
|
|
253
253
|
} | {
|
|
@@ -11,7 +11,7 @@ import { findFirstEnabledIndex, keyToIndex } from '../keyboard';
|
|
|
11
11
|
// NOTE: Transition imports are split across schema + update to avoid a circular
|
|
12
12
|
// dependency: transition → html → runtime → devtools → combobox → transition.
|
|
13
13
|
// The barrel (../transition) imports from html, which starts the cycle.
|
|
14
|
-
import { EndedTransition as TransitionEndedTransition,
|
|
14
|
+
import { EndedTransition as TransitionEndedTransition, Hid as TransitionHid, Message as TransitionMessage, Model as TransitionModel, Showed as TransitionShowed, init as transitionInit, } from '../transition/schema';
|
|
15
15
|
import { update as transitionUpdate } from '../transition/update';
|
|
16
16
|
export { groupContiguous };
|
|
17
17
|
// MODEL
|
|
@@ -188,7 +188,7 @@ export const makeUpdate = (handlers) => {
|
|
|
188
188
|
const closeCombobox = (baseModel, commands) => {
|
|
189
189
|
const closed = handlers.handleClose(baseModel);
|
|
190
190
|
if (model.isAnimated) {
|
|
191
|
-
const [nextModel, transitionCommands] = delegateToTransition(closed,
|
|
191
|
+
const [nextModel, transitionCommands] = delegateToTransition(closed, TransitionHid());
|
|
192
192
|
return [nextModel, [...commands, ...transitionCommands]];
|
|
193
193
|
}
|
|
194
194
|
return [closed, commands];
|
|
@@ -251,7 +251,7 @@ export const makeUpdate = (handlers) => {
|
|
|
251
251
|
maybeRestoreInert,
|
|
252
252
|
});
|
|
253
253
|
if (model.isOpen && !nextModel.isOpen && model.isAnimated) {
|
|
254
|
-
const [transitionedModel, transitionCommands] = delegateToTransition(nextModel,
|
|
254
|
+
const [transitionedModel, transitionCommands] = delegateToTransition(nextModel, TransitionHid());
|
|
255
255
|
return [transitionedModel, [...commands, ...transitionCommands]];
|
|
256
256
|
}
|
|
257
257
|
return [nextModel, commands];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Option, Schema as S } from 'effect';
|
|
2
|
+
import type * as Command from '../../command';
|
|
2
3
|
import { type Html } from '../../html';
|
|
3
|
-
import { type BaseInitConfig, type BaseViewConfig } from './shared';
|
|
4
|
+
import { type BaseInitConfig, type BaseViewConfig, type Message, SelectedItem } from './shared';
|
|
4
5
|
/** Schema for the single-select combobox component's state, tracking open/closed status, active item, input value, selected item, and display text. */
|
|
5
6
|
export declare const Model: S.extend<S.Struct<{
|
|
6
7
|
id: typeof S.String;
|
|
@@ -58,7 +59,7 @@ export declare const update: (model: {
|
|
|
58
59
|
} & {
|
|
59
60
|
readonly maybeSelectedItem: Option.Option<string>;
|
|
60
61
|
readonly maybeSelectedDisplayText: Option.Option<string>;
|
|
61
|
-
}, message:
|
|
62
|
+
}, message: Message) => readonly [{
|
|
62
63
|
readonly id: string;
|
|
63
64
|
readonly isOpen: boolean;
|
|
64
65
|
readonly isAnimated: boolean;
|
|
@@ -131,7 +132,7 @@ export declare const update: (model: {
|
|
|
131
132
|
readonly message: {
|
|
132
133
|
readonly _tag: "Showed";
|
|
133
134
|
} | {
|
|
134
|
-
readonly _tag: "
|
|
135
|
+
readonly _tag: "Hid";
|
|
135
136
|
} | {
|
|
136
137
|
readonly _tag: "AdvancedTransitionFrame";
|
|
137
138
|
} | {
|
|
@@ -144,6 +145,9 @@ export declare const update: (model: {
|
|
|
144
145
|
readonly _tag: "PressedToggleButton";
|
|
145
146
|
}, never, never>;
|
|
146
147
|
}>[]];
|
|
148
|
+
/** Programmatically selects an item in the single-select combobox, closing the combobox and returning
|
|
149
|
+
* focus commands. Use this in domain-event handlers when the combobox uses `onSelectedItem`. */
|
|
150
|
+
export declare const selectItem: (model: Model, item: string, displayText: string) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
147
151
|
/** Configuration for rendering a single-select combobox with `view`. */
|
|
148
152
|
export type ViewConfig<Message, Item extends string> = BaseViewConfig<Message, Item, Model>;
|
|
149
153
|
/** Renders a headless single-select combobox with keyboard navigation, selection tracking, and aria-activedescendant focus management. */
|
|
@@ -172,7 +176,7 @@ export declare const view: <Message, Item extends string>(config: Readonly<{
|
|
|
172
176
|
readonly maybeSelectedItem: Option.Option<string>;
|
|
173
177
|
readonly maybeSelectedDisplayText: Option.Option<string>;
|
|
174
178
|
};
|
|
175
|
-
toParentMessage: (message: import("./shared").Opened | import("./shared").Closed | import("./shared").ClosedByTab | import("./shared").ActivatedItem | import("./shared").DeactivatedItem |
|
|
179
|
+
toParentMessage: (message: import("./shared").Opened | import("./shared").Closed | import("./shared").ClosedByTab | import("./shared").ActivatedItem | import("./shared").DeactivatedItem | SelectedItem | import("./shared").MovedPointerOverItem | import("./shared").RequestedItemClick | import("./shared").UpdatedInputValue | import("./shared").PressedToggleButton) => Message;
|
|
176
180
|
onSelectedItem?: (value: string) => Message;
|
|
177
181
|
items: readonly Item[];
|
|
178
182
|
itemToConfig: (item: Item, context: Readonly<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single.d.ts","sourceRoot":"","sources":["../../../src/ui/combobox/single.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,IAAI,CAAC,EAAQ,MAAM,QAAQ,CAAA;AAEzD,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,YAAY,CAAA;AAElD,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"single.d.ts","sourceRoot":"","sources":["../../../src/ui/combobox/single.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,IAAI,CAAC,EAAQ,MAAM,QAAQ,CAAA;AAEzD,OAAO,KAAK,KAAK,OAAO,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,YAAY,CAAA;AAElD,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,YAAY,EAKb,MAAM,UAAU,CAAA;AAIjB,uJAAuJ;AACvJ,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;GAOjB,CAAA;AAED,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,8RAA8R;AAC9R,MAAM,MAAM,UAAU,GAAG,cAAc,GACrC,QAAQ,CAAC;IACP,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B,CAAC,CAAA;AAEJ,4IAA4I;AAC5I,eAAO,MAAM,IAAI,GAAI,QAAQ,UAAU,KAAG,KAMxC,CAAA;AAIF,uIAAuI;AACvI,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiDjB,CAAA;AAEF;iGACiG;AACjG,eAAO,MAAM,UAAU,GACrB,OAAO,KAAK,EACZ,MAAM,MAAM,EACZ,aAAa,MAAM,KAClB,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CACP,CAAA;AAIpD,wEAAwE;AACxE,MAAM,MAAM,UAAU,CAAC,OAAO,EAAE,IAAI,SAAS,MAAM,IAAI,cAAc,CACnE,OAAO,EACP,IAAI,EACJ,KAAK,CACN,CAAA;AAED,0IAA0I;AAC1I,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAOf,CAAA;AAEF;mFACmF;AACnF,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,IAAI,SAAS,MAAM,EAC/C,cAAc,IAAI,CAChB,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,EACzB,OAAO,GAAG,iBAAiB,GAAG,gBAAgB,CAC/C,KACA,CAAC,CACF,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,iBAAiB,CAAC,KACrE,IAAI,CAoBR,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Array, Option, Schema as S, pipe } from 'effect';
|
|
2
2
|
import { createLazy } from '../../html';
|
|
3
3
|
import { evo } from '../../struct';
|
|
4
|
-
import { BaseModel, baseInit, closedBaseModel, makeUpdate, makeView, } from './shared';
|
|
4
|
+
import { BaseModel, SelectedItem, baseInit, closedBaseModel, makeUpdate, makeView, } from './shared';
|
|
5
5
|
// MODEL
|
|
6
6
|
/** Schema for the single-select combobox component's state, tracking open/closed status, active item, input value, selected item, and display text. */
|
|
7
7
|
export const Model = BaseModel.pipe(S.extend(S.Struct({
|
|
@@ -52,6 +52,9 @@ export const update = makeUpdate({
|
|
|
52
52
|
maybeSelectedDisplayText: () => Option.some(displayText),
|
|
53
53
|
}),
|
|
54
54
|
});
|
|
55
|
+
/** Programmatically selects an item in the single-select combobox, closing the combobox and returning
|
|
56
|
+
* focus commands. Use this in domain-event handlers when the combobox uses `onSelectedItem`. */
|
|
57
|
+
export const selectItem = (model, item, displayText) => update(model, SelectedItem({ item, displayText }));
|
|
55
58
|
/** Renders a headless single-select combobox with keyboard navigation, selection tracking, and aria-activedescendant focus management. */
|
|
56
59
|
export const view = makeView({
|
|
57
60
|
isItemSelected: (model, itemValue) => Option.exists(model.maybeSelectedItem, selectedItem => selectedItem === itemValue),
|
|
@@ -24,7 +24,7 @@ export declare const CompletedShowDialog: import("../../schema").CallableTaggedS
|
|
|
24
24
|
export declare const CompletedCloseDialog: import("../../schema").CallableTaggedStruct<"CompletedCloseDialog", {}>;
|
|
25
25
|
/** Wraps a Transition submodel message for delegation. */
|
|
26
26
|
export declare const GotTransitionMessage: import("../../schema").CallableTaggedStruct<"GotTransitionMessage", {
|
|
27
|
-
message: S.Union<[import("../../schema").CallableTaggedStruct<"Showed", {}>, import("../../schema").CallableTaggedStruct<"
|
|
27
|
+
message: S.Union<[import("../../schema").CallableTaggedStruct<"Showed", {}>, import("../../schema").CallableTaggedStruct<"Hid", {}>, import("../../schema").CallableTaggedStruct<"AdvancedTransitionFrame", {}>, import("../../schema").CallableTaggedStruct<"EndedTransition", {}>]>;
|
|
28
28
|
}>;
|
|
29
29
|
/** Union of all messages the dialog component can produce. */
|
|
30
30
|
export declare const Message: S.Union<[
|
package/dist/ui/dialog/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import * as Task from '../../task';
|
|
|
7
7
|
// NOTE: Transition imports are split across schema + update to avoid a circular
|
|
8
8
|
// dependency: transition → html → runtime → devtools → dialog → transition.
|
|
9
9
|
// The barrel (../transition) imports from html, which starts the cycle.
|
|
10
|
-
import {
|
|
10
|
+
import { Hid as TransitionHid, Message as TransitionMessage, Model as TransitionModel, Showed as TransitionShowed, init as transitionInit, } from '../transition/schema';
|
|
11
11
|
import { defaultLeaveCommand as transitionDefaultLeaveCommand, update as transitionUpdate, } from '../transition/update';
|
|
12
12
|
// MODEL
|
|
13
13
|
/** Schema for the dialog component's state, tracking its unique ID, open/closed status, animation support, and transition phase. */
|
|
@@ -95,7 +95,7 @@ export const update = (model, message) => M.value(message).pipe(withUpdateReturn
|
|
|
95
95
|
return [model, []];
|
|
96
96
|
}
|
|
97
97
|
if (model.isAnimated) {
|
|
98
|
-
const [nextModel, transitionCommands] = delegateToTransition(evo(model, { isOpen: () => false }),
|
|
98
|
+
const [nextModel, transitionCommands] = delegateToTransition(evo(model, { isOpen: () => false }), TransitionHid());
|
|
99
99
|
return [nextModel, transitionCommands];
|
|
100
100
|
}
|
|
101
101
|
const maybeClose = Option.liftPredicate(closeDialog(model.id), () => model.isOpen);
|
|
@@ -236,7 +236,7 @@ export declare const subscriptions: import("../../runtime/subscription").Subscri
|
|
|
236
236
|
readonly _tag: "ConfirmedKeyboardDrop";
|
|
237
237
|
} | {
|
|
238
238
|
readonly _tag: "PressedArrowKey";
|
|
239
|
-
readonly direction: "
|
|
239
|
+
readonly direction: "Right" | "Left" | "Up" | "Down" | "NextContainer" | "PreviousContainer";
|
|
240
240
|
} | {
|
|
241
241
|
readonly _tag: "CompletedAutoScroll";
|
|
242
242
|
} | {
|
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,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,kBAAkB,CAAA;AAC3C,OAAO,KAAK,IAAI,MAAM,eAAe,CAAA;AACrC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAA;AAC3C,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAA;AACjD,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AACzC,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,IAAI,MAAM,eAAe,CAAA;AACrC,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAA"}
|
package/dist/ui/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Option, Schema as S } from 'effect';
|
|
2
|
+
import type * as Command from '../../command';
|
|
2
3
|
import { type Html } from '../../html';
|
|
3
|
-
import { type BaseInitConfig, type BaseViewConfig } from './shared';
|
|
4
|
+
import { type BaseInitConfig, type BaseViewConfig, type Message, SelectedItem } from './shared';
|
|
4
5
|
/** Schema for the multi-select listbox component's state, tracking open/closed status, active item, selected items, activation trigger, and typeahead search. */
|
|
5
6
|
export declare const Model: S.extend<S.Struct<{
|
|
6
7
|
id: typeof S.String;
|
|
@@ -55,7 +56,7 @@ export declare const update: (model: {
|
|
|
55
56
|
readonly maybeLastButtonPointerType: Option.Option<string>;
|
|
56
57
|
} & {
|
|
57
58
|
readonly selectedItems: readonly string[];
|
|
58
|
-
}, message:
|
|
59
|
+
}, message: Message) => readonly [{
|
|
59
60
|
readonly id: string;
|
|
60
61
|
readonly isOpen: boolean;
|
|
61
62
|
readonly isAnimated: boolean;
|
|
@@ -135,7 +136,7 @@ export declare const update: (model: {
|
|
|
135
136
|
readonly message: {
|
|
136
137
|
readonly _tag: "Showed";
|
|
137
138
|
} | {
|
|
138
|
-
readonly _tag: "
|
|
139
|
+
readonly _tag: "Hid";
|
|
139
140
|
} | {
|
|
140
141
|
readonly _tag: "AdvancedTransitionFrame";
|
|
141
142
|
} | {
|
|
@@ -147,6 +148,8 @@ export declare const update: (model: {
|
|
|
147
148
|
readonly pointerType: string;
|
|
148
149
|
}, never, never>;
|
|
149
150
|
}>[]];
|
|
151
|
+
/** Programmatically toggles an item in the multi-select listbox. Use this in domain-event handlers when the listbox uses `onSelectedItem`. */
|
|
152
|
+
export declare const selectItem: (model: Model, item: string) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
150
153
|
/** Configuration for rendering a multi-select listbox with `view`. */
|
|
151
154
|
export type ViewConfig<Message, Item> = BaseViewConfig<Message, Item, Model>;
|
|
152
155
|
/** Renders a headless multi-select listbox with typeahead search, keyboard navigation, selection tracking, and aria-activedescendant focus management. */
|
|
@@ -174,7 +177,7 @@ export declare const view: <Message, Item>(config: Readonly<{
|
|
|
174
177
|
} & {
|
|
175
178
|
readonly selectedItems: readonly string[];
|
|
176
179
|
};
|
|
177
|
-
toParentMessage: (message: import("./shared").Opened | import("./shared").Closed | import("./shared").ClosedByTab | import("./shared").ActivatedItem | import("./shared").DeactivatedItem |
|
|
180
|
+
toParentMessage: (message: import("./shared").Opened | import("./shared").Closed | import("./shared").ClosedByTab | import("./shared").ActivatedItem | import("./shared").DeactivatedItem | SelectedItem | import("./shared").MovedPointerOverItem | import("./shared").RequestedItemClick | import("./shared").Searched | import("./shared").PressedPointerOnButton | import("./shared").IgnoredMouseClick | import("./shared").SuppressedSpaceScroll) => Message;
|
|
178
181
|
onSelectedItem?: (value: string) => Message;
|
|
179
182
|
items: readonly Item[];
|
|
180
183
|
itemToConfig: (item: Item, context: Readonly<{
|
|
@@ -1 +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;AAEzD,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,YAAY,CAAA;AAElD,OAAO,EACL,KAAK,cAAc,EA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5E,0JAA0J;AAC1J,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAYf,CAAA;AAEF;mFACmF;AACnF,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,IAAI,EAChC,cAAc,IAAI,CAChB,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,EACzB,OAAO,GAAG,iBAAiB,GAAG,gBAAgB,CAC/C,KACA,CAAC,CACF,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,iBAAiB,CAAC,KACrE,IAAI,CAoBR,CAAA"}
|
package/dist/ui/listbox/multi.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Array, Option, Schema as S, pipe } from 'effect';
|
|
2
2
|
import { createLazy } from '../../html';
|
|
3
3
|
import { evo } from '../../struct';
|
|
4
|
-
import { BaseModel, baseInit, makeUpdate, makeView, } from './shared';
|
|
4
|
+
import { BaseModel, SelectedItem, baseInit, makeUpdate, makeView, } from './shared';
|
|
5
5
|
// MODEL
|
|
6
6
|
/** Schema for the multi-select listbox component's state, tracking open/closed status, active item, selected items, activation trigger, and typeahead search. */
|
|
7
7
|
export const Model = BaseModel.pipe(S.extend(S.Struct({ selectedItems: S.Array(S.String) })));
|
|
@@ -18,6 +18,8 @@ export const update = makeUpdate((model, item) => {
|
|
|
18
18
|
: Array.append(model.selectedItems, item);
|
|
19
19
|
return [evo(model, { selectedItems: () => nextSelectedItems }), []];
|
|
20
20
|
});
|
|
21
|
+
/** Programmatically toggles an item in the multi-select listbox. Use this in domain-event handlers when the listbox uses `onSelectedItem`. */
|
|
22
|
+
export const selectItem = (model, item) => update(model, SelectedItem({ item }));
|
|
21
23
|
/** Renders a headless multi-select listbox with typeahead search, keyboard navigation, selection tracking, and aria-activedescendant focus management. */
|
|
22
24
|
export const view = makeView({
|
|
23
25
|
isItemSelected: (model, itemValue) => Array.contains(model.selectedItems, itemValue),
|
|
@@ -1 +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,IAAI,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"multiPublic.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/multiPublic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACrE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { init, update, view, lazy, Model } from './multi';
|
|
1
|
+
export { init, update, selectItem, view, lazy, Model } from './multi';
|
|
@@ -102,7 +102,7 @@ export declare const IgnoredMouseClick: import("../../schema").CallableTaggedStr
|
|
|
102
102
|
export declare const SuppressedSpaceScroll: import("../../schema").CallableTaggedStruct<"SuppressedSpaceScroll", {}>;
|
|
103
103
|
/** Wraps a Transition submodel message for delegation. */
|
|
104
104
|
export declare const GotTransitionMessage: import("../../schema").CallableTaggedStruct<"GotTransitionMessage", {
|
|
105
|
-
message: S.Union<[import("../../schema").CallableTaggedStruct<"Showed", {}>, import("../../schema").CallableTaggedStruct<"
|
|
105
|
+
message: S.Union<[import("../../schema").CallableTaggedStruct<"Showed", {}>, import("../../schema").CallableTaggedStruct<"Hid", {}>, import("../../schema").CallableTaggedStruct<"AdvancedTransitionFrame", {}>, import("../../schema").CallableTaggedStruct<"EndedTransition", {}>]>;
|
|
106
106
|
}>;
|
|
107
107
|
/** Sent when the user presses a pointer device on the listbox button. Records pointer type for click handling. */
|
|
108
108
|
export declare const PressedPointerOnButton: import("../../schema").CallableTaggedStruct<"PressedPointerOnButton", {
|
|
@@ -202,7 +202,7 @@ export declare const DetectMovementOrTransitionEnd: Command.CommandDefinition<"D
|
|
|
202
202
|
readonly message: {
|
|
203
203
|
readonly _tag: "Showed";
|
|
204
204
|
} | {
|
|
205
|
-
readonly _tag: "
|
|
205
|
+
readonly _tag: "Hid";
|
|
206
206
|
} | {
|
|
207
207
|
readonly _tag: "AdvancedTransitionFrame";
|
|
208
208
|
} | {
|
|
@@ -267,7 +267,7 @@ export declare const makeUpdate: <Model extends BaseModel>(handleSelectedItem: (
|
|
|
267
267
|
readonly message: {
|
|
268
268
|
readonly _tag: "Showed";
|
|
269
269
|
} | {
|
|
270
|
-
readonly _tag: "
|
|
270
|
+
readonly _tag: "Hid";
|
|
271
271
|
} | {
|
|
272
272
|
readonly _tag: "AdvancedTransitionFrame";
|
|
273
273
|
} | {
|
|
@@ -11,7 +11,7 @@ import { findFirstEnabledIndex, isPrintableKey, keyToIndex } from '../keyboard';
|
|
|
11
11
|
// NOTE: Transition imports are split across schema + update to avoid a circular
|
|
12
12
|
// dependency: transition → html → runtime → devtools → listbox → transition.
|
|
13
13
|
// The barrel (../transition) imports from html, which starts the cycle.
|
|
14
|
-
import { EndedTransition as TransitionEndedTransition,
|
|
14
|
+
import { EndedTransition as TransitionEndedTransition, Hid as TransitionHid, Message as TransitionMessage, Model as TransitionModel, Showed as TransitionShowed, init as transitionInit, } from '../transition/schema';
|
|
15
15
|
import { update as transitionUpdate } from '../transition/update';
|
|
16
16
|
import { resolveTypeaheadMatch } from '../typeahead';
|
|
17
17
|
export { resolveTypeaheadMatch };
|
|
@@ -190,7 +190,7 @@ export const makeUpdate = (handleSelectedItem) => {
|
|
|
190
190
|
const closeListbox = (baseModel, commands) => {
|
|
191
191
|
const closed = closedModel(baseModel);
|
|
192
192
|
if (baseModel.isAnimated) {
|
|
193
|
-
const [nextModel, transitionCommands] = delegateToTransition(closed,
|
|
193
|
+
const [nextModel, transitionCommands] = delegateToTransition(closed, TransitionHid());
|
|
194
194
|
return [nextModel, [...commands, ...transitionCommands]];
|
|
195
195
|
}
|
|
196
196
|
return [closed, commands];
|
package/dist/ui/menu/index.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ export declare const IgnoredMouseClick: import("../../schema").CallableTaggedStr
|
|
|
96
96
|
export declare const SuppressedSpaceScroll: import("../../schema").CallableTaggedStruct<"SuppressedSpaceScroll", {}>;
|
|
97
97
|
/** Wraps a Transition submodel message for delegation. */
|
|
98
98
|
export declare const GotTransitionMessage: import("../../schema").CallableTaggedStruct<"GotTransitionMessage", {
|
|
99
|
-
message: S.Union<[import("../../schema").CallableTaggedStruct<"Showed", {}>, import("../../schema").CallableTaggedStruct<"
|
|
99
|
+
message: S.Union<[import("../../schema").CallableTaggedStruct<"Showed", {}>, import("../../schema").CallableTaggedStruct<"Hid", {}>, import("../../schema").CallableTaggedStruct<"AdvancedTransitionFrame", {}>, import("../../schema").CallableTaggedStruct<"EndedTransition", {}>]>;
|
|
100
100
|
}>;
|
|
101
101
|
/** Sent when the user presses a pointer device on the menu button. Records pointer type and toggles for mouse. */
|
|
102
102
|
export declare const PressedPointerOnButton: import("../../schema").CallableTaggedStruct<"PressedPointerOnButton", {
|
|
@@ -206,7 +206,7 @@ export declare const DetectMovementOrTransitionEnd: Command.CommandDefinition<"D
|
|
|
206
206
|
readonly message: {
|
|
207
207
|
readonly _tag: "Showed";
|
|
208
208
|
} | {
|
|
209
|
-
readonly _tag: "
|
|
209
|
+
readonly _tag: "Hid";
|
|
210
210
|
} | {
|
|
211
211
|
readonly _tag: "AdvancedTransitionFrame";
|
|
212
212
|
} | {
|
package/dist/ui/menu/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { findFirstEnabledIndex, isPrintableKey, keyToIndex } from '../keyboard';
|
|
|
11
11
|
// NOTE: Transition imports are split across schema + update to avoid a circular
|
|
12
12
|
// dependency: transition → html → runtime → devtools → menu → transition.
|
|
13
13
|
// The barrel (../transition) imports from html, which starts the cycle.
|
|
14
|
-
import { EndedTransition as TransitionEndedTransition,
|
|
14
|
+
import { EndedTransition as TransitionEndedTransition, Hid as TransitionHid, Message as TransitionMessage, Model as TransitionModel, Showed as TransitionShowed, init as transitionInit, } from '../transition/schema';
|
|
15
15
|
import { update as transitionUpdate } from '../transition/update';
|
|
16
16
|
import { resolveTypeaheadMatch } from '../typeahead';
|
|
17
17
|
// MODEL
|
|
@@ -225,7 +225,7 @@ export const update = (model, message) => {
|
|
|
225
225
|
const closeMenu = (baseModel, commands) => {
|
|
226
226
|
const closed = closedModel(baseModel);
|
|
227
227
|
if (model.isAnimated) {
|
|
228
|
-
const [nextModel, transitionCommands] = delegateToTransition(closed,
|
|
228
|
+
const [nextModel, transitionCommands] = delegateToTransition(closed, TransitionHid());
|
|
229
229
|
return [nextModel, [...commands, ...transitionCommands]];
|
|
230
230
|
}
|
|
231
231
|
return [closed, commands];
|
|
@@ -45,7 +45,7 @@ export declare const IgnoredMouseClick: import("../../schema").CallableTaggedStr
|
|
|
45
45
|
export declare const SuppressedSpaceScroll: import("../../schema").CallableTaggedStruct<"SuppressedSpaceScroll", {}>;
|
|
46
46
|
/** Wraps a Transition submodel message for delegation. */
|
|
47
47
|
export declare const GotTransitionMessage: import("../../schema").CallableTaggedStruct<"GotTransitionMessage", {
|
|
48
|
-
message: S.Union<[import("../../schema").CallableTaggedStruct<"Showed", {}>, import("../../schema").CallableTaggedStruct<"
|
|
48
|
+
message: S.Union<[import("../../schema").CallableTaggedStruct<"Showed", {}>, import("../../schema").CallableTaggedStruct<"Hid", {}>, import("../../schema").CallableTaggedStruct<"AdvancedTransitionFrame", {}>, import("../../schema").CallableTaggedStruct<"EndedTransition", {}>]>;
|
|
49
49
|
}>;
|
|
50
50
|
/** Union of all messages the popover component can produce. */
|
|
51
51
|
export declare const Message: S.Union<[
|
|
@@ -109,7 +109,7 @@ export declare const DetectMovementOrTransitionEnd: Command.CommandDefinition<"D
|
|
|
109
109
|
readonly message: {
|
|
110
110
|
readonly _tag: "Showed";
|
|
111
111
|
} | {
|
|
112
|
-
readonly _tag: "
|
|
112
|
+
readonly _tag: "Hid";
|
|
113
113
|
} | {
|
|
114
114
|
readonly _tag: "AdvancedTransitionFrame";
|
|
115
115
|
} | {
|
package/dist/ui/popover/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { anchorHooks } from '../anchor';
|
|
|
9
9
|
// NOTE: Transition imports are split across schema + update to avoid a circular
|
|
10
10
|
// dependency: transition → html → runtime → devtools → popover → transition.
|
|
11
11
|
// The barrel (../transition) imports from html, which starts the cycle.
|
|
12
|
-
import { EndedTransition as TransitionEndedTransition,
|
|
12
|
+
import { EndedTransition as TransitionEndedTransition, Hid as TransitionHid, Message as TransitionMessage, Model as TransitionModel, Showed as TransitionShowed, init as transitionInit, } from '../transition/schema';
|
|
13
13
|
import { update as transitionUpdate } from '../transition/update';
|
|
14
14
|
// MODEL
|
|
15
15
|
/** Schema for the popover component's state, tracking open/closed status and transition animation. */
|
|
@@ -145,7 +145,7 @@ export const update = (model, message) => {
|
|
|
145
145
|
const closePopover = (baseModel, commands) => {
|
|
146
146
|
const closed = closedModel(baseModel);
|
|
147
147
|
if (model.isAnimated) {
|
|
148
|
-
const [nextModel, transitionCommands] = delegateToTransition(closed,
|
|
148
|
+
const [nextModel, transitionCommands] = delegateToTransition(closed, TransitionHid());
|
|
149
149
|
return [nextModel, [...commands, ...transitionCommands]];
|
|
150
150
|
}
|
|
151
151
|
return [closed, commands];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Attribute, type Html, type TagName } from '../../html';
|
|
2
|
-
import { AdvancedTransitionFrame, EndedTransition,
|
|
2
|
+
import { AdvancedTransitionFrame, EndedTransition, Hid, Message, Model, OutMessage, Showed, StartedLeaveAnimating, TransitionState, TransitionedOut, init } from './schema';
|
|
3
3
|
import { RequestFrame, WaitForTransitions, defaultLeaveCommand, update } from './update';
|
|
4
4
|
export type { InitConfig } from './schema';
|
|
5
|
-
export { AdvancedTransitionFrame, EndedTransition,
|
|
5
|
+
export { AdvancedTransitionFrame, EndedTransition, Hid, init, Message, Model, OutMessage, Showed, StartedLeaveAnimating, TransitionState, TransitionedOut, };
|
|
6
6
|
export { RequestFrame, WaitForTransitions, defaultLeaveCommand, update };
|
|
7
7
|
/** Configuration for rendering a transition with `view`. */
|
|
8
8
|
export type ViewConfig<Message> = Readonly<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/transition/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,OAAO,EAGb,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/transition/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,OAAO,EAGb,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,GAAG,EACH,OAAO,EACP,KAAK,EACL,UAAU,EACV,MAAM,EACN,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,IAAI,EACL,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,MAAM,EACP,MAAM,UAAU,CAAA;AAEjB,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,GAAG,EACH,IAAI,EACJ,OAAO,EACP,KAAK,EACL,UAAU,EACV,MAAM,EACN,qBAAqB,EACrB,eAAe,EACf,eAAe,GAChB,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,EAAE,CAAA;AAIxE,4DAA4D;AAC5D,MAAM,MAAM,UAAU,CAAC,OAAO,IAAI,QAAQ,CAAC;IACzC,KAAK,EAAE,KAAK,CAAA;IACZ,OAAO,EAAE,IAAI,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;2EAEuE;IACvE,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC,CAAA;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,QAAQ,UAAU,CAAC,OAAO,CAAC,KAAG,IA+F3D,CAAA;AAED;;yDAEyD;AACzD,eAAO,MAAM,IAAI,GAAI,OAAO,EAC1B,cAAc,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC,KAC3D,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,KAAK,IAAI,CAaxC,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Match as M } from 'effect';
|
|
2
2
|
import { createLazy, html, } from '../../html';
|
|
3
|
-
import { AdvancedTransitionFrame, EndedTransition,
|
|
3
|
+
import { AdvancedTransitionFrame, EndedTransition, Hid, Message, Model, OutMessage, Showed, StartedLeaveAnimating, TransitionState, TransitionedOut, init, } from './schema';
|
|
4
4
|
import { RequestFrame, WaitForTransitions, defaultLeaveCommand, update, } from './update';
|
|
5
|
-
export { AdvancedTransitionFrame, EndedTransition,
|
|
5
|
+
export { AdvancedTransitionFrame, EndedTransition, Hid, init, Message, Model, OutMessage, Showed, StartedLeaveAnimating, TransitionState, TransitionedOut, };
|
|
6
6
|
export { RequestFrame, WaitForTransitions, defaultLeaveCommand, update };
|
|
7
7
|
/** Renders a headless transition wrapper that coordinates CSS transitions via data attributes.
|
|
8
8
|
*
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { init, update, view, lazy, defaultLeaveCommand, Model, Message, OutMessage, Showed,
|
|
1
|
+
export { init, update, view, lazy, defaultLeaveCommand, Model, Message, OutMessage, Showed, Hid, AdvancedTransitionFrame, EndedTransition, StartedLeaveAnimating, TransitionedOut, TransitionState, RequestFrame, WaitForTransitions, } from './index';
|
|
2
2
|
export type { InitConfig, ViewConfig } from './index';
|
|
3
3
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/transition/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,mBAAmB,EACnB,KAAK,EACL,OAAO,EACP,UAAU,EACV,MAAM,EACN,
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/transition/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,mBAAmB,EACnB,KAAK,EACL,OAAO,EACP,UAAU,EACV,MAAM,EACN,GAAG,EACH,uBAAuB,EACvB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,kBAAkB,GACnB,MAAM,SAAS,CAAA;AAEhB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { init, update, view, lazy, defaultLeaveCommand, Model, Message, OutMessage, Showed,
|
|
1
|
+
export { init, update, view, lazy, defaultLeaveCommand, Model, Message, OutMessage, Showed, Hid, AdvancedTransitionFrame, EndedTransition, StartedLeaveAnimating, TransitionedOut, TransitionState, RequestFrame, WaitForTransitions, } from './index';
|
|
@@ -12,7 +12,7 @@ export type Model = typeof Model.Type;
|
|
|
12
12
|
/** Sent when the transition should enter (become visible). Starts the enter animation sequence. */
|
|
13
13
|
export declare const Showed: import("../../schema").CallableTaggedStruct<"Showed", {}>;
|
|
14
14
|
/** Sent when the transition should leave (become hidden). Starts the leave animation sequence. */
|
|
15
|
-
export declare const
|
|
15
|
+
export declare const Hid: import("../../schema").CallableTaggedStruct<"Hid", {}>;
|
|
16
16
|
/** Sent internally when a double-rAF completes, advancing the transition to its animating phase. */
|
|
17
17
|
export declare const AdvancedTransitionFrame: import("../../schema").CallableTaggedStruct<"AdvancedTransitionFrame", {}>;
|
|
18
18
|
/** Sent internally when all CSS transitions on the transition element have completed. */
|
|
@@ -20,13 +20,13 @@ export declare const EndedTransition: import("../../schema").CallableTaggedStruc
|
|
|
20
20
|
/** Union of all messages the transition component can produce. */
|
|
21
21
|
export declare const Message: S.Union<[
|
|
22
22
|
typeof Showed,
|
|
23
|
-
typeof
|
|
23
|
+
typeof Hid,
|
|
24
24
|
typeof AdvancedTransitionFrame,
|
|
25
25
|
typeof EndedTransition
|
|
26
26
|
]>;
|
|
27
27
|
export type Message = typeof Message.Type;
|
|
28
28
|
export type Showed = typeof Showed.Type;
|
|
29
|
-
export type
|
|
29
|
+
export type Hid = typeof Hid.Type;
|
|
30
30
|
/** Sent to the parent when the leave transition advances to LeaveAnimating. The parent is responsible for providing the command that detects when the leave animation completes (e.g. WaitForTransitions or a racing command). Use `defaultLeaveCommand` for the standard behavior. */
|
|
31
31
|
export declare const StartedLeaveAnimating: import("../../schema").CallableTaggedStruct<"StartedLeaveAnimating", {}>;
|
|
32
32
|
/** Sent to the parent when the leave animation completes. The parent can use this to unmount content or update its own state. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/ui/transition/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAMpC,8GAA8G;AAC9G,eAAO,MAAM,eAAe,qFAM3B,CAAA;AACD,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,IAAI,CAAA;AAIzD,mHAAmH;AACnH,eAAO,MAAM,KAAK;;;;EAIhB,CAAA;AA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zE,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAA;AAI/C,iEAAiE;AACjE,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAC,CAAA;AAEF,6EAA6E;AAC7E,eAAO,MAAM,IAAI,GAAI,QAAQ,UAAU,KAAG,KAIxC,CAAA"}
|
|
@@ -14,13 +14,13 @@ export const Model = S.Struct({
|
|
|
14
14
|
/** Sent when the transition should enter (become visible). Starts the enter animation sequence. */
|
|
15
15
|
export const Showed = m('Showed');
|
|
16
16
|
/** Sent when the transition should leave (become hidden). Starts the leave animation sequence. */
|
|
17
|
-
export const
|
|
17
|
+
export const Hid = m('Hid');
|
|
18
18
|
/** Sent internally when a double-rAF completes, advancing the transition to its animating phase. */
|
|
19
19
|
export const AdvancedTransitionFrame = m('AdvancedTransitionFrame');
|
|
20
20
|
/** Sent internally when all CSS transitions on the transition element have completed. */
|
|
21
21
|
export const EndedTransition = m('EndedTransition');
|
|
22
22
|
/** Union of all messages the transition component can produce. */
|
|
23
|
-
export const Message = S.Union(Showed,
|
|
23
|
+
export const Message = S.Union(Showed, Hid, AdvancedTransitionFrame, EndedTransition);
|
|
24
24
|
// OUT MESSAGE
|
|
25
25
|
/** Sent to the parent when the leave transition advances to LeaveAnimating. The parent is responsible for providing the command that detects when the leave animation completes (e.g. WaitForTransitions or a racing command). Use `defaultLeaveCommand` for the standard behavior. */
|
|
26
26
|
export const StartedLeaveAnimating = m('StartedLeaveAnimating');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foldkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.61.0",
|
|
4
4
|
"description": "A frontend framework for TypeScript, built on Effect, using The Elm Architecture",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
12
|
"import": "./dist/index.js"
|
|
13
13
|
},
|
|
14
|
+
"./calendar": {
|
|
15
|
+
"types": "./dist/calendar/public.d.ts",
|
|
16
|
+
"import": "./dist/calendar/public.js"
|
|
17
|
+
},
|
|
14
18
|
"./command": {
|
|
15
19
|
"types": "./dist/command/public.d.ts",
|
|
16
20
|
"import": "./dist/command/public.js"
|
|
@@ -79,6 +83,10 @@
|
|
|
79
83
|
"types": "./dist/ui/button/public.d.ts",
|
|
80
84
|
"import": "./dist/ui/button/public.js"
|
|
81
85
|
},
|
|
86
|
+
"./ui/calendar": {
|
|
87
|
+
"types": "./dist/ui/calendar/public.d.ts",
|
|
88
|
+
"import": "./dist/ui/calendar/public.js"
|
|
89
|
+
},
|
|
82
90
|
"./ui/checkbox": {
|
|
83
91
|
"types": "./dist/ui/checkbox/public.d.ts",
|
|
84
92
|
"import": "./dist/ui/checkbox/public.js"
|