@floegence/floe-webapp-core 0.86.1 → 0.86.4
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createComponent as l, Portal as Ke, spread as
|
|
1
|
+
import { createComponent as l, Portal as Ke, spread as Ie, mergeProps as Re, memo as W, insert as c, effect as f, setAttribute as et, addEventListener as p, className as w, template as a, use as Ce, delegateEvents as tt } from "solid-js/web";
|
|
2
2
|
import { createSignal as g, createUniqueId as nt, onCleanup as F, onMount as it, createEffect as z, untrack as q, Show as m, batch as ne } from "solid-js";
|
|
3
|
-
import { cn as
|
|
3
|
+
import { cn as X } from "../../utils/cn.js";
|
|
4
4
|
import { useOptionalLayout as ot } from "../../context/LayoutContext.js";
|
|
5
5
|
import { useResolvedFloeConfig as rt } from "../../context/FloeConfigContext.js";
|
|
6
6
|
import { useMediaQuery as lt } from "../../hooks/useMediaQuery.js";
|
|
7
|
-
import { Button as
|
|
7
|
+
import { Button as Ae } from "./Button.js";
|
|
8
8
|
import { Restore as at, Maximize as st, X as dt } from "../icons/index.js";
|
|
9
9
|
import { startHotInteraction as ct } from "../../utils/hotInteraction.js";
|
|
10
10
|
import { startPointerSession as ut } from "./pointerSession.js";
|
|
@@ -13,34 +13,34 @@ import { observeViewport as wt } from "../../viewport.js";
|
|
|
13
13
|
import { createFloatingPresence as gt } from "./floatingPresence.js";
|
|
14
14
|
import { LOCAL_INTERACTION_SURFACE_ATTR as Ee } from "./localInteractionSurface.js";
|
|
15
15
|
import { resolveFloatingBoundary as mt } from "./surfaceFloatingBoundary.js";
|
|
16
|
-
import { SURFACE_PORTAL_LAYER_ATTR as vt, resolveSurfacePortalHost as xt
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
const oe = () => n.resizable ?? !0,
|
|
16
|
+
import { SURFACE_PORTAL_LAYER_ATTR as vt, resolveSurfacePortalHost as xt } from "./dialogSurfaceScope.js";
|
|
17
|
+
var yt = /* @__PURE__ */ a("<span hidden>"), bt = /* @__PURE__ */ a('<span data-floe-floating-window-title-icon=true aria-hidden=true class="flex size-4 shrink-0 items-center justify-center">'), pt = /* @__PURE__ */ a('<h2 class="flex min-w-0 items-center gap-2 text-xs leading-none font-medium select-none"><span class="min-w-0 truncate">'), zt = /* @__PURE__ */ a('<div data-floe-floating-window-header-actions=true class="flex shrink-0 cursor-default items-center gap-1"><span aria-hidden=true class="mx-2 h-4 w-px shrink-0 bg-border">'), $t = /* @__PURE__ */ a('<div data-floe-floating-window-footer=true class="flex items-center justify-end gap-2 p-3 border-t border-border">'), _t = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=n style=touch-action:none>"), St = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=s style=touch-action:none>"), Pt = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=e style=touch-action:none>"), It = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=w style=touch-action:none>"), Rt = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=ne style=touch-action:none>"), Ct = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=nw style=touch-action:none>"), At = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=se style=touch-action:none>"), Et = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=sw style=touch-action:none>"), Ft = /* @__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 px-2"></div><div class="flex h-full shrink-0 items-stretch"></div></div><div data-floe-floating-window-content=true class="min-h-0 flex-1 overflow-auto overscroll-contain p-3">');
|
|
18
|
+
function Gt(n) {
|
|
19
|
+
const oe = () => n.resizable ?? !0, Y = () => n.maximizable ?? !0, re = () => n.draggable ?? !0, le = () => n.minSize ?? {
|
|
20
20
|
width: 200,
|
|
21
21
|
height: 150
|
|
22
22
|
}, ae = () => n.maxSize ?? {
|
|
23
23
|
width: 1 / 0,
|
|
24
24
|
height: 1 / 0
|
|
25
25
|
};
|
|
26
|
-
let
|
|
27
|
-
const [k, Fe] = g(), [
|
|
26
|
+
let H;
|
|
27
|
+
const [k, Fe] = g(), [C, ke] = g({
|
|
28
28
|
x: 0,
|
|
29
29
|
y: 0,
|
|
30
30
|
width: 0,
|
|
31
31
|
height: 0
|
|
32
32
|
}, {
|
|
33
33
|
equals: (e, t) => e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height
|
|
34
|
-
}), [
|
|
35
|
-
x: (e.x + (k()?.fixedOffset.left ?? 0)) /
|
|
36
|
-
y: (e.y + (k()?.fixedOffset.top ?? 0)) /
|
|
37
|
-
}),
|
|
34
|
+
}), [N, Me] = g(!0), h = () => !!(n.compactBelow && C().width < n.compactBelow), S = () => n.viewportInsets, P = () => k()?.fixedScale ?? 1, V = (e) => ({
|
|
35
|
+
x: (e.x + (k()?.fixedOffset.left ?? 0)) / P(),
|
|
36
|
+
y: (e.y + (k()?.fixedOffset.top ?? 0)) / P()
|
|
37
|
+
}), Le = () => n.zIndex ?? 100, Oe = nt(), Be = ot(), De = rt(), M = Be?.isMobile ?? lt(() => De.config.layout.mobileQuery), se = 16, de = () => `floating-window-${Oe}-title`, [j, Te] = g(n.defaultPosition ?? {
|
|
38
38
|
x: 0,
|
|
39
39
|
y: 0
|
|
40
|
-
}), [
|
|
40
|
+
}), [U, We] = g(n.defaultSize ?? {
|
|
41
41
|
width: 400,
|
|
42
42
|
height: 300
|
|
43
|
-
}), [d, ce] = g(!1), [
|
|
43
|
+
}), [d, ce] = g(!1), [L, ue] = g(!1), [O, fe] = g(!1), [qe, G] = g(!1), I = gt({
|
|
44
44
|
open: () => n.open
|
|
45
45
|
});
|
|
46
46
|
let he = {
|
|
@@ -59,10 +59,10 @@ function Qt(n) {
|
|
|
59
59
|
y: 0,
|
|
60
60
|
width: 0,
|
|
61
61
|
height: 0
|
|
62
|
-
}, ve = "se", s, u = null,
|
|
62
|
+
}, ve = "se", s, u = null, B, v = null, A = {
|
|
63
63
|
x: 0,
|
|
64
64
|
y: 0
|
|
65
|
-
}, R = null,
|
|
65
|
+
}, R = null, D = null, Q = !1, $ = {
|
|
66
66
|
x: n.defaultPosition?.x ?? 0,
|
|
67
67
|
y: n.defaultPosition?.y ?? 0,
|
|
68
68
|
width: n.defaultSize?.width ?? 400,
|
|
@@ -74,12 +74,12 @@ function Qt(n) {
|
|
|
74
74
|
x = {
|
|
75
75
|
...e
|
|
76
76
|
};
|
|
77
|
-
const t = ie(
|
|
77
|
+
const t = ie(C(), S());
|
|
78
78
|
_ = {
|
|
79
79
|
x: t.width > e.width ? (e.x - t.x) / (t.width - e.width) : _?.x ?? 0.5,
|
|
80
80
|
y: t.height > e.height ? (e.y - t.y) / (t.height - e.height) : _?.y ?? 0.5
|
|
81
81
|
};
|
|
82
|
-
},
|
|
82
|
+
}, Xe = {
|
|
83
83
|
n: "ns-resize",
|
|
84
84
|
s: "ns-resize",
|
|
85
85
|
e: "ew-resize",
|
|
@@ -90,20 +90,20 @@ function Qt(n) {
|
|
|
90
90
|
sw: "nesw-resize"
|
|
91
91
|
}, Z = (e, t) => {
|
|
92
92
|
if (!e) {
|
|
93
|
-
|
|
93
|
+
D?.(), D = null;
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
|
-
|
|
96
|
+
D?.(), D = ct({
|
|
97
97
|
kind: v === "resize" ? "resize" : "drag",
|
|
98
98
|
cursor: t,
|
|
99
99
|
lockUserSelect: !0
|
|
100
100
|
});
|
|
101
101
|
}, ye = (e) => {
|
|
102
102
|
if ($ = e, !s) return;
|
|
103
|
-
const t =
|
|
104
|
-
s.style.transform = `translate3d(${t.x}px, ${t.y}px, 0)`, s.style.width = `${e.width /
|
|
105
|
-
},
|
|
106
|
-
const e =
|
|
103
|
+
const t = V(e);
|
|
104
|
+
s.style.transform = `translate3d(${t.x}px, ${t.y}px, 0)`, s.style.width = `${e.width / P()}px`, s.style.height = `${e.height / P()}px`;
|
|
105
|
+
}, Ye = () => {
|
|
106
|
+
const e = j(), t = U();
|
|
107
107
|
return {
|
|
108
108
|
x: e.x,
|
|
109
109
|
y: e.y,
|
|
@@ -111,27 +111,27 @@ function Qt(n) {
|
|
|
111
111
|
height: t.height
|
|
112
112
|
};
|
|
113
113
|
}, J = (e) => {
|
|
114
|
-
$ = e,
|
|
114
|
+
$ = e, Te((t) => t.x === e.x && t.y === e.y ? t : {
|
|
115
115
|
x: e.x,
|
|
116
116
|
y: e.y
|
|
117
117
|
}), We((t) => t.width === e.width && t.height === e.height ? t : {
|
|
118
118
|
width: e.width,
|
|
119
119
|
height: e.height
|
|
120
120
|
});
|
|
121
|
-
},
|
|
121
|
+
}, He = () => {
|
|
122
122
|
try {
|
|
123
123
|
s?.focus({
|
|
124
124
|
preventScroll: !0
|
|
125
125
|
});
|
|
126
126
|
} catch {
|
|
127
127
|
}
|
|
128
|
-
},
|
|
128
|
+
}, Ne = (e) => {
|
|
129
129
|
const t = e instanceof Element ? e : null;
|
|
130
130
|
return t ? t.closest('button, input, select, textarea, a, [role="button"], [tabindex]:not([tabindex="-1"])') === null : !0;
|
|
131
|
-
}, K = (e) => !!s && e instanceof Node && s.contains(e),
|
|
132
|
-
const o = (e instanceof Element ? e : null)?.closest('[role="menu"]')?.closest(
|
|
131
|
+
}, K = (e) => !!s && e instanceof Node && s.contains(e), Ve = (e) => {
|
|
132
|
+
const o = (e instanceof Element ? e : null)?.closest('[role="menu"], [role="dialog"]')?.closest('[data-floe-surface-floating-layer="true"]');
|
|
133
133
|
return !!(o && s?.contains(o));
|
|
134
|
-
},
|
|
134
|
+
}, je = () => {
|
|
135
135
|
if (!s) return null;
|
|
136
136
|
const e = s.getBoundingClientRect();
|
|
137
137
|
return {
|
|
@@ -143,7 +143,7 @@ function Qt(n) {
|
|
|
143
143
|
}, be = () => {
|
|
144
144
|
n.open && (u === null || v === null || typeof window > "u" || ye(ht({
|
|
145
145
|
mode: v,
|
|
146
|
-
pointer:
|
|
146
|
+
pointer: A,
|
|
147
147
|
dragStartPos: he,
|
|
148
148
|
dragStartRect: we,
|
|
149
149
|
resizeStartPos: ge,
|
|
@@ -151,14 +151,14 @@ function Qt(n) {
|
|
|
151
151
|
resizeHandle: ve,
|
|
152
152
|
minSize: le(),
|
|
153
153
|
maxSize: ae(),
|
|
154
|
-
viewport:
|
|
154
|
+
viewport: C(),
|
|
155
155
|
viewportInsets: S(),
|
|
156
|
-
mobile:
|
|
156
|
+
mobile: M(),
|
|
157
157
|
mobilePadding: se
|
|
158
158
|
})));
|
|
159
159
|
}, E = (e) => {
|
|
160
160
|
if (typeof window > "u") return;
|
|
161
|
-
const t =
|
|
161
|
+
const t = C();
|
|
162
162
|
if (d() || h()) {
|
|
163
163
|
J(ie(t, S()));
|
|
164
164
|
return;
|
|
@@ -169,7 +169,7 @@ function Qt(n) {
|
|
|
169
169
|
maxSize: ae(),
|
|
170
170
|
viewport: t,
|
|
171
171
|
viewportInsets: S(),
|
|
172
|
-
mobile: n.boundary === void 0 &&
|
|
172
|
+
mobile: n.boundary === void 0 && M(),
|
|
173
173
|
mobilePadding: se,
|
|
174
174
|
center: e?.center ?? !1
|
|
175
175
|
});
|
|
@@ -190,7 +190,7 @@ function Qt(n) {
|
|
|
190
190
|
}
|
|
191
191
|
}, pe = (e) => {
|
|
192
192
|
R !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(R), R = null), e && be();
|
|
193
|
-
const t = e ?
|
|
193
|
+
const t = e ? je() ?? $ : null;
|
|
194
194
|
ne(() => {
|
|
195
195
|
if (t) {
|
|
196
196
|
J(t);
|
|
@@ -201,9 +201,9 @@ function Qt(n) {
|
|
|
201
201
|
xe(t), v === "drag" && Object.assign(x, r);
|
|
202
202
|
}
|
|
203
203
|
u = null, v = null, ue(!1), fe(!1);
|
|
204
|
-
}), Z(!1, ""),
|
|
204
|
+
}), Z(!1, ""), B = void 0;
|
|
205
205
|
}, ee = (e = !1) => {
|
|
206
|
-
|
|
206
|
+
B ? B.stop({
|
|
207
207
|
commit: e
|
|
208
208
|
}) : pe(e);
|
|
209
209
|
};
|
|
@@ -213,10 +213,10 @@ function Qt(n) {
|
|
|
213
213
|
boundaryHost: null,
|
|
214
214
|
mode: "global"
|
|
215
215
|
} : xt({
|
|
216
|
-
owner:
|
|
216
|
+
owner: H
|
|
217
217
|
}), o = mt(r, n.boundary, t?.safeArea);
|
|
218
218
|
ne(() => {
|
|
219
|
-
|
|
219
|
+
Me(!!(o && o.width > 16 && o.height > 16)), ke(o ? {
|
|
220
220
|
x: o.left,
|
|
221
221
|
y: o.top,
|
|
222
222
|
width: o.width,
|
|
@@ -245,7 +245,7 @@ function Qt(n) {
|
|
|
245
245
|
});
|
|
246
246
|
}), z(() => {
|
|
247
247
|
if (!n.open) return;
|
|
248
|
-
|
|
248
|
+
M();
|
|
249
249
|
const e = !Q && !n.defaultPosition, t = () => {
|
|
250
250
|
E({
|
|
251
251
|
center: e
|
|
@@ -257,11 +257,11 @@ function Qt(n) {
|
|
|
257
257
|
}
|
|
258
258
|
requestAnimationFrame(t);
|
|
259
259
|
}), z(() => {
|
|
260
|
-
S(),
|
|
260
|
+
S(), C(), h(), !(!n.open || !Q || u !== null) && q(() => E({
|
|
261
261
|
center: !1
|
|
262
262
|
}));
|
|
263
263
|
}), z(() => {
|
|
264
|
-
|
|
264
|
+
Y() || !d() || q(() => {
|
|
265
265
|
ce(!1), E({
|
|
266
266
|
center: !1
|
|
267
267
|
});
|
|
@@ -271,7 +271,7 @@ function Qt(n) {
|
|
|
271
271
|
const e = (t) => {
|
|
272
272
|
if (t.key !== "Escape") return;
|
|
273
273
|
const r = typeof document < "u" ? document.activeElement : null;
|
|
274
|
-
!K(t.target) && !K(r) ||
|
|
274
|
+
!K(t.target) && !K(r) || Ve(t.target) || (t.preventDefault(), typeof t.stopImmediatePropagation == "function" ? t.stopImmediatePropagation() : t.stopPropagation(), n.onOpenChange(!1));
|
|
275
275
|
};
|
|
276
276
|
document.addEventListener("keydown", e, !0), F(() => document.removeEventListener("keydown", e, !0));
|
|
277
277
|
}), z(() => {
|
|
@@ -294,16 +294,16 @@ function Qt(n) {
|
|
|
294
294
|
});
|
|
295
295
|
}), z(() => {
|
|
296
296
|
if (!n.open) return;
|
|
297
|
-
const e =
|
|
297
|
+
const e = Ye();
|
|
298
298
|
u === null ? ye(e) : $ = e;
|
|
299
299
|
});
|
|
300
|
-
const
|
|
300
|
+
const Ue = (e) => {
|
|
301
301
|
!re() || d() || h() || u !== null || e.pointerType === "mouse" && e.button !== 0 || e.target?.closest('button, input, select, textarea, a, [role="button"], [data-floe-floating-window-header-actions]') || (e.preventDefault(), u = e.pointerId, v = "drag", ue(!0), he = {
|
|
302
302
|
x: e.clientX,
|
|
303
303
|
y: e.clientY
|
|
304
304
|
}, we = {
|
|
305
305
|
...$
|
|
306
|
-
},
|
|
306
|
+
}, A = {
|
|
307
307
|
x: e.clientX,
|
|
308
308
|
y: e.clientY
|
|
309
309
|
}, Z(!0, "grabbing"), $e(e));
|
|
@@ -313,14 +313,14 @@ function Qt(n) {
|
|
|
313
313
|
y: t.clientY
|
|
314
314
|
}, me = {
|
|
315
315
|
...$
|
|
316
|
-
},
|
|
316
|
+
}, A = {
|
|
317
317
|
x: t.clientX,
|
|
318
318
|
y: t.clientY
|
|
319
|
-
}, Z(!0,
|
|
319
|
+
}, Z(!0, Xe[e]), $e(t));
|
|
320
320
|
}, ze = () => {
|
|
321
321
|
R = null, be();
|
|
322
322
|
}, Ge = (e) => {
|
|
323
|
-
if (!(u === null || e.pointerId !== u) && v !== null && (
|
|
323
|
+
if (!(u === null || e.pointerId !== u) && v !== null && (A = {
|
|
324
324
|
x: e.clientX,
|
|
325
325
|
y: e.clientY
|
|
326
326
|
}, R === null)) {
|
|
@@ -331,7 +331,7 @@ function Qt(n) {
|
|
|
331
331
|
R = requestAnimationFrame(ze);
|
|
332
332
|
}
|
|
333
333
|
}, $e = (e) => {
|
|
334
|
-
|
|
334
|
+
B = ut({
|
|
335
335
|
pointerEvent: e,
|
|
336
336
|
captureEl: s,
|
|
337
337
|
onMove: Ge,
|
|
@@ -340,19 +340,19 @@ function Qt(n) {
|
|
|
340
340
|
reason: r,
|
|
341
341
|
snapshot: o
|
|
342
342
|
}) => {
|
|
343
|
-
|
|
343
|
+
A = {
|
|
344
344
|
x: o.latestClientX,
|
|
345
345
|
y: o.latestClientY
|
|
346
346
|
}, pe(t || r === "pointer_cancel");
|
|
347
347
|
}
|
|
348
348
|
});
|
|
349
349
|
}, _e = () => {
|
|
350
|
-
!
|
|
350
|
+
!Y() || h() || (u !== null && ee(!0), ce(!d()), E());
|
|
351
351
|
}, Qe = (e) => {
|
|
352
352
|
e.target?.closest("button, [data-floe-floating-window-header-actions]") || _e();
|
|
353
353
|
}, Ze = (e) => {
|
|
354
|
-
|
|
355
|
-
}, b = (e) =>
|
|
354
|
+
Ne(e.target) && He();
|
|
355
|
+
}, b = (e) => X("absolute z-10", {
|
|
356
356
|
n: "cursor-ns-resize top-0 left-2 right-2 h-1",
|
|
357
357
|
s: "cursor-ns-resize bottom-0 left-2 right-2 h-1",
|
|
358
358
|
e: "cursor-ew-resize right-0 top-2 bottom-2 w-1",
|
|
@@ -363,25 +363,25 @@ function Qt(n) {
|
|
|
363
363
|
sw: "cursor-nesw-resize bottom-0 left-0 w-2 h-2"
|
|
364
364
|
}[e]);
|
|
365
365
|
return [(() => {
|
|
366
|
-
var e =
|
|
367
|
-
return typeof t == "function" ?
|
|
366
|
+
var e = yt(), t = H;
|
|
367
|
+
return typeof t == "function" ? Ce(t, e) : H = e, e;
|
|
368
368
|
})(), l(m, {
|
|
369
369
|
get when() {
|
|
370
|
-
return
|
|
370
|
+
return I.mounted();
|
|
371
371
|
},
|
|
372
372
|
get children() {
|
|
373
373
|
return l(Ke, {
|
|
374
374
|
get children() {
|
|
375
|
-
var e =
|
|
376
|
-
return typeof Se == "function" ?
|
|
375
|
+
var e = Ft(), t = e.firstChild, r = t.firstChild, o = r.firstChild, te = o.nextSibling, Je = r.nextSibling, Se = s;
|
|
376
|
+
return typeof Se == "function" ? Ce(Se, e) : s = e, Ie(e, Re({
|
|
377
377
|
get "data-floating-presence"() {
|
|
378
|
-
return
|
|
378
|
+
return I.state();
|
|
379
379
|
},
|
|
380
380
|
get "aria-hidden"() {
|
|
381
|
-
return
|
|
381
|
+
return I.exiting() || !N() ? "true" : void 0;
|
|
382
382
|
},
|
|
383
383
|
get inert() {
|
|
384
|
-
return
|
|
384
|
+
return I.exiting() || !N();
|
|
385
385
|
},
|
|
386
386
|
get "data-floe-floating-window-compact"() {
|
|
387
387
|
return h() ? "true" : void 0;
|
|
@@ -390,16 +390,16 @@ function Qt(n) {
|
|
|
390
390
|
[Ee]: "true"
|
|
391
391
|
}, {
|
|
392
392
|
get class() {
|
|
393
|
-
return
|
|
393
|
+
return X("fixed left-0 top-0 z-[100] flex flex-col", (L() || O()) && "select-none", I.exiting() && "pointer-events-none");
|
|
394
394
|
},
|
|
395
395
|
get style() {
|
|
396
396
|
return {
|
|
397
|
-
visibility:
|
|
398
|
-
width: `${
|
|
399
|
-
height: `${
|
|
400
|
-
transform: `translate3d(${
|
|
401
|
-
"z-index":
|
|
402
|
-
"will-change":
|
|
397
|
+
visibility: N() ? void 0 : "hidden",
|
|
398
|
+
width: `${U().width / P()}px`,
|
|
399
|
+
height: `${U().height / P()}px`,
|
|
400
|
+
transform: `translate3d(${V(j()).x}px, ${V(j()).y}px, 0)`,
|
|
401
|
+
"z-index": Le(),
|
|
402
|
+
"will-change": L() ? "transform" : O() ? "transform, width, height" : void 0
|
|
403
403
|
};
|
|
404
404
|
},
|
|
405
405
|
role: "dialog",
|
|
@@ -408,13 +408,13 @@ function Qt(n) {
|
|
|
408
408
|
},
|
|
409
409
|
tabIndex: -1,
|
|
410
410
|
onPointerDown: Ze
|
|
411
|
-
}), !1, !0),
|
|
411
|
+
}), !1, !0), Ie(t, Re({
|
|
412
412
|
[vt]: "true"
|
|
413
413
|
}, {
|
|
414
414
|
"data-floe-floating-window-surface": "true",
|
|
415
415
|
"data-floe-surface": "floating",
|
|
416
416
|
get "data-floe-surface-interacting"() {
|
|
417
|
-
return
|
|
417
|
+
return L() || O() ? "true" : void 0;
|
|
418
418
|
},
|
|
419
419
|
get "data-floe-floating-window-state"() {
|
|
420
420
|
return qe() ? "active" : "inactive";
|
|
@@ -423,7 +423,7 @@ function Qt(n) {
|
|
|
423
423
|
[Ee]: "true"
|
|
424
424
|
}, {
|
|
425
425
|
get class() {
|
|
426
|
-
return
|
|
426
|
+
return X("relative flex h-full w-full flex-col overflow-hidden", "text-card-foreground rounded-md", "border", "floe-floating-presence floe-floating-window-motion", (L() || O()) && "floe-floating-presence--suspended", d() && "rounded-none", n.class);
|
|
427
427
|
},
|
|
428
428
|
get style() {
|
|
429
429
|
return {
|
|
@@ -431,38 +431,38 @@ function Qt(n) {
|
|
|
431
431
|
};
|
|
432
432
|
},
|
|
433
433
|
get "data-floating-presence"() {
|
|
434
|
-
return
|
|
434
|
+
return I.state();
|
|
435
435
|
}
|
|
436
|
-
}), !1, !0), r.$$dblclick = Qe, r.$$pointerdown =
|
|
436
|
+
}), !1, !0), r.$$dblclick = Qe, r.$$pointerdown = Ue, c(o, l(m, {
|
|
437
437
|
get when() {
|
|
438
438
|
return n.title;
|
|
439
439
|
},
|
|
440
440
|
get children() {
|
|
441
|
-
var i =
|
|
441
|
+
var i = pt(), T = i.firstChild;
|
|
442
442
|
return c(i, l(m, {
|
|
443
443
|
get when() {
|
|
444
444
|
return n.titleIcon;
|
|
445
445
|
},
|
|
446
446
|
get children() {
|
|
447
|
-
var
|
|
448
|
-
return c(
|
|
447
|
+
var Pe = bt();
|
|
448
|
+
return c(Pe, () => n.titleIcon), Pe;
|
|
449
449
|
}
|
|
450
|
-
}),
|
|
450
|
+
}), T), c(T, () => n.title), f(() => et(i, "id", de())), i;
|
|
451
451
|
}
|
|
452
452
|
})), c(r, l(m, {
|
|
453
453
|
get when() {
|
|
454
454
|
return n.headerActions;
|
|
455
455
|
},
|
|
456
456
|
get children() {
|
|
457
|
-
var i =
|
|
458
|
-
return c(i, () => n.headerActions,
|
|
457
|
+
var i = zt(), T = i.firstChild;
|
|
458
|
+
return c(i, () => n.headerActions, T), i;
|
|
459
459
|
}
|
|
460
460
|
}), te), c(te, l(m, {
|
|
461
461
|
get when() {
|
|
462
|
-
return W(() => !!
|
|
462
|
+
return W(() => !!Y())() && !h();
|
|
463
463
|
},
|
|
464
464
|
get children() {
|
|
465
|
-
return l(
|
|
465
|
+
return l(Ae, {
|
|
466
466
|
variant: "ghost",
|
|
467
467
|
size: "icon",
|
|
468
468
|
"data-floe-floating-window-control": "maximize",
|
|
@@ -492,7 +492,7 @@ function Qt(n) {
|
|
|
492
492
|
}
|
|
493
493
|
});
|
|
494
494
|
}
|
|
495
|
-
}), null), c(te, l(
|
|
495
|
+
}), null), c(te, l(Ae, {
|
|
496
496
|
variant: "ghost-destructive",
|
|
497
497
|
size: "icon",
|
|
498
498
|
"data-floe-floating-window-control": "close",
|
|
@@ -513,7 +513,7 @@ function Qt(n) {
|
|
|
513
513
|
return n.footer;
|
|
514
514
|
},
|
|
515
515
|
get children() {
|
|
516
|
-
var i =
|
|
516
|
+
var i = $t();
|
|
517
517
|
return c(i, () => n.footer), i;
|
|
518
518
|
}
|
|
519
519
|
}), null), c(t, l(m, {
|
|
@@ -522,39 +522,39 @@ function Qt(n) {
|
|
|
522
522
|
},
|
|
523
523
|
get children() {
|
|
524
524
|
return [(() => {
|
|
525
|
-
var i =
|
|
525
|
+
var i = _t();
|
|
526
526
|
return p(i, "pointerdown", y("n"), !0), f(() => w(i, b("n"))), i;
|
|
527
527
|
})(), (() => {
|
|
528
|
-
var i =
|
|
528
|
+
var i = St();
|
|
529
529
|
return p(i, "pointerdown", y("s"), !0), f(() => w(i, b("s"))), i;
|
|
530
530
|
})(), l(m, {
|
|
531
531
|
get when() {
|
|
532
|
-
return !
|
|
532
|
+
return !M();
|
|
533
533
|
},
|
|
534
534
|
get children() {
|
|
535
535
|
return [(() => {
|
|
536
536
|
var i = Pt();
|
|
537
537
|
return p(i, "pointerdown", y("e"), !0), f(() => w(i, b("e"))), i;
|
|
538
538
|
})(), (() => {
|
|
539
|
-
var i =
|
|
539
|
+
var i = It();
|
|
540
540
|
return p(i, "pointerdown", y("w"), !0), f(() => w(i, b("w"))), i;
|
|
541
541
|
})(), (() => {
|
|
542
|
-
var i =
|
|
542
|
+
var i = Rt();
|
|
543
543
|
return p(i, "pointerdown", y("ne"), !0), f(() => w(i, b("ne"))), i;
|
|
544
544
|
})(), (() => {
|
|
545
545
|
var i = Ct();
|
|
546
546
|
return p(i, "pointerdown", y("nw"), !0), f(() => w(i, b("nw"))), i;
|
|
547
547
|
})(), (() => {
|
|
548
|
-
var i =
|
|
548
|
+
var i = At();
|
|
549
549
|
return p(i, "pointerdown", y("se"), !0), f(() => w(i, b("se"))), i;
|
|
550
550
|
})(), (() => {
|
|
551
|
-
var i =
|
|
551
|
+
var i = Et();
|
|
552
552
|
return p(i, "pointerdown", y("sw"), !0), f(() => w(i, b("sw"))), i;
|
|
553
553
|
})()];
|
|
554
554
|
}
|
|
555
555
|
})];
|
|
556
556
|
}
|
|
557
|
-
}), null), f(() => w(r,
|
|
557
|
+
}), null), f(() => w(r, X("flex shrink-0 items-center justify-between h-8", "border-b", d() ? "rounded-none" : "rounded-t-md", re() && !d() && !h() && "cursor-move"))), e;
|
|
558
558
|
}
|
|
559
559
|
});
|
|
560
560
|
}
|
|
@@ -562,5 +562,5 @@ function Qt(n) {
|
|
|
562
562
|
}
|
|
563
563
|
tt(["pointerdown", "dblclick"]);
|
|
564
564
|
export {
|
|
565
|
-
|
|
565
|
+
Gt as FloatingWindow
|
|
566
566
|
};
|