@floegence/floe-webapp-core 0.36.40 → 0.36.42
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/file-browser/useFileBrowserMarqueeSelection.d.ts +2 -0
- package/dist/components/file-browser/useFileBrowserMarqueeSelection.js +74 -68
- package/dist/components/ui/FloatingWindow.d.ts +3 -0
- package/dist/components/ui/FloatingWindow.js +181 -181
- package/dist/components/ui/floatingWindowGeometry.d.ts +15 -0
- package/dist/components/ui/floatingWindowGeometry.js +80 -48
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/full.js +25 -23
- package/dist/ui.js +42 -40
- package/package.json +1 -1
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { createComponent as
|
|
2
|
-
import { createUniqueId as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { useLayout as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { Restore as
|
|
7
|
-
import { startHotInteraction as
|
|
8
|
-
import { normalizeFloatingWindowRect as
|
|
9
|
-
import { LOCAL_INTERACTION_SURFACE_ATTR as
|
|
10
|
-
import { SURFACE_PORTAL_LAYER_ATTR as
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
const
|
|
1
|
+
import { createComponent as s, Portal as Fe, spread as ae, mergeProps as de, memo as ue, insert as g, effect as u, setAttribute as Le, addEventListener as m, className as c, template as a, use as Me, delegateEvents as De } from "solid-js/web";
|
|
2
|
+
import { createUniqueId as Te, createSignal as p, onMount as We, onCleanup as U, createEffect as b, Show as P, batch as ke } from "solid-js";
|
|
3
|
+
import { cn as C } from "../../utils/cn.js";
|
|
4
|
+
import { useLayout as Oe } from "../../context/LayoutContext.js";
|
|
5
|
+
import { Button as ce } from "./Button.js";
|
|
6
|
+
import { Restore as He, Maximize as Ue, X as Xe } from "../icons/index.js";
|
|
7
|
+
import { startHotInteraction as Ye } from "../../utils/hotInteraction.js";
|
|
8
|
+
import { resolveFloatingWindowViewport as fe, normalizeFloatingWindowRect as he, resolveFloatingWindowRect as qe } from "./floatingWindowGeometry.js";
|
|
9
|
+
import { LOCAL_INTERACTION_SURFACE_ATTR as we } from "./localInteractionSurface.js";
|
|
10
|
+
import { SURFACE_PORTAL_LAYER_ATTR as Ne } from "./dialogSurfaceScope.js";
|
|
11
|
+
var Be = /* @__PURE__ */ a('<h2 class="text-sm font-medium truncate select-none">'), je = /* @__PURE__ */ a('<div class="flex items-center justify-end gap-2 p-3 border-t border-border">'), Ge = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=n style=touch-action:none>"), Ve = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=s style=touch-action:none>"), Ze = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=e style=touch-action:none>"), Je = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=w style=touch-action:none>"), Ke = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=ne style=touch-action:none>"), Qe = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=nw style=touch-action:none>"), et = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=se style=touch-action:none>"), tt = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=sw style=touch-action:none>"), nt = /* @__PURE__ */ a('<div data-floe-geometry-surface=floating-window><div data-floe-dialog-surface-host=true><div data-floe-floating-window-titlebar=true style=touch-action:none><div class="flex-1 min-w-0"></div><div class="flex items-center gap-0.5 -mr-1"></div></div><div class="flex-1 overflow-auto p-3">');
|
|
12
|
+
function ht(i) {
|
|
13
|
+
const X = () => i.resizable ?? !0, Y = () => i.draggable ?? !0, E = () => i.minSize ?? {
|
|
14
14
|
width: 200,
|
|
15
15
|
height: 150
|
|
16
|
-
},
|
|
16
|
+
}, A = () => i.maxSize ?? {
|
|
17
17
|
width: 1 / 0,
|
|
18
18
|
height: 1 / 0
|
|
19
|
-
},
|
|
19
|
+
}, z = () => i.viewportInsets ?? {}, ge = () => i.zIndex ?? 100, me = Te(), ve = Oe(), $ = () => ve.isMobile(), F = 16, q = () => `floating-window-${me}-title`, [L, pe] = p(i.defaultPosition ?? {
|
|
20
20
|
x: 0,
|
|
21
21
|
y: 0
|
|
22
|
-
}), [
|
|
22
|
+
}), [M, ze] = p(i.defaultSize ?? {
|
|
23
23
|
width: 400,
|
|
24
24
|
height: 300
|
|
25
|
-
}), [d,
|
|
26
|
-
let
|
|
25
|
+
}), [d, N] = p(!1), [B, j] = p(!1), [G, V] = p(!1), [xe, D] = p(!1), [ye, be] = p(null);
|
|
26
|
+
let Z = {
|
|
27
27
|
x: 0,
|
|
28
28
|
y: 0
|
|
29
|
-
},
|
|
29
|
+
}, J = {
|
|
30
30
|
x: 0,
|
|
31
31
|
y: 0,
|
|
32
32
|
width: 0,
|
|
33
33
|
height: 0
|
|
34
|
-
},
|
|
34
|
+
}, K = {
|
|
35
35
|
x: 0,
|
|
36
36
|
y: 0
|
|
37
|
-
},
|
|
37
|
+
}, Q = {
|
|
38
38
|
x: 0,
|
|
39
39
|
y: 0,
|
|
40
40
|
width: 0,
|
|
41
41
|
height: 0
|
|
42
|
-
},
|
|
42
|
+
}, ee = "se", r, o = null, v = null, I = {
|
|
43
43
|
x: 0,
|
|
44
44
|
y: 0
|
|
45
|
-
}, x = null, _ = null,
|
|
45
|
+
}, x = null, _ = null, T = !1, y = {
|
|
46
46
|
x: i.defaultPosition?.x ?? 0,
|
|
47
47
|
y: i.defaultPosition?.y ?? 0,
|
|
48
48
|
width: i.defaultSize?.width ?? 400,
|
|
49
49
|
height: i.defaultSize?.height ?? 300
|
|
50
50
|
};
|
|
51
|
-
const
|
|
51
|
+
const Pe = {
|
|
52
52
|
n: "ns-resize",
|
|
53
53
|
s: "ns-resize",
|
|
54
54
|
e: "ew-resize",
|
|
@@ -57,45 +57,45 @@ function ct(i) {
|
|
|
57
57
|
nw: "nwse-resize",
|
|
58
58
|
se: "nwse-resize",
|
|
59
59
|
sw: "nesw-resize"
|
|
60
|
-
},
|
|
60
|
+
}, W = (e, t) => {
|
|
61
61
|
if (!e) {
|
|
62
62
|
_?.(), _ = null;
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
_?.(), _ =
|
|
66
|
-
kind:
|
|
65
|
+
_?.(), _ = Ye({
|
|
66
|
+
kind: v === "resize" ? "resize" : "drag",
|
|
67
67
|
cursor: t,
|
|
68
68
|
lockUserSelect: !0
|
|
69
69
|
});
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
},
|
|
73
|
-
const e =
|
|
70
|
+
}, te = (e) => {
|
|
71
|
+
y = e, r && (r.style.transform = `translate3d(${e.x}px, ${e.y}px, 0)`, r.style.width = `${e.width}px`, r.style.height = `${e.height}px`);
|
|
72
|
+
}, k = () => {
|
|
73
|
+
const e = L(), t = M();
|
|
74
74
|
return {
|
|
75
75
|
x: e.x,
|
|
76
76
|
y: e.y,
|
|
77
77
|
width: t.width,
|
|
78
78
|
height: t.height
|
|
79
79
|
};
|
|
80
|
-
},
|
|
81
|
-
|
|
80
|
+
}, S = (e) => {
|
|
81
|
+
y = e, pe({
|
|
82
82
|
x: e.x,
|
|
83
83
|
y: e.y
|
|
84
|
-
}),
|
|
84
|
+
}), ze({
|
|
85
85
|
width: e.width,
|
|
86
86
|
height: e.height
|
|
87
87
|
});
|
|
88
|
-
},
|
|
88
|
+
}, $e = () => {
|
|
89
89
|
try {
|
|
90
90
|
r?.focus({
|
|
91
91
|
preventScroll: !0
|
|
92
92
|
});
|
|
93
93
|
} catch {
|
|
94
94
|
}
|
|
95
|
-
},
|
|
95
|
+
}, Ie = (e) => {
|
|
96
96
|
const t = e instanceof Element ? e : null;
|
|
97
97
|
return t ? t.closest('button, input, select, textarea, a, [role="button"], [tabindex]:not([tabindex="-1"])') === null : !0;
|
|
98
|
-
},
|
|
98
|
+
}, O = (e) => !!r && e instanceof Node && r.contains(e), Se = () => {
|
|
99
99
|
if (!r) return null;
|
|
100
100
|
const e = r.getBoundingClientRect();
|
|
101
101
|
return {
|
|
@@ -104,176 +104,178 @@ function ct(i) {
|
|
|
104
104
|
width: e.width,
|
|
105
105
|
height: e.height
|
|
106
106
|
};
|
|
107
|
-
},
|
|
108
|
-
i.open && (
|
|
109
|
-
mode:
|
|
110
|
-
pointer:
|
|
111
|
-
dragStartPos:
|
|
112
|
-
dragStartRect:
|
|
113
|
-
resizeStartPos:
|
|
114
|
-
resizeStartRect:
|
|
115
|
-
resizeHandle:
|
|
116
|
-
minSize:
|
|
117
|
-
maxSize:
|
|
107
|
+
}, ne = () => {
|
|
108
|
+
i.open && (o === null || v === null || typeof window > "u" || te(qe({
|
|
109
|
+
mode: v,
|
|
110
|
+
pointer: I,
|
|
111
|
+
dragStartPos: Z,
|
|
112
|
+
dragStartRect: J,
|
|
113
|
+
resizeStartPos: K,
|
|
114
|
+
resizeStartRect: Q,
|
|
115
|
+
resizeHandle: ee,
|
|
116
|
+
minSize: E(),
|
|
117
|
+
maxSize: A(),
|
|
118
118
|
viewport: {
|
|
119
119
|
width: window.innerWidth,
|
|
120
120
|
height: window.innerHeight
|
|
121
121
|
},
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
viewportInsets: z(),
|
|
123
|
+
mobile: $(),
|
|
124
|
+
mobilePadding: F
|
|
124
125
|
})));
|
|
125
|
-
},
|
|
126
|
+
}, R = (e) => {
|
|
126
127
|
if (typeof window > "u") return;
|
|
127
128
|
const t = {
|
|
128
129
|
width: window.innerWidth,
|
|
129
130
|
height: window.innerHeight
|
|
130
131
|
};
|
|
131
132
|
if (d()) {
|
|
132
|
-
|
|
133
|
-
x: 0,
|
|
134
|
-
y: 0,
|
|
135
|
-
width: t.width,
|
|
136
|
-
height: t.height
|
|
137
|
-
});
|
|
133
|
+
S(fe(t, z()));
|
|
138
134
|
return;
|
|
139
135
|
}
|
|
140
|
-
|
|
141
|
-
rect:
|
|
142
|
-
minSize:
|
|
143
|
-
maxSize:
|
|
136
|
+
S(he({
|
|
137
|
+
rect: k(),
|
|
138
|
+
minSize: E(),
|
|
139
|
+
maxSize: A(),
|
|
144
140
|
viewport: t,
|
|
145
|
-
|
|
146
|
-
|
|
141
|
+
viewportInsets: z(),
|
|
142
|
+
mobile: $(),
|
|
143
|
+
mobilePadding: F,
|
|
147
144
|
center: e?.center ?? !1
|
|
148
145
|
}));
|
|
149
|
-
},
|
|
150
|
-
x !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(x), x = null), t &&
|
|
151
|
-
const
|
|
146
|
+
}, H = (e, t = !0) => {
|
|
147
|
+
x !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(x), x = null), t && ne();
|
|
148
|
+
const l = t ? Se() ?? y : null;
|
|
152
149
|
if (e !== void 0)
|
|
153
150
|
try {
|
|
154
151
|
typeof r?.releasePointerCapture == "function" && r.releasePointerCapture(e);
|
|
155
152
|
} catch {
|
|
156
153
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}),
|
|
154
|
+
ke(() => {
|
|
155
|
+
l && S(l), o = null, v = null, j(!1), V(!1);
|
|
156
|
+
}), W(!1, "");
|
|
160
157
|
};
|
|
161
|
-
|
|
162
|
-
i.open ||
|
|
158
|
+
We(() => {
|
|
159
|
+
i.open || R({
|
|
163
160
|
center: !i.defaultPosition
|
|
164
161
|
});
|
|
165
162
|
const e = () => {
|
|
166
|
-
|
|
163
|
+
o === null && R({
|
|
167
164
|
center: !1
|
|
168
165
|
});
|
|
169
166
|
};
|
|
170
|
-
window.addEventListener("resize", e),
|
|
171
|
-
}),
|
|
167
|
+
window.addEventListener("resize", e), U(() => window.removeEventListener("resize", e));
|
|
168
|
+
}), b(() => {
|
|
172
169
|
if (!i.open) return;
|
|
173
|
-
|
|
174
|
-
const e = !
|
|
175
|
-
|
|
170
|
+
$();
|
|
171
|
+
const e = !T && !i.defaultPosition, t = () => {
|
|
172
|
+
R({
|
|
176
173
|
center: e
|
|
177
|
-
}),
|
|
174
|
+
}), T = !0;
|
|
178
175
|
};
|
|
179
176
|
if (typeof requestAnimationFrame > "u") {
|
|
180
177
|
t();
|
|
181
178
|
return;
|
|
182
179
|
}
|
|
183
180
|
requestAnimationFrame(t);
|
|
184
|
-
}),
|
|
181
|
+
}), b(() => {
|
|
182
|
+
!i.open || !T || o !== null || (z(), R({
|
|
183
|
+
center: !1
|
|
184
|
+
}));
|
|
185
|
+
}), b(() => {
|
|
185
186
|
if (!i.open) return;
|
|
186
187
|
const e = (t) => {
|
|
187
188
|
if (t.key !== "Escape") return;
|
|
188
|
-
const
|
|
189
|
-
!
|
|
189
|
+
const l = typeof document < "u" ? document.activeElement : null;
|
|
190
|
+
!O(t.target) && !O(l) || (t.preventDefault(), typeof t.stopImmediatePropagation == "function" ? t.stopImmediatePropagation() : t.stopPropagation(), i.onOpenChange(!1));
|
|
190
191
|
};
|
|
191
|
-
document.addEventListener("keydown", e, !0),
|
|
192
|
-
}),
|
|
192
|
+
document.addEventListener("keydown", e, !0), U(() => document.removeEventListener("keydown", e, !0));
|
|
193
|
+
}), b(() => {
|
|
193
194
|
if (!i.open) {
|
|
194
|
-
|
|
195
|
+
D(!1), H(o ?? void 0, !1);
|
|
195
196
|
return;
|
|
196
197
|
}
|
|
197
|
-
|
|
198
|
-
}),
|
|
198
|
+
D(!0);
|
|
199
|
+
}), b(() => {
|
|
199
200
|
if (!i.open) return;
|
|
200
201
|
const e = (w) => {
|
|
201
|
-
|
|
202
|
+
D(O(w));
|
|
202
203
|
}, t = (w) => {
|
|
203
204
|
e(w.target);
|
|
204
|
-
},
|
|
205
|
+
}, l = (w) => {
|
|
205
206
|
e(w.target);
|
|
206
207
|
};
|
|
207
|
-
document.addEventListener("pointerdown", t), document.addEventListener("focusin",
|
|
208
|
-
document.removeEventListener("pointerdown", t), document.removeEventListener("focusin",
|
|
208
|
+
document.addEventListener("pointerdown", t), document.addEventListener("focusin", l), U(() => {
|
|
209
|
+
document.removeEventListener("pointerdown", t), document.removeEventListener("focusin", l);
|
|
209
210
|
});
|
|
210
|
-
}),
|
|
211
|
+
}), b(() => {
|
|
211
212
|
if (!i.open) return;
|
|
212
|
-
const e =
|
|
213
|
-
|
|
213
|
+
const e = k();
|
|
214
|
+
o === null ? te(e) : y = e;
|
|
214
215
|
});
|
|
215
|
-
const
|
|
216
|
-
!
|
|
216
|
+
const _e = (e) => {
|
|
217
|
+
!Y() || d() || e.pointerType === "mouse" && e.button !== 0 || e.target?.closest('button, input, select, textarea, a, [role="button"]') || (e.preventDefault(), o = e.pointerId, v = "drag", j(!0), Z = {
|
|
217
218
|
x: e.clientX,
|
|
218
219
|
y: e.clientY
|
|
219
|
-
},
|
|
220
|
-
...
|
|
221
|
-
},
|
|
220
|
+
}, J = {
|
|
221
|
+
...y
|
|
222
|
+
}, I = {
|
|
222
223
|
x: e.clientX,
|
|
223
224
|
y: e.clientY
|
|
224
|
-
},
|
|
225
|
+
}, W(!0, "grabbing"), typeof r?.setPointerCapture == "function" && r.setPointerCapture(e.pointerId));
|
|
225
226
|
}, f = (e) => (t) => {
|
|
226
|
-
!
|
|
227
|
+
!X() || d() || t.pointerType === "mouse" && t.button !== 0 || (t.preventDefault(), t.stopPropagation(), o = t.pointerId, v = "resize", V(!0), ee = e, K = {
|
|
227
228
|
x: t.clientX,
|
|
228
229
|
y: t.clientY
|
|
229
|
-
},
|
|
230
|
-
...
|
|
231
|
-
},
|
|
230
|
+
}, Q = {
|
|
231
|
+
...y
|
|
232
|
+
}, I = {
|
|
232
233
|
x: t.clientX,
|
|
233
234
|
y: t.clientY
|
|
234
|
-
},
|
|
235
|
-
},
|
|
236
|
-
x = null,
|
|
237
|
-
},
|
|
238
|
-
if (!(
|
|
235
|
+
}, W(!0, Pe[e]), typeof r?.setPointerCapture == "function" && r.setPointerCapture(t.pointerId));
|
|
236
|
+
}, ie = () => {
|
|
237
|
+
x = null, ne();
|
|
238
|
+
}, Re = (e) => {
|
|
239
|
+
if (!(o === null || e.pointerId !== o) && v !== null && (I = {
|
|
239
240
|
x: e.clientX,
|
|
240
241
|
y: e.clientY
|
|
241
242
|
}, x === null)) {
|
|
242
243
|
if (typeof requestAnimationFrame > "u") {
|
|
243
|
-
|
|
244
|
+
ie();
|
|
244
245
|
return;
|
|
245
246
|
}
|
|
246
|
-
x = requestAnimationFrame(
|
|
247
|
+
x = requestAnimationFrame(ie);
|
|
247
248
|
}
|
|
248
|
-
},
|
|
249
|
-
|
|
249
|
+
}, re = (e) => {
|
|
250
|
+
o === null || e.pointerId !== o || (I = {
|
|
250
251
|
x: e.clientX,
|
|
251
252
|
y: e.clientY
|
|
252
|
-
},
|
|
253
|
-
},
|
|
254
|
-
if (
|
|
255
|
-
const t =
|
|
256
|
-
t &&
|
|
253
|
+
}, H(e.pointerId));
|
|
254
|
+
}, oe = () => {
|
|
255
|
+
if (o !== null && H(o, !0), d()) {
|
|
256
|
+
const t = ye();
|
|
257
|
+
t && S(he({
|
|
257
258
|
rect: {
|
|
258
259
|
x: t.position.x,
|
|
259
260
|
y: t.position.y,
|
|
260
261
|
width: t.size.width,
|
|
261
262
|
height: t.size.height
|
|
262
263
|
},
|
|
263
|
-
minSize:
|
|
264
|
-
maxSize:
|
|
264
|
+
minSize: E(),
|
|
265
|
+
maxSize: A(),
|
|
265
266
|
viewport: {
|
|
266
267
|
width: window.innerWidth,
|
|
267
268
|
height: window.innerHeight
|
|
268
269
|
},
|
|
269
|
-
|
|
270
|
-
|
|
270
|
+
viewportInsets: z(),
|
|
271
|
+
mobile: $(),
|
|
272
|
+
mobilePadding: F,
|
|
271
273
|
center: !1
|
|
272
|
-
})),
|
|
274
|
+
})), N(!1);
|
|
273
275
|
return;
|
|
274
276
|
}
|
|
275
|
-
const e =
|
|
276
|
-
|
|
277
|
+
const e = k();
|
|
278
|
+
be({
|
|
277
279
|
position: {
|
|
278
280
|
x: e.x,
|
|
279
281
|
y: e.y
|
|
@@ -282,17 +284,15 @@ function ct(i) {
|
|
|
282
284
|
width: e.width,
|
|
283
285
|
height: e.height
|
|
284
286
|
}
|
|
285
|
-
}),
|
|
286
|
-
x: 0,
|
|
287
|
-
y: 0,
|
|
287
|
+
}), S(fe({
|
|
288
288
|
width: window.innerWidth,
|
|
289
289
|
height: window.innerHeight
|
|
290
|
-
}),
|
|
291
|
-
},
|
|
292
|
-
|
|
293
|
-
},
|
|
294
|
-
|
|
295
|
-
}, h = (e) =>
|
|
290
|
+
}, z())), N(!0);
|
|
291
|
+
}, Ce = () => {
|
|
292
|
+
oe();
|
|
293
|
+
}, Ee = (e) => {
|
|
294
|
+
Ie(e.target) && $e();
|
|
295
|
+
}, h = (e) => C("absolute z-10", {
|
|
296
296
|
n: "cursor-ns-resize top-0 left-2 right-2 h-1",
|
|
297
297
|
s: "cursor-ns-resize bottom-0 left-2 right-2 h-1",
|
|
298
298
|
e: "cursor-ew-resize right-0 top-2 bottom-2 w-1",
|
|
@@ -302,87 +302,87 @@ function ct(i) {
|
|
|
302
302
|
se: "cursor-nwse-resize bottom-0 right-0 w-2 h-2",
|
|
303
303
|
sw: "cursor-nesw-resize bottom-0 left-0 w-2 h-2"
|
|
304
304
|
}[e]);
|
|
305
|
-
return
|
|
305
|
+
return s(P, {
|
|
306
306
|
get when() {
|
|
307
307
|
return i.open;
|
|
308
308
|
},
|
|
309
309
|
get children() {
|
|
310
|
-
return
|
|
310
|
+
return s(Fe, {
|
|
311
311
|
get children() {
|
|
312
|
-
var e =
|
|
313
|
-
return typeof
|
|
314
|
-
[
|
|
312
|
+
var e = nt(), t = e.firstChild, l = t.firstChild, w = l.firstChild, le = w.nextSibling, Ae = l.nextSibling, se = r;
|
|
313
|
+
return typeof se == "function" ? Me(se, e) : r = e, ae(e, de({
|
|
314
|
+
[we]: "true"
|
|
315
315
|
}, {
|
|
316
316
|
get class() {
|
|
317
|
-
return
|
|
317
|
+
return C("fixed left-0 top-0 z-[100] flex flex-col", (B() || G()) && "select-none");
|
|
318
318
|
},
|
|
319
319
|
get style() {
|
|
320
320
|
return {
|
|
321
|
-
width: `${
|
|
322
|
-
height: `${
|
|
323
|
-
transform: `translate3d(${
|
|
324
|
-
"z-index":
|
|
325
|
-
"will-change":
|
|
321
|
+
width: `${M().width}px`,
|
|
322
|
+
height: `${M().height}px`,
|
|
323
|
+
transform: `translate3d(${L().x}px, ${L().y}px, 0)`,
|
|
324
|
+
"z-index": ge(),
|
|
325
|
+
"will-change": B() ? "transform" : G() ? "transform, width, height" : void 0
|
|
326
326
|
};
|
|
327
327
|
},
|
|
328
|
-
onPointerMove:
|
|
329
|
-
onPointerUp:
|
|
330
|
-
onPointerCancel:
|
|
328
|
+
onPointerMove: Re,
|
|
329
|
+
onPointerUp: re,
|
|
330
|
+
onPointerCancel: re,
|
|
331
331
|
role: "dialog",
|
|
332
332
|
get "aria-labelledby"() {
|
|
333
|
-
return
|
|
333
|
+
return ue(() => !!i.title)() ? q() : void 0;
|
|
334
334
|
},
|
|
335
335
|
tabIndex: -1,
|
|
336
|
-
onPointerDown:
|
|
337
|
-
}), !1, !0), ae(t,
|
|
338
|
-
[
|
|
336
|
+
onPointerDown: Ee
|
|
337
|
+
}), !1, !0), ae(t, de({
|
|
338
|
+
[Ne]: "true"
|
|
339
339
|
}, {
|
|
340
340
|
"data-floe-floating-window-surface": "true",
|
|
341
341
|
get "data-floe-floating-window-state"() {
|
|
342
|
-
return
|
|
342
|
+
return xe() ? "active" : "inactive";
|
|
343
343
|
}
|
|
344
344
|
}, {
|
|
345
|
-
[
|
|
345
|
+
[we]: "true"
|
|
346
346
|
}, {
|
|
347
347
|
get class() {
|
|
348
|
-
return
|
|
348
|
+
return C("relative flex h-full w-full flex-col overflow-hidden", "text-card-foreground rounded-md", "border", "animate-in fade-in duration-150", d() && "rounded-none", i.class);
|
|
349
349
|
}
|
|
350
|
-
}), !1, !0),
|
|
350
|
+
}), !1, !0), l.$$dblclick = Ce, l.$$pointerdown = _e, g(w, s(P, {
|
|
351
351
|
get when() {
|
|
352
352
|
return i.title;
|
|
353
353
|
},
|
|
354
354
|
get children() {
|
|
355
|
-
var n =
|
|
356
|
-
return g(n, () => i.title), u(() =>
|
|
355
|
+
var n = Be();
|
|
356
|
+
return g(n, () => i.title), u(() => Le(n, "id", q())), n;
|
|
357
357
|
}
|
|
358
|
-
})), g(
|
|
358
|
+
})), g(le, s(ce, {
|
|
359
359
|
variant: "ghost",
|
|
360
360
|
size: "icon",
|
|
361
361
|
class: "h-6 w-6",
|
|
362
362
|
onClick: (n) => {
|
|
363
|
-
n.stopPropagation(),
|
|
363
|
+
n.stopPropagation(), oe();
|
|
364
364
|
},
|
|
365
365
|
get "aria-label"() {
|
|
366
366
|
return d() ? "Restore" : "Maximize";
|
|
367
367
|
},
|
|
368
368
|
get children() {
|
|
369
|
-
return
|
|
369
|
+
return s(P, {
|
|
370
370
|
get when() {
|
|
371
371
|
return d();
|
|
372
372
|
},
|
|
373
373
|
get fallback() {
|
|
374
|
-
return
|
|
374
|
+
return s(Ue, {
|
|
375
375
|
class: "w-3 h-3"
|
|
376
376
|
});
|
|
377
377
|
},
|
|
378
378
|
get children() {
|
|
379
|
-
return
|
|
379
|
+
return s(He, {
|
|
380
380
|
class: "w-3 h-3"
|
|
381
381
|
});
|
|
382
382
|
}
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
|
-
}), null), g(
|
|
385
|
+
}), null), g(le, s(ce, {
|
|
386
386
|
variant: "ghost-destructive",
|
|
387
387
|
size: "icon",
|
|
388
388
|
class: "h-6 w-6",
|
|
@@ -391,63 +391,63 @@ function ct(i) {
|
|
|
391
391
|
},
|
|
392
392
|
"aria-label": "Close",
|
|
393
393
|
get children() {
|
|
394
|
-
return
|
|
394
|
+
return s(Xe, {
|
|
395
395
|
class: "w-3.5 h-3.5"
|
|
396
396
|
});
|
|
397
397
|
}
|
|
398
|
-
}), null), g(
|
|
398
|
+
}), null), g(Ae, () => i.children), g(t, s(P, {
|
|
399
399
|
get when() {
|
|
400
400
|
return i.footer;
|
|
401
401
|
},
|
|
402
402
|
get children() {
|
|
403
|
-
var n =
|
|
403
|
+
var n = je();
|
|
404
404
|
return g(n, () => i.footer), n;
|
|
405
405
|
}
|
|
406
|
-
}), null), g(t,
|
|
406
|
+
}), null), g(t, s(P, {
|
|
407
407
|
get when() {
|
|
408
|
-
return
|
|
408
|
+
return ue(() => !!X())() && !d();
|
|
409
409
|
},
|
|
410
410
|
get children() {
|
|
411
411
|
return [(() => {
|
|
412
|
-
var n =
|
|
412
|
+
var n = Ge();
|
|
413
413
|
return m(n, "pointerdown", f("n"), !0), u(() => c(n, h("n"))), n;
|
|
414
414
|
})(), (() => {
|
|
415
|
-
var n =
|
|
415
|
+
var n = Ve();
|
|
416
416
|
return m(n, "pointerdown", f("s"), !0), u(() => c(n, h("s"))), n;
|
|
417
|
-
})(),
|
|
417
|
+
})(), s(P, {
|
|
418
418
|
get when() {
|
|
419
|
-
return
|
|
419
|
+
return !$();
|
|
420
420
|
},
|
|
421
421
|
get children() {
|
|
422
422
|
return [(() => {
|
|
423
|
-
var n =
|
|
423
|
+
var n = Ze();
|
|
424
424
|
return m(n, "pointerdown", f("e"), !0), u(() => c(n, h("e"))), n;
|
|
425
425
|
})(), (() => {
|
|
426
|
-
var n =
|
|
426
|
+
var n = Je();
|
|
427
427
|
return m(n, "pointerdown", f("w"), !0), u(() => c(n, h("w"))), n;
|
|
428
428
|
})(), (() => {
|
|
429
|
-
var n =
|
|
429
|
+
var n = Ke();
|
|
430
430
|
return m(n, "pointerdown", f("ne"), !0), u(() => c(n, h("ne"))), n;
|
|
431
431
|
})(), (() => {
|
|
432
|
-
var n =
|
|
432
|
+
var n = Qe();
|
|
433
433
|
return m(n, "pointerdown", f("nw"), !0), u(() => c(n, h("nw"))), n;
|
|
434
434
|
})(), (() => {
|
|
435
|
-
var n =
|
|
435
|
+
var n = et();
|
|
436
436
|
return m(n, "pointerdown", f("se"), !0), u(() => c(n, h("se"))), n;
|
|
437
437
|
})(), (() => {
|
|
438
|
-
var n =
|
|
438
|
+
var n = tt();
|
|
439
439
|
return m(n, "pointerdown", f("sw"), !0), u(() => c(n, h("sw"))), n;
|
|
440
440
|
})()];
|
|
441
441
|
}
|
|
442
442
|
})];
|
|
443
443
|
}
|
|
444
|
-
}), null), u(() => c(
|
|
444
|
+
}), null), u(() => c(l, C("flex items-center justify-between h-9 px-3", "border-b", d() ? "rounded-none" : "rounded-t-md", Y() && !d() && "cursor-move"))), e;
|
|
445
445
|
}
|
|
446
446
|
});
|
|
447
447
|
}
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
|
-
|
|
450
|
+
De(["pointerdown", "dblclick"]);
|
|
451
451
|
export {
|
|
452
|
-
|
|
452
|
+
ht as FloatingWindow
|
|
453
453
|
};
|