@floegence/floe-webapp-core 0.106.1 → 0.107.1

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,6 +1,6 @@
1
1
  import { effect as s, className as a, template as c } from "solid-js/web";
2
2
  import "solid-js";
3
- import v from "../../../node_modules/.pnpm/dompurify@3.4.17/node_modules/dompurify/dist/purify.es.js";
3
+ import v from "../../../node_modules/.pnpm/dompurify@3.5.1/node_modules/dompurify/dist/purify.es.js";
4
4
  import { cn as m } from "../../../utils/cn.js";
5
5
  var l = /* @__PURE__ */ c("<div>");
6
6
  const S = (r) => {
@@ -1,54 +1,54 @@
1
- import { spread as Lt, mergeProps as $e, insert as u, createComponent as p, memo as ye, effect as Pe, style as We, setAttribute as xe, template as dt, use as Ce, delegateEvents as Te } from "solid-js/web";
2
- import { createSignal as k, createMemo as h, onCleanup as Rt, untrack as v, createEffect as st, Show as Ie } from "solid-js";
3
- import { startHotInteraction as Me } from "../../utils/hotInteraction.js";
4
- import { X as zt, Minus as Xt, Maximize as Yt, GripVertical as Ee } from "../icons/index.js";
5
- import { CANVAS_WHEEL_INTERACTIVE_ATTR as Ae, WORKBENCH_WIDGET_SHELL_ATTR as Le, resolveWorkbenchWidgetLocalTypingTarget as Re, resolveWorkbenchWidgetTextSelectionTarget as ze, shouldActivateWorkbenchWidgetLocalTarget as Xe } from "../ui/localInteractionSurface.js";
6
- import { startPointerSession as Dt } from "../ui/pointerSession.js";
7
- import { createWorkbenchWidgetSurfaceMetrics as Ye, resolveWorkbenchProjectedSurfaceScaleBehavior as De } from "./workbenchHelpers.js";
8
- import { createWorkbenchEdgeAutoPanController as Fe, WORKBENCH_EDGE_AUTO_PAN_FRAME_SELECTOR as He, frameFromElement as je } from "./workbenchEdgeAutoPan.js";
9
- import { resolveWorkbenchInteractionAdapter as Oe } from "./workbenchInteractionAdapter.js";
1
+ import { spread as Rt, mergeProps as ye, insert as u, createComponent as p, memo as Pe, effect as We, style as xe, setAttribute as Ce, template as dt, use as Te, delegateEvents as Ie } from "solid-js/web";
2
+ import { createSignal as k, createMemo as w, onCleanup as zt, untrack as v, createEffect as st, Show as Me } from "solid-js";
3
+ import { startHotInteraction as Ee } from "../../utils/hotInteraction.js";
4
+ import { X as Xt, Minus as Yt, Maximize as Dt, GripVertical as Ae } from "../icons/index.js";
5
+ import { CANVAS_WHEEL_INTERACTIVE_ATTR as Le, WORKBENCH_WIDGET_SHELL_ATTR as Re, resolveWorkbenchWidgetLocalTypingTarget as ze, resolveWorkbenchWidgetTextSelectionTarget as Xe, shouldActivateWorkbenchWidgetLocalTarget as Ye } from "../ui/localInteractionSurface.js";
6
+ import { startPointerSession as Ft } from "../ui/pointerSession.js";
7
+ import { createWorkbenchWidgetSurfaceMetrics as De, resolveWorkbenchProjectedSurfaceScaleBehavior as Fe } from "./workbenchHelpers.js";
8
+ import { createWorkbenchEdgeAutoPanController as He, WORKBENCH_EDGE_AUTO_PAN_FRAME_SELECTOR as je, frameFromElement as Oe } from "./workbenchEdgeAutoPan.js";
9
+ import { resolveWorkbenchInteractionAdapter as Ve } from "./workbenchInteractionAdapter.js";
10
10
  import { createOwnerSafePropAccessor as c } from "./workbenchOwnerSafeAccessors.js";
11
- import { WorkbenchWidgetHeaderContext as Ve } from "./WorkbenchWidgetHeader.js";
12
- var qe = /* @__PURE__ */ dt("<div class=workbench-widget__header-actions data-floe-workbench-header-actions=true data-floe-canvas-interactive=true>"), Be = /* @__PURE__ */ dt('<article class=workbench-widget data-floe-surface=floating><div class=workbench-widget__surface><header class=workbench-widget__header><span class=workbench-widget__traffic role=group aria-label="Window controls"><button type=button class="workbench-widget__traffic-dot workbench-widget__traffic-dot--close"aria-label="Close widget"title="Close widget"data-floe-canvas-interactive=true></button><button type=button class="workbench-widget__traffic-dot workbench-widget__traffic-dot--min"aria-label="Minimize widget to overview"title="Minimize widget to overview"data-floe-canvas-interactive=true></button><button type=button class="workbench-widget__traffic-dot workbench-widget__traffic-dot--max"aria-label="Zoom widget to fit viewport"title="Zoom widget to fit viewport"data-floe-canvas-interactive=true></button></span><span class=workbench-widget__badge aria-hidden=true></span><button type=button class=workbench-widget__drag aria-label="Drag widget"data-floe-canvas-interactive=true></button><div class=workbench-widget__title-area><span class=workbench-widget__title-dot aria-hidden=true></span><span class=workbench-widget__title></span></div><span class=workbench-widget__window-controls role=group aria-label="Window controls"><button type=button class="workbench-widget__window-control workbench-widget__window-control--min"aria-label="Minimize widget to overview"title="Minimize widget to overview"data-floe-canvas-interactive=true></button><button type=button class="workbench-widget__window-control workbench-widget__window-control--max"aria-label="Zoom widget to fit viewport"title="Zoom widget to fit viewport"data-floe-canvas-interactive=true></button><button type=button class="workbench-widget__window-control workbench-widget__window-control--close"aria-label="Remove widget"title="Remove widget"data-floe-canvas-interactive=true></button></span></header><div class=workbench-widget__body data-floe-canvas-interactive=true>'), Ne = /* @__PURE__ */ dt('<div class=workbench-widget__resize aria-label="Resize widget"data-floe-canvas-interactive=true><svg class=workbench-widget__resize-glyph viewBox="0 0 12 12"aria-hidden=true><path d="M12 0 L0 12"></path><path d="M12 4 L4 12"></path><path d="M12 8 L8 12">');
13
- const Ge = 220, Ze = 160, Ke = 160;
14
- function lo(r) {
15
- const [W, ut] = k(), Ft = (t) => {
11
+ import { WorkbenchWidgetHeaderContext as qe } from "./WorkbenchWidgetHeader.js";
12
+ var Be = /* @__PURE__ */ dt("<div class=workbench-widget__header-actions data-floe-workbench-header-actions=true data-floe-canvas-interactive=true>"), Ne = /* @__PURE__ */ dt('<article class=workbench-widget data-floe-surface=floating><div class=workbench-widget__surface><header class=workbench-widget__header><span class=workbench-widget__traffic role=group aria-label="Window controls"><button type=button class="workbench-widget__traffic-dot workbench-widget__traffic-dot--close"aria-label="Close widget"title="Close widget"data-floe-canvas-interactive=true></button><button type=button class="workbench-widget__traffic-dot workbench-widget__traffic-dot--min"aria-label="Minimize widget to overview"title="Minimize widget to overview"data-floe-canvas-interactive=true></button><button type=button class="workbench-widget__traffic-dot workbench-widget__traffic-dot--max"aria-label="Zoom widget to fit viewport"title="Zoom widget to fit viewport"data-floe-canvas-interactive=true></button></span><span class=workbench-widget__badge aria-hidden=true></span><button type=button class=workbench-widget__drag aria-label="Drag widget"data-floe-canvas-interactive=true></button><div class=workbench-widget__title-area><span class=workbench-widget__title-dot aria-hidden=true></span><span class=workbench-widget__title></span></div><span class=workbench-widget__window-controls role=group aria-label="Window controls"><button type=button class="workbench-widget__window-control workbench-widget__window-control--min"aria-label="Minimize widget to overview"title="Minimize widget to overview"data-floe-canvas-interactive=true></button><button type=button class="workbench-widget__window-control workbench-widget__window-control--max"aria-label="Zoom widget to fit viewport"title="Zoom widget to fit viewport"data-floe-canvas-interactive=true></button><button type=button class="workbench-widget__window-control workbench-widget__window-control--close"aria-label="Remove widget"title="Remove widget"data-floe-canvas-interactive=true></button></span></header><div class=workbench-widget__body data-floe-canvas-interactive=true>'), Ze = /* @__PURE__ */ dt('<div class=workbench-widget__resize aria-label="Resize widget"data-floe-canvas-interactive=true><svg class=workbench-widget__resize-glyph viewBox="0 0 12 12"aria-hidden=true><path d="M12 0 L0 12"></path><path d="M12 4 L4 12"></path><path d="M12 8 L8 12">');
13
+ const Ge = 220, Ke = 160, Ue = 160;
14
+ function so(r) {
15
+ const [W, ut] = k(), Ht = (t) => {
16
16
  if (v(W)) throw new Error("A Workbench widget supports one header contribution");
17
17
  return ut(t), () => {
18
18
  v(W) === t && ut(void 0);
19
19
  };
20
- }, Z = c(() => r.definition), w = c(() => r.widgetId), K = c(() => r.widgetTitle), wt = c(() => r.widgetType), z = c(() => r.itemSnapshot), gt = c(() => r.renderLayer), Ht = c(() => r.visualFront), ht = c(() => r.motion ?? null), ft = c(() => r.topRenderLayer), jt = c(() => r.viewport), U = c(() => r.onSelect), Ot = c(() => r.onActivate), Vt = c(() => r.onContextMenu), J = c(() => r.onClaimVisualFrontOwner), Q = c(() => r.onCommitFront), qt = c(() => r.onCommitMove), Bt = c(() => r.onCommitResize), Nt = c(() => r.onViewportCommit), Gt = c(() => r.onViewportInteractionStart), Zt = c(() => r.onRequestOverview), Kt = c(() => r.onRequestFit), Ut = c(() => r.onRequestDelete), Jt = c(() => r.onLayoutInteractionStart), Qt = c(() => r.onLayoutInteractionEnd), f = h(() => Oe(r.interactionAdapter)), x = c(() => r.selected), $ = c(() => r.locked), tt = c(() => r.filtered), S = c(() => r.layoutMode ?? "canvas_scaled"), te = c(() => r.projectedViewport), ee = c(() => r.surfaceReady ?? !0), pt = c(() => ({
20
+ }, K = c(() => r.definition), g = c(() => r.widgetId), U = c(() => r.widgetTitle), wt = c(() => r.widgetType), z = c(() => r.itemSnapshot), gt = c(() => r.renderLayer), jt = c(() => r.visualFront), ht = c(() => r.motion ?? null), ft = c(() => r.topRenderLayer), Ot = c(() => r.viewport), J = c(() => r.onSelect), Vt = c(() => r.onActivate), qt = c(() => r.onContextMenu), Q = c(() => r.onClaimVisualFrontOwner), tt = c(() => r.onCommitFront), Bt = c(() => r.onCommitMove), Nt = c(() => r.onCommitResize), Zt = c(() => r.onViewportCommit), Gt = c(() => r.onViewportInteractionStart), Kt = c(() => r.onRequestOverview), Ut = c(() => r.onRequestFit), Jt = c(() => r.onRequestDelete), Qt = c(() => r.onLayoutInteractionStart), te = c(() => r.onLayoutInteractionEnd), f = w(() => Ve(r.interactionAdapter)), x = c(() => r.selected), $ = c(() => r.locked), et = c(() => r.filtered), S = c(() => r.layoutMode ?? "canvas_scaled"), ee = c(() => r.projectedViewport), oe = c(() => r.surfaceReady ?? !0), pt = c(() => ({
21
21
  x: r.x,
22
22
  y: r.y
23
23
  })), mt = c(() => ({
24
24
  width: r.width,
25
25
  height: r.height
26
- })), et = c(() => Math.max(r.viewportScale, 1e-3)), [C, X] = k(null), [Y, ot] = k(null), [oe, ne] = k(), [nt, T] = k(!1), [_t, bt] = k(!1), [vt, D] = k({
26
+ })), ot = c(() => Math.max(r.viewportScale, 1e-3)), [C, X] = k(null), [Y, nt] = k(null), [ne, re] = k(), [rt, T] = k(!1), [_t, bt] = k(!1), [vt, D] = k({
27
27
  enabled: !1,
28
28
  scale: 1
29
29
  });
30
- let I, M, E, F = null, re = 0, ie = 0, y = null, A;
30
+ let I, M, E, F = null, ie = 0, ae = 0, y = null, A;
31
31
  const L = /* @__PURE__ */ new Map();
32
- let g;
32
+ let h;
33
33
  const H = () => {
34
34
  typeof window > "u" || A === void 0 || (window.clearTimeout(A), A = void 0);
35
35
  }, St = (t, e) => {
36
- const n = Me({
36
+ const n = Ee({
37
37
  kind: t,
38
38
  cursor: e
39
39
  });
40
40
  let o = !1;
41
- return v(() => Jt()?.()), () => {
42
- o || (o = !0, n(), v(() => Qt()?.()));
41
+ return v(() => Qt()?.()), () => {
42
+ o || (o = !0, n(), v(() => te()?.()));
43
43
  };
44
44
  }, kt = () => {
45
45
  E?.stop(), E = void 0, F = null;
46
- }, ae = () => {
47
- const t = jt(), e = Nt(), n = Gt();
48
- !t || !e || (F = t, E?.stop(), E = Fe({
46
+ }, ce = () => {
47
+ const t = Ot(), e = Zt(), n = Gt();
48
+ !t || !e || (F = t, E?.stop(), E = He({
49
49
  readFrame: () => {
50
- const o = g?.closest(He);
51
- return o instanceof HTMLElement ? je(o) : null;
50
+ const o = h?.closest(je);
51
+ return o instanceof HTMLElement ? Oe(o) : null;
52
52
  },
53
53
  readViewport: () => F ?? t,
54
54
  commitViewport: (o) => {
@@ -68,7 +68,7 @@ function lo(r) {
68
68
  shouldPan: () => C() !== null
69
69
  }));
70
70
  };
71
- Rt(() => {
71
+ zt(() => {
72
72
  kt(), I?.stop({
73
73
  reason: "manual_stop",
74
74
  commit: !1
@@ -78,76 +78,76 @@ function lo(r) {
78
78
  }), M = void 0, v(C)?.stopInteraction(), v(Y)?.stopInteraction(), H();
79
79
  });
80
80
  const j = () => {
81
- const t = w(), e = Ot();
81
+ const t = g(), e = Vt();
82
82
  if (e) {
83
83
  T(!0), bt(!0), e(t);
84
84
  return;
85
85
  }
86
- T(!1), U()(t), Q()(t);
87
- }, ce = () => {
86
+ T(!1), J()(t), tt()(t);
87
+ }, le = () => {
88
88
  if (gt() >= ft()) {
89
- J()(w());
89
+ Q()(g());
90
90
  return;
91
91
  }
92
- Q()(w());
93
- }, rt = () => {
92
+ tt()(g());
93
+ }, it = () => {
94
94
  T(!1);
95
- }, R = h(() => x() || nt());
95
+ }, R = w(() => x() || rt());
96
96
  st(() => {
97
97
  !_t() || !x() || (bt(!1), T(!1));
98
98
  });
99
- const le = (t, e, n) => {
99
+ const se = (t, e, n) => {
100
100
  const o = {
101
- token: ++ie,
101
+ token: ++ae,
102
102
  wasSelected: e,
103
103
  ownership: n
104
104
  };
105
105
  L.set(t, o), !e && n === "widget_local" && T(!0), queueMicrotask(() => {
106
106
  L.get(t)?.token === o.token && L.delete(t);
107
107
  });
108
- }, se = (t) => {
108
+ }, de = (t) => {
109
109
  const e = L.get(t) ?? null;
110
110
  return e && L.delete(t), e;
111
111
  };
112
112
  st(() => {
113
- const t = g;
113
+ const t = h;
114
114
  if (!t) return;
115
115
  const e = (i) => {
116
- i.button === 0 && le(i.pointerId, R(), q(i.target));
116
+ i.button === 0 && se(i.pointerId, R(), q(i.target));
117
117
  }, n = (i) => {
118
118
  if (i.button === 0 && q(i.target) === "widget_local") {
119
- if (nt()) {
119
+ if (rt()) {
120
120
  j();
121
121
  return;
122
122
  }
123
- x() && ce();
123
+ x() && le();
124
124
  }
125
125
  }, o = () => {
126
126
  setTimeout(() => {
127
- x() || rt();
127
+ x() || it();
128
128
  }, 0);
129
129
  };
130
- t.addEventListener("pointerdown", e, !0), t.addEventListener("click", n, !0), t.addEventListener("pointerup", o), t.addEventListener("pointercancel", rt), Rt(() => {
131
- t.removeEventListener("pointerdown", e, !0), t.removeEventListener("click", n, !0), t.removeEventListener("pointerup", o), t.removeEventListener("pointercancel", rt);
130
+ t.addEventListener("pointerdown", e, !0), t.addEventListener("click", n, !0), t.addEventListener("pointerup", o), t.addEventListener("pointercancel", it), zt(() => {
131
+ t.removeEventListener("pointerdown", e, !0), t.removeEventListener("click", n, !0), t.removeEventListener("pointerup", o), t.removeEventListener("pointercancel", it);
132
132
  });
133
133
  });
134
- const O = () => C() !== null, V = () => Y() !== null, de = h(() => tt() ? "cold" : R() ? "hot" : $() ? "cold" : "warm"), q = (t) => f().resolveWidgetEventOwnership({
134
+ const O = () => C() !== null, V = () => Y() !== null, ue = w(() => et() ? "cold" : R() ? "hot" : $() ? "cold" : "warm"), q = (t) => f().resolveWidgetEventOwnership({
135
135
  target: t,
136
- widgetRoot: g ?? null,
136
+ widgetRoot: h ?? null,
137
137
  interactiveSelector: f().interactiveSelector,
138
138
  panSurfaceSelector: f().panSurfaceSelector
139
- }), ue = (t) => {
140
- j(), t?.focus !== !1 && g?.focus({
139
+ }), we = (t) => {
140
+ j(), t?.focus !== !1 && h?.focus({
141
141
  preventScroll: !0
142
142
  });
143
143
  }, $t = (t) => {
144
- ne((e) => ({
144
+ re((e) => ({
145
145
  seq: (e?.seq ?? 0) + 1,
146
146
  source: "local_pointer",
147
147
  pointerType: t
148
148
  }));
149
- }, we = (t) => {
150
- if (!(!g || !t.isConnected || !g.contains(t)))
149
+ }, ge = (t) => {
150
+ if (!(!h || !t.isConnected || !h.contains(t)))
151
151
  try {
152
152
  t.focus({
153
153
  preventScroll: !0
@@ -155,9 +155,9 @@ function lo(r) {
155
155
  } catch {
156
156
  t.focus();
157
157
  }
158
- }, ge = (t, e) => {
158
+ }, he = (t, e) => {
159
159
  y = {
160
- token: ++re,
160
+ token: ++ie,
161
161
  pointerId: t,
162
162
  target: e,
163
163
  timestamp: Date.now()
@@ -165,7 +165,7 @@ function lo(r) {
165
165
  const n = y;
166
166
  queueMicrotask(() => {
167
167
  const o = () => {
168
- !n || y?.token !== n.token || (we(n.target), y = null);
168
+ !n || y?.token !== n.token || (ge(n.target), y = null);
169
169
  };
170
170
  if (typeof requestAnimationFrame == "function") {
171
171
  requestAnimationFrame(() => o());
@@ -173,33 +173,33 @@ function lo(r) {
173
173
  }
174
174
  o();
175
175
  });
176
- }, he = (t) => {
176
+ }, fe = (t) => {
177
177
  if (t.button !== 0 || $()) return;
178
- const e = se(t.pointerId), n = e?.wasSelected ?? x(), o = e?.ownership ?? q(t.target), i = o === "widget_local" ? Re({
178
+ const e = de(t.pointerId), n = e?.wasSelected ?? x(), o = e?.ownership ?? q(t.target), i = o === "widget_local" ? ze({
179
179
  target: t.target,
180
- widgetRoot: g ?? null,
180
+ widgetRoot: h ?? null,
181
181
  interactiveSelector: f().interactiveSelector,
182
182
  panSurfaceSelector: f().panSurfaceSelector
183
- }) : null, s = o === "widget_local" ? ze({
183
+ }) : null, s = o === "widget_local" ? Xe({
184
184
  target: t.target,
185
- widgetRoot: g ?? null,
185
+ widgetRoot: h ?? null,
186
186
  interactiveSelector: f().interactiveSelector,
187
187
  panSurfaceSelector: f().panSurfaceSelector
188
- }) : null, l = o === "widget_local" && !i && !s && Xe({
188
+ }) : null, l = o === "widget_local" && !i && !s && Ye({
189
189
  target: t.target,
190
- widgetRoot: g ?? null,
190
+ widgetRoot: h ?? null,
191
191
  interactiveSelector: f().interactiveSelector,
192
192
  panSurfaceSelector: f().panSurfaceSelector
193
193
  });
194
194
  if (o === "widget_shell") {
195
- j(), g?.focus({
195
+ j(), h?.focus({
196
196
  preventScroll: !0
197
197
  });
198
198
  return;
199
199
  }
200
200
  if (o === "widget_local") {
201
201
  if (i) {
202
- n || ge(t.pointerId, i);
202
+ n || he(t.pointerId, i);
203
203
  return;
204
204
  }
205
205
  if (s) {
@@ -214,35 +214,35 @@ function lo(r) {
214
214
  j(), $t(t.pointerType || void 0);
215
215
  }
216
216
  }
217
- }, B = h(() => {
217
+ }, B = w(() => {
218
218
  const t = C();
219
219
  return t ? {
220
220
  x: t.worldX,
221
221
  y: t.worldY
222
222
  } : pt();
223
- }), m = h(() => {
223
+ }), m = w(() => {
224
224
  const t = Y();
225
225
  return t ? {
226
226
  width: t.width,
227
227
  height: t.height
228
228
  } : mt();
229
- }), it = h(() => {
230
- const t = te();
229
+ }), at = w(() => {
230
+ const t = ee();
231
231
  if (!(S() !== "projected_surface" || !t))
232
- return Ye({
233
- widgetId: w(),
232
+ return De({
233
+ widgetId: g(),
234
234
  worldX: B().x,
235
235
  worldY: B().y,
236
236
  worldWidth: m().width,
237
237
  worldHeight: m().height,
238
238
  viewport: t(),
239
- ready: ee()
239
+ ready: oe()
240
240
  });
241
- }), at = h(() => it()?.rect.viewportScale ?? et()), yt = h(() => S() === "projected_surface" && De(Z()) === "settle_sharp_zoom"), Pt = h(() => S() === "projected_surface" && yt() && vt().enabled && vt().scale > 1.001), fe = h(() => {
241
+ }), N = w(() => at()?.rect.viewportScale ?? ot()), yt = w(() => Fe(K())), Pt = w(() => S() === "projected_surface" && yt() === "settle_sharp_zoom"), Wt = w(() => S() === "projected_surface" && (yt() === "compact_zoom" && N() < 1 || Pt() && vt().enabled && vt().scale > 1.001)), pe = w(() => {
242
242
  if (S() !== "projected_surface")
243
243
  return;
244
- const t = at();
245
- return Pt() ? {
244
+ const t = N();
245
+ return Wt() ? {
246
246
  width: `${m().width}px`,
247
247
  height: `${m().height}px`,
248
248
  zoom: `${t}`
@@ -251,21 +251,21 @@ function lo(r) {
251
251
  height: "100%",
252
252
  zoom: "1"
253
253
  };
254
- }), pe = h(() => {
254
+ }), me = w(() => {
255
255
  const t = z()().z_index, e = Number.isFinite(t) ? Math.max(1, Math.min(99, Math.round(t))) : 1;
256
256
  return String(e).padStart(2, "0");
257
- }), Wt = (t) => {
258
- t.preventDefault(), t.stopPropagation(), Zt()(z()());
259
- }, xt = (t) => {
257
+ }), xt = (t) => {
260
258
  t.preventDefault(), t.stopPropagation(), Kt()(z()());
261
259
  }, Ct = (t) => {
262
- t.preventDefault(), t.stopPropagation(), Ut()(w());
263
- }, me = h(() => {
260
+ t.preventDefault(), t.stopPropagation(), Ut()(z()());
261
+ }, Tt = (t) => {
262
+ t.preventDefault(), t.stopPropagation(), Jt()(g());
263
+ }, _e = w(() => {
264
264
  const t = {
265
- "z-index": O() || V() || Ht() ? `${ft() + 1}` : `${gt()}`
265
+ "z-index": O() || V() || jt() ? `${ft() + 1}` : `${gt()}`
266
266
  };
267
267
  if (S() === "projected_surface") {
268
- const e = it()?.rect, n = at(), o = Pt(), i = o ? e?.screenWidth ?? m().width * n : m().width, s = o ? e?.screenHeight ?? m().height * n : m().height;
268
+ const e = at()?.rect, n = N(), o = Wt(), i = o ? e?.screenWidth ?? m().width * n : m().width, s = o ? e?.screenHeight ?? m().height * n : m().height;
269
269
  return {
270
270
  ...t,
271
271
  width: `${i}px`,
@@ -280,16 +280,16 @@ function lo(r) {
280
280
  height: `${m().height}px`,
281
281
  transform: `translate(${B().x}px, ${B().y}px)`
282
282
  };
283
- }), Tt = h(() => ht()?.phase === "enter");
283
+ }), It = w(() => ht()?.phase === "enter");
284
284
  st(() => {
285
- if (!yt()) {
285
+ if (!Pt()) {
286
286
  H(), D({
287
287
  enabled: !1,
288
288
  scale: 1
289
289
  });
290
290
  return;
291
291
  }
292
- const t = at();
292
+ const t = N();
293
293
  if (t <= 1.001 || O() || V()) {
294
294
  H(), D({
295
295
  enabled: !1,
@@ -309,9 +309,9 @@ function lo(r) {
309
309
  enabled: !0,
310
310
  scale: e
311
311
  } : n);
312
- }, Ke);
312
+ }, Ue);
313
313
  });
314
- const _e = (t) => {
314
+ const be = (t) => {
315
315
  const e = v(C);
316
316
  if (!e) return;
317
317
  const n = {
@@ -320,19 +320,19 @@ function lo(r) {
320
320
  }, o = {
321
321
  x: e.startWorldX,
322
322
  y: e.startWorldY
323
- }, i = t && (Math.abs(n.x - o.x) > 1 || Math.abs(n.y - o.y) > 1), s = w();
324
- Q()(s), i && qt()(s, n), e.stopInteraction(), kt(), X(null), I = void 0;
325
- }, It = (t) => {
323
+ }, i = t && (Math.abs(n.x - o.x) > 1 || Math.abs(n.y - o.y) > 1), s = g();
324
+ tt()(s), i && Bt()(s, n), e.stopInteraction(), kt(), X(null), I = void 0;
325
+ }, Mt = (t) => {
326
326
  if (t.button !== 0 || $()) return;
327
327
  t.preventDefault(), t.stopPropagation(), I?.stop({
328
328
  reason: "manual_stop",
329
329
  commit: !1
330
330
  });
331
- const e = w();
332
- U()(e), g?.focus({
331
+ const e = g();
332
+ J()(e), h?.focus({
333
333
  preventScroll: !0
334
- }), J()(e);
335
- const n = St("drag", "grabbing"), o = et(), i = pt();
334
+ }), Q()(e);
335
+ const n = St("drag", "grabbing"), o = ot(), i = pt();
336
336
  X({
337
337
  pointerId: t.pointerId,
338
338
  startClientX: t.clientX,
@@ -346,7 +346,7 @@ function lo(r) {
346
346
  moved: !1,
347
347
  scale: o,
348
348
  stopInteraction: n
349
- }), ae();
349
+ }), ce();
350
350
  const s = (l) => {
351
351
  E?.updatePointer(l.clientX, l.clientY), X((d) => {
352
352
  if (!d || d.pointerId !== l.pointerId) return d;
@@ -359,30 +359,30 @@ function lo(r) {
359
359
  };
360
360
  });
361
361
  };
362
- I = Dt({
362
+ I = Ft({
363
363
  pointerEvent: t,
364
364
  captureEl: t.currentTarget,
365
365
  onMove: s,
366
366
  onEnd: ({
367
367
  commit: l
368
- }) => _e(l)
368
+ }) => be(l)
369
369
  });
370
- }, be = (t) => {
370
+ }, ve = (t) => {
371
371
  const e = v(Y);
372
372
  if (!e) return;
373
373
  const n = {
374
374
  width: e.width,
375
375
  height: e.height
376
376
  }, o = Math.abs(e.width - e.startWidth) > 1 || Math.abs(e.height - e.startHeight) > 1;
377
- t && o && Bt()(w(), n), e.stopInteraction(), ot(null), M = void 0;
378
- }, ve = (t) => {
377
+ t && o && Nt()(g(), n), e.stopInteraction(), nt(null), M = void 0;
378
+ }, Se = (t) => {
379
379
  if (t.button !== 0 || $()) return;
380
380
  t.preventDefault(), t.stopPropagation(), M?.stop({
381
381
  reason: "manual_stop",
382
382
  commit: !1
383
- }), J()(w());
384
- const e = St("resize", "nwse-resize"), n = et(), o = mt();
385
- ot({
383
+ }), Q()(g());
384
+ const e = St("resize", "nwse-resize"), n = ot(), o = mt();
385
+ nt({
386
386
  pointerId: t.pointerId,
387
387
  startClientX: t.clientX,
388
388
  startClientY: t.clientY,
@@ -394,9 +394,9 @@ function lo(r) {
394
394
  stopInteraction: e
395
395
  });
396
396
  const i = (s) => {
397
- ot((l) => {
397
+ nt((l) => {
398
398
  if (!l || l.pointerId !== s.pointerId) return l;
399
- const d = Math.max(Ge, l.startWidth + (s.clientX - l.startClientX) / l.scale), _ = Math.max(Ze, l.startHeight + (s.clientY - l.startClientY) / l.scale);
399
+ const d = Math.max(Ge, l.startWidth + (s.clientX - l.startClientX) / l.scale), _ = Math.max(Ke, l.startHeight + (s.clientY - l.startClientY) / l.scale);
400
400
  return {
401
401
  ...l,
402
402
  width: d,
@@ -404,18 +404,18 @@ function lo(r) {
404
404
  };
405
405
  });
406
406
  };
407
- M = Dt({
407
+ M = Ft({
408
408
  pointerEvent: t,
409
409
  captureEl: t.currentTarget,
410
410
  onMove: i,
411
411
  onEnd: ({
412
412
  commit: s
413
- }) => be(s)
413
+ }) => ve(s)
414
414
  });
415
415
  };
416
416
  return (() => {
417
- var t = Be(), e = t.firstChild, n = e.firstChild, o = n.firstChild, i = o.firstChild, s = i.nextSibling, l = s.nextSibling, d = o.nextSibling, _ = d.nextSibling, P = _.nextSibling, Se = P.firstChild, ct = Se.nextSibling, Mt = P.nextSibling, N = Mt.firstChild, G = N.nextSibling, lt = G.nextSibling, ke = n.nextSibling, Et = g;
418
- return typeof Et == "function" ? Ce(Et, t) : g = t, Lt(t, $e({
417
+ var t = Ne(), e = t.firstChild, n = e.firstChild, o = n.firstChild, i = o.firstChild, s = i.nextSibling, l = s.nextSibling, d = o.nextSibling, _ = d.nextSibling, P = _.nextSibling, ke = P.firstChild, ct = ke.nextSibling, Et = P.nextSibling, Z = Et.firstChild, G = Z.nextSibling, lt = G.nextSibling, $e = n.nextSibling, At = h;
418
+ return typeof At == "function" ? Te(At, t) : h = t, Rt(t, ye({
419
419
  get "data-floe-surface-interacting"() {
420
420
  return O() || V() ? "true" : void 0;
421
421
  },
@@ -424,22 +424,22 @@ function lo(r) {
424
424
  "is-selected": R(),
425
425
  "is-dragging": O(),
426
426
  "is-resizing": V(),
427
- "is-filtered-out": tt(),
427
+ "is-filtered-out": et(),
428
428
  "is-projected-surface": S() === "projected_surface",
429
429
  "is-locked": $(),
430
- "is-entering": Tt()
430
+ "is-entering": It()
431
431
  };
432
432
  }
433
433
  }, () => ({
434
434
  [f().dialogSurfaceHostAttr]: "true"
435
435
  }), {
436
436
  get "data-floe-workbench-widget-id"() {
437
- return w();
437
+ return g();
438
438
  }
439
439
  }, () => ({
440
440
  [f().widgetRootAttr]: "true"
441
441
  }), () => ({
442
- [f().widgetIdAttr]: w()
442
+ [f().widgetIdAttr]: g()
443
443
  }), {
444
444
  get "data-workbench-widget-type"() {
445
445
  return wt();
@@ -448,78 +448,78 @@ function lo(r) {
448
448
  return S();
449
449
  },
450
450
  get "data-workbench-widget-motion"() {
451
- return Tt() ? "enter" : void 0;
451
+ return It() ? "enter" : void 0;
452
452
  }
453
453
  }, () => ({
454
- [Ae]: R() ? "true" : void 0
454
+ [Le]: R() ? "true" : void 0
455
455
  }), {
456
456
  tabIndex: 0,
457
- onPointerDown: he,
457
+ onPointerDown: fe,
458
458
  onFocus: () => {
459
- nt() || _t() || U()(w());
459
+ rt() || _t() || J()(g());
460
460
  },
461
461
  onContextMenu: (a) => {
462
- q(a.target) === "widget_shell" && (a.preventDefault(), a.stopPropagation(), Vt()(a, z()()));
462
+ q(a.target) === "widget_shell" && (a.preventDefault(), a.stopPropagation(), qt()(a, z()()));
463
463
  },
464
464
  get style() {
465
- return me();
465
+ return _e();
466
466
  }
467
- }), !1, !0), n.$$pointerdown = It, Lt(n, {
468
- [Le]: "true"
469
- }, !1, !0), i.$$click = Ct, i.$$pointerdown = (a) => a.stopPropagation(), u(i, p(zt, {
467
+ }), !1, !0), n.$$pointerdown = Mt, Rt(n, {
468
+ [Re]: "true"
469
+ }, !1, !0), i.$$click = Tt, i.$$pointerdown = (a) => a.stopPropagation(), u(i, p(Xt, {
470
470
  class: "workbench-widget__traffic-icon",
471
471
  "aria-hidden": "true"
472
- })), s.$$click = Wt, s.$$pointerdown = (a) => a.stopPropagation(), u(s, p(Xt, {
472
+ })), s.$$click = xt, s.$$pointerdown = (a) => a.stopPropagation(), u(s, p(Yt, {
473
473
  class: "workbench-widget__traffic-icon",
474
474
  "aria-hidden": "true"
475
- })), l.$$click = xt, l.$$pointerdown = (a) => a.stopPropagation(), u(l, p(Yt, {
475
+ })), l.$$click = Ct, l.$$pointerdown = (a) => a.stopPropagation(), u(l, p(Dt, {
476
476
  class: "workbench-widget__traffic-icon",
477
477
  "aria-hidden": "true"
478
- })), u(d, pe), _.$$pointerdown = It, u(_, p(Ee, {
478
+ })), u(d, me), _.$$pointerdown = Mt, u(_, p(Ae, {
479
479
  class: "w-3.5 h-3.5"
480
480
  })), u(P, () => {
481
- const a = Z().icon;
481
+ const a = K().icon;
482
482
  return p(a, {
483
483
  class: "w-3.5 h-3.5"
484
484
  });
485
- }, ct), u(ct, K), u(n, p(Ie, {
485
+ }, ct), u(ct, U), u(n, p(Me, {
486
486
  get when() {
487
487
  return W()?.actions;
488
488
  },
489
489
  get children() {
490
- var a = qe();
490
+ var a = Be();
491
491
  return a.$$dblclick = (b) => b.stopPropagation(), a.$$pointerdown = (b) => b.stopPropagation(), u(a, () => W()?.actions), a;
492
492
  }
493
- }), Mt), N.$$click = Wt, N.$$pointerdown = (a) => a.stopPropagation(), u(N, p(Xt, {
493
+ }), Et), Z.$$click = xt, Z.$$pointerdown = (a) => a.stopPropagation(), u(Z, p(Yt, {
494
494
  class: "workbench-widget__window-control-icon",
495
495
  "aria-hidden": "true"
496
- })), G.$$click = xt, G.$$pointerdown = (a) => a.stopPropagation(), u(G, p(Yt, {
496
+ })), G.$$click = Ct, G.$$pointerdown = (a) => a.stopPropagation(), u(G, p(Dt, {
497
497
  class: "workbench-widget__window-control-icon",
498
498
  "aria-hidden": "true"
499
- })), lt.$$click = Ct, lt.$$pointerdown = (a) => a.stopPropagation(), u(lt, p(zt, {
499
+ })), lt.$$click = Tt, lt.$$pointerdown = (a) => a.stopPropagation(), u(lt, p(Xt, {
500
500
  class: "workbench-widget__window-control-icon",
501
501
  "aria-hidden": "true"
502
- })), u(ke, p(Ve.Provider, {
503
- value: Ft,
502
+ })), u($e, p(qe.Provider, {
503
+ value: Ht,
504
504
  get children() {
505
505
  return (() => {
506
- const a = Z().body;
506
+ const a = K().body;
507
507
  return p(a, {
508
508
  get widgetId() {
509
- return w();
509
+ return g();
510
510
  },
511
511
  get title() {
512
- return K();
512
+ return U();
513
513
  },
514
514
  get type() {
515
515
  return wt();
516
516
  },
517
- surfaceMetrics: it,
517
+ surfaceMetrics: at,
518
518
  get activation() {
519
- return oe();
519
+ return ne();
520
520
  },
521
521
  get lifecycle() {
522
- return de();
522
+ return ue();
523
523
  },
524
524
  get motion() {
525
525
  return ht();
@@ -528,28 +528,28 @@ function lo(r) {
528
528
  return R();
529
529
  },
530
530
  get filtered() {
531
- return tt();
531
+ return et();
532
532
  },
533
- requestActivate: ue
533
+ requestActivate: we
534
534
  });
535
535
  })();
536
536
  }
537
537
  })), u(e, (() => {
538
- var a = ye(() => !!$());
538
+ var a = Pe(() => !!$());
539
539
  return () => a() ? null : (() => {
540
- var b = Ne();
541
- return b.$$pointerdown = ve, b;
540
+ var b = Ze();
541
+ return b.$$pointerdown = Se, b;
542
542
  })();
543
- })(), null), Pe((a) => {
544
- var b = fe(), At = W()?.titleTooltip || K();
545
- return a.e = We(e, b, a.e), At !== a.t && xe(ct, "title", a.t = At), a;
543
+ })(), null), We((a) => {
544
+ var b = pe(), Lt = W()?.titleTooltip || U();
545
+ return a.e = xe(e, b, a.e), Lt !== a.t && Ce(ct, "title", a.t = Lt), a;
546
546
  }, {
547
547
  e: void 0,
548
548
  t: void 0
549
549
  }), t;
550
550
  })();
551
551
  }
552
- Te(["pointerdown", "click", "dblclick"]);
552
+ Ie(["pointerdown", "click", "dblclick"]);
553
553
  export {
554
- lo as WorkbenchWidget
554
+ so as WorkbenchWidget
555
555
  };