@floegence/floe-webapp-core 0.50.5 → 0.51.0

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