@floegence/floe-webapp-core 0.36.22 → 0.36.24

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