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