@floegence/floe-webapp-core 0.35.30 → 0.35.31

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