foldkit 0.36.3 → 0.37.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/README.md +4 -5
- package/dist/command/index.d.ts +36 -2
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +11 -1
- package/dist/command/public.d.ts +1 -0
- package/dist/command/public.d.ts.map +1 -1
- package/dist/command/public.js +1 -1
- package/dist/devtools/overlay.d.ts.map +1 -1
- package/dist/devtools/overlay.js +16 -15
- package/dist/devtools/store.d.ts +2 -2
- package/dist/devtools/store.d.ts.map +1 -1
- package/dist/devtools/store.js +2 -2
- package/dist/runtime/runtime.d.ts.map +1 -1
- package/dist/runtime/runtime.js +10 -4
- package/dist/ui/combobox/multi.d.ts +56 -53
- package/dist/ui/combobox/multi.d.ts.map +1 -1
- package/dist/ui/combobox/shared.d.ts +63 -60
- package/dist/ui/combobox/shared.d.ts.map +1 -1
- package/dist/ui/combobox/shared.js +11 -10
- package/dist/ui/combobox/single.d.ts +56 -53
- package/dist/ui/combobox/single.d.ts.map +1 -1
- package/dist/ui/dialog/index.d.ts +2 -2
- package/dist/ui/dialog/index.d.ts.map +1 -1
- package/dist/ui/dialog/index.js +7 -6
- package/dist/ui/disclosure/index.d.ts +2 -2
- package/dist/ui/disclosure/index.d.ts.map +1 -1
- package/dist/ui/disclosure/index.js +3 -2
- package/dist/ui/listbox/multi.d.ts +65 -62
- package/dist/ui/listbox/multi.d.ts.map +1 -1
- package/dist/ui/listbox/shared.d.ts +71 -68
- package/dist/ui/listbox/shared.d.ts.map +1 -1
- package/dist/ui/listbox/shared.js +14 -13
- package/dist/ui/listbox/single.d.ts +65 -62
- package/dist/ui/listbox/single.d.ts.map +1 -1
- package/dist/ui/menu/index.d.ts +2 -2
- package/dist/ui/menu/index.d.ts.map +1 -1
- package/dist/ui/menu/index.js +17 -16
- package/dist/ui/popover/index.d.ts +2 -2
- package/dist/ui/popover/index.d.ts.map +1 -1
- package/dist/ui/popover/index.js +12 -11
- package/dist/ui/radioGroup/index.d.ts +2 -2
- package/dist/ui/radioGroup/index.d.ts.map +1 -1
- package/dist/ui/radioGroup/index.js +2 -1
- package/dist/ui/tabs/index.d.ts +2 -2
- package/dist/ui/tabs/index.d.ts.map +1 -1
- package/dist/ui/tabs/index.js +3 -2
- package/package.json +1 -1
package/dist/ui/popover/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Array, Effect, Match as M, Option, Schema as S, pipe } from 'effect';
|
|
2
|
+
import * as Command from '../../command';
|
|
2
3
|
import { OptionExt } from '../../effectExtensions';
|
|
3
4
|
import { createLazy, html } from '../../html';
|
|
4
5
|
import { m } from '../../message';
|
|
@@ -74,14 +75,14 @@ const panelSelector = (id) => `#${id}-panel`;
|
|
|
74
75
|
const withUpdateReturn = M.withReturnType();
|
|
75
76
|
/** Processes a popover message and returns the next model and commands. */
|
|
76
77
|
export const update = (model, message) => {
|
|
77
|
-
const maybeNextFrame = OptionExt.when(model.isAnimated, Task.nextFrame.pipe(Effect.as(AdvancedTransitionFrame())));
|
|
78
|
-
const maybeLockScroll = OptionExt.when(model.isModal, Task.lockScroll.pipe(Effect.as(CompletedScrollLock())));
|
|
79
|
-
const maybeUnlockScroll = OptionExt.when(model.isModal, Task.unlockScroll.pipe(Effect.as(CompletedScrollUnlock())));
|
|
78
|
+
const maybeNextFrame = OptionExt.when(model.isAnimated, Task.nextFrame.pipe(Effect.as(AdvancedTransitionFrame()), Command.make('RequestFrame')));
|
|
79
|
+
const maybeLockScroll = OptionExt.when(model.isModal, Task.lockScroll.pipe(Effect.as(CompletedScrollLock()), Command.make('LockScroll')));
|
|
80
|
+
const maybeUnlockScroll = OptionExt.when(model.isModal, Task.unlockScroll.pipe(Effect.as(CompletedScrollUnlock()), Command.make('UnlockScroll')));
|
|
80
81
|
const maybeInertOthers = OptionExt.when(model.isModal, Task.inertOthers(model.id, [
|
|
81
82
|
buttonSelector(model.id),
|
|
82
83
|
panelSelector(model.id),
|
|
83
|
-
]).pipe(Effect.as(CompletedInertSetup())));
|
|
84
|
-
const maybeRestoreInert = OptionExt.when(model.isModal, Task.restoreInert(model.id).pipe(Effect.as(CompletedInertTeardown())));
|
|
84
|
+
]).pipe(Effect.as(CompletedInertSetup()), Command.make('InertOthers')));
|
|
85
|
+
const maybeRestoreInert = OptionExt.when(model.isModal, Task.restoreInert(model.id).pipe(Effect.as(CompletedInertTeardown()), Command.make('RestoreInert')));
|
|
85
86
|
return M.value(message).pipe(withUpdateReturn, M.tagsExhaustive({
|
|
86
87
|
Opened: () => {
|
|
87
88
|
const nextModel = evo(model, {
|
|
@@ -90,7 +91,7 @@ export const update = (model, message) => {
|
|
|
90
91
|
});
|
|
91
92
|
return [
|
|
92
93
|
nextModel,
|
|
93
|
-
pipe(Array.getSomes([maybeNextFrame, maybeLockScroll, maybeInertOthers]), Array.prepend(Task.focus(panelSelector(model.id)).pipe(Effect.ignore, Effect.as(CompletedPanelFocus())))),
|
|
94
|
+
pipe(Array.getSomes([maybeNextFrame, maybeLockScroll, maybeInertOthers]), Array.prepend(Task.focus(panelSelector(model.id)).pipe(Effect.ignore, Effect.as(CompletedPanelFocus()), Command.make('FocusPanel')))),
|
|
94
95
|
];
|
|
95
96
|
},
|
|
96
97
|
Closed: () => [
|
|
@@ -99,7 +100,7 @@ export const update = (model, message) => {
|
|
|
99
100
|
maybeNextFrame,
|
|
100
101
|
maybeUnlockScroll,
|
|
101
102
|
maybeRestoreInert,
|
|
102
|
-
]), Array.prepend(Task.focus(buttonSelector(model.id)).pipe(Effect.ignore, Effect.as(CompletedButtonFocus())))),
|
|
103
|
+
]), Array.prepend(Task.focus(buttonSelector(model.id)).pipe(Effect.ignore, Effect.as(CompletedButtonFocus()), Command.make('FocusButton')))),
|
|
103
104
|
],
|
|
104
105
|
ClosedByTab: () => [
|
|
105
106
|
closedModel(model),
|
|
@@ -119,7 +120,7 @@ export const update = (model, message) => {
|
|
|
119
120
|
maybeNextFrame,
|
|
120
121
|
maybeUnlockScroll,
|
|
121
122
|
maybeRestoreInert,
|
|
122
|
-
]), Array.prepend(Task.focus(buttonSelector(model.id)).pipe(Effect.ignore, Effect.as(CompletedButtonFocus())))),
|
|
123
|
+
]), Array.prepend(Task.focus(buttonSelector(model.id)).pipe(Effect.ignore, Effect.as(CompletedButtonFocus()), Command.make('FocusButton')))),
|
|
123
124
|
];
|
|
124
125
|
}
|
|
125
126
|
const nextModel = evo(withPointerType, {
|
|
@@ -128,18 +129,18 @@ export const update = (model, message) => {
|
|
|
128
129
|
});
|
|
129
130
|
return [
|
|
130
131
|
nextModel,
|
|
131
|
-
pipe(Array.getSomes([maybeNextFrame, maybeLockScroll, maybeInertOthers]), Array.prepend(Task.focus(panelSelector(model.id)).pipe(Effect.ignore, Effect.as(CompletedPanelFocus())))),
|
|
132
|
+
pipe(Array.getSomes([maybeNextFrame, maybeLockScroll, maybeInertOthers]), Array.prepend(Task.focus(panelSelector(model.id)).pipe(Effect.ignore, Effect.as(CompletedPanelFocus()), Command.make('FocusPanel')))),
|
|
132
133
|
];
|
|
133
134
|
},
|
|
134
135
|
AdvancedTransitionFrame: () => M.value(model.transitionState).pipe(withUpdateReturn, M.when('EnterStart', () => [
|
|
135
136
|
evo(model, { transitionState: () => 'EnterAnimating' }),
|
|
136
137
|
[
|
|
137
|
-
Task.waitForTransitions(panelSelector(model.id)).pipe(Effect.as(EndedTransition())),
|
|
138
|
+
Task.waitForTransitions(panelSelector(model.id)).pipe(Effect.as(EndedTransition()), Command.make('WaitForTransitions')),
|
|
138
139
|
],
|
|
139
140
|
]), M.when('LeaveStart', () => [
|
|
140
141
|
evo(model, { transitionState: () => 'LeaveAnimating' }),
|
|
141
142
|
[
|
|
142
|
-
Effect.raceFirst(Task.detectElementMovement(buttonSelector(model.id)).pipe(Effect.as(DetectedButtonMovement())), Task.waitForTransitions(panelSelector(model.id)).pipe(Effect.as(EndedTransition()))),
|
|
143
|
+
Effect.raceFirst(Task.detectElementMovement(buttonSelector(model.id)).pipe(Effect.as(DetectedButtonMovement())), Task.waitForTransitions(panelSelector(model.id)).pipe(Effect.as(EndedTransition()))).pipe(Command.make('DetectMovementOrTransitionEnd')),
|
|
143
144
|
],
|
|
144
145
|
]), M.orElse(() => [model, []])),
|
|
145
146
|
EndedTransition: () => M.value(model.transitionState).pipe(withUpdateReturn, M.whenOr('EnterAnimating', 'LeaveAnimating', () => [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema as S } from 'effect';
|
|
2
|
-
import
|
|
2
|
+
import * as Command from '../../command';
|
|
3
3
|
import { type Attribute, type Html } from '../../html';
|
|
4
4
|
/** Controls the radio group layout direction and which arrow keys navigate between options. */
|
|
5
5
|
export declare const Orientation: S.Literal<["Horizontal", "Vertical"]>;
|
|
@@ -35,7 +35,7 @@ export type InitConfig = Readonly<{
|
|
|
35
35
|
/** Creates an initial radio group model from a config. Defaults to no selection and vertical orientation. */
|
|
36
36
|
export declare const init: (config: InitConfig) => Model;
|
|
37
37
|
/** Processes a radio group message and returns the next model and commands. */
|
|
38
|
-
export declare const update: (model: Model, message: Message) => [Model, ReadonlyArray<Command<Message>>];
|
|
38
|
+
export declare const update: (model: Model, message: Message) => [Model, ReadonlyArray<Command.Command<Message>>];
|
|
39
39
|
/** Attribute groups the radio group component provides for each option's `content` callback. */
|
|
40
40
|
export type OptionAttributes<Message> = Readonly<{
|
|
41
41
|
option: ReadonlyArray<Attribute<Message>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/radioGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/radioGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AAEf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EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAA;IAClE,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAC,CAAA;AAQF,6IAA6I;AAC7I,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,WAAW,SAAS,MAAM,EACtD,QAAQ,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,KACvC,IA6OF,CAAA;AAED;6EAC6E;AAC7E,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,WAAW,SAAS,MAAM,EACtD,cAAc,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC,KAC1E,CAAC,CACF,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,WAAW,CAAC,KACrD,IAAI,CAgBR,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Array, Effect, Match as M, Option, Predicate, Schema as S, String, pipe, } from 'effect';
|
|
2
|
+
import * as Command from '../../command';
|
|
2
3
|
import { createLazy, html } from '../../html';
|
|
3
4
|
import { m } from '../../message';
|
|
4
5
|
import { evo } from '../../struct';
|
|
@@ -38,7 +39,7 @@ export const update = (model, message) => M.value(message).pipe(M.withReturnType
|
|
|
38
39
|
return [
|
|
39
40
|
evo(model, { selectedValue: () => Option.some(value) }),
|
|
40
41
|
[
|
|
41
|
-
Task.focus(selector).pipe(Effect.ignore, Effect.as(CompletedOptionFocus())),
|
|
42
|
+
Task.focus(selector).pipe(Effect.ignore, Effect.as(CompletedOptionFocus()), Command.make('FocusOption')),
|
|
42
43
|
],
|
|
43
44
|
];
|
|
44
45
|
},
|
package/dist/ui/tabs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema as S } from 'effect';
|
|
2
|
-
import
|
|
2
|
+
import * as Command from '../../command';
|
|
3
3
|
import { type Attribute, type Html, type TagName } from '../../html';
|
|
4
4
|
export { wrapIndex, findFirstEnabledIndex, keyToIndex } from '../keyboard';
|
|
5
5
|
/** Controls the tab list layout direction and which arrow keys navigate between tabs. */
|
|
@@ -44,7 +44,7 @@ export type InitConfig = Readonly<{
|
|
|
44
44
|
/** Creates an initial tabs model from a config. Defaults to first tab and automatic activation. */
|
|
45
45
|
export declare const init: (config: InitConfig) => Model;
|
|
46
46
|
/** Processes a tabs message and returns the next model and commands. */
|
|
47
|
-
export declare const update: (model: Model, message: Message) => [Model, ReadonlyArray<Command<Message>>];
|
|
47
|
+
export declare const update: (model: Model, message: Message) => [Model, ReadonlyArray<Command.Command<Message>>];
|
|
48
48
|
/** Configuration for an individual tab's button and panel content. */
|
|
49
49
|
export type TabConfig<Message = unknown> = Readonly<{
|
|
50
50
|
buttonClassName?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/tabs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/tabs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,eAAe,CAAA;AACxC,OAAO,EACL,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,OAAO,EAGb,MAAM,YAAY,CAAA;AAMnB,OAAO,EAAE,SAAS,EAAE,qBAAqB,EA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AAM,CAAA;IACzB,iBAAiB,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;IACrD,gBAAgB,EAAE,MAAM,CAAA;CACzB,CAAC,CAAA;AAMF,yGAAyG;AACzG,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,GAAG,SAAS,MAAM,EAC9C,QAAQ,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,KAC/B,IAsMF,CAAA;AAED;6EAC6E;AAC7E,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,GAAG,SAAS,MAAM,EAC9C,cAAc,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC,KAClE,CAAC,CACF,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,WAAW,CAAC,KAC7C,IAAI,CAgBR,CAAA"}
|
package/dist/ui/tabs/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Array, Effect, Match as M, Option, Schema as S, String, pipe, } from 'effect';
|
|
2
|
+
import * as Command from '../../command';
|
|
2
3
|
import { createLazy, html, } from '../../html';
|
|
3
4
|
import { m } from '../../message';
|
|
4
5
|
import { evo } from '../../struct';
|
|
@@ -47,7 +48,7 @@ export const update = (model, message) => M.value(message).pipe(M.withReturnType
|
|
|
47
48
|
focusedIndex: () => index,
|
|
48
49
|
}),
|
|
49
50
|
[
|
|
50
|
-
Task.focus(tabSelector).pipe(Effect.ignore, Effect.as(CompletedTabFocus())),
|
|
51
|
+
Task.focus(tabSelector).pipe(Effect.ignore, Effect.as(CompletedTabFocus()), Command.make('FocusTab')),
|
|
51
52
|
],
|
|
52
53
|
];
|
|
53
54
|
},
|
|
@@ -56,7 +57,7 @@ export const update = (model, message) => M.value(message).pipe(M.withReturnType
|
|
|
56
57
|
return [
|
|
57
58
|
evo(model, { focusedIndex: () => index }),
|
|
58
59
|
[
|
|
59
|
-
Task.focus(tabSelector).pipe(Effect.ignore, Effect.as(CompletedTabFocus())),
|
|
60
|
+
Task.focus(tabSelector).pipe(Effect.ignore, Effect.as(CompletedTabFocus()), Command.make('FocusTab')),
|
|
60
61
|
],
|
|
61
62
|
];
|
|
62
63
|
},
|