@floegence/floe-webapp-core 0.36.74 → 0.36.76

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,11 +1,12 @@
1
- import { createComponent as v, spread as de, mergeProps as ce, insert as f, effect as x, className as y, setStyleProperty as oe, memo as se, use as le, setAttribute as I, template as w, delegateEvents as Ne } from "solid-js/web";
2
- import { splitProps as ue, Show as k, createSignal as B, untrack as ie, createEffect as O, For as Le, onCleanup as ae } from "solid-js";
1
+ import { createComponent as v, spread as ae, mergeProps as de, insert as f, effect as x, className as y, setStyleProperty as ne, memo as oe, use as se, setAttribute as B, template as w, delegateEvents as $e } from "solid-js/web";
2
+ import { splitProps as ce, Show as k, createSignal as L, untrack as le, createEffect as X, For as Ne, onCleanup as ie } from "solid-js";
3
3
  import { cn as g } from "../../utils/cn.js";
4
- import { deferAfterPaint as R } from "../../utils/defer.js";
4
+ import { deferAfterPaint as M } from "../../utils/defer.js";
5
+ import { createUIFirstSelection as Le } from "../../utils/uiFirstSelection.js";
5
6
  import { useViewActivation as Re } from "../../context/ViewActivationContext.js";
6
7
  import { X as Te, Plus as ze, ChevronRight as Ee } from "../icons/index.js";
