@floegence/floe-webapp-core 0.52.5 → 0.52.7

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.
@@ -7,6 +7,8 @@ export interface FloatingWindowProps {
7
7
  onOpenChange: (open: boolean) => void;
8
8
  /** Window title */
9
9
  title?: string;
10
+ /** Compact actions at the right of the title bar, before the window controls. */
11
+ headerActions?: JSX.Element;
10
12
  /** Window content */
11
13
  children: JSX.Element;
12
14
  /** Optional footer content */
@@ -1,53 +1,53 @@
1
- import { createComponent as a, Portal as Te, spread as ce, mergeProps as fe, memo as we, insert as g, effect as c, setAttribute as De, addEventListener as m, className as f, template as u, use as We, 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";
1
+ import { createComponent as a, Portal as De, spread as ce, mergeProps as fe, memo as he, insert as c, effect as f, setAttribute as We, addEventListener as m, className as h, template as d, use as Oe, delegateEvents as He } from "solid-js/web";
2
+ import { createUniqueId as Ye, createSignal as p, onCleanup as L, onMount as Ne, createEffect as $, Show as x, batch as Xe, untrack as Ue } from "solid-js";
3
+ import { cn as k } from "../../utils/cn.js";
4
+ import { useLayout as qe } from "../../context/LayoutContext.js";
5
+ import { Button as we } from "./Button.js";
6
+ import { Restore as Be, Maximize as Ge, X as je } from "../icons/index.js";
7
+ import { startHotInteraction as Ve } from "../../utils/hotInteraction.js";
8
+ import { startPointerSession as Ze } from "./pointerSession.js";
9
+ import { resolveFloatingWindowViewport as ge, normalizeFloatingWindowRect as me, resolveFloatingWindowRect as Je } from "./floatingWindowGeometry.js";
10
+ import { createFloatingPresence as Ke } from "./floatingPresence.js";
11
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__ */ u('<h2 class="text-xs leading-none font-medium truncate select-none">'), tt = /* @__PURE__ */ u('<div data-floe-floating-window-footer=true class="flex items-center justify-end gap-2 p-3 border-t border-border">'), nt = /* @__PURE__ */ u("<div data-floe-floating-window-resize-handle=n style=touch-action:none>"), it = /* @__PURE__ */ u("<div data-floe-floating-window-resize-handle=s style=touch-action:none>"), ot = /* @__PURE__ */ u("<div data-floe-floating-window-resize-handle=e style=touch-action:none>"), rt = /* @__PURE__ */ u("<div data-floe-floating-window-resize-handle=w style=touch-action:none>"), lt = /* @__PURE__ */ u("<div data-floe-floating-window-resize-handle=ne style=touch-action:none>"), st = /* @__PURE__ */ u("<div data-floe-floating-window-resize-handle=nw style=touch-action:none>"), at = /* @__PURE__ */ u("<div data-floe-floating-window-resize-handle=se style=touch-action:none>"), dt = /* @__PURE__ */ u("<div data-floe-floating-window-resize-handle=sw style=touch-action:none>"), ut = /* @__PURE__ */ u('<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 px-2"></div><div class="flex h-full shrink-0 items-stretch"></div></div><div data-floe-floating-window-content=true class="flex-1 overflow-auto p-3">');
12
+ import { SURFACE_PORTAL_LAYER_ATTR as Qe, SURFACE_FLOATING_LAYER_ATTR as et } from "./dialogSurfaceScope.js";
13
+ var tt = /* @__PURE__ */ d('<h2 class="text-xs leading-none font-medium truncate select-none">'), nt = /* @__PURE__ */ d('<div data-floe-floating-window-header-actions=true class="flex shrink-0 cursor-default items-center gap-1"><span aria-hidden=true class="mx-2 h-4 w-px shrink-0 bg-border">'), it = /* @__PURE__ */ d('<div data-floe-floating-window-footer=true class="flex items-center justify-end gap-2 p-3 border-t border-border">'), ot = /* @__PURE__ */ d("<div data-floe-floating-window-resize-handle=n style=touch-action:none>"), rt = /* @__PURE__ */ d("<div data-floe-floating-window-resize-handle=s style=touch-action:none>"), lt = /* @__PURE__ */ d("<div data-floe-floating-window-resize-handle=e style=touch-action:none>"), at = /* @__PURE__ */ d("<div data-floe-floating-window-resize-handle=w style=touch-action:none>"), st = /* @__PURE__ */ d("<div data-floe-floating-window-resize-handle=ne style=touch-action:none>"), dt = /* @__PURE__ */ d("<div data-floe-floating-window-resize-handle=nw style=touch-action:none>"), ut = /* @__PURE__ */ d("<div data-floe-floating-window-resize-handle=se style=touch-action:none>"), ct = /* @__PURE__ */ d("<div data-floe-floating-window-resize-handle=sw style=touch-action:none>"), ft = /* @__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 px-2"></div><div class="flex h-full shrink-0 items-stretch"></div></div><div data-floe-floating-window-content=true class="flex-1 overflow-auto p-3">');
14
14
  function St(i) {
15
- const B = () => i.resizable ?? !0, G = () => i.draggable ?? !0, k = () => i.minSize ?? {
15
+ const G = () => i.resizable ?? !0, j = () => i.draggable ?? !0, M = () => i.minSize ?? {
16
16
  width: 200,
17
17
  height: 150
18
18
  }, T = () => i.maxSize ?? {
19
19
  width: 1 / 0,
20
20
  height: 1 / 0
21
- }, x = () => i.viewportInsets ?? {}, pe = () => i.zIndex ?? 100, xe = He(), ze = Ue(), $ = () => ze.isMobile(), D = 16, j = () => `floating-window-${xe}-title`, [W, ye] = p(i.defaultPosition ?? {
21
+ }, z = () => i.viewportInsets ?? {}, pe = () => i.zIndex ?? 100, xe = Ye(), ze = qe(), _ = () => ze.isMobile(), D = 16, V = () => `floating-window-${xe}-title`, [W, ye] = p(i.defaultPosition ?? {
22
22
  x: 0,
23
23
  y: 0
24
24
  }), [O, be] = p(i.defaultSize ?? {
25
25
  width: 400,
26
26
  height: 300
27
- }), [d, V] = p(!1), [R, Z] = p(!1), [E, J] = p(!1), [Se, H] = p(!1), _ = Je({
27
+ }), [u, Z] = p(!1), [R, J] = p(!1), [E, K] = p(!1), [$e, H] = p(!1), S = Ke({
28
28
  open: () => i.open,
29
29
  exitDurationMs: 120
30
- }), [$e, _e] = p(null);
31
- let K = {
30
+ }), [_e, Se] = p(null);
31
+ let Q = {
32
32
  x: 0,
33
33
  y: 0
34
- }, Q = {
34
+ }, ee = {
35
35
  x: 0,
36
36
  y: 0,
37
37
  width: 0,
38
38
  height: 0
39
- }, ee = {
39
+ }, te = {
40
40
  x: 0,
41
41
  y: 0
42
- }, te = {
42
+ }, ne = {
43
43
  x: 0,
44
44
  y: 0,
45
45
  width: 0,
46
46
  height: 0
47
- }, ne = "se", l, s = null, C, v = null, I = {
47
+ }, ie = "se", l, s = null, A, v = null, I = {
48
48
  x: 0,
49
49
  y: 0
50
- }, z = null, A = null, Y = !1, y = {
50
+ }, y = null, C = null, Y = !1, b = {
51
51
  x: i.defaultPosition?.x ?? 0,
52
52
  y: i.defaultPosition?.y ?? 0,
53
53
  width: i.defaultSize?.width ?? 400,
@@ -64,16 +64,16 @@ function St(i) {
64
64
  sw: "nesw-resize"
65
65
  }, N = (e, t) => {
66
66
  if (!e) {
67
- A?.(), A = null;
67
+ C?.(), C = null;
68
68
  return;
69
69
  }
70
- A?.(), A = je({
70
+ C?.(), C = Ve({
71
71
  kind: v === "resize" ? "resize" : "drag",
72
72
  cursor: t,
73
73
  lockUserSelect: !0
74
74
  });
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`);
75
+ }, oe = (e) => {
76
+ b = 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
77
  }, X = () => {
78
78
  const e = W(), t = O();
79
79
  return {
@@ -83,7 +83,7 @@ function St(i) {
83
83
  height: t.height
84
84
  };
85
85
  }, P = (e) => {
86
- y = e, ye((t) => t.x === e.x && t.y === e.y ? t : {
86
+ b = e, ye((t) => t.x === e.x && t.y === e.y ? t : {
87
87
  x: e.x,
88
88
  y: e.y
89
89
  }), be((t) => t.width === e.width && t.height === e.height ? t : {
@@ -101,9 +101,9 @@ function St(i) {
101
101
  const t = e instanceof Element ? e : null;
102
102
  return t ? t.closest('button, input, select, textarea, a, [role="button"], [tabindex]:not([tabindex="-1"])') === null : !0;
103
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"]`);
104
+ const r = (e instanceof Element ? e : null)?.closest('[role="menu"]')?.closest(`[${et}="true"]`);
105
105
  return !!(r && l?.contains(r));
106
- }, Ce = () => {
106
+ }, Ae = () => {
107
107
  if (!l) return null;
108
108
  const e = l.getBoundingClientRect();
109
109
  return {
@@ -112,23 +112,23 @@ function St(i) {
112
112
  width: e.width,
113
113
  height: e.height
114
114
  };
115
- }, oe = () => {
116
- i.open && (s === null || v === null || typeof window > "u" || ie(Ze({
115
+ }, re = () => {
116
+ i.open && (s === null || v === null || typeof window > "u" || oe(Je({
117
117
  mode: v,
118
118
  pointer: I,
119
- dragStartPos: K,
120
- dragStartRect: Q,
121
- resizeStartPos: ee,
122
- resizeStartRect: te,
123
- resizeHandle: ne,
124
- minSize: k(),
119
+ dragStartPos: Q,
120
+ dragStartRect: ee,
121
+ resizeStartPos: te,
122
+ resizeStartRect: ne,
123
+ resizeHandle: ie,
124
+ minSize: M(),
125
125
  maxSize: T(),
126
126
  viewport: {
127
127
  width: window.innerWidth,
128
128
  height: window.innerHeight
129
129
  },
130
- viewportInsets: x(),
131
- mobile: $(),
130
+ viewportInsets: z(),
131
+ mobile: _(),
132
132
  mobilePadding: D
133
133
  })));
134
134
  }, F = (e) => {
@@ -137,32 +137,32 @@ function St(i) {
137
137
  width: window.innerWidth,
138
138
  height: window.innerHeight
139
139
  };
140
- if (d()) {
141
- P(ge(t, x()));
140
+ if (u()) {
141
+ P(ge(t, z()));
142
142
  return;
143
143
  }
144
144
  P(me({
145
145
  rect: X(),
146
- minSize: k(),
146
+ minSize: M(),
147
147
  maxSize: T(),
148
148
  viewport: t,
149
- viewportInsets: x(),
150
- mobile: $(),
149
+ viewportInsets: z(),
150
+ mobile: _(),
151
151
  mobilePadding: D,
152
152
  center: e?.center ?? !1
153
153
  }));
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;
154
+ }, le = (e) => {
155
+ y !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(y), y = null), e && re();
156
+ const t = e ? Ae() ?? b : null;
157
+ Xe(() => {
158
+ t && P(t), s = null, v = null, J(!1), K(!1);
159
+ }), N(!1, ""), A = void 0;
160
160
  }, q = (e = !1) => {
161
- C ? C.stop({
161
+ A ? A.stop({
162
162
  commit: e
163
- }) : re(e);
163
+ }) : le(e);
164
164
  };
165
- L(() => q(!1)), Ye(() => {
165
+ L(() => q(!1)), Ne(() => {
166
166
  i.open || F({
167
167
  center: !i.defaultPosition
168
168
  });
@@ -172,9 +172,9 @@ function St(i) {
172
172
  });
173
173
  };
174
174
  window.addEventListener("resize", e), L(() => window.removeEventListener("resize", e));
175
- }), b(() => {
175
+ }), $(() => {
176
176
  if (!i.open) return;
177
- $();
177
+ _();
178
178
  const e = !Y && !i.defaultPosition, t = () => {
179
179
  F({
180
180
  center: e
@@ -185,11 +185,11 @@ function St(i) {
185
185
  return;
186
186
  }
187
187
  requestAnimationFrame(t);
188
- }), b(() => {
189
- !i.open || !Y || s !== null || (x(), Xe(() => F({
188
+ }), $(() => {
189
+ !i.open || !Y || s !== null || (z(), Ue(() => F({
190
190
  center: !1
191
191
  })));
192
- }), b(() => {
192
+ }), $(() => {
193
193
  if (!i.open) return;
194
194
  const e = (t) => {
195
195
  if (t.key !== "Escape") return;
@@ -197,13 +197,13 @@ function St(i) {
197
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
199
  document.addEventListener("keydown", e, !0), L(() => document.removeEventListener("keydown", e, !0));
200
- }), b(() => {
200
+ }), $(() => {
201
201
  if (!i.open) {
202
202
  H(!1), q(!1);
203
203
  return;
204
204
  }
205
205
  H(!0);
206
- }), b(() => {
206
+ }), $(() => {
207
207
  if (!i.open) return;
208
208
  const e = (r) => {
209
209
  H(U(r));
@@ -215,46 +215,46 @@ function St(i) {
215
215
  document.addEventListener("pointerdown", t), document.addEventListener("focusin", o), L(() => {
216
216
  document.removeEventListener("pointerdown", t), document.removeEventListener("focusin", o);
217
217
  });
218
- }), b(() => {
218
+ }), $(() => {
219
219
  if (!i.open) return;
220
220
  const e = X();
221
- s === null ? ie(e) : y = e;
221
+ s === null ? oe(e) : b = e;
222
222
  });
223
- const Ae = (e) => {
224
- !G() || d() || 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 = {
223
+ const Ce = (e) => {
224
+ !j() || u() || s !== null || e.pointerType === "mouse" && e.button !== 0 || e.target?.closest('button, input, select, textarea, a, [role="button"], [data-floe-floating-window-header-actions]') || (e.preventDefault(), s = e.pointerId, v = "drag", J(!0), Q = {
225
225
  x: e.clientX,
226
226
  y: e.clientY
227
- }, Q = {
228
- ...y
227
+ }, ee = {
228
+ ...b
229
229
  }, I = {
230
230
  x: e.clientX,
231
231
  y: e.clientY
232
232
  }, N(!0, "grabbing"), se(e));
233
233
  }, w = (e) => (t) => {
234
- !B() || d() || s !== null || t.pointerType === "mouse" && t.button !== 0 || (t.preventDefault(), t.stopPropagation(), s = t.pointerId, v = "resize", J(!0), ne = e, ee = {
234
+ !G() || u() || s !== null || t.pointerType === "mouse" && t.button !== 0 || (t.preventDefault(), t.stopPropagation(), s = t.pointerId, v = "resize", K(!0), ie = e, te = {
235
235
  x: t.clientX,
236
236
  y: t.clientY
237
- }, te = {
238
- ...y
237
+ }, ne = {
238
+ ...b
239
239
  }, I = {
240
240
  x: t.clientX,
241
241
  y: t.clientY
242
242
  }, N(!0, Ie[e]), se(t));
243
- }, le = () => {
244
- z = null, oe();
243
+ }, ae = () => {
244
+ y = null, re();
245
245
  }, Fe = (e) => {
246
246
  if (!(s === null || e.pointerId !== s) && v !== null && (I = {
247
247
  x: e.clientX,
248
248
  y: e.clientY
249
- }, z === null)) {
249
+ }, y === null)) {
250
250
  if (typeof requestAnimationFrame > "u") {
251
- le();
251
+ ae();
252
252
  return;
253
253
  }
254
- z = requestAnimationFrame(le);
254
+ y = requestAnimationFrame(ae);
255
255
  }
256
256
  }, se = (e) => {
257
- C = Ve({
257
+ A = Ze({
258
258
  pointerEvent: e,
259
259
  captureEl: l,
260
260
  onMove: Fe,
@@ -266,12 +266,12 @@ function St(i) {
266
266
  I = {
267
267
  x: r.latestClientX,
268
268
  y: r.latestClientY
269
- }, re(t || o === "pointer_cancel");
269
+ }, le(t || o === "pointer_cancel");
270
270
  }
271
271
  });
272
- }, ae = () => {
273
- if (s !== null && q(!0), d()) {
274
- const t = $e();
272
+ }, de = () => {
273
+ if (s !== null && q(!0), u()) {
274
+ const t = _e();
275
275
  t && P(me({
276
276
  rect: {
277
277
  x: t.position.x,
@@ -279,21 +279,21 @@ function St(i) {
279
279
  width: t.size.width,
280
280
  height: t.size.height
281
281
  },
282
- minSize: k(),
282
+ minSize: M(),
283
283
  maxSize: T(),
284
284
  viewport: {
285
285
  width: window.innerWidth,
286
286
  height: window.innerHeight
287
287
  },
288
- viewportInsets: x(),
289
- mobile: $(),
288
+ viewportInsets: z(),
289
+ mobile: _(),
290
290
  mobilePadding: D,
291
291
  center: !1
292
- })), V(!1);
292
+ })), Z(!1);
293
293
  return;
294
294
  }
295
295
  const e = X();
296
- _e({
296
+ Se({
297
297
  position: {
298
298
  x: e.x,
299
299
  y: e.y
@@ -305,12 +305,12 @@ function St(i) {
305
305
  }), P(ge({
306
306
  width: window.innerWidth,
307
307
  height: window.innerHeight
308
- }, x())), V(!0);
308
+ }, z())), Z(!0);
309
309
  }, Le = (e) => {
310
- e.target?.closest("button") || ae();
311
- }, Me = (e) => {
310
+ e.target?.closest("button, [data-floe-floating-window-header-actions]") || de();
311
+ }, ke = (e) => {
312
312
  Re(e.target) && Pe();
313
- }, h = (e) => M("absolute z-10", {
313
+ }, g = (e) => k("absolute z-10", {
314
314
  n: "cursor-ns-resize top-0 left-2 right-2 h-1",
315
315
  s: "cursor-ns-resize bottom-0 left-2 right-2 h-1",
316
316
  e: "cursor-ew-resize right-0 top-2 bottom-2 w-1",
@@ -320,26 +320,26 @@ function St(i) {
320
320
  se: "cursor-nwse-resize bottom-0 right-0 w-2 h-2",
321
321
  sw: "cursor-nesw-resize bottom-0 left-0 w-2 h-2"
322
322
  }[e]);
323
- return a(S, {
323
+ return a(x, {
324
324
  get when() {
325
- return _.mounted();
325
+ return S.mounted();
326
326
  },
327
327
  get children() {
328
- return a(Te, {
328
+ return a(De, {
329
329
  get children() {
330
- var e = ut(), t = e.firstChild, o = t.firstChild, r = o.firstChild, de = r.nextSibling, ke = o.nextSibling, ue = l;
331
- return typeof ue == "function" ? We(ue, e) : l = e, ce(e, fe({
330
+ var e = ft(), t = e.firstChild, o = t.firstChild, r = o.firstChild, B = r.nextSibling, Me = o.nextSibling, ue = l;
331
+ return typeof ue == "function" ? Oe(ue, e) : l = e, ce(e, fe({
332
332
  get "data-floating-presence"() {
333
- return _.state();
333
+ return S.state();
334
334
  },
335
335
  get "aria-hidden"() {
336
- return _.exiting() ? "true" : void 0;
336
+ return S.exiting() ? "true" : void 0;
337
337
  }
338
338
  }, {
339
339
  [ve]: "true"
340
340
  }, {
341
341
  get class() {
342
- return M("fixed left-0 top-0 z-[100] flex flex-col", (R() || E()) && "select-none", _.exiting() && "pointer-events-none");
342
+ return k("fixed left-0 top-0 z-[100] flex flex-col", (R() || E()) && "select-none", S.exiting() && "pointer-events-none");
343
343
  },
344
344
  get style() {
345
345
  return {
@@ -352,12 +352,12 @@ function St(i) {
352
352
  },
353
353
  role: "dialog",
354
354
  get "aria-labelledby"() {
355
- return we(() => !!i.title)() ? j() : void 0;
355
+ return he(() => !!i.title)() ? V() : void 0;
356
356
  },
357
357
  tabIndex: -1,
358
- onPointerDown: Me
358
+ onPointerDown: ke
359
359
  }), !1, !0), ce(t, fe({
360
- [Ke]: "true"
360
+ [Qe]: "true"
361
361
  }, {
362
362
  "data-floe-floating-window-surface": "true",
363
363
  "data-floe-surface": "floating",
@@ -365,59 +365,67 @@ function St(i) {
365
365
  return R() || E() ? "true" : void 0;
366
366
  },
367
367
  get "data-floe-floating-window-state"() {
368
- return Se() ? "active" : "inactive";
368
+ return $e() ? "active" : "inactive";
369
369
  }
370
370
  }, {
371
371
  [ve]: "true"
372
372
  }, {
373
373
  get 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", d() && "rounded-none", i.class);
374
+ return k("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);
375
375
  },
376
376
  get style() {
377
377
  return {
378
- "border-radius": d() ? "0" : "10px"
378
+ "border-radius": u() ? "0" : "10px"
379
379
  };
380
380
  },
381
381
  get "data-floating-presence"() {
382
- return _.state();
382
+ return S.state();
383
383
  }
384
- }), !1, !0), o.$$dblclick = Le, o.$$pointerdown = Ae, g(r, a(S, {
384
+ }), !1, !0), o.$$dblclick = Le, o.$$pointerdown = Ce, c(r, a(x, {
385
385
  get when() {
386
386
  return i.title;
387
387
  },
388
388
  get children() {
389
- var n = et();
390
- return g(n, () => i.title), c(() => De(n, "id", j())), n;
389
+ var n = tt();
390
+ return c(n, () => i.title), f(() => We(n, "id", V())), n;
391
+ }
392
+ })), c(o, a(x, {
393
+ get when() {
394
+ return i.headerActions;
395
+ },
396
+ get children() {
397
+ var n = nt(), Te = n.firstChild;
398
+ return c(n, () => i.headerActions, Te), n;
391
399
  }
392
- })), g(de, a(he, {
400
+ }), B), c(B, a(we, {
393
401
  variant: "ghost",
394
402
  size: "icon",
395
403
  "data-floe-floating-window-control": "maximize",
396
404
  class: "h-full w-9 shrink-0 rounded-none border-0 px-0 active:scale-100",
397
405
  onClick: (n) => {
398
- n.stopPropagation(), ae();
406
+ n.stopPropagation(), de();
399
407
  },
400
408
  get "aria-label"() {
401
- return d() ? "Restore" : "Maximize";
409
+ return u() ? "Restore" : "Maximize";
402
410
  },
403
411
  get children() {
404
- return a(S, {
412
+ return a(x, {
405
413
  get when() {
406
- return d();
414
+ return u();
407
415
  },
408
416
  get fallback() {
409
- return a(Be, {
417
+ return a(Ge, {
410
418
  class: "w-3 h-3"
411
419
  });
412
420
  },
413
421
  get children() {
414
- return a(qe, {
422
+ return a(Be, {
415
423
  class: "w-3 h-3"
416
424
  });
417
425
  }
418
426
  });
419
427
  }
420
- }), null), g(de, a(he, {
428
+ }), null), c(B, a(we, {
421
429
  variant: "ghost-destructive",
422
430
  size: "icon",
423
431
  "data-floe-floating-window-control": "close",
@@ -427,63 +435,63 @@ function St(i) {
427
435
  },
428
436
  "aria-label": "Close",
429
437
  get children() {
430
- return a(Ge, {
438
+ return a(je, {
431
439
  class: "w-3.5 h-3.5"
432
440
  });
433
441
  }
434
- }), null), g(ke, () => i.children), g(t, a(S, {
442
+ }), null), c(Me, () => i.children), c(t, a(x, {
435
443
  get when() {
436
444
  return i.footer;
437
445
  },
438
446
  get children() {
439
- var n = tt();
440
- return g(n, () => i.footer), n;
447
+ var n = it();
448
+ return c(n, () => i.footer), n;
441
449
  }
442
- }), null), g(t, a(S, {
450
+ }), null), c(t, a(x, {
443
451
  get when() {
444
- return we(() => !!B())() && !d();
452
+ return he(() => !!G())() && !u();
445
453
  },
446
454
  get children() {
447
455
  return [(() => {
448
- var n = nt();
449
- return m(n, "pointerdown", w("n"), !0), c(() => f(n, h("n"))), n;
456
+ var n = ot();
457
+ return m(n, "pointerdown", w("n"), !0), f(() => h(n, g("n"))), n;
450
458
  })(), (() => {
451
- var n = it();
452
- return m(n, "pointerdown", w("s"), !0), c(() => f(n, h("s"))), n;
453
- })(), a(S, {
459
+ var n = rt();
460
+ return m(n, "pointerdown", w("s"), !0), f(() => h(n, g("s"))), n;
461
+ })(), a(x, {
454
462
  get when() {
455
- return !$();
463
+ return !_();
456
464
  },
457
465
  get children() {
458
466
  return [(() => {
459
- var n = ot();
460
- return m(n, "pointerdown", w("e"), !0), c(() => f(n, h("e"))), n;
461
- })(), (() => {
462
- var n = rt();
463
- return m(n, "pointerdown", w("w"), !0), c(() => f(n, h("w"))), n;
464
- })(), (() => {
465
467
  var n = lt();
466
- return m(n, "pointerdown", w("ne"), !0), c(() => f(n, h("ne"))), n;
467
- })(), (() => {
468
- var n = st();
469
- return m(n, "pointerdown", w("nw"), !0), c(() => f(n, h("nw"))), n;
468
+ return m(n, "pointerdown", w("e"), !0), f(() => h(n, g("e"))), n;
470
469
  })(), (() => {
471
470
  var n = at();
472
- return m(n, "pointerdown", w("se"), !0), c(() => f(n, h("se"))), n;
471
+ return m(n, "pointerdown", w("w"), !0), f(() => h(n, g("w"))), n;
472
+ })(), (() => {
473
+ var n = st();
474
+ return m(n, "pointerdown", w("ne"), !0), f(() => h(n, g("ne"))), n;
473
475
  })(), (() => {
474
476
  var n = dt();
475
- return m(n, "pointerdown", w("sw"), !0), c(() => f(n, h("sw"))), n;
477
+ return m(n, "pointerdown", w("nw"), !0), f(() => h(n, g("nw"))), n;
478
+ })(), (() => {
479
+ var n = ut();
480
+ return m(n, "pointerdown", w("se"), !0), f(() => h(n, g("se"))), n;
481
+ })(), (() => {
482
+ var n = ct();
483
+ return m(n, "pointerdown", w("sw"), !0), f(() => h(n, g("sw"))), n;
476
484
  })()];
477
485
  }
478
486
  })];
479
487
  }
480
- }), null), c(() => f(o, M("flex shrink-0 items-center justify-between h-8", "border-b", d() ? "rounded-none" : "rounded-t-md", G() && !d() && "cursor-move"))), e;
488
+ }), null), f(() => h(o, k("flex shrink-0 items-center justify-between h-8", "border-b", u() ? "rounded-none" : "rounded-t-md", j() && !u() && "cursor-move"))), e;
481
489
  }
482
490
  });
483
491
  }
484
492
  });
485
493
  }
486
- Oe(["pointerdown", "dblclick"]);
494
+ He(["pointerdown", "dblclick"]);
487
495
  export {
488
496
  St as FloatingWindow
489
497
  };
@@ -0,0 +1,14 @@
1
+ import { type JSX } from 'solid-js';
2
+ import { type SurfaceFloatingLayerProps } from './SurfaceFloatingLayer';
3
+ export type SurfaceFloatingPanelHandleProps = Pick<JSX.ButtonHTMLAttributes<HTMLButtonElement>, 'onPointerDown' | 'onKeyDown' | 'style'> & {
4
+ 'oncapture:click': JSX.EventHandler<HTMLButtonElement, MouseEvent>;
5
+ };
6
+ export interface SurfaceFloatingPanelProps extends Omit<SurfaceFloatingLayerProps, 'position' | 'estimatedSize' | 'clamp' | 'children' | 'layerRef'> {
7
+ /** Spread these props on a dedicated grip or collapsed launcher button. */
8
+ children: (handle: SurfaceFloatingPanelHandleProps) => JSX.Element;
9
+ }
10
+ /** A draggable, bottom-end anchored panel using the shared surface portal boundary.
11
+ * Content owns its dimensions and collapsed presentation; the panel preserves its
12
+ * relative placement as either changes. Drag handles never intercept content input.
13
+ */
14
+ export declare function SurfaceFloatingPanel(props: SurfaceFloatingPanelProps): JSX.Element;