@mcurcio/patchbay 0.6.0 → 0.8.0

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.
Files changed (47) hide show
  1. package/README.md +4 -3
  2. package/dist/composites.css +1 -1
  3. package/dist/composites.js +501 -158
  4. package/dist/composites.js.map +1 -1
  5. package/dist/graph.js +94 -79
  6. package/dist/graph.js.map +1 -1
  7. package/dist/primitives.css +1 -1
  8. package/dist/primitives.js +108 -93
  9. package/dist/primitives.js.map +1 -1
  10. package/dist/shell.css +1 -0
  11. package/dist/shell.js +177 -0
  12. package/dist/shell.js.map +1 -0
  13. package/dist/testing.js +207 -0
  14. package/dist/testing.js.map +1 -0
  15. package/dist/types/composites/banner/Banner.d.ts +9 -3
  16. package/dist/types/composites/banner/index.d.ts +2 -2
  17. package/dist/types/composites/code-editor/CodeEditor.d.ts +45 -0
  18. package/dist/types/composites/code-editor/CodeRuns.d.ts +5 -0
  19. package/dist/types/composites/code-editor/CodeText.d.ts +12 -0
  20. package/dist/types/composites/code-editor/highlight.d.ts +83 -0
  21. package/dist/types/composites/code-editor/index.d.ts +6 -0
  22. package/dist/types/composites/command-palette/CommandPalette.d.ts +16 -10
  23. package/dist/types/composites/command-palette/index.d.ts +2 -2
  24. package/dist/types/composites/index.d.ts +1 -0
  25. package/dist/types/composites/shortcut-sheet/ShortcutSheet.d.ts +17 -11
  26. package/dist/types/composites/shortcut-sheet/index.d.ts +2 -2
  27. package/dist/types/composites/toaster/Toaster.d.ts +15 -9
  28. package/dist/types/composites/toaster/index.d.ts +2 -2
  29. package/dist/types/graph/follow-fit/useFollowFit.d.ts +3 -0
  30. package/dist/types/graph/meter/Meter.d.ts +9 -3
  31. package/dist/types/graph/meter/index.d.ts +2 -2
  32. package/dist/types/graph/node-box/NodeBox.d.ts +7 -8
  33. package/dist/types/graph/node-box/index.d.ts +2 -2
  34. package/dist/types/primitives/dialog/Dialog.d.ts +8 -2
  35. package/dist/types/primitives/dialog/index.d.ts +2 -2
  36. package/dist/types/primitives/sheet/Sheet.d.ts +8 -2
  37. package/dist/types/primitives/sheet/index.d.ts +2 -2
  38. package/dist/types/primitives/splitter/Splitter.d.ts +8 -2
  39. package/dist/types/primitives/splitter/splitter-math.d.ts +12 -4
  40. package/dist/types/shell/app-shell/AppShell.d.ts +76 -0
  41. package/dist/types/shell/app-shell/bounds.d.ts +16 -0
  42. package/dist/types/shell/app-shell/index.d.ts +3 -0
  43. package/dist/types/shell/index.d.ts +1 -1
  44. package/dist/types/testing/brand-css.d.ts +41 -0
  45. package/dist/types/testing/contrast.d.ts +36 -0
  46. package/dist/types/testing/index.d.ts +2 -0
  47. package/package.json +5 -1
@@ -125,28 +125,31 @@ function _() {
125
125
  });
126
126
  }
127
127
  // src/primitives/dialog/Dialog.tsx
128
- var v = "a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1']),[contenteditable='true']";
129
- function y(e) {
130
- return [...e.querySelectorAll(v)].filter((e) => e.closest("[hidden], [inert]") === null && e.tabIndex >= 0);
131
- }
128
+ var v = { close: "Close" }, y = "a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1']),[contenteditable='true']";
132
129
  function b(e) {
130
+ return [...e.querySelectorAll(y)].filter((e) => e.closest("[hidden], [inert]") === null && e.tabIndex >= 0);
131
+ }
132
+ function x(e) {
133
133
  let t = e.ownerDocument.querySelectorAll(".pb-dialog");
134
134
  return t[t.length - 1] === e;
135
135
  }
