@floegence/floe-webapp-core 0.35.55 → 0.35.56
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.
|
@@ -5,5 +5,7 @@ export interface NotesOverlayProps {
|
|
|
5
5
|
onClose: () => void;
|
|
6
6
|
controller: NotesController;
|
|
7
7
|
interactionMode?: NotesOverlayInteractionMode;
|
|
8
|
+
/** Additional shell-owned keybinds that should continue working while floating Notes is focused. */
|
|
9
|
+
allowGlobalHotkeys?: readonly string[];
|
|
8
10
|
}
|
|
9
11
|
export declare function NotesOverlay(props: NotesOverlayProps): import("solid-js").JSX.Element;
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { createComponent as o, insert as
|
|
2
|
-
import { createEffect as
|
|
3
|
-
import { Motion as
|
|
4
|
-
import { easing as
|
|
5
|
-
import { useOverlayMask as
|
|
6
|
-
import { X as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { createComponent as o, insert as l, addEventListener as v, effect as T, setAttribute as $, Portal as u, memo as D, template as c, delegateEvents as I } from "solid-js/web";
|
|
2
|
+
import { createMemo as F, createEffect as E, onCleanup as R, Show as s } from "solid-js";
|
|
3
|
+
import { Motion as C } from "../../node_modules/.pnpm/solid-motionone@1.0.4_solid-js@1.9.11/node_modules/solid-motionone/dist/index.js";
|
|
4
|
+
import { easing as L, duration as _ } from "../../utils/animations.js";
|
|
5
|
+
import { useOverlayMask as B } from "../../hooks/useOverlayMask.js";
|
|
6
|
+
import { X as P } from "../icons/index.js";
|
|
7
|
+
import { useResolvedFloeConfig as Z } from "../../context/FloeConfigContext.js";
|
|
8
|
+
import { NotesBoard as z } from "./NotesBoard.js";
|
|
9
|
+
import { NotesContextMenu as H } from "./NotesContextMenu.js";
|
|
10
|
+
import { NotesEditorFlyout as W, NotesManualPasteFlyout as q } from "./NotesEditorFlyout.js";
|
|
11
|
+
import { NotesOverviewPanel as w } from "./NotesOverviewPanel.js";
|
|
12
|
+
import { NotesTopicRail as A } from "./NotesTopicRail.js";
|
|
13
|
+
import { NotesTrashFlyout as j } from "./NotesTrashFlyout.js";
|
|
14
|
+
import { NotesTrashCanIcon as K } from "./notesAppearance.js";
|
|
15
|
+
import { useNotesOverlayModel as V } from "./useNotesOverlayModel.js";
|
|
16
|
+
var G = /* @__PURE__ */ c('<header class=notes-overlay__header data-floe-canvas-interactive=true><div class=notes-overlay__header-brand><div class=notes-overlay__header-title>Notes</div><div class=notes-overlay__header-separator></div><div class=notes-overlay__header-stat> topics</div><div class=notes-overlay__header-stat> live note</div><div class=notes-overlay__header-stat> trash</div></div><div class=notes-overlay__header-actions><button type=button class=notes-overlay__close aria-label="Close notes overlay"data-floe-overlay-close=true>'), U = /* @__PURE__ */ c("<button type=button class=notes-trash__toggle><div class=notes-trash__toggle-mark>"), X = /* @__PURE__ */ c("<div class=notes-overlay__body><div class=notes-trash data-floe-canvas-interactive=true>"), Y = /* @__PURE__ */ c("<div class=notes-overview-backdrop data-floe-notes-boundary=true>"), J = /* @__PURE__ */ c("<div class=notes-overview-flyout data-floe-notes-boundary=true>"), Q = /* @__PURE__ */ c("<div class=notes-menu-backdrop data-floe-notes-boundary=true>");
|
|
17
|
+
const ee = '[data-floe-notes-boundary="true"]';
|
|
18
|
+
function te(n) {
|
|
19
|
+
return typeof Element < "u" && n instanceof Element ? n : typeof Node < "u" && n instanceof Node ? n.parentElement : null;
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
-
return !!
|
|
21
|
+
function k(n) {
|
|
22
|
+
return !!te(n)?.closest(ee);
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
-
return
|
|
25
|
-
mode:
|
|
24
|
+
function oe(n) {
|
|
25
|
+
return n === "floating" ? {
|
|
26
|
+
mode: n,
|
|
26
27
|
ariaModal: void 0,
|
|
27
28
|
lockBodyScroll: !1,
|
|
28
29
|
trapFocus: !1,
|
|
@@ -43,48 +44,62 @@ function K(r) {
|
|
|
43
44
|
}
|
|
44
45
|
};
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
-
const e =
|
|
47
|
+
function he(n) {
|
|
48
|
+
const b = Z(), e = V(n);
|
|
48
49
|
let g;
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const t = (
|
|
53
|
-
|
|
50
|
+
const i = () => oe(n.interactionMode), f = () => n.onClose(), M = F(() => {
|
|
51
|
+
if (i().mode !== "floating")
|
|
52
|
+
return [];
|
|
53
|
+
const t = /* @__PURE__ */ new Set();
|
|
54
|
+
if (b.config.commands.palette.enabled) {
|
|
55
|
+
const r = b.config.commands.palette.keybind.trim();
|
|
56
|
+
r && t.add(r);
|
|
57
|
+
}
|
|
58
|
+
for (const r of n.allowGlobalHotkeys ?? []) {
|
|
59
|
+
const a = r.trim();
|
|
60
|
+
a && t.add(a);
|
|
61
|
+
}
|
|
62
|
+
return Array.from(t);
|
|
63
|
+
});
|
|
64
|
+
return E(() => {
|
|
65
|
+
if (!n.open || i().mode !== "floating" || typeof document > "u") return;
|
|
66
|
+
const t = (r) => {
|
|
67
|
+
k(r.target) || queueMicrotask(f);
|
|
54
68
|
};
|
|
55
|
-
document.addEventListener("click", t, !0),
|
|
56
|
-
}),
|
|
57
|
-
open: () =>
|
|
69
|
+
document.addEventListener("click", t, !0), R(() => document.removeEventListener("click", t, !0));
|
|
70
|
+
}), B({
|
|
71
|
+
open: () => n.open,
|
|
58
72
|
root: () => g,
|
|
59
73
|
onClose: () => e.handleCloseRequest(),
|
|
60
|
-
onEscapeOutside:
|
|
61
|
-
containsTarget:
|
|
62
|
-
lockBodyScroll:
|
|
63
|
-
trapFocus:
|
|
64
|
-
closeOnEscape:
|
|
74
|
+
onEscapeOutside: i().mode === "floating" ? f : void 0,
|
|
75
|
+
containsTarget: k,
|
|
76
|
+
lockBodyScroll: i().lockBodyScroll,
|
|
77
|
+
trapFocus: i().trapFocus,
|
|
78
|
+
closeOnEscape: i().closeOnEscape,
|
|
65
79
|
blockHotkeys: !0,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
80
|
+
allowHotkeys: M,
|
|
81
|
+
blockWheel: i().blockWheel,
|
|
82
|
+
blockTouchMove: i().blockTouchMove,
|
|
83
|
+
autoFocus: i().autoFocus,
|
|
69
84
|
restoreFocus: !0
|
|
70
85
|
}), o(s, {
|
|
71
86
|
get when() {
|
|
72
|
-
return
|
|
87
|
+
return n.open;
|
|
73
88
|
},
|
|
74
89
|
get children() {
|
|
75
|
-
return o(
|
|
90
|
+
return o(C.section, {
|
|
76
91
|
ref(t) {
|
|
77
|
-
var
|
|
78
|
-
typeof
|
|
92
|
+
var r = g;
|
|
93
|
+
typeof r == "function" ? r(t) : g = t;
|
|
79
94
|
},
|
|
80
95
|
class: "notes-overlay",
|
|
81
96
|
role: "dialog",
|
|
82
97
|
get "aria-modal"() {
|
|
83
|
-
return
|
|
98
|
+
return i().ariaModal;
|
|
84
99
|
},
|
|
85
100
|
"aria-label": "Notes overlay",
|
|
86
101
|
get "data-notes-interaction-mode"() {
|
|
87
|
-
return
|
|
102
|
+
return i().mode;
|
|
88
103
|
},
|
|
89
104
|
tabIndex: -1,
|
|
90
105
|
initial: {
|
|
@@ -95,11 +110,11 @@ function ge(r) {
|
|
|
95
110
|
},
|
|
96
111
|
get transition() {
|
|
97
112
|
return {
|
|
98
|
-
duration:
|
|
113
|
+
duration: _.fast
|
|
99
114
|
};
|
|
100
115
|
},
|
|
101
116
|
get children() {
|
|
102
|
-
return [o(
|
|
117
|
+
return [o(C.div, {
|
|
103
118
|
class: "notes-overlay__frame",
|
|
104
119
|
"data-floe-notes-boundary": "true",
|
|
105
120
|
initial: {
|
|
@@ -114,19 +129,19 @@ function ge(r) {
|
|
|
114
129
|
},
|
|
115
130
|
get transition() {
|
|
116
131
|
return {
|
|
117
|
-
duration:
|
|
118
|
-
easing:
|
|
132
|
+
duration: _.normal,
|
|
133
|
+
easing: L.easeOut
|
|
119
134
|
};
|
|
120
135
|
},
|
|
121
136
|
get children() {
|
|
122
137
|
return [(() => {
|
|
123
|
-
var t =
|
|
124
|
-
return
|
|
138
|
+
var t = G(), r = t.firstChild, a = r.firstChild, m = a.nextSibling, p = m.nextSibling, N = p.firstChild, d = p.nextSibling, S = d.firstChild, h = d.nextSibling, O = h.firstChild, x = r.nextSibling, y = x.firstChild;
|
|
139
|
+
return l(p, () => e.header.topicCount(), N), l(d, () => e.header.totalLiveNotes(), S), l(d, () => e.header.totalLiveNotes() === 1 ? "" : "s", null), l(h, () => e.header.trashCount(), O), y.$$click = () => e.handleCloseRequest(), l(y, o(P, {
|
|
125
140
|
class: "w-4 h-4"
|
|
126
141
|
})), t;
|
|
127
142
|
})(), (() => {
|
|
128
|
-
var t =
|
|
129
|
-
return
|
|
143
|
+
var t = X(), r = t.firstChild;
|
|
144
|
+
return l(t, o(A, {
|
|
130
145
|
get topics() {
|
|
131
146
|
return e.rail.topics();
|
|
132
147
|
},
|
|
@@ -169,7 +184,7 @@ function ge(r) {
|
|
|
169
184
|
onDeleteTopic: (a) => {
|
|
170
185
|
e.rail.deleteTopic(a);
|
|
171
186
|
}
|
|
172
|
-
}),
|
|
187
|
+
}), r), l(t, o(z, {
|
|
173
188
|
get activeTopic() {
|
|
174
189
|
return e.board.activeTopic();
|
|
175
190
|
},
|
|
@@ -257,12 +272,12 @@ function ge(r) {
|
|
|
257
272
|
get onCommitMove() {
|
|
258
273
|
return e.board.commitMove;
|
|
259
274
|
}
|
|
260
|
-
}),
|
|
275
|
+
}), r), l(t, o(s, {
|
|
261
276
|
get when() {
|
|
262
277
|
return !e.board.isMobile();
|
|
263
278
|
},
|
|
264
279
|
get children() {
|
|
265
|
-
return o(
|
|
280
|
+
return o(w, {
|
|
266
281
|
mode: "desktop",
|
|
267
282
|
get items() {
|
|
268
283
|
return e.overview.items();
|
|
@@ -287,32 +302,32 @@ function ge(r) {
|
|
|
287
302
|
}
|
|
288
303
|
});
|
|
289
304
|
}
|
|
290
|
-
}),
|
|
305
|
+
}), r), l(r, o(s, {
|
|
291
306
|
get when() {
|
|
292
307
|
return !e.trash.open();
|
|
293
308
|
},
|
|
294
309
|
get children() {
|
|
295
|
-
var a =
|
|
296
|
-
return v(a, "click", e.trash.openDock, !0),
|
|
310
|
+
var a = U(), m = a.firstChild;
|
|
311
|
+
return v(a, "click", e.trash.openDock, !0), l(m, o(K, {
|
|
297
312
|
class: "notes-trash__toggle-icon"
|
|
298
|
-
})),
|
|
313
|
+
})), T(() => $(a, "aria-label", `Open trash dock${e.trash.count() > 0 ? `, ${e.trash.count()} items` : ""}`)), a;
|
|
299
314
|
}
|
|
300
|
-
})),
|
|
315
|
+
})), T(() => r.classList.toggle("is-open", !!e.trash.open())), t;
|
|
301
316
|
})()];
|
|
302
317
|
}
|
|
303
318
|
}), o(s, {
|
|
304
319
|
get when() {
|
|
305
|
-
return
|
|
320
|
+
return D(() => !!e.board.isMobile())() && e.board.overviewOpen();
|
|
306
321
|
},
|
|
307
322
|
get children() {
|
|
308
|
-
return o(
|
|
323
|
+
return o(u, {
|
|
309
324
|
get children() {
|
|
310
325
|
return [(() => {
|
|
311
|
-
var t =
|
|
326
|
+
var t = Y();
|
|
312
327
|
return v(t, "click", e.overview.close, !0), t;
|
|
313
328
|
})(), (() => {
|
|
314
|
-
var t =
|
|
315
|
-
return
|
|
329
|
+
var t = J();
|
|
330
|
+
return l(t, o(w, {
|
|
316
331
|
mode: "mobile",
|
|
317
332
|
get items() {
|
|
318
333
|
return e.overview.items();
|
|
@@ -343,9 +358,9 @@ function ge(r) {
|
|
|
343
358
|
}
|
|
344
359
|
});
|
|
345
360
|
}
|
|
346
|
-
}), o(
|
|
361
|
+
}), o(u, {
|
|
347
362
|
get children() {
|
|
348
|
-
return o(
|
|
363
|
+
return o(j, {
|
|
349
364
|
get open() {
|
|
350
365
|
return e.trash.open();
|
|
351
366
|
},
|
|
@@ -380,12 +395,12 @@ function ge(r) {
|
|
|
380
395
|
return e.contextMenu.state();
|
|
381
396
|
},
|
|
382
397
|
get children() {
|
|
383
|
-
return o(
|
|
398
|
+
return o(u, {
|
|
384
399
|
get children() {
|
|
385
400
|
return [(() => {
|
|
386
|
-
var t =
|
|
401
|
+
var t = Q();
|
|
387
402
|
return v(t, "contextmenu", e.contextMenu.retarget, !0), v(t, "click", e.contextMenu.close, !0), t;
|
|
388
|
-
})(), o(
|
|
403
|
+
})(), o(H, {
|
|
389
404
|
get x() {
|
|
390
405
|
return e.contextMenu.position()?.left ?? 0;
|
|
391
406
|
},
|
|
@@ -404,9 +419,9 @@ function ge(r) {
|
|
|
404
419
|
return !!e.editor.note();
|
|
405
420
|
},
|
|
406
421
|
get children() {
|
|
407
|
-
return o(
|
|
422
|
+
return o(u, {
|
|
408
423
|
get children() {
|
|
409
|
-
return o(
|
|
424
|
+
return o(W, {
|
|
410
425
|
get note() {
|
|
411
426
|
return e.editor.note();
|
|
412
427
|
},
|
|
@@ -438,9 +453,9 @@ function ge(r) {
|
|
|
438
453
|
}
|
|
439
454
|
});
|
|
440
455
|
}
|
|
441
|
-
}), o(
|
|
456
|
+
}), o(u, {
|
|
442
457
|
get children() {
|
|
443
|
-
return o(
|
|
458
|
+
return o(q, {
|
|
444
459
|
get open() {
|
|
445
460
|
return e.manualPaste.open();
|
|
446
461
|
},
|
|
@@ -464,7 +479,7 @@ function ge(r) {
|
|
|
464
479
|
}
|
|
465
480
|
});
|
|
466
481
|
}
|
|
467
|
-
|
|
482
|
+
I(["click", "contextmenu"]);
|
|
468
483
|
export {
|
|
469
|
-
|
|
484
|
+
he as NotesOverlay
|
|
470
485
|
};
|
|
@@ -21,6 +21,12 @@ export interface UseOverlayMaskOptions {
|
|
|
21
21
|
closeOnEscape?: boolean | OverlayEscapeCloseMode;
|
|
22
22
|
/** Stop bubbling keydown events to window-level hotkeys (default: true). */
|
|
23
23
|
blockHotkeys?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Allow a small set of global keybinds to continue bubbling to window-level handlers
|
|
26
|
+
* while the overlay is focused. This is primarily used by floating overlays that must
|
|
27
|
+
* preserve one or two shell-owned shortcuts such as their own toggle keybind.
|
|
28
|
+
*/
|
|
29
|
+
allowHotkeys?: readonly string[] | Accessor<readonly string[] | undefined>;
|
|
24
30
|
/** Auto-focus on open (default: true). */
|
|
25
31
|
autoFocus?: boolean | {
|
|
26
32
|
selector?: string;
|
|
@@ -1,94 +1,106 @@
|
|
|
1
1
|
import { createEffect as T, onCleanup as O } from "solid-js";
|
|
2
2
|
import { lockBodyStyle as M } from "../utils/bodyStyleLock.js";
|
|
3
|
-
import { deferAfterPaint as
|
|
3
|
+
import { deferAfterPaint as k } from "../utils/defer.js";
|
|
4
4
|
import { getFocusableElements as B, getFirstFocusableElement as D } from "../utils/focus.js";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { matchKeybind as F } from "../utils/keybind.js";
|
|
6
|
+
function b(e) {
|
|
7
|
+
return typeof Node < "u" && e instanceof Node;
|
|
7
8
|
}
|
|
8
|
-
function i(
|
|
9
|
-
return r ? r(c) : !
|
|
9
|
+
function i(e, c, r) {
|
|
10
|
+
return r ? r(c) : !e || !b(c) ? !1 : e.contains(c);
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
-
return r === "none" ? !1 : r === "all" ? !0 : !i(
|
|
12
|
+
function p(e, c, r, u) {
|
|
13
|
+
return r === "none" ? !1 : r === "all" ? !0 : !i(e, c, u);
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
15
|
+
function C(e) {
|
|
16
|
+
return typeof e == "function" ? e() ?? [] : e ?? [];
|
|
17
|
+
}
|
|
18
|
+
function P(e, c) {
|
|
19
|
+
for (const r of C(c)) {
|
|
20
|
+
const u = r.trim();
|
|
21
|
+
if (u && F(e, u))
|
|
22
|
+
return !0;
|
|
23
|
+
}
|
|
24
|
+
return !1;
|
|
25
|
+
}
|
|
26
|
+
function N(e) {
|
|
27
|
+
const c = () => e.lockBodyScroll !== !1, r = () => e.trapFocus !== !1, u = () => e.closeOnEscape === !1 ? "none" : e.closeOnEscape === "inside" ? "inside" : e.closeOnEscape === "none" ? "none" : "always", w = () => e.blockHotkeys !== !1, g = () => e.restoreFocus !== !1;
|
|
16
28
|
T(() => {
|
|
17
|
-
if (!
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
if (!
|
|
22
|
-
const n =
|
|
29
|
+
if (!e.open() || typeof document > "u") return;
|
|
30
|
+
const s = document.activeElement instanceof HTMLElement ? document.activeElement : null, L = c() ? M({ overflow: "hidden" }) : null;
|
|
31
|
+
k(() => {
|
|
32
|
+
const t = e.root();
|
|
33
|
+
if (!t) return;
|
|
34
|
+
const n = e.autoFocus;
|
|
23
35
|
if (n === !1) return;
|
|
24
|
-
const o = typeof n == "object" ? n.selector : void 0,
|
|
36
|
+
const o = typeof n == "object" ? n.selector : void 0, f = (o ? t.querySelector(o) : null) ?? t.querySelector("[data-floe-autofocus]") ?? D(t) ?? t;
|
|
25
37
|
try {
|
|
26
|
-
|
|
38
|
+
f.focus();
|
|
27
39
|
} catch {
|
|
28
40
|
}
|
|
29
41
|
});
|
|
30
|
-
const d = (
|
|
31
|
-
if (
|
|
32
|
-
const n =
|
|
42
|
+
const d = (t) => {
|
|
43
|
+
if (t.key !== "Tab") return;
|
|
44
|
+
const n = e.root();
|
|
33
45
|
if (!n) return;
|
|
34
46
|
const o = B(n);
|
|
35
47
|
if (!o.length) {
|
|
36
|
-
|
|
48
|
+
t.preventDefault();
|
|
37
49
|
try {
|
|
38
50
|
n.focus();
|
|
39
51
|
} catch {
|
|
40
52
|
}
|
|
41
53
|
return;
|
|
42
54
|
}
|
|
43
|
-
const a = o[0],
|
|
44
|
-
if (
|
|
45
|
-
if (
|
|
46
|
-
|
|
55
|
+
const a = o[0], f = o[o.length - 1], l = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
56
|
+
if (t.shiftKey) {
|
|
57
|
+
if (l === a || !l || !n.contains(l)) {
|
|
58
|
+
t.preventDefault();
|
|
47
59
|
try {
|
|
48
|
-
|
|
60
|
+
f.focus();
|
|
49
61
|
} catch {
|
|
50
62
|
}
|
|
51
63
|
}
|
|
52
|
-
} else if (
|
|
53
|
-
|
|
64
|
+
} else if (l === f) {
|
|
65
|
+
t.preventDefault();
|
|
54
66
|
try {
|
|
55
67
|
a.focus();
|
|
56
68
|
} catch {
|
|
57
69
|
}
|
|
58
70
|
}
|
|
59
|
-
}, m = (
|
|
60
|
-
if (
|
|
71
|
+
}, m = (t) => {
|
|
72
|
+
if (t.key !== "Escape") return;
|
|
61
73
|
const n = u();
|
|
62
74
|
if (n === "none") return;
|
|
63
|
-
const o =
|
|
75
|
+
const o = e.root(), a = i(o, b(t.target) ? t.target : document.activeElement, e.containsTarget);
|
|
64
76
|
if (n === "inside") {
|
|
65
77
|
if (a) {
|
|
66
|
-
|
|
78
|
+
t.preventDefault(), t.stopImmediatePropagation(), e.onClose?.();
|
|
67
79
|
return;
|
|
68
80
|
}
|
|
69
|
-
|
|
81
|
+
e.onEscapeOutside && (t.preventDefault(), t.stopImmediatePropagation(), e.onEscapeOutside());
|
|
70
82
|
return;
|
|
71
83
|
}
|
|
72
|
-
|
|
73
|
-
}, v = (
|
|
74
|
-
const n =
|
|
75
|
-
n &&
|
|
76
|
-
}, y = (
|
|
77
|
-
const n =
|
|
78
|
-
|
|
79
|
-
}, h = (
|
|
80
|
-
|
|
81
|
-
}, E = (
|
|
82
|
-
const n =
|
|
83
|
-
|
|
84
|
+
t.preventDefault(), t.stopImmediatePropagation(), e.onClose?.();
|
|
85
|
+
}, v = (t) => {
|
|
86
|
+
const n = e.root();
|
|
87
|
+
n && w() && i(n, t.target, e.containsTarget) && (P(t, e.allowHotkeys) || t.stopPropagation());
|
|
88
|
+
}, y = (t) => {
|
|
89
|
+
const n = e.blockWheel ?? "none", o = e.root();
|
|
90
|
+
p(o, t.target, n, e.containsTarget) && t.cancelable && t.preventDefault();
|
|
91
|
+
}, h = (t) => {
|
|
92
|
+
t.stopPropagation();
|
|
93
|
+
}, E = (t) => {
|
|
94
|
+
const n = e.blockTouchMove ?? "none", o = e.root();
|
|
95
|
+
p(o, t.target, n, e.containsTarget) && t.cancelable && t.preventDefault();
|
|
84
96
|
};
|
|
85
|
-
r() && document.addEventListener("keydown", d, !0), u() !== "none" && window.addEventListener("keydown", m, !0), document.addEventListener("keydown", v), (
|
|
86
|
-
r() && document.removeEventListener("keydown", d, !0), u() !== "none" && window.removeEventListener("keydown", m, !0), document.removeEventListener("keydown", v), (
|
|
97
|
+
r() && document.addEventListener("keydown", d, !0), u() !== "none" && window.addEventListener("keydown", m, !0), document.addEventListener("keydown", v), (e.blockWheel ?? "none") !== "none" && (document.addEventListener("wheel", y, { capture: !0, passive: !1 }), document.addEventListener("wheel", h)), (e.blockTouchMove ?? "none") !== "none" && document.addEventListener("touchmove", E, { capture: !0, passive: !1 }), O(() => {
|
|
98
|
+
r() && document.removeEventListener("keydown", d, !0), u() !== "none" && window.removeEventListener("keydown", m, !0), document.removeEventListener("keydown", v), (e.blockWheel ?? "none") !== "none" && (document.removeEventListener("wheel", y, !0), document.removeEventListener("wheel", h)), (e.blockTouchMove ?? "none") !== "none" && document.removeEventListener("touchmove", E, !0), L?.(), g() && s && s.isConnected && k(() => {
|
|
87
99
|
if (typeof document > "u") return;
|
|
88
|
-
const
|
|
89
|
-
if (!(
|
|
100
|
+
const t = document.activeElement;
|
|
101
|
+
if (!(t && t !== document.body && t !== document.documentElement))
|
|
90
102
|
try {
|
|
91
|
-
|
|
103
|
+
s.focus();
|
|
92
104
|
} catch {
|
|
93
105
|
}
|
|
94
106
|
});
|
|
@@ -96,5 +108,5 @@ function H(t) {
|
|
|
96
108
|
});
|
|
97
109
|
}
|
|
98
110
|
export {
|
|
99
|
-
|
|
111
|
+
N as useOverlayMask
|
|
100
112
|
};
|