@floegence/floe-webapp-core 0.36.38 → 0.36.40

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,20 +1,45 @@
1
- import { insert as g, createComponent as d, effect as D, setAttribute as S, template as L, Portal as Y, setStyleProperty as M, delegateEvents as A } from "solid-js/web";
2
- import { createSignal as I, onCleanup as F, createMemo as H, For as P, Show as x } from "solid-js";
3
- import { Motion as w } from "../../node_modules/.pnpm/solid-motionone@1.0.4_solid-js@1.9.11/node_modules/solid-motionone/dist/index.js";
4
- import { easing as y, duration as C } from "../../utils/animations.js";
5
- import { Layers as R, Plus as T } from "../icons/index.js";
6
- import { startHotInteraction as B } from "../../utils/hotInteraction.js";
7
- import { startPointerSession as G } from "../ui/pointerSession.js";
8
- var q = /* @__PURE__ */ L("<button type=button class=workbench-dock__item>"), z = /* @__PURE__ */ L('<div class=workbench-dock data-floe-canvas-interactive=true><button type=button class=workbench-dock__item aria-label="Show all widgets"></button><span class=workbench-dock__divider aria-hidden=true>'), N = /* @__PURE__ */ L("<div class=workbench-dock-ghost aria-hidden=true><div class=workbench-dock-ghost__halo></div><div class=workbench-dock-ghost__card><div class=workbench-dock-ghost__icon></div><div class=workbench-dock-ghost__copy><div class=workbench-dock-ghost__title></div><div class=workbench-dock-ghost__hint><span>");
9
- const O = 5, V = '[data-floe-workbench-canvas-frame="true"]';
10
- function W(t, l) {
11
- const a = document.querySelector(V);
12
- if (!(a instanceof HTMLElement)) return !1;
13
- const c = a.getBoundingClientRect();
14
- return t >= c.left && t <= c.right && l >= c.top && l <= c.bottom;
1
+ import { insert as _, createComponent as d, effect as M, setAttribute as I, template as X, Portal as K, setStyleProperty as N, delegateEvents as U } from "solid-js/web";
2
+ import { createSignal as R, onCleanup as q, createMemo as z, For as j, Show as x } from "solid-js";
3
+ import { Motion as D } from "../../node_modules/.pnpm/solid-motionone@1.0.4_solid-js@1.9.11/node_modules/solid-motionone/dist/index.js";
4
+ import { easing as L, duration as P } from "../../utils/animations.js";
5
+ import { Layers as J, Plus as Q } from "../icons/index.js";
6
+ import { startHotInteraction as Z } from "../../utils/hotInteraction.js";
7
+ import { startPointerSession as tt } from "../ui/pointerSession.js";
8
+ import { WORKBENCH_EDGE_AUTO_PAN_FRAME_SELECTOR as B, createWorkbenchEdgeAutoPanController as et, frameFromElement as nt } from "./workbenchEdgeAutoPan.js";
9
+ var ot = /* @__PURE__ */ X("<button type=button class=workbench-dock__item>"), rt = /* @__PURE__ */ X('<div class=workbench-dock data-floe-canvas-interactive=true><button type=button class=workbench-dock__item aria-label="Show all widgets"></button><span class=workbench-dock__divider aria-hidden=true>'), it = /* @__PURE__ */ X("<div class=workbench-dock-ghost aria-hidden=true><div class=workbench-dock-ghost__halo></div><div class=workbench-dock-ghost__card><div class=workbench-dock-ghost__icon></div><div class=workbench-dock-ghost__copy><div class=workbench-dock-ghost__title></div><div class=workbench-dock-ghost__hint><span>");
10
+ const H = 5, at = ".workbench-dock";
11
+ function V() {
12
+ const t = document.querySelector(B);
13
+ return t instanceof HTMLElement ? t.getBoundingClientRect() : null;
15
14
  }
16
- function j(t) {
17
- const l = () => t.hoverOffset === -1 ? {
15
+ function A(t, a, r) {
16
+ return t >= r.left && t <= r.right && a >= r.top && a <= r.bottom;
17
+ }
18
+ function lt(t, a) {
19
+ const r = V();
20
+ return r ? A(t, a, r) : !1;
21
+ }
22
+ function st(t, a, r, u) {
23
+ const o = V();
24
+ if (!o) return !1;
25
+ if (A(t, a, o) || A(r, u, o))
26
+ return !0;
27
+ const n = r - t, c = u - a;
28
+ let v = 0, g = 1;
29
+ const f = (h, E) => {
30
+ if (h === 0) return E >= 0;
31
+ const m = E / h;
32
+ return h < 0 ? m > g ? !1 : (m > v && (v = m), !0) : m < v ? !1 : (m < g && (g = m), !0);
33
+ };
34
+ return f(-n, t - o.left) && f(n, o.right - t) && f(-c, a - o.top) && f(c, o.bottom - a);
35
+ }
36
+ function T(t, a) {
37
+ if (typeof document.elementFromPoint != "function") return !1;
38
+ const r = document.elementFromPoint(t, a);
39
+ return r instanceof Element && r.closest(at) !== null;
40
+ }
41
+ function ct(t) {
42
+ const a = () => t.hoverOffset === -1 ? {
18
43
  scale: 1.26,
19
44
  y: -6,
20
45
  x: 0
@@ -30,20 +55,20 @@ function j(t) {
30
55
  scale: 1,
31
56
  y: 0,
32
57
  x: 0
33
- }, a = () => t.hoverOffset === -1, c = (i) => {
34
- i.button === 0 && t.onDragBegin(i, t.type, t.label, t.icon);
58
+ }, r = () => t.hoverOffset === -1, u = (o) => {
59
+ o.button === 0 && t.onDragBegin(o, t.type, t.label, t.icon);
35
60
  };
36
61
  return (() => {
37
- var i = q();
38
- return i.$$pointerdown = c, i.addEventListener("pointerleave", () => t.onLeave()), i.addEventListener("pointerenter", () => t.onEnter()), g(i, d(w.span, {
62
+ var o = ot();
63
+ return o.$$pointerdown = u, o.addEventListener("pointerleave", () => t.onLeave()), o.addEventListener("pointerenter", () => t.onEnter()), _(o, d(D.span, {
39
64
  class: "workbench-dock__tile",
40
65
  get animate() {
41
- return l();
66
+ return a();
42
67
  },
43
68
  get transition() {
44
69
  return {
45
- duration: C.fast,
46
- easing: y.easeOut
70
+ duration: P.fast,
71
+ easing: L.easeOut
47
72
  };
48
73
  },
49
74
  get children() {
@@ -54,208 +79,229 @@ function j(t) {
54
79
  });
55
80
  })();
56
81
  }
57
- }), null), g(i, d(w.span, {
82
+ }), null), _(o, d(D.span, {
58
83
  class: "workbench-dock__tooltip",
59
84
  get animate() {
60
85
  return {
61
- opacity: a() ? 1 : 0,
62
- y: a() ? -6 : 0
86
+ opacity: r() ? 1 : 0,
87
+ y: r() ? -6 : 0
63
88
  };
64
89
  },
65
90
  get transition() {
66
91
  return {
67
- duration: C.fast,
68
- easing: y.easeOut
92
+ duration: P.fast,
93
+ easing: L.easeOut
69
94
  };
70
95
  },
71
96
  get children() {
72
97
  return t.label;
73
98
  }
74
- }), null), D((n) => {
75
- var f = !!t.active, k = !!a(), h = !!t.isDragging, _ = `${t.label} — click to solo, drag to canvas to create`, b = t.active;
76
- return f !== n.e && i.classList.toggle("is-active", n.e = f), k !== n.t && i.classList.toggle("is-hovered", n.t = k), h !== n.a && i.classList.toggle("is-source-dragging", n.a = h), _ !== n.o && S(i, "aria-label", n.o = _), b !== n.i && S(i, "aria-pressed", n.i = b), n;
99
+ }), null), M((n) => {
100
+ var c = !!t.active, v = !!r(), g = !!t.isDragging, f = `${t.label} — click to solo, drag to canvas to create`, h = t.active;
101
+ return c !== n.e && o.classList.toggle("is-active", n.e = c), v !== n.t && o.classList.toggle("is-hovered", n.t = v), g !== n.a && o.classList.toggle("is-source-dragging", n.a = g), f !== n.o && I(o, "aria-label", n.o = f), h !== n.i && I(o, "aria-pressed", n.i = h), n;
77
102
  }, {
78
103
  e: void 0,
79
104
  t: void 0,
80
105
  a: void 0,
81
106
  o: void 0,
82
107
  i: void 0
83
- }), i;
108
+ }), o;
84
109
  })();
85
110
  }
86
- function nt(t) {
87
- const [l, a] = I(null), [c, i] = I(null);
88
- let n;
89
- F(() => {
90
- n?.stop({
111
+ function _t(t) {
112
+ const [a, r] = R(null), [u, o] = R(null);
113
+ let n, c, v = null;
114
+ q(() => {
115
+ c?.stop(), n?.stop({
91
116
  reason: "manual_stop",
92
117
  commit: !1
93
- }), n = void 0, c()?.stopInteraction();
118
+ }), n = void 0, u()?.stopInteraction();
94
119
  });
95
- const f = H(() => t.widgetDefinitions.every((o) => t.filters[o.type])), k = (o) => {
96
- const r = l();
97
- return r === null ? 0 : r === o ? -1 : r === o + 1 ? -2 : r === o - 1 ? 1 : 0;
98
- }, h = (o) => {
99
- const r = c();
100
- if (!r) return;
101
- const e = !r.moved;
102
- if (r.stopInteraction(), i(null), n = void 0, e) {
103
- t.onSoloFilter(r.type);
120
+ const g = z(() => t.widgetDefinitions.every((e) => t.filters[e.type])), f = (e) => {
121
+ const i = a();
122
+ return i === null ? 0 : i === e ? -1 : i === e + 1 ? -2 : i === e - 1 ? 1 : 0;
123
+ }, h = () => {
124
+ c?.stop(), c = void 0, v = null;
125
+ }, E = () => {
126
+ !t.viewport || !t.onViewportCommit || (v = t.viewport, c?.stop(), c = et({
127
+ readFrame: () => {
128
+ const e = document.querySelector(B);
129
+ return e instanceof HTMLElement ? nt(e) : null;
130
+ },
131
+ readViewport: () => v ?? t.viewport ?? null,
132
+ commitViewport: (e) => {
133
+ v = e, t.onViewportCommit?.(e);
134
+ },
135
+ onPanStart: () => t.onViewportInteractionStart?.("pan"),
136
+ shouldPan: () => {
137
+ const e = u();
138
+ return !!(e?.moved && e.hasEnteredCanvas && !T(e.clientX, e.clientY));
139
+ }
140
+ }));
141
+ }, m = (e) => {
142
+ const i = u();
143
+ if (!i) return;
144
+ const l = !i.moved;
145
+ if (i.stopInteraction(), h(), o(null), n = void 0, l) {
146
+ t.onSoloFilter(i.type);
104
147
  return;
105
148
  }
106
- o && r.overCanvas && t.onCreateAt?.(r.type, r.clientX, r.clientY);
107
- }, _ = (o, r, e, u) => {
108
- o.preventDefault(), n?.stop({
149
+ e && i.overCanvas && t.onCreateAt?.(i.type, i.clientX, i.clientY);
150
+ }, k = (e, i, l, C) => {
151
+ e.preventDefault(), n?.stop({
109
152
  reason: "manual_stop",
110
153
  commit: !1
111
- }), i({
112
- type: r,
113
- label: e,
114
- icon: u,
115
- pointerId: o.pointerId,
116
- startClientX: o.clientX,
117
- startClientY: o.clientY,
118
- clientX: o.clientX,
119
- clientY: o.clientY,
154
+ }), E(), o({
155
+ type: i,
156
+ label: l,
157
+ icon: C,
158
+ pointerId: e.pointerId,
159
+ startClientX: e.clientX,
160
+ startClientY: e.clientY,
161
+ clientX: e.clientX,
162
+ clientY: e.clientY,
120
163
  moved: !1,
121
164
  overCanvas: !1,
122
- stopInteraction: B({
165
+ hasEnteredCanvas: !1,
166
+ stopInteraction: Z({
123
167
  kind: "drag",
124
168
  cursor: "grabbing"
125
169
  })
126
170
  });
127
- const v = (s) => {
128
- i((m) => {
129
- if (!m || m.pointerId !== s.pointerId) return m;
130
- const X = s.clientX - m.startClientX, $ = s.clientY - m.startClientY, E = m.moved || Math.abs(X) > O || Math.abs($) > O;
131
- return {
132
- ...m,
171
+ const w = (s) => {
172
+ let F = !1;
173
+ o((b) => {
174
+ if (!b || b.pointerId !== s.pointerId) return b;
175
+ const G = s.clientX - b.startClientX, p = s.clientY - b.startClientY, S = b.moved || Math.abs(G) > H || Math.abs(p) > H, O = T(s.clientX, s.clientY), Y = S && lt(s.clientX, s.clientY) && !O, W = S && !O && st(b.clientX, b.clientY, s.clientX, s.clientY), $ = b.hasEnteredCanvas || Y || W;
176
+ return F = S && $ && !O, {
177
+ ...b,
133
178
  clientX: s.clientX,
134
179
  clientY: s.clientY,
135
- moved: E,
136
- overCanvas: E && W(s.clientX, s.clientY)
180
+ moved: S,
181
+ overCanvas: Y,
182
+ hasEnteredCanvas: $
137
183
  };
138
- });
184
+ }), F && c?.updatePointer(s.clientX, s.clientY);
139
185
  };
140
- n = G({
141
- pointerEvent: o,
142
- captureEl: o.currentTarget,
143
- onMove: v,
186
+ n = tt({
187
+ pointerEvent: e,
188
+ captureEl: e.currentTarget,
189
+ onMove: w,
144
190
  onEnd: ({
145
191
  commit: s
146
- }) => h(s)
192
+ }) => m(s)
147
193
  });
148
- }, b = () => c()?.type ?? null;
194
+ }, y = () => u()?.type ?? null;
149
195
  return [(() => {
150
- var o = z(), r = o.firstChild;
151
- return r.nextSibling, o.addEventListener("pointerleave", () => a(null)), r.$$click = () => t.onShowAll(), r.addEventListener("pointerleave", () => a((e) => e === 0 ? null : e)), r.addEventListener("pointerenter", () => a(0)), g(r, d(w.span, {
196
+ var e = rt(), i = e.firstChild;
197
+ return i.nextSibling, e.addEventListener("pointerleave", () => r(null)), i.$$click = () => t.onShowAll(), i.addEventListener("pointerleave", () => r((l) => l === 0 ? null : l)), i.addEventListener("pointerenter", () => r(0)), _(i, d(D.span, {
152
198
  class: "workbench-dock__tile",
153
199
  get animate() {
154
200
  return {
155
- scale: l() === 0 ? 1.26 : 1,
156
- y: l() === 0 ? -6 : 0,
157
- x: l() === 1 ? -5 : 0
201
+ scale: a() === 0 ? 1.26 : 1,
202
+ y: a() === 0 ? -6 : 0,
203
+ x: a() === 1 ? -5 : 0
158
204
  };
159
205
  },
160
206
  get transition() {
161
207
  return {
162
- duration: C.fast,
163
- easing: y.easeOut
208
+ duration: P.fast,
209
+ easing: L.easeOut
164
210
  };
165
211
  },
166
212
  get children() {
167
- return d(R, {
213
+ return d(J, {
168
214
  class: "workbench-dock__icon"
169
215
  });
170
216
  }
171
- }), null), g(r, d(w.span, {
217
+ }), null), _(i, d(D.span, {
172
218
  class: "workbench-dock__tooltip",
173
219
  get animate() {
174
220
  return {
175
- opacity: l() === 0 ? 1 : 0,
176
- y: l() === 0 ? -6 : 0
221
+ opacity: a() === 0 ? 1 : 0,
222
+ y: a() === 0 ? -6 : 0
177
223
  };
178
224
  },
179
225
  get transition() {
180
226
  return {
181
- duration: C.fast,
182
- easing: y.easeOut
227
+ duration: P.fast,
228
+ easing: L.easeOut
183
229
  };
184
230
  },
185
231
  children: "Show all widgets"
186
- }), null), g(o, d(P, {
232
+ }), null), _(e, d(j, {
187
233
  get each() {
188
234
  return t.widgetDefinitions;
189
235
  },
190
- children: (e, u) => {
191
- const v = () => u() + 1;
192
- return d(j, {
236
+ children: (l, C) => {
237
+ const w = () => C() + 1;
238
+ return d(ct, {
193
239
  get type() {
194
- return e.type;
240
+ return l.type;
195
241
  },
196
242
  get label() {
197
- return e.label;
243
+ return l.label;
198
244
  },
199
245
  get icon() {
200
- return e.icon;
246
+ return l.icon;
201
247
  },
202
248
  get active() {
203
- return t.filters[e.type];
249
+ return t.filters[l.type];
204
250
  },
205
251
  get hoverOffset() {
206
- return k(v());
252
+ return f(w());
207
253
  },
208
254
  get isDragging() {
209
- return b() === e.type;
255
+ return y() === l.type;
210
256
  },
211
- onEnter: () => a(v()),
212
- onLeave: () => a((s) => s === v() ? null : s),
213
- onSolo: () => t.onSoloFilter(e.type),
214
- onDragBegin: _
257
+ onEnter: () => r(w()),
258
+ onLeave: () => r((s) => s === w() ? null : s),
259
+ onSolo: () => t.onSoloFilter(l.type),
260
+ onDragBegin: k
215
261
  });
216
262
  }
217
- }), null), D((e) => {
218
- var u = !!f(), v = l() === 0, s = f();
219
- return u !== e.e && r.classList.toggle("is-active", e.e = u), v !== e.t && r.classList.toggle("is-hovered", e.t = v), s !== e.a && S(r, "aria-pressed", e.a = s), e;
263
+ }), null), M((l) => {
264
+ var C = !!g(), w = a() === 0, s = g();
265
+ return C !== l.e && i.classList.toggle("is-active", l.e = C), w !== l.t && i.classList.toggle("is-hovered", l.t = w), s !== l.a && I(i, "aria-pressed", l.a = s), l;
220
266
  }, {
221
267
  e: void 0,
222
268
  t: void 0,
223
269
  a: void 0
224
- }), o;
270
+ }), e;
225
271
  })(), d(x, {
226
272
  get when() {
227
- return c()?.moved ?? !1;
273
+ return u()?.moved ?? !1;
228
274
  },
229
275
  get children() {
230
- return d(J, {
231
- state: c
276
+ return d(dt, {
277
+ state: u
232
278
  });
233
279
  }
234
280
  })];
235
281
  }
236
- function J(t) {
237
- const l = () => {
282
+ function dt(t) {
283
+ const a = () => {
238
284
  const n = t.state();
239
285
  return n ? `translate3d(${n.clientX + 14}px, ${n.clientY - 56}px, 0)` : "translate3d(0px, 0px, 0)";
240
- }, a = () => t.state()?.overCanvas ?? !1, c = () => t.state()?.label ?? "", i = () => t.state()?.icon;
241
- return d(Y, {
286
+ }, r = () => t.state()?.overCanvas ?? !1, u = () => t.state()?.label ?? "", o = () => t.state()?.icon;
287
+ return d(K, {
242
288
  get children() {
243
- var n = N(), f = n.firstChild, k = f.nextSibling, h = k.firstChild, _ = h.nextSibling, b = _.firstChild, o = b.nextSibling, r = o.firstChild;
244
- return g(h, d(x, {
289
+ var n = it(), c = n.firstChild, v = c.nextSibling, g = v.firstChild, f = g.nextSibling, h = f.firstChild, E = h.nextSibling, m = E.firstChild;
290
+ return _(g, d(x, {
245
291
  get when() {
246
- return i();
292
+ return o();
247
293
  },
248
- children: (e) => {
249
- const u = e();
250
- return d(u, {
294
+ children: (k) => {
295
+ const y = k();
296
+ return d(y, {
251
297
  class: "w-4 h-4"
252
298
  });
253
299
  }
254
- })), g(b, c), g(o, d(T, {
300
+ })), _(h, u), _(E, d(Q, {
255
301
  class: "w-3 h-3"
256
- }), r), g(r, () => a() ? "Drop to create" : "Drag onto canvas"), D((e) => {
257
- var u = !!a(), v = l();
258
- return u !== e.e && n.classList.toggle("is-over-canvas", e.e = u), v !== e.t && M(n, "transform", e.t = v), e;
302
+ }), m), _(m, () => r() ? "Drop to create" : "Drag onto canvas"), M((k) => {
303
+ var y = !!r(), e = a();
304
+ return y !== k.e && n.classList.toggle("is-over-canvas", k.e = y), e !== k.t && N(n, "transform", k.t = e), k;
259
305
  }, {
260
306
  e: void 0,
261
307
  t: void 0
@@ -263,7 +309,7 @@ function J(t) {
263
309
  }
264
310
  });
265
311
  }
266
- A(["pointerdown", "click"]);
312
+ U(["pointerdown", "click"]);
267
313
  export {
268
- nt as WorkbenchFilterBar
314
+ _t as WorkbenchFilterBar
269
315
  };
@@ -1,8 +1,8 @@
1
- import { use as _, spread as B, mergeProps as q, insert as m, createComponent as u, Portal as N, addEventListener as z, template as A, delegateEvents as H } from "solid-js/web";
2
- import { createSignal as M, createMemo as w, untrack as W, createEffect as v, onCleanup as h, Show as P } from "solid-js";
3
- import { clientToCanvasWorld as X } from "../ui/canvasGeometry.js";
4
- import { WorkbenchCanvas as $ } from "./WorkbenchCanvas.js";
5
- import { WorkbenchContextMenu as V } from "./WorkbenchContextMenu.js";
1
+ import { use as _, spread as B, mergeProps as q, insert as m, createComponent as u, Portal as V, addEventListener as N, template as A, delegateEvents as z } from "solid-js/web";
2
+ import { createSignal as M, createMemo as w, untrack as W, createEffect as v, onCleanup as h, Show as H } from "solid-js";
3
+ import { clientToCanvasWorld as P } from "../ui/canvasGeometry.js";
4
+ import { WorkbenchCanvas as X } from "./WorkbenchCanvas.js";
5
+ import { WorkbenchContextMenu as $ } from "./WorkbenchContextMenu.js";
6
6
  import { WorkbenchFilterBar as Y } from "./WorkbenchFilterBar.js";
7
7
  import { WorkbenchHud as K } from "./WorkbenchHud.js";
8
8
  import { WorkbenchLockButton as U } from "./WorkbenchLockButton.js";
@@ -52,7 +52,7 @@ function he(i) {
52
52
  widget: a,
53
53
  closeMenu: t.contextMenu.close
54
54
  });
55
- }), b = w(() => {
55
+ }), I = w(() => {
56
56
  const e = t.contextMenu.state();
57
57
  if (!e) return;
58
58
  const n = C(), r = n.filter((a) => a.kind === "action").length, o = n.filter((a) => a.kind === "separator").length;
@@ -62,7 +62,7 @@ function he(i) {
62
62
  menuWidth: j,
63
63
  menuHeight: J(r, o)
64
64
  });
65
- }), I = (e, n, r) => {
65
+ }), b = (e, n, r) => {
66
66
  const o = s(), a = o.findWidgetRoot(e), c = o.readWidgetId(a);
67
67
  if (c) {
68
68
  l(o.createWidgetInputOwner(c, n));
@@ -152,9 +152,9 @@ function he(i) {
152
152
  const e = d();
153
153
  if (!e) return;
154
154
  const n = (o) => {
155
- I(o.target, "pointer", "background_pointer");
155
+ b(o.target, "pointer", "background_pointer");
156
156
  }, r = (o) => {
157
- I(o.target, "focus", "background_focus");
157
+ b(o.target, "focus", "background_focus");
158
158
  };
159
159
  e.addEventListener("pointerdown", n, !0), e.addEventListener("focusin", r), h(() => {
160
160
  e.removeEventListener("pointerdown", n, !0), e.removeEventListener("focusin", r);
@@ -199,7 +199,7 @@ function he(i) {
199
199
  const r = d()?.querySelector('[data-floe-workbench-canvas-frame="true"]');
200
200
  if (!r) return null;
201
201
  const o = r.getBoundingClientRect();
202
- return X(o, t.viewport(), {
202
+ return P(o, t.viewport(), {
203
203
  clientX: e,
204
204
  clientY: n
205
205
  });
@@ -220,7 +220,7 @@ function he(i) {
220
220
  return t.theme();
221
221
  },
222
222
  tabIndex: -1
223
- }), !1, !0), m(n, u($, {
223
+ }), !1, !0), m(n, u(X, {
224
224
  get widgetDefinitions() {
225
225
  return t.widgetDefinitions();
226
226
  },
@@ -310,12 +310,19 @@ function he(i) {
310
310
  get filters() {
311
311
  return t.filters();
312
312
  },
313
+ get viewport() {
314
+ return t.viewport();
315
+ },
313
316
  get onSoloFilter() {
314
317
  return t.filter.solo;
315
318
  },
316
319
  get onShowAll() {
317
320
  return t.filter.showAll;
318
321
  },
322
+ get onViewportCommit() {
323
+ return t.canvas.commitViewport;
324
+ },
325
+ onViewportInteractionStart: () => t.canvas.cancelViewportNavigation(),
319
326
  onCreateAt: F
320
327
  }), null), m(e, u(K, {
321
328
  get scaleLabel() {
@@ -331,22 +338,22 @@ function he(i) {
331
338
  return t.theme();
332
339
  },
333
340
  onSelectTheme: (r) => t.appearance.setTheme(r)
334
- }), null), m(e, u(P, {
341
+ }), null), m(e, u(H, {
335
342
  get when() {
336
343
  return t.contextMenu.state();
337
344
  },
338
345
  get children() {
339
- return u(N, {
346
+ return u(V, {
340
347
  get children() {
341
348
  return [(() => {
342
349
  var r = te();
343
- return z(r, "contextmenu", t.contextMenu.retarget, !0), r;
344
- })(), u(V, {
350
+ return N(r, "contextmenu", t.contextMenu.retarget, !0), r;
351
+ })(), u($, {
345
352
  get x() {
346
- return b()?.left ?? 0;
353
+ return I()?.left ?? 0;
347
354
  },
348
355
  get y() {
349
- return b()?.top ?? 0;
356
+ return I()?.top ?? 0;
350
357
  },
351
358
  get items() {
352
359
  return C();
@@ -358,7 +365,7 @@ function he(i) {
358
365
  }), null), e;
359
366
  })();
360
367
  }
361
- H(["contextmenu"]);
368
+ z(["contextmenu"]);
362
369
  export {
363
370
  he as WorkbenchSurface
364
371
  };
@@ -22,6 +22,7 @@ export interface WorkbenchWidgetProps {
22
22
  projectedViewport?: Accessor<WorkbenchViewport>;
23
23
  surfaceReady?: boolean;
24
24
  interactionAdapter?: WorkbenchInteractionAdapter | ResolvedWorkbenchInteractionAdapter;
25
+ viewport?: WorkbenchViewport;
25
26
  onSelect: (widgetId: string) => void;
26
27
  onContextMenu: (event: MouseEvent, item: WorkbenchWidgetItem) => void;
27
28
  onStartOptimisticFront: (widgetId: string) => void;
@@ -34,6 +35,8 @@ export interface WorkbenchWidgetProps {
34
35
  width: number;
35
36
  height: number;
36
37
  }) => void;
38
+ onViewportCommit?: (viewport: WorkbenchViewport) => void;
39
+ onViewportInteractionStart?: (kind: 'pan') => void;
37
40
  onRequestOverview: (item: WorkbenchWidgetItem) => void;
38
41
  onRequestFit: (item: WorkbenchWidgetItem) => void;
39
42
  onRequestDelete: (widgetId: string) => void;