7
- var He = /* @__PURE__ */ w('<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="m15 18-6-6 6-6">'), _e = /* @__PURE__ */ w('<button type=button aria-label="Scroll left">'), Pe = /* @__PURE__ */ w("<div>"), De = /* @__PURE__ */ w('<button type=button aria-label="Add new tab">'), Me = /* @__PURE__ */ w('<button type=button aria-label="Scroll right">'), Oe = /* @__PURE__ */ w("<div><div role=tablist aria-orientation=horizontal>"), We = /* @__PURE__ */ w("<span class=flex-shrink-0>"), Fe = /* @__PURE__ */ w("<button type=button>"), je = /* @__PURE__ */ w('<div role=tab><span class="truncate max-w-32">'), Ge = /* @__PURE__ */ w("<div role=tabpanel>");
8
- const V = {
8
+ var He = /* @__PURE__ */ w('<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="m15 18-6-6 6-6">'), _e = /* @__PURE__ */ w('<button type=button aria-label="Scroll left">'), Pe = /* @__PURE__ */ w("<div>"), De = /* @__PURE__ */ w('<button type=button aria-label="Add new tab">'), Me = /* @__PURE__ */ w('<button type=button aria-label="Scroll right">'), Fe = /* @__PURE__ */ w("<div><div role=tablist aria-orientation=horizontal>"), Oe = /* @__PURE__ */ w("<span class=flex-shrink-0>"), We = /* @__PURE__ */ w("<button type=button>"), je = /* @__PURE__ */ w('<div role=tab><span class="truncate max-w-32">'), Ge = /* @__PURE__ */ w("<div role=tabpanel>");
9
+ const q = {
9
10
  x: 0,
10
11
  width: 0,
11
12
  visible: !1
@@ -39,7 +40,7 @@ function Ue(a, e, h) {
39
40
  function Xe(a) {
40
41
  return a === 1 || a === 2 || a === 3 || a === 4 ? a : 2;
41
42
  }
42
- function Ve(a) {
43
+ function qe(a) {
43
44
  switch (a) {
44
45
  case 1:
45
46
  return {
@@ -63,7 +64,7 @@ function Ve(a) {
63
64
  };
64
65
  }
65
66
  }
66
- function qe(a) {
67
+ function Ve(a) {
67
68
  switch (a) {
68
69
  case "border":
69
70
  return {
@@ -84,7 +85,7 @@ function qe(a) {
84
85
  }
85
86
  const Ke = (a) => (() => {
86
87
  var e = He();
87
- return x(() => I(e, "class", a.class)), e;
88
+ return x(() => B(e, "class", a.class)), e;
88
89
  })();
89
90
  function Ye(a) {
90
91
  const {
@@ -97,15 +98,15 @@ function Ye(a) {
97
98
  width: C,
98
99
  visible: C > 0
99
100
  };
100
- const b = e.getBoundingClientRect(), p = h.getBoundingClientRect(), T = e.offsetWidth || e.clientWidth, A = b.width > 0 && T > 0 ? b.width / T : 1, z = Number.isFinite(A) && A > 0 ? A : 1, E = p.width / z;
101
+ const b = e.getBoundingClientRect(), p = h.getBoundingClientRect(), R = e.offsetWidth || e.clientWidth, I = b.width > 0 && R > 0 ? b.width / R : 1, T = Number.isFinite(I) && I > 0 ? I : 1, z = p.width / T;
101
102
  return {
102
- x: (p.left - b.left + e.scrollLeft) / z,
103
- width: E,
104
- visible: E > 0
103
+ x: (p.left - b.left + e.scrollLeft) / T,
104
+ width: z,
105
+ visible: z > 0
105
106
  };
106
107
  }
107
- function nt(a) {
108
- const [e, h] = ue(a, ["items", "activeId", "defaultActiveId", "onChange", "onActiveIdChange", "onClose", "onAdd", "showAdd", "closable", "size", "features", "slotClassNames", "ariaLabel", "class"]), d = () => e.features?.indicator?.mode ?? "activeBorder", C = () => Xe(e.features?.indicator?.thicknessPx), b = () => e.features?.indicator?.colorToken ?? "primary", p = () => e.features?.indicator?.animated ?? !0, T = () => e.features?.containerBorder ?? !0, A = () => e.features?.scrollButtons ?? "auto", z = () => e.features?.closeButton?.dangerHover ?? !0, E = () => e.features?.closeButton?.enabledByDefault ?? e.closable ?? !1, fe = () => e.features?.addButton?.enabled ?? e.showAdd ?? !1, q = () => Ve(C()), W = () => qe(b());
108
+ function st(a) {
109
+ const [e, h] = ce(a, ["items", "activeId", "defaultActiveId", "onChange", "onActiveIdChange", "onClose", "onAdd", "showAdd", "closable", "size", "features", "slotClassNames", "ariaLabel", "class"]), d = () => e.features?.indicator?.mode ?? "activeBorder", C = () => Xe(e.features?.indicator?.thicknessPx), b = () => e.features?.indicator?.colorToken ?? "primary", p = () => e.features?.indicator?.animated ?? !0, R = () => e.features?.containerBorder ?? !0, I = () => e.features?.scrollButtons ?? "auto", T = () => e.features?.closeButton?.dangerHover ?? !0, z = () => e.features?.closeButton?.enabledByDefault ?? e.closable ?? !1, ue = () => e.features?.addButton?.enabled ?? e.showAdd ?? !1, V = () => qe(C()), F = () => Ve(b());
109
110
  let u;
110
111
  const K = (() => {
111
112
  try {
@@ -114,125 +115,123 @@ function nt(a) {
114
115
  return null;
115
116
  }
116
117
  })(), S = () => K ? K.active() : !0;
117
- let F = !1;
118
- const [H, j] = B(V), _ = /* @__PURE__ */ new Map();
119
- let G = !1;
120
- const P = () => d() === "slider", Y = (o) => {
121
- if (!u || !P()) return !1;
122
- const r = _.get(o);
118
+ let O = !1;
119
+ const [E, W] = L(q), H = /* @__PURE__ */ new Map();
120
+ let j = !1;
121
+ const _ = () => d() === "slider", Y = (o) => {
122
+ if (!u || !_()) return !1;
123
+ const r = H.get(o);
123
124
  if (!r) return !1;
124
125
  const s = Ye({
125
126
  container: u,
126
127
  tab: r
127
128
  });
128
- return j(s), s.visible;
129
- }, ve = () => {
130
- if (!P()) {
131
- j(V);
129
+ return W(s), s.visible;
130
+ }, fe = () => {
131
+ if (!_()) {
132
+ W(q);
132
133
  return;
133
134
  }
134
- Y(U()) || j(V);
135
- }, D = () => {
136
- G || (G = !0, R(() => {
137
- G = !1, ie(() => {
138
- S() && ve();
135
+ Y(G()) || W(q);
136
+ }, P = () => {
137
+ j || (j = !0, M(() => {
138
+ j = !1, le(() => {
139
+ S() && fe();
139
140
  });
140
141
  }));
141
- }, J = () => e.activeId !== void 0, he = () => e.onChange ?? e.onActiveIdChange, [be, ge] = B(ie(() => e.defaultActiveId ?? e.items[0]?.id ?? "")), Q = () => J() ? e.activeId : be(), [U, Z] = B(Q());
142
- O(() => {
143
- Z(Q());
144
- }), O(() => {
145
- S() && (d(), U(), D());
142
+ }, J = () => e.activeId !== void 0, ve = () => e.onChange ?? e.onActiveIdChange, [he, be] = L(le(() => e.defaultActiveId ?? e.items[0]?.id ?? "")), Q = Le({
143
+ committed: () => J() ? e.activeId : he(),
144
+ commit: (o) => {
145
+ J() || be(o), ve()?.(o);
146
+ }
147
+ }), G = Q.visual;
148
+ X(() => {
149
+ S() && (d(), G(), P());
146
150
  });
147
- const [ee, me] = B(!1), [te, we] = B(!1), [Ce, pe] = B(!1), re = () => A() === "auto" && Ce(), xe = () => {
151
+ const [Z, ge] = L(!1), [ee, me] = L(!1), [we, Ce] = L(!1), te = () => I() === "auto" && we(), pe = () => {
148
152
  if (!u) return;
149
153
  const {
150
154
  scrollLeft: o,
151
155
  scrollWidth: r,
152
156
  clientWidth: s
153
157
  } = u, t = r > s;
154
- pe(t), me(o > 0), we(o + s < r - 1);
155
- }, M = () => {
156
- F || (F = !0, R(() => {
157
- F = !1, S() && xe();
158
+ Ce(t), ge(o > 0), me(o + s < r - 1);
159
+ }, D = () => {
160
+ O || (O = !0, M(() => {
161
+ O = !1, S() && pe();
158
162
  }));
159
- }, ye = () => {
163
+ }, xe = () => {
160
164
  u && u.scrollBy({
161
165
  left: -150,
162
166
  behavior: "smooth"
163
167
  });
164
- }, ke = () => {
168
+ }, ye = () => {
165
169
  u && u.scrollBy({
166
170
  left: 150,
167
171
  behavior: "smooth"
168
172
  });
169
173
  };
170
- O(() => {
174
+ X(() => {
171
175
  if (!u || !S()) return;
172
- M(), D();
173
- const o = () => M();
176
+ D(), P();
177
+ const o = () => D();
174
178
  u.addEventListener("scroll", o);
175
179
  const r = () => {
176
- M(), D();
180
+ D(), P();
177
181
  };
178
182
  let s;
179
- typeof ResizeObserver < "u" ? (s = new ResizeObserver(r), s.observe(u)) : typeof window < "u" && window.addEventListener("resize", r), ae(() => {
183
+ typeof ResizeObserver < "u" ? (s = new ResizeObserver(r), s.observe(u)) : typeof window < "u" && window.addEventListener("resize", r), ie(() => {
180
184
  u?.removeEventListener("scroll", o), s?.disconnect(), typeof window < "u" && window.removeEventListener("resize", r);
181
185
  });
182
- }), O(() => {
183
- S() && (e.items.length, M(), D());
186
+ }), X(() => {
187
+ S() && (e.items.length, D(), P());
184
188
  });
185
- const X = (o, r) => {
186
- if (r) return;
187
- const s = he();
188
- if (Z(o), P() && Y(o), J() || ge(o), s) {
189
- const t = o;
190
- R(() => s(t));
191
- }
192
- }, Be = (o) => {
189
+ const U = (o, r) => {
190
+ r || (Q.request(o), _() && Y(o));
191
+ }, ke = (o) => {
193
192
  const r = e.items.find((s) => s.id === o);
194
- r && (X(r.id, r.disabled), requestAnimationFrame(() => {
195
- const s = _.get(r.id);
193
+ r && (U(r.id, r.disabled), requestAnimationFrame(() => {
194
+ const s = H.get(r.id);
196
195
  s?.focus(), s?.scrollIntoView({
197
196
  block: "nearest",
198
197
  inline: "nearest"
199
198
  });
200
199
  }));
201
- }, Ie = (o, r) => {
200
+ }, Be = (o, r) => {
202
201
  const s = Ue(e.items, r.id, o.key);
203
- s && (o.preventDefault(), Be(s));
204
- }, Ae = (o, r) => {
202
+ s && (o.preventDefault(), ke(s));
203
+ }, Ie = (o, r) => {
205
204
  o.stopPropagation();
206
205
  const s = e.onClose;
207
206
  if (!s) return;
208
207
  const t = r;
209
- R(() => s(t));
208
+ M(() => s(t));
210
209
  }, Se = {
211
210
  sm: "h-7 px-2 text-[11px]",
212
211
  md: "h-8 px-3 text-xs"
213
- }, $e = (o, r) => {
212
+ }, Ae = (o, r) => {
214
213
  const s = "inline-flex items-center gap-1.5 font-medium transition-colors duration-150 whitespace-nowrap", t = r ? "cursor-not-allowed opacity-50" : "cursor-pointer", n = (() => {
215
214
  const c = d();
216
- return c === "none" || c === "slider" && H().visible ? "border-transparent" : W().tabBorderClass;
215
+ return c === "none" || c === "slider" && E().visible ? "border-transparent" : F().tabBorderClass;
217
216
  })();
218
- return g(s, t, Se[e.size ?? "md"], "rounded-t", q().tabBorderClass, o ? g(n, "text-foreground bg-background", e.slotClassNames?.tabActive) : g("border-transparent text-muted-foreground hover:text-foreground hover:bg-muted/50", e.slotClassNames?.tabInactive), r && "hover:bg-transparent hover:text-muted-foreground hover:border-transparent", e.slotClassNames?.tab);
217
+ return g(s, t, Se[e.size ?? "md"], "rounded-t", V().tabBorderClass, o ? g(n, "text-foreground bg-background", e.slotClassNames?.tabActive) : g("border-transparent text-muted-foreground hover:text-foreground hover:bg-muted/50", e.slotClassNames?.tabInactive), r && "hover:bg-transparent hover:text-muted-foreground hover:border-transparent", e.slotClassNames?.tab);
219
218
  };
220
219
  return (() => {
221
- var o = Oe(), r = o.firstChild;
222
- de(o, ce({
220
+ var o = Fe(), r = o.firstChild;
221
+ ae(o, de({
223
222
  get class() {
224
- return g("relative flex items-center gap-0.5", T() && "border-b border-border", e.slotClassNames?.root, e.class);
223
+ return g("relative flex items-center gap-0.5", R() && "border-b border-border", e.slotClassNames?.root, e.class);
225
224
  }
226
225
  }, h), !1, !0), f(o, v(k, {
227
226
  get when() {
228
- return re();
227
+ return te();
229
228
  },
230
229
  get children() {
231
230
  var t = _e();
232
- return t.$$click = ye, f(t, v(Ke, {
231
+ return t.$$click = xe, f(t, v(Ke, {
233
232
  class: "w-4 h-4"
234
233
  })), x((n) => {
235
- var c = !ee(), i = g("flex-shrink-0 flex items-center justify-center", "w-6 h-6 rounded cursor-pointer", "transition-all duration-150", ee() ? "text-muted-foreground hover:text-foreground hover:bg-muted/80 opacity-100" : "opacity-0 pointer-events-none", e.slotClassNames?.scrollButton);
234
+ var c = !Z(), i = g("flex-shrink-0 flex items-center justify-center", "w-6 h-6 rounded cursor-pointer", "transition-all duration-150", Z() ? "text-muted-foreground hover:text-foreground hover:bg-muted/80 opacity-100" : "opacity-0 pointer-events-none", e.slotClassNames?.scrollButton);
236
235
  return c !== n.e && (t.disabled = n.e = c), i !== n.t && y(t, n.t = i), n;
237
236
  }, {
238
237
  e: void 0,
@@ -241,64 +240,64 @@ function nt(a) {
241
240
  }
242
241
  }), r);
243
242
  var s = u;
244
- return typeof s == "function" ? le(s, r) : u = r, f(r, v(k, {
243
+ return typeof s == "function" ? se(s, r) : u = r, f(r, v(k, {
245
244
  get when() {
246
- return se(() => !!P())() && H().visible;
245
+ return oe(() => !!_())() && E().visible;
247
246
  },
248
247
  get children() {
249
248
  var t = Pe();
250
249
  return x((n) => {
251
- var c = g("pointer-events-none absolute bottom-0 left-0 z-10", q().sliderHeightClass, W().sliderBgClass, p() ? "transition-[transform,width] duration-200 ease-out motion-reduce:transition-none" : "transition-none", "will-change-transform", e.slotClassNames?.indicator), i = `translate3d(${H().x}px, 0, 0)`, $ = `${H().width}px`;
252
- return c !== n.e && y(t, n.e = c), i !== n.t && oe(t, "transform", n.t = i), $ !== n.a && oe(t, "width", n.a = $), n;
250
+ var c = g("pointer-events-none absolute bottom-0 left-0 z-10", V().sliderHeightClass, F().sliderBgClass, p() ? "transition-[transform,width] duration-200 ease-out motion-reduce:transition-none" : "transition-none", "will-change-transform", e.slotClassNames?.indicator), i = `translate3d(${E().x}px, 0, 0)`, A = `${E().width}px`;
251
+ return c !== n.e && y(t, n.e = c), i !== n.t && ne(t, "transform", n.t = i), A !== n.a && ne(t, "width", n.a = A), n;
253
252
  }, {
254
253
  e: void 0,
255
254
  t: void 0,
256
255
  a: void 0
257
256
  }), t;
258
257
  }
259
- }), null), f(r, v(Le, {
258
+ }), null), f(r, v(Ne, {
260
259
  get each() {
261
260
  return e.items;
262
261
  },
263
262
  children: (t) => {
264
- const n = () => t.id === U(), c = () => t.closable ?? E();
263
+ const n = () => t.id === G(), c = () => t.closable ?? z();
265
264
  return (() => {
266
- var i = je(), $ = i.firstChild;
265
+ var i = je(), A = i.firstChild;
267
266
  return i.$$keydown = (l) => {
268
267
  if (l.key === "Enter" || l.key === " ") {
269
- l.preventDefault(), X(t.id, t.disabled);
268
+ l.preventDefault(), U(t.id, t.disabled);
270
269
  return;
271
270
  }
272
- Ie(l, t);
273
- }, i.$$click = () => X(t.id, t.disabled), le((l) => {
274
- _.set(t.id, l), ae(() => _.delete(t.id));
271
+ Be(l, t);
272
+ }, i.$$click = () => U(t.id, t.disabled), se((l) => {
273
+ H.set(t.id, l), ie(() => H.delete(t.id));
275
274
  }, i), f(i, v(k, {
276
275
  get when() {
277
276
  return t.icon;
278
277
  },
279
278
  get children() {
280
- var l = We();
279
+ var l = Oe();
281
280
  return f(l, () => t.icon), l;
282
281
  }
283
- }), $), f($, () => t.label), f(i, v(k, {
282
+ }), A), f(A, () => t.label), f(i, v(k, {
284
283
  get when() {
285
- return se(() => !!c())() && !t.disabled;
284
+ return oe(() => !!c())() && !t.disabled;
286
285
  },
287
286
  get children() {
288
- var l = Fe();
289
- return l.$$click = (m) => Ae(m, t.id), f(l, v(Te, {
287
+ var l = We();
288
+ return l.$$click = (m) => Ie(m, t.id), f(l, v(Te, {
290
289
  class: "w-3 h-3"
291
290
  })), x((m) => {
292
- var N = g("flex-shrink-0 flex items-center justify-center", "w-5 h-5 rounded cursor-pointer", "bg-transparent text-muted-foreground", z() ? "hover:bg-error hover:text-error-foreground" : "hover:bg-muted/80 hover:text-foreground", "transition-colors duration-150", "ml-1.5", e.slotClassNames?.closeButton), L = `Close ${t.label}`;
293
- return N !== m.e && y(l, m.e = N), L !== m.t && I(l, "aria-label", m.t = L), m;
291
+ var $ = g("flex-shrink-0 flex items-center justify-center", "w-5 h-5 rounded cursor-pointer", "bg-transparent text-muted-foreground", T() ? "hover:bg-error hover:text-error-foreground" : "hover:bg-muted/80 hover:text-foreground", "transition-colors duration-150", "ml-1.5", e.slotClassNames?.closeButton), N = `Close ${t.label}`;
292
+ return $ !== m.e && y(l, m.e = $), N !== m.t && B(l, "aria-label", m.t = N), m;
294
293
  }, {
295
294
  e: void 0,
296
295
  t: void 0
297
296
  }), l;
298
297
  }
299
298
  }), null), x((l) => {
300
- var m = $e(n(), t.disabled), N = n(), L = t.disabled, ne = t.disabled ? -1 : n() ? 0 : -1;
301
- return m !== l.e && y(i, l.e = m), N !== l.t && I(i, "aria-selected", l.t = N), L !== l.a && I(i, "aria-disabled", l.a = L), ne !== l.o && I(i, "tabindex", l.o = ne), l;
299
+ var m = Ae(n(), t.disabled), $ = n(), N = t.disabled, re = t.disabled ? -1 : n() ? 0 : -1;
300
+ return m !== l.e && y(i, l.e = m), $ !== l.t && B(i, "aria-selected", l.t = $), N !== l.a && B(i, "aria-disabled", l.a = N), re !== l.o && B(i, "tabindex", l.o = re), l;
302
301
  }, {
303
302
  e: void 0,
304
303
  t: void 0,
@@ -309,13 +308,13 @@ function nt(a) {
309
308
  }
310
309
  }), null), f(o, v(k, {
311
310
  get when() {
312
- return fe();
311
+ return ue();
313
312
  },
314
313
  get children() {
315
314
  var t = De();
316
315
  return t.$$click = () => {
317
316
  const n = e.onAdd;
318
- n && R(() => n());
317
+ n && M(() => n());
319
318
  }, f(t, v(ze, {
320
319
  get class() {
321
320
  return e.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4";
@@ -324,14 +323,14 @@ function nt(a) {
324
323
  }
325
324
  }), null), f(o, v(k, {
326
325
  get when() {
327
- return re();
326
+ return te();
328
327
  },
329
328
  get children() {
330
329
  var t = Me();
331
- return t.$$click = ke, f(t, v(Ee, {
330
+ return t.$$click = ye, f(t, v(Ee, {
332
331
  class: "w-4 h-4"
333
332
  })), x((n) => {
334
- var c = !te(), i = g("flex-shrink-0 flex items-center justify-center", "w-6 h-6 rounded cursor-pointer", "transition-all duration-150", te() ? "text-muted-foreground hover:text-foreground hover:bg-muted/80 opacity-100" : "opacity-0 pointer-events-none", e.slotClassNames?.scrollButton);
333
+ var c = !ee(), i = g("flex-shrink-0 flex items-center justify-center", "w-6 h-6 rounded cursor-pointer", "transition-all duration-150", ee() ? "text-muted-foreground hover:text-foreground hover:bg-muted/80 opacity-100" : "opacity-0 pointer-events-none", e.slotClassNames?.scrollButton);
335
334
  return c !== n.e && (t.disabled = n.e = c), i !== n.t && y(t, n.t = i), n;
336
335
  }, {
337
336
  e: void 0,
@@ -346,22 +345,22 @@ function nt(a) {
346
345
  "[&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",
347
346
  e.slotClassNames?.scrollContainer
348
347
  ), c = e.ariaLabel;
349
- return n !== t.e && y(r, t.e = n), c !== t.t && I(r, "aria-label", t.t = c), t;
348
+ return n !== t.e && y(r, t.e = n), c !== t.t && B(r, "aria-label", t.t = c), t;
350
349
  }, {
351
350
  e: void 0,
352
351
  t: void 0
353
352
  }), o;
354
353
  })();
355
354
  }
356
- function ot(a) {
357
- const [e, h] = ue(a, ["active", "keepMounted", "labelledBy", "class", "children"]);
355
+ function lt(a) {
356
+ const [e, h] = ce(a, ["active", "keepMounted", "labelledBy", "class", "children"]);
358
357
  return v(k, {
359
358
  get when() {
360
359
  return e.keepMounted || e.active;
361
360
  },
362
361
  get children() {
363
362
  var d = Ge();
364
- return de(d, ce({
363
+ return ae(d, de({
365
364
  get "aria-labelledby"() {
366
365
  return e.labelledBy;
367
366
  },
@@ -378,9 +377,9 @@ function ot(a) {
378
377
  }
379
378
  });
380
379
  }
381
- Ne(["click", "keydown"]);
380
+ $e(["click", "keydown"]);
382
381
  export {
383
- ot as TabPanel,
384
- nt as Tabs,
382
+ lt as TabPanel,
383
+ st as Tabs,
385
384
  Ue as resolveTabNavigationTargetId
386
385
  };
@@ -28,6 +28,7 @@ export interface WorkbenchCanvasProps {
28
28
  onCanvasContextMenu: (event: InfiniteCanvasContextMenuEvent) => void;
29
29
  onCanvasPointerDown?: (event: PointerEvent) => void;
30
30
  onSelectWidget: (widgetId: string) => void;
31
+ onActivateWidget?: (widgetId: string) => void;
31
32
  onWidgetContextMenu: (event: MouseEvent, item: WorkbenchWidgetItem) => void;
32
33
  onClaimVisualFrontOwner: (widgetId: string) => void;
33
34
  onCommitFront: (widgetId: string) => void;
@@ -1,20 +1,20 @@
1
- import { use as E, insert as w, createComponent as g, memo as y, effect as O, template as B } from "solid-js/web";
2
- import { createMemo as u, createSignal as _, Show as W, For as j } from "solid-js";
1
+ import { use as E, insert as w, createComponent as g, memo as y, effect as F, template as x } from "solid-js/web";
2
+ import { createMemo as u, createSignal as _, Show as O, For as j } from "solid-js";
3
3
  import { resolveWorkbenchInteractionAdapter as z } from "./workbenchInteractionAdapter.js";
4
4
  import { WORKBENCH_BACKGROUND_REGION_FILTER_ID as P, WORKBENCH_TEXT_FILTER_ID as q, WORKBENCH_STICKY_FILTER_ID as T } from "./types.js";
5
5
  import { WorkbenchCanvasField as U } from "./WorkbenchCanvasField.js";
6
6
  import { WorkbenchPlacementPreview as G } from "./WorkbenchPlacementPreview.js";
7
7
  import { WorkbenchBackgroundLayerView as $, WorkbenchAnnotationLayerView as K, WorkbenchLayerControlOverlayView as H, createWorkbenchTextEditorRegistry as Z, WorkbenchStickyNote as X } from "./WorkbenchLayerObjects.js";
8
8
  import { WorkbenchWidget as Y } from "./WorkbenchWidget.js";
9
- import { createWorkbenchRenderLayerMap as J, resolveWorkbenchModeStrategy as Q, resolveWorkbenchWidgetRenderMode as x } from "./workbenchHelpers.js";
9
+ import { createWorkbenchRenderLayerMap as J, resolveWorkbenchModeStrategy as Q, resolveWorkbenchWidgetRenderMode as A } from "./workbenchHelpers.js";
10
10
  import { createWorkbenchWidgetEnterMotionTracker as p } from "./workbenchMotion.js";
11
11
  import { getWidgetEntry as R } from "./widgets/widgetRegistry.js";
12
12
  import { InfiniteCanvas as ee } from "../ui/InfiniteCanvas.js";
13
- var te = /* @__PURE__ */ B("<div class=workbench-canvas><div class=workbench-canvas__atmosphere aria-hidden=true>"), ne = /* @__PURE__ */ B("<div class=workbench-canvas__projected-layer><div class=workbench-canvas__projected-work-layer>");
13
+ var te = /* @__PURE__ */ x("<div class=workbench-canvas><div class=workbench-canvas__atmosphere aria-hidden=true>"), ne = /* @__PURE__ */ x("<div class=workbench-canvas__projected-layer><div class=workbench-canvas__projected-work-layer>");
14
14
  function re(e) {
15
15
  const a = u((c) => {
16
- const v = e.widgetById().get(e.widgetId);
17
- if (v) return v;
16
+ const C = e.widgetById().get(e.widgetId);
17
+ if (C) return C;
18
18
  if (c) return c;
19
19
  throw new Error(`Workbench widget ${e.widgetId} is missing from the projected render map.`);
20
20
  }), r = u(() => R(a().type, e.widgetDefinitions));
@@ -84,6 +84,9 @@ function re(e) {
84
84
  get onSelect() {
85
85
  return e.onSelectWidget;
86
86
  },
87
+ get onActivate() {
88
+ return e.onActivateWidget;
89
+ },
87
90
  get onContextMenu() {
88
91
  return e.onWidgetContextMenu;
89
92
  },
@@ -176,7 +179,7 @@ function oe(e) {
176
179
  }
177
180
  });
178
181
  }
179
- function ve(e) {
182
+ function Ce(e) {
180
183
  const a = u(() => z(e.interactionAdapter)), r = p(() => e.widgets.map((n) => n.id)), c = u(() => {
181
184
  const n = e.widgetMotionById;
182
185
  if (!n)
@@ -187,13 +190,13 @@ function ve(e) {
187
190
  for (const [o, d] of Object.entries(n))
188
191
  d !== void 0 && (l[o] = d);
189
192
  return l;
190
- }), v = u(() => new Map(e.widgets.map((n) => [n.id, n]))), N = u(() => (e.stickyNotes ?? []).map((n) => n.id)), A = u(() => new Map((e.stickyNotes ?? []).map((n) => [n.id, n]))), b = u(() => J([...e.widgets, ...e.stickyNotes ?? []])), I = Z(), [S, f] = _(null), s = u(() => Q(e.mode)), C = u(() => s().workLayerLocked), m = u(() => s().layerEditingEnabled), D = u(() => e.widgets.filter((n) => {
193
+ }), C = u(() => new Map(e.widgets.map((n) => [n.id, n]))), B = u(() => (e.stickyNotes ?? []).map((n) => n.id)), N = u(() => new Map((e.stickyNotes ?? []).map((n) => [n.id, n]))), b = u(() => J([...e.widgets, ...e.stickyNotes ?? []])), I = Z(), [S, f] = _(null), s = u(() => Q(e.mode)), v = u(() => s().workLayerLocked), m = u(() => s().layerEditingEnabled), D = u(() => e.widgets.filter((n) => {
191
194
  const l = R(n.type, e.widgetDefinitions);
192
- return x(l) === "canvas_scaled";
195
+ return A(l) === "canvas_scaled";
193
196
  })), h = u(() => e.widgets.filter((n) => {
194
197
  const l = R(n.type, e.widgetDefinitions);
195
- return x(l) === "projected_surface";
196
- }).map((n) => n.id)), M = u(() => h().length > 0), V = u(() => M() ? [] : e.stickyNotes ?? []), F = () => e.canvasFrameSize.width > 0 && e.canvasFrameSize.height > 0, L = M;
198
+ return A(l) === "projected_surface";
199
+ }).map((n) => n.id)), M = u(() => h().length > 0), V = u(() => M() ? [] : e.stickyNotes ?? []), W = () => e.canvasFrameSize.width > 0 && e.canvasFrameSize.height > 0, L = M;
197
200
  return (() => {
198
201
  var n = te();
199
202
  n.firstChild;
@@ -233,7 +236,7 @@ function ve(e) {
233
236
  get disablePanZoom() {
234
237
  return e.locked;
235
238
  },
236
- overlay: (o) => [g(W, {
239
+ overlay: (o) => [g(O, {
237
240
  get when() {
238
241
  return L();
239
242
  },
@@ -301,7 +304,7 @@ function ve(e) {
301
304
  get canvasFrameSize() {
302
305
  return e.canvasFrameSize;
303
306
  },
304
- widgetById: v,
307
+ widgetById: C,
305
308
  renderLayers: b,
306
309
  get widgetMotionById() {
307
310
  return c();
@@ -313,7 +316,7 @@ function ve(e) {
313
316
  return e.visualFrontOwnerId;
314
317
  },
315
318
  get locked() {
316
- return e.locked || C();
319
+ return e.locked || v();
317
320
  },
318
321
  get filters() {
319
322
  return e.filters;
@@ -333,6 +336,9 @@ function ve(e) {
333
336
  get onSelectWidget() {
334
337
  return e.onSelectWidget;
335
338
  },
339
+ get onActivateWidget() {
340
+ return e.onActivateWidget;
341
+ },
336
342
  get onWidgetContextMenu() {
337
343
  return e.onWidgetContextMenu;
338
344
  },
@@ -365,16 +371,16 @@ function ve(e) {
365
371
  },
366
372
  projectedViewport: o,
367
373
  get surfaceReady() {
368
- return F();
374
+ return W();
369
375
  }
370
376
  })
371
377
  }), null), w(k, g(j, {
372
378
  get each() {
373
- return N();
379
+ return B();
374
380
  },
375
381
  children: (t) => g(oe, {
376
382
  noteId: t,
377
- stickyNoteById: A,
383
+ stickyNoteById: N,
378
384
  get selectedObject() {
379
385
  return e.selectedObject;
380
386
  },
@@ -384,10 +390,10 @@ function ve(e) {
384
390
  return e.visualFrontOwnerId;
385
391
  },
386
392
  get locked() {
387
- return e.locked || C();
393
+ return e.locked || v();
388
394
  },
389
395
  get filtered() {
390
- return y(() => !C())() && e.filters[T] === !1;
396
+ return y(() => !v())() && e.filters[T] === !1;
391
397
  },
392
398
  get onSelectStickyNote() {
393
399
  return e.onSelectStickyNote;
@@ -420,7 +426,7 @@ function ve(e) {
420
426
  return e.onLayoutInteractionEnd;
421
427
  },
422
428
  get surfaceReady() {
423
- return F();
429
+ return W();
424
430
  }
425
431
  })
426
432
  }), null), w(d, g(H, {
@@ -455,9 +461,9 @@ function ve(e) {
455
461
  onCommitBackgroundResize: (t, i) => e.onCommitBackgroundResize?.(t, i),
456
462
  onUpdateBackgroundLayer: (t, i) => e.onUpdateBackgroundLayer?.(t, i),
457
463
  onDeleteBackgroundLayer: (t) => e.onDeleteBackgroundLayer?.(t)
458
- }), null), O(() => d.classList.toggle("is-work-layer-locked", !!C())), d;
464
+ }), null), F(() => d.classList.toggle("is-work-layer-locked", !!v())), d;
459
465
  }
460
- }), g(W, {
466
+ }), g(O, {
461
467
  get when() {
462
468
  return y(() => !!L())() ? e.placementPreview : null;
463
469
  },
@@ -504,7 +510,7 @@ function ve(e) {
504
510
  return e.visualFrontOwnerId;
505
511
  },
506
512
  get workLayerLocked() {
507
- return C();
513
+ return v();
508
514
  },
509
515
  get annotationLayerEditable() {
510
516
  return m();
@@ -536,6 +542,9 @@ function ve(e) {
536
542
  get onSelectWidget() {
537
543
  return e.onSelectWidget;
538
544
  },
545
+ get onActivateWidget() {
546
+ return e.onActivateWidget;
547
+ },
539
548
  get onWidgetContextMenu() {
540
549
  return e.onWidgetContextMenu;
541
550
  },
@@ -639,7 +648,7 @@ function ve(e) {
639
648
  textEditorRegistry: I
640
649
  });
641
650
  }
642
- }), null), O((o) => {
651
+ }), null), F((o) => {
643
652
  var d = !!e.locked, k = !!m();
644
653
  return d !== o.e && n.classList.toggle("is-locked", o.e = d), k !== o.t && n.classList.toggle("is-composition-mode", o.t = k), o;
645
654
  }, {
@@ -649,5 +658,5 @@ function ve(e) {
649
658
  })();
650
659
  }
651
660
  export {
652
- ve as WorkbenchCanvas
661
+ Ce as WorkbenchCanvas
653
662
  };
@@ -24,6 +24,7 @@ export interface WorkbenchCanvasFieldProps {
24
24
  widgetMotionById?: Record<string, WorkbenchWidgetMotionIntent | null | undefined>;
25
25
  interactionAdapter?: WorkbenchInteractionAdapter | ResolvedWorkbenchInteractionAdapter;
26
26
  onSelectWidget: (widgetId: string) => void;
27
+ onActivateWidget?: (widgetId: string) => void;
27
28
  onWidgetContextMenu: (event: MouseEvent, item: WorkbenchWidgetItem) => void;
28
29
  onClaimVisualFrontOwner: (widgetId: string) => void;
29
30
  onCommitFront: (widgetId: string) => void;