@floegence/floe-webapp-core 0.36.69 → 0.36.71

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