@ai-matrx/design-system 0.60.8 → 0.60.9

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 (35) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/data-table/copy-helpers.d.cts +1 -1
  3. package/dist/data-table/copy-helpers.d.ts +1 -1
  4. package/dist/data-table/filter-engine.d.cts +1 -1
  5. package/dist/data-table/filter-engine.d.ts +1 -1
  6. package/dist/data-table/host.d.cts +1 -1
  7. package/dist/data-table/host.d.ts +1 -1
  8. package/dist/data-table/index.cjs +357 -334
  9. package/dist/data-table/index.cjs.map +1 -1
  10. package/dist/data-table/index.d.cts +2 -2
  11. package/dist/data-table/index.d.ts +2 -2
  12. package/dist/data-table/index.js +357 -334
  13. package/dist/data-table/index.js.map +1 -1
  14. package/dist/data-table/infer-filter.d.cts +1 -1
  15. package/dist/data-table/infer-filter.d.ts +1 -1
  16. package/dist/data-table/layered-filters.d.cts +1 -1
  17. package/dist/data-table/layered-filters.d.ts +1 -1
  18. package/dist/data-table/query-control.d.cts +1 -1
  19. package/dist/data-table/query-control.d.ts +1 -1
  20. package/dist/data-table/types.cjs.map +1 -1
  21. package/dist/data-table/types.d.cts +1 -1
  22. package/dist/data-table/types.d.ts +1 -1
  23. package/dist/data-table/url-state.d.cts +1 -1
  24. package/dist/data-table/url-state.d.ts +1 -1
  25. package/dist/data-table/xlsx.d.cts +1 -1
  26. package/dist/data-table/xlsx.d.ts +1 -1
  27. package/dist/index.cjs +365 -233
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.cts +19 -2
  30. package/dist/index.d.ts +19 -2
  31. package/dist/index.js +365 -233
  32. package/dist/index.js.map +1 -1
  33. package/dist/{layered-filters-BsnawJgC.d.ts → layered-filters-B0q8G3QR.d.ts} +21 -0
  34. package/dist/{layered-filters-C9MwGVTc.d.cts → layered-filters-CisXX8K5.d.cts} +21 -0
  35. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -184,6 +184,7 @@ __export(src_exports, {
184
184
  OrganizationMark: () => OrganizationMark,
185
185
  OrganizationPicker: () => OrganizationPicker,
186
186
  OverflowToolbar: () => OverflowToolbar,
187
+ PILL_MAX_WIDTH_PX: () => PILL_MAX_WIDTH_PX,
187
188
  POPPER_OFFSET: () => POPPER_OFFSET,
188
189
  Popover: () => Popover,
189
190
  PopoverAnchor: () => PopoverAnchor,
@@ -290,7 +291,9 @@ __export(src_exports, {
290
291
  badgeVariants: () => badgeVariants,
291
292
  buttonVariants: () => buttonVariants,
292
293
  cn: () => cn,
294
+ enablePillGuard: () => enablePillGuard,
293
295
  enableTapTargetGuard: () => enableTapTargetGuard,
296
+ findPillViolation: () => findPillViolation,
294
297
  findTapPlacementWarning: () => findTapPlacementWarning,
295
298
  findTapViolation: () => findTapViolation,
296
299
  floatingLayerZIndex: () => floatingLayerZIndex,
@@ -608,9 +611,10 @@ AccordionContent.displayName = "AccordionContent";
608
611
 
609
612
  // src/badge.tsx
610
613
  var import_class_variance_authority = require("class-variance-authority");
614
+ var React2 = __toESM(require("react"), 1);
611
615
  var import_jsx_runtime3 = require("react/jsx-runtime");
612
616
  var badgeVariants = (0, import_class_variance_authority.cva)(
613
- "inline-flex items-center rounded-md border px-2 py-0.5 text-[11px] font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-0",
617
+ "inline-flex min-w-0 max-w-[16rem] items-center gap-1 whitespace-nowrap rounded-md border px-2 py-0.5 text-[11px] font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-0 [&>svg]:shrink-0",
614
618
  {
615
619
  variants: {
616
620
  variant: {
@@ -630,8 +634,136 @@ var badgeVariants = (0, import_class_variance_authority.cva)(
630
634
  }
631
635
  }
632
636
  );
633
- function Badge({ className, variant, ...props }) {
634
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { "data-slot": "badge", className: cn(badgeVariants({ variant }), className), ...props });
637
+ function textOf(children) {
638
+ const parts = [];
639
+ let onlyText = true;
640
+ React2.Children.forEach(children, (c) => {
641
+ if (typeof c === "string" || typeof c === "number") parts.push(String(c));
642
+ else if (c != null && typeof c !== "boolean") onlyText = false;
643
+ });
644
+ const text = parts.join("").trim();
645
+ return onlyText && text ? text : null;
646
+ }
647
+ function Badge({ className, variant, children, title, ...props }) {
648
+ const clamped = React2.Children.map(
649
+ children,
650
+ (c) => typeof c === "string" || typeof c === "number" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { "data-slot": "badge-text", className: "min-w-0 truncate", children: c }) : c
651
+ );
652
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
653
+ "span",
654
+ {
655
+ "data-slot": "badge",
656
+ title: title ?? textOf(children) ?? void 0,
657
+ className: cn(badgeVariants({ variant }), className),
658
+ ...props,
659
+ children: clamped
660
+ }
661
+ );
662
+ }
663
+
664
+ // src/pill-guard.ts
665
+ var PILL_MAX_WIDTH_PX = 320;
666
+ var SELECTOR = [
667
+ '[data-slot="badge"]',
668
+ "[data-matrx-pill]",
669
+ "a.rounded-full",
670
+ "button.rounded-full",
671
+ "span.rounded-full",
672
+ "div.rounded-full"
673
+ ].join(",");
674
+ var SLOT = /* @__PURE__ */ Symbol.for("@ai-matrx/design-system:pill-guard");
675
+ function px(v) {
676
+ const n = Number.parseFloat(v ?? "");
677
+ return Number.isFinite(n) ? n : 0;
678
+ }
679
+ function describe(el) {
680
+ const t = (el.textContent ?? "").replace(/\s+/g, " ").trim();
681
+ return t.length > 60 ? `${t.slice(0, 57)}\u2026` : t;
682
+ }
683
+ function findPillViolation(el, maxWidth = PILL_MAX_WIDTH_PX) {
684
+ if (el.getAttribute("data-matrx-pill") === "off") return null;
685
+ const text = (el.textContent ?? "").trim();
686
+ if (!text) return null;
687
+ const view = el.ownerDocument.defaultView;
688
+ if (!view) return null;
689
+ const rect = el.getBoundingClientRect();
690
+ if (rect.width === 0 || rect.height === 0) return null;
691
+ const cs = view.getComputedStyle(el);
692
+ if (cs.display === "none" || cs.visibility === "hidden") return null;
693
+ if (rect.width > maxWidth + 0.5) {
694
+ return `pill is ${Math.round(rect.width)}px wide (budget ${maxWidth}px) holding "${describe(el)}" \u2014 a pill holds a short label: clamp it (Badge, or truncate + max-w + title) or render a list row.`;
695
+ }
696
+ const fontSize = px(cs.fontSize) || 12;
697
+ const lineHeight = px(cs.lineHeight) || fontSize * 1.4;
698
+ const inner = rect.height - px(cs.paddingTop) - px(cs.paddingBottom) - px(cs.borderTopWidth) - px(cs.borderBottomWidth);
699
+ if (inner > lineHeight * 1.5) {
700
+ const lines = Math.round(inner / lineHeight);
701
+ return `pill wraps to ${lines} lines holding "${describe(el)}" \u2014 a pill is one line: clamp it (Badge, or truncate + max-w + title) or render a list row.`;
702
+ }
703
+ return null;
704
+ }
705
+ var OUTLINE = "2px dashed hsl(var(--destructive))";
706
+ function enablePillGuard(options = {}) {
707
+ const g = globalThis;
708
+ if (g[SLOT]) return g[SLOT];
709
+ const doc = options.root ?? (typeof document === "undefined" ? null : document);
710
+ const view = doc?.defaultView;
711
+ if (!doc || !view) return () => {
712
+ };
713
+ const maxWidth = options.maxWidth ?? PILL_MAX_WIDTH_PX;
714
+ const marked = /* @__PURE__ */ new Map();
715
+ const reported2 = /* @__PURE__ */ new Set();
716
+ let timer = null;
717
+ let observer = null;
718
+ const scan = () => {
719
+ timer = null;
720
+ observer?.disconnect();
721
+ for (const [el, before] of marked) {
722
+ if (!el.isConnected || !findPillViolation(el, maxWidth)) {
723
+ el.style.outline = before;
724
+ el.removeAttribute("data-matrx-pill-violation");
725
+ marked.delete(el);
726
+ }
727
+ }
728
+ doc.querySelectorAll(SELECTOR).forEach((el) => {
729
+ const reason = findPillViolation(el, maxWidth);
730
+ if (!reason) return;
731
+ if (!marked.has(el)) marked.set(el, el.style.outline);
732
+ el.style.outline = OUTLINE;
733
+ el.style.outlineOffset = "1px";
734
+ el.setAttribute("data-matrx-pill-violation", reason);
735
+ if (!reported2.has(reason)) {
736
+ reported2.add(reason);
737
+ console.error(`[pill-guard] ${reason}`, el);
738
+ }
739
+ });
740
+ observe();
741
+ };
742
+ const schedule = () => {
743
+ if (timer) clearTimeout(timer);
744
+ timer = setTimeout(scan, 400);
745
+ };
746
+ const observe = () => {
747
+ if (!doc.body) return;
748
+ observer ??= new view.MutationObserver(schedule);
749
+ observer.observe(doc.body, { childList: true, subtree: true, characterData: true });
750
+ };
751
+ view.addEventListener("resize", schedule);
752
+ observe();
753
+ schedule();
754
+ const off = () => {
755
+ observer?.disconnect();
756
+ view.removeEventListener("resize", schedule);
757
+ if (timer) clearTimeout(timer);
758
+ for (const [el, before] of marked) {
759
+ el.style.outline = before;
760
+ el.removeAttribute("data-matrx-pill-violation");
761
+ }
762
+ marked.clear();
763
+ delete g[SLOT];
764
+ };
765
+ g[SLOT] = off;
766
+ return off;
635
767
  }
636
768
 
637
769
  // src/bottom-sheet.tsx
@@ -640,13 +772,13 @@ var import_vaul2 = require("vaul");
640
772
 
641
773
  // src/drawer.tsx
642
774
  var import_react_tree = require("@ai-matrx/kit/react-tree");
643
- var React4 = __toESM(require("react"), 1);
775
+ var React5 = __toESM(require("react"), 1);
644
776
  var import_vaul = require("vaul");
645
777
 
646
778
  // src/floating-layer.tsx
647
779
  var import_react_focus_scope = require("@radix-ui/react-focus-scope");
648
780
  var import_react_slot = require("@radix-ui/react-slot");
649
- var React2 = __toESM(require("react"), 1);
781
+ var React3 = __toESM(require("react"), 1);
650
782
  var import_jsx_runtime4 = require("react/jsx-runtime");
651
783
  var MODAL_LAYER_Z = 1e4;
652
784
  var FLOATING_LAYER_ATTR = "data-matrx-floating-layer";
@@ -691,10 +823,10 @@ function subscribe(listener) {
691
823
  return () => registry.listeners.delete(listener);
692
824
  }
693
825
  function useModalLayerOpen() {
694
- return React2.useSyncExternalStore(subscribe, isModalLayerOpen, () => false);
826
+ return React3.useSyncExternalStore(subscribe, isModalLayerOpen, () => false);
695
827
  }
696
828
  function useModalLayer(active) {
697
- React2.useLayoutEffect(() => active ? registerModalLayer() : void 0, [active]);
829
+ React3.useLayoutEffect(() => active ? registerModalLayer() : void 0, [active]);
698
830
  }
699
831
  var POPPER_WRAPPER = "[data-radix-popper-content-wrapper]";
700
832
  function isInsideFloatingLayer(target) {
@@ -715,8 +847,8 @@ function useFloatingLayerZIndex(ownZ) {
715
847
  return floatingLayerZIndex(ownZ, useModalLayerOpen());
716
848
  }
717
849
  var preventAutoFocus = (event) => event.preventDefault();
718
- var FloatingLayer = React2.forwardRef(({ children }, ref) => {
719
- const [opener] = React2.useState(
850
+ var FloatingLayer = React3.forwardRef(({ children }, ref) => {
851
+ const [opener] = React3.useState(
720
852
  () => typeof document === "undefined" ? null : document.activeElement
721
853
  );
722
854
  const returnFocus = (event) => {
@@ -750,11 +882,11 @@ var FloatingLayer = React2.forwardRef(({ children }, ref) => {
750
882
  FloatingLayer.displayName = "FloatingLayer";
751
883
 
752
884
  // src/radix-dialog-modal-context.tsx
753
- var React3 = __toESM(require("react"), 1);
885
+ var React4 = __toESM(require("react"), 1);
754
886
  var import_jsx_runtime5 = require("react/jsx-runtime");
755
887
  var CONTEXT_SLOT = /* @__PURE__ */ Symbol.for("ai-matrx.design-system.dialog-modal-context");
756
888
  var contextRegistry = globalThis;
757
- var RadixDialogModalContext = contextRegistry[CONTEXT_SLOT] ??= React3.createContext(true);
889
+ var RadixDialogModalContext = contextRegistry[CONTEXT_SLOT] ??= React4.createContext(true);
758
890
  function RadixDialogModalProvider({
759
891
  children,
760
892
  modal
@@ -762,13 +894,13 @@ function RadixDialogModalProvider({
762
894
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RadixDialogModalContext.Provider, { value: modal, children });
763
895
  }
764
896
  function useRadixDialogModal() {
765
- return React3.useContext(RadixDialogModalContext);
897
+ return React4.useContext(RadixDialogModalContext);
766
898
  }
767
899
 
768
900
  // src/drawer.tsx
769
901
  var import_jsx_runtime6 = require("react/jsx-runtime");
770
- var DrawerDirectionContext = React4.createContext("bottom");
771
- var useDrawerDirection = () => React4.useContext(DrawerDirectionContext);
902
+ var DrawerDirectionContext = React5.createContext("bottom");
903
+ var useDrawerDirection = () => React5.useContext(DrawerDirectionContext);
772
904
  var Drawer = ({
773
905
  children,
774
906
  shouldScaleBackground = true,
@@ -798,7 +930,7 @@ Drawer.displayName = "Drawer";
798
930
  var DrawerTrigger = import_vaul.Drawer.Trigger;
799
931
  var DrawerPortal = import_vaul.Drawer.Portal;
800
932
  var DrawerClose = import_vaul.Drawer.Close;
801
- var DrawerOverlay = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
933
+ var DrawerOverlay = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
802
934
  import_vaul.Drawer.Overlay,
803
935
  {
804
936
  ref,
@@ -811,7 +943,7 @@ var DrawerOverlay = React4.forwardRef(({ className, ...props }, ref) => /* @__PU
811
943
  }
812
944
  ));
813
945
  DrawerOverlay.displayName = import_vaul.Drawer.Overlay.displayName;
814
- var DrawerDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
946
+ var DrawerDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
815
947
  import_vaul.Drawer.Description,
816
948
  {
817
949
  ref,
@@ -821,7 +953,7 @@ var DrawerDescription = React4.forwardRef(({ className, ...props }, ref) => /* @
821
953
  }
822
954
  ));
823
955
  DrawerDescription.displayName = import_vaul.Drawer.Description.displayName;
824
- var DrawerContentPrimitive = React4.forwardRef(({ onInteractOutside, ...props }, ref) => {
956
+ var DrawerContentPrimitive = React5.forwardRef(({ onInteractOutside, ...props }, ref) => {
825
957
  useModalLayer(true);
826
958
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
827
959
  import_vaul.Drawer.Content,
@@ -847,7 +979,7 @@ var SIZE_CLASSES = {
847
979
  left: { adaptive: "w-auto max-w-[92vw]", full: "h-dvh w-[92vw] max-w-sm" },
848
980
  right: { adaptive: "w-auto max-w-[92vw]", full: "h-dvh w-[92vw] max-w-sm" }
849
981
  };
850
- var DrawerContent = React4.forwardRef(({ className, children, size = "adaptive", showHandle, ...props }, ref) => {
982
+ var DrawerContent = React5.forwardRef(({ className, children, size = "adaptive", showHandle, ...props }, ref) => {
851
983
  const direction = useDrawerDirection();
852
984
  const hasDescription = (0, import_react_tree.treeContainsComponent)(children, DrawerDescription) || (0, import_react_tree.treeContainsComponent)(children, import_vaul.Drawer.Description);
853
985
  const withHandle = showHandle ?? (direction === "bottom" || direction === "top");
@@ -929,7 +1061,7 @@ var DrawerFooter = ({
929
1061
  }
930
1062
  );
931
1063
  DrawerFooter.displayName = "DrawerFooter";
932
- var DrawerTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1064
+ var DrawerTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
933
1065
  import_vaul.Drawer.Title,
934
1066
  {
935
1067
  ref,
@@ -1051,14 +1183,14 @@ function BottomSheetFooter({
1051
1183
 
1052
1184
  // src/alert.tsx
1053
1185
  var import_class_variance_authority2 = require("class-variance-authority");
1054
- var React6 = __toESM(require("react"), 1);
1186
+ var React7 = __toESM(require("react"), 1);
1055
1187
 
1056
1188
  // src/error-box.tsx
1057
- var React5 = __toESM(require("react"), 1);
1189
+ var React6 = __toESM(require("react"), 1);
1058
1190
  var import_jsx_runtime8 = require("react/jsx-runtime");
1059
1191
  var CONTEXT_KEY = /* @__PURE__ */ Symbol.for("@ai-matrx/design-system/error-actions");
1060
1192
  var registry2 = globalThis;
1061
- var ErrorActionsContext = registry2[CONTEXT_KEY] ?? (registry2[CONTEXT_KEY] = React5.createContext(null));
1193
+ var ErrorActionsContext = registry2[CONTEXT_KEY] ?? (registry2[CONTEXT_KEY] = React6.createContext(null));
1062
1194
  function ErrorActionsProvider({
1063
1195
  render,
1064
1196
  children
@@ -1066,14 +1198,14 @@ function ErrorActionsProvider({
1066
1198
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ErrorActionsContext.Provider, { value: render, children });
1067
1199
  }
1068
1200
  function useErrorActions() {
1069
- return React5.useContext(ErrorActionsContext);
1201
+ return React6.useContext(ErrorActionsContext);
1070
1202
  }
1071
1203
  function ErrorActions(props) {
1072
1204
  const render = useErrorActions();
1073
1205
  if (!render) return null;
1074
1206
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children: render(props) });
1075
1207
  }
1076
- var ErrorBox = React5.forwardRef(function ErrorBox2({
1208
+ var ErrorBox = React6.forwardRef(function ErrorBox2({
1077
1209
  as = "p",
1078
1210
  message,
1079
1211
  title,
@@ -1120,7 +1252,7 @@ var alertVariants = (0, import_class_variance_authority2.cva)(
1120
1252
  }
1121
1253
  }
1122
1254
  );
1123
- var Alert = React6.forwardRef(
1255
+ var Alert = React7.forwardRef(
1124
1256
  ({ className, variant, children, errorFacts, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1125
1257
  "div",
1126
1258
  {
@@ -1138,7 +1270,7 @@ var Alert = React6.forwardRef(
1138
1270
  )
1139
1271
  );
1140
1272
  Alert.displayName = "Alert";
1141
- var AlertTitle = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1273
+ var AlertTitle = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1142
1274
  "h5",
1143
1275
  {
1144
1276
  ref,
@@ -1148,7 +1280,7 @@ var AlertTitle = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE_
1148
1280
  }
1149
1281
  ));
1150
1282
  AlertTitle.displayName = "AlertTitle";
1151
- var AlertDescription = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1283
+ var AlertDescription = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1152
1284
  "div",
1153
1285
  {
1154
1286
  ref,
@@ -1162,12 +1294,12 @@ AlertDescription.displayName = "AlertDescription";
1162
1294
  // src/alert-dialog.tsx
1163
1295
  var AlertDialogPrimitive = __toESM(require("@radix-ui/react-alert-dialog"), 1);
1164
1296
  var import_react_tree2 = require("@ai-matrx/kit/react-tree");
1165
- var React9 = __toESM(require("react"), 1);
1297
+ var React10 = __toESM(require("react"), 1);
1166
1298
 
1167
1299
  // src/button.tsx
1168
1300
  var import_react_slot2 = require("@radix-ui/react-slot");
1169
1301
  var import_class_variance_authority3 = require("class-variance-authority");
1170
- var React7 = __toESM(require("react"), 1);
1302
+ var React8 = __toESM(require("react"), 1);
1171
1303
  var import_jsx_runtime10 = require("react/jsx-runtime");
1172
1304
  var buttonVariants = (0, import_class_variance_authority3.cva)(
1173
1305
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-0 disabled:opacity-50 active:scale-[0.98] [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
@@ -1235,7 +1367,7 @@ function swallowClick(event) {
1235
1367
  event.preventDefault();
1236
1368
  event.stopPropagation();
1237
1369
  }
1238
- var Button = React7.forwardRef(
1370
+ var Button = React8.forwardRef(
1239
1371
  ({ className, variant, size, asChild = false, onClick, ...props }, ref) => {
1240
1372
  const Component = asChild ? import_react_slot2.Slot : "button";
1241
1373
  const resolvedSize = size ?? "default";
@@ -1302,11 +1434,11 @@ var FORBIDDEN_HOST_MOTION_UTILITIES = [
1302
1434
  ];
1303
1435
 
1304
1436
  // src/portal-container.tsx
1305
- var React8 = __toESM(require("react"), 1);
1437
+ var React9 = __toESM(require("react"), 1);
1306
1438
  var import_jsx_runtime11 = require("react/jsx-runtime");
1307
1439
  var CONTEXT_SLOT2 = /* @__PURE__ */ Symbol.for("ai-matrx.design-system.portal-container-context");
1308
1440
  var contextRegistry2 = globalThis;
1309
- var PortalContainerContext = contextRegistry2[CONTEXT_SLOT2] ??= React8.createContext(void 0);
1441
+ var PortalContainerContext = contextRegistry2[CONTEXT_SLOT2] ??= React9.createContext(void 0);
1310
1442
  function PortalContainerProvider({
1311
1443
  container,
1312
1444
  children
@@ -1314,7 +1446,7 @@ function PortalContainerProvider({
1314
1446
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PortalContainerContext.Provider, { value: container ?? void 0, children });
1315
1447
  }
1316
1448
  function usePortalContainer(explicit) {
1317
- const injected = React8.useContext(PortalContainerContext);
1449
+ const injected = React9.useContext(PortalContainerContext);
1318
1450
  if (explicit !== void 0) {
1319
1451
  return explicit ?? void 0;
1320
1452
  }
@@ -1333,7 +1465,7 @@ var AlertDialogPortal = ({
1333
1465
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AlertDialogPrimitive.Portal, { container: resolved ?? null, ...props });
1334
1466
  };
1335
1467
  AlertDialogPortal.displayName = "AlertDialogPortal";
1336
- var AlertDialogOverlay = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1468
+ var AlertDialogOverlay = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1337
1469
  AlertDialogPrimitive.Overlay,
1338
1470
  {
1339
1471
  ref,
@@ -1347,12 +1479,12 @@ var AlertDialogOverlay = React9.forwardRef(({ className, ...props }, ref) => /*
1347
1479
  }
1348
1480
  ));
1349
1481
  AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
1350
- var AlertDialogContentPrimitive = React9.forwardRef((props, ref) => {
1482
+ var AlertDialogContentPrimitive = React10.forwardRef((props, ref) => {
1351
1483
  useModalLayer(true);
1352
1484
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AlertDialogPrimitive.Content, { ...props, ref, "aria-modal": "true" });
1353
1485
  });
1354
1486
  AlertDialogContentPrimitive.displayName = "AlertDialogContentPrimitive";
1355
- var AlertDialogDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1487
+ var AlertDialogDescription = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1356
1488
  AlertDialogPrimitive.Description,
1357
1489
  {
1358
1490
  ref,
@@ -1362,7 +1494,7 @@ var AlertDialogDescription = React9.forwardRef(({ className, ...props }, ref) =>
1362
1494
  }
1363
1495
  ));
1364
1496
  AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
1365
- var AlertDialogContent = React9.forwardRef(({ className, children, container, animated = true, ...props }, ref) => {
1497
+ var AlertDialogContent = React10.forwardRef(({ className, children, container, animated = true, ...props }, ref) => {
1366
1498
  const hasDescription = (0, import_react_tree2.treeContainsComponent)(children, AlertDialogDescription) || (0, import_react_tree2.treeContainsComponent)(children, AlertDialogPrimitive.Description);
1367
1499
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(AlertDialogPortal, { container, children: [
1368
1500
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AlertDialogOverlay, {}),
@@ -1441,7 +1573,7 @@ var AlertDialogFooter = ({
1441
1573
  }
1442
1574
  );
1443
1575
  AlertDialogFooter.displayName = "AlertDialogFooter";
1444
- var AlertDialogTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1576
+ var AlertDialogTitle = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1445
1577
  AlertDialogPrimitive.Title,
1446
1578
  {
1447
1579
  ref,
@@ -1451,7 +1583,7 @@ var AlertDialogTitle = React9.forwardRef(({ className, ...props }, ref) => /* @_
1451
1583
  }
1452
1584
  ));
1453
1585
  AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
1454
- var AlertDialogAction = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1586
+ var AlertDialogAction = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1455
1587
  AlertDialogPrimitive.Action,
1456
1588
  {
1457
1589
  ref,
@@ -1461,7 +1593,7 @@ var AlertDialogAction = React9.forwardRef(({ className, ...props }, ref) => /* @
1461
1593
  }
1462
1594
  ));
1463
1595
  AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
1464
- var AlertDialogCancel = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1596
+ var AlertDialogCancel = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1465
1597
  AlertDialogPrimitive.Cancel,
1466
1598
  {
1467
1599
  ref,
@@ -1527,14 +1659,14 @@ function DragCursorMonitor({
1527
1659
 
1528
1660
  // src/avatar.tsx
1529
1661
  var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"), 1);
1530
- var React10 = __toESM(require("react"), 1);
1662
+ var React11 = __toESM(require("react"), 1);
1531
1663
  var import_jsx_runtime13 = require("react/jsx-runtime");
1532
1664
  var AVATAR_SIZES = {
1533
1665
  sm: "h-8 w-8 text-[11px]",
1534
1666
  md: "h-9 w-9 text-xs",
1535
1667
  lg: "h-10 w-10 text-sm"
1536
1668
  };
1537
- var Avatar = React10.forwardRef(({ className, size = "lg", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1669
+ var Avatar = React11.forwardRef(({ className, size = "lg", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1538
1670
  AvatarPrimitive.Root,
1539
1671
  {
1540
1672
  ref,
@@ -1548,7 +1680,7 @@ var Avatar = React10.forwardRef(({ className, size = "lg", ...props }, ref) => /
1548
1680
  }
1549
1681
  ));
1550
1682
  Avatar.displayName = AvatarPrimitive.Root.displayName;
1551
- var AvatarImage = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1683
+ var AvatarImage = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1552
1684
  AvatarPrimitive.Image,
1553
1685
  {
1554
1686
  ref,
@@ -1558,7 +1690,7 @@ var AvatarImage = React10.forwardRef(({ className, ...props }, ref) => /* @__PUR
1558
1690
  }
1559
1691
  ));
1560
1692
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
1561
- var AvatarFallback = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1693
+ var AvatarFallback = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1562
1694
  AvatarPrimitive.Fallback,
1563
1695
  {
1564
1696
  ref,
@@ -1573,7 +1705,7 @@ var AvatarFallback = React10.forwardRef(({ className, ...props }, ref) => /* @__
1573
1705
  AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
1574
1706
 
1575
1707
  // src/card.tsx
1576
- var React11 = __toESM(require("react"), 1);
1708
+ var React12 = __toESM(require("react"), 1);
1577
1709
  var import_jsx_runtime14 = require("react/jsx-runtime");
1578
1710
  var CARD_SIZES = {
1579
1711
  sm: {
@@ -1592,11 +1724,11 @@ var CARD_SIZES = {
1592
1724
  padTopless: "p-6 pt-0"
1593
1725
  }
1594
1726
  };
1595
- var CardSizeContext = React11.createContext("md");
1727
+ var CardSizeContext = React12.createContext("md");
1596
1728
  function useCardSize() {
1597
- return React11.useContext(CardSizeContext);
1729
+ return React12.useContext(CardSizeContext);
1598
1730
  }
1599
- var Card = React11.forwardRef(
1731
+ var Card = React12.forwardRef(
1600
1732
  ({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CardSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1601
1733
  "div",
1602
1734
  {
@@ -1609,7 +1741,7 @@ var Card = React11.forwardRef(
1609
1741
  ) })
1610
1742
  );
1611
1743
  Card.displayName = "Card";
1612
- var CardHeader = React11.forwardRef(({ className, ...props }, ref) => {
1744
+ var CardHeader = React12.forwardRef(({ className, ...props }, ref) => {
1613
1745
  const size = useCardSize();
1614
1746
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1615
1747
  "div",
@@ -1626,7 +1758,7 @@ var CardHeader = React11.forwardRef(({ className, ...props }, ref) => {
1626
1758
  );
1627
1759
  });
1628
1760
  CardHeader.displayName = "CardHeader";
1629
- var CardTitle = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1761
+ var CardTitle = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1630
1762
  "h3",
1631
1763
  {
1632
1764
  ref,
@@ -1636,7 +1768,7 @@ var CardTitle = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE_
1636
1768
  }
1637
1769
  ));
1638
1770
  CardTitle.displayName = "CardTitle";
1639
- var CardDescription = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1771
+ var CardDescription = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1640
1772
  "p",
1641
1773
  {
1642
1774
  ref,
@@ -1646,7 +1778,7 @@ var CardDescription = React11.forwardRef(({ className, ...props }, ref) => /* @_
1646
1778
  }
1647
1779
  ));
1648
1780
  CardDescription.displayName = "CardDescription";
1649
- var CardAction = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1781
+ var CardAction = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1650
1782
  "div",
1651
1783
  {
1652
1784
  ref,
@@ -1656,7 +1788,7 @@ var CardAction = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE
1656
1788
  }
1657
1789
  ));
1658
1790
  CardAction.displayName = "CardAction";
1659
- var CardContent = React11.forwardRef(({ className, ...props }, ref) => {
1791
+ var CardContent = React12.forwardRef(({ className, ...props }, ref) => {
1660
1792
  const size = useCardSize();
1661
1793
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1662
1794
  "div",
@@ -1669,7 +1801,7 @@ var CardContent = React11.forwardRef(({ className, ...props }, ref) => {
1669
1801
  );
1670
1802
  });
1671
1803
  CardContent.displayName = "CardContent";
1672
- var CardFooter = React11.forwardRef(({ className, ...props }, ref) => {
1804
+ var CardFooter = React12.forwardRef(({ className, ...props }, ref) => {
1673
1805
  const size = useCardSize();
1674
1806
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1675
1807
  "div",
@@ -1689,13 +1821,13 @@ CardFooter.displayName = "CardFooter";
1689
1821
 
1690
1822
  // src/checkbox.tsx
1691
1823
  var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
1692
- var React12 = __toESM(require("react"), 1);
1824
+ var React13 = __toESM(require("react"), 1);
1693
1825
  var import_jsx_runtime15 = require("react/jsx-runtime");
1694
1826
  var CHECKBOX_SIZES = {
1695
1827
  sm: { root: "h-3.5 w-3.5 rounded-xs", glyph: "h-3 w-3" },
1696
1828
  md: { root: "h-4 w-4 rounded-sm", glyph: "h-3.5 w-3.5" }
1697
1829
  };
1698
- var Checkbox = React12.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1830
+ var Checkbox = React13.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1699
1831
  CheckboxPrimitive.Root,
1700
1832
  {
1701
1833
  ref,
@@ -1720,11 +1852,11 @@ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
1720
1852
 
1721
1853
  // src/collapsible.tsx
1722
1854
  var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"), 1);
1723
- var React13 = __toESM(require("react"), 1);
1855
+ var React14 = __toESM(require("react"), 1);
1724
1856
  var import_jsx_runtime16 = require("react/jsx-runtime");
1725
1857
  var Collapsible = CollapsiblePrimitive.Root;
1726
1858
  var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
1727
- var CollapsibleContent2 = React13.forwardRef(({ className, animated = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1859
+ var CollapsibleContent2 = React14.forwardRef(({ className, animated = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1728
1860
  CollapsiblePrimitive.CollapsibleContent,
1729
1861
  {
1730
1862
  ref,
@@ -1741,14 +1873,14 @@ CollapsibleContent2.displayName = "CollapsibleContent";
1741
1873
  // src/command.tsx
1742
1874
  var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
1743
1875
  var import_cmdk = require("cmdk");
1744
- var React14 = __toESM(require("react"), 1);
1876
+ var React15 = __toESM(require("react"), 1);
1745
1877
 
1746
1878
  // src/use-is-mobile.ts
1747
1879
  var import_media_query = require("@ai-matrx/kit/media-query");
1748
1880
 
1749
1881
  // src/command.tsx
1750
1882
  var import_jsx_runtime17 = require("react/jsx-runtime");
1751
- var Command = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1883
+ var Command = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1752
1884
  import_cmdk.Command,
1753
1885
  {
1754
1886
  ref,
@@ -1763,7 +1895,7 @@ Command.displayName = import_cmdk.Command.displayName;
1763
1895
  var DIALOG_DESKTOP_CLASSES = `fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg ${CENTERED_DIALOG} gap-4 overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full sm:rounded-lg`;
1764
1896
  var DIALOG_MOBILE_SHEET_CLASSES = "fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain";
1765
1897
  var DIALOG_MOBILE_SHEET_OVERRIDE = "inset-x-0 bottom-0 left-0 right-0 top-auto translate-x-0 translate-y-0 w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto";
1766
- var CommandDialogContent = React14.forwardRef(({ className, children, container, onInteractOutside, ...props }, ref) => {
1898
+ var CommandDialogContent = React15.forwardRef(({ className, children, container, onInteractOutside, ...props }, ref) => {
1767
1899
  const isMobile = (0, import_media_query.useIsMobile)();
1768
1900
  const isModal = useRadixDialogModal();
1769
1901
  useModalLayer(isModal);
@@ -1823,7 +1955,7 @@ var CommandDialog = ({
1823
1955
  }
1824
1956
  ) }) });
1825
1957
  };
1826
- var CommandInput = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
1958
+ var CommandInput = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
1827
1959
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
1828
1960
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1829
1961
  import_cmdk.Command.Input,
@@ -1838,7 +1970,7 @@ var CommandInput = React14.forwardRef(({ className, ...props }, ref) => /* @__PU
1838
1970
  )
1839
1971
  ] }));
1840
1972
  CommandInput.displayName = import_cmdk.Command.Input.displayName;
1841
- var CommandList = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1973
+ var CommandList = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1842
1974
  import_cmdk.Command.List,
1843
1975
  {
1844
1976
  ref,
@@ -1847,7 +1979,7 @@ var CommandList = React14.forwardRef(({ className, ...props }, ref) => /* @__PUR
1847
1979
  }
1848
1980
  ));
1849
1981
  CommandList.displayName = import_cmdk.Command.List.displayName;
1850
- var CommandEmpty = React14.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1982
+ var CommandEmpty = React15.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1851
1983
  import_cmdk.Command.Empty,
1852
1984
  {
1853
1985
  ref,
@@ -1856,7 +1988,7 @@ var CommandEmpty = React14.forwardRef((props, ref) => /* @__PURE__ */ (0, import
1856
1988
  }
1857
1989
  ));
1858
1990
  CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
1859
- var CommandGroup = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1991
+ var CommandGroup = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1860
1992
  import_cmdk.Command.Group,
1861
1993
  {
1862
1994
  ref,
@@ -1868,7 +2000,7 @@ var CommandGroup = React14.forwardRef(({ className, ...props }, ref) => /* @__PU
1868
2000
  }
1869
2001
  ));
1870
2002
  CommandGroup.displayName = import_cmdk.Command.Group.displayName;
1871
- var CommandSeparator = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2003
+ var CommandSeparator = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1872
2004
  import_cmdk.Command.Separator,
1873
2005
  {
1874
2006
  ref,
@@ -1877,7 +2009,7 @@ var CommandSeparator = React14.forwardRef(({ className, ...props }, ref) => /* @
1877
2009
  }
1878
2010
  ));
1879
2011
  CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
1880
- var CommandItem = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2012
+ var CommandItem = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1881
2013
  import_cmdk.Command.Item,
1882
2014
  {
1883
2015
  ref,
@@ -1967,13 +2099,13 @@ function ConfirmDialog({
1967
2099
  // src/confirm-host.tsx
1968
2100
  var import_confirm_opener = require("@ai-matrx/kit/confirm-opener");
1969
2101
  var import_opener_react = require("@ai-matrx/kit/opener-react");
1970
- var React15 = __toESM(require("react"), 1);
2102
+ var React16 = __toESM(require("react"), 1);
1971
2103
  var import_jsx_runtime19 = require("react/jsx-runtime");
1972
2104
  function ConfirmDialogHost() {
1973
2105
  const { shown, open, settle } = (0, import_opener_react.useOpenerHost)(import_confirm_opener.confirmOpener);
1974
- const [readyFor, setReadyFor] = React15.useState(null);
2106
+ const [readyFor, setReadyFor] = React16.useState(null);
1975
2107
  const ready = shown?.ready;
1976
- React15.useEffect(() => {
2108
+ React16.useEffect(() => {
1977
2109
  if (!shown || !ready) return void 0;
1978
2110
  let live = true;
1979
2111
  const release = () => {
@@ -1985,8 +2117,8 @@ function ConfirmDialogHost() {
1985
2117
  };
1986
2118
  }, [shown, ready]);
1987
2119
  const held = !!ready && readyFor !== shown;
1988
- const handleConfirm = React15.useCallback(() => settle(true), [settle]);
1989
- const handleOpenChange = React15.useCallback(
2120
+ const handleConfirm = React16.useCallback(() => settle(true), [settle]);
2121
+ const handleOpenChange = React16.useCallback(
1990
2122
  (next) => {
1991
2123
  if (!next) settle(false);
1992
2124
  },
@@ -2010,10 +2142,10 @@ function ConfirmDialogHost() {
2010
2142
 
2011
2143
  // src/context-menu.tsx
2012
2144
  var ContextMenuPrimitive = __toESM(require("@radix-ui/react-context-menu"), 1);
2013
- var React18 = __toESM(require("react"), 1);
2145
+ var React19 = __toESM(require("react"), 1);
2014
2146
 
2015
2147
  // src/menu-scroll-edges.tsx
2016
- var React16 = __toESM(require("react"), 1);
2148
+ var React17 = __toESM(require("react"), 1);
2017
2149
 
2018
2150
  // src/use-scroll-fade.ts
2019
2151
  var import_react2 = require("react");
@@ -2082,13 +2214,13 @@ function composeRefs(...refs) {
2082
2214
  };
2083
2215
  }
2084
2216
  function MenuScrollEdge({ side, scroller }) {
2085
- const frame = React16.useRef(null);
2217
+ const frame = React17.useRef(null);
2086
2218
  const dir = side === "top" ? -1 : 1;
2087
- const stop = React16.useCallback(() => {
2219
+ const stop = React17.useCallback(() => {
2088
2220
  if (frame.current !== null) cancelAnimationFrame(frame.current);
2089
2221
  frame.current = null;
2090
2222
  }, []);
2091
- const glide = React16.useCallback(() => {
2223
+ const glide = React17.useCallback(() => {
2092
2224
  stop();
2093
2225
  let last = performance.now();
2094
2226
  const step = (now) => {
@@ -2100,7 +2232,7 @@ function MenuScrollEdge({ side, scroller }) {
2100
2232
  };
2101
2233
  frame.current = requestAnimationFrame(step);
2102
2234
  }, [dir, scroller, stop]);
2103
- React16.useEffect(() => stop, [stop]);
2235
+ React17.useEffect(() => stop, [stop]);
2104
2236
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { "aria-hidden": true, "data-menu-scroll-edge": side, className: "matrx-menu-scroll-edge", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "matrx-menu-scroll-fade", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2105
2237
  "div",
2106
2238
  {
@@ -2122,8 +2254,8 @@ function MenuScrollEdge({ side, scroller }) {
2122
2254
  }
2123
2255
  function useMenuScrollEdges(...forwarded) {
2124
2256
  const fade = useScrollFade();
2125
- const scroller = React16.useRef(null);
2126
- const ref = React16.useCallback(composeRefs(scroller, fade.ref, ...forwarded), [
2257
+ const scroller = React17.useRef(null);
2258
+ const ref = React17.useCallback(composeRefs(scroller, fade.ref, ...forwarded), [
2127
2259
  fade.ref,
2128
2260
  ...forwarded
2129
2261
  ]);
@@ -2136,10 +2268,10 @@ function useMenuScrollEdges(...forwarded) {
2136
2268
  }
2137
2269
 
2138
2270
  // src/submenu-focus.ts
2139
- var React17 = __toESM(require("react"), 1);
2271
+ var React18 = __toESM(require("react"), 1);
2140
2272
  function useSubmenuSurvivesParentPanelFocus(forwardedRef, onFocusOutside) {
2141
- const content = React17.useRef(null);
2142
- const ref = React17.useCallback(
2273
+ const content = React18.useRef(null);
2274
+ const ref = React18.useCallback(
2143
2275
  (node) => {
2144
2276
  content.current = node;
2145
2277
  if (typeof forwardedRef === "function") forwardedRef(node);
@@ -2170,7 +2302,7 @@ var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
2170
2302
  var SURFACE_CLASS = "z-[10001] min-w-[8rem] max-h-[var(--radix-context-menu-content-available-height)] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border bg-popover p-1 text-popover-foreground";
2171
2303
  var ITEM_CLASS = "relative flex select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:opacity-50";
2172
2304
  var INDICATOR_ITEM_CLASS = "relative flex select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:opacity-50";
2173
- var ContextMenuSubTrigger = React18.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2305
+ var ContextMenuSubTrigger = React19.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2174
2306
  ContextMenuPrimitive.SubTrigger,
2175
2307
  {
2176
2308
  ref,
@@ -2188,7 +2320,7 @@ var ContextMenuSubTrigger = React18.forwardRef(({ className, inset, children, ..
2188
2320
  }
2189
2321
  ));
2190
2322
  ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
2191
- var ContextMenuSubContent = React18.forwardRef(({ className, container, onFocusOutside, children, ...props }, ref) => {
2323
+ var ContextMenuSubContent = React19.forwardRef(({ className, container, onFocusOutside, children, ...props }, ref) => {
2192
2324
  const portalContainer = usePortalContainer(container);
2193
2325
  const keep = useSubmenuSurvivesParentPanelFocus(ref, onFocusOutside);
2194
2326
  const edges = useMenuScrollEdges(keep.ref);
@@ -2205,7 +2337,7 @@ var ContextMenuSubContent = React18.forwardRef(({ className, container, onFocusO
2205
2337
  ) });
2206
2338
  });
2207
2339
  ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
2208
- var ContextMenuContent = React18.forwardRef(({ className, container, children, ...props }, ref) => {
2340
+ var ContextMenuContent = React19.forwardRef(({ className, container, children, ...props }, ref) => {
2209
2341
  const portalContainer = usePortalContainer(container);
2210
2342
  const edges = useMenuScrollEdges(ref);
2211
2343
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ContextMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
@@ -2220,7 +2352,7 @@ var ContextMenuContent = React18.forwardRef(({ className, container, children, .
2220
2352
  ) });
2221
2353
  });
2222
2354
  ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
2223
- var ContextMenuItem = React18.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2355
+ var ContextMenuItem = React19.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2224
2356
  ContextMenuPrimitive.Item,
2225
2357
  {
2226
2358
  ref,
@@ -2235,7 +2367,7 @@ var ContextMenuItem = React18.forwardRef(({ className, inset, ...props }, ref) =
2235
2367
  }
2236
2368
  ));
2237
2369
  ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
2238
- var ContextMenuCheckboxItem = React18.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2370
+ var ContextMenuCheckboxItem = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2239
2371
  ContextMenuPrimitive.CheckboxItem,
2240
2372
  {
2241
2373
  ref,
@@ -2249,7 +2381,7 @@ var ContextMenuCheckboxItem = React18.forwardRef(({ className, children, ...prop
2249
2381
  }
2250
2382
  ));
2251
2383
  ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
2252
- var ContextMenuRadioItem = React18.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2384
+ var ContextMenuRadioItem = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2253
2385
  ContextMenuPrimitive.RadioItem,
2254
2386
  {
2255
2387
  ref,
@@ -2263,7 +2395,7 @@ var ContextMenuRadioItem = React18.forwardRef(({ className, children, ...props }
2263
2395
  }
2264
2396
  ));
2265
2397
  ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
2266
- var ContextMenuLabel = React18.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2398
+ var ContextMenuLabel = React19.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2267
2399
  ContextMenuPrimitive.Label,
2268
2400
  {
2269
2401
  ref,
@@ -2277,7 +2409,7 @@ var ContextMenuLabel = React18.forwardRef(({ className, inset, ...props }, ref)
2277
2409
  }
2278
2410
  ));
2279
2411
  ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
2280
- var ContextMenuSeparator = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2412
+ var ContextMenuSeparator = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2281
2413
  ContextMenuPrimitive.Separator,
2282
2414
  {
2283
2415
  ref,
@@ -2303,7 +2435,7 @@ ContextMenuShortcut.displayName = "ContextMenuShortcut";
2303
2435
  // src/select.tsx
2304
2436
  var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
2305
2437
  var import_class_variance_authority4 = require("class-variance-authority");
2306
- var React19 = __toESM(require("react"), 1);
2438
+ var React20 = __toESM(require("react"), 1);
2307
2439
 
2308
2440
  // src/field-surface.ts
2309
2441
  var FIELD_SURFACE_CLASS = "border border-border bg-card";
@@ -2338,7 +2470,7 @@ function SelectChevron({ className, size = "default" }) {
2338
2470
  }
2339
2471
  );
2340
2472
  }
2341
- var SelectTrigger = React19.forwardRef(({ className, children, hideArrow = false, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2473
+ var SelectTrigger = React20.forwardRef(({ className, children, hideArrow = false, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2342
2474
  SelectPrimitive.Trigger,
2343
2475
  {
2344
2476
  ref,
@@ -2351,7 +2483,7 @@ var SelectTrigger = React19.forwardRef(({ className, children, hideArrow = false
2351
2483
  }
2352
2484
  ));
2353
2485
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
2354
- var SelectScrollUpButton = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2486
+ var SelectScrollUpButton = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2355
2487
  SelectPrimitive.ScrollUpButton,
2356
2488
  {
2357
2489
  ref,
@@ -2364,7 +2496,7 @@ var SelectScrollUpButton = React19.forwardRef(({ className, ...props }, ref) =>
2364
2496
  }
2365
2497
  ));
2366
2498
  SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
2367
- var SelectScrollDownButton = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2499
+ var SelectScrollDownButton = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2368
2500
  SelectPrimitive.ScrollDownButton,
2369
2501
  {
2370
2502
  ref,
@@ -2377,7 +2509,7 @@ var SelectScrollDownButton = React19.forwardRef(({ className, ...props }, ref) =
2377
2509
  }
2378
2510
  ));
2379
2511
  SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
2380
- var SelectContent = React19.forwardRef(
2512
+ var SelectContent = React20.forwardRef(
2381
2513
  ({
2382
2514
  className,
2383
2515
  children,
@@ -2423,7 +2555,7 @@ var SelectContent = React19.forwardRef(
2423
2555
  }
2424
2556
  );
2425
2557
  SelectContent.displayName = SelectPrimitive.Content.displayName;
2426
- var SelectLabel = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2558
+ var SelectLabel = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2427
2559
  SelectPrimitive.Label,
2428
2560
  {
2429
2561
  ref,
@@ -2432,7 +2564,7 @@ var SelectLabel = React19.forwardRef(({ className, ...props }, ref) => /* @__PUR
2432
2564
  }
2433
2565
  ));
2434
2566
  SelectLabel.displayName = SelectPrimitive.Label.displayName;
2435
- var SelectItem = React19.forwardRef(({ className, children, description, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2567
+ var SelectItem = React20.forwardRef(({ className, children, description, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2436
2568
  SelectPrimitive.Item,
2437
2569
  {
2438
2570
  ref,
@@ -2450,7 +2582,7 @@ var SelectItem = React19.forwardRef(({ className, children, description, ...prop
2450
2582
  }
2451
2583
  ));
2452
2584
  SelectItem.displayName = SelectPrimitive.Item.displayName;
2453
- var SelectSeparator = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2585
+ var SelectSeparator = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2454
2586
  SelectPrimitive.Separator,
2455
2587
  {
2456
2588
  ref,
@@ -2465,12 +2597,12 @@ var import_react3 = require("react");
2465
2597
 
2466
2598
  // src/popover.tsx
2467
2599
  var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
2468
- var React20 = __toESM(require("react"), 1);
2600
+ var React21 = __toESM(require("react"), 1);
2469
2601
  var import_jsx_runtime23 = require("react/jsx-runtime");
2470
2602
  var Popover = PopoverPrimitive.Root;
2471
2603
  var PopoverTrigger = PopoverPrimitive.Trigger;
2472
2604
  var PopoverAnchor = PopoverPrimitive.Anchor;
2473
- var PopoverContent = React20.forwardRef(
2605
+ var PopoverContent = React21.forwardRef(
2474
2606
  ({
2475
2607
  className,
2476
2608
  align = "center",
@@ -2749,7 +2881,7 @@ function CreatablePicker({
2749
2881
  var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"), 1);
2750
2882
  var VisuallyHidden2 = __toESM(require("@radix-ui/react-visually-hidden"), 1);
2751
2883
  var import_react_tree3 = require("@ai-matrx/kit/react-tree");
2752
- var React21 = __toESM(require("react"), 1);
2884
+ var React22 = __toESM(require("react"), 1);
2753
2885
 
2754
2886
  // src/layer-front.ts
2755
2887
  var LAYER_FRONT_EVENT = "matrx:layer-front";
@@ -2762,7 +2894,7 @@ function announceLayerFront(element) {
2762
2894
 
2763
2895
  // src/dialog.tsx
2764
2896
  var import_jsx_runtime25 = require("react/jsx-runtime");
2765
- var DialogWindowedByDefaultContext = React21.createContext(false);
2897
+ var DialogWindowedByDefaultContext = React22.createContext(false);
2766
2898
  var Dialog = ({
2767
2899
  children,
2768
2900
  ...props
@@ -2784,9 +2916,9 @@ var DialogPortal = ({
2784
2916
  DialogPortal.displayName = "DialogPortal";
2785
2917
  var CONTEXT_SLOT3 = /* @__PURE__ */ Symbol.for("ai-matrx.design-system.dialog-container-context");
2786
2918
  var contextRegistry3 = globalThis;
2787
- var DialogContainerContext = contextRegistry3[CONTEXT_SLOT3] ??= React21.createContext(null);
2788
- var useDialogContainer = () => React21.useContext(DialogContainerContext);
2789
- var DialogOverlay = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2919
+ var DialogContainerContext = contextRegistry3[CONTEXT_SLOT3] ??= React22.createContext(null);
2920
+ var useDialogContainer = () => React22.useContext(DialogContainerContext);
2921
+ var DialogOverlay = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2790
2922
  DialogPrimitive2.Overlay,
2791
2923
  {
2792
2924
  ref,
@@ -2802,7 +2934,7 @@ var DialogOverlay = React21.forwardRef(({ className, ...props }, ref) => /* @__P
2802
2934
  }
2803
2935
  ));
2804
2936
  DialogOverlay.displayName = DialogPrimitive2.Overlay.displayName;
2805
- var DialogContentPrimitive = React21.forwardRef(({ onInteractOutside, ...props }, ref) => {
2937
+ var DialogContentPrimitive = React22.forwardRef(({ onInteractOutside, ...props }, ref) => {
2806
2938
  const isModal = useRadixDialogModal();
2807
2939
  useModalLayer(isModal);
2808
2940
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
@@ -2819,12 +2951,12 @@ DialogContentPrimitive.displayName = "DialogContentPrimitive";
2819
2951
  var DIALOG_DESKTOP_CLASSES2 = "matrx-dialog-card fixed inset-0 z-[10000] m-auto grid h-fit min-w-0 w-full max-w-lg gap-4 max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full sm:rounded-lg";
2820
2952
  var DIALOG_MOBILE_SHEET_CLASSES2 = "matrx-mobile-sheet matrx-dialog-card fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] gap-4 [--dialog-pad:1rem] overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain";
2821
2953
  var DIALOG_MOBILE_SHEET_OVERRIDE2 = "inset-x-0 bottom-0 left-0 right-0 top-auto translate-none w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto";
2822
- var DialogWindowHandleContext = React21.createContext(null);
2954
+ var DialogWindowHandleContext = React22.createContext(null);
2823
2955
  var WINDOW_KEEP_VISIBLE = 80;
2824
2956
  function isInteractiveTarget(target) {
2825
2957
  return target instanceof Element && Boolean(target.closest("button, a, input, textarea, select, [role='button'], [contenteditable='true']"));
2826
2958
  }
2827
- var DialogContent = React21.forwardRef(
2959
+ var DialogContent = React22.forwardRef(
2828
2960
  ({
2829
2961
  className,
2830
2962
  children,
@@ -2845,13 +2977,13 @@ var DialogContent = React21.forwardRef(
2845
2977
  const injectedContainer = usePortalContainer(container);
2846
2978
  const asSheet = mobileSheet && isMobile;
2847
2979
  const windowed = !isModal && !asSheet;
2848
- const windowedByDefault = React21.useContext(DialogWindowedByDefaultContext);
2849
- const [containerEl, setContainerEl] = React21.useState(
2980
+ const windowedByDefault = React22.useContext(DialogWindowedByDefaultContext);
2981
+ const [containerEl, setContainerEl] = React22.useState(
2850
2982
  null
2851
2983
  );
2852
2984
  const stacks = windowed && windowedByDefault;
2853
- const [behind, setBehind] = React21.useState(false);
2854
- React21.useEffect(() => {
2985
+ const [behind, setBehind] = React22.useState(false);
2986
+ React22.useEffect(() => {
2855
2987
  if (!stacks || !containerEl) return;
2856
2988
  const onFront = (event) => {
2857
2989
  const element = event.detail?.element ?? null;
@@ -2867,9 +2999,9 @@ var DialogContent = React21.forwardRef(
2867
2999
  setBehind(false);
2868
3000
  announceLayerFront(containerEl);
2869
3001
  };
2870
- const [offset, setOffset] = React21.useState({ x: 0, y: 0 });
2871
- const dragRef = React21.useRef(null);
2872
- const handle = React21.useMemo(() => {
3002
+ const [offset, setOffset] = React22.useState({ x: 0, y: 0 });
3003
+ const dragRef = React22.useRef(null);
3004
+ const handle = React22.useMemo(() => {
2873
3005
  if (!windowed) return null;
2874
3006
  const clamp = (value, limit) => Math.max(-limit, Math.min(limit, value));
2875
3007
  return {
@@ -2897,7 +3029,7 @@ var DialogContent = React21.forwardRef(
2897
3029
  onDoubleClick: () => setOffset({ x: 0, y: 0 })
2898
3030
  };
2899
3031
  }, [windowed, offset.x, offset.y]);
2900
- const mergedRef = React21.useCallback(
3032
+ const mergedRef = React22.useCallback(
2901
3033
  (node) => {
2902
3034
  setContainerEl(node);
2903
3035
  if (typeof ref === "function") ref(node);
@@ -2984,7 +3116,7 @@ var DialogHeader = ({
2984
3116
  className,
2985
3117
  ...props
2986
3118
  }) => {
2987
- const handle = React21.useContext(DialogWindowHandleContext);
3119
+ const handle = React22.useContext(DialogWindowHandleContext);
2988
3120
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2989
3121
  "div",
2990
3122
  {
@@ -3041,7 +3173,7 @@ var DialogFooter = ({
3041
3173
  }
3042
3174
  );
3043
3175
  DialogFooter.displayName = "DialogFooter";
3044
- var DialogTitle = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3176
+ var DialogTitle = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3045
3177
  DialogPrimitive2.Title,
3046
3178
  {
3047
3179
  ref,
@@ -3051,7 +3183,7 @@ var DialogTitle = React21.forwardRef(({ className, ...props }, ref) => /* @__PUR
3051
3183
  }
3052
3184
  ));
3053
3185
  DialogTitle.displayName = DialogPrimitive2.Title.displayName;
3054
- var DialogDescription = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3186
+ var DialogDescription = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3055
3187
  DialogPrimitive2.Description,
3056
3188
  {
3057
3189
  ref,
@@ -3064,7 +3196,7 @@ DialogDescription.displayName = DialogPrimitive2.Description.displayName;
3064
3196
 
3065
3197
  // src/dropdown-menu.tsx
3066
3198
  var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
3067
- var React22 = __toESM(require("react"), 1);
3199
+ var React23 = __toESM(require("react"), 1);
3068
3200
  var import_jsx_runtime26 = require("react/jsx-runtime");
3069
3201
  var DropdownMenu = DropdownMenuPrimitive.Root;
3070
3202
  var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
@@ -3075,7 +3207,7 @@ var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
3075
3207
  var MENU_SURFACE_CLASS = "z-[10001] min-w-[8rem] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border bg-popover p-1 text-popover-foreground";
3076
3208
  var MENU_ITEM_CLASS = "relative flex select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:opacity-50";
3077
3209
  var MENU_INDICATOR_ITEM_CLASS = "relative flex select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:opacity-50";
3078
- var DropdownMenuSubTrigger = React22.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3210
+ var DropdownMenuSubTrigger = React23.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3079
3211
  DropdownMenuPrimitive.SubTrigger,
3080
3212
  {
3081
3213
  ref,
@@ -3093,7 +3225,7 @@ var DropdownMenuSubTrigger = React22.forwardRef(({ className, inset, children, .
3093
3225
  }
3094
3226
  ));
3095
3227
  DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
3096
- var DropdownMenuSubContent = React22.forwardRef(({ className, container, sideOffset = 2, alignOffset = -4, collisionPadding = 8, onFocusOutside, children, ...props }, ref) => {
3228
+ var DropdownMenuSubContent = React23.forwardRef(({ className, container, sideOffset = 2, alignOffset = -4, collisionPadding = 8, onFocusOutside, children, ...props }, ref) => {
3097
3229
  const portalContainer = usePortalContainer(container);
3098
3230
  const keep = useSubmenuSurvivesParentPanelFocus(ref, onFocusOutside);
3099
3231
  const edges = useMenuScrollEdges(keep.ref);
@@ -3113,7 +3245,7 @@ var DropdownMenuSubContent = React22.forwardRef(({ className, container, sideOff
3113
3245
  ) });
3114
3246
  });
3115
3247
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
3116
- var DropdownMenuContent = React22.forwardRef(({ className, sideOffset = 4, container, children, ...props }, ref) => {
3248
+ var DropdownMenuContent = React23.forwardRef(({ className, sideOffset = 4, container, children, ...props }, ref) => {
3117
3249
  const portalContainer = usePortalContainer(container);
3118
3250
  const edges = useMenuScrollEdges(ref);
3119
3251
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
@@ -3135,7 +3267,7 @@ var DropdownMenuContent = React22.forwardRef(({ className, sideOffset = 4, conta
3135
3267
  ) });
3136
3268
  });
3137
3269
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
3138
- var DropdownMenuItem = React22.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3270
+ var DropdownMenuItem = React23.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3139
3271
  DropdownMenuPrimitive.Item,
3140
3272
  {
3141
3273
  ref,
@@ -3145,7 +3277,7 @@ var DropdownMenuItem = React22.forwardRef(({ className, inset, ...props }, ref)
3145
3277
  }
3146
3278
  ));
3147
3279
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
3148
- var DropdownMenuCheckboxItem = React22.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3280
+ var DropdownMenuCheckboxItem = React23.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3149
3281
  DropdownMenuPrimitive.CheckboxItem,
3150
3282
  {
3151
3283
  ref,
@@ -3159,7 +3291,7 @@ var DropdownMenuCheckboxItem = React22.forwardRef(({ className, children, ...pro
3159
3291
  }
3160
3292
  ));
3161
3293
  DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
3162
- var DropdownMenuRadioItem = React22.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3294
+ var DropdownMenuRadioItem = React23.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3163
3295
  DropdownMenuPrimitive.RadioItem,
3164
3296
  {
3165
3297
  ref,
@@ -3173,7 +3305,7 @@ var DropdownMenuRadioItem = React22.forwardRef(({ className, children, ...props
3173
3305
  }
3174
3306
  ));
3175
3307
  DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
3176
- var DropdownMenuLabel = React22.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3308
+ var DropdownMenuLabel = React23.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3177
3309
  DropdownMenuPrimitive.Label,
3178
3310
  {
3179
3311
  ref,
@@ -3183,7 +3315,7 @@ var DropdownMenuLabel = React22.forwardRef(({ className, inset, ...props }, ref)
3183
3315
  }
3184
3316
  ));
3185
3317
  DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
3186
- var DropdownMenuSeparator = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3318
+ var DropdownMenuSeparator = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3187
3319
  DropdownMenuPrimitive.Separator,
3188
3320
  {
3189
3321
  ref,
@@ -3395,7 +3527,7 @@ function EditableLabel({
3395
3527
  }
3396
3528
 
3397
3529
  // src/input.tsx
3398
- var React23 = __toESM(require("react"), 1);
3530
+ var React24 = __toESM(require("react"), 1);
3399
3531
  var import_jsx_runtime28 = require("react/jsx-runtime");
3400
3532
  var getVariantStyles = (variant = "default") => {
3401
3533
  const baseStyles = `flex h-10 w-full ${FIELD_SURFACE_CLASS} text-foreground shadow-input rounded-md px-3 py-2 text-sm file:border-0 file:bg-transparent
@@ -3424,7 +3556,7 @@ var getVariantStyles = (variant = "default") => {
3424
3556
  return baseStyles;
3425
3557
  }
3426
3558
  };
3427
- var Input = React23.forwardRef(
3559
+ var Input = React24.forwardRef(
3428
3560
  ({ className, type, variant = "default", ...props }, ref) => {
3429
3561
  return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3430
3562
  "input",
@@ -3438,7 +3570,7 @@ var Input = React23.forwardRef(
3438
3570
  }
3439
3571
  );
3440
3572
  Input.displayName = "Input";
3441
- var EnterInput = React23.forwardRef(
3573
+ var EnterInput = React24.forwardRef(
3442
3574
  ({ onEnter, ...props }, ref) => {
3443
3575
  const handleKeyDown = (e) => {
3444
3576
  if (e.key === "Enter" && onEnter) {
@@ -3462,7 +3594,7 @@ var EnterInput = React23.forwardRef(
3462
3594
  }
3463
3595
  );
3464
3596
  EnterInput.displayName = "EnterInput";
3465
- var BasicInput = React23.forwardRef(
3597
+ var BasicInput = React24.forwardRef(
3466
3598
  // `variant` is accepted (prop-compatible with Input) but intentionally
3467
3599
  // unused — and destructured so it never leaks onto the DOM element.
3468
3600
  ({ className, type, variant: _variant = "default", ...props }, ref) => {
@@ -3481,7 +3613,7 @@ var BasicInput = React23.forwardRef(
3481
3613
  }
3482
3614
  );
3483
3615
  BasicInput.displayName = "BasicInput";
3484
- var InputWithPrefix = React23.forwardRef(({ prefix, className, wrapperClassName, ...props }, ref) => {
3616
+ var InputWithPrefix = React24.forwardRef(({ prefix, className, wrapperClassName, ...props }, ref) => {
3485
3617
  return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn("relative", wrapperClassName), children: [
3486
3618
  prefix && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: prefix }),
3487
3619
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
@@ -3498,9 +3630,9 @@ InputWithPrefix.displayName = "InputWithPrefix";
3498
3630
 
3499
3631
  // src/label.tsx
3500
3632
  var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
3501
- var React24 = __toESM(require("react"), 1);
3633
+ var React25 = __toESM(require("react"), 1);
3502
3634
  var import_jsx_runtime29 = require("react/jsx-runtime");
3503
- var Label4 = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3635
+ var Label4 = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3504
3636
  LabelPrimitive.Root,
3505
3637
  {
3506
3638
  ref,
@@ -3678,7 +3810,7 @@ function OverflowToolbar({
3678
3810
 
3679
3811
  // src/progress.tsx
3680
3812
  var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
3681
- var React26 = __toESM(require("react"), 1);
3813
+ var React27 = __toESM(require("react"), 1);
3682
3814
  var import_jsx_runtime31 = require("react/jsx-runtime");
3683
3815
  var PROGRESS_TONES = {
3684
3816
  default: "bg-primary",
@@ -3686,7 +3818,7 @@ var PROGRESS_TONES = {
3686
3818
  warning: "bg-warning",
3687
3819
  destructive: "bg-destructive"
3688
3820
  };
3689
- var Progress = React26.forwardRef(({ className, tone = "default", indicatorClassName, ...props }, ref) => {
3821
+ var Progress = React27.forwardRef(({ className, tone = "default", indicatorClassName, ...props }, ref) => {
3690
3822
  const { value, max } = props;
3691
3823
  const ceiling = max ?? 100;
3692
3824
  const isIndeterminate = value === null || value === void 0;
@@ -3723,9 +3855,9 @@ Progress.displayName = ProgressPrimitive.Root.displayName;
3723
3855
 
3724
3856
  // src/scroll-area.tsx
3725
3857
  var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
3726
- var React27 = __toESM(require("react"), 1);
3858
+ var React28 = __toESM(require("react"), 1);
3727
3859
  var import_jsx_runtime32 = require("react/jsx-runtime");
3728
- var ScrollArea = React27.forwardRef(
3860
+ var ScrollArea = React28.forwardRef(
3729
3861
  ({
3730
3862
  className,
3731
3863
  children,
@@ -3758,7 +3890,7 @@ var ScrollArea = React27.forwardRef(
3758
3890
  )
3759
3891
  );
3760
3892
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
3761
- var ScrollBar = React27.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3893
+ var ScrollBar = React28.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3762
3894
  ScrollAreaPrimitive.ScrollAreaScrollbar,
3763
3895
  {
3764
3896
  ref,
@@ -3927,7 +4059,7 @@ function SegmentedControl({
3927
4059
  }
3928
4060
 
3929
4061
  // src/archive-filter.tsx
3930
- var React28 = __toESM(require("react"), 1);
4062
+ var React29 = __toESM(require("react"), 1);
3931
4063
  var import_jsx_runtime35 = require("react/jsx-runtime");
3932
4064
  var ARCHIVE_FILTER_VALUES = ["active", "archived", "all"];
3933
4065
  var DEFAULT_ARCHIVE_FILTER = "active";
@@ -3953,7 +4085,7 @@ function ArchiveFilter({
3953
4085
  "aria-label": ariaLabel = "Archive filter",
3954
4086
  disabled = false
3955
4087
  }) {
3956
- const data = React28.useMemo(
4088
+ const data = React29.useMemo(
3957
4089
  () => ARCHIVE_FILTER_VALUES.map((state) => {
3958
4090
  const text = labels?.[state] ?? ARCHIVE_FILTER_LABELS[state];
3959
4091
  const count = counts?.[state];
@@ -4016,9 +4148,9 @@ function ArchivedDisclosure({
4016
4148
 
4017
4149
  // src/separator.tsx
4018
4150
  var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
4019
- var React29 = __toESM(require("react"), 1);
4151
+ var React30 = __toESM(require("react"), 1);
4020
4152
  var import_jsx_runtime37 = require("react/jsx-runtime");
4021
- var Separator4 = React29.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
4153
+ var Separator4 = React30.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
4022
4154
  SeparatorPrimitive.Root,
4023
4155
  {
4024
4156
  ref,
@@ -4038,9 +4170,9 @@ Separator4.displayName = SeparatorPrimitive.Root.displayName;
4038
4170
  var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
4039
4171
  var import_react_tree4 = require("@ai-matrx/kit/react-tree");
4040
4172
  var import_class_variance_authority5 = require("class-variance-authority");
4041
- var React30 = __toESM(require("react"), 1);
4173
+ var React31 = __toESM(require("react"), 1);
4042
4174
  var import_jsx_runtime38 = require("react/jsx-runtime");
4043
- var SheetContentBase = React30.forwardRef(({ onInteractOutside, ...props }, ref) => {
4175
+ var SheetContentBase = React31.forwardRef(({ onInteractOutside, ...props }, ref) => {
4044
4176
  const isModal = useRadixDialogModal();
4045
4177
  useModalLayer(isModal);
4046
4178
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
@@ -4054,7 +4186,7 @@ var SheetContentBase = React30.forwardRef(({ onInteractOutside, ...props }, ref)
4054
4186
  );
4055
4187
  });
4056
4188
  SheetContentBase.displayName = "SheetContentBase";
4057
- var Sheet = React30.forwardRef(({ children, ...props }, _ref) => {
4189
+ var Sheet = React31.forwardRef(({ children, ...props }, _ref) => {
4058
4190
  const modal = props.modal ?? true;
4059
4191
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SheetPrimitive.Root, { ...props, modal, children }) });
4060
4192
  });
@@ -4062,7 +4194,7 @@ Sheet.displayName = "Sheet";
4062
4194
  var SheetTrigger = SheetPrimitive.Trigger;
4063
4195
  var SheetClose = SheetPrimitive.Close;
4064
4196
  var SheetPortal = SheetPrimitive.Portal;
4065
- var SheetOverlay = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4197
+ var SheetOverlay = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4066
4198
  SheetPrimitive.Overlay,
4067
4199
  {
4068
4200
  className: cn(
@@ -4101,7 +4233,7 @@ var sheetVariants = (0, import_class_variance_authority5.cva)(
4101
4233
  }
4102
4234
  }
4103
4235
  );
4104
- var SheetDescription = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4236
+ var SheetDescription = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4105
4237
  SheetPrimitive.Description,
4106
4238
  {
4107
4239
  ref,
@@ -4110,7 +4242,7 @@ var SheetDescription = React30.forwardRef(({ className, ...props }, ref) => /* @
4110
4242
  }
4111
4243
  ));
4112
4244
  SheetDescription.displayName = SheetPrimitive.Description.displayName;
4113
- var SheetContent = React30.forwardRef(
4245
+ var SheetContent = React31.forwardRef(
4114
4246
  ({
4115
4247
  side = "right",
4116
4248
  className,
@@ -4181,7 +4313,7 @@ var SheetFooter = ({
4181
4313
  }
4182
4314
  );
4183
4315
  SheetFooter.displayName = "SheetFooter";
4184
- var SheetTitle = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4316
+ var SheetTitle = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4185
4317
  SheetPrimitive.Title,
4186
4318
  {
4187
4319
  ref,
@@ -4192,7 +4324,7 @@ var SheetTitle = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE
4192
4324
  SheetTitle.displayName = SheetPrimitive.Title.displayName;
4193
4325
 
4194
4326
  // src/organization-picker.tsx
4195
- var React31 = __toESM(require("react"), 1);
4327
+ var React32 = __toESM(require("react"), 1);
4196
4328
 
4197
4329
  // src/skeleton.tsx
4198
4330
  var import_jsx_runtime39 = require("react/jsx-runtime");
@@ -4280,9 +4412,9 @@ function OrganizationPicker({
4280
4412
  foldedLabel = "More",
4281
4413
  className
4282
4414
  }) {
4283
- const [query, setQuery] = React31.useState("");
4284
- const [showFixtures, setShowFixtures] = React31.useState(false);
4285
- const [showFolded, setShowFolded] = React31.useState(false);
4415
+ const [query, setQuery] = React32.useState("");
4416
+ const [showFixtures, setShowFixtures] = React32.useState(false);
4417
+ const [showFolded, setShowFolded] = React32.useState(false);
4286
4418
  const favorites = new Set(favoriteOrganizationIds);
4287
4419
  const isFavorite = (id) => favorites.has(id);
4288
4420
  const rank = (org) => isFavorite(org.id) ? 0 : org.isOwn ? 1 : 2;
@@ -4482,11 +4614,11 @@ function OrganizationPicker({
4482
4614
  // src/sidebar.tsx
4483
4615
  var import_react_slot3 = require("@radix-ui/react-slot");
4484
4616
  var import_class_variance_authority6 = require("class-variance-authority");
4485
- var React33 = __toESM(require("react"), 1);
4617
+ var React34 = __toESM(require("react"), 1);
4486
4618
 
4487
4619
  // src/tooltip.tsx
4488
4620
  var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
4489
- var React32 = __toESM(require("react"), 1);
4621
+ var React33 = __toESM(require("react"), 1);
4490
4622
 
4491
4623
  // src/title-tooltips.ts
4492
4624
  var TITLE_TOOLTIP_ATTR = "data-matrx-title";
@@ -4545,7 +4677,7 @@ function install(doc) {
4545
4677
  if (el.closest(`[${NATIVE_TITLE_OPT_OUT_ATTR}]`)) return null;
4546
4678
  return el;
4547
4679
  };
4548
- const textOf = (el) => (el.getAttribute(TITLE_TOOLTIP_ATTR) ?? el.getAttribute("title") ?? "").trim();
4680
+ const textOf2 = (el) => (el.getAttribute(TITLE_TOOLTIP_ATTR) ?? el.getAttribute("title") ?? "").trim();
4549
4681
  const lift = (el) => {
4550
4682
  const title = el.getAttribute("title");
4551
4683
  if (title === null) return;
@@ -4627,7 +4759,7 @@ function install(doc) {
4627
4759
  const show = (el, instant) => {
4628
4760
  if (active !== el) return;
4629
4761
  if (el.closest(`[${TOOLTIP_TRIGGER_ATTR}]`)) return;
4630
- const text = textOf(el);
4762
+ const text = textOf2(el);
4631
4763
  if (!text || !el.isConnected) return;
4632
4764
  if (repeatsVisibleText(el, text)) return;
4633
4765
  const node = ensureSurface();
@@ -4720,16 +4852,16 @@ function install(doc) {
4720
4852
  // src/tooltip.tsx
4721
4853
  var import_jsx_runtime41 = require("react/jsx-runtime");
4722
4854
  function TooltipProvider({ titleTooltips = true, ...props }) {
4723
- React32.useEffect(() => {
4855
+ React33.useEffect(() => {
4724
4856
  if (!titleTooltips) return;
4725
4857
  return acquireTitleTooltips();
4726
4858
  }, [titleTooltips]);
4727
4859
  return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipPrimitive.Provider, { ...props });
4728
4860
  }
4729
4861
  var Tooltip = TooltipPrimitive.Root;
4730
- var TooltipTrigger = React32.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipPrimitive.Trigger, { ref, ...{ [TOOLTIP_TRIGGER_ATTR]: "" }, ...props }));
4862
+ var TooltipTrigger = React33.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipPrimitive.Trigger, { ref, ...{ [TOOLTIP_TRIGGER_ATTR]: "" }, ...props }));
4731
4863
  TooltipTrigger.displayName = TooltipPrimitive.Trigger.displayName;
4732
- var TooltipContent = React32.forwardRef(({ className, sideOffset = 4, container, animated = true, ...props }, ref) => {
4864
+ var TooltipContent = React33.forwardRef(({ className, sideOffset = 4, container, animated = true, ...props }, ref) => {
4733
4865
  const resolved = usePortalContainer(container);
4734
4866
  return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4735
4867
  TooltipPrimitive.Content,
@@ -4754,9 +4886,9 @@ var SIDEBAR_WIDTH = "16rem";
4754
4886
  var SIDEBAR_WIDTH_MOBILE = "18rem";
4755
4887
  var SIDEBAR_WIDTH_ICON = "3rem";
4756
4888
  var SIDEBAR_KEYBOARD_SHORTCUT = "b";
4757
- var SidebarContext = React33.createContext(null);
4889
+ var SidebarContext = React34.createContext(null);
4758
4890
  function useSidebar() {
4759
- const context = React33.useContext(SidebarContext);
4891
+ const context = React34.useContext(SidebarContext);
4760
4892
  if (!context) {
4761
4893
  throw new Error("useSidebar must be used within a SidebarProvider.");
4762
4894
  }
@@ -4773,10 +4905,10 @@ function SidebarProvider({
4773
4905
  ...props
4774
4906
  }) {
4775
4907
  const isMobile = (0, import_media_query.useIsMobile)();
4776
- const [openMobile, setOpenMobile] = React33.useState(false);
4777
- const [_open, _setOpen] = React33.useState(defaultOpen);
4908
+ const [openMobile, setOpenMobile] = React34.useState(false);
4909
+ const [_open, _setOpen] = React34.useState(defaultOpen);
4778
4910
  const open = openProp ?? _open;
4779
- const setOpen = React33.useCallback(
4911
+ const setOpen = React34.useCallback(
4780
4912
  (value) => {
4781
4913
  const openState = typeof value === "function" ? value(open) : value;
4782
4914
  if (setOpenProp) {
@@ -4787,10 +4919,10 @@ function SidebarProvider({
4787
4919
  },
4788
4920
  [setOpenProp, open]
4789
4921
  );
4790
- const toggleSidebar = React33.useCallback(() => {
4922
+ const toggleSidebar = React34.useCallback(() => {
4791
4923
  return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
4792
4924
  }, [isMobile, setOpen, setOpenMobile]);
4793
- React33.useEffect(() => {
4925
+ React34.useEffect(() => {
4794
4926
  if (!keyboardShortcut) return;
4795
4927
  const handleKeyDown = (event) => {
4796
4928
  if (event.key === keyboardShortcut && (event.metaKey || event.ctrlKey)) {
@@ -4802,7 +4934,7 @@ function SidebarProvider({
4802
4934
  return () => window.removeEventListener("keydown", handleKeyDown);
4803
4935
  }, [keyboardShortcut, toggleSidebar]);
4804
4936
  const state = open ? "expanded" : "collapsed";
4805
- const contextValue = React33.useMemo(
4937
+ const contextValue = React34.useMemo(
4806
4938
  () => ({
4807
4939
  state,
4808
4940
  open,
@@ -5250,7 +5382,7 @@ function SidebarMenuSkeleton({
5250
5382
  showIcon = false,
5251
5383
  ...props
5252
5384
  }) {
5253
- const width = React33.useMemo(() => {
5385
+ const width = React34.useMemo(() => {
5254
5386
  return `${Math.floor(Math.random() * 40) + 50}%`;
5255
5387
  }, []);
5256
5388
  return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
@@ -5331,7 +5463,7 @@ function SidebarMenuSubButton({
5331
5463
  }
5332
5464
 
5333
5465
  // src/app-shell/app-rail.tsx
5334
- var React34 = __toESM(require("react"), 1);
5466
+ var React35 = __toESM(require("react"), 1);
5335
5467
 
5336
5468
  // src/app-shell/status-dot.tsx
5337
5469
  var import_jsx_runtime43 = require("react/jsx-runtime");
@@ -5387,7 +5519,7 @@ function AppRailGroup({ className, ...props }) {
5387
5519
  function AppRailSpacer() {
5388
5520
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { "data-slot": "app-rail-spacer", className: "flex-1" });
5389
5521
  }
5390
- var AppRailItem = React34.forwardRef(function AppRailItem2({ icon, label, shortcut, active = false, attention, attentionLabel, className, ...props }, ref) {
5522
+ var AppRailItem = React35.forwardRef(function AppRailItem2({ icon, label, shortcut, active = false, attention, attentionLabel, className, ...props }, ref) {
5391
5523
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Tooltip, { children: [
5392
5524
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
5393
5525
  "button",
@@ -5427,7 +5559,7 @@ var AppRailItem = React34.forwardRef(function AppRailItem2({ icon, label, shortc
5427
5559
  ] }) })
5428
5560
  ] });
5429
5561
  });
5430
- var AppRailAvatar = React34.forwardRef(function AppRailAvatar2({ initials = "", label, className, children, ...props }, ref) {
5562
+ var AppRailAvatar = React35.forwardRef(function AppRailAvatar2({ initials = "", label, className, children, ...props }, ref) {
5431
5563
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Tooltip, { children: [
5432
5564
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
5433
5565
  "button",
@@ -5450,7 +5582,7 @@ var AppRailAvatar = React34.forwardRef(function AppRailAvatar2({ initials = "",
5450
5582
  });
5451
5583
 
5452
5584
  // src/app-shell/canvas.tsx
5453
- var React35 = __toESM(require("react"), 1);
5585
+ var React36 = __toESM(require("react"), 1);
5454
5586
 
5455
5587
  // src/resizable.tsx
5456
5588
  var import_react_resizable_panels = require("react-resizable-panels");
@@ -5517,7 +5649,7 @@ function CanvasLayout({ columns, expandedId = null, className }) {
5517
5649
  if (expanded) {
5518
5650
  return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { "data-slot": "canvas-layout", "data-expanded": expanded.id, className: cn("flex h-full w-full", className), children: expanded.node });
5519
5651
  }
5520
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ResizablePanelGroup, { "data-slot": "canvas-layout", orientation: "horizontal", className: cn("gap-0", className), children: visible2.map((column, ci) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(React35.Fragment, { children: [
5652
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ResizablePanelGroup, { "data-slot": "canvas-layout", orientation: "horizontal", className: cn("gap-0", className), children: visible2.map((column, ci) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(React36.Fragment, { children: [
5521
5653
  ci > 0 ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ResizableHandle, { "data-canvas-gap": "column", size: "md", className: GAP }) : null,
5522
5654
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5523
5655
  ResizablePanel,
@@ -5525,7 +5657,7 @@ function CanvasLayout({ columns, expandedId = null, className }) {
5525
5657
  id: column.id,
5526
5658
  minSize: column.minSize ?? 220,
5527
5659
  ...column.defaultSize !== void 0 ? { defaultSize: column.defaultSize } : {},
5528
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ResizablePanelGroup, { "data-canvas-column": column.id, orientation: "vertical", children: column.panels.map((panel, pi) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(React35.Fragment, { children: [
5660
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ResizablePanelGroup, { "data-canvas-column": column.id, orientation: "vertical", children: column.panels.map((panel, pi) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(React36.Fragment, { children: [
5529
5661
  pi > 0 ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ResizableHandle, { "data-canvas-gap": "row", size: "md", className: GAP }) : null,
5530
5662
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5531
5663
  ResizablePanel,
@@ -5543,10 +5675,10 @@ function CanvasLayout({ columns, expandedId = null, className }) {
5543
5675
  }
5544
5676
 
5545
5677
  // src/app-shell/mode-switch.tsx
5546
- var React36 = __toESM(require("react"), 1);
5678
+ var React37 = __toESM(require("react"), 1);
5547
5679
  var import_jsx_runtime47 = require("react/jsx-runtime");
5548
5680
  function ModeSwitch({ value, onValueChange, options, label = "Mode", className }) {
5549
- const refs = React36.useRef([]);
5681
+ const refs = React37.useRef([]);
5550
5682
  const move = (from, delta) => {
5551
5683
  const next = (from + delta + options.length) % options.length;
5552
5684
  const option = options[next];
@@ -5609,7 +5741,7 @@ function ModeSwitch({ value, onValueChange, options, label = "Mode", className }
5609
5741
 
5610
5742
  // src/switch.tsx
5611
5743
  var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
5612
- var React37 = __toESM(require("react"), 1);
5744
+ var React38 = __toESM(require("react"), 1);
5613
5745
  var import_jsx_runtime48 = require("react/jsx-runtime");
5614
5746
  var SWITCH_SIZES = {
5615
5747
  sm: {
@@ -5621,7 +5753,7 @@ var SWITCH_SIZES = {
5621
5753
  thumb: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
5622
5754
  }
5623
5755
  };
5624
- var Switch = React37.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
5756
+ var Switch = React38.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
5625
5757
  SwitchPrimitives.Root,
5626
5758
  {
5627
5759
  ref,
@@ -5702,17 +5834,17 @@ function TabbedBottomSheet({
5702
5834
  }
5703
5835
 
5704
5836
  // src/table.tsx
5705
- var React38 = __toESM(require("react"), 1);
5837
+ var React39 = __toESM(require("react"), 1);
5706
5838
  var import_jsx_runtime50 = require("react/jsx-runtime");
5707
5839
  var TABLE_SIZES = {
5708
5840
  sm: { head: "px-2", cell: "p-2" },
5709
5841
  md: { head: "px-3", cell: "p-3" }
5710
5842
  };
5711
- var TableSizeContext = React38.createContext("md");
5843
+ var TableSizeContext = React39.createContext("md");
5712
5844
  function useTableSize() {
5713
- return React38.useContext(TableSizeContext);
5845
+ return React39.useContext(TableSizeContext);
5714
5846
  }
5715
- var Table = React38.forwardRef(
5847
+ var Table = React39.forwardRef(
5716
5848
  ({ className, size = "md", wrap = true, wrapperClassName, ...props }, ref) => {
5717
5849
  const table = /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5718
5850
  "table",
@@ -5735,7 +5867,7 @@ var Table = React38.forwardRef(
5735
5867
  }
5736
5868
  );
5737
5869
  Table.displayName = "Table";
5738
- var TableHeader = React38.forwardRef(({ className, sticky = false, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5870
+ var TableHeader = React39.forwardRef(({ className, sticky = false, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5739
5871
  "thead",
5740
5872
  {
5741
5873
  ref,
@@ -5749,7 +5881,7 @@ var TableHeader = React38.forwardRef(({ className, sticky = false, ...props }, r
5749
5881
  }
5750
5882
  ));
5751
5883
  TableHeader.displayName = "TableHeader";
5752
- var TableBody = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5884
+ var TableBody = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5753
5885
  "tbody",
5754
5886
  {
5755
5887
  ref,
@@ -5759,7 +5891,7 @@ var TableBody = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE_
5759
5891
  }
5760
5892
  ));
5761
5893
  TableBody.displayName = "TableBody";
5762
- var TableFooter = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5894
+ var TableFooter = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5763
5895
  "tfoot",
5764
5896
  {
5765
5897
  ref,
@@ -5772,7 +5904,7 @@ var TableFooter = React38.forwardRef(({ className, ...props }, ref) => /* @__PUR
5772
5904
  }
5773
5905
  ));
5774
5906
  TableFooter.displayName = "TableFooter";
5775
- var TableRow = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5907
+ var TableRow = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5776
5908
  "tr",
5777
5909
  {
5778
5910
  ref,
@@ -5785,7 +5917,7 @@ var TableRow = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__
5785
5917
  }
5786
5918
  ));
5787
5919
  TableRow.displayName = "TableRow";
5788
- var TableHead = React38.forwardRef(({ className, ...props }, ref) => {
5920
+ var TableHead = React39.forwardRef(({ className, ...props }, ref) => {
5789
5921
  const size = useTableSize();
5790
5922
  return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5791
5923
  "th",
@@ -5802,7 +5934,7 @@ var TableHead = React38.forwardRef(({ className, ...props }, ref) => {
5802
5934
  );
5803
5935
  });
5804
5936
  TableHead.displayName = "TableHead";
5805
- var TableCell = React38.forwardRef(({ className, ...props }, ref) => {
5937
+ var TableCell = React39.forwardRef(({ className, ...props }, ref) => {
5806
5938
  const size = useTableSize();
5807
5939
  return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5808
5940
  "td",
@@ -5819,7 +5951,7 @@ var TableCell = React38.forwardRef(({ className, ...props }, ref) => {
5819
5951
  );
5820
5952
  });
5821
5953
  TableCell.displayName = "TableCell";
5822
- var TableCaption = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5954
+ var TableCaption = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5823
5955
  "caption",
5824
5956
  {
5825
5957
  ref,
@@ -5832,11 +5964,11 @@ TableCaption.displayName = "TableCaption";
5832
5964
 
5833
5965
  // src/tabs.tsx
5834
5966
  var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
5835
- var React39 = __toESM(require("react"), 1);
5967
+ var React40 = __toESM(require("react"), 1);
5836
5968
  var import_jsx_runtime51 = require("react/jsx-runtime");
5837
5969
  var Tabs = TabsPrimitive.Root;
5838
5970
  var TABS_TRIGGER_BASE = "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm";
5839
- var TabsList = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5971
+ var TabsList = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5840
5972
  TabsPrimitive.List,
5841
5973
  {
5842
5974
  ref,
@@ -5849,7 +5981,7 @@ var TabsList = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__
5849
5981
  }
5850
5982
  ));
5851
5983
  TabsList.displayName = TabsPrimitive.List.displayName;
5852
- var TabsTrigger = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5984
+ var TabsTrigger = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5853
5985
  TabsPrimitive.Trigger,
5854
5986
  {
5855
5987
  ref,
@@ -5863,7 +5995,7 @@ var TabsTrigger = React39.forwardRef(({ className, ...props }, ref) => /* @__PUR
5863
5995
  }
5864
5996
  ));
5865
5997
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
5866
- var TabsTriggerCore = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5998
+ var TabsTriggerCore = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5867
5999
  TabsPrimitive.Trigger,
5868
6000
  {
5869
6001
  ref,
@@ -5873,7 +6005,7 @@ var TabsTriggerCore = React39.forwardRef(({ className, ...props }, ref) => /* @_
5873
6005
  }
5874
6006
  ));
5875
6007
  TabsTriggerCore.displayName = TabsPrimitive.Trigger.displayName;
5876
- var TabsContent = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6008
+ var TabsContent = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5877
6009
  TabsPrimitive.Content,
5878
6010
  {
5879
6011
  ref,
@@ -5889,7 +6021,7 @@ var TabsContent = React39.forwardRef(({ className, ...props }, ref) => /* @__PUR
5889
6021
  TabsContent.displayName = TabsPrimitive.Content.displayName;
5890
6022
 
5891
6023
  // src/textarea.tsx
5892
- var React40 = __toESM(require("react"), 1);
6024
+ var React41 = __toESM(require("react"), 1);
5893
6025
  var import_jsx_runtime52 = require("react/jsx-runtime");
5894
6026
  var FILL_HEIGHT_REGEX = /(?:^|\s)(h-full|h-dvh|flex-1|grow)(?:\s|$)/;
5895
6027
  var FILL_WIDTH_REGEX = /(?:^|\s)(w-full|w-screen)(?:\s|$)/;
@@ -5903,7 +6035,7 @@ function getStretchClasses(className) {
5903
6035
  var TEXTAREA_ELEVATED_CLASS = `flex h-auto w-full rounded-md ${FIELD_SURFACE_CLASS} px-3 py-2 text-sm text-foreground shadow-textarea transition duration-400 placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50`;
5904
6036
  var TEXTAREA_CONTROL_CLASS = `flex w-full rounded-md ${FIELD_SURFACE_CLASS} px-3 py-2 text-sm text-foreground shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50`;
5905
6037
  function useAutoGrow(ref, value, autoGrow = false, minHeight, maxHeight) {
5906
- React40.useEffect(() => {
6038
+ React41.useEffect(() => {
5907
6039
  if (!autoGrow || !ref.current) return;
5908
6040
  const textarea = ref.current;
5909
6041
  textarea.style.height = "auto";
@@ -5919,8 +6051,8 @@ function useAutoGrow(ref, value, autoGrow = false, minHeight, maxHeight) {
5919
6051
  }, [value, autoGrow, minHeight, maxHeight, ref]);
5920
6052
  }
5921
6053
  function useMergedTextareaRef(forwarded) {
5922
- const internal = React40.useRef(null);
5923
- const callback = React40.useCallback(
6054
+ const internal = React41.useRef(null);
6055
+ const callback = React41.useCallback(
5924
6056
  (node) => {
5925
6057
  internal.current = node;
5926
6058
  if (typeof forwarded === "function") forwarded(node);
@@ -5937,7 +6069,7 @@ function boxStyle(minHeight, maxHeight) {
5937
6069
  maxHeight: maxHeight ? `${maxHeight}px` : void 0
5938
6070
  };
5939
6071
  }
5940
- var Textarea = React40.forwardRef(
6072
+ var Textarea = React41.forwardRef(
5941
6073
  ({ className, autoGrow, minHeight, maxHeight, wrapperClassName, ...props }, forwarded) => {
5942
6074
  const { ref, callback } = useMergedTextareaRef(forwarded);
5943
6075
  const stretchClasses = getStretchClasses(className);
@@ -5963,7 +6095,7 @@ var Textarea = React40.forwardRef(
5963
6095
  }
5964
6096
  );
5965
6097
  Textarea.displayName = "Textarea";
5966
- var BasicTextarea = React40.forwardRef(
6098
+ var BasicTextarea = React41.forwardRef(
5967
6099
  ({ className, autoGrow, minHeight, maxHeight, ...props }, forwarded) => {
5968
6100
  const { ref, callback } = useMergedTextareaRef(forwarded);
5969
6101
  useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
@@ -5985,7 +6117,7 @@ var BasicTextarea = React40.forwardRef(
5985
6117
  }
5986
6118
  );
5987
6119
  BasicTextarea.displayName = "BasicTextarea";
5988
- var TextareaWithPrefix = React40.forwardRef(
6120
+ var TextareaWithPrefix = React41.forwardRef(
5989
6121
  ({
5990
6122
  prefix,
5991
6123
  className,
@@ -6028,11 +6160,11 @@ TextareaWithPrefix.displayName = "TextareaWithPrefix";
6028
6160
 
6029
6161
  // src/hover-card.tsx
6030
6162
  var HoverCardPrimitive = __toESM(require("@radix-ui/react-hover-card"), 1);
6031
- var React41 = __toESM(require("react"), 1);
6163
+ var React42 = __toESM(require("react"), 1);
6032
6164
  var import_jsx_runtime53 = require("react/jsx-runtime");
6033
6165
  var HoverCard = HoverCardPrimitive.Root;
6034
6166
  var HoverCardTrigger = HoverCardPrimitive.Trigger;
6035
- var HoverCardContent = React41.forwardRef(
6167
+ var HoverCardContent = React42.forwardRef(
6036
6168
  ({ className, align = "center", sideOffset = 4, container, animated = true, ...props }, ref) => {
6037
6169
  const resolved = usePortalContainer(container);
6038
6170
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(HoverCardPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
@@ -6056,9 +6188,9 @@ HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
6056
6188
 
6057
6189
  // src/radio-group.tsx
6058
6190
  var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
6059
- var React42 = __toESM(require("react"), 1);
6191
+ var React43 = __toESM(require("react"), 1);
6060
6192
  var import_jsx_runtime54 = require("react/jsx-runtime");
6061
- var RadioGroupSizeContext = React42.createContext("md");
6193
+ var RadioGroupSizeContext = React43.createContext("md");
6062
6194
  var CONTROL_CLASSES = {
6063
6195
  sm: "h-3.5 w-3.5",
6064
6196
  md: "h-4 w-4",
@@ -6069,7 +6201,7 @@ var DOT_CLASSES = {
6069
6201
  md: "h-1.5 w-1.5",
6070
6202
  lg: "h-2 w-2"
6071
6203
  };
6072
- var RadioGroup3 = React42.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RadioGroupSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
6204
+ var RadioGroup3 = React43.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RadioGroupSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
6073
6205
  RadioGroupPrimitive.Root,
6074
6206
  {
6075
6207
  ref,
@@ -6079,8 +6211,8 @@ var RadioGroup3 = React42.forwardRef(({ className, size = "md", ...props }, ref)
6079
6211
  }
6080
6212
  ) }));
6081
6213
  RadioGroup3.displayName = RadioGroupPrimitive.Root.displayName;
6082
- var RadioGroupItem = React42.forwardRef(({ className, size, ...props }, ref) => {
6083
- const groupSize = React42.useContext(RadioGroupSizeContext);
6214
+ var RadioGroupItem = React43.forwardRef(({ className, size, ...props }, ref) => {
6215
+ const groupSize = React43.useContext(RadioGroupSizeContext);
6084
6216
  const resolved = size ?? groupSize;
6085
6217
  return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
6086
6218
  RadioGroupPrimitive.Item,
@@ -6112,7 +6244,7 @@ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
6112
6244
 
6113
6245
  // src/slider.tsx
6114
6246
  var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
6115
- var React43 = __toESM(require("react"), 1);
6247
+ var React44 = __toESM(require("react"), 1);
6116
6248
  var import_jsx_runtime55 = require("react/jsx-runtime");
6117
6249
  var TRACK_CLASSES = {
6118
6250
  sm: "h-1",
@@ -6124,7 +6256,7 @@ var THUMB_CLASSES = {
6124
6256
  md: "h-4 w-4",
6125
6257
  lg: "h-5 w-5"
6126
6258
  };
6127
- var Slider = React43.forwardRef(({ className, size = "md", ...props }, ref) => {
6259
+ var Slider = React44.forwardRef(({ className, size = "md", ...props }, ref) => {
6128
6260
  const thumbCount = Math.max(
6129
6261
  1,
6130
6262
  (props.value ?? props.defaultValue ?? [0]).length
@@ -6186,7 +6318,7 @@ Slider.displayName = SliderPrimitive.Root.displayName;
6186
6318
  var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
6187
6319
  var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
6188
6320
  var import_class_variance_authority7 = require("class-variance-authority");
6189
- var React44 = __toESM(require("react"), 1);
6321
+ var React45 = __toESM(require("react"), 1);
6190
6322
  var import_jsx_runtime56 = require("react/jsx-runtime");
6191
6323
  var toggleVariants = (0, import_class_variance_authority7.cva)(
6192
6324
  "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
@@ -6208,7 +6340,7 @@ var toggleVariants = (0, import_class_variance_authority7.cva)(
6208
6340
  }
6209
6341
  }
6210
6342
  );
6211
- var Toggle = React44.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
6343
+ var Toggle = React45.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
6212
6344
  TogglePrimitive.Root,
6213
6345
  {
6214
6346
  ref,
@@ -6218,8 +6350,8 @@ var Toggle = React44.forwardRef(({ className, variant, size, ...props }, ref) =>
6218
6350
  }
6219
6351
  ));
6220
6352
  Toggle.displayName = TogglePrimitive.Root.displayName;
6221
- var ToggleGroupContext = React44.createContext({ size: "default", variant: "default" });
6222
- var ToggleGroup = React44.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
6353
+ var ToggleGroupContext = React45.createContext({ size: "default", variant: "default" });
6354
+ var ToggleGroup = React45.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
6223
6355
  ToggleGroupPrimitive.Root,
6224
6356
  {
6225
6357
  ref,
@@ -6230,8 +6362,8 @@ var ToggleGroup = React44.forwardRef(({ className, variant, size, children, ...p
6230
6362
  }
6231
6363
  ));
6232
6364
  ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
6233
- var ToggleGroupItem = React44.forwardRef(({ className, children, variant, size, ...props }, ref) => {
6234
- const context = React44.useContext(ToggleGroupContext);
6365
+ var ToggleGroupItem = React45.forwardRef(({ className, children, variant, size, ...props }, ref) => {
6366
+ const context = React45.useContext(ToggleGroupContext);
6235
6367
  return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
6236
6368
  ToggleGroupPrimitive.Item,
6237
6369
  {
@@ -6299,11 +6431,11 @@ function classNameMisuse(className) {
6299
6431
  const bad = className.split(/\s+/).filter((t) => t && NON_COLOUR_CLASS.test(t));
6300
6432
  return bad.length ? `className is the glyph colour only \u2014 remove "${bad.join(" ")}"` : null;
6301
6433
  }
6302
- function px(value) {
6434
+ function px2(value) {
6303
6435
  const n = Number.parseFloat(value);
6304
6436
  return Number.isFinite(n) ? n : 0;
6305
6437
  }
6306
- function describe(el) {
6438
+ function describe2(el) {
6307
6439
  const cls = typeof el.className === "string" ? el.className.trim().split(/\s+/).slice(0, 4).join(".") : "";
6308
6440
  return `<${el.tagName.toLowerCase()}${cls ? `.${cls}` : ""}>`;
6309
6441
  }
@@ -6348,7 +6480,7 @@ function canon(doc) {
6348
6480
  key,
6349
6481
  target: a.offsetHeight,
6350
6482
  pill: a.firstElementChild.offsetHeight,
6351
- icon: px(view.getComputedStyle(a.querySelector("svg")).height),
6483
+ icon: px2(view.getComputedStyle(a.querySelector("svg")).height),
6352
6484
  sm: b.offsetHeight,
6353
6485
  smPill: b.firstElementChild.offsetHeight,
6354
6486
  wide: w.firstElementChild.offsetHeight
@@ -6378,7 +6510,7 @@ function findTapViolation(el) {
6378
6510
  const inline = /matrx-tap-target-(?:inline|mobile-icon-only)/.test(el.className);
6379
6511
  const pill = el.querySelector(":scope > .matrx-tap-pill");
6380
6512
  const icon = pill?.querySelector(".matrx-tap-icon") ?? null;
6381
- const floored = px(cs.minHeight) >= el.offsetHeight - 0.5 || px(cs.minWidth) >= el.offsetWidth - 0.5;
6513
+ const floored = px2(cs.minHeight) >= el.offsetHeight - 0.5 || px2(cs.minWidth) >= el.offsetWidth - 0.5;
6382
6514
  if (!inTable && pill && !floored) {
6383
6515
  const c = canon(doc);
6384
6516
  const box = sm ? c.sm : c.target;
@@ -6389,7 +6521,7 @@ function findTapViolation(el) {
6389
6521
  return `pill is ${pill.offsetHeight}px, canon is ${pillSizes.join(" or ")}px`;
6390
6522
  }
6391
6523
  if (icon && !moved.has("--matrx-tap-icon-size")) {
6392
- const size = px(view.getComputedStyle(icon).height);
6524
+ const size = px2(view.getComputedStyle(icon).height);
6393
6525
  if (Math.abs(size - c.icon) > 0.5) return `glyph is ${size}px, canon is ${c.icon}px`;
6394
6526
  }
6395
6527
  }
@@ -6406,9 +6538,9 @@ function findTapViolation(el) {
6406
6538
  if (others.length > 0) break;
6407
6539
  if (ownText(parent, slot, view) !== "") break;
6408
6540
  const pcs = view.getComputedStyle(parent);
6409
- const space = px(pcs.marginLeft) + px(pcs.marginRight) + px(pcs.paddingLeft) + px(pcs.paddingRight);
6541
+ const space = px2(pcs.marginLeft) + px2(pcs.marginRight) + px2(pcs.paddingLeft) + px2(pcs.paddingRight);
6410
6542
  if (space > 0.5) {
6411
- return `${describe(parent)} adds ${space}px around a tap button \u2014 tap buttons space themselves`;
6543
+ return `${describe2(parent)} adds ${space}px around a tap button \u2014 tap buttons space themselves`;
6412
6544
  }
6413
6545
  slot = parent;
6414
6546
  }
@@ -6419,9 +6551,9 @@ function findTapViolation(el) {
6419
6551
  const neighbours = Array.from(row.children).filter((c) => c !== slot && isTapSlot(c, view));
6420
6552
  if (flexOrGrid && neighbours.length > 0) {
6421
6553
  const horizontal = rcs.display.includes("grid") || !rcs.flexDirection.startsWith("column");
6422
- const gap = px(horizontal ? rcs.columnGap : rcs.rowGap);
6554
+ const gap = px2(horizontal ? rcs.columnGap : rcs.rowGap);
6423
6555
  if (gap > 0.5) {
6424
- return `${describe(row)} adds a ${gap}px gap between tap buttons \u2014 remove it; tap buttons space themselves`;
6556
+ return `${describe2(row)} adds a ${gap}px gap between tap buttons \u2014 remove it; tap buttons space themselves`;
6425
6557
  }
6426
6558
  }
6427
6559
  }
@@ -6464,11 +6596,11 @@ function findTapPlacementWarning(el) {
6464
6596
  if (!row) return null;
6465
6597
  if (glass) {
6466
6598
  const mixed = Array.from(row.children).find((c) => c !== slot && visible(c, view) && !isGlassItem(c));
6467
- if (mixed) return `glass beside non-glass ${describe(mixed)} \u2014 make the row all glass or none`;
6599
+ if (mixed) return `glass beside non-glass ${describe2(mixed)} \u2014 make the row all glass or none`;
6468
6600
  }
6469
6601
  const pill = el.querySelector(":scope > .matrx-tap-pill") ?? slot.querySelector(".matrx-tap-group-capsule");
6470
6602
  if (!pill) return null;
6471
- const gap = px(view.getComputedStyle(el).getPropertyValue("--matrx-tap-gap")) || 6;
6603
+ const gap = px2(view.getComputedStyle(el).getPropertyValue("--matrx-tap-gap")) || 6;
6472
6604
  const p = pill.getBoundingClientRect();
6473
6605
  if (p.width === 0) return null;
6474
6606
  for (const [side, sib] of [["after", slot.nextElementSibling], ["before", slot.previousElementSibling]]) {
@@ -6476,9 +6608,9 @@ function findTapPlacementWarning(el) {
6476
6608
  const r = sib.getBoundingClientRect();
6477
6609
  if (Math.abs(r.top + r.height / 2 - (p.top + p.height / 2)) > p.height) continue;
6478
6610
  const cs = view.getComputedStyle(sib);
6479
- const distance = side === "after" ? r.left + px(cs.paddingLeft) - p.right : p.left - (r.right - px(cs.paddingRight));
6611
+ const distance = side === "after" ? r.left + px2(cs.paddingLeft) - p.right : p.left - (r.right - px2(cs.paddingRight));
6480
6612
  if (distance < gap - 0.5) {
6481
- return `${describe(sib)} sits ${Math.round(distance)}px from the pill \u2014 anything beside a tap button adds its own ${gap / 2}px (the box only carries ${gap / 2}px)`;
6613
+ return `${describe2(sib)} sits ${Math.round(distance)}px from the pill \u2014 anything beside a tap button adds its own ${gap / 2}px (the box only carries ${gap / 2}px)`;
6482
6614
  }
6483
6615
  }
6484
6616
  return null;