136
- function x({ onClose: e, title: r, children: i, actions: a, closeLabel: c = "Close", className: u }) {
137
- let d = l(null), f = l(null), p = s(), m = l(e);
136
+ function S({ onClose: e, title: r, children: i, actions: a, labels: c, className: u }) {
137
+ let d = {
138
+ ...v,
139
+ ...c
140
+ }, f = l(null), p = l(null), m = s(), h = l(e);
138
141
  return o(() => {
139
- m.current = e;
142
+ h.current = e;
140
143
  }, [e]), o(() => {
141
- let e = d.current;
144
+ let e = f.current;
142
145
  if (e === null) return;
143
146
  let t = document.activeElement instanceof HTMLElement ? document.activeElement : null;
144
147
  if (!e.contains(document.activeElement)) {
145
- let t = f.current;
146
- (t === null ? void 0 : y(t)[0])?.focus(), e.contains(document.activeElement) || e.focus();
148
+ let t = p.current;
149
+ (t === null ? void 0 : b(t)[0])?.focus(), e.contains(document.activeElement) || e.focus();
147
150
  }
148
151
  let n = (t) => {
149
- b(e) && (t.target instanceof Node && e.contains(t.target) || (y(e)[0] ?? e).focus());
152
+ x(e) && (t.target instanceof Node && e.contains(t.target) || (b(e)[0] ?? e).focus());
150
153
  };
151
154
  return document.addEventListener("focusin", n), () => {
152
155
  document.removeEventListener("focusin", n), t?.isConnected === !0 && t.focus();
@@ -154,48 +157,48 @@ function x({ onClose: e, title: r, children: i, actions: a, closeLabel: c = "Clo
154
157
  }, []), /* @__PURE__ */ t("div", {
155
158
  className: "pb-dialog-scrim",
156
159
  onMouseDown: (e) => {
157
- e.target === e.currentTarget && m.current();
160
+ e.target === e.currentTarget && h.current();
158
161
  },
159
162
  children: /* @__PURE__ */ n("div", {
160
- ref: d,
163
+ ref: f,
161
164
  className: u === void 0 ? "pb-dialog" : `pb-dialog ${u}`,
162
165
  role: "dialog",
163
166
  "aria-modal": "true",
164
- "aria-labelledby": p,
167
+ "aria-labelledby": m,
165
168
  tabIndex: -1,
166
169
  onKeyDown: (e) => {
167
170
  if (e.defaultPrevented) return;
168
171
  if (e.key === "Escape") {
169
- e.preventDefault(), e.stopPropagation(), m.current();
172
+ e.preventDefault(), e.stopPropagation(), h.current();
170
173
  return;
171
174
  }
172
- if (e.key !== "Tab" || d.current === null) return;
173
- let t = y(d.current), n = t[0], r = t[t.length - 1];
175
+ if (e.key !== "Tab" || f.current === null) return;
176
+ let t = b(f.current), n = t[0], r = t[t.length - 1];
174
177
  if (n === void 0 || r === void 0) {
175
178
  e.preventDefault();
176
179
  return;
177
180
  }
178
181
  let i = document.activeElement;
179
- e.shiftKey && (i === n || i === d.current) ? (e.preventDefault(), r.focus()) : !e.shiftKey && i === r && (e.preventDefault(), n.focus());
182
+ e.shiftKey && (i === n || i === f.current) ? (e.preventDefault(), r.focus()) : !e.shiftKey && i === r && (e.preventDefault(), n.focus());
180
183
  },
181
184
  children: [
182
185
  /* @__PURE__ */ n("div", {
183
186
  className: "pb-dialog-head",
184
187
  children: [/* @__PURE__ */ t("h2", {
185
188
  className: "pb-dialog-title",
186
- id: p,
189
+ id: m,
187
190
  children: r
188
191
  }), /* @__PURE__ */ t(g, {
189
192
  className: "pb-dialog-close",
190
- label: c,
193
+ label: d.close,
191
194
  onClick: () => {
192
- m.current();
195
+ h.current();
193
196
  },
194
197
  children: /* @__PURE__ */ t(_, {})
195
198
  })]
196
199
  }),
197
200
  /* @__PURE__ */ t("div", {
198
- ref: f,
201
+ ref: p,
199
202
  className: "pb-dialog-body",
200
203
  tabIndex: 0,
201
204
  children: i
@@ -208,15 +211,15 @@ function x({ onClose: e, title: r, children: i, actions: a, closeLabel: c = "Clo
208
211
  })
209
212
  });
210
213
  }
211
- function S({ open: e, ...n }) {
212
- return e ? u(/* @__PURE__ */ t(x, { ...n }), document.body) : null;
214
+ function C({ open: e, ...n }) {
215
+ return e ? u(/* @__PURE__ */ t(S, { ...n }), document.body) : null;
213
216
  }
214
217
  // src/primitives/field/Field.tsx
215
- function C(e) {
218
+ function w(e) {
216
219
  return e != null && e !== !1 && e !== "";
217
220
  }
218
- function w({ label: e, error: a, hint: o, layout: c = "stacked", className: l, children: u, ...d }) {
219
- let f = s(), p = u, m = i(p) ? p.props : void 0, h = m?.id ?? `${f}-control`, g = C(o) ? `${f}-hint` : void 0, _ = C(a) ? `${f}-error` : void 0, v = [
221
+ function T({ label: e, error: a, hint: o, layout: c = "stacked", className: l, children: u, ...d }) {
222
+ let f = s(), p = u, m = i(p) ? p.props : void 0, h = m?.id ?? `${f}-control`, g = w(o) ? `${f}-hint` : void 0, _ = w(a) ? `${f}-error` : void 0, v = [
220
223
  m?.["aria-describedby"],
221
224
  g,
222
225
  _
@@ -253,7 +256,7 @@ function w({ label: e, error: a, hint: o, layout: c = "stacked", className: l, c
253
256
  });
254
257
  }
255
258
  // src/primitives/key-value/KeyValue.tsx
256
- function T({ rows: e, label: r, className: i }) {
259
+ function E({ rows: e, label: r, className: i }) {
257
260
  return /* @__PURE__ */ t("dl", {
258
261
  className: i === void 0 ? "pb-key-value" : `pb-key-value ${i}`,
259
262
  "aria-label": r,
@@ -268,7 +271,7 @@ function T({ rows: e, label: r, className: i }) {
268
271
  });
269
272
  }
270
273
  // src/primitives/panel/scroll-focus.ts
271
- function E(e) {
274
+ function ee(e) {
272
275
  return e.scrollHeight > e.clientHeight || e.scrollWidth > e.clientWidth;
273
276
  }
274
277
  function D(e) {
@@ -276,7 +279,7 @@ function D(e) {
276
279
  let t = e.current;
277
280
  if (t === null) return;
278
281
  let n = () => {
279
- E(t) ? t.tabIndex = 0 : t.removeAttribute("tabindex");
282
+ ee(t) ? t.tabIndex = 0 : t.removeAttribute("tabindex");
280
283
  };
281
284
  n();
282
285
  let r = typeof ResizeObserver == "function" ? new ResizeObserver(n) : null, i = () => {
@@ -426,40 +429,44 @@ function N({ font: e = "ui", className: n, children: r, ...i }) {
426
429
  });
427
430
  }
428
431
  // src/primitives/sheet/Sheet.tsx
429
- function P({ onClose: e, side: r = "right", title: i, label: a, children: c, width: u, closeLabel: d = "Close", className: f }) {
430
- let p = l(null), m = s(), h = l(null);
432
+ var P = { close: "Close" };
433
+ function F({ onClose: e, side: r = "right", title: i, label: a, children: c, width: u, labels: d, className: f }) {
434
+ let p = {
435
+ ...P,
436
+ ...d
437
+ }, m = l(null), h = s(), v = l(null);
431
438
  o(() => {
432
- let e = p.current;
439
+ let e = m.current;
433
440
  return () => {
434
- let t = h.current, n = document.activeElement;
441
+ let t = v.current, n = document.activeElement;
435
442
  (n === null || n === document.body || (e?.contains(n) ?? !1)) && t?.isConnected === !0 && t.focus();
436
443
  };
437
444
  }, []);
438
- let v = (e) => {
445
+ let y = (e) => {
439
446
  let t = e.relatedTarget;
440
- t instanceof HTMLElement && !e.currentTarget.contains(t) && (h.current = t);
441
- }, y = (t) => {
447
+ t instanceof HTMLElement && !e.currentTarget.contains(t) && (v.current = t);
448
+ }, b = (t) => {
442
449
  t.defaultPrevented || t.key !== "Escape" || (t.preventDefault(), t.stopPropagation(), e());
443
- }, b = u === void 0 ? void 0 : { "--pb-sheet-width": `${u}px` };
450
+ }, x = u === void 0 ? void 0 : { "--pb-sheet-width": `${u}px` };
444
451
  return /* @__PURE__ */ n("section", {
445
- ref: p,
452
+ ref: m,
446
453
  className: f === void 0 ? "pb-sheet" : `pb-sheet ${f}`,
447
454
  "data-side": r,
448
455
  role: "dialog",
449
- "aria-labelledby": i === void 0 ? void 0 : m,
456
+ "aria-labelledby": i === void 0 ? void 0 : h,
450
457
  "aria-label": i === void 0 ? a : void 0,
451
- style: b,
452
- onFocus: v,
453
- onKeyDown: y,
458
+ style: x,
459
+ onFocus: y,
460
+ onKeyDown: b,
454
461
  children: [/* @__PURE__ */ n("div", {
455
462
  className: "pb-sheet-head",
456
463
  children: [i === void 0 ? /* @__PURE__ */ t("span", { className: "pb-sheet-title" }) : /* @__PURE__ */ t("h2", {
457
464
  className: "pb-sheet-title",
458
- id: m,
465
+ id: h,
459
466
  children: i
460
467
  }), /* @__PURE__ */ t(g, {
461
468
  className: "pb-sheet-close",
462
- label: d,
469
+ label: p.close,
463
470
  onClick: e,
464
471
  children: /* @__PURE__ */ t(_, {})
465
472
  })]
@@ -470,52 +477,60 @@ function P({ onClose: e, side: r = "right", title: i, label: a, children: c, wid
470
477
  })]
471
478
  });
472
479
  }
473
- function F({ open: e, ...n }) {
474
- return e ? /* @__PURE__ */ t(P, { ...n }) : null;
480
+ function I({ open: e, ...n }) {
481
+ return e ? /* @__PURE__ */ t(F, { ...n }) : null;
475
482
  }
476
483
  // src/primitives/splitter/splitter-math.ts
477
- function I(e, t) {
484
+ function L(e, t) {
478
485
  let n = Math.max(t.min, t.max);
479
486
  return Math.round(Math.min(n, Math.max(t.min, e)));
480
487
  }
481
- function L(e, t, n, r) {
482
- return I(e + n * t, r);
488
+ function R(e, t, n, r) {
489
+ return L(e + n * t, r);
483
490
  }
484
- function R(e, t) {
485
- return e === "vertical" ? t === "start" ? "ArrowLeft" : "ArrowRight" : t === "start" ? "ArrowUp" : "ArrowDown";
491
+ function z(e, t, n) {
492
+ let r = t === "start" ? -1 : 1;
493
+ return e === "vertical" && n === "rtl" ? -r : r;
486
494
  }
487
- var z = {
495
+ function B(e, t, n) {
496
+ return e === "vertical" ? z(e, t, n) === -1 ? "ArrowLeft" : "ArrowRight" : t === "start" ? "ArrowUp" : "ArrowDown";
497
+ }
498
+ var V = {
488
499
  ArrowLeft: "ArrowRight",
489
500
  ArrowRight: "ArrowLeft",
490
501
  ArrowUp: "ArrowDown",
491
502
  ArrowDown: "ArrowUp"
492
503
  };
493
- function B(e, t, n, r, i) {
494
- if (t === n) return I(e + r, i);
495
- if (t === z[n]) return I(e - r, i);
496
- if (t === "Home") return I(i.min, i);
497
- if (t === "End") return I(i.max, i);
504
+ function H(e, t, n, r, i) {
505
+ if (t === n) return L(e + r, i);
506
+ if (t === V[n]) return L(e - r, i);
507
+ if (t === "Home") return L(i.min, i);
508
+ if (t === "End") return L(i.max, i);
498
509
  }
499
510
  // src/primitives/splitter/Splitter.tsx
500
- function V({ orientation: e, value: n, min: r, max: i, onChange: a, label: o, edge: s = "start", step: c = 16, className: u, onPointerDown: d, onPointerMove: f, onPointerUp: p, onPointerCancel: m, onKeyDown: h, ...g }) {
511
+ function U(e) {
512
+ return getComputedStyle(e).direction === "rtl" ? "rtl" : "ltr";
513
+ }
514
+ function W({ orientation: e, value: n, min: r, max: i, onChange: a, label: o, edge: s = "start", step: c = 16, className: u, onPointerDown: d, onPointerMove: f, onPointerUp: p, onPointerCancel: m, onKeyDown: h, ...g }) {
501
515
  let _ = l(null), v = {
502
516
  min: r,
503
517
  max: i
504
518
  }, y = (t) => e === "vertical" ? t.clientX : t.clientY;
505
- function b(e) {
506
- if (d?.(e), e.defaultPrevented || e.button !== 0) return;
507
- e.preventDefault();
508
- let t = e.currentTarget;
509
- typeof t.setPointerCapture == "function" && t.setPointerCapture(e.pointerId), t.focus(), t.dataset.dragging = "", _.current = {
519
+ function b(t) {
520
+ if (d?.(t), t.defaultPrevented || t.button !== 0) return;
521
+ t.preventDefault();
522
+ let r = t.currentTarget;
523
+ typeof r.setPointerCapture == "function" && r.setPointerCapture(t.pointerId), r.focus(), r.dataset.dragging = "", _.current = {
510
524
  start: n,
511
- at: y(e)
525
+ at: y(t),
526
+ sign: z(e, s, U(r))
512
527
  };
513
528
  }
514
529
  function x(e) {
515
530
  f?.(e);
516
531
  let t = _.current;
517
532
  if (t === null) return;
518
- let r = L(t.start, y(e) - t.at, s === "start" ? -1 : 1, v);
533
+ let r = R(t.start, y(e) - t.at, t.sign, v);
519
534
  r !== n && a(r);
520
535
  }
521
536
  function S(e) {
@@ -526,7 +541,7 @@ function V({ orientation: e, value: n, min: r, max: i, onChange: a, label: o, ed
526
541
  }
527
542
  function C(t) {
528
543
  if (h?.(t), t.defaultPrevented || t.altKey || t.ctrlKey || t.metaKey) return;
529
- let r = B(n, t.key, R(e, s), c, v);
544
+ let r = H(n, t.key, B(e, s, U(t.currentTarget)), c, v);
530
545
  r !== void 0 && (t.preventDefault(), r !== n && a(r));
531
546
  }
532
547
  return /* @__PURE__ */ t("div", {
@@ -549,7 +564,7 @@ function V({ orientation: e, value: n, min: r, max: i, onChange: a, label: o, ed
549
564
  });
550
565
  }
551
566
  // src/primitives/text-input/TextInput.tsx
552
- function H({ font: e = "ui", type: n = "text", className: r, ...i }) {
567
+ function G({ font: e = "ui", type: n = "text", className: r, ...i }) {
553
568
  return /* @__PURE__ */ t("input", {
554
569
  ...i,
555
570
  type: n,
@@ -558,38 +573,38 @@ function H({ font: e = "ui", type: n = "text", className: r, ...i }) {
558
573
  });
559
574
  }
560
575
  // src/primitives/theme-switch/ThemeSwitch.tsx
561
- var U = {
576
+ var K = {
562
577
  theme: "Theme",
563
578
  system: "system",
564
579
  light: "light",
565
580
  dark: "dark",
566
581
  systemHint: "follows the system's setting",
567
582
  clickFor: "click for"
568
- }, W = [
583
+ }, q = [
569
584
  "system",
570
585
  "light",
571
586
  "dark"
572
587
  ];
573
- function G(e) {
574
- return W[(W.indexOf(e) + 1) % W.length] ?? "system";
588
+ function J(e) {
589
+ return q[(q.indexOf(e) + 1) % q.length] ?? "system";
575
590
  }
576
- function K(e, t = U) {
591
+ function Y(e, t = K) {
577
592
  let n = e === "system" ? ` (${t.systemHint})` : "";
578
- return `${t.theme}: ${t[e]}${n}; ${t.clickFor} ${t[G(e)]}`;
593
+ return `${t.theme}: ${t[e]}${n}; ${t.clickFor} ${t[J(e)]}`;
579
594
  }
580
- function q({ choice: e, onChoose: r, labels: i, className: a, ...o }) {
595
+ function X({ choice: e, onChoose: r, labels: i, className: a, ...o }) {
581
596
  let s = {
582
- ...U,
597
+ ...K,
583
598
  ...i
584
599
  };
585
600
  return /* @__PURE__ */ n("button", {
586
601
  ...o,
587
602
  type: "button",
588
603
  className: a === void 0 ? "pb-theme-switch" : `pb-theme-switch ${a}`,
589
- title: K(e, s),
604
+ title: Y(e, s),
590
605
  "aria-label": `${s.theme}: ${s[e]}`,
591
606
  onClick: () => {
592
- r(G(e));
607
+ r(J(e));
593
608
  },
594
609
  children: [/* @__PURE__ */ n("svg", {
595
610
  className: "pb-theme-switch-icon",
@@ -615,16 +630,16 @@ function q({ choice: e, onChoose: r, labels: i, className: a, ...o }) {
615
630
  });
616
631
  }
617
632
  // src/primitives/toolbar/roving.ts
618
- var J = "button:not(:disabled), a[href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [role=\"button\"], [role=\"checkbox\"], [role=\"radio\"], [role=\"menuitem\"], [role=\"switch\"]";
619
- function Y(e) {
620
- return [...e.querySelectorAll(J)].filter((t) => t.closest("[role=\"toolbar\"]") === e);
633
+ var te = "button:not(:disabled), a[href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [role=\"button\"], [role=\"checkbox\"], [role=\"radio\"], [role=\"menuitem\"], [role=\"switch\"]";
634
+ function Z(e) {
635
+ return [...e.querySelectorAll(te)].filter((t) => t.closest("[role=\"toolbar\"]") === e);
621
636
  }
622
- function X(e, t) {
637
+ function Q(e, t) {
623
638
  let n = t !== null && e.includes(t) ? t : e[0] ?? null;
624
639
  for (let t of e) t.tabIndex = t === n ? 0 : -1;
625
640
  return n;
626
641
  }
627
- function Z(e, t, n, r, i) {
642
+ function ne(e, t, n, r, i) {
628
643
  if (t === 0) return;
629
644
  if (n === "Home") return 0;
630
645
  if (n === "End") return t - 1;
@@ -632,7 +647,7 @@ function Z(e, t, n, r, i) {
632
647
  if (n === o) return (e + 1) % t;
633
648
  if (n === a) return (e - 1 + t) % t;
634
649
  }
635
- function Q(e) {
650
+ function re(e) {
636
651
  return e instanceof HTMLTextAreaElement ? !0 : e instanceof HTMLInputElement ? ![
637
652
  "button",
638
653
  "checkbox",
@@ -652,7 +667,7 @@ function $({ label: e, orientation: n = "horizontal", className: r, ref: i, onKe
652
667
  let e = d.current;
653
668
  if (e === null) return;
654
669
  let t = () => {
655
- f.current = X(Y(e), f.current);
670
+ f.current = Q(Z(e), f.current);
656
671
  };
657
672
  t();
658
673
  let n = new MutationObserver(t);
@@ -669,16 +684,16 @@ function $({ label: e, orientation: n = "horizontal", className: r, ref: i, onKe
669
684
  s?.(e);
670
685
  let t = d.current;
671
686
  if (t === null) return;
672
- let n = Y(t);
673
- e.target instanceof HTMLElement && n.includes(e.target) && (f.current = X(n, e.target));
687
+ let n = Z(t);
688
+ e.target instanceof HTMLElement && n.includes(e.target) && (f.current = Q(n, e.target));
674
689
  }
675
690
  function m(e) {
676
691
  a?.(e);
677
692
  let t = d.current;
678
- if (e.defaultPrevented || t === null || e.altKey || e.ctrlKey || e.metaKey || Q(e.target)) return;
679
- let r = Y(t), i = r.indexOf(e.target);
693
+ if (e.defaultPrevented || t === null || e.altKey || e.ctrlKey || e.metaKey || re(e.target)) return;
694
+ let r = Z(t), i = r.indexOf(e.target);
680
695
  if (i === -1) return;
681
- let o = getComputedStyle(t).direction === "rtl", s = Z(i, r.length, e.key, n, o);
696
+ let o = getComputedStyle(t).direction === "rtl", s = ne(i, r.length, e.key, n, o);
682
697
  s !== void 0 && (e.preventDefault(), r[s]?.focus());
683
698
  }
684
699
  return /* @__PURE__ */ t("div", {
@@ -697,14 +712,14 @@ function $({ label: e, orientation: n = "horizontal", className: r, ref: i, onKe
697
712
  });
698
713
  }
699
714
  // src/primitives/tool-group/ToolGroup.tsx
700
- function ee({ className: e, ...n }) {
715
+ function ie({ className: e, ...n }) {
701
716
  return /* @__PURE__ */ t($, {
702
717
  ...n,
703
718
  className: e === void 0 ? "pb-tool-group" : `pb-tool-group ${e}`
704
719
  });
705
720
  }
706
721
  // src/primitives/warn-mark/WarnMark.tsx
707
- function te({ label: r, title: i, className: a }) {
722
+ function ae({ label: r, title: i, className: a }) {
708
723
  return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
709
724
  className: a === void 0 ? "pb-warn-mark" : `pb-warn-mark ${a}`,
710
725
  "aria-hidden": "true",
@@ -715,6 +730,6 @@ function te({ label: r, title: i, className: a }) {
715
730
  children: r
716
731
  })] });
717
732
  }
718
- export { d as Badge, p as Button, h as Checkbox, S as Dialog, w as Field, g as IconButton, T as KeyValue, O as Panel, k as Pill, j as RadioGroup, M as SectionTitle, N as Select, F as Sheet, f as Spinner, V as Splitter, H as TextInput, q as ThemeSwitch, ee as ToolGroup, $ as Toolbar, te as WarnMark, U as defaultThemeSwitchLabels, K as themeSwitchTitle };
733
+ export { d as Badge, p as Button, h as Checkbox, C as Dialog, T as Field, g as IconButton, E as KeyValue, O as Panel, k as Pill, j as RadioGroup, M as SectionTitle, N as Select, I as Sheet, f as Spinner, W as Splitter, G as TextInput, X as ThemeSwitch, ie as ToolGroup, $ as Toolbar, ae as WarnMark, v as defaultDialogLabels, P as defaultSheetLabels, K as defaultThemeSwitchLabels, Y as themeSwitchTitle };
719
734
 
720
735
  //# sourceMappingURL=primitives.js.map