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