foldkit 0.36.2 → 0.36.3
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/task/dom.d.ts +1 -9
- package/dist/task/dom.d.ts.map +1 -1
- package/dist/task/dom.js +81 -111
- package/dist/ui/dialog/index.d.ts.map +1 -1
- package/dist/ui/dialog/index.js +3 -1
- package/package.json +1 -1
package/dist/task/dom.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { Effect } from 'effect';
|
|
|
2
2
|
import { ElementNotFound } from './error';
|
|
3
3
|
/**
|
|
4
4
|
* Focuses an element matching the given selector.
|
|
5
|
-
* Uses requestAnimationFrame to ensure the DOM is updated before attempting to focus.
|
|
6
5
|
* Fails with `ElementNotFound` if the selector does not match an `HTMLElement`.
|
|
7
6
|
*
|
|
8
7
|
* @example
|
|
@@ -16,12 +15,9 @@ export declare const focus: (selector: string) => Effect.Effect<void, ElementNot
|
|
|
16
15
|
* and Escape key handling. Uses `show()` instead of `showModal()` so that
|
|
17
16
|
* DevTools (and any other high-z-index overlay) remains interactive — the
|
|
18
17
|
* Dialog component provides its own backdrop, scroll locking, and transitions.
|
|
19
|
-
* Uses requestAnimationFrame to ensure the DOM is updated before attempting to show.
|
|
20
18
|
* Fails with `ElementNotFound` if the selector does not match an `HTMLDialogElement`.
|
|
21
19
|
*
|
|
22
|
-
* Pass `focusSelector` to focus an element inside the dialog
|
|
23
|
-
* as `show()` — required on mobile browsers where `focus()` is ignored outside
|
|
24
|
-
* the original user-gesture call stack.
|
|
20
|
+
* Pass `focusSelector` to focus an element inside the dialog when it opens.
|
|
25
21
|
*
|
|
26
22
|
* @example
|
|
27
23
|
* ```typescript
|
|
@@ -35,7 +31,6 @@ export declare const showModal: (selector: string, options?: Readonly<{
|
|
|
35
31
|
/**
|
|
36
32
|
* Closes a dialog element using `.close()`.
|
|
37
33
|
* Cleans up the keyboard handlers installed by `showModal`.
|
|
38
|
-
* Uses requestAnimationFrame to ensure the DOM is updated before attempting to close.
|
|
39
34
|
* Fails with `ElementNotFound` if the selector does not match an `HTMLDialogElement`.
|
|
40
35
|
*
|
|
41
36
|
* @example
|
|
@@ -46,7 +41,6 @@ export declare const showModal: (selector: string, options?: Readonly<{
|
|
|
46
41
|
export declare const closeModal: (selector: string) => Effect.Effect<void, ElementNotFound>;
|
|
47
42
|
/**
|
|
48
43
|
* Programmatically clicks an element matching the given selector.
|
|
49
|
-
* Uses requestAnimationFrame to ensure the DOM is updated before attempting to click.
|
|
50
44
|
* Fails with `ElementNotFound` if the selector does not match an `HTMLElement`.
|
|
51
45
|
*
|
|
52
46
|
* @example
|
|
@@ -57,7 +51,6 @@ export declare const closeModal: (selector: string) => Effect.Effect<void, Eleme
|
|
|
57
51
|
export declare const clickElement: (selector: string) => Effect.Effect<void, ElementNotFound>;
|
|
58
52
|
/**
|
|
59
53
|
* Scrolls an element into view by selector using `{ block: 'nearest' }`.
|
|
60
|
-
* Uses requestAnimationFrame to ensure the DOM is updated before attempting to scroll.
|
|
61
54
|
* Fails with `ElementNotFound` if the selector does not match an `HTMLElement`.
|
|
62
55
|
*
|
|
63
56
|
* @example
|
|
@@ -70,7 +63,6 @@ export declare const scrollIntoView: (selector: string) => Effect.Effect<void, E
|
|
|
70
63
|
export type FocusDirection = 'Next' | 'Previous';
|
|
71
64
|
/**
|
|
72
65
|
* Focuses the next or previous focusable element in the document relative to the element matching the given selector.
|
|
73
|
-
* Uses requestAnimationFrame to ensure the DOM is updated before querying focus order.
|
|
74
66
|
* Fails with `ElementNotFound` if the selector does not match an `HTMLElement`.
|
|
75
67
|
*
|
|
76
68
|
* @example
|
package/dist/task/dom.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/task/dom.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAMP,MAAM,QAAQ,CAAA;AAEf,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAmBzC
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/task/dom.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAMP,MAAM,QAAQ,CAAA;AAEf,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAmBzC;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK,GAAI,UAAU,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAQxE,CAAA;AAEJ;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,SAAS,GACpB,UAAU,MAAM,EAChB,UAAU,QAAQ,CAAC;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,KAC7C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAgDlC,CAAA;AAuBJ;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,GACrB,UAAU,MAAM,KACf,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAclC,CAAA;AAEJ;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GACvB,UAAU,MAAM,KACf,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAQlC,CAAA;AAEJ;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,GACzB,UAAU,MAAM,KACf,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAQlC,CAAA;AAEJ,0EAA0E;AAC1E,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,CAAA;AAEhD;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GACvB,UAAU,MAAM,EAChB,WAAW,cAAc,KACxB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAqClC,CAAA"}
|
package/dist/task/dom.js
CHANGED
|
@@ -13,7 +13,6 @@ const FOCUSABLE_SELECTOR = Array.join([
|
|
|
13
13
|
], ', ');
|
|
14
14
|
/**
|
|
15
15
|
* Focuses an element matching the given selector.
|
|
16
|
-
* Uses requestAnimationFrame to ensure the DOM is updated before attempting to focus.
|
|
17
16
|
* Fails with `ElementNotFound` if the selector does not match an `HTMLElement`.
|
|
18
17
|
*
|
|
19
18
|
* @example
|
|
@@ -21,29 +20,22 @@ const FOCUSABLE_SELECTOR = Array.join([
|
|
|
21
20
|
* Task.focus('#email-input').pipe(Effect.ignore, Effect.as(CompletedInputFocus()))
|
|
22
21
|
* ```
|
|
23
22
|
*/
|
|
24
|
-
export const focus = (selector) => Effect.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
else {
|
|
32
|
-
resume(Effect.fail(new ElementNotFound({ selector })));
|
|
33
|
-
}
|
|
34
|
-
});
|
|
23
|
+
export const focus = (selector) => Effect.suspend(() => {
|
|
24
|
+
const element = document.querySelector(selector);
|
|
25
|
+
if (element instanceof HTMLElement) {
|
|
26
|
+
element.focus();
|
|
27
|
+
return Effect.void;
|
|
28
|
+
}
|
|
29
|
+
return Effect.fail(new ElementNotFound({ selector }));
|
|
35
30
|
});
|
|
36
31
|
/**
|
|
37
32
|
* Opens a dialog element using `show()` with high z-index, focus trapping,
|
|
38
33
|
* and Escape key handling. Uses `show()` instead of `showModal()` so that
|
|
39
34
|
* DevTools (and any other high-z-index overlay) remains interactive — the
|
|
40
35
|
* Dialog component provides its own backdrop, scroll locking, and transitions.
|
|
41
|
-
* Uses requestAnimationFrame to ensure the DOM is updated before attempting to show.
|
|
42
36
|
* Fails with `ElementNotFound` if the selector does not match an `HTMLDialogElement`.
|
|
43
37
|
*
|
|
44
|
-
* Pass `focusSelector` to focus an element inside the dialog
|
|
45
|
-
* as `show()` — required on mobile browsers where `focus()` is ignored outside
|
|
46
|
-
* the original user-gesture call stack.
|
|
38
|
+
* Pass `focusSelector` to focus an element inside the dialog when it opens.
|
|
47
39
|
*
|
|
48
40
|
* @example
|
|
49
41
|
* ```typescript
|
|
@@ -51,43 +43,39 @@ export const focus = (selector) => Effect.async(resume => {
|
|
|
51
43
|
* Task.showModal('#my-dialog', { focusSelector: '#search-input' }).pipe(Effect.ignore, Effect.as(CompletedDialogShow()))
|
|
52
44
|
* ```
|
|
53
45
|
*/
|
|
54
|
-
export const showModal = (selector, options) => Effect.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
M.value(event.key).pipe(M.when('Escape', () => {
|
|
68
|
-
if (event.defaultPrevented) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
event.preventDefault();
|
|
72
|
-
element.dispatchEvent(new Event('cancel', { cancelable: true }));
|
|
73
|
-
}), M.when('Tab', () => {
|
|
74
|
-
trapFocusWithinDialog(event, element);
|
|
75
|
-
}), M.orElse(Function.constVoid));
|
|
76
|
-
};
|
|
77
|
-
document.addEventListener('keydown', handleKeydown);
|
|
78
|
-
dialogCleanups.set(element, () => document.removeEventListener('keydown', handleKeydown));
|
|
79
|
-
if (options?.focusSelector) {
|
|
80
|
-
const focusTarget = element.querySelector(options.focusSelector);
|
|
81
|
-
if (focusTarget instanceof HTMLElement) {
|
|
82
|
-
focusTarget.focus();
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
resume(Effect.void);
|
|
46
|
+
export const showModal = (selector, options) => Effect.suspend(() => {
|
|
47
|
+
const element = document.querySelector(selector);
|
|
48
|
+
if (!(element instanceof HTMLDialogElement)) {
|
|
49
|
+
return Effect.fail(new ElementNotFound({ selector }));
|
|
50
|
+
}
|
|
51
|
+
element.style.position = 'fixed';
|
|
52
|
+
element.style.inset = '0';
|
|
53
|
+
openDialogCount++;
|
|
54
|
+
element.style.zIndex = String(BASE_DIALOG_Z_INDEX + openDialogCount);
|
|
55
|
+
element.show();
|
|
56
|
+
const handleKeydown = (event) => {
|
|
57
|
+
if (!element.open) {
|
|
58
|
+
return;
|
|
86
59
|
}
|
|
87
|
-
|
|
88
|
-
|
|
60
|
+
M.value(event.key).pipe(M.when('Escape', () => {
|
|
61
|
+
if (event.defaultPrevented) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
event.preventDefault();
|
|
65
|
+
element.dispatchEvent(new Event('cancel', { cancelable: true }));
|
|
66
|
+
}), M.when('Tab', () => {
|
|
67
|
+
trapFocusWithinDialog(event, element);
|
|
68
|
+
}), M.orElse(Function.constVoid));
|
|
69
|
+
};
|
|
70
|
+
document.addEventListener('keydown', handleKeydown);
|
|
71
|
+
dialogCleanups.set(element, () => document.removeEventListener('keydown', handleKeydown));
|
|
72
|
+
if (options?.focusSelector) {
|
|
73
|
+
const focusTarget = element.querySelector(options.focusSelector);
|
|
74
|
+
if (focusTarget instanceof HTMLElement) {
|
|
75
|
+
focusTarget.focus();
|
|
89
76
|
}
|
|
90
|
-
}
|
|
77
|
+
}
|
|
78
|
+
return Effect.void;
|
|
91
79
|
});
|
|
92
80
|
const trapFocusWithinDialog = (event, dialog) => {
|
|
93
81
|
const focusable = Array.fromIterable(dialog.querySelectorAll(FOCUSABLE_SELECTOR));
|
|
@@ -107,7 +95,6 @@ const trapFocusWithinDialog = (event, dialog) => {
|
|
|
107
95
|
/**
|
|
108
96
|
* Closes a dialog element using `.close()`.
|
|
109
97
|
* Cleans up the keyboard handlers installed by `showModal`.
|
|
110
|
-
* Uses requestAnimationFrame to ensure the DOM is updated before attempting to close.
|
|
111
98
|
* Fails with `ElementNotFound` if the selector does not match an `HTMLDialogElement`.
|
|
112
99
|
*
|
|
113
100
|
* @example
|
|
@@ -115,27 +102,22 @@ const trapFocusWithinDialog = (event, dialog) => {
|
|
|
115
102
|
* Task.closeModal('#my-dialog').pipe(Effect.ignore, Effect.as(CompletedDialogClose()))
|
|
116
103
|
* ```
|
|
117
104
|
*/
|
|
118
|
-
export const closeModal = (selector) => Effect.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
dialogCleanups.delete(element);
|
|
128
|
-
}
|
|
129
|
-
resume(Effect.void);
|
|
105
|
+
export const closeModal = (selector) => Effect.suspend(() => {
|
|
106
|
+
const element = document.querySelector(selector);
|
|
107
|
+
if (element instanceof HTMLDialogElement) {
|
|
108
|
+
element.close();
|
|
109
|
+
openDialogCount = Math.max(0, openDialogCount - 1);
|
|
110
|
+
const cleanup = dialogCleanups.get(element);
|
|
111
|
+
if (cleanup) {
|
|
112
|
+
cleanup();
|
|
113
|
+
dialogCleanups.delete(element);
|
|
130
114
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
});
|
|
115
|
+
return Effect.void;
|
|
116
|
+
}
|
|
117
|
+
return Effect.fail(new ElementNotFound({ selector }));
|
|
135
118
|
});
|
|
136
119
|
/**
|
|
137
120
|
* Programmatically clicks an element matching the given selector.
|
|
138
|
-
* Uses requestAnimationFrame to ensure the DOM is updated before attempting to click.
|
|
139
121
|
* Fails with `ElementNotFound` if the selector does not match an `HTMLElement`.
|
|
140
122
|
*
|
|
141
123
|
* @example
|
|
@@ -143,21 +125,16 @@ export const closeModal = (selector) => Effect.async(resume => {
|
|
|
143
125
|
* Task.clickElement('#menu-item-2').pipe(Effect.ignore, Effect.as(CompletedItemClick()))
|
|
144
126
|
* ```
|
|
145
127
|
*/
|
|
146
|
-
export const clickElement = (selector) => Effect.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
else {
|
|
154
|
-
resume(Effect.fail(new ElementNotFound({ selector })));
|
|
155
|
-
}
|
|
156
|
-
});
|
|
128
|
+
export const clickElement = (selector) => Effect.suspend(() => {
|
|
129
|
+
const element = document.querySelector(selector);
|
|
130
|
+
if (element instanceof HTMLElement) {
|
|
131
|
+
element.click();
|
|
132
|
+
return Effect.void;
|
|
133
|
+
}
|
|
134
|
+
return Effect.fail(new ElementNotFound({ selector }));
|
|
157
135
|
});
|
|
158
136
|
/**
|
|
159
137
|
* Scrolls an element into view by selector using `{ block: 'nearest' }`.
|
|
160
|
-
* Uses requestAnimationFrame to ensure the DOM is updated before attempting to scroll.
|
|
161
138
|
* Fails with `ElementNotFound` if the selector does not match an `HTMLElement`.
|
|
162
139
|
*
|
|
163
140
|
* @example
|
|
@@ -165,21 +142,16 @@ export const clickElement = (selector) => Effect.async(resume => {
|
|
|
165
142
|
* Task.scrollIntoView('#active-item').pipe(Effect.ignore, Effect.as(CompletedScrollIntoView()))
|
|
166
143
|
* ```
|
|
167
144
|
*/
|
|
168
|
-
export const scrollIntoView = (selector) => Effect.
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
else {
|
|
176
|
-
resume(Effect.fail(new ElementNotFound({ selector })));
|
|
177
|
-
}
|
|
178
|
-
});
|
|
145
|
+
export const scrollIntoView = (selector) => Effect.suspend(() => {
|
|
146
|
+
const element = document.querySelector(selector);
|
|
147
|
+
if (element instanceof HTMLElement) {
|
|
148
|
+
element.scrollIntoView({ block: 'nearest' });
|
|
149
|
+
return Effect.void;
|
|
150
|
+
}
|
|
151
|
+
return Effect.fail(new ElementNotFound({ selector }));
|
|
179
152
|
});
|
|
180
153
|
/**
|
|
181
154
|
* Focuses the next or previous focusable element in the document relative to the element matching the given selector.
|
|
182
|
-
* Uses requestAnimationFrame to ensure the DOM is updated before querying focus order.
|
|
183
155
|
* Fails with `ElementNotFound` if the selector does not match an `HTMLElement`.
|
|
184
156
|
*
|
|
185
157
|
* @example
|
|
@@ -187,22 +159,20 @@ export const scrollIntoView = (selector) => Effect.async(resume => {
|
|
|
187
159
|
* Task.advanceFocus('#menu-button', 'Next').pipe(Effect.ignore, Effect.as(CompletedFocusAdvance()))
|
|
188
160
|
* ```
|
|
189
161
|
*/
|
|
190
|
-
export const advanceFocus = (selector, direction) => Effect.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
resume(Effect.void);
|
|
207
|
-
});
|
|
162
|
+
export const advanceFocus = (selector, direction) => Effect.suspend(() => {
|
|
163
|
+
const reference = document.querySelector(selector);
|
|
164
|
+
if (!(reference instanceof HTMLElement)) {
|
|
165
|
+
return Effect.fail(new ElementNotFound({ selector }));
|
|
166
|
+
}
|
|
167
|
+
const focusableElements = Array.fromIterable(document.querySelectorAll(FOCUSABLE_SELECTOR));
|
|
168
|
+
const referenceElementIndex = Array.findFirstIndex(focusableElements, Equal.equals(reference));
|
|
169
|
+
if (Option.isNone(referenceElementIndex)) {
|
|
170
|
+
return Effect.fail(new ElementNotFound({ selector }));
|
|
171
|
+
}
|
|
172
|
+
const offsetReferenceElementIndex = M.value(direction).pipe(M.when('Next', () => Number.increment), M.when('Previous', () => Number.decrement), M.exhaustive)(referenceElementIndex.value);
|
|
173
|
+
const nextElement = Array.get(focusableElements, offsetReferenceElementIndex);
|
|
174
|
+
if (Option.isSome(nextElement)) {
|
|
175
|
+
nextElement.value.focus();
|
|
176
|
+
}
|
|
177
|
+
return Effect.void;
|
|
208
178
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAEvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAoB,MAAM,YAAY,CAAA;AAQxE,oIAAoI;AACpI,eAAO,MAAM,KAAK;;;;;;EAM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,KAAK,EAAE,SAAS,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,KAAK,IAAI,CAgBtE,CAAA"}
|
package/dist/ui/dialog/index.js
CHANGED
|
@@ -133,7 +133,8 @@ export const view = (config) => {
|
|
|
133
133
|
AriaDescribedBy(`${id}-description`),
|
|
134
134
|
OnCancel(toMessage(Closed())),
|
|
135
135
|
Style({
|
|
136
|
-
|
|
136
|
+
width: '100%',
|
|
137
|
+
height: '100%',
|
|
137
138
|
maxWidth: '100%',
|
|
138
139
|
maxHeight: '100%',
|
|
139
140
|
padding: '0',
|
|
@@ -145,6 +146,7 @@ export const view = (config) => {
|
|
|
145
146
|
...attributes,
|
|
146
147
|
];
|
|
147
148
|
const backdrop = keyed('div')(`${id}-backdrop`, [
|
|
149
|
+
Style({ minHeight: '100vh' }),
|
|
148
150
|
...transitionAttributes,
|
|
149
151
|
...(isLeaving ? [] : [OnClick(toMessage(Closed()))]),
|
|
150
152
|
...(backdropClassName ? [Class(backdropClassName)] : []),
|