@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.
@@ -1,52 +1,53 @@
1
- import { createComponent as s, Portal as Oe, insert as w, effect as u, setAttribute as Y, addEventListener as g, className as a, memo as Xe, setStyleProperty as I, template as E, use as Ye, delegateEvents as qe } from "solid-js/web";
2
- import { createUniqueId as Te, createSignal as x, onMount as Be, onCleanup as q, createEffect as $, Show as p, batch as Ue } from "solid-js";
3
- import { cn as C } from "../../utils/cn.js";
4
- import { useLayout as Ne } from "../../context/LayoutContext.js";
5
- import { Button as ze } from "./Button.js";
6
- import { Restore as je, Maximize as Ge, X as Ve } from "../icons/index.js";
7
- import { startHotInteraction as Ze } from "../../utils/hotInteraction.js";
8
- import { normalizeFloatingWindowRect as pe, resolveFloatingWindowRect as Je } from "./floatingWindowGeometry.js";
9
- var Ke = /* @__PURE__ */ E('<h2 class="text-sm font-medium truncate select-none">'), Qe = /* @__PURE__ */ E('<div class="flex items-center justify-end gap-2 p-3 border-t border-border">'), m = /* @__PURE__ */ E("<div style=touch-action:none>"), et = /* @__PURE__ */ E('<div data-floe-geometry-surface=floating-window role=dialog tabindex=-1><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">');
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 T = () => i.resizable ?? !0, B = () => i.draggable ?? !0, M = () => i.minSize ?? {
12
+ const H = () => i.resizable ?? !0, X = () => i.draggable ?? !0, R = () => i.minSize ?? {
12
13
  width: 200,
13
14
  height: 150
14
- }, F = () => i.maxSize ?? {
15
+ }, C = () => i.maxSize ?? {
15
16
  width: 1 / 0,
16
17
  height: 1 / 0
17
- }, be = () => i.zIndex ?? 100, Pe = Te(), Se = Ne(), b = () => Se.isMobile(), L = 16, U = () => `floating-window-${Pe}-title`, [_, Ie] = x(i.defaultPosition ?? {
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
- }), [A, $e] = x(i.defaultSize ?? {
21
+ }), [M, pe] = v(i.defaultSize ?? {
21
22
  width: 400,
22
23
  height: 300
23
- }), [d, N] = x(!1), [j, G] = x(!1), [V, Z] = x(!1), [Re, D] = x(!1), [Ce, Ee] = x(null);
24
- let J = {
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
- }, K = {
28
+ }, V = {
28
29
  x: 0,
29
30
  y: 0,
30
31
  width: 0,
31
32
  height: 0
32
- }, Q = {
33
+ }, Z = {
33
34
  x: 0,
34
35
  y: 0
35
- }, ee = {
36
+ }, J = {
36
37
  x: 0,
37
38
  y: 0,
38
39
  width: 0,
39
40
  height: 0
40
- }, te = "se", r, l = null, v = null, P = {
41
+ }, K = "se", r, l = null, p = null, P = {
41
42
  x: 0,
42
43
  y: 0
43
- }, y = null, R = null, ne = !1, z = {
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 Me = {
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
- }, k = (e, n) => {
59
+ }, L = (e, t) => {
59
60
  if (!e) {
60
- R?.(), R = null;
61
+ I?.(), I = null;
61
62
  return;
62
63
  }
63
- R?.(), R = Ze({
64
- kind: v === "resize" ? "resize" : "drag",
65
- cursor: n,
64
+ I?.(), I = Xe({
65
+ kind: p === "resize" ? "resize" : "drag",
66
+ cursor: t,
66
67
  lockUserSelect: !0
67
68
  });
68
- }, ie = (e) => {
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
- }, W = () => {
71
- const e = _(), n = A();
71
+ }, D = () => {
72
+ const e = A(), t = M();
72
73
  return {
73
74
  x: e.x,
74
75
  y: e.y,
75
- width: n.width,
76
- height: n.height
76
+ width: t.width,
77
+ height: t.height
77
78
  };
78
- }, S = (e) => {
79
- z = e, Ie({
79
+ }, $ = (e) => {
80
+ z = e, me({
80
81
  x: e.x,
81
82
  y: e.y
82
- }), $e({
83
+ }), pe({
83
84
  width: e.width,
84
85
  height: e.height
85
86
  });
86
- }, Fe = () => {
87
+ }, be = () => {
87
88
  try {
88
89
  r?.focus({
89
90
  preventScroll: !0
90
91
  });
91
92
  } catch {
92
93
  }
93
- }, Le = (e) => {
94
- const n = e instanceof Element ? e : null;
95
- return n ? n.closest('button, input, select, textarea, a, [role="button"], [tabindex]:not([tabindex="-1"])') === null : !0;
96
- }, H = (e) => !!r && e instanceof Node && r.contains(e), _e = () => {
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
- }, re = () => {
106
- i.open && (l === null || v === null || typeof window > "u" || ie(Je({
107
- mode: v,
106
+ }, te = () => {
107
+ i.open && (l === null || p === null || typeof window > "u" || ee(Ue({
108
+ mode: p,
108
109
  pointer: P,
109
- dragStartPos: J,
110
- dragStartRect: K,
111
- resizeStartPos: Q,
112
- resizeStartRect: ee,
113
- resizeHandle: te,
114
- minSize: M(),
115
- maxSize: F(),
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: L
122
+ mobilePadding: E
122
123
  })));
123
- }, O = (e) => {
124
+ }, W = (e) => {
124
125
  if (typeof window > "u") return;
125
- const n = {
126
+ const t = {
126
127
  width: window.innerWidth,
127
128
  height: window.innerHeight
128
129
  };
129
130
  if (d()) {
130
- S({
131
+ $({
131
132
  x: 0,
132
133
  y: 0,
133
- width: n.width,
134
- height: n.height
134
+ width: t.width,
135
+ height: t.height
135
136
  });
136
137
  return;
137
138
  }
138
- S(pe({
139
- rect: W(),
140
- minSize: M(),
141
- maxSize: F(),
142
- viewport: n,
139
+ $(ce({
140
+ rect: D(),
141
+ minSize: R(),
142
+ maxSize: C(),
143
+ viewport: t,
143
144
  mobile: b(),
144
- mobilePadding: L,
145
+ mobilePadding: E,
145
146
  center: e?.center ?? !1
146
147
  }));
147
- }, X = (e, n = !0) => {
148
- y !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(y), y = null), n && re();
149
- const o = n ? _e() ?? z : null;
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
- Ue(() => {
156
- o && S(o), l = null, v = null, G(!1), Z(!1);
157
- }), k(!1, "");
156
+ ke(() => {
157
+ o && $(o), l = null, p = null, N(!1), j(!1);
158
+ }), L(!1, "");
158
159
  };
159
- Be(() => {
160
- i.open || O({
160
+ De(() => {
161
+ i.open || W({
161
162
  center: !i.defaultPosition
162
163
  });
163
164
  const e = () => {
164
- l === null && O({
165
+ l === null && W({
165
166
  center: !1
166
167
  });
167
168
  };
168
- window.addEventListener("resize", e), q(() => window.removeEventListener("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 = !ne && !i.defaultPosition, n = () => {
173
- O({
173
+ const e = !Q && !i.defaultPosition, t = () => {
174
+ W({
174
175
  center: e
175
- }), ne = !0;
176
+ }), Q = !0;
176
177
  };
177
178
  if (typeof requestAnimationFrame > "u") {
178
- n();
179
+ t();
179
180
  return;
180
181
  }
181
- requestAnimationFrame(n);
182
- }), $(() => {
182
+ requestAnimationFrame(t);
183
+ }), S(() => {
183
184
  if (!i.open) return;
184
- const e = (n) => {
185
- if (n.key !== "Escape") return;
185
+ const e = (t) => {
186
+ if (t.key !== "Escape") return;
186
187
  const o = typeof document < "u" ? document.activeElement : null;
187
- !H(n.target) && !H(o) || (n.preventDefault(), typeof n.stopImmediatePropagation == "function" ? n.stopImmediatePropagation() : n.stopPropagation(), i.onOpenChange(!1));
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), q(() => document.removeEventListener("keydown", e, !0));
190
- }), $(() => {
190
+ document.addEventListener("keydown", e, !0), T(() => document.removeEventListener("keydown", e, !0));
191
+ }), S(() => {
191
192
  if (!i.open) {
192
- D(!1), X(l ?? void 0, !1);
193
+ F(!1), O(l ?? void 0, !1);
193
194
  return;
194
195
  }
195
- D(!0);
196
- }), $(() => {
196
+ F(!0);
197
+ }), S(() => {
197
198
  if (!i.open) return;
198
- const e = (h) => {
199
- D(H(h));
200
- }, n = (h) => {
201
- e(h.target);
202
- }, o = (h) => {
203
- e(h.target);
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", n), document.addEventListener("focusin", o), q(() => {
206
- document.removeEventListener("pointerdown", n), document.removeEventListener("focusin", o);
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 = W();
211
- l === null ? ie(e) : z = e;
211
+ const e = D();
212
+ l === null ? ee(e) : z = e;
212
213
  });
213
- const Ae = (e) => {
214
- !B() || d() || e.pointerType === "mouse" && e.button !== 0 || e.target?.closest('button, input, select, textarea, a, [role="button"]') || (e.preventDefault(), l = e.pointerId, v = "drag", G(!0), J = {
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
- }, K = {
218
+ }, V = {
218
219
  ...z
219
220
  }, P = {
220
221
  x: e.clientX,
221
222
  y: e.clientY
222
- }, k(!0, "grabbing"), typeof r?.setPointerCapture == "function" && r.setPointerCapture(e.pointerId));
223
- }, c = (e) => (n) => {
224
- !T() || d() || n.pointerType === "mouse" && n.button !== 0 || (n.preventDefault(), n.stopPropagation(), l = n.pointerId, v = "resize", Z(!0), te = e, Q = {
225
- x: n.clientX,
226
- y: n.clientY
227
- }, ee = {
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: n.clientX,
231
- y: n.clientY
232
- }, k(!0, Me[e]), typeof r?.setPointerCapture == "function" && r.setPointerCapture(n.pointerId));
233
- }, oe = () => {
234
- y = null, re();
235
- }, De = (e) => {
236
- if (!(l === null || e.pointerId !== l) && v !== null && (P = {
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
- }, y === null)) {
240
+ }, x === null)) {
240
241
  if (typeof requestAnimationFrame > "u") {
241
- oe();
242
+ ne();
242
243
  return;
243
244
  }
244
- y = requestAnimationFrame(oe);
245
+ x = requestAnimationFrame(ne);
245
246
  }
246
- }, le = (e) => {
247
+ }, ie = (e) => {
247
248
  l === null || e.pointerId !== l || (P = {
248
249
  x: e.clientX,
249
250
  y: e.clientY
250
- }, X(e.pointerId));
251
- }, se = () => {
252
- if (l !== null && X(l, !0), d()) {
253
- const n = Ce();
254
- n && S(pe({
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: n.position.x,
257
- y: n.position.y,
258
- width: n.size.width,
259
- height: n.size.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: M(),
262
- maxSize: F(),
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: L,
269
+ mobilePadding: E,
269
270
  center: !1
270
- })), N(!1);
271
+ })), Y(!1);
271
272
  return;
272
273
  }
273
- const e = W();
274
- Ee({
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
- }), S({
284
+ }), $({
284
285
  x: 0,
285
286
  y: 0,
286
287
  width: window.innerWidth,
287
288
  height: window.innerHeight
288
- }), N(!0);
289
- }, ke = () => {
290
- se();
291
- }, We = (e) => {
292
- Le(e.target) && Fe();
293
- }, f = (e) => C("absolute z-10", {
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 s(p, {
304
+ return a(y, {
304
305
  get when() {
305
306
  return i.open;
306
307
  },
307
308
  get children() {
308
- return s(Oe, {
309
+ return a(Ee, {
309
310
  get children() {
310
- var e = et(), n = e.firstChild, o = n.firstChild, h = o.firstChild, ae = h.nextSibling, He = o.nextSibling;
311
- e.$$pointerdown = We, e.addEventListener("pointercancel", le), e.$$pointerup = le, e.$$pointermove = De;
312
- var de = r;
313
- return typeof de == "function" ? Ye(de, e) : r = e, o.$$dblclick = ke, o.$$pointerdown = Ae, w(h, s(p, {
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 t = Ke();
319
- return w(t, () => i.title), u(() => Y(t, "id", U())), t;
351
+ var n = Ye();
352
+ return g(n, () => i.title), u(() => Ae(n, "id", U())), n;
320
353
  }
321
- })), w(ae, s(ze, {
354
+ })), g(oe, a(ue, {
322
355
  variant: "ghost",
323
356
  size: "icon",
324
357
  class: "h-6 w-6",
325
- onClick: (t) => {
326
- t.stopPropagation(), se();
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 s(p, {
365
+ return a(y, {
333
366
  get when() {
334
367
  return d();
335
368
  },
336
369
  get fallback() {
337
- return s(Ge, {
370
+ return a(Te, {
338
371
  class: "w-3 h-3"
339
372
  });
340
373
  },
341
374
  get children() {
342
- return s(je, {
375
+ return a(Oe, {
343
376
  class: "w-3 h-3"
344
377
  });
345
378
  }
346
379
  });
347
380
  }
348
- }), null), w(ae, s(ze, {
381
+ }), null), g(oe, a(ue, {
349
382
  variant: "ghost-destructive",
350
383
  size: "icon",
351
384
  class: "h-6 w-6",
352
- onClick: (t) => {
353
- t.stopPropagation(), i.onOpenChange(!1);
385
+ onClick: (n) => {
386
+ n.stopPropagation(), i.onOpenChange(!1);
354
387
  },
355
388
  "aria-label": "Close",
356
389
  get children() {
357
- return s(Ve, {
390
+ return a(He, {
358
391
  class: "w-3.5 h-3.5"
359
392
  });
360
393
  }
361
- }), null), w(He, () => i.children), w(n, s(p, {
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 t = Qe();
367
- return w(t, () => i.footer), t;
399
+ var n = qe();
400
+ return g(n, () => i.footer), n;
368
401
  }
369
- }), null), w(n, s(p, {
402
+ }), null), g(t, a(y, {
370
403
  get when() {
371
- return Xe(() => !!T())() && !d();
404
+ return de(() => !!H())() && !d();
372
405
  },
373
406
  get children() {
374
407
  return [(() => {
375
- var t = m();
376
- return g(t, "pointerdown", c("n"), !0), u(() => a(t, f("n"))), t;
408
+ var n = Ne();
409
+ return m(n, "pointerdown", f("n"), !0), u(() => c(n, h("n"))), n;
377
410
  })(), (() => {
378
- var t = m();
379
- return g(t, "pointerdown", c("s"), !0), u(() => a(t, f("s"))), t;
380
- })(), s(p, {
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 t = m();
387
- return g(t, "pointerdown", c("e"), !0), u(() => a(t, f("e"))), t;
419
+ var n = je();
420
+ return m(n, "pointerdown", f("e"), !0), u(() => c(n, h("e"))), n;
388
421
  })(), (() => {
389
- var t = m();
390
- return g(t, "pointerdown", c("w"), !0), u(() => a(t, f("w"))), t;
422
+ var n = Ge();
423
+ return m(n, "pointerdown", f("w"), !0), u(() => c(n, h("w"))), n;
391
424
  })(), (() => {
392
- var t = m();
393
- return g(t, "pointerdown", c("ne"), !0), u(() => a(t, f("ne"))), t;
425
+ var n = Ve();
426
+ return m(n, "pointerdown", f("ne"), !0), u(() => c(n, h("ne"))), n;
394
427
  })(), (() => {
395
- var t = m();
396
- return g(t, "pointerdown", c("nw"), !0), u(() => a(t, f("nw"))), t;
428
+ var n = Ze();
429
+ return m(n, "pointerdown", f("nw"), !0), u(() => c(n, h("nw"))), n;
397
430
  })(), (() => {
398
- var t = m();
399
- return g(t, "pointerdown", c("se"), !0), u(() => a(t, f("se"))), t;
431
+ var n = Je();
432
+ return m(n, "pointerdown", f("se"), !0), u(() => c(n, h("se"))), n;
400
433
  })(), (() => {
401
- var t = m();
402
- return g(t, "pointerdown", c("sw"), !0), u(() => a(t, f("sw"))), t;
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((t) => {
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
- qe(["pointermove", "pointerup", "pointerdown", "dblclick"]);
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';