@floegence/floe-webapp-core 0.36.41 → 0.36.42

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,4 +1,5 @@
1
1
  import { type JSX } from 'solid-js';
2
+ import { type FloatingWindowViewportInsets } from './floatingWindowGeometry';
2
3
  export interface FloatingWindowProps {
3
4
  /** Whether the window is open */
4
5
  open: boolean;
@@ -30,6 +31,8 @@ export interface FloatingWindowProps {
30
31
  width: number;
31
32
  height: number;
32
33
  };
34
+ /** Safe area inside the browser viewport that the floating window should avoid */
35
+ viewportInsets?: FloatingWindowViewportInsets;
33
36
  /** Whether the window can be resized */
34
37
  resizable?: boolean;
35
38
  /** Whether the window can be dragged */
@@ -1,54 +1,54 @@
1
- import { createComponent as a, Portal as Ee, spread as ae, mergeProps as se, memo as de, insert as g, effect as u, setAttribute as Ae, addEventListener as m, className as c, template as s, use as Le, delegateEvents as Fe } from "solid-js/web";
2
- import { createUniqueId as Me, createSignal as v, onMount as De, onCleanup as O, createEffect as S, Show as y, batch as Te } from "solid-js";
3
- import { cn as R } from "../../utils/cn.js";
4
- import { useLayout as ke } from "../../context/LayoutContext.js";
5
- import { Button as ue } from "./Button.js";
6
- import { Restore as We, Maximize as Oe, X as He } from "../icons/index.js";
7
- import { startHotInteraction as Ue } from "../../utils/hotInteraction.js";
8
- import { normalizeFloatingWindowRect as ce, resolveFloatingWindowRect as Xe } from "./floatingWindowGeometry.js";
9
- import { LOCAL_INTERACTION_SURFACE_ATTR as fe } from "./localInteractionSurface.js";
10
- import { SURFACE_PORTAL_LAYER_ATTR as Ye } from "./dialogSurfaceScope.js";
11
- var qe = /* @__PURE__ */ s('<h2 class="text-sm font-medium truncate select-none">'), Ne = /* @__PURE__ */ s('<div class="flex items-center justify-end gap-2 p-3 border-t border-border">'), Be = /* @__PURE__ */ s("<div data-floe-floating-window-resize-handle=n style=touch-action:none>"), je = /* @__PURE__ */ s("<div data-floe-floating-window-resize-handle=s style=touch-action:none>"), Ge = /* @__PURE__ */ s("<div data-floe-floating-window-resize-handle=e style=touch-action:none>"), Ve = /* @__PURE__ */ s("<div data-floe-floating-window-resize-handle=w style=touch-action:none>"), Ze = /* @__PURE__ */ s("<div data-floe-floating-window-resize-handle=ne style=touch-action:none>"), Je = /* @__PURE__ */ s("<div data-floe-floating-window-resize-handle=nw style=touch-action:none>"), Ke = /* @__PURE__ */ s("<div data-floe-floating-window-resize-handle=se style=touch-action:none>"), Qe = /* @__PURE__ */ s("<div data-floe-floating-window-resize-handle=sw style=touch-action:none>"), et = /* @__PURE__ */ s('<div data-floe-geometry-surface=floating-window><div data-floe-dialog-surface-host=true><div data-floe-floating-window-titlebar=true style=touch-action:none><div class="flex-1 min-w-0"></div><div class="flex items-center gap-0.5 -mr-1"></div></div><div class="flex-1 overflow-auto p-3">');
12
- function ct(i) {
13
- const H = () => i.resizable ?? !0, U = () => i.draggable ?? !0, I = () => i.minSize ?? {
1
+ import { createComponent as s, Portal as Fe, spread as ae, mergeProps as de, memo as ue, insert as g, effect as u, setAttribute as Le, addEventListener as m, className as c, template as a, use as Me, delegateEvents as De } from "solid-js/web";
2
+ import { createUniqueId as Te, createSignal as p, onMount as We, onCleanup as U, createEffect as b, Show as P, batch as ke } from "solid-js";
3
+ import { cn as C } from "../../utils/cn.js";
4
+ import { useLayout as Oe } from "../../context/LayoutContext.js";
5
+ import { Button as ce } from "./Button.js";
6
+ import { Restore as He, Maximize as Ue, X as Xe } from "../icons/index.js";
7
+ import { startHotInteraction as Ye } from "../../utils/hotInteraction.js";
8
+ import { resolveFloatingWindowViewport as fe, normalizeFloatingWindowRect as he, resolveFloatingWindowRect as qe } from "./floatingWindowGeometry.js";
9
+ import { LOCAL_INTERACTION_SURFACE_ATTR as we } from "./localInteractionSurface.js";
10
+ import { SURFACE_PORTAL_LAYER_ATTR as Ne } from "./dialogSurfaceScope.js";
11
+ var Be = /* @__PURE__ */ a('<h2 class="text-sm font-medium truncate select-none">'), je = /* @__PURE__ */ a('<div class="flex items-center justify-end gap-2 p-3 border-t border-border">'), Ge = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=n style=touch-action:none>"), Ve = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=s style=touch-action:none>"), Ze = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=e style=touch-action:none>"), Je = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=w style=touch-action:none>"), Ke = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=ne style=touch-action:none>"), Qe = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=nw style=touch-action:none>"), et = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=se style=touch-action:none>"), tt = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=sw style=touch-action:none>"), nt = /* @__PURE__ */ a('<div data-floe-geometry-surface=floating-window><div data-floe-dialog-surface-host=true><div data-floe-floating-window-titlebar=true style=touch-action:none><div class="flex-1 min-w-0"></div><div class="flex items-center gap-0.5 -mr-1"></div></div><div class="flex-1 overflow-auto p-3">');
12
+ function ht(i) {
13
+ const X = () => i.resizable ?? !0, Y = () => i.draggable ?? !0, E = () => i.minSize ?? {
14
14
  width: 200,
15
15
  height: 150
16
- }, C = () => i.maxSize ?? {
16
+ }, A = () => i.maxSize ?? {
17
17
  width: 1 / 0,
18
18
  height: 1 / 0
19
- }, he = () => i.zIndex ?? 100, we = Me(), ge = ke(), b = () => ge.isMobile(), E = 16, X = () => `floating-window-${we}-title`, [A, me] = v(i.defaultPosition ?? {
19
+ }, z = () => i.viewportInsets ?? {}, ge = () => i.zIndex ?? 100, me = Te(), ve = Oe(), $ = () => ve.isMobile(), F = 16, q = () => `floating-window-${me}-title`, [L, pe] = p(i.defaultPosition ?? {
20
20
  x: 0,
21
21
  y: 0
22
- }), [L, pe] = v(i.defaultSize ?? {
22
+ }), [M, ze] = p(i.defaultSize ?? {
23
23
  width: 400,
24
24
  height: 300
25
- }), [d, Y] = v(!1), [q, N] = v(!1), [B, j] = v(!1), [ve, F] = v(!1), [xe, ze] = v(null);
26
- let G = {
25
+ }), [d, N] = p(!1), [B, j] = p(!1), [G, V] = p(!1), [xe, D] = p(!1), [ye, be] = p(null);
26
+ let Z = {
27
27
  x: 0,
28
28
  y: 0
29
- }, V = {
29
+ }, J = {
30
30
  x: 0,
31
31
  y: 0,
32
32
  width: 0,
33
33
  height: 0
34
- }, Z = {
34
+ }, K = {
35
35
  x: 0,
36
36
  y: 0
37
- }, J = {
37
+ }, Q = {
38
38
  x: 0,
39
39
  y: 0,
40
40
  width: 0,
41
41
  height: 0
42
- }, K = "se", r, l = null, p = null, P = {
42
+ }, ee = "se", r, o = null, v = null, I = {
43
43
  x: 0,
44
44
  y: 0
45
- }, x = null, _ = null, Q = !1, z = {
45
+ }, x = null, _ = null, T = !1, y = {
46
46
  x: i.defaultPosition?.x ?? 0,
47
47
  y: i.defaultPosition?.y ?? 0,
48
48
  width: i.defaultSize?.width ?? 400,
49
49
  height: i.defaultSize?.height ?? 300
50
50
  };
51
- const ye = {
51
+ const Pe = {
52
52
  n: "ns-resize",
53
53
  s: "ns-resize",
54
54
  e: "ew-resize",
@@ -57,45 +57,45 @@ function ct(i) {
57
57
  nw: "nwse-resize",
58
58
  se: "nwse-resize",
59
59
  sw: "nesw-resize"
60
- }, M = (e, t) => {
60
+ }, W = (e, t) => {
61
61
  if (!e) {
62
62
  _?.(), _ = null;
63
63
  return;
64
64
  }
65
- _?.(), _ = Ue({
66
- kind: p === "resize" ? "resize" : "drag",
65
+ _?.(), _ = Ye({
66
+ kind: v === "resize" ? "resize" : "drag",
67
67
  cursor: t,
68
68
  lockUserSelect: !0
69
69
  });
70
- }, ee = (e) => {
71
- z = 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`);
72
- }, D = () => {
73
- const e = A(), t = L();
70
+ }, te = (e) => {
71
+ 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`);
72
+ }, k = () => {
73
+ const e = L(), t = M();
74
74
  return {
75
75
  x: e.x,
76
76
  y: e.y,
77
77
  width: t.width,
78
78
  height: t.height
79
79
  };
80
- }, $ = (e) => {
81
- z = e, me({
80
+ }, S = (e) => {
81
+ y = e, pe({
82
82
  x: e.x,
83
83
  y: e.y
84
- }), pe({
84
+ }), ze({
85
85
  width: e.width,
86
86
  height: e.height
87
87
  });
88
- }, be = () => {
88
+ }, $e = () => {
89
89
  try {
90
90
  r?.focus({
91
91
  preventScroll: !0
92
92
  });
93
93
  } catch {
94
94
  }
95
- }, Pe = (e) => {
95
+ }, Ie = (e) => {
96
96
  const t = e instanceof Element ? e : null;
97
97
  return t ? t.closest('button, input, select, textarea, a, [role="button"], [tabindex]:not([tabindex="-1"])') === null : !0;
98
- }, T = (e) => !!r && e instanceof Node && r.contains(e), $e = () => {
98
+ }, O = (e) => !!r && e instanceof Node && r.contains(e), Se = () => {
99
99
  if (!r) return null;
100
100
  const e = r.getBoundingClientRect();
101
101
  return {
@@ -104,176 +104,178 @@ function ct(i) {
104
104
  width: e.width,
105
105
  height: e.height
106
106
  };
107
- }, te = () => {
108
- i.open && (l === null || p === null || typeof window > "u" || ee(Xe({
109
- mode: p,
110
- pointer: P,
111
- dragStartPos: G,
112
- dragStartRect: V,
113
- resizeStartPos: Z,
114
- resizeStartRect: J,
115
- resizeHandle: K,
116
- minSize: I(),
117
- maxSize: C(),
107
+ }, ne = () => {
108
+ i.open && (o === null || v === null || typeof window > "u" || te(qe({
109
+ mode: v,
110
+ pointer: I,
111
+ dragStartPos: Z,
112
+ dragStartRect: J,
113
+ resizeStartPos: K,
114
+ resizeStartRect: Q,
115
+ resizeHandle: ee,
116
+ minSize: E(),
117
+ maxSize: A(),
118
118
  viewport: {
119
119
  width: window.innerWidth,
120
120
  height: window.innerHeight
121
121
  },
122
- mobile: b(),
123
- mobilePadding: E
122
+ viewportInsets: z(),
123
+ mobile: $(),
124
+ mobilePadding: F
124
125
  })));
125
- }, k = (e) => {
126
+ }, R = (e) => {
126
127
  if (typeof window > "u") return;
127
128
  const t = {
128
129
  width: window.innerWidth,
129
130
  height: window.innerHeight
130
131
  };
131
132
  if (d()) {
132
- $({
133
- x: 0,
134
- y: 0,
135
- width: t.width,
136
- height: t.height
137
- });
133
+ S(fe(t, z()));
138
134
  return;
139
135
  }
140
- $(ce({
141
- rect: D(),
142
- minSize: I(),
143
- maxSize: C(),
136
+ S(he({
137
+ rect: k(),
138
+ minSize: E(),
139
+ maxSize: A(),
144
140
  viewport: t,
145
- mobile: b(),
146
- mobilePadding: E,
141
+ viewportInsets: z(),
142
+ mobile: $(),
143
+ mobilePadding: F,
147
144
  center: e?.center ?? !1
148
145
  }));
149
- }, W = (e, t = !0) => {
150
- x !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(x), x = null), t && te();
151
- const o = t ? $e() ?? z : null;
146
+ }, H = (e, t = !0) => {
147
+ x !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(x), x = null), t && ne();
148
+ const l = t ? Se() ?? y : null;
152
149
  if (e !== void 0)
153
150
  try {
154
151
  typeof r?.releasePointerCapture == "function" && r.releasePointerCapture(e);
155
152
  } catch {
156
153
  }
157
- Te(() => {
158
- o && $(o), l = null, p = null, N(!1), j(!1);
159
- }), M(!1, "");
154
+ ke(() => {
155
+ l && S(l), o = null, v = null, j(!1), V(!1);
156
+ }), W(!1, "");
160
157
  };
161
- De(() => {
162
- i.open || k({
158
+ We(() => {
159
+ i.open || R({
163
160
  center: !i.defaultPosition
164
161
  });
165
162
  const e = () => {
166
- l === null && k({
163
+ o === null && R({
167
164
  center: !1
168
165
  });
169
166
  };
170
- window.addEventListener("resize", e), O(() => window.removeEventListener("resize", e));
171
- }), S(() => {
167
+ window.addEventListener("resize", e), U(() => window.removeEventListener("resize", e));
168
+ }), b(() => {
172
169
  if (!i.open) return;
173
- b();
174
- const e = !Q && !i.defaultPosition, t = () => {
175
- k({
170
+ $();
171
+ const e = !T && !i.defaultPosition, t = () => {
172
+ R({
176
173
  center: e
177
- }), Q = !0;
174
+ }), T = !0;
178
175
  };
179
176
  if (typeof requestAnimationFrame > "u") {
180
177
  t();
181
178
  return;
182
179
  }
183
180
  requestAnimationFrame(t);
184
- }), S(() => {
181
+ }), b(() => {
182
+ !i.open || !T || o !== null || (z(), R({
183
+ center: !1
184
+ }));
185
+ }), b(() => {
185
186
  if (!i.open) return;
186
187
  const e = (t) => {
187
188
  if (t.key !== "Escape") return;
188
- const o = typeof document < "u" ? document.activeElement : null;
189
- !T(t.target) && !T(o) || (t.preventDefault(), typeof t.stopImmediatePropagation == "function" ? t.stopImmediatePropagation() : t.stopPropagation(), i.onOpenChange(!1));
189
+ const l = typeof document < "u" ? document.activeElement : null;
190
+ !O(t.target) && !O(l) || (t.preventDefault(), typeof t.stopImmediatePropagation == "function" ? t.stopImmediatePropagation() : t.stopPropagation(), i.onOpenChange(!1));
190
191
  };
191
- document.addEventListener("keydown", e, !0), O(() => document.removeEventListener("keydown", e, !0));
192
- }), S(() => {
192
+ document.addEventListener("keydown", e, !0), U(() => document.removeEventListener("keydown", e, !0));
193
+ }), b(() => {
193
194
  if (!i.open) {
194
- F(!1), W(l ?? void 0, !1);
195
+ D(!1), H(o ?? void 0, !1);
195
196
  return;
196
197
  }
197
- F(!0);
198
- }), S(() => {
198
+ D(!0);
199
+ }), b(() => {
199
200
  if (!i.open) return;
200
201
  const e = (w) => {
201
- F(T(w));
202
+ D(O(w));
202
203
  }, t = (w) => {
203
204
  e(w.target);
204
- }, o = (w) => {
205
+ }, l = (w) => {
205
206
  e(w.target);
206
207
  };
207
- document.addEventListener("pointerdown", t), document.addEventListener("focusin", o), O(() => {
208
- document.removeEventListener("pointerdown", t), document.removeEventListener("focusin", o);
208
+ document.addEventListener("pointerdown", t), document.addEventListener("focusin", l), U(() => {
209
+ document.removeEventListener("pointerdown", t), document.removeEventListener("focusin", l);
209
210
  });
210
- }), S(() => {
211
+ }), b(() => {
211
212
  if (!i.open) return;
212
- const e = D();
213
- l === null ? ee(e) : z = e;
213
+ const e = k();
214
+ o === null ? te(e) : y = e;
214
215
  });
215
- const Se = (e) => {
216
- !U() || d() || e.pointerType === "mouse" && e.button !== 0 || e.target?.closest('button, input, select, textarea, a, [role="button"]') || (e.preventDefault(), l = e.pointerId, p = "drag", N(!0), G = {
216
+ const _e = (e) => {
217
+ !Y() || d() || e.pointerType === "mouse" && e.button !== 0 || e.target?.closest('button, input, select, textarea, a, [role="button"]') || (e.preventDefault(), o = e.pointerId, v = "drag", j(!0), Z = {
217
218
  x: e.clientX,
218
219
  y: e.clientY
219
- }, V = {
220
- ...z
221
- }, P = {
220
+ }, J = {
221
+ ...y
222
+ }, I = {
222
223
  x: e.clientX,
223
224
  y: e.clientY
224
- }, M(!0, "grabbing"), typeof r?.setPointerCapture == "function" && r.setPointerCapture(e.pointerId));
225
+ }, W(!0, "grabbing"), typeof r?.setPointerCapture == "function" && r.setPointerCapture(e.pointerId));
225
226
  }, f = (e) => (t) => {
226
- !H() || d() || t.pointerType === "mouse" && t.button !== 0 || (t.preventDefault(), t.stopPropagation(), l = t.pointerId, p = "resize", j(!0), K = e, Z = {
227
+ !X() || d() || t.pointerType === "mouse" && t.button !== 0 || (t.preventDefault(), t.stopPropagation(), o = t.pointerId, v = "resize", V(!0), ee = e, K = {
227
228
  x: t.clientX,
228
229
  y: t.clientY
229
- }, J = {
230
- ...z
231
- }, P = {
230
+ }, Q = {
231
+ ...y
232
+ }, I = {
232
233
  x: t.clientX,
233
234
  y: t.clientY
234
- }, M(!0, ye[e]), typeof r?.setPointerCapture == "function" && r.setPointerCapture(t.pointerId));
235
- }, ne = () => {
236
- x = null, te();
237
- }, _e = (e) => {
238
- if (!(l === null || e.pointerId !== l) && p !== null && (P = {
235
+ }, W(!0, Pe[e]), typeof r?.setPointerCapture == "function" && r.setPointerCapture(t.pointerId));
236
+ }, ie = () => {
237
+ x = null, ne();
238
+ }, Re = (e) => {
239
+ if (!(o === null || e.pointerId !== o) && v !== null && (I = {
239
240
  x: e.clientX,
240
241
  y: e.clientY
241
242
  }, x === null)) {
242
243
  if (typeof requestAnimationFrame > "u") {
243
- ne();
244
+ ie();
244
245
  return;
245
246
  }
246
- x = requestAnimationFrame(ne);
247
+ x = requestAnimationFrame(ie);
247
248
  }
248
- }, ie = (e) => {
249
- l === null || e.pointerId !== l || (P = {
249
+ }, re = (e) => {
250
+ o === null || e.pointerId !== o || (I = {
250
251
  x: e.clientX,
251
252
  y: e.clientY
252
- }, W(e.pointerId));
253
- }, re = () => {
254
- if (l !== null && W(l, !0), d()) {
255
- const t = xe();
256
- t && $(ce({
253
+ }, H(e.pointerId));
254
+ }, oe = () => {
255
+ if (o !== null && H(o, !0), d()) {
256
+ const t = ye();
257
+ t && S(he({
257
258
  rect: {
258
259
  x: t.position.x,
259
260
  y: t.position.y,
260
261
  width: t.size.width,
261
262
  height: t.size.height
262
263
  },
263
- minSize: I(),
264
- maxSize: C(),
264
+ minSize: E(),
265
+ maxSize: A(),
265
266
  viewport: {
266
267
  width: window.innerWidth,
267
268
  height: window.innerHeight
268
269
  },
269
- mobile: b(),
270
- mobilePadding: E,
270
+ viewportInsets: z(),
271
+ mobile: $(),
272
+ mobilePadding: F,
271
273
  center: !1
272
- })), Y(!1);
274
+ })), N(!1);
273
275
  return;
274
276
  }
275
- const e = D();
276
- ze({
277
+ const e = k();
278
+ be({
277
279
  position: {
278
280
  x: e.x,
279
281
  y: e.y
@@ -282,17 +284,15 @@ function ct(i) {
282
284
  width: e.width,
283
285
  height: e.height
284
286
  }
285
- }), $({
286
- x: 0,
287
- y: 0,
287
+ }), S(fe({
288
288
  width: window.innerWidth,
289
289
  height: window.innerHeight
290
- }), Y(!0);
291
- }, Re = () => {
292
- re();
293
- }, Ie = (e) => {
294
- Pe(e.target) && be();
295
- }, h = (e) => R("absolute z-10", {
290
+ }, z())), N(!0);
291
+ }, Ce = () => {
292
+ oe();
293
+ }, Ee = (e) => {
294
+ Ie(e.target) && $e();
295
+ }, h = (e) => C("absolute z-10", {
296
296
  n: "cursor-ns-resize top-0 left-2 right-2 h-1",
297
297
  s: "cursor-ns-resize bottom-0 left-2 right-2 h-1",
298
298
  e: "cursor-ew-resize right-0 top-2 bottom-2 w-1",
@@ -302,87 +302,87 @@ function ct(i) {
302
302
  se: "cursor-nwse-resize bottom-0 right-0 w-2 h-2",
303
303
  sw: "cursor-nesw-resize bottom-0 left-0 w-2 h-2"
304
304
  }[e]);
305
- return a(y, {
305
+ return s(P, {
306
306
  get when() {
307
307
  return i.open;
308
308
  },
309
309
  get children() {
310
- return a(Ee, {
310
+ return s(Fe, {
311
311
  get children() {
312
- var e = et(), t = e.firstChild, o = t.firstChild, w = o.firstChild, oe = w.nextSibling, Ce = o.nextSibling, le = r;
313
- return typeof le == "function" ? Le(le, e) : r = e, ae(e, se({
314
- [fe]: "true"
312
+ var e = nt(), t = e.firstChild, l = t.firstChild, w = l.firstChild, le = w.nextSibling, Ae = l.nextSibling, se = r;
313
+ return typeof se == "function" ? Me(se, e) : r = e, ae(e, de({
314
+ [we]: "true"
315
315
  }, {
316
316
  get class() {
317
- return R("fixed left-0 top-0 z-[100] flex flex-col", (q() || B()) && "select-none");
317
+ return C("fixed left-0 top-0 z-[100] flex flex-col", (B() || G()) && "select-none");
318
318
  },
319
319
  get style() {
320
320
  return {
321
- width: `${L().width}px`,
322
- height: `${L().height}px`,
323
- transform: `translate3d(${A().x}px, ${A().y}px, 0)`,
324
- "z-index": he(),
325
- "will-change": q() ? "transform" : B() ? "transform, width, height" : void 0
321
+ width: `${M().width}px`,
322
+ height: `${M().height}px`,
323
+ transform: `translate3d(${L().x}px, ${L().y}px, 0)`,
324
+ "z-index": ge(),
325
+ "will-change": B() ? "transform" : G() ? "transform, width, height" : void 0
326
326
  };
327
327
  },
328
- onPointerMove: _e,
329
- onPointerUp: ie,
330
- onPointerCancel: ie,
328
+ onPointerMove: Re,
329
+ onPointerUp: re,
330
+ onPointerCancel: re,
331
331
  role: "dialog",
332
332
  get "aria-labelledby"() {
333
- return de(() => !!i.title)() ? X() : void 0;
333
+ return ue(() => !!i.title)() ? q() : void 0;
334
334
  },
335
335
  tabIndex: -1,
336
- onPointerDown: Ie
337
- }), !1, !0), ae(t, se({
338
- [Ye]: "true"
336
+ onPointerDown: Ee
337
+ }), !1, !0), ae(t, de({
338
+ [Ne]: "true"
339
339
  }, {
340
340
  "data-floe-floating-window-surface": "true",
341
341
  get "data-floe-floating-window-state"() {
342
- return ve() ? "active" : "inactive";
342
+ return xe() ? "active" : "inactive";
343
343
  }
344
344
  }, {
345
- [fe]: "true"
345
+ [we]: "true"
346
346
  }, {
347
347
  get class() {
348
- return R("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);
348
+ return C("relative flex h-full w-full flex-col overflow-hidden", "text-card-foreground rounded-md", "border", "animate-in fade-in duration-150", d() && "rounded-none", i.class);
349
349
  }
350
- }), !1, !0), o.$$dblclick = Re, o.$$pointerdown = Se, g(w, a(y, {
350
+ }), !1, !0), l.$$dblclick = Ce, l.$$pointerdown = _e, g(w, s(P, {
351
351
  get when() {
352
352
  return i.title;
353
353
  },
354
354
  get children() {
355
- var n = qe();
356
- return g(n, () => i.title), u(() => Ae(n, "id", X())), n;
355
+ var n = Be();
356
+ return g(n, () => i.title), u(() => Le(n, "id", q())), n;
357
357
  }
358
- })), g(oe, a(ue, {
358
+ })), g(le, s(ce, {
359
359
  variant: "ghost",
360
360
  size: "icon",
361
361
  class: "h-6 w-6",
362
362
  onClick: (n) => {
363
- n.stopPropagation(), re();
363
+ n.stopPropagation(), oe();
364
364
  },
365
365
  get "aria-label"() {
366
366
  return d() ? "Restore" : "Maximize";
367
367
  },
368
368
  get children() {
369
- return a(y, {
369
+ return s(P, {
370
370
  get when() {
371
371
  return d();
372
372
  },
373
373
  get fallback() {
374
- return a(Oe, {
374
+ return s(Ue, {
375
375
  class: "w-3 h-3"
376
376
  });
377
377
  },
378
378
  get children() {
379
- return a(We, {
379
+ return s(He, {
380
380
  class: "w-3 h-3"
381
381
  });
382
382
  }
383
383
  });
384
384
  }
385
- }), null), g(oe, a(ue, {
385
+ }), null), g(le, s(ce, {
386
386
  variant: "ghost-destructive",
387
387
  size: "icon",
388
388
  class: "h-6 w-6",
@@ -391,63 +391,63 @@ function ct(i) {
391
391
  },
392
392
  "aria-label": "Close",
393
393
  get children() {
394
- return a(He, {
394
+ return s(Xe, {
395
395
  class: "w-3.5 h-3.5"
396
396
  });
397
397
  }
398
- }), null), g(Ce, () => i.children), g(t, a(y, {
398
+ }), null), g(Ae, () => i.children), g(t, s(P, {
399
399
  get when() {
400
400
  return i.footer;
401
401
  },
402
402
  get children() {
403
- var n = Ne();
403
+ var n = je();
404
404
  return g(n, () => i.footer), n;
405
405
  }
406
- }), null), g(t, a(y, {
406
+ }), null), g(t, s(P, {
407
407
  get when() {
408
- return de(() => !!H())() && !d();
408
+ return ue(() => !!X())() && !d();
409
409
  },
410
410
  get children() {
411
411
  return [(() => {
412
- var n = Be();
412
+ var n = Ge();
413
413
  return m(n, "pointerdown", f("n"), !0), u(() => c(n, h("n"))), n;
414
414
  })(), (() => {
415
- var n = je();
415
+ var n = Ve();
416
416
  return m(n, "pointerdown", f("s"), !0), u(() => c(n, h("s"))), n;
417
- })(), a(y, {
417
+ })(), s(P, {
418
418
  get when() {
419
- return !b();
419
+ return !$();
420
420
  },
421
421
  get children() {
422
422
  return [(() => {
423
- var n = Ge();
423
+ var n = Ze();
424
424
  return m(n, "pointerdown", f("e"), !0), u(() => c(n, h("e"))), n;
425
425
  })(), (() => {
426
- var n = Ve();
426
+ var n = Je();
427
427
  return m(n, "pointerdown", f("w"), !0), u(() => c(n, h("w"))), n;
428
428
  })(), (() => {
429
- var n = Ze();
429
+ var n = Ke();
430
430
  return m(n, "pointerdown", f("ne"), !0), u(() => c(n, h("ne"))), n;
431
431
  })(), (() => {
432
- var n = Je();
432
+ var n = Qe();
433
433
  return m(n, "pointerdown", f("nw"), !0), u(() => c(n, h("nw"))), n;
434
434
  })(), (() => {
435
- var n = Ke();
435
+ var n = et();
436
436
  return m(n, "pointerdown", f("se"), !0), u(() => c(n, h("se"))), n;
437
437
  })(), (() => {
438
- var n = Qe();
438
+ var n = tt();
439
439
  return m(n, "pointerdown", f("sw"), !0), u(() => c(n, h("sw"))), n;
440
440
  })()];
441
441
  }
442
442
  })];
443
443
  }
444
- }), null), u(() => c(o, R("flex items-center justify-between h-9 px-3", "border-b", d() ? "rounded-none" : "rounded-t-md", U() && !d() && "cursor-move"))), e;
444
+ }), null), u(() => c(l, C("flex items-center justify-between h-9 px-3", "border-b", d() ? "rounded-none" : "rounded-t-md", Y() && !d() && "cursor-move"))), e;
445
445
  }
446
446
  });
447
447
  }
448
448
  });
449
449
  }
450
- Fe(["pointerdown", "dblclick"]);
450
+ De(["pointerdown", "dblclick"]);
451
451
  export {
452
- ct as FloatingWindow
452
+ ht as FloatingWindow
453
453
  };
@@ -5,6 +5,18 @@ export interface FloatingWindowRect {
5
5
  width: number;
6
6
  height: number;
7
7
  }
8
+ export interface FloatingWindowViewportInsets {
9
+ top?: number;
10
+ right?: number;
11
+ bottom?: number;
12
+ left?: number;
13
+ }
14
+ export interface FloatingWindowViewport {
15
+ x: number;
16
+ y: number;
17
+ width: number;
18
+ height: number;
19
+ }
8
20
  interface PointerPosition {
9
21
  x: number;
10
22
  y: number;
@@ -24,6 +36,7 @@ interface ResolveFloatingWindowRectOptions {
24
36
  minSize: Size;
25
37
  maxSize: Size;
26
38
  viewport: Size;
39
+ viewportInsets?: FloatingWindowViewportInsets;
27
40
  mobile: boolean;
28
41
  mobilePadding: number;
29
42
  }
@@ -32,10 +45,12 @@ interface NormalizeFloatingWindowRectOptions {
32
45
  minSize: Size;
33
46
  maxSize: Size;
34
47
  viewport: Size;
48
+ viewportInsets?: FloatingWindowViewportInsets;
35
49
  mobile: boolean;
36
50
  mobilePadding: number;
37
51
  center?: boolean;
38
52
  }
53
+ export declare function resolveFloatingWindowViewport(viewport: Size, insets?: FloatingWindowViewportInsets): FloatingWindowViewport;
39
54
  export declare function resolveFloatingWindowRect(options: ResolveFloatingWindowRectOptions): FloatingWindowRect;
40
55
  export declare function normalizeFloatingWindowRect(options: NormalizeFloatingWindowRectOptions): FloatingWindowRect;
41
56
  export {};
@@ -1,65 +1,97 @@
1
- function l(o, h, e) {
2
- return Math.max(h, Math.min(e, o));
1
+ function x(e, i, m) {
2
+ return Math.max(i, Math.min(m, e));
3
3
  }
4
- function z(o, h, e) {
5
- const a = Math.max(0, e), t = Math.min(o, a), n = Math.max(t, Math.min(h, a));
6
- return { min: t, max: n };
4
+ function l(e, i, m) {
5
+ const s = Math.max(0, m), o = Math.min(e, s), c = Math.max(o, Math.min(i, s));
6
+ return { min: o, max: c };
7
7
  }
8
- function S(o) {
8
+ function z(e) {
9
+ const i = Number(e);
10
+ return Number.isFinite(i) && i > 0 ? i : 0;
11
+ }
12
+ function X(e, i = {}) {
13
+ const m = Math.max(0, e.width), s = Math.max(0, e.height), o = Math.min(z(i.left), m), c = Math.min(z(i.top), s), n = Math.min(z(i.right), Math.max(0, m - o)), d = Math.min(z(i.bottom), Math.max(0, s - c));
14
+ return {
15
+ x: o,
16
+ y: c,
17
+ width: Math.max(0, m - o - n),
18
+ height: Math.max(0, s - c - d)
19
+ };
20
+ }
21
+ function Y(e) {
22
+ return e.x + e.width;
23
+ }
24
+ function H(e) {
25
+ return e.y + e.height;
26
+ }
27
+ function I(e) {
9
28
  const {
10
- mode: h,
11
- pointer: e,
12
- dragStartPos: a,
13
- dragStartRect: t,
14
- resizeStartPos: n,
15
- resizeStartRect: i,
16
- resizeHandle: m,
17
- minSize: g,
18
- maxSize: d,
19
- viewport: s,
20
- mobile: x,
21
- mobilePadding: M
22
- } = o, r = e.x - (h === "drag" ? a.x : n.x), w = e.y - (h === "drag" ? a.y : n.y);
23
- if (h === "drag")
29
+ mode: i,
30
+ pointer: m,
31
+ dragStartPos: s,
32
+ dragStartRect: o,
33
+ resizeStartPos: c,
34
+ resizeStartRect: n,
35
+ resizeHandle: d,
36
+ minSize: r,
37
+ maxSize: t,
38
+ viewport: R,
39
+ viewportInsets: S,
40
+ mobile: y,
41
+ mobilePadding: f
42
+ } = e, a = X(R, S), g = Y(a), w = H(a), u = m.x - (i === "drag" ? s.x : c.x), p = m.y - (i === "drag" ? s.y : c.y);
43
+ if (i === "drag") {
44
+ const h = Math.max(a.x, g - o.width), M = Math.max(a.y, w - o.height);
24
45
  return {
25
- ...t,
26
- x: x ? M : Math.max(0, Math.min(s.width - t.width, t.x + r)),
27
- y: Math.max(0, Math.min(s.height - t.height, t.y + w))
46
+ ...o,
47
+ x: x(y ? a.x + f : o.x + u, a.x, h),
48
+ y: x(o.y + p, a.y, M)
28
49
  };
29
- let u = i.width, f = i.height, y = i.x, b = i.y;
30
- if (!x && m.includes("e") && (u = Math.max(g.width, Math.min(d.width, i.width + r))), !x && m.includes("w")) {
31
- const c = i.width - r;
32
- c >= g.width && c <= d.width && (u = c, y = i.x + r);
33
50
  }
34
- if (m.includes("s") && (f = Math.max(g.height, Math.min(d.height, i.height + w))), m.includes("n")) {
35
- const c = i.height - w;
36
- c >= g.height && c <= d.height && (f = c, b = i.y + w);
51
+ let b = n.width, v = n.height, W = n.x, F = n.y;
52
+ if (!y && d.includes("e")) {
53
+ const h = l(r.width, t.width, g - n.x);
54
+ b = x(n.width + u, h.min, h.max);
55
+ }
56
+ if (!y && d.includes("w")) {
57
+ const h = n.x + n.width, M = l(r.width, t.width, h - a.x), B = h - M.max, P = Math.max(B, h - M.min);
58
+ W = x(n.x + u, B, P), b = Math.max(0, h - W);
59
+ }
60
+ if (d.includes("s")) {
61
+ const h = l(r.height, t.height, w - n.y);
62
+ v = x(n.height + p, h.min, h.max);
63
+ }
64
+ if (d.includes("n")) {
65
+ const h = n.y + n.height, M = l(r.height, t.height, h - a.y), B = h - M.max, P = Math.max(B, h - M.min);
66
+ F = x(n.y + p, B, P), v = Math.max(0, h - F);
37
67
  }
38
68
  return {
39
- x: Math.max(0, Math.min(s.width - u, y)),
40
- y: Math.max(0, Math.min(s.height - f, b)),
41
- width: u,
42
- height: f
69
+ x: x(W, a.x, Math.max(a.x, g - b)),
70
+ y: x(F, a.y, Math.max(a.y, w - v)),
71
+ width: b,
72
+ height: v
43
73
  };
44
74
  }
45
- function p(o) {
75
+ function V(e) {
46
76
  const {
47
- rect: h,
48
- minSize: e,
49
- maxSize: a,
50
- viewport: t,
77
+ rect: i,
78
+ minSize: m,
79
+ maxSize: s,
80
+ viewport: o,
81
+ viewportInsets: c,
51
82
  mobile: n,
52
- mobilePadding: i,
53
- center: m = !1
54
- } = o, g = n ? Math.max(0, t.width - i * 2) : t.width, d = z(e.width, a.width, g), s = z(e.height, a.height, t.height), x = n ? d.max : l(h.width, d.min, d.max), M = l(h.height, s.min, s.max), r = Math.max(0, t.width - x), w = Math.max(0, t.height - M);
83
+ mobilePadding: d,
84
+ center: r = !1
85
+ } = e, t = X(o, c), R = Y(t), S = H(t), y = n ? Math.max(0, t.width - d * 2) : t.width, f = l(m.width, s.width, y), a = l(m.height, s.height, t.height), g = n ? f.max : x(i.width, f.min, f.max), w = x(i.height, a.min, a.max), u = Math.max(t.x, R - g), p = Math.max(t.y, S - w);
55
86
  return {
56
- x: n ? l(i, 0, r) : m ? Math.max(0, Math.round((t.width - x) / 2)) : l(h.x, 0, r),
57
- y: m ? Math.max(0, Math.round((t.height - M) / 2)) : l(h.y, 0, w),
58
- width: x,
59
- height: M
87
+ x: n ? x(t.x + d, t.x, u) : r ? Math.max(t.x, Math.round(t.x + (t.width - g) / 2)) : x(i.x, t.x, u),
88
+ y: r ? Math.max(t.y, Math.round(t.y + (t.height - w) / 2)) : x(i.y, t.y, p),
89
+ width: g,
90
+ height: w
60
91
  };
61
92
  }
62
93
  export {
63
- p as normalizeFloatingWindowRect,
64
- S as resolveFloatingWindowRect
94
+ V as normalizeFloatingWindowRect,
95
+ I as resolveFloatingWindowRect,
96
+ X as resolveFloatingWindowViewport
65
97
  };
@@ -3,6 +3,7 @@ export { Tag, type TagProps, type TagVariant, type TagSize } from './Tag';
3
3
  export { Input, Textarea, NumberInput, AffixInput, type InputProps, type InputSize, type TextareaProps, type NumberInputProps, type AffixInputProps, type AffixOption, } from './Input';
4
4
  export { Dialog, ConfirmDialog, type DialogProps, type ConfirmDialogProps } from './Dialog';
5
5
  export { FloatingWindow, type FloatingWindowProps } from './FloatingWindow';
6
+ export { resolveFloatingWindowViewport, type FloatingWindowRect, type FloatingWindowViewport, type FloatingWindowViewportInsets, } from './floatingWindowGeometry';
6
7
  export { Dropdown, Select, type DropdownProps, type DropdownItem, type SelectProps, } from './Dropdown';
7
8
  export { SurfaceFloatingLayer, type SurfaceFloatingLayerPosition, type SurfaceFloatingLayerProps, type SurfaceFloatingLayerSize, } from './SurfaceFloatingLayer';
8
9
  export { Tooltip, type TooltipProps } from './Tooltip';
package/dist/full.js CHANGED
@@ -145,17 +145,18 @@ import { formatKeybind as Hf, isMacLikePlatform as Uf, isPrimaryModKeyPressed as
145
145
  import { isTypingElement as Xf, shouldIgnoreHotkeys as Zf } from "./utils/dom.js";
146
146
  import { lockBodyStyle as Qf } from "./utils/bodyStyleLock.js";
147
147
  import { registerCommandContributions as qf, useCommandContributions as Jf } from "./hooks/useCommandContributions.js";
148
- import { startPointerSession as ed } from "./components/ui/pointerSession.js";
149
- import { useAttachments as rd } from "./components/chat/hooks/useAttachments.js";
150
- import { useAutoScroll as nd } from "./components/chat/hooks/useAutoScroll.js";
151
- import { useDebounce as ad } from "./hooks/useDebounce.js";
152
- import { useDeckDrag as md } from "./hooks/useDeckDrag.js";
153
- import { useFileBrowserDropTarget as sd, useFileBrowserItemDrag as pd } from "./hooks/useFileBrowserDrag.js";
154
- import { useKeybind as dd } from "./hooks/useKeybind.js";
155
- import { useMediaQuery as Id } from "./hooks/useMediaQuery.js";
156
- import { usePersisted as Cd } from "./hooks/usePersisted.js";
157
- import { useResizeObserver as gd } from "./hooks/useResizeObserver.js";
158
- import { useVirtualList as hd } from "./components/chat/hooks/useVirtualList.js";
148
+ import { resolveFloatingWindowViewport as ed } from "./components/ui/floatingWindowGeometry.js";
149
+ import { startPointerSession as rd } from "./components/ui/pointerSession.js";
150
+ import { useAttachments as nd } from "./components/chat/hooks/useAttachments.js";
151
+ import { useAutoScroll as ad } from "./components/chat/hooks/useAutoScroll.js";
152
+ import { useDebounce as md } from "./hooks/useDebounce.js";
153
+ import { useDeckDrag as sd } from "./hooks/useDeckDrag.js";
154
+ import { useFileBrowserDropTarget as fd, useFileBrowserItemDrag as dd } from "./hooks/useFileBrowserDrag.js";
155
+ import { useKeybind as Id } from "./hooks/useKeybind.js";
156
+ import { useMediaQuery as Cd } from "./hooks/useMediaQuery.js";
157
+ import { usePersisted as gd } from "./hooks/usePersisted.js";
158
+ import { useResizeObserver as hd } from "./hooks/useResizeObserver.js";
159
+ import { useVirtualList as Fd } from "./components/chat/hooks/useVirtualList.js";
159
160
  export {
160
161
  F as Activity,
161
162
  Nt as ActivityAppsMain,
@@ -695,6 +696,7 @@ export {
695
696
  pl as replaceSnapshotTopic,
696
697
  fl as replaceSnapshotTrashItem,
697
698
  Nn as resolveFileItemIcon,
699
+ ed as resolveFloatingWindowViewport,
698
700
  Jn as resolveSurfaceInteractionTargetRole,
699
701
  sa as resolveSurfacePortalBoundaryRect,
700
702
  pa as resolveSurfacePortalHost,
@@ -722,7 +724,7 @@ export {
722
724
  Pp as snapToGrid,
723
725
  wf as springConfig,
724
726
  $a as startHotInteraction,
725
- ed as startPointerSession,
727
+ rd as startPointerSession,
726
728
  gt as submitTerminalSession,
727
729
  s as syncThemeTokenOverrides,
728
730
  yt as terminalCommandTokenSuggestionProvider,
@@ -734,8 +736,8 @@ export {
734
736
  nf as terminateMarkdownWorker,
735
737
  pf as terminateMermaidWorker,
736
738
  Cf as terminateShikiWorker,
737
- rd as useAttachments,
738
- nd as useAutoScroll,
739
+ nd as useAttachments,
740
+ ad as useAutoScroll,
739
741
  si as useChatContext,
740
742
  Sf as useCodeHighlight,
741
743
  yi as useCommand,
@@ -743,27 +745,27 @@ export {
743
745
  Mi as useComponentContextFactory,
744
746
  Ni as useComponentRegistry,
745
747
  fp as useCurrentWidgetId,
746
- ad as useDebounce,
748
+ md as useDebounce,
747
749
  Fa as useDeck,
748
- md as useDeckDrag,
750
+ sd as useDeckDrag,
749
751
  fc as useFileBrowser,
750
752
  lc as useFileBrowserDrag,
751
- sd as useFileBrowserDropTarget,
752
- pd as useFileBrowserItemDrag,
753
+ fd as useFileBrowserDropTarget,
754
+ dd as useFileBrowserItemDrag,
753
755
  ji as useFloeConfig,
754
756
  Xc as useFormSubmitting,
755
- dd as useKeybind,
757
+ Id as useKeybind,
756
758
  Tm as useLayout,
757
- Id as useMediaQuery,
759
+ Cd as useMediaQuery,
758
760
  ff as useMermaid,
759
761
  _l as useNotification,
760
762
  wi as useOptionalComponentRegistry,
761
- Cd as usePersisted,
762
- gd as useResizeObserver,
763
+ gd as usePersisted,
764
+ hd as useResizeObserver,
763
765
  qi as useResolvedFloeConfig,
764
766
  ws as useTheme,
765
767
  qs as useViewActivation,
766
- hd as useVirtualList,
768
+ Fd as useVirtualList,
767
769
  cp as useWidgetRegistry,
768
770
  dp as useWidgetState,
769
771
  Tp as useWidgetStateContext,
package/dist/ui.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import { AffixInput as e, Input as t, NumberInput as a, Textarea as i } from "./components/ui/Input.js";
2
- import { AnimatedBorderCard as T, Card as c, CardContent as C, CardDescription as l, CardFooter as E, CardHeader as p, CardTitle as m, Interactive3DCard as _, MorphCard as s, NeonCard as f } from "./components/ui/Card.js";
2
+ import { AnimatedBorderCard as T, Card as c, CardContent as C, CardDescription as l, CardFooter as p, CardHeader as E, CardTitle as m, Interactive3DCard as s, MorphCard as _, NeonCard as f } from "./components/ui/Card.js";
3
3
  import { AreaChart as S, DataBarChart as R, DataPieChart as x, LineChart as d, MonitoringChart as L } from "./components/ui/Charts.js";
4
- import { Button as F } from "./components/ui/Button.js";
5
- import { CANVAS_WHEEL_INTERACTIVE_ATTR as g, DEFAULT_CANVAS_WHEEL_INTERACTIVE_SELECTOR as O, DEFAULT_LOCAL_INTERACTION_SURFACE_SELECTOR as W, DEFAULT_WORKBENCH_TEXT_SELECTION_SURFACE_SELECTOR as P, DEFAULT_WORKBENCH_WIDGET_ACTIVATION_SURFACE_SELECTOR as D, DEFAULT_WORKBENCH_WIDGET_SHELL_SELECTOR as N, LOCAL_INTERACTION_SURFACE_ATTR as h, WORKBENCH_TEXT_SELECTION_SURFACE_ATTR as v, WORKBENCH_WIDGET_ACTIVATION_SURFACE_ATTR as B, WORKBENCH_WIDGET_SHELL_ATTR as k, isLocalInteractionSurfaceTarget as U, resolveSurfaceInteractionTargetRole as H, resolveSurfaceWheelRouting as b, resolveWorkbenchWidgetEventOwnership as G, resolveWorkbenchWidgetLocalTypingTarget as K, resolveWorkbenchWidgetTextSelectionTarget as M, shouldActivateWorkbenchWidgetLocalTarget as V } from "./components/ui/localInteractionSurface.js";
4
+ import { Button as u } from "./components/ui/Button.js";
5
+ import { CANVAS_WHEEL_INTERACTIVE_ATTR as I, DEFAULT_CANVAS_WHEEL_INTERACTIVE_SELECTOR as O, DEFAULT_LOCAL_INTERACTION_SURFACE_SELECTOR as W, DEFAULT_WORKBENCH_TEXT_SELECTION_SURFACE_SELECTOR as P, DEFAULT_WORKBENCH_WIDGET_ACTIVATION_SURFACE_SELECTOR as D, DEFAULT_WORKBENCH_WIDGET_SHELL_SELECTOR as N, LOCAL_INTERACTION_SURFACE_ATTR as h, WORKBENCH_TEXT_SELECTION_SURFACE_ATTR as v, WORKBENCH_WIDGET_ACTIVATION_SURFACE_ATTR as B, WORKBENCH_WIDGET_SHELL_ATTR as k, isLocalInteractionSurfaceTarget as U, resolveSurfaceInteractionTargetRole as H, resolveSurfaceWheelRouting as b, resolveWorkbenchWidgetEventOwnership as w, resolveWorkbenchWidgetLocalTypingTarget as G, resolveWorkbenchWidgetTextSelectionTarget as V, shouldActivateWorkbenchWidgetLocalTarget as K } from "./components/ui/localInteractionSurface.js";
6
6
  import { Checkbox as y, CheckboxGroup as j, CheckboxList as z } from "./components/ui/Checkbox.js";
7
7
  import { CircularProgress as Y, LinearProgress as Q, SegmentedProgress as Z, StepsProgress as q } from "./components/ui/Progress.js";
8
8
  import { CommandPalette as $ } from "./components/ui/CommandPalette.js";
9
9
  import { ConfirmDialog as or, Dialog as er } from "./components/ui/Dialog.js";
10
- import { DIALOG_SURFACE_BOUNDARY_ATTR as ar, DIALOG_SURFACE_HOST_ATTR as ir, SURFACE_PORTAL_HOST_ATTR as nr, SURFACE_PORTAL_LAYER_ATTR as Tr, __resetSurfacePortalScopeForTests as cr, ensureSurfacePortalInteractionTracking as Cr, isSurfacePortalMode as lr, projectSurfacePortalPosition as Er, projectSurfacePortalRect as pr, resolveSurfacePortalBoundaryRect as mr, resolveSurfacePortalHost as _r, resolveSurfacePortalMount as sr, resolveSurfacePortalMountRect as fr } from "./components/ui/dialogSurfaceScope.js";
10
+ import { DIALOG_SURFACE_BOUNDARY_ATTR as ar, DIALOG_SURFACE_HOST_ATTR as ir, SURFACE_PORTAL_HOST_ATTR as nr, SURFACE_PORTAL_LAYER_ATTR as Tr, __resetSurfacePortalScopeForTests as cr, ensureSurfacePortalInteractionTracking as Cr, isSurfacePortalMode as lr, projectSurfacePortalPosition as pr, projectSurfacePortalRect as Er, resolveSurfacePortalBoundaryRect as mr, resolveSurfacePortalHost as sr, resolveSurfacePortalMount as _r, resolveSurfacePortalMountRect as fr } from "./components/ui/dialogSurfaceScope.js";
11
11
  import { DirectoryInput as Sr } from "./components/ui/DirectoryInput.js";
12
12
  import { DirectoryPicker as xr } from "./components/ui/DirectoryPicker.js";
13
- import { Dropdown as Lr, Select as ur } from "./components/ui/Dropdown.js";
14
- import { ErrorBlock as Ir, HighlightBlock as gr, InfoBlock as Or, NoteBlock as Wr, SuccessBlock as Pr, TipBlock as Dr, WarningBlock as Nr } from "./components/ui/HighlightBlock.js";
13
+ import { Dropdown as Lr, Select as Fr } from "./components/ui/Dropdown.js";
14
+ import { ErrorBlock as gr, HighlightBlock as Ir, InfoBlock as Or, NoteBlock as Wr, SuccessBlock as Pr, TipBlock as Dr, WarningBlock as Nr } from "./components/ui/HighlightBlock.js";
15
15
  import { FileSavePicker as vr } from "./components/ui/FileSavePicker.js";
16
16
  import { FloatingWindow as kr } from "./components/ui/FloatingWindow.js";
17
- import { Form as Hr, FormActions as br, FormControl as Gr, FormDescription as Kr, FormDivider as Mr, FormField as Vr, FormLabel as wr, FormMessage as yr, FormRow as jr, FormSection as zr, useFormSubmitting as Xr } from "./components/ui/Form.js";
17
+ import { Form as Hr, FormActions as br, FormControl as wr, FormDescription as Gr, FormDivider as Vr, FormField as Kr, FormLabel as Mr, FormMessage as yr, FormRow as jr, FormSection as zr, useFormSubmitting as Xr } from "./components/ui/Form.js";
18
18
  import { InfiniteCanvas as Qr } from "./components/ui/InfiniteCanvas.js";
19
19
  import { MobileKeyboard as qr } from "./components/ui/MobileKeyboard.js";
20
20
  import { Pagination as $r } from "./components/ui/Pagination.js";
@@ -22,25 +22,26 @@ import { ProcessingIndicator as oo } from "./components/ui/ProcessingIndicator.j
22
22
  import { QuoteBlock as to } from "./components/ui/QuoteBlock.js";
23
23
  import { RadioGroup as io, RadioList as no, RadioOption as To } from "./components/ui/Radio.js";
24
24
  import { SegmentedControl as Co } from "./components/ui/SegmentedControl.js";
25
- import { Stepper as Eo, Wizard as po, useWizard as mo } from "./components/ui/Stepper.js";
26
- import { SurfaceFloatingLayer as so } from "./components/ui/SurfaceFloatingLayer.js";
25
+ import { Stepper as po, Wizard as Eo, useWizard as mo } from "./components/ui/Stepper.js";
26
+ import { SurfaceFloatingLayer as _o } from "./components/ui/SurfaceFloatingLayer.js";
27
27
  import { Switch as Ao } from "./components/ui/Switch.js";
28
28
  import { TabPanel as Ro, Tabs as xo } from "./components/ui/Tabs.js";
29
- import { Tag as uo } from "./components/ui/Tag.js";
30
- import { Tooltip as Io } from "./components/ui/Tooltip.js";
29
+ import { Tag as Fo } from "./components/ui/Tag.js";
30
+ import { Tooltip as go } from "./components/ui/Tooltip.js";
31
31
  import { clientToCanvasLocal as Oo, clientToCanvasWorld as Wo, createViewportFromZoomAnchor as Po, isPointInsideCanvasRect as Do, localToCanvasWorld as No } from "./components/ui/canvasGeometry.js";
32
- import { startPointerSession as vo } from "./components/ui/pointerSession.js";
32
+ import { resolveFloatingWindowViewport as vo } from "./components/ui/floatingWindowGeometry.js";
33
+ import { startPointerSession as ko } from "./components/ui/pointerSession.js";
33
34
  export {
34
35
  e as AffixInput,
35
36
  T as AnimatedBorderCard,
36
37
  S as AreaChart,
37
- F as Button,
38
- g as CANVAS_WHEEL_INTERACTIVE_ATTR,
38
+ u as Button,
39
+ I as CANVAS_WHEEL_INTERACTIVE_ATTR,
39
40
  c as Card,
40
41
  C as CardContent,
41
42
  l as CardDescription,
42
- E as CardFooter,
43
- p as CardHeader,
43
+ p as CardFooter,
44
+ E as CardHeader,
44
45
  m as CardTitle,
45
46
  y as Checkbox,
46
47
  j as CheckboxGroup,
@@ -61,30 +62,30 @@ export {
61
62
  Sr as DirectoryInput,
62
63
  xr as DirectoryPicker,
63
64
  Lr as Dropdown,
64
- Ir as ErrorBlock,
65
+ gr as ErrorBlock,
65
66
  vr as FileSavePicker,
66
67
  kr as FloatingWindow,
67
68
  Hr as Form,
68
69
  br as FormActions,
69
- Gr as FormControl,
70
- Kr as FormDescription,
71
- Mr as FormDivider,
72
- Vr as FormField,
73
- wr as FormLabel,
70
+ wr as FormControl,
71
+ Gr as FormDescription,
72
+ Vr as FormDivider,
73
+ Kr as FormField,
74
+ Mr as FormLabel,
74
75
  yr as FormMessage,
75
76
  jr as FormRow,
76
77
  zr as FormSection,
77
- gr as HighlightBlock,
78
+ Ir as HighlightBlock,
78
79
  Qr as InfiniteCanvas,
79
80
  Or as InfoBlock,
80
81
  t as Input,
81
- _ as Interactive3DCard,
82
+ s as Interactive3DCard,
82
83
  h as LOCAL_INTERACTION_SURFACE_ATTR,
83
84
  d as LineChart,
84
85
  Q as LinearProgress,
85
86
  qr as MobileKeyboard,
86
87
  L as MonitoringChart,
87
- s as MorphCard,
88
+ _ as MorphCard,
88
89
  f as NeonCard,
89
90
  Wr as NoteBlock,
90
91
  a as NumberInput,
@@ -98,23 +99,23 @@ export {
98
99
  Tr as SURFACE_PORTAL_LAYER_ATTR,
99
100
  Co as SegmentedControl,
100
101
  Z as SegmentedProgress,
101
- ur as Select,
102
- Eo as Stepper,
102
+ Fr as Select,
103
+ po as Stepper,
103
104
  q as StepsProgress,
104
105
  Pr as SuccessBlock,
105
- so as SurfaceFloatingLayer,
106
+ _o as SurfaceFloatingLayer,
106
107
  Ao as Switch,
107
108
  Ro as TabPanel,
108
109
  xo as Tabs,
109
- uo as Tag,
110
+ Fo as Tag,
110
111
  i as Textarea,
111
112
  Dr as TipBlock,
112
- Io as Tooltip,
113
+ go as Tooltip,
113
114
  v as WORKBENCH_TEXT_SELECTION_SURFACE_ATTR,
114
115
  B as WORKBENCH_WIDGET_ACTIVATION_SURFACE_ATTR,
115
116
  k as WORKBENCH_WIDGET_SHELL_ATTR,
116
117
  Nr as WarningBlock,
117
- po as Wizard,
118
+ Eo as Wizard,
118
119
  cr as __resetSurfacePortalScopeForTests,
119
120
  Oo as clientToCanvasLocal,
120
121
  Wo as clientToCanvasWorld,
@@ -124,19 +125,20 @@ export {
124
125
  Do as isPointInsideCanvasRect,
125
126
  lr as isSurfacePortalMode,
126
127
  No as localToCanvasWorld,
127
- Er as projectSurfacePortalPosition,
128
- pr as projectSurfacePortalRect,
128
+ pr as projectSurfacePortalPosition,
129
+ Er as projectSurfacePortalRect,
130
+ vo as resolveFloatingWindowViewport,
129
131
  H as resolveSurfaceInteractionTargetRole,
130
132
  mr as resolveSurfacePortalBoundaryRect,
131
- _r as resolveSurfacePortalHost,
132
- sr as resolveSurfacePortalMount,
133
+ sr as resolveSurfacePortalHost,
134
+ _r as resolveSurfacePortalMount,
133
135
  fr as resolveSurfacePortalMountRect,
134
136
  b as resolveSurfaceWheelRouting,
135
- G as resolveWorkbenchWidgetEventOwnership,
136
- K as resolveWorkbenchWidgetLocalTypingTarget,
137
- M as resolveWorkbenchWidgetTextSelectionTarget,
138
- V as shouldActivateWorkbenchWidgetLocalTarget,
139
- vo as startPointerSession,
137
+ w as resolveWorkbenchWidgetEventOwnership,
138
+ G as resolveWorkbenchWidgetLocalTypingTarget,
139
+ V as resolveWorkbenchWidgetTextSelectionTarget,
140
+ K as shouldActivateWorkbenchWidgetLocalTarget,
141
+ ko as startPointerSession,
140
142
  Xr as useFormSubmitting,
141
143
  mo as useWizard
142
144
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floegence/floe-webapp-core",
3
- "version": "0.36.41",
3
+ "version": "0.36.42",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",