@floegence/floe-webapp-core 0.35.13 → 0.35.14
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/components/deck/WidgetResizeHandle.js +34 -33
- package/dist/components/file-browser/FileBrowser.js +77 -70
- package/dist/components/file-browser/FileBrowserContext.js +141 -140
- package/dist/components/file-browser/types.d.ts +1 -0
- package/dist/components/layout/ActivityBar.js +21 -21
- package/dist/components/layout/MobileTabBar.js +12 -12
- package/dist/components/layout/ResizeHandle.d.ts +2 -0
- package/dist/components/layout/ResizeHandle.js +38 -37
- package/dist/components/layout/Shell.js +164 -140
- package/dist/components/layout/Sidebar.js +8 -8
- package/dist/components/layout/SidebarPane.d.ts +2 -0
- package/dist/components/layout/SidebarPane.js +22 -16
- package/dist/components/ui/CommandPalette.js +47 -46
- package/dist/components/ui/FloatingWindow.d.ts +5 -1
- package/dist/components/ui/FloatingWindow.js +267 -194
- package/dist/components/ui/floatingWindowGeometry.d.ts +41 -0
- package/dist/components/ui/floatingWindowGeometry.js +65 -0
- package/dist/context/FileBrowserDragContext.js +45 -43
- package/dist/context/LayoutContext.d.ts +1 -0
- package/dist/context/LayoutContext.js +20 -19
- package/dist/floe.css +12 -0
- package/dist/hooks/useDeckDrag.js +39 -35
- package/dist/hooks/useFileBrowserDrag.js +74 -81
- package/dist/styles.css +1 -1
- package/dist/utils/hotInteraction.d.ts +9 -0
- package/dist/utils/hotInteraction.js +34 -0
- package/package.json +10 -10
- package/LICENSE +0 -21
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
function l(o, h, e) {
|
|
2
|
+
return Math.max(h, Math.min(e, o));
|
|
3
|
+
}
|
|
4
|
+
function z(o, h, e) {
|
|
5
|
+
const a = Math.max(0, e), t = Math.min(o, a), n = Math.max(t, Math.min(h, a));
|
|
6
|
+
return { min: t, max: n };
|
|
7
|
+
}
|
|
8
|
+
function S(o) {
|
|
9
|
+
const {
|
|
10
|
+
mode: h,
|
|
11
|
+
pointer: e,
|
|
12
|
+
dragStartPos: a,
|
|
13
|
+
dragStartRect: t,
|
|
14
|
+
resizeStartPos: n,
|
|
15
|
+
resizeStartRect: i,
|
|
16
|
+
resizeHandle: m,
|
|
17
|
+
minSize: g,
|
|
18
|
+
maxSize: d,
|
|
19
|
+
viewport: s,
|
|
20
|
+
mobile: x,
|
|
21
|
+
mobilePadding: M
|
|
22
|
+
} = o, r = e.x - (h === "drag" ? a.x : n.x), w = e.y - (h === "drag" ? a.y : n.y);
|
|
23
|
+
if (h === "drag")
|
|
24
|
+
return {
|
|
25
|
+
...t,
|
|
26
|
+
x: x ? M : Math.max(0, Math.min(s.width - t.width, t.x + r)),
|
|
27
|
+
y: Math.max(0, Math.min(s.height - t.height, t.y + w))
|
|
28
|
+
};
|
|
29
|
+
let u = i.width, f = i.height, y = i.x, b = i.y;
|
|
30
|
+
if (!x && m.includes("e") && (u = Math.max(g.width, Math.min(d.width, i.width + r))), !x && m.includes("w")) {
|
|
31
|
+
const c = i.width - r;
|
|
32
|
+
c >= g.width && c <= d.width && (u = c, y = i.x + r);
|
|
33
|
+
}
|
|
34
|
+
if (m.includes("s") && (f = Math.max(g.height, Math.min(d.height, i.height + w))), m.includes("n")) {
|
|
35
|
+
const c = i.height - w;
|
|
36
|
+
c >= g.height && c <= d.height && (f = c, b = i.y + w);
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
x: Math.max(0, Math.min(s.width - u, y)),
|
|
40
|
+
y: Math.max(0, Math.min(s.height - f, b)),
|
|
41
|
+
width: u,
|
|
42
|
+
height: f
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function p(o) {
|
|
46
|
+
const {
|
|
47
|
+
rect: h,
|
|
48
|
+
minSize: e,
|
|
49
|
+
maxSize: a,
|
|
50
|
+
viewport: t,
|
|
51
|
+
mobile: n,
|
|
52
|
+
mobilePadding: i,
|
|
53
|
+
center: m = !1
|
|
54
|
+
} = o, g = n ? Math.max(0, t.width - i * 2) : t.width, d = z(e.width, a.width, g), s = z(e.height, a.height, t.height), x = n ? d.max : l(h.width, d.min, d.max), M = l(h.height, s.min, s.max), r = Math.max(0, t.width - x), w = Math.max(0, t.height - M);
|
|
55
|
+
return {
|
|
56
|
+
x: n ? l(i, 0, r) : m ? Math.max(0, Math.round((t.width - x) / 2)) : l(h.x, 0, r),
|
|
57
|
+
y: m ? Math.max(0, Math.round((t.height - M) / 2)) : l(h.y, 0, w),
|
|
58
|
+
width: x,
|
|
59
|
+
height: M
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
p as normalizeFloatingWindowRect,
|
|
64
|
+
S as resolveFloatingWindowRect
|
|
65
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { createComponent as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { createComponent as E } from "solid-js/web";
|
|
2
|
+
import { createSignal as F, onCleanup as _, useContext as h, createContext as k } from "solid-js";
|
|
3
|
+
import { deferNonBlocking as z } from "../utils/defer.js";
|
|
4
|
+
import { startHotInteraction as O } from "../utils/hotInteraction.js";
|
|
5
|
+
const D = k(), T = {
|
|
5
6
|
isDragging: !1,
|
|
6
7
|
draggedItems: [],
|
|
7
8
|
sourceInstanceId: null,
|
|
@@ -16,23 +17,24 @@ const D = z(), T = {
|
|
|
16
17
|
isDropCommitted: !1,
|
|
17
18
|
dropTargetRect: null
|
|
18
19
|
}, b = 200;
|
|
19
|
-
function
|
|
20
|
+
function H(m) {
|
|
20
21
|
const d = m.trim() || "/";
|
|
21
22
|
if (d === "/") return "/";
|
|
22
23
|
const r = d.split("/").filter(Boolean);
|
|
23
24
|
return r.pop(), r.length ? "/" + r.join("/") : "/";
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
-
const [d, r] =
|
|
27
|
-
let
|
|
26
|
+
function q(m) {
|
|
27
|
+
const [d, r] = F(T), a = /* @__PURE__ */ new Map();
|
|
28
|
+
let s = null;
|
|
28
29
|
const P = (t) => {
|
|
29
30
|
a.set(t.instanceId, t);
|
|
30
31
|
}, R = (t) => {
|
|
31
32
|
a.delete(t);
|
|
32
33
|
}, C = (t) => a.get(t), v = () => a, x = (t, e, n) => {
|
|
33
|
-
t.length !== 0 && (
|
|
34
|
+
t.length !== 0 && (s?.(), s = O({
|
|
35
|
+
kind: "drag",
|
|
34
36
|
cursor: "grabbing",
|
|
35
|
-
|
|
37
|
+
lockUserSelect: !0
|
|
36
38
|
}), r({
|
|
37
39
|
isDragging: !0,
|
|
38
40
|
draggedItems: t,
|
|
@@ -56,29 +58,29 @@ function W(m) {
|
|
|
56
58
|
y: e
|
|
57
59
|
}
|
|
58
60
|
}));
|
|
59
|
-
},
|
|
61
|
+
}, A = (t, e, n) => {
|
|
60
62
|
r((c) => ({
|
|
61
63
|
...c,
|
|
62
64
|
dropTarget: t,
|
|
63
65
|
isValidDrop: e,
|
|
64
66
|
dropTargetRect: n ?? null
|
|
65
67
|
}));
|
|
66
|
-
},
|
|
68
|
+
}, B = (t, e, n, c) => {
|
|
67
69
|
if (t.length === 0 || n && n.type === "file") return !1;
|
|
68
70
|
for (const o of t) {
|
|
69
|
-
const
|
|
71
|
+
const g = o.item.path, l = H(g);
|
|
70
72
|
if (o.item.type === "folder") {
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
73
|
+
const p = e.trim() || "/", u = g.trim() || "/";
|
|
74
|
+
if (p === u || p.startsWith(u + "/")) return !1;
|
|
73
75
|
}
|
|
74
|
-
if (o.sourceInstanceId === c &&
|
|
76
|
+
if (o.sourceInstanceId === c && l === e)
|
|
75
77
|
return !1;
|
|
76
78
|
}
|
|
77
79
|
return !0;
|
|
78
|
-
},
|
|
80
|
+
}, S = (t) => {
|
|
79
81
|
const e = d();
|
|
80
82
|
if (!e.isDragging) return;
|
|
81
|
-
|
|
83
|
+
s?.(), s = null;
|
|
82
84
|
const n = !!(t && e.dropTarget && e.isValidDrop);
|
|
83
85
|
let c = null;
|
|
84
86
|
if (n && e.dropTargetRect && (c = {
|
|
@@ -94,24 +96,24 @@ function W(m) {
|
|
|
94
96
|
})), n) {
|
|
95
97
|
const {
|
|
96
98
|
draggedItems: o,
|
|
97
|
-
sourceInstanceId:
|
|
99
|
+
sourceInstanceId: g
|
|
98
100
|
} = e, {
|
|
99
|
-
targetPath:
|
|
100
|
-
instanceId:
|
|
101
|
-
} = e.dropTarget,
|
|
101
|
+
targetPath: l,
|
|
102
|
+
instanceId: p
|
|
103
|
+
} = e.dropTarget, u = g ? a.get(g) : void 0, f = a.get(p);
|
|
102
104
|
if (f?.onDragMove) {
|
|
103
|
-
const I = o.map((
|
|
104
|
-
|
|
105
|
-
for (const
|
|
106
|
-
const V =
|
|
107
|
-
...
|
|
105
|
+
const I = o.map((i) => i.item), N = o.map((i) => i.item.path);
|
|
106
|
+
u?.optimisticRemove(N);
|
|
107
|
+
for (const i of I) {
|
|
108
|
+
const V = l === "/" ? "/" + i.name : l + "/" + i.name, y = {
|
|
109
|
+
...i,
|
|
108
110
|
path: V
|
|
109
111
|
};
|
|
110
|
-
f.optimisticInsert(
|
|
112
|
+
f.optimisticInsert(l, y);
|
|
111
113
|
}
|
|
112
|
-
|
|
113
|
-
f.onDragMove(I,
|
|
114
|
-
}
|
|
114
|
+
z(() => {
|
|
115
|
+
f.onDragMove(I, l, g || "");
|
|
116
|
+
});
|
|
115
117
|
}
|
|
116
118
|
}
|
|
117
119
|
setTimeout(() => {
|
|
@@ -119,9 +121,9 @@ function W(m) {
|
|
|
119
121
|
}, b);
|
|
120
122
|
};
|
|
121
123
|
_(() => {
|
|
122
|
-
|
|
124
|
+
s?.(), s = null, a.clear();
|
|
123
125
|
});
|
|
124
|
-
const
|
|
126
|
+
const M = {
|
|
125
127
|
dragState: d,
|
|
126
128
|
registerInstance: P,
|
|
127
129
|
unregisterInstance: R,
|
|
@@ -129,25 +131,25 @@ function W(m) {
|
|
|
129
131
|
getInstances: v,
|
|
130
132
|
startDrag: x,
|
|
131
133
|
updateDrag: w,
|
|
132
|
-
setDropTarget:
|
|
133
|
-
endDrag:
|
|
134
|
-
canDropOn:
|
|
134
|
+
setDropTarget: A,
|
|
135
|
+
endDrag: S,
|
|
136
|
+
canDropOn: B
|
|
135
137
|
};
|
|
136
|
-
return
|
|
137
|
-
value:
|
|
138
|
+
return E(D.Provider, {
|
|
139
|
+
value: M,
|
|
138
140
|
get children() {
|
|
139
141
|
return m.children;
|
|
140
142
|
}
|
|
141
143
|
});
|
|
142
144
|
}
|
|
143
|
-
function
|
|
145
|
+
function J() {
|
|
144
146
|
return h(D);
|
|
145
147
|
}
|
|
146
|
-
function
|
|
148
|
+
function K() {
|
|
147
149
|
return h(D) !== void 0;
|
|
148
150
|
}
|
|
149
151
|
export {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
152
|
+
q as FileBrowserDragProvider,
|
|
153
|
+
K as hasFileBrowserDragContext,
|
|
154
|
+
J as useFileBrowserDrag
|
|
153
155
|
};
|
|
@@ -3,6 +3,7 @@ export interface LayoutContextValue {
|
|
|
3
3
|
sidebarWidth: Accessor<number>;
|
|
4
4
|
sidebarActiveTab: Accessor<string>;
|
|
5
5
|
sidebarCollapsed: Accessor<boolean>;
|
|
6
|
+
clampSidebarWidth: (width: number) => number;
|
|
6
7
|
setSidebarWidth: (width: number) => void;
|
|
7
8
|
setSidebarActiveTab: (tab: string, opts?: {
|
|
8
9
|
openSidebar?: boolean;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { createEffect as
|
|
2
|
-
import { createStore as
|
|
3
|
-
import { createSimpleContext as
|
|
4
|
-
import { useResolvedFloeConfig as
|
|
1
|
+
import { createEffect as m } from "solid-js";
|
|
2
|
+
import { createStore as p, produce as d } from "solid-js/store";
|
|
3
|
+
import { createSimpleContext as h } from "./createSimpleContext.js";
|
|
4
|
+
import { useResolvedFloeConfig as f } from "./FloeConfigContext.js";
|
|
5
5
|
const {
|
|
6
|
-
Provider:
|
|
7
|
-
use:
|
|
8
|
-
} =
|
|
6
|
+
Provider: w,
|
|
7
|
+
use: y
|
|
8
|
+
} = h({
|
|
9
9
|
name: "Layout",
|
|
10
|
-
init:
|
|
10
|
+
init: u
|
|
11
11
|
});
|
|
12
|
-
function
|
|
13
|
-
const l =
|
|
12
|
+
function u() {
|
|
13
|
+
const l = f(), a = () => l.config.layout, b = () => typeof window > "u" ? !1 : window.matchMedia(a().mobileQuery).matches, o = l.persist.load(a().storageKey, {}), c = {
|
|
14
14
|
sidebar: {
|
|
15
15
|
width: o.sidebar?.width ?? a().sidebar.defaultWidth,
|
|
16
16
|
activeTab: o.sidebar?.activeTab ?? a().sidebar.defaultActiveTab,
|
|
@@ -20,9 +20,9 @@ function f() {
|
|
|
20
20
|
opened: o.terminal?.opened ?? a().terminal.defaultOpened,
|
|
21
21
|
height: o.terminal?.height ?? a().terminal.defaultHeight
|
|
22
22
|
},
|
|
23
|
-
isMobile:
|
|
24
|
-
}, [i, t] =
|
|
25
|
-
return
|
|
23
|
+
isMobile: b()
|
|
24
|
+
}, [i, t] = p(c), s = (e) => Math.max(a().sidebar.clamp.min, Math.min(a().sidebar.clamp.max, e));
|
|
25
|
+
return m(() => {
|
|
26
26
|
const e = {
|
|
27
27
|
sidebar: {
|
|
28
28
|
width: i.sidebar.width,
|
|
@@ -40,12 +40,13 @@ function f() {
|
|
|
40
40
|
sidebarWidth: () => i.sidebar.width,
|
|
41
41
|
sidebarActiveTab: () => i.sidebar.activeTab,
|
|
42
42
|
sidebarCollapsed: () => i.sidebar.collapsed,
|
|
43
|
+
clampSidebarWidth: s,
|
|
43
44
|
// Sidebar actions
|
|
44
45
|
setSidebarWidth: (e) => t(d((r) => {
|
|
45
|
-
r.sidebar.width =
|
|
46
|
+
r.sidebar.width = s(e);
|
|
46
47
|
})),
|
|
47
|
-
setSidebarActiveTab: (e, r) => t(d((
|
|
48
|
-
|
|
48
|
+
setSidebarActiveTab: (e, r) => t(d((n) => {
|
|
49
|
+
n.sidebar.activeTab = e, r?.openSidebar !== !1 && (n.sidebar.collapsed = !1);
|
|
49
50
|
})),
|
|
50
51
|
setSidebarCollapsed: (e) => t(d((r) => {
|
|
51
52
|
r.sidebar.collapsed = e;
|
|
@@ -69,7 +70,7 @@ function f() {
|
|
|
69
70
|
};
|
|
70
71
|
}
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
w as LayoutProvider,
|
|
74
|
+
u as createLayoutService,
|
|
75
|
+
y as useLayout
|
|
75
76
|
};
|
package/dist/floe.css
CHANGED
|
@@ -328,6 +328,18 @@
|
|
|
328
328
|
-webkit-tap-highlight-color: transparent;
|
|
329
329
|
touch-action: manipulation;
|
|
330
330
|
}
|
|
331
|
+
|
|
332
|
+
[data-floe-geometry-surface='floating-window'] {
|
|
333
|
+
contain: layout paint style;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
[data-floe-hot-interaction~='resize'] [data-floe-geometry-surface='shell-sidebar'],
|
|
337
|
+
[data-floe-hot-interaction~='resize'] [data-floe-geometry-surface='sidebar-pane'],
|
|
338
|
+
[data-floe-hot-interaction~='resize'] [data-floe-geometry-surface='floating-window'],
|
|
339
|
+
[data-floe-hot-interaction~='drag'] [data-floe-geometry-surface='floating-window'] {
|
|
340
|
+
animation: none !important;
|
|
341
|
+
transition: none !important;
|
|
342
|
+
}
|
|
331
343
|
}
|
|
332
344
|
|
|
333
345
|
/* Animation utilities */
|
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
import { createEffect as
|
|
2
|
-
import { useDeck as
|
|
3
|
-
import { applyDragDelta as
|
|
4
|
-
import { getGridConfigFromElement as
|
|
5
|
-
import {
|
|
1
|
+
import { createEffect as G, onCleanup as z } from "solid-js";
|
|
2
|
+
import { useDeck as B } from "../context/DeckContext.js";
|
|
3
|
+
import { applyDragDelta as U } from "../utils/gridLayout.js";
|
|
4
|
+
import { getGridConfigFromElement as N } from "../components/deck/DeckGrid.js";
|
|
5
|
+
import { startHotInteraction as O } from "../utils/hotInteraction.js";
|
|
6
6
|
function Z() {
|
|
7
|
-
const p =
|
|
8
|
-
let c = null, m = 0, f = 0, L = 0, g = 0,
|
|
9
|
-
const
|
|
7
|
+
const p = B();
|
|
8
|
+
let c = null, m = 0, f = 0, L = 0, g = 0, l = 0, P = 0, I = 0, A = 0, a = null, v = null, F = null, w = null, n = null, T = null, H = 0, k = 0, y = null;
|
|
9
|
+
const C = (t) => {
|
|
10
10
|
if (!t) {
|
|
11
|
-
|
|
11
|
+
w?.(), w = null;
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
w?.(), w = O({
|
|
15
|
+
kind: "drag",
|
|
16
|
+
cursor: "grabbing",
|
|
17
|
+
lockUserSelect: !0
|
|
18
|
+
});
|
|
19
|
+
}, M = () => {
|
|
20
|
+
c !== null && (a !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(a), a = null), c = null, v = null, F = null, n = null, T = null, y = null, C(!1), p.endDrag(!0));
|
|
17
21
|
}, Y = () => {
|
|
18
22
|
if (!n) return;
|
|
19
|
-
const t =
|
|
23
|
+
const t = T ?? n.getBoundingClientRect(), e = 48, d = 24, s = l - t.top, o = t.bottom - l;
|
|
20
24
|
let r = 0;
|
|
21
25
|
if (s < e ? r = -Math.ceil((e - s) / e * d) : o < e && (r = Math.ceil((e - o) / e * d)), r === 0) return;
|
|
22
|
-
const
|
|
23
|
-
h !==
|
|
24
|
-
},
|
|
26
|
+
const i = n.scrollTop, h = Math.max(0, Math.min(i + r, n.scrollHeight - n.clientHeight));
|
|
27
|
+
h !== i && (n.scrollTop = h);
|
|
28
|
+
}, R = () => {
|
|
25
29
|
if (a !== null || typeof requestAnimationFrame > "u") return;
|
|
26
30
|
const t = () => {
|
|
27
31
|
if (c === null) {
|
|
@@ -38,37 +42,37 @@ function Z() {
|
|
|
38
42
|
if (!o || t.pointerType === "mouse" && t.button !== 0) return;
|
|
39
43
|
const r = o.dataset.widgetDragHandle;
|
|
40
44
|
if (!r) return;
|
|
41
|
-
const
|
|
42
|
-
if (!
|
|
43
|
-
t.preventDefault(), t.stopPropagation(), c = t.pointerId, m = t.clientX, f = t.clientY, g = m,
|
|
44
|
-
const u = p.activeLayout()?.widgets.find((
|
|
45
|
-
|
|
46
|
-
const E = window.getComputedStyle(
|
|
47
|
-
|
|
45
|
+
const i = o.closest(".deck-grid");
|
|
46
|
+
if (!i) return;
|
|
47
|
+
t.preventDefault(), t.stopPropagation(), c = t.pointerId, m = t.clientX, f = t.clientY, g = m, l = f, P = m, I = f, v = r, F = o, n = i, T = i.getBoundingClientRect(), L = i.scrollTop, A = L, C(!0);
|
|
48
|
+
const u = p.activeLayout()?.widgets.find((b) => b.id === r);
|
|
49
|
+
y = u ? { ...u.position } : null;
|
|
50
|
+
const E = window.getComputedStyle(i);
|
|
51
|
+
H = parseFloat(E.paddingLeft) || 0, k = parseFloat(E.paddingRight) || 0, p.startDrag(r, m, f), o.setPointerCapture(t.pointerId), R();
|
|
48
52
|
}, x = (t) => {
|
|
49
|
-
c !== t.pointerId || !v || (g = t.clientX,
|
|
53
|
+
c !== t.pointerId || !v || (g = t.clientX, l = t.clientY, typeof requestAnimationFrame > "u" && X());
|
|
50
54
|
}, X = () => {
|
|
51
|
-
if (!v || !n || !
|
|
55
|
+
if (!v || !n || !y) return;
|
|
52
56
|
Y();
|
|
53
57
|
const t = n.scrollTop;
|
|
54
|
-
if (g === P &&
|
|
55
|
-
P = g,
|
|
56
|
-
const e = g - m, d =
|
|
58
|
+
if (g === P && l === I && t === A) return;
|
|
59
|
+
P = g, I = l, A = t;
|
|
60
|
+
const e = g - m, d = l - f + (t - L), { cols: s, rowHeight: o, gap: r } = N(n), i = n.clientWidth - H - k, h = r * (s - 1), u = (i - h) / s;
|
|
57
61
|
if (!Number.isFinite(u) || u <= 0) return;
|
|
58
|
-
const E = o + r,
|
|
59
|
-
p.updateDrag(
|
|
62
|
+
const E = o + r, b = Math.round(e / u), W = Math.round(d / E), q = U(y, b, W, s);
|
|
63
|
+
p.updateDrag(q, { x: e, y: d });
|
|
60
64
|
}, D = (t) => {
|
|
61
65
|
if (c === t.pointerId) {
|
|
62
66
|
try {
|
|
63
|
-
|
|
67
|
+
F?.releasePointerCapture(t.pointerId);
|
|
64
68
|
} catch {
|
|
65
69
|
}
|
|
66
|
-
|
|
70
|
+
M();
|
|
67
71
|
}
|
|
68
72
|
};
|
|
69
|
-
|
|
70
|
-
p.editMode() && (typeof document > "u" || (document.addEventListener("pointerdown", S, !0), document.addEventListener("pointermove", x, !0), document.addEventListener("pointerup", D, !0), document.addEventListener("pointercancel", D, !0),
|
|
71
|
-
|
|
73
|
+
G(() => {
|
|
74
|
+
p.editMode() && (typeof document > "u" || (document.addEventListener("pointerdown", S, !0), document.addEventListener("pointermove", x, !0), document.addEventListener("pointerup", D, !0), document.addEventListener("pointercancel", D, !0), z(() => {
|
|
75
|
+
M(), document.removeEventListener("pointerdown", S, !0), document.removeEventListener("pointermove", x, !0), document.removeEventListener("pointerup", D, !0), document.removeEventListener("pointercancel", D, !0);
|
|
72
76
|
})));
|
|
73
77
|
});
|
|
74
78
|
}
|