@floegence/floe-webapp-core 0.36.25 → 0.36.27

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,77 +1,86 @@
1
- import { spread as V, mergeProps as vt, insert as l, createComponent as w, memo as kt, template as U, use as St, delegateEvents as $t } from "solid-js/web";
2
- import { createMemo as h, createSignal as z, onCleanup as Z, untrack as f, createEffect as yt } from "solid-js";
3
- import { startHotInteraction as It } from "../../utils/hotInteraction.js";
4
- import { X as G, Minus as K, Maximize as J, GripVertical as pt } from "../icons/index.js";
5
- import { CANVAS_WHEEL_INTERACTIVE_ATTR as Mt, WORKBENCH_WIDGET_SHELL_ATTR as xt, resolveWorkbenchWidgetLocalTypingTarget as Tt, shouldActivateWorkbenchWidgetLocalTarget as Ct } from "../ui/localInteractionSurface.js";
6
- import { startPointerSession as Q } from "../ui/pointerSession.js";
7
- import { createWorkbenchWidgetSurfaceMetrics as Wt } from "./workbenchHelpers.js";
8
- import { resolveWorkbenchInteractionAdapter as Pt } from "./workbenchInteractionAdapter.js";
9
- var zt = /* @__PURE__ */ U('<article class=workbench-widget><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>'), Rt = /* @__PURE__ */ U('<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">');
10
- const At = 220, Lt = 160;
11
- function Bt(e) {
12
- const s = h(() => Pt(e.interactionAdapter)), [S, x] = z(null), [$, T] = z(null), [tt, et] = z();
13
- let m, _, R = 0, it = 0, b = null, v = null;
14
- const k = /* @__PURE__ */ new Map();
1
+ import { spread as G, mergeProps as kt, insert as l, createComponent as w, memo as $t, template as et, use as yt, delegateEvents as pt } from "solid-js/web";
2
+ import { createMemo as g, createSignal as T, onCleanup as K, untrack as f, createEffect as It } from "solid-js";
3
+ import { startHotInteraction as xt } from "../../utils/hotInteraction.js";
4
+ import { X as U, Minus as J, Maximize as Q, GripVertical as Mt } from "../icons/index.js";
5
+ import { CANVAS_WHEEL_INTERACTIVE_ATTR as Ct, WORKBENCH_WIDGET_SHELL_ATTR as Tt, resolveWorkbenchWidgetLocalTypingTarget as Wt, shouldActivateWorkbenchWidgetLocalTarget as Lt } from "../ui/localInteractionSurface.js";
6
+ import { startPointerSession as tt } from "../ui/pointerSession.js";
7
+ import { createWorkbenchWidgetSurfaceMetrics as Pt } from "./workbenchHelpers.js";
8
+ import { resolveWorkbenchInteractionAdapter as zt } from "./workbenchInteractionAdapter.js";
9
+ var Et = /* @__PURE__ */ et('<article class=workbench-widget><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>'), Rt = /* @__PURE__ */ et('<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">');
10
+ const At = 220, Dt = 160;
11
+ function Nt(e) {
12
+ const s = g(() => zt(e.interactionAdapter)), [k, W] = T(null), [$, L] = T(null), [it, nt] = T(), [P, z] = T(!1);
13
+ let m, _, ot = 0, rt = 0, b = null;
14
+ const v = /* @__PURE__ */ new Map();
15
15
  let d;
16
- const A = (t, i) => {
17
- const n = It({
16
+ const D = (t, i) => {
17
+ const a = xt({
18
18
  kind: t,
19
19
  cursor: i
20
20
  });
21
- let r = !1;
21
+ let n = !1;
22
22
  return f(() => e.onLayoutInteractionStart?.()), () => {
23
- r || (r = !0, n(), f(() => e.onLayoutInteractionEnd?.()));
23
+ n || (n = !0, a(), f(() => e.onLayoutInteractionEnd?.()));
24
24
  };
25
25
  };
26
- Z(() => {
26
+ K(() => {
27
27
  m?.stop({
28
28
  reason: "manual_stop",
29
29
  commit: !1
30
30
  }), m = void 0, _?.stop({
31
31
  reason: "manual_stop",
32
32
  commit: !1
33
- }), _ = void 0, f(S)?.stopInteraction(), f($)?.stopInteraction();
33
+ }), _ = void 0, f(k)?.stopInteraction(), f($)?.stopInteraction();
34
34
  });
35
- const C = () => {
36
- e.onSelect(e.widgetId), e.onCommitFront(e.widgetId);
37
- }, nt = (t, i) => {
35
+ const y = () => {
36
+ z(!1), e.onSelect(e.widgetId), e.onCommitFront(e.widgetId);
37
+ }, E = () => {
38
+ z(!1);
39
+ }, S = g(() => e.selected || P()), at = (t, i, a) => {
38
40
  const n = {
39
- token: ++it,
40
- wasSelected: i
41
+ token: ++rt,
42
+ wasSelected: i,
43
+ ownership: a
41
44
  };
42
- k.set(t, n), queueMicrotask(() => {
43
- k.get(t)?.token === n.token && k.delete(t);
44
- }), C();
45
- }, ot = (t) => {
46
- const i = k.get(t) ?? null;
47
- return i && k.delete(t), i;
45
+ v.set(t, n), !i && a === "widget_local" && z(!0), queueMicrotask(() => {
46
+ v.get(t)?.token === n.token && v.delete(t);
47
+ });
48
+ }, ct = (t) => {
49
+ const i = v.get(t) ?? null;
50
+ return i && v.delete(t), i;
48
51
  };
49
- yt(() => {
52
+ It(() => {
50
53
  const t = d;
51
54
  if (!t) return;
52
- const i = (n) => {
53
- n.button === 0 && nt(n.pointerId, e.selected);
55
+ const i = (o) => {
56
+ o.button === 0 && at(o.pointerId, S(), p(o.target));
57
+ }, a = (o) => {
58
+ o.button === 0 && P() && p(o.target) === "widget_local" && y();
59
+ }, n = () => {
60
+ setTimeout(() => {
61
+ e.selected || E();
62
+ }, 0);
54
63
  };
55
- t.addEventListener("pointerdown", i, !0), Z(() => {
56
- t.removeEventListener("pointerdown", i, !0);
64
+ t.addEventListener("pointerdown", i, !0), t.addEventListener("click", a, !0), t.addEventListener("pointerup", n), t.addEventListener("pointercancel", E), K(() => {
65
+ t.removeEventListener("pointerdown", i, !0), t.removeEventListener("click", a, !0), t.removeEventListener("pointerup", n), t.removeEventListener("pointercancel", E);
57
66
  });
58
67
  });
59
- const L = () => S() !== null, D = () => $() !== null, rt = h(() => e.filtered ? "cold" : e.selected ? "hot" : "warm"), X = (t) => s().resolveWidgetEventOwnership({
68
+ const X = () => k() !== null, Y = () => $() !== null, lt = g(() => e.filtered ? "cold" : S() ? "hot" : "warm"), p = (t) => s().resolveWidgetEventOwnership({
60
69
  target: t,
61
70
  widgetRoot: d ?? null,
62
71
  interactiveSelector: s().interactiveSelector,
63
72
  panSurfaceSelector: s().panSurfaceSelector
64
- }), at = () => {
65
- C(), d?.focus({
73
+ }), dt = () => {
74
+ y(), d?.focus({
66
75
  preventScroll: !0
67
76
  });
68
- }, E = (t) => {
69
- et((i) => ({
77
+ }, F = (t) => {
78
+ nt((i) => ({
70
79
  seq: (i?.seq ?? 0) + 1,
71
80
  source: "local_pointer",
72
81
  pointerType: t
73
82
  }));
74
- }, ct = (t) => {
83
+ }, st = (t) => {
75
84
  if (!(!d || !t.isConnected || !d.contains(t)))
76
85
  try {
77
86
  t.focus({
@@ -80,69 +89,58 @@ function Bt(e) {
80
89
  } catch {
81
90
  t.focus();
82
91
  }
83
- }, lt = (t, i) => {
92
+ }, wt = (t, i) => {
84
93
  b = {
85
- token: ++R,
86
- pointerId: t,
87
- pointerType: i,
88
- timestamp: Date.now()
89
- };
90
- const n = b;
91
- queueMicrotask(() => {
92
- !n || b?.token !== n.token || (E(n.pointerType), b = null);
93
- });
94
- }, dt = (t, i) => {
95
- v = {
96
- token: ++R,
94
+ token: ++ot,
97
95
  pointerId: t,
98
96
  target: i,
99
97
  timestamp: Date.now()
100
98
  };
101
- const n = v;
99
+ const a = b;
102
100
  queueMicrotask(() => {
103
- const r = () => {
104
- !n || v?.token !== n.token || (ct(n.target), v = null);
101
+ const n = () => {
102
+ !a || b?.token !== a.token || (st(a.target), b = null);
105
103
  };
106
104
  if (typeof requestAnimationFrame == "function") {
107
- requestAnimationFrame(() => r());
105
+ requestAnimationFrame(() => n());
108
106
  return;
109
107
  }
110
- r();
108
+ n();
111
109
  });
112
- }, st = (t) => {
110
+ }, ut = (t) => {
113
111
  if (t.button !== 0) return;
114
- const i = ot(t.pointerId), n = i?.wasSelected ?? e.selected, r = X(t.target), a = r === "widget_local" ? Tt({
112
+ const i = ct(t.pointerId), a = i?.wasSelected ?? e.selected, n = i?.ownership ?? p(t.target), o = n === "widget_local" ? Wt({
115
113
  target: t.target,
116
114
  widgetRoot: d ?? null,
117
115
  interactiveSelector: s().interactiveSelector,
118
116
  panSurfaceSelector: s().panSurfaceSelector
119
- }) : null, o = r === "widget_local" && !a && Ct({
117
+ }) : null, r = n === "widget_local" && !o && Lt({
120
118
  target: t.target,
121
119
  widgetRoot: d ?? null,
122
120
  interactiveSelector: s().interactiveSelector,
123
121
  panSurfaceSelector: s().panSurfaceSelector
124
122
  });
125
- if (i || C(), r === "widget_shell") {
126
- d?.focus({
123
+ if (n === "widget_shell") {
124
+ y(), d?.focus({
127
125
  preventScroll: !0
128
126
  });
129
127
  return;
130
128
  }
131
- if (r === "widget_local") {
132
- if (a) {
133
- b = null, n || dt(t.pointerId, a);
129
+ if (n === "widget_local") {
130
+ if (o) {
131
+ a || wt(t.pointerId, o);
134
132
  return;
135
133
  }
136
- if (o) {
137
- if (v = null, n) {
138
- E(t.pointerType || void 0);
134
+ if (r) {
135
+ if (b = null, a) {
136
+ F(t.pointerType || void 0);
139
137
  return;
140
138
  }
141
- lt(t.pointerId, t.pointerType || void 0);
139
+ y(), F(t.pointerType || void 0);
142
140
  }
143
141
  }
144
- }, y = h(() => {
145
- const t = S();
142
+ }, I = g(() => {
143
+ const t = k();
146
144
  return t ? {
147
145
  x: t.worldX,
148
146
  y: t.worldY
@@ -150,7 +148,7 @@ function Bt(e) {
150
148
  x: e.x,
151
149
  y: e.y
152
150
  };
153
- }), I = h(() => {
151
+ }), x = g(() => {
154
152
  const t = $();
155
153
  return t ? {
156
154
  width: t.width,
@@ -159,34 +157,34 @@ function Bt(e) {
159
157
  width: e.width,
160
158
  height: e.height
161
159
  };
162
- }), Y = h(() => {
160
+ }), H = g(() => {
163
161
  if (!(e.layoutMode !== "projected_surface" || !e.projectedViewport))
164
- return Wt({
162
+ return Pt({
165
163
  widgetId: e.widgetId,
166
- worldX: y().x,
167
- worldY: y().y,
168
- worldWidth: I().width,
169
- worldHeight: I().height,
164
+ worldX: I().x,
165
+ worldY: I().y,
166
+ worldWidth: x().width,
167
+ worldHeight: x().height,
170
168
  viewport: e.projectedViewport(),
171
169
  ready: e.surfaceReady ?? !0
172
170
  });
173
- }), wt = h(() => {
171
+ }), gt = g(() => {
174
172
  const t = e.itemSnapshot().z_index, i = Number.isFinite(t) ? Math.max(1, Math.min(99, Math.round(t))) : 1;
175
173
  return String(i).padStart(2, "0");
176
- }), F = (t) => {
174
+ }), O = (t) => {
177
175
  t.preventDefault(), t.stopPropagation(), e.onRequestOverview(e.itemSnapshot());
178
- }, H = (t) => {
176
+ }, q = (t) => {
179
177
  t.preventDefault(), t.stopPropagation(), e.onRequestFit(e.itemSnapshot());
180
- }, O = (t) => {
178
+ }, j = (t) => {
181
179
  t.preventDefault(), t.stopPropagation(), e.onRequestDelete(e.widgetId);
182
- }, ut = h(() => {
180
+ }, ht = g(() => {
183
181
  const t = {
184
- width: `${I().width}px`,
185
- height: `${I().height}px`,
186
- "z-index": L() || D() || e.optimisticFront ? `${e.topRenderLayer + 1}` : `${e.renderLayer}`
182
+ width: `${x().width}px`,
183
+ height: `${x().height}px`,
184
+ "z-index": X() || Y() || e.optimisticFront ? `${e.topRenderLayer + 1}` : `${e.renderLayer}`
187
185
  };
188
186
  if (e.layoutMode === "projected_surface") {
189
- const i = Y()?.rect;
187
+ const i = H()?.rect;
190
188
  return {
191
189
  ...t,
192
190
  transform: `translate3d(${i?.screenX ?? 0}px, ${i?.screenY ?? 0}px, 0) scale(${i?.viewportScale ?? Math.max(e.viewportScale, 1e-3)})`
@@ -194,20 +192,20 @@ function Bt(e) {
194
192
  }
195
193
  return {
196
194
  ...t,
197
- transform: `translate(${y().x}px, ${y().y}px)`
195
+ transform: `translate(${I().x}px, ${I().y}px)`
198
196
  };
199
- }), gt = (t) => {
200
- const i = f(S);
197
+ }), ft = (t) => {
198
+ const i = f(k);
201
199
  if (!i) return;
202
- const n = {
200
+ const a = {
203
201
  x: i.worldX,
204
202
  y: i.worldY
205
- }, r = {
203
+ }, n = {
206
204
  x: i.startWorldX,
207
205
  y: i.startWorldY
208
- }, a = t && (Math.abs(n.x - r.x) > 1 || Math.abs(n.y - r.y) > 1);
209
- e.onCommitFront(e.widgetId), a && e.onCommitMove(e.widgetId, n), i.stopInteraction(), x(null), m = void 0;
210
- }, q = (t) => {
206
+ }, o = t && (Math.abs(a.x - n.x) > 1 || Math.abs(a.y - n.y) > 1);
207
+ e.onCommitFront(e.widgetId), o && e.onCommitMove(e.widgetId, a), i.stopInteraction(), W(null), m = void 0;
208
+ }, B = (t) => {
211
209
  if (t.button !== 0 || e.locked) return;
212
210
  t.preventDefault(), t.stopPropagation(), m?.stop({
213
211
  reason: "manual_stop",
@@ -215,8 +213,8 @@ function Bt(e) {
215
213
  }), e.onSelect(e.widgetId), d?.focus({
216
214
  preventScroll: !0
217
215
  }), e.onStartOptimisticFront(e.widgetId);
218
- const i = A("drag", "grabbing"), n = Math.max(e.viewportScale, 1e-3);
219
- x({
216
+ const i = D("drag", "grabbing"), a = Math.max(e.viewportScale, 1e-3);
217
+ W({
220
218
  pointerId: t.pointerId,
221
219
  startClientX: t.clientX,
222
220
  startClientY: t.clientY,
@@ -225,45 +223,45 @@ function Bt(e) {
225
223
  worldX: e.x,
226
224
  worldY: e.y,
227
225
  moved: !1,
228
- scale: n,
226
+ scale: a,
229
227
  stopInteraction: i
230
228
  });
231
- const r = (a) => {
232
- x((o) => {
233
- if (!o || o.pointerId !== a.pointerId) return o;
234
- const g = o.startWorldX + (a.clientX - o.startClientX) / o.scale, u = o.startWorldY + (a.clientY - o.startClientY) / o.scale;
229
+ const n = (o) => {
230
+ W((r) => {
231
+ if (!r || r.pointerId !== o.pointerId) return r;
232
+ const h = r.startWorldX + (o.clientX - r.startClientX) / r.scale, u = r.startWorldY + (o.clientY - r.startClientY) / r.scale;
235
233
  return {
236
- ...o,
237
- worldX: g,
234
+ ...r,
235
+ worldX: h,
238
236
  worldY: u,
239
- moved: o.moved || Math.abs(g - o.startWorldX) > 2 || Math.abs(u - o.startWorldY) > 2
237
+ moved: r.moved || Math.abs(h - r.startWorldX) > 2 || Math.abs(u - r.startWorldY) > 2
240
238
  };
241
239
  });
242
240
  };
243
- m = Q({
241
+ m = tt({
244
242
  pointerEvent: t,
245
243
  captureEl: t.currentTarget,
246
- onMove: r,
244
+ onMove: n,
247
245
  onEnd: ({
248
- commit: a
249
- }) => gt(a)
246
+ commit: o
247
+ }) => ft(o)
250
248
  });
251
- }, ht = (t) => {
249
+ }, mt = (t) => {
252
250
  const i = f($);
253
251
  if (!i) return;
254
- const n = {
252
+ const a = {
255
253
  width: i.width,
256
254
  height: i.height
257
- }, r = Math.abs(i.width - i.startWidth) > 1 || Math.abs(i.height - i.startHeight) > 1;
258
- t && r && e.onCommitResize(e.widgetId, n), i.stopInteraction(), T(null), _ = void 0;
259
- }, ft = (t) => {
255
+ }, n = Math.abs(i.width - i.startWidth) > 1 || Math.abs(i.height - i.startHeight) > 1;
256
+ t && n && e.onCommitResize(e.widgetId, a), i.stopInteraction(), L(null), _ = void 0;
257
+ }, _t = (t) => {
260
258
  if (t.button !== 0 || e.locked) return;
261
259
  t.preventDefault(), t.stopPropagation(), _?.stop({
262
260
  reason: "manual_stop",
263
261
  commit: !1
264
262
  }), e.onStartOptimisticFront(e.widgetId);
265
- const i = A("resize", "nwse-resize"), n = Math.max(e.viewportScale, 1e-3);
266
- T({
263
+ const i = D("resize", "nwse-resize"), a = Math.max(e.viewportScale, 1e-3);
264
+ L({
267
265
  pointerId: t.pointerId,
268
266
  startClientX: t.clientX,
269
267
  startClientY: t.clientY,
@@ -271,37 +269,37 @@ function Bt(e) {
271
269
  startHeight: e.height,
272
270
  width: e.width,
273
271
  height: e.height,
274
- scale: n,
272
+ scale: a,
275
273
  stopInteraction: i
276
274
  });
277
- const r = (a) => {
278
- T((o) => {
279
- if (!o || o.pointerId !== a.pointerId) return o;
280
- const g = Math.max(At, o.startWidth + (a.clientX - o.startClientX) / o.scale), u = Math.max(Lt, o.startHeight + (a.clientY - o.startClientY) / o.scale);
275
+ const n = (o) => {
276
+ L((r) => {
277
+ if (!r || r.pointerId !== o.pointerId) return r;
278
+ const h = Math.max(At, r.startWidth + (o.clientX - r.startClientX) / r.scale), u = Math.max(Dt, r.startHeight + (o.clientY - r.startClientY) / r.scale);
281
279
  return {
282
- ...o,
283
- width: g,
280
+ ...r,
281
+ width: h,
284
282
  height: u
285
283
  };
286
284
  });
287
285
  };
288
- _ = Q({
286
+ _ = tt({
289
287
  pointerEvent: t,
290
288
  captureEl: t.currentTarget,
291
- onMove: r,
289
+ onMove: n,
292
290
  onEnd: ({
293
- commit: a
294
- }) => ht(a)
291
+ commit: o
292
+ }) => mt(o)
295
293
  });
296
294
  };
297
295
  return (() => {
298
- var t = zt(), i = t.firstChild, n = i.firstChild, r = n.firstChild, a = r.nextSibling, o = a.nextSibling, g = n.nextSibling, u = g.nextSibling, W = u.nextSibling, mt = W.firstChild, B = mt.nextSibling, _t = W.nextSibling, p = _t.firstChild, M = p.nextSibling, P = M.nextSibling, bt = i.nextSibling, j = d;
299
- return typeof j == "function" ? St(j, t) : d = t, V(t, vt({
296
+ var t = Et(), i = t.firstChild, a = i.firstChild, n = a.firstChild, o = n.nextSibling, r = o.nextSibling, h = a.nextSibling, u = h.nextSibling, R = u.nextSibling, bt = R.firstChild, N = bt.nextSibling, vt = R.nextSibling, M = vt.firstChild, C = M.nextSibling, A = C.nextSibling, St = i.nextSibling, V = d;
297
+ return typeof V == "function" ? yt(V, t) : d = t, G(t, kt({
300
298
  get classList() {
301
299
  return {
302
- "is-selected": e.selected,
303
- "is-dragging": L(),
304
- "is-resizing": D(),
300
+ "is-selected": S(),
301
+ "is-dragging": X(),
302
+ "is-resizing": Y(),
305
303
  "is-filtered-out": e.filtered,
306
304
  "is-projected-surface": e.layoutMode === "projected_surface",
307
305
  "is-locked": e.locked
@@ -325,47 +323,47 @@ function Bt(e) {
325
323
  return e.layoutMode ?? "canvas_scaled";
326
324
  }
327
325
  }, () => ({
328
- [Mt]: e.selected ? "true" : void 0
326
+ [Ct]: S() ? "true" : void 0
329
327
  }), {
330
328
  tabIndex: 0,
331
- onPointerDown: st,
329
+ onPointerDown: ut,
332
330
  onFocus: () => {
333
- e.onSelect(e.widgetId);
331
+ P() || e.onSelect(e.widgetId);
334
332
  },
335
333
  onContextMenu: (c) => {
336
- X(c.target) === "widget_shell" && (c.preventDefault(), c.stopPropagation(), e.onContextMenu(c, e.itemSnapshot()));
334
+ p(c.target) === "widget_shell" && (c.preventDefault(), c.stopPropagation(), e.onContextMenu(c, e.itemSnapshot()));
337
335
  },
338
336
  get style() {
339
- return ut();
337
+ return ht();
340
338
  }
341
- }), !1, !0), i.$$pointerdown = q, V(i, {
342
- [xt]: "true"
343
- }, !1, !0), r.$$click = O, r.$$pointerdown = (c) => c.stopPropagation(), l(r, w(G, {
339
+ }), !1, !0), i.$$pointerdown = B, G(i, {
340
+ [Tt]: "true"
341
+ }, !1, !0), n.$$click = j, n.$$pointerdown = (c) => c.stopPropagation(), l(n, w(U, {
344
342
  class: "workbench-widget__traffic-icon",
345
343
  "aria-hidden": "true"
346
- })), a.$$click = F, a.$$pointerdown = (c) => c.stopPropagation(), l(a, w(K, {
344
+ })), o.$$click = O, o.$$pointerdown = (c) => c.stopPropagation(), l(o, w(J, {
347
345
  class: "workbench-widget__traffic-icon",
348
346
  "aria-hidden": "true"
349
- })), o.$$click = H, o.$$pointerdown = (c) => c.stopPropagation(), l(o, w(J, {
347
+ })), r.$$click = q, r.$$pointerdown = (c) => c.stopPropagation(), l(r, w(Q, {
350
348
  class: "workbench-widget__traffic-icon",
351
349
  "aria-hidden": "true"
352
- })), l(g, wt), u.$$pointerdown = q, l(u, w(pt, {
350
+ })), l(h, gt), u.$$pointerdown = B, l(u, w(Mt, {
353
351
  class: "w-3.5 h-3.5"
354
- })), l(W, () => {
352
+ })), l(R, () => {
355
353
  const c = e.definition.icon;
356
354
  return w(c, {
357
355
  class: "w-3.5 h-3.5"
358
356
  });
359
- }, B), l(B, () => e.widgetTitle), p.$$click = F, p.$$pointerdown = (c) => c.stopPropagation(), l(p, w(K, {
357
+ }, N), l(N, () => e.widgetTitle), M.$$click = O, M.$$pointerdown = (c) => c.stopPropagation(), l(M, w(J, {
360
358
  class: "workbench-widget__window-control-icon",
361
359
  "aria-hidden": "true"
362
- })), M.$$click = H, M.$$pointerdown = (c) => c.stopPropagation(), l(M, w(J, {
360
+ })), C.$$click = q, C.$$pointerdown = (c) => c.stopPropagation(), l(C, w(Q, {
363
361
  class: "workbench-widget__window-control-icon",
364
362
  "aria-hidden": "true"
365
- })), P.$$click = O, P.$$pointerdown = (c) => c.stopPropagation(), l(P, w(G, {
363
+ })), A.$$click = j, A.$$pointerdown = (c) => c.stopPropagation(), l(A, w(U, {
366
364
  class: "workbench-widget__window-control-icon",
367
365
  "aria-hidden": "true"
368
- })), l(bt, () => {
366
+ })), l(St, () => {
369
367
  const c = e.definition.body;
370
368
  return w(c, {
371
369
  get widgetId() {
@@ -377,31 +375,31 @@ function Bt(e) {
377
375
  get type() {
378
376
  return e.widgetType;
379
377
  },
380
- surfaceMetrics: Y,
378
+ surfaceMetrics: H,
381
379
  get activation() {
382
- return tt();
380
+ return it();
383
381
  },
384
382
  get lifecycle() {
385
- return rt();
383
+ return lt();
386
384
  },
387
385
  get selected() {
388
- return e.selected;
386
+ return S();
389
387
  },
390
388
  get filtered() {
391
389
  return e.filtered;
392
390
  },
393
- requestActivate: at
391
+ requestActivate: dt
394
392
  });
395
393
  }), l(t, (() => {
396
- var c = kt(() => !!e.locked);
394
+ var c = $t(() => !!e.locked);
397
395
  return () => c() ? null : (() => {
398
- var N = Rt();
399
- return N.$$pointerdown = ft, N;
396
+ var Z = Rt();
397
+ return Z.$$pointerdown = _t, Z;
400
398
  })();
401
399
  })(), null), t;
402
400
  })();
403
401
  }
404
- $t(["pointerdown", "click"]);
402
+ pt(["pointerdown", "click"]);
405
403
  export {
406
- Bt as WorkbenchWidget
404
+ Nt as WorkbenchWidget
407
405
  };