@floegence/floe-webapp-core 0.36.69 → 0.36.70

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,20 +1,24 @@
1
- import { createComponent as s, Portal as A, insert as o, Dynamic as K, effect as _, className as y, setAttribute as R, template as d, use as S, delegateEvents as z } from "solid-js/web";
2
- import { createSignal as I, createEffect as T, createMemo as j, Show as p, For as E } from "solid-js";
3
- import { cn as C } from "../../utils/cn.js";
4
- import { useCommand as B } from "../../context/CommandContext.js";
5
- import { Search as H } from "../icons/index.js";
6
- import { useResolvedFloeConfig as L } from "../../context/FloeConfigContext.js";
7
- import { useOverlayMask as N } from "../../hooks/useOverlayMask.js";
8
- import { matchKeybind as U } from "../../utils/keybind.js";
9
- var W = /* @__PURE__ */ d('<div class="fixed inset-0 z-50 bg-background/60 backdrop-blur-sm animate-in fade-in">'), q = /* @__PURE__ */ d('<div><div class="flex items-center gap-3 px-4 pt-1 border-b border-border"><input type=text><kbd class="text-xs text-muted-foreground px-1.5 py-0.5 rounded bg-muted font-mono"></kbd></div><div class="max-h-80 overflow-y-auto overscroll-contain py-2">'), G = /* @__PURE__ */ d('<div class="px-4 py-8 text-center text-sm text-muted-foreground">'), J = /* @__PURE__ */ d('<div><div class="px-4 py-1 text-xs font-semibold text-muted-foreground uppercase tracking-wider">'), Q = /* @__PURE__ */ d('<span class="w-5 h-5 flex items-center justify-center text-muted-foreground">'), V = /* @__PURE__ */ d('<span class="ml-2 text-muted-foreground text-xs">'), X = /* @__PURE__ */ d('<kbd class="text-xs text-muted-foreground px-1.5 py-0.5 rounded bg-muted font-mono">'), Y = /* @__PURE__ */ d('<button type=button><div class="flex-1 text-left"><span>');
10
- function se() {
11
- const r = B(), g = L();
12
- let D, $;
13
- const [k, x] = I(0);
14
- N({
15
- open: r.isOpen,
16
- root: () => $,
17
- onClose: () => r.close(),
1
+ import { createComponent as s, Portal as R, effect as w, setAttribute as g, insert as i, Dynamic as z, className as D, template as u, use as E, delegateEvents as I } from "solid-js/web";
2
+ import { createSignal as T, createEffect as j, createMemo as B, Show as x, For as F } from "solid-js";
3
+ import { cn as M } from "../../utils/cn.js";
4
+ import { useCommand as H } from "../../context/CommandContext.js";
5
+ import { Search as L } from "../icons/index.js";
6
+ import { useResolvedFloeConfig as N } from "../../context/FloeConfigContext.js";
7
+ import { useOverlayMask as U } from "../../hooks/useOverlayMask.js";
8
+ import { matchKeybind as W } from "../../utils/keybind.js";
9
+ import { createFloatingPresence as q } from "./floatingPresence.js";
10
+ var G = /* @__PURE__ */ u('<div class="fixed inset-0 z-50 bg-background/60 backdrop-blur-sm floe-floating-presence floe-floating-backdrop">'), J = /* @__PURE__ */ u('<div><div class="flex items-center gap-3 px-4 pt-1 border-b border-border"><input type=text><kbd class="text-xs text-muted-foreground px-1.5 py-0.5 rounded bg-muted font-mono"></kbd></div><div class="max-h-80 overflow-y-auto overscroll-contain py-2">'), Q = /* @__PURE__ */ u('<div class="px-4 py-8 text-center text-sm text-muted-foreground">'), V = /* @__PURE__ */ u('<div><div class="px-4 py-1 text-xs font-semibold text-muted-foreground uppercase tracking-wider">'), X = /* @__PURE__ */ u('<span class="w-5 h-5 flex items-center justify-center text-muted-foreground">'), Y = /* @__PURE__ */ u('<span class="ml-2 text-muted-foreground text-xs">'), Z = /* @__PURE__ */ u('<kbd class="text-xs text-muted-foreground px-1.5 py-0.5 rounded bg-muted font-mono">'), ee = /* @__PURE__ */ u('<button type=button><div class="flex-1 text-left"><span>');
11
+ function de() {
12
+ const n = H(), v = N();
13
+ let S, y;
14
+ const [_, h] = T(0), f = q({
15
+ open: n.isOpen,
16
+ exitDurationMs: 120
17
+ });
18
+ U({
19
+ open: n.isOpen,
20
+ root: () => y,
21
+ onClose: () => n.close(),
18
22
  lockBodyScroll: !0,
19
23
  trapFocus: !0,
20
24
  closeOnEscape: !0,
@@ -26,136 +30,144 @@ function se() {
26
30
  selector: "input"
27
31
  },
28
32
  restoreFocus: !0
29
- }), T(() => {
30
- r.isOpen() && (r.search(), x(0));
33
+ }), j(() => {
34
+ n.isOpen() && (n.search(), h(0));
31
35
  });
32
- const F = (e) => {
33
- if (U(e, g.config.commands.palette.keybind)) {
34
- e.preventDefault(), r.close();
36
+ const O = (e) => {
37
+ if (W(e, v.config.commands.palette.keybind)) {
38
+ e.preventDefault(), n.close();
35
39
  return;
36
40
  }
37
- const l = r.filteredCommands();
41
+ const r = n.filteredCommands();
38
42
  switch (e.key) {
39
43
  case "ArrowDown": {
40
44
  e.preventDefault();
41
- const t = l.length;
45
+ const t = r.length;
42
46
  if (t <= 0) return;
43
- x((i) => Math.max(0, Math.min(i + 1, t - 1)));
47
+ h((a) => Math.max(0, Math.min(a + 1, t - 1)));
44
48
  break;
45
49
  }
46
50
  case "ArrowUp": {
47
51
  e.preventDefault();
48
- const t = l.length;
52
+ const t = r.length;
49
53
  if (t <= 0) return;
50
- x((i) => Math.max(0, Math.min(i - 1, t - 1)));
54
+ h((a) => Math.max(0, Math.min(a - 1, t - 1)));
51
55
  break;
52
56
  }
53
57
  case "Enter":
54
- e.preventDefault(), l[k()] && r.execute(l[k()].id);
58
+ e.preventDefault(), r[_()] && n.execute(r[_()].id);
55
59
  break;
56
60
  }
57
- }, O = j(() => {
58
- const e = r.filteredCommands(), l = /* @__PURE__ */ new Map();
59
- return e.forEach((t, i) => {
60
- const h = t.category ?? "Commands", f = l.get(h);
61
- f ? f.push({
61
+ }, A = B(() => {
62
+ const e = n.filteredCommands(), r = /* @__PURE__ */ new Map();
63
+ return e.forEach((t, a) => {
64
+ const b = t.category ?? "Commands", p = r.get(b);
65
+ p ? p.push({
62
66
  cmd: t,
63
- index: i
64
- }) : l.set(h, [{
67
+ index: a
68
+ }) : r.set(b, [{
65
69
  cmd: t,
66
- index: i
70
+ index: a
67
71
  }]);
68
- }), Array.from(l.entries());
72
+ }), Array.from(r.entries());
69
73
  });
70
- return s(p, {
74
+ return s(x, {
71
75
  get when() {
72
- return r.isOpen();
76
+ return f.mounted();
73
77
  },
74
78
  get children() {
75
- return s(A, {
79
+ return s(R, {
76
80
  get children() {
77
81
  return [(() => {
78
- var e = W();
79
- return e.$$click = () => r.close(), e;
82
+ var e = G();
83
+ return e.$$click = () => n.close(), w((r) => {
84
+ var t = f.state(), a = f.exiting() ? "true" : void 0;
85
+ return t !== r.e && g(e, "data-floating-presence", r.e = t), a !== r.t && g(e, "aria-hidden", r.t = a), r;
86
+ }, {
87
+ e: void 0,
88
+ t: void 0
89
+ }), e;
80
90
  })(), (() => {
81
- var e = q(), l = e.firstChild, t = l.firstChild, i = t.nextSibling, h = l.nextSibling;
82
- e.$$keydown = F;
83
- var f = $;
84
- typeof f == "function" ? S(f, e) : $ = e, o(l, s(H, {
91
+ var e = J(), r = e.firstChild, t = r.firstChild, a = t.nextSibling, b = r.nextSibling;
92
+ e.$$keydown = O;
93
+ var p = y;
94
+ typeof p == "function" ? E(p, e) : y = e, i(r, s(L, {
85
95
  class: "w-5 h-5 text-muted-foreground flex-shrink-0"
86
- }), t), t.$$input = (n) => r.setSearch(n.currentTarget.value);
87
- var M = D;
88
- return typeof M == "function" ? S(M, t) : D = t, o(i, () => g.config.strings.commandPalette.esc), o(h, s(p, {
96
+ }), t), t.$$input = (o) => n.setSearch(o.currentTarget.value);
97
+ var P = S;
98
+ return typeof P == "function" ? E(P, t) : S = t, i(a, () => v.config.strings.commandPalette.esc), i(b, s(x, {
89
99
  get when() {
90
- return r.filteredCommands().length > 0;
100
+ return n.filteredCommands().length > 0;
91
101
  },
92
102
  get fallback() {
93
103
  return (() => {
94
- var n = G();
95
- return o(n, () => g.config.strings.commandPalette.empty), n;
104
+ var o = Q();
105
+ return i(o, () => v.config.strings.commandPalette.empty), o;
96
106
  })();
97
107
  },
98
108
  get children() {
99
- return s(E, {
109
+ return s(F, {
100
110
  get each() {
101
- return O();
111
+ return A();
102
112
  },
103
- children: ([n, v]) => (() => {
104
- var m = J(), b = m.firstChild;
105
- return o(b, n), o(m, s(E, {
106
- each: v,
107
- children: (c) => (() => {
108
- var u = Y(), w = u.firstChild, P = w.firstChild;
109
- return u.addEventListener("mouseenter", () => x(c.index)), u.$$click = () => r.execute(c.cmd.id), o(u, s(p, {
113
+ children: ([o, k]) => (() => {
114
+ var m = V(), $ = m.firstChild;
115
+ return i($, o), i(m, s(F, {
116
+ each: k,
117
+ children: (l) => (() => {
118
+ var c = ee(), C = c.firstChild, K = C.firstChild;
119
+ return c.addEventListener("mouseenter", () => h(l.index)), c.$$click = () => n.execute(l.cmd.id), i(c, s(x, {
110
120
  get when() {
111
- return c.cmd.icon;
121
+ return l.cmd.icon;
112
122
  },
113
123
  get children() {
114
- var a = Q();
115
- return o(a, s(K, {
124
+ var d = X();
125
+ return i(d, s(z, {
116
126
  get component() {
117
- return c.cmd.icon;
127
+ return l.cmd.icon;
118
128
  },
119
129
  class: "w-5 h-5"
120
- })), a;
130
+ })), d;
121
131
  }
122
- }), w), o(P, () => c.cmd.title), o(w, s(p, {
132
+ }), C), i(K, () => l.cmd.title), i(C, s(x, {
123
133
  get when() {
124
- return c.cmd.description;
134
+ return l.cmd.description;
125
135
  },
126
136
  get children() {
127
- var a = V();
128
- return o(a, () => c.cmd.description), a;
137
+ var d = Y();
138
+ return i(d, () => l.cmd.description), d;
129
139
  }
130
- }), null), o(u, s(p, {
140
+ }), null), i(c, s(x, {
131
141
  get when() {
132
- return c.cmd.keybind;
142
+ return l.cmd.keybind;
133
143
  },
134
144
  get children() {
135
- var a = X();
136
- return o(a, () => r.getKeybindDisplay(c.cmd.keybind)), a;
145
+ var d = Z();
146
+ return i(d, () => n.getKeybindDisplay(l.cmd.keybind)), d;
137
147
  }
138
- }), null), _(() => y(u, C("w-full flex items-center gap-3 px-4 py-2 text-sm cursor-pointer", "transition-colors duration-75", "focus:outline-none", k() === c.index ? "bg-accent text-accent-foreground" : "hover:bg-accent/50"))), u;
148
+ }), null), w(() => D(c, M("w-full flex items-center gap-3 px-4 py-2 text-sm cursor-pointer", "transition-colors duration-75", "focus:outline-none", _() === l.index ? "bg-accent text-accent-foreground" : "hover:bg-accent/50"))), c;
139
149
  })()
140
150
  }), null), m;
141
151
  })()
142
152
  });
143
153
  }
144
- })), _((n) => {
145
- var v = C("fixed left-1/2 top-[20%] z-50 -translate-x-1/2", "w-full max-w-xl", "bg-popover text-popover-foreground rounded-lg shadow-2xl", "border border-border", "animate-in fade-in slide-in-from-top-4", "overflow-hidden"), m = g.config.strings.commandPalette.placeholder, b = C("flex-1 h-12 bg-transparent text-sm", "placeholder:text-muted-foreground", "focus:outline-none");
146
- return v !== n.e && y(e, n.e = v), m !== n.t && R(t, "placeholder", n.t = m), b !== n.a && y(t, n.a = b), n;
154
+ })), w((o) => {
155
+ var k = M("fixed left-1/2 top-[20%] z-50 -translate-x-1/2", "w-full max-w-xl", "bg-popover text-popover-foreground rounded-lg shadow-2xl", "border border-border", "floe-floating-presence floe-floating-dialog-panel", "overflow-hidden"), m = f.state(), $ = f.exiting() ? "true" : void 0, l = v.config.strings.commandPalette.placeholder, c = M("flex-1 h-12 bg-transparent text-sm", "placeholder:text-muted-foreground", "focus:outline-none");
156
+ return k !== o.e && D(e, o.e = k), m !== o.t && g(e, "data-floating-presence", o.t = m), $ !== o.a && g(e, "aria-hidden", o.a = $), l !== o.o && g(t, "placeholder", o.o = l), c !== o.i && D(t, o.i = c), o;
147
157
  }, {
148
158
  e: void 0,
149
159
  t: void 0,
150
- a: void 0
151
- }), _(() => t.value = r.search()), e;
160
+ a: void 0,
161
+ o: void 0,
162
+ i: void 0
163
+ }), w(() => t.value = n.search()), e;
152
164
  })()];
153
165
  }
154
166
  });
155
167
  }
156
168
  });
157
169
  }
158
- z(["click", "keydown", "input"]);
170
+ I(["click", "keydown", "input"]);
159
171
  export {
160
- se as CommandPalette
172
+ de as CommandPalette
161
173
  };
@@ -1,73 +1,77 @@
1
- import { createComponent as n, use as D, setAttribute as s, style as K, Portal as W, spread as A, mergeProps as O, memo as R, insert as d, effect as E, template as u } from "solid-js/web";
2
- import { createUniqueId as Y, createSignal as k, createMemo as I, createEffect as X, onCleanup as J, Show as g, untrack as Q } from "solid-js";
1
+ import { createComponent as n, use as I, setAttribute as f, style as Y, Portal as X, spread as O, mergeProps as R, memo as k, insert as d, effect as H, template as u } from "solid-js/web";
2
+ import { createUniqueId as J, createSignal as P, createMemo as N, createEffect as Q, onCleanup as Z, Show as h, untrack as ee } from "solid-js";
3
3
  import { cn as S } from "../../utils/cn.js";
4
- import { Button as P } from "./Button.js";
5
- import { X as Z } from "../icons/index.js";
6
- import { useResolvedFloeConfig as ee } from "../../context/FloeConfigContext.js";
7
- import { useOverlayMask as te } from "../../hooks/useOverlayMask.js";
8
- import { resolveSurfacePortalHost as re, isSurfacePortalMode as F, DIALOG_SURFACE_BOUNDARY_ATTR as x, projectSurfacePortalRect as ne, resolveSurfacePortalBoundaryRect as oe, resolveSurfacePortalMount as ie } from "./dialogSurfaceScope.js";
9
- import { LOCAL_INTERACTION_SURFACE_ATTR as le } from "./localInteractionSurface.js";
10
- var ae = /* @__PURE__ */ u("<span aria-hidden=true>"), de = /* @__PURE__ */ u('<h2 class="text-sm font-semibold">'), ce = /* @__PURE__ */ u('<p class="mt-0.5 text-xs text-muted-foreground">'), ue = /* @__PURE__ */ u('<div class="flex items-start justify-between p-3 border-b border-border"><div>'), se = /* @__PURE__ */ u('<div class="flex items-center justify-end gap-2 p-3 border-t border-border">'), fe = /* @__PURE__ */ u('<div><div></div><div class="relative z-[1] flex h-full w-full items-center justify-center"><div><div class="flex-1 overflow-auto overscroll-contain p-3">'), me = /* @__PURE__ */ u("<div>");
11
- const ge = {
4
+ import { Button as B } from "./Button.js";
5
+ import { X as te } from "../icons/index.js";
6
+ import { useResolvedFloeConfig as re } from "../../context/FloeConfigContext.js";
7
+ import { useOverlayMask as ne } from "../../hooks/useOverlayMask.js";
8
+ import { resolveSurfacePortalHost as oe, isSurfacePortalMode as F, DIALOG_SURFACE_BOUNDARY_ATTR as x, projectSurfacePortalRect as ie, resolveSurfacePortalBoundaryRect as le, resolveSurfacePortalMount as ae } from "./dialogSurfaceScope.js";
9
+ import { LOCAL_INTERACTION_SURFACE_ATTR as de } from "./localInteractionSurface.js";
10
+ import { createFloatingPresence as ce } from "./floatingPresence.js";
11
+ var ue = /* @__PURE__ */ u("<span aria-hidden=true>"), se = /* @__PURE__ */ u('<h2 class="text-sm font-semibold">'), fe = /* @__PURE__ */ u('<p class="mt-0.5 text-xs text-muted-foreground">'), ge = /* @__PURE__ */ u('<div class="flex items-start justify-between p-3 border-b border-border"><div>'), me = /* @__PURE__ */ u('<div class="flex items-center justify-end gap-2 p-3 border-t border-border">'), he = /* @__PURE__ */ u('<div><div></div><div class="relative z-[1] flex h-full w-full items-center justify-center"><div><div class="flex-1 overflow-auto overscroll-contain p-3">'), ve = /* @__PURE__ */ u("<div>");
12
+ const we = {
12
13
  display: "none"
13
14
  };
14
- function he(e) {
15
+ function be(e) {
15
16
  if (typeof queueMicrotask == "function") {
16
17
  queueMicrotask(e);
17
18
  return;
18
19
  }
19
20
  Promise.resolve().then(e);
20
21
  }
21
- function M(e) {
22
+ function j(e) {
22
23
  return `${e.left}|${e.top}|${e.right}|${e.bottom}|${e.width}|${e.height}`;
23
24
  }
24
- function we(e) {
25
+ function ye(e) {
25
26
  return typeof window < "u" && typeof window.requestAnimationFrame == "function" ? window.requestAnimationFrame(e) : window.setTimeout(() => e(Date.now()), 16);
26
27
  }
27
- function be(e) {
28
+ function pe(e) {
28
29
  if (typeof window < "u" && typeof window.cancelAnimationFrame == "function") {
29
30
  window.cancelAnimationFrame(e);
30
31
  return;
31
32
  }
32
33
  window.clearTimeout(e);
33
34
  }
34
- function ve(e) {
35
- const o = Y(), T = () => `dialog-${o}-title`, B = () => `dialog-${o}-description`;
36
- let p;
37
- const [_, H] = k(null), [N, j] = k(0), [q, G] = k(0), h = () => e.open && !!_() && N() > 0, z = (t) => {
38
- H(t), he(() => {
39
- Q(_) === t && j((l) => l + 1);
35
+ function $e(e) {
36
+ const o = J(), T = () => `dialog-${o}-title`, D = () => `dialog-${o}-description`;
37
+ let _;
38
+ const [v, q] = P(null), [M, G] = P(0), [L, z] = P(0), E = () => e.open && !!v() && M() > 0, s = ce({
39
+ open: E,
40
+ exitDurationMs: 120
41
+ }), C = () => s.mounted() && !!v() && M() > 0, U = (t) => {
42
+ q(t), be(() => {
43
+ ee(v) === t && G((l) => l + 1);
40
44
  });
41
- }, w = I(() => h() ? re({
42
- owner: _()
45
+ }, w = N(() => C() ? oe({
46
+ owner: v()
43
47
  }) : {
44
48
  host: null,
45
49
  boundaryHost: null,
46
50
  mountHost: null,
47
51
  mode: "global"
48
- }), b = () => `dialog-boundary-${o}`, r = () => F(w()), L = () => ie(w()), C = (t) => ne(oe(t), t), U = () => C(w()), v = I(() => (q(), U())), V = (t) => typeof Element < "u" && t instanceof Element ? !!t.closest(`[${x}="${b()}"]`) : typeof Node < "u" && t instanceof Node ? !!t.parentElement?.closest(`[${x}="${b()}"]`) : !1;
49
- return X(() => {
52
+ }), b = () => `dialog-boundary-${o}`, r = () => F(w()), V = () => ae(w()), A = (t) => ie(le(t), t), K = () => A(w()), y = N(() => (L(), K())), W = (t) => typeof Element < "u" && t instanceof Element ? !!t.closest(`[${x}="${b()}"]`) : typeof Node < "u" && t instanceof Node ? !!t.parentElement?.closest(`[${x}="${b()}"]`) : !1;
53
+ return Q(() => {
50
54
  const t = w();
51
- if (!h() || !F(t) || typeof window > "u")
55
+ if (!C() || !F(t) || typeof window > "u")
52
56
  return;
53
- let l = !1, f = null, i = M(C(t));
54
- const y = () => {
57
+ let l = !1, g = null, i = j(A(t));
58
+ const p = () => {
55
59
  if (l || !F(t))
56
60
  return;
57
- const a = M(C(t));
58
- a !== i && (i = a, G(($) => $ + 1));
61
+ const a = j(A(t));
62
+ a !== i && (i = a, z(($) => $ + 1));
59
63
  }, m = () => {
60
- l || (f = we(() => {
61
- y(), m();
64
+ l || (g = ye(() => {
65
+ p(), m();
62
66
  }));
63
67
  };
64
- m(), J(() => {
65
- l = !0, f !== null && be(f);
68
+ m(), Z(() => {
69
+ l = !0, g !== null && pe(g);
66
70
  });
67
- }), te({
68
- open: h,
69
- root: () => p,
70
- containsTarget: r() ? (t) => V(t) : void 0,
71
+ }), ne({
72
+ open: E,
73
+ root: () => _,
74
+ containsTarget: r() ? (t) => W(t) : void 0,
71
75
  onClose: () => e.onOpenChange(!1),
72
76
  lockBodyScroll: () => !r(),
73
77
  trapFocus: !0,
@@ -78,104 +82,116 @@ function ve(e) {
78
82
  blockTouchMove: () => r() ? "none" : "outside",
79
83
  restoreFocus: !0
80
84
  }), [(() => {
81
- var t = ae();
82
- return D(z, t), s(t, "data-floe-dialog-owner-anchor", o), K(t, ge), t;
83
- })(), n(g, {
85
+ var t = ue();
86
+ return I(U, t), f(t, "data-floe-dialog-owner-anchor", o), Y(t, we), t;
87
+ })(), n(h, {
84
88
  get when() {
85
- return h();
89
+ return C();
86
90
  },
87
91
  get children() {
88
- return n(W, {
92
+ return n(X, {
89
93
  get mount() {
90
- return L();
94
+ return V();
91
95
  },
92
96
  get children() {
93
- var t = fe(), l = t.firstChild, f = l.nextSibling, i = f.firstChild, y = i.firstChild;
94
- s(t, "data-floe-dialog-overlay-root", o), A(t, O({
97
+ var t = he(), l = t.firstChild, g = l.nextSibling, i = g.firstChild, p = i.firstChild;
98
+ f(t, "data-floe-dialog-overlay-root", o), O(t, R({
95
99
  get "data-floe-dialog-mode"() {
96
100
  return r() ? "surface" : "global";
101
+ },
102
+ get "data-floating-presence"() {
103
+ return s.state();
104
+ },
105
+ get "aria-hidden"() {
106
+ return s.exiting() ? "true" : void 0;
97
107
  }
98
108
  }, () => ({
99
- [le]: r() ? "true" : void 0
109
+ [de]: r() ? "true" : void 0
100
110
  }), {
101
111
  get class() {
102
- return S(r() ? "absolute z-20 box-border p-3" : "fixed inset-0 box-border z-50 p-4");
112
+ return S(r() ? "absolute z-20 box-border p-3" : "fixed inset-0 box-border z-50 p-4", s.exiting() && "pointer-events-none");
103
113
  },
104
114
  get style() {
105
- return R(() => !!r())() ? {
106
- left: `${v().left}px`,
107
- top: `${v().top}px`,
108
- width: `${v().width}px`,
109
- height: `${v().height}px`
115
+ return k(() => !!r())() ? {
116
+ left: `${y().left}px`,
117
+ top: `${y().top}px`,
118
+ width: `${y().width}px`,
119
+ height: `${y().height}px`
110
120
  } : void 0;
111
121
  }
112
- }), !1, !0), s(l, "data-floe-dialog-backdrop", o), A(l, O(() => ({
122
+ }), !1, !0), f(l, "data-floe-dialog-backdrop", o), O(l, R(() => ({
113
123
  [x]: b()
114
124
  }), {
125
+ get "data-floating-presence"() {
126
+ return s.state();
127
+ },
115
128
  get class() {
116
- return S("absolute inset-0 cursor-pointer animate-in fade-in", r() ? "bg-background/72 backdrop-blur-[2px]" : "bg-background/80 backdrop-blur-sm");
129
+ return S("absolute inset-0 cursor-pointer floe-floating-presence floe-floating-backdrop", r() ? "bg-background/72 backdrop-blur-[2px]" : "bg-background/80 backdrop-blur-sm");
117
130
  },
118
131
  onClick: () => e.onOpenChange(!1)
119
132
  }), !1, !1);
120
- var m = p;
121
- return typeof m == "function" ? D(m, i) : p = i, s(i, "data-floe-dialog-panel", o), A(i, O(() => ({
133
+ var m = _;
134
+ return typeof m == "function" ? I(m, i) : _ = i, f(i, "data-floe-dialog-panel", o), O(i, R(() => ({
122
135
  [x]: b()
123
136
  }), {
124
137
  get class() {
125
- return S(r() ? "flex max-h-[calc(100%-1rem)] w-[min(32rem,calc(100%-1rem))] max-w-[calc(100%-1rem)] flex-col" : "w-full max-w-md max-h-[85vh]", "bg-card text-card-foreground rounded-md shadow-lg", "border border-border", "animate-in fade-in zoom-in-95", "flex flex-col", e.class);
138
+ return S(r() ? "flex max-h-[calc(100%-1rem)] w-[min(32rem,calc(100%-1rem))] max-w-[calc(100%-1rem)] flex-col" : "w-full max-w-md max-h-[85vh]", "bg-card text-card-foreground rounded-md shadow-lg", "border border-border", "floe-floating-presence floe-floating-dialog-panel", "flex flex-col", e.class);
139
+ },
140
+ get "data-floating-presence"() {
141
+ return s.state();
126
142
  },
127
143
  role: "dialog",
128
144
  get "aria-modal"() {
129
145
  return r() ? void 0 : "true";
130
146
  },
131
147
  get "aria-labelledby"() {
132
- return R(() => !!e.title)() ? T() : void 0;
148
+ return k(() => !!e.title)() ? T() : void 0;
133
149
  },
134
150
  get "aria-describedby"() {
135
- return R(() => !!e.description)() ? B() : void 0;
151
+ return k(() => !!e.description)() ? D() : void 0;
136
152
  },
137
153
  tabIndex: -1
138
- }), !1, !0), d(i, n(g, {
154
+ }), !1, !0), d(i, n(h, {
139
155
  get when() {
140
156
  return e.title || e.description;
141
157
  },
142
158
  get children() {
143
- var a = ue(), $ = a.firstChild;
144
- return d($, n(g, {
159
+ var a = ge(), $ = a.firstChild;
160
+ return d($, n(h, {
145
161
  get when() {
146
162
  return e.title;
147
163
  },
148
164
  get children() {
149
- var c = de();
150
- return d(c, () => e.title), E(() => s(c, "id", T())), c;
165
+ var c = se();
166
+ return d(c, () => e.title), H(() => f(c, "id", T())), c;
151
167
  }
152
- }), null), d($, n(g, {
168
+ }), null), d($, n(h, {
153
169
  get when() {
154
170
  return e.description;
155
171
  },
156
172
  get children() {
157
- var c = ce();
158
- return d(c, () => e.description), E(() => s(c, "id", B())), c;
173
+ var c = fe();
174
+ return d(c, () => e.description), H(() => f(c, "id", D())), c;
159
175
  }
160
- }), null), d(a, n(P, {
176
+ }), null), d(a, n(B, {
161
177
  variant: "ghost-destructive",
162
178
  size: "icon",
163
179
  class: "h-6 w-6 -mr-1",
164
180
  onClick: () => e.onOpenChange(!1),
165
181
  "aria-label": "Close",
166
182
  get children() {
167
- return n(Z, {
183
+ return n(te, {
168
184
  class: "w-3.5 h-3.5"
169
185
  });
170
186
  }
171
187
  }), null), a;
172
188
  }
173
- }), y), d(y, () => e.children), d(i, n(g, {
189
+ }), p), d(p, () => e.children), d(i, n(h, {
174
190
  get when() {
175
191
  return e.footer;
176
192
  },
177
193
  get children() {
178
- var a = se();
194
+ var a = me();
179
195
  return d(a, () => e.footer), a;
180
196
  }
181
197
  }), null), t;
@@ -184,9 +200,9 @@ function ve(e) {
184
200
  }
185
201
  })];
186
202
  }
187
- function ke(e) {
188
- const o = ee();
189
- return n(ve, {
203
+ function Be(e) {
204
+ const o = re();
205
+ return n($e, {
190
206
  get open() {
191
207
  return e.open;
192
208
  },
@@ -200,7 +216,7 @@ function ke(e) {
200
216
  return e.description;
201
217
  },
202
218
  get footer() {
203
- return [n(P, {
219
+ return [n(B, {
204
220
  variant: "ghost",
205
221
  onClick: () => e.onOpenChange(!1),
206
222
  get disabled() {
@@ -209,7 +225,7 @@ function ke(e) {
209
225
  get children() {
210
226
  return e.cancelText ?? o.config.strings.confirmDialog.cancel;
211
227
  }
212
- }), n(P, {
228
+ }), n(B, {
213
229
  get variant() {
214
230
  return e.variant === "destructive" ? "destructive" : "primary";
215
231
  },
@@ -225,11 +241,11 @@ function ke(e) {
225
241
  })];
226
242
  },
227
243
  get children() {
228
- return e.children ?? me();
244
+ return e.children ?? ve();
229
245
  }
230
246
  });
231
247
  }
232
248
  export {
233
- ke as ConfirmDialog,
234
- ve as Dialog
249
+ Be as ConfirmDialog,
250
+ $e as Dialog
235
251
  };