@ai-matrx/design-system 0.21.1 → 0.21.3

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 (61) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/content-transfer.cjs +20 -6
  3. package/dist/content-transfer.cjs.map +1 -1
  4. package/dist/content-transfer.d.cts +38 -4
  5. package/dist/content-transfer.d.ts +38 -4
  6. package/dist/content-transfer.js +20 -6
  7. package/dist/content-transfer.js.map +1 -1
  8. package/dist/data-table/copy-helpers.d.cts +4 -3
  9. package/dist/data-table/copy-helpers.d.ts +4 -3
  10. package/dist/data-table/copy-types.cjs.map +1 -1
  11. package/dist/data-table/copy-types.d.cts +7 -2
  12. package/dist/data-table/copy-types.d.ts +7 -2
  13. package/dist/data-table/data-row-inspector.cjs +23 -6
  14. package/dist/data-table/data-row-inspector.cjs.map +1 -1
  15. package/dist/data-table/data-row-inspector.js +23 -6
  16. package/dist/data-table/data-row-inspector.js.map +1 -1
  17. package/dist/data-table/data-row-window.cjs +23 -6
  18. package/dist/data-table/data-row-window.cjs.map +1 -1
  19. package/dist/data-table/data-row-window.js +23 -6
  20. package/dist/data-table/data-row-window.js.map +1 -1
  21. package/dist/data-table/filter-engine.d.cts +4 -3
  22. package/dist/data-table/filter-engine.d.ts +4 -3
  23. package/dist/data-table/host.cjs +12 -1
  24. package/dist/data-table/host.cjs.map +1 -1
  25. package/dist/data-table/host.d.cts +16 -3
  26. package/dist/data-table/host.d.ts +16 -3
  27. package/dist/data-table/host.js +12 -1
  28. package/dist/data-table/host.js.map +1 -1
  29. package/dist/data-table/index.cjs +992 -843
  30. package/dist/data-table/index.cjs.map +1 -1
  31. package/dist/data-table/index.d.cts +15 -6
  32. package/dist/data-table/index.d.ts +15 -6
  33. package/dist/data-table/index.js +949 -800
  34. package/dist/data-table/index.js.map +1 -1
  35. package/dist/data-table/infer-filter.d.cts +4 -3
  36. package/dist/data-table/infer-filter.d.ts +4 -3
  37. package/dist/data-table/layered-filters.d.cts +4 -3
  38. package/dist/data-table/layered-filters.d.ts +4 -3
  39. package/dist/data-table/pagination.cjs +3 -0
  40. package/dist/data-table/pagination.cjs.map +1 -1
  41. package/dist/data-table/pagination.js +3 -0
  42. package/dist/data-table/pagination.js.map +1 -1
  43. package/dist/data-table/query-control.d.cts +4 -3
  44. package/dist/data-table/query-control.d.ts +4 -3
  45. package/dist/data-table/types.cjs.map +1 -1
  46. package/dist/data-table/types.d.cts +3 -2
  47. package/dist/data-table/types.d.ts +3 -2
  48. package/dist/data-table/url-state.d.cts +4 -3
  49. package/dist/data-table/url-state.d.ts +4 -3
  50. package/dist/data-table/uuid-cell.cjs +3 -0
  51. package/dist/data-table/uuid-cell.cjs.map +1 -1
  52. package/dist/data-table/uuid-cell.js +3 -0
  53. package/dist/data-table/uuid-cell.js.map +1 -1
  54. package/dist/data-table/xlsx.d.cts +4 -3
  55. package/dist/data-table/xlsx.d.ts +4 -3
  56. package/dist/styles.css +9 -0
  57. package/dist/{types-B99KFITZ.d.cts → types-BarjBFyG.d.cts} +9 -1
  58. package/dist/{types-CryQuMmz.d.ts → types-JFlsIv-0.d.ts} +9 -1
  59. package/package.json +1 -1
  60. package/dist/extensions-DCHtNwG3.d.cts +0 -32
  61. package/dist/extensions-DCHtNwG3.d.ts +0 -32
@@ -6,12 +6,12 @@ import {
6
6
  Fragment as Fragment6,
7
7
  isValidElement as isValidElement2,
8
8
  useCallback as useCallback6,
9
- useEffect as useEffect13,
9
+ useEffect as useEffect14,
10
10
  useId as useId2,
11
11
  useLayoutEffect as useLayoutEffect2,
12
12
  useMemo as useMemo7,
13
- useRef as useRef11,
14
- useState as useState20
13
+ useRef as useRef12,
14
+ useState as useState21
15
15
  } from "react";
16
16
  import {
17
17
  DndContext,
@@ -1877,6 +1877,15 @@ function MatrxDataTableProvider({ value, children }) {
1877
1877
  function useMatrxDataTableHost() {
1878
1878
  return useContext4(HostContext);
1879
1879
  }
1880
+ var ROW_ALCHEMY_SLOT = /* @__PURE__ */ Symbol.for("ai-matrx.design-system.table-row-alchemy-context");
1881
+ var rowAlchemyRegistry = globalThis;
1882
+ var RowAlchemyContext = rowAlchemyRegistry[ROW_ALCHEMY_SLOT] ??= createContext4(null);
1883
+ function MatrxTableRowAlchemyScope({ value, children }) {
1884
+ return /* @__PURE__ */ jsx18(RowAlchemyContext.Provider, { value, children });
1885
+ }
1886
+ function useMatrxTableRowAlchemy() {
1887
+ return useContext4(RowAlchemyContext);
1888
+ }
1880
1889
 
1881
1890
  // src/data-table/useTableNotice.tsx
1882
1891
  import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
@@ -3215,8 +3224,9 @@ function ContentTransferMenu(props) {
3215
3224
  const identityKey = props.capabilities?.identityKey ?? inherited.identityKey;
3216
3225
  return /* @__PURE__ */ jsx25(ContentTransferMenuSession, { ...props }, identityKey ?? "anonymous");
3217
3226
  }
3218
- function ContentTransferMenuSession({ references = [], referenceActions = [], source, surface, label, projection, sections, preferences, table, formatSources, sourceFormats = true, variants = EMPTY_VARIANTS, actions = [], capabilities: local, disabled, enabled = true, className, stopPropagation = true, hide = [], controllerRef, icon = "portal", triggerVariant = "transparent", triggerSize = "default" }) {
3227
+ function ContentTransferMenuSession({ references = [], referenceActions = [], source, surface, label, projection, sections, preferences, table, formatSources, sourceFormats = true, variants = EMPTY_VARIANTS, actions = [], capabilities: local, disabled, enabled = true, className, stopPropagation = true, hide = [], controllerRef, icon = "portal", triggerVariant = "transparent", triggerSize = "default", triggerHidden = false }) {
3219
3228
  const triggerRef = React14.useRef(null);
3229
+ const restoreFocusRef = React14.useRef(null);
3220
3230
  const inherited = React14.useContext(CapabilityContext);
3221
3231
  const nearestSurface = React14.useContext(SurfaceContext);
3222
3232
  const fence = useFence();
@@ -3466,13 +3476,21 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
3466
3476
  );
3467
3477
  React14.useImperativeHandle(controllerRef, () => ({
3468
3478
  focusTrigger: () => triggerRef.current?.focus(),
3479
+ preparePrimary: async (options) => {
3480
+ if (!enabled) throw new Error("Alchemy is not enabled for this record.");
3481
+ if (disabled) throw new Error("Alchemy is disabled for this record.");
3482
+ if (hide.includes("prepare")) throw new Error("Alchemy preparation is unavailable for this record.");
3483
+ if (!primary) throw new Error("Alchemy has no source to prepare.");
3484
+ restoreFocusRef.current = options?.restoreFocus ?? null;
3485
+ await openWorkspace(primaryWorkspaceKey, { source: primary, label: sourceLabel });
3486
+ },
3469
3487
  prepare: async (requestedSource, options) => {
3470
3488
  const requestedLabel = options?.label ?? ("label" in requestedSource ? requestedSource.label : "content");
3471
3489
  const requestedKey = `controller:${options?.id ?? "source"}:${materialIdentity(requestedSource)}`;
3472
3490
  externalWorkspaceKeys.current.add(requestedKey);
3473
3491
  await openWorkspace(requestedKey, { source: requestedSource, label: requestedLabel });
3474
3492
  }
3475
- }), [openWorkspace]);
3493
+ }), [disabled, enabled, hide, openWorkspace, primary, primaryWorkspaceKey, sourceLabel]);
3476
3494
  const runAction = React14.useCallback(async (action) => {
3477
3495
  const { controller, id } = fence.begin();
3478
3496
  try {
@@ -3555,7 +3573,7 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
3555
3573
  ] }, id);
3556
3574
  };
3557
3575
  return /* @__PURE__ */ jsxs17("span", { className: cn("matrx-alchemy", className), onClick: stopPropagation ? (event) => event.stopPropagation() : void 0, children: [
3558
- /* @__PURE__ */ jsxs17(Popover, { open: paletteOpen, onOpenChange: (open) => {
3576
+ !triggerHidden ? /* @__PURE__ */ jsxs17(Popover, { open: paletteOpen, onOpenChange: (open) => {
3559
3577
  setPaletteOpen(open);
3560
3578
  if (open) {
3561
3579
  setMode("copy");
@@ -3664,13 +3682,13 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
3664
3682
  ] }, group) : null;
3665
3683
  })
3666
3684
  ] })
3667
- ] }),
3685
+ ] }) : null,
3668
3686
  notice && triggerRef.current ? createPortal(/* @__PURE__ */ jsxs17("div", { className: "matrx-alchemy-feedback", children: [
3669
3687
  /* @__PURE__ */ jsx25("span", { role: "status", children: notice }),
3670
3688
  /* @__PURE__ */ jsx25(ReceiptLink, { target: receiptTarget }),
3671
3689
  /* @__PURE__ */ jsx25("button", { type: "button", "aria-label": "Dismiss Alchemy feedback", onClick: () => setNotice(null), children: "\xD7" })
3672
3690
  ] }), triggerRef.current.ownerDocument.body) : null,
3673
- Object.values(workspaces).map((saved) => /* @__PURE__ */ jsx25(PreparationWorkspace, { restoreFocus: () => triggerRef.current?.focus(), open: workspaceOpen && workspaceKey === saved.key, state: saved, scopes, scopeLabels: table?.scopeLabels, onClose: () => setWorkspaceOpen(false), onChange: (next) => setWorkspaces((current) => ({ ...current, [saved.key]: next })), transport, adapters, actions: preparedActions, captureScope: workspaceCaptures.current.get(saved.key) ?? capturePrimary, ...ai ? { ai } : {}, onOutcome: report }, saved.key)),
3691
+ Object.values(workspaces).map((saved) => /* @__PURE__ */ jsx25(PreparationWorkspace, { restoreFocus: () => restoreFocusRef.current?.() ?? triggerRef.current?.focus(), open: workspaceOpen && workspaceKey === saved.key, state: saved, scopes, scopeLabels: table?.scopeLabels, onClose: () => setWorkspaceOpen(false), onChange: (next) => setWorkspaces((current) => ({ ...current, [saved.key]: next })), transport, adapters, actions: preparedActions, captureScope: workspaceCaptures.current.get(saved.key) ?? capturePrimary, ...ai ? { ai } : {}, onOutcome: report }, saved.key)),
3674
3692
  emailReview
3675
3693
  ] });
3676
3694
  }
@@ -4477,7 +4495,12 @@ function MatrxCopyMenuSession(props) {
4477
4495
  ...props.referenceActions ? { referenceActions: props.referenceActions } : {},
4478
4496
  ...props.icon !== void 0 ? { icon: props.icon } : {},
4479
4497
  ...props.triggerVariant !== void 0 ? { triggerVariant: props.triggerVariant } : {},
4480
- controllerRef: controller,
4498
+ controllerRef: (value) => {
4499
+ controller.current = value;
4500
+ if (typeof props.controllerRef === "function") props.controllerRef(value);
4501
+ else if (props.controllerRef) props.controllerRef.current = value;
4502
+ },
4503
+ ...props.triggerHidden ? { triggerHidden: true } : {},
4481
4504
  label: props.label,
4482
4505
  variants,
4483
4506
  actions,
@@ -5566,12 +5589,47 @@ import {
5566
5589
  useUrlState
5567
5590
  } from "@ai-matrx/kit/url-state";
5568
5591
 
5592
+ // src/data-table/RowAlchemyLauncher.tsx
5593
+ import { useEffect as useEffect8, useRef as useRef9, useState as useState13 } from "react";
5594
+ import { jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
5595
+ function MatrxTableRowAlchemyProvider({ copy, placement, children }) {
5596
+ const controller = useRef9(null);
5597
+ const { CopyControls } = useMatrxDataTableHost();
5598
+ const [active, setActive] = useState13(false);
5599
+ const [fallback, setFallback] = useState13(false);
5600
+ useEffect8(() => {
5601
+ if (placement !== "menu" || active) return;
5602
+ const timer = window.setTimeout(() => {
5603
+ if (!active) {
5604
+ console.warn("MatrxDataTable rowCopyPlacement='menu' requires an ItemMenu in rowActions; showing inline Alchemy instead.");
5605
+ setFallback(true);
5606
+ }
5607
+ }, 0);
5608
+ return () => window.clearTimeout(timer);
5609
+ }, [active, placement]);
5610
+ const value = {
5611
+ copy,
5612
+ placement,
5613
+ ready: active,
5614
+ activate: () => setActive(true),
5615
+ prepare: async (restoreFocus) => {
5616
+ if (copy.disabled) throw new Error("Alchemy is disabled for this record.");
5617
+ if (!controller.current) throw new Error("Alchemy is unavailable because its launcher did not mount.");
5618
+ await controller.current.preparePrimary(restoreFocus ? { restoreFocus } : void 0);
5619
+ }
5620
+ };
5621
+ return /* @__PURE__ */ jsxs20(MatrxTableRowAlchemyScope, { value, children: [
5622
+ active || fallback ? CopyControls ? /* @__PURE__ */ jsx29(CopyControls, { ...copy, triggerHidden: active, controllerRef: controller }) : /* @__PURE__ */ jsx29(MatrxCopyMenu, { ...copy, triggerHidden: active, controllerRef: controller }) : null,
5623
+ children
5624
+ ] });
5625
+ }
5626
+
5569
5627
  // src/data-table/ColumnHeaderCell.tsx
5570
5628
  import {
5571
5629
  forwardRef as forwardRef12,
5572
- useEffect as useEffect8,
5630
+ useEffect as useEffect9,
5573
5631
  useMemo as useMemo5,
5574
- useState as useState13
5632
+ useState as useState14
5575
5633
  } from "react";
5576
5634
  import { useDraggable } from "@dnd-kit/core";
5577
5635
 
@@ -5579,8 +5637,8 @@ import { useDraggable } from "@dnd-kit/core";
5579
5637
  import * as DialogPrimitive2 from "@radix-ui/react-dialog";
5580
5638
  import { Command as CommandPrimitive } from "cmdk";
5581
5639
  import * as React16 from "react";
5582
- import { jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
5583
- var Command = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
5640
+ import { jsx as jsx30, jsxs as jsxs21 } from "react/jsx-runtime";
5641
+ var Command = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
5584
5642
  CommandPrimitive,
5585
5643
  {
5586
5644
  ref,
@@ -5599,8 +5657,8 @@ var CommandDialogContent = React16.forwardRef(({ className, children, container,
5599
5657
  const isMobile = useIsMobile();
5600
5658
  const isModal = useRadixDialogModal();
5601
5659
  const portalContainer = usePortalContainer(container);
5602
- return /* @__PURE__ */ jsxs20(DialogPrimitive2.Portal, { container: portalContainer, children: [
5603
- isModal ? /* @__PURE__ */ jsx29(
5660
+ return /* @__PURE__ */ jsxs21(DialogPrimitive2.Portal, { container: portalContainer, children: [
5661
+ isModal ? /* @__PURE__ */ jsx30(
5604
5662
  DialogPrimitive2.Overlay,
5605
5663
  {
5606
5664
  className: cn(
@@ -5609,7 +5667,7 @@ var CommandDialogContent = React16.forwardRef(({ className, children, container,
5609
5667
  )
5610
5668
  }
5611
5669
  ) : null,
5612
- /* @__PURE__ */ jsxs20(
5670
+ /* @__PURE__ */ jsxs21(
5613
5671
  DialogPrimitive2.Content,
5614
5672
  {
5615
5673
  ref,
@@ -5625,9 +5683,9 @@ var CommandDialogContent = React16.forwardRef(({ className, children, container,
5625
5683
  ...props,
5626
5684
  children: [
5627
5685
  children,
5628
- /* @__PURE__ */ jsxs20(DialogPrimitive2.Close, { className: "absolute right-2 top-4 flex h-10 w-10 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground sm:right-4", children: [
5629
- /* @__PURE__ */ jsx29(XIcon, { className: "h-4 w-4" }),
5630
- /* @__PURE__ */ jsx29("span", { className: "sr-only", children: "Close" })
5686
+ /* @__PURE__ */ jsxs21(DialogPrimitive2.Close, { className: "absolute right-2 top-4 flex h-10 w-10 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground sm:right-4", children: [
5687
+ /* @__PURE__ */ jsx30(XIcon, { className: "h-4 w-4" }),
5688
+ /* @__PURE__ */ jsx30("span", { className: "sr-only", children: "Close" })
5631
5689
  ] })
5632
5690
  ]
5633
5691
  }
@@ -5635,9 +5693,9 @@ var CommandDialogContent = React16.forwardRef(({ className, children, container,
5635
5693
  ] });
5636
5694
  });
5637
5695
  CommandDialogContent.displayName = "CommandDialogContent";
5638
- var CommandInput = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs20("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
5639
- /* @__PURE__ */ jsx29(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
5640
- /* @__PURE__ */ jsx29(
5696
+ var CommandInput = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs21("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
5697
+ /* @__PURE__ */ jsx30(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
5698
+ /* @__PURE__ */ jsx30(
5641
5699
  CommandPrimitive.Input,
5642
5700
  {
5643
5701
  ref,
@@ -5650,7 +5708,7 @@ var CommandInput = React16.forwardRef(({ className, ...props }, ref) => /* @__PU
5650
5708
  )
5651
5709
  ] }));
5652
5710
  CommandInput.displayName = CommandPrimitive.Input.displayName;
5653
- var CommandList = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
5711
+ var CommandList = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
5654
5712
  CommandPrimitive.List,
5655
5713
  {
5656
5714
  ref,
@@ -5659,7 +5717,7 @@ var CommandList = React16.forwardRef(({ className, ...props }, ref) => /* @__PUR
5659
5717
  }
5660
5718
  ));
5661
5719
  CommandList.displayName = CommandPrimitive.List.displayName;
5662
- var CommandEmpty = React16.forwardRef((props, ref) => /* @__PURE__ */ jsx29(
5720
+ var CommandEmpty = React16.forwardRef((props, ref) => /* @__PURE__ */ jsx30(
5663
5721
  CommandPrimitive.Empty,
5664
5722
  {
5665
5723
  ref,
@@ -5668,7 +5726,7 @@ var CommandEmpty = React16.forwardRef((props, ref) => /* @__PURE__ */ jsx29(
5668
5726
  }
5669
5727
  ));
5670
5728
  CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
5671
- var CommandGroup = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
5729
+ var CommandGroup = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
5672
5730
  CommandPrimitive.Group,
5673
5731
  {
5674
5732
  ref,
@@ -5680,7 +5738,7 @@ var CommandGroup = React16.forwardRef(({ className, ...props }, ref) => /* @__PU
5680
5738
  }
5681
5739
  ));
5682
5740
  CommandGroup.displayName = CommandPrimitive.Group.displayName;
5683
- var CommandSeparator = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
5741
+ var CommandSeparator = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
5684
5742
  CommandPrimitive.Separator,
5685
5743
  {
5686
5744
  ref,
@@ -5689,7 +5747,7 @@ var CommandSeparator = React16.forwardRef(({ className, ...props }, ref) => /* @
5689
5747
  }
5690
5748
  ));
5691
5749
  CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
5692
- var CommandItem = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
5750
+ var CommandItem = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
5693
5751
  CommandPrimitive.Item,
5694
5752
  {
5695
5753
  ref,
@@ -5705,7 +5763,7 @@ var CommandShortcut = ({
5705
5763
  className,
5706
5764
  ...props
5707
5765
  }) => {
5708
- return /* @__PURE__ */ jsx29(
5766
+ return /* @__PURE__ */ jsx30(
5709
5767
  "span",
5710
5768
  {
5711
5769
  className: cn(
@@ -5719,10 +5777,10 @@ var CommandShortcut = ({
5719
5777
  CommandShortcut.displayName = "CommandShortcut";
5720
5778
 
5721
5779
  // src/data-table/ColumnHeaderCell.tsx
5722
- import { Fragment as Fragment4, jsx as jsx30, jsxs as jsxs21 } from "react/jsx-runtime";
5780
+ import { Fragment as Fragment4, jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
5723
5781
  var HeaderButton = forwardRef12(({ dragDescription, "aria-describedby": tooltipDescription, ...props }, ref) => {
5724
5782
  const descriptions = [tooltipDescription, dragDescription].filter((value) => Boolean(value)).join(" ");
5725
- return /* @__PURE__ */ jsx30(
5783
+ return /* @__PURE__ */ jsx31(
5726
5784
  "button",
5727
5785
  {
5728
5786
  ref,
@@ -5780,9 +5838,9 @@ function ColumnHeaderCell({
5780
5838
  const reorderClass = reorderEnabled ? "touch-none cursor-grab active:cursor-grabbing" : void 0;
5781
5839
  const filterActive = isColumnFilterActive(filterValue);
5782
5840
  const deferredFilter = filterApplyLabel !== void 0 || filterShowCancel || filterFooterHint !== void 0;
5783
- const [filterOpen, setFilterOpen] = useState13(false);
5784
- const [draftFilter, setDraftFilter] = useState13(filterValue);
5785
- useEffect8(() => {
5841
+ const [filterOpen, setFilterOpen] = useState14(false);
5842
+ const [draftFilter, setDraftFilter] = useState14(filterValue);
5843
+ useEffect9(() => {
5786
5844
  if (!filterOpen) setDraftFilter(filterValue);
5787
5845
  }, [filterOpen, filterValue]);
5788
5846
  const applyFilter = () => {
@@ -5802,7 +5860,7 @@ function ColumnHeaderCell({
5802
5860
  else onFilterChange(next);
5803
5861
  };
5804
5862
  const menuLabel = labelText ? `Sort or filter ${labelText}` : "Sort or filter column";
5805
- const menuContent = /* @__PURE__ */ jsxs21(
5863
+ const menuContent = /* @__PURE__ */ jsxs22(
5806
5864
  PopoverContent,
5807
5865
  {
5808
5866
  align: "start",
@@ -5819,9 +5877,9 @@ function ColumnHeaderCell({
5819
5877
  input.focus();
5820
5878
  },
5821
5879
  children: [
5822
- sortable ? /* @__PURE__ */ jsxs21(Fragment4, { children: [
5823
- /* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-0.5 pb-2", children: [
5824
- /* @__PURE__ */ jsxs21(
5880
+ sortable ? /* @__PURE__ */ jsxs22(Fragment4, { children: [
5881
+ /* @__PURE__ */ jsxs22("div", { className: "flex flex-col gap-0.5 pb-2", children: [
5882
+ /* @__PURE__ */ jsxs22(
5825
5883
  Button,
5826
5884
  {
5827
5885
  variant: isSorted && sortDirection === "asc" ? "secondary" : "ghost",
@@ -5829,12 +5887,12 @@ function ColumnHeaderCell({
5829
5887
  className: "h-8 justify-start gap-2 px-2 text-xs font-normal",
5830
5888
  onClick: onSortAsc,
5831
5889
  children: [
5832
- /* @__PURE__ */ jsx30(ArrowUp, { className: "h-3.5 w-3.5" }),
5890
+ /* @__PURE__ */ jsx31(ArrowUp, { className: "h-3.5 w-3.5" }),
5833
5891
  "Sort ascending"
5834
5892
  ]
5835
5893
  }
5836
5894
  ),
5837
- /* @__PURE__ */ jsxs21(
5895
+ /* @__PURE__ */ jsxs22(
5838
5896
  Button,
5839
5897
  {
5840
5898
  variant: isSorted && sortDirection === "desc" ? "secondary" : "ghost",
@@ -5842,12 +5900,12 @@ function ColumnHeaderCell({
5842
5900
  className: "h-8 justify-start gap-2 px-2 text-xs font-normal",
5843
5901
  onClick: onSortDesc,
5844
5902
  children: [
5845
- /* @__PURE__ */ jsx30(ArrowDown, { className: "h-3.5 w-3.5" }),
5903
+ /* @__PURE__ */ jsx31(ArrowDown, { className: "h-3.5 w-3.5" }),
5846
5904
  "Sort descending"
5847
5905
  ]
5848
5906
  }
5849
5907
  ),
5850
- isSorted ? /* @__PURE__ */ jsxs21(
5908
+ isSorted ? /* @__PURE__ */ jsxs22(
5851
5909
  Button,
5852
5910
  {
5853
5911
  variant: "ghost",
@@ -5855,15 +5913,15 @@ function ColumnHeaderCell({
5855
5913
  className: "h-8 justify-start gap-2 px-2 text-xs font-normal text-muted-foreground",
5856
5914
  onClick: onClearSort,
5857
5915
  children: [
5858
- /* @__PURE__ */ jsx30(ListX, { className: "h-3.5 w-3.5" }),
5916
+ /* @__PURE__ */ jsx31(ListX, { className: "h-3.5 w-3.5" }),
5859
5917
  "Clear sort"
5860
5918
  ]
5861
5919
  }
5862
5920
  ) : null
5863
5921
  ] }),
5864
- filterKind ? /* @__PURE__ */ jsx30("div", { className: "mb-2 h-px bg-border" }) : null
5922
+ filterKind ? /* @__PURE__ */ jsx31("div", { className: "mb-2 h-px bg-border" }) : null
5865
5923
  ] }) : null,
5866
- filterKind ? /* @__PURE__ */ jsx30(
5924
+ filterKind ? /* @__PURE__ */ jsx31(
5867
5925
  FilterBody,
5868
5926
  {
5869
5927
  kind: filterKind,
@@ -5878,10 +5936,10 @@ function ColumnHeaderCell({
5878
5936
  allowNullModes
5879
5937
  }
5880
5938
  ) : null,
5881
- filterKind && visibleFilter && allowNegation ? /* @__PURE__ */ jsxs21("div", { className: "mt-2 border-t border-border pt-2", children: [
5882
- /* @__PURE__ */ jsx30("p", { className: "mb-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground", children: "Match mode" }),
5883
- /* @__PURE__ */ jsxs21("div", { className: "grid grid-cols-2 gap-1 rounded-md border p-0.5", children: [
5884
- /* @__PURE__ */ jsx30(
5939
+ filterKind && visibleFilter && allowNegation ? /* @__PURE__ */ jsxs22("div", { className: "mt-2 border-t border-border pt-2", children: [
5940
+ /* @__PURE__ */ jsx31("p", { className: "mb-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground", children: "Match mode" }),
5941
+ /* @__PURE__ */ jsxs22("div", { className: "grid grid-cols-2 gap-1 rounded-md border p-0.5", children: [
5942
+ /* @__PURE__ */ jsx31(
5885
5943
  "button",
5886
5944
  {
5887
5945
  type: "button",
@@ -5894,7 +5952,7 @@ function ColumnHeaderCell({
5894
5952
  children: "Include"
5895
5953
  }
5896
5954
  ),
5897
- /* @__PURE__ */ jsx30(
5955
+ /* @__PURE__ */ jsx31(
5898
5956
  "button",
5899
5957
  {
5900
5958
  type: "button",
@@ -5909,11 +5967,11 @@ function ColumnHeaderCell({
5909
5967
  )
5910
5968
  ] })
5911
5969
  ] }) : null,
5912
- filterKind && deferredFilter ? /* @__PURE__ */ jsxs21("div", { className: "mt-2 border-t border-border pt-2", children: [
5913
- filterFooterHint ? /* @__PURE__ */ jsx30("div", { className: "mb-2 text-xs text-muted-foreground", children: filterFooterHint }) : null,
5914
- /* @__PURE__ */ jsxs21("div", { className: "flex justify-end gap-2", children: [
5915
- filterShowCancel ? /* @__PURE__ */ jsx30(Button, { type: "button", variant: "ghost", size: "sm", onClick: cancelFilter, children: "Cancel" }) : null,
5916
- /* @__PURE__ */ jsx30(Button, { type: "button", size: "sm", onClick: applyFilter, children: filterApplyLabel ?? "Apply" })
5970
+ filterKind && deferredFilter ? /* @__PURE__ */ jsxs22("div", { className: "mt-2 border-t border-border pt-2", children: [
5971
+ filterFooterHint ? /* @__PURE__ */ jsx31("div", { className: "mb-2 text-xs text-muted-foreground", children: filterFooterHint }) : null,
5972
+ /* @__PURE__ */ jsxs22("div", { className: "flex justify-end gap-2", children: [
5973
+ filterShowCancel ? /* @__PURE__ */ jsx31(Button, { type: "button", variant: "ghost", size: "sm", onClick: cancelFilter, children: "Cancel" }) : null,
5974
+ /* @__PURE__ */ jsx31(Button, { type: "button", size: "sm", onClick: applyFilter, children: filterApplyLabel ?? "Apply" })
5917
5975
  ] })
5918
5976
  ] }) : null
5919
5977
  ]
@@ -5922,10 +5980,10 @@ function ColumnHeaderCell({
5922
5980
  if (compact) {
5923
5981
  if (!sortable && !filterKind) {
5924
5982
  if (!reorderEnabled) {
5925
- return /* @__PURE__ */ jsx30("div", { className: cn("flex items-center justify-center", className), children: label });
5983
+ return /* @__PURE__ */ jsx31("div", { className: cn("flex items-center justify-center", className), children: label });
5926
5984
  }
5927
- return /* @__PURE__ */ jsx30("div", { className: cn("flex items-center justify-center", className), children: /* @__PURE__ */ jsxs21(Tooltip, { children: [
5928
- /* @__PURE__ */ jsx30(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx30(
5985
+ return /* @__PURE__ */ jsx31("div", { className: cn("flex items-center justify-center", className), children: /* @__PURE__ */ jsxs22(Tooltip, { children: [
5986
+ /* @__PURE__ */ jsx31(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(
5929
5987
  HeaderButton,
5930
5988
  {
5931
5989
  type: "button",
@@ -5937,14 +5995,14 @@ function ColumnHeaderCell({
5937
5995
  children: label
5938
5996
  }
5939
5997
  ) }),
5940
- /* @__PURE__ */ jsxs21(TooltipContent, { children: [
5998
+ /* @__PURE__ */ jsxs22(TooltipContent, { children: [
5941
5999
  "Drag to reorder ",
5942
6000
  reorderLabel,
5943
6001
  "."
5944
6002
  ] })
5945
6003
  ] }) });
5946
6004
  }
5947
- return /* @__PURE__ */ jsx30(
6005
+ return /* @__PURE__ */ jsx31(
5948
6006
  "div",
5949
6007
  {
5950
6008
  className: cn(
@@ -5952,9 +6010,9 @@ function ColumnHeaderCell({
5952
6010
  align === "right" ? "justify-end" : "justify-center",
5953
6011
  className
5954
6012
  ),
5955
- children: /* @__PURE__ */ jsxs21(Popover, { open: filterOpen, onOpenChange: setFilterOpen, children: [
5956
- /* @__PURE__ */ jsxs21(Tooltip, { children: [
5957
- /* @__PURE__ */ jsx30(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx30(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs21(
6013
+ children: /* @__PURE__ */ jsxs22(Popover, { open: filterOpen, onOpenChange: setFilterOpen, children: [
6014
+ /* @__PURE__ */ jsxs22(Tooltip, { children: [
6015
+ /* @__PURE__ */ jsx31(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs22(
5958
6016
  HeaderButton,
5959
6017
  {
5960
6018
  type: "button",
@@ -5972,8 +6030,8 @@ function ColumnHeaderCell({
5972
6030
  ),
5973
6031
  children: [
5974
6032
  label,
5975
- isSorted ? sortDirection === "asc" ? /* @__PURE__ */ jsx30(ArrowUp, { className: "absolute -top-1 right-0 h-2 w-2 text-primary" }) : /* @__PURE__ */ jsx30(ArrowDown, { className: "absolute -top-1 right-0 h-2 w-2 text-primary" }) : null,
5976
- filterActive ? /* @__PURE__ */ jsx30(
6033
+ isSorted ? sortDirection === "asc" ? /* @__PURE__ */ jsx31(ArrowUp, { className: "absolute -top-1 right-0 h-2 w-2 text-primary" }) : /* @__PURE__ */ jsx31(ArrowDown, { className: "absolute -top-1 right-0 h-2 w-2 text-primary" }) : null,
6034
+ filterActive ? /* @__PURE__ */ jsx31(
5977
6035
  "span",
5978
6036
  {
5979
6037
  "aria-hidden": true,
@@ -5983,7 +6041,7 @@ function ColumnHeaderCell({
5983
6041
  ]
5984
6042
  }
5985
6043
  ) }) }),
5986
- /* @__PURE__ */ jsxs21(TooltipContent, { children: [
6044
+ /* @__PURE__ */ jsxs22(TooltipContent, { children: [
5987
6045
  "Canonical Matrx table \xB7 ",
5988
6046
  menuLabel
5989
6047
  ] })
@@ -5993,7 +6051,7 @@ function ColumnHeaderCell({
5993
6051
  }
5994
6052
  );
5995
6053
  }
5996
- return /* @__PURE__ */ jsxs21(
6054
+ return /* @__PURE__ */ jsxs22(
5997
6055
  "div",
5998
6056
  {
5999
6057
  className: cn(
@@ -6003,8 +6061,8 @@ function ColumnHeaderCell({
6003
6061
  className
6004
6062
  ),
6005
6063
  children: [
6006
- sortable ? /* @__PURE__ */ jsxs21(Tooltip, { children: [
6007
- /* @__PURE__ */ jsx30(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs21(
6064
+ sortable ? /* @__PURE__ */ jsxs22(Tooltip, { children: [
6065
+ /* @__PURE__ */ jsx31(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs22(
6008
6066
  HeaderButton,
6009
6067
  {
6010
6068
  type: "button",
@@ -6016,14 +6074,14 @@ function ColumnHeaderCell({
6016
6074
  isSorted ? "text-foreground" : "text-muted-foreground hover:text-foreground"
6017
6075
  ),
6018
6076
  children: [
6019
- /* @__PURE__ */ jsx30("span", { className: "truncate", children: label }),
6020
- isSorted ? sortDirection === "asc" ? /* @__PURE__ */ jsx30(ArrowUp, { className: "h-3 w-3 shrink-0 text-primary" }) : /* @__PURE__ */ jsx30(ArrowDown, { className: "h-3 w-3 shrink-0 text-primary" }) : /* @__PURE__ */ jsx30(ArrowUpDown, { className: "h-3 w-3 shrink-0 opacity-40" })
6077
+ /* @__PURE__ */ jsx31("span", { className: "truncate", children: label }),
6078
+ isSorted ? sortDirection === "asc" ? /* @__PURE__ */ jsx31(ArrowUp, { className: "h-3 w-3 shrink-0 text-primary" }) : /* @__PURE__ */ jsx31(ArrowDown, { className: "h-3 w-3 shrink-0 text-primary" }) : /* @__PURE__ */ jsx31(ArrowUpDown, { className: "h-3 w-3 shrink-0 opacity-40" })
6021
6079
  ]
6022
6080
  }
6023
6081
  ) }),
6024
- /* @__PURE__ */ jsx30(TooltipContent, { children: reorderEnabled ? `Drag to reorder ${reorderLabel}.` : labelText ?? "Sort column" })
6025
- ] }) : reorderEnabled ? /* @__PURE__ */ jsxs21(Tooltip, { children: [
6026
- /* @__PURE__ */ jsx30(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx30(
6082
+ /* @__PURE__ */ jsx31(TooltipContent, { children: reorderEnabled ? `Drag to reorder ${reorderLabel}.` : labelText ?? "Sort column" })
6083
+ ] }) : reorderEnabled ? /* @__PURE__ */ jsxs22(Tooltip, { children: [
6084
+ /* @__PURE__ */ jsx31(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(
6027
6085
  HeaderButton,
6028
6086
  {
6029
6087
  type: "button",
@@ -6035,16 +6093,16 @@ function ColumnHeaderCell({
6035
6093
  children: label
6036
6094
  }
6037
6095
  ) }),
6038
- /* @__PURE__ */ jsxs21(TooltipContent, { children: [
6096
+ /* @__PURE__ */ jsxs22(TooltipContent, { children: [
6039
6097
  "Drag to reorder ",
6040
6098
  reorderLabel,
6041
6099
  "."
6042
6100
  ] })
6043
- ] }) : /* @__PURE__ */ jsx30("span", { className: "truncate text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: label }),
6044
- filterKind || sortable ? /* @__PURE__ */ jsxs21("div", { className: "inline-flex items-center", children: [
6045
- /* @__PURE__ */ jsxs21(Popover, { open: filterOpen, onOpenChange: setFilterOpen, children: [
6046
- /* @__PURE__ */ jsxs21(Tooltip, { children: [
6047
- /* @__PURE__ */ jsx30(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx30(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx30(
6101
+ ] }) : /* @__PURE__ */ jsx31("span", { className: "truncate text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: label }),
6102
+ filterKind || sortable ? /* @__PURE__ */ jsxs22("div", { className: "inline-flex items-center", children: [
6103
+ /* @__PURE__ */ jsxs22(Popover, { open: filterOpen, onOpenChange: setFilterOpen, children: [
6104
+ /* @__PURE__ */ jsxs22(Tooltip, { children: [
6105
+ /* @__PURE__ */ jsx31(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(
6048
6106
  "button",
6049
6107
  {
6050
6108
  type: "button",
@@ -6056,15 +6114,15 @@ function ColumnHeaderCell({
6056
6114
  "rounded p-0.5 transition-colors",
6057
6115
  filterActive ? "text-primary hover:text-primary/80" : "text-muted-foreground/40 hover:text-muted-foreground"
6058
6116
  ),
6059
- children: filterKind ? /* @__PURE__ */ jsx30(ListFilter, { className: cn("h-3 w-3", filterActive && "fill-primary/20") }) : /* @__PURE__ */ jsx30(ArrowUpDown, { className: "h-3 w-3" })
6117
+ children: filterKind ? /* @__PURE__ */ jsx31(ListFilter, { className: cn("h-3 w-3", filterActive && "fill-primary/20") }) : /* @__PURE__ */ jsx31(ArrowUpDown, { className: "h-3 w-3" })
6060
6118
  }
6061
6119
  ) }) }),
6062
- /* @__PURE__ */ jsx30(TooltipContent, { children: menuLabel })
6120
+ /* @__PURE__ */ jsx31(TooltipContent, { children: menuLabel })
6063
6121
  ] }),
6064
6122
  menuContent
6065
6123
  ] }),
6066
- filterActive ? /* @__PURE__ */ jsxs21(Tooltip, { children: [
6067
- /* @__PURE__ */ jsx30(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx30(
6124
+ filterActive ? /* @__PURE__ */ jsxs22(Tooltip, { children: [
6125
+ /* @__PURE__ */ jsx31(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(
6068
6126
  "button",
6069
6127
  {
6070
6128
  type: "button",
@@ -6074,10 +6132,10 @@ function ColumnHeaderCell({
6074
6132
  onFilterChange(void 0);
6075
6133
  },
6076
6134
  className: "rounded p-0.5 text-primary hover:bg-muted hover:text-foreground",
6077
- children: /* @__PURE__ */ jsx30(X, { className: "h-3 w-3" })
6135
+ children: /* @__PURE__ */ jsx31(X, { className: "h-3 w-3" })
6078
6136
  }
6079
6137
  ) }),
6080
- /* @__PURE__ */ jsx30(TooltipContent, { children: labelText ? `Clear ${labelText} filter` : "Clear this filter" })
6138
+ /* @__PURE__ */ jsx31(TooltipContent, { children: labelText ? `Clear ${labelText} filter` : "Clear this filter" })
6081
6139
  ] }) : null
6082
6140
  ] }) : null
6083
6141
  ]
@@ -6102,14 +6160,14 @@ function FilterBody({
6102
6160
  onChange({ kind: "text", value: "", mode: next });
6103
6161
  }
6104
6162
  };
6105
- return /* @__PURE__ */ jsxs21("div", { className: "space-y-1.5 px-1", children: [
6106
- /* @__PURE__ */ jsx30("p", { className: "text-[11px] font-medium uppercase tracking-wider text-muted-foreground", children: "Filter" }),
6107
- /* @__PURE__ */ jsx30("div", { className: "flex gap-1", children: [
6163
+ return /* @__PURE__ */ jsxs22("div", { className: "space-y-1.5 px-1", children: [
6164
+ /* @__PURE__ */ jsx31("p", { className: "text-[11px] font-medium uppercase tracking-wider text-muted-foreground", children: "Filter" }),
6165
+ /* @__PURE__ */ jsx31("div", { className: "flex gap-1", children: [
6108
6166
  ["contains", "Contains"],
6109
6167
  ["empty", "(empty)"],
6110
6168
  ["not_empty", "(not empty)"],
6111
6169
  ...allowNullModes ? [["null", "(null)"], ["not_null", "(not null)"]] : []
6112
- ].map(([m, label]) => /* @__PURE__ */ jsx30(
6170
+ ].map(([m, label]) => /* @__PURE__ */ jsx31(
6113
6171
  "button",
6114
6172
  {
6115
6173
  type: "button",
@@ -6123,8 +6181,8 @@ function FilterBody({
6123
6181
  },
6124
6182
  m
6125
6183
  )) }),
6126
- mode === "contains" && /* @__PURE__ */ jsxs21("div", { className: "relative", children: [
6127
- /* @__PURE__ */ jsx30(
6184
+ mode === "contains" && /* @__PURE__ */ jsxs22("div", { className: "relative", children: [
6185
+ /* @__PURE__ */ jsx31(
6128
6186
  Input,
6129
6187
  {
6130
6188
  "data-matrx-filter-autofocus": true,
@@ -6137,14 +6195,14 @@ function FilterBody({
6137
6195
  style: { fontSize: "16px" }
6138
6196
  }
6139
6197
  ),
6140
- text ? /* @__PURE__ */ jsx30(
6198
+ text ? /* @__PURE__ */ jsx31(
6141
6199
  "button",
6142
6200
  {
6143
6201
  type: "button",
6144
6202
  "aria-label": "Clear filter text",
6145
6203
  className: "absolute right-1.5 top-1/2 -translate-y-1/2 rounded p-0.5 text-muted-foreground hover:text-foreground",
6146
6204
  onClick: () => onChange(void 0),
6147
- children: /* @__PURE__ */ jsx30(X, { className: "h-3.5 w-3.5" })
6205
+ children: /* @__PURE__ */ jsx31(X, { className: "h-3.5 w-3.5" })
6148
6206
  }
6149
6207
  ) : null
6150
6208
  ] })
@@ -6152,7 +6210,7 @@ function FilterBody({
6152
6210
  }
6153
6211
  if (kind === "select") {
6154
6212
  const selected = value?.kind === "select" ? value.values ?? (value.value && value.value !== "__all__" ? [value.value] : []) : [];
6155
- return /* @__PURE__ */ jsx30(
6213
+ return /* @__PURE__ */ jsx31(
6156
6214
  SearchableSelectFilter,
6157
6215
  {
6158
6216
  selected,
@@ -6164,9 +6222,9 @@ function FilterBody({
6164
6222
  }
6165
6223
  if (kind === "boolean") {
6166
6224
  const current = value?.kind === "boolean" ? value.value : "__all__";
6167
- return /* @__PURE__ */ jsxs21("div", { className: "space-y-1.5 px-1", children: [
6168
- /* @__PURE__ */ jsx30("p", { className: "text-[11px] font-medium uppercase tracking-wider text-muted-foreground", children: "Filter" }),
6169
- /* @__PURE__ */ jsxs21(
6225
+ return /* @__PURE__ */ jsxs22("div", { className: "space-y-1.5 px-1", children: [
6226
+ /* @__PURE__ */ jsx31("p", { className: "text-[11px] font-medium uppercase tracking-wider text-muted-foreground", children: "Filter" }),
6227
+ /* @__PURE__ */ jsxs22(
6170
6228
  Select,
6171
6229
  {
6172
6230
  value: current === "__all__" ? "__all__" : current ? "true" : "false",
@@ -6175,18 +6233,18 @@ function FilterBody({
6175
6233
  else onChange({ kind: "boolean", value: v === "true" });
6176
6234
  },
6177
6235
  children: [
6178
- /* @__PURE__ */ jsx30(SelectTrigger, { className: "h-8 text-xs", children: /* @__PURE__ */ jsx30(SelectValue, {}) }),
6179
- /* @__PURE__ */ jsxs21(SelectContent, { children: [
6180
- /* @__PURE__ */ jsx30(SelectItem, { value: "__all__", children: "All" }),
6181
- /* @__PURE__ */ jsx30(SelectItem, { value: "true", children: "Yes" }),
6182
- /* @__PURE__ */ jsx30(SelectItem, { value: "false", children: "No" })
6236
+ /* @__PURE__ */ jsx31(SelectTrigger, { className: "h-8 text-xs", children: /* @__PURE__ */ jsx31(SelectValue, {}) }),
6237
+ /* @__PURE__ */ jsxs22(SelectContent, { children: [
6238
+ /* @__PURE__ */ jsx31(SelectItem, { value: "__all__", children: "All" }),
6239
+ /* @__PURE__ */ jsx31(SelectItem, { value: "true", children: "Yes" }),
6240
+ /* @__PURE__ */ jsx31(SelectItem, { value: "false", children: "No" })
6183
6241
  ] })
6184
6242
  ]
6185
6243
  }
6186
6244
  )
6187
6245
  ] });
6188
6246
  }
6189
- return /* @__PURE__ */ jsx30(NumberFilterBody, { value, onChange });
6247
+ return /* @__PURE__ */ jsx31(NumberFilterBody, { value, onChange });
6190
6248
  }
6191
6249
  function SearchableSelectFilter({
6192
6250
  selected,
@@ -6194,7 +6252,7 @@ function SearchableSelectFilter({
6194
6252
  onChange,
6195
6253
  single = false
6196
6254
  }) {
6197
- const [query, setQuery] = useState13("");
6255
+ const [query, setQuery] = useState14("");
6198
6256
  const filtered = useMemo5(() => {
6199
6257
  const q = query.trim().toLowerCase();
6200
6258
  if (!q) return options;
@@ -6214,13 +6272,13 @@ function SearchableSelectFilter({
6214
6272
  next.length === 0 ? void 0 : { kind: "select", value: next[0] ?? "", values: next }
6215
6273
  );
6216
6274
  };
6217
- return /* @__PURE__ */ jsxs21("div", { className: "space-y-1 px-0", children: [
6218
- /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between px-1 pb-1", children: [
6219
- /* @__PURE__ */ jsxs21("p", { className: "text-[11px] font-medium uppercase tracking-wider text-muted-foreground", children: [
6275
+ return /* @__PURE__ */ jsxs22("div", { className: "space-y-1 px-0", children: [
6276
+ /* @__PURE__ */ jsxs22("div", { className: "flex items-center justify-between px-1 pb-1", children: [
6277
+ /* @__PURE__ */ jsxs22("p", { className: "text-[11px] font-medium uppercase tracking-wider text-muted-foreground", children: [
6220
6278
  "Filter",
6221
6279
  selected.length > 1 ? ` (any of ${selected.length})` : ""
6222
6280
  ] }),
6223
- selected.length > 0 ? /* @__PURE__ */ jsx30(
6281
+ selected.length > 0 ? /* @__PURE__ */ jsx31(
6224
6282
  "button",
6225
6283
  {
6226
6284
  type: "button",
@@ -6230,8 +6288,8 @@ function SearchableSelectFilter({
6230
6288
  }
6231
6289
  ) : null
6232
6290
  ] }),
6233
- /* @__PURE__ */ jsxs21(Command, { className: "rounded-md border border-border", shouldFilter: false, children: [
6234
- /* @__PURE__ */ jsx30(
6291
+ /* @__PURE__ */ jsxs22(Command, { className: "rounded-md border border-border", shouldFilter: false, children: [
6292
+ /* @__PURE__ */ jsx31(
6235
6293
  CommandInput,
6236
6294
  {
6237
6295
  "data-matrx-filter-autofocus": true,
@@ -6241,10 +6299,10 @@ function SearchableSelectFilter({
6241
6299
  className: "h-8 text-sm"
6242
6300
  }
6243
6301
  ),
6244
- /* @__PURE__ */ jsxs21(CommandList, { className: "max-h-48", children: [
6245
- /* @__PURE__ */ jsx30(CommandEmpty, { className: "py-3 text-xs text-muted-foreground", children: "No matches" }),
6246
- /* @__PURE__ */ jsxs21(CommandGroup, { children: [
6247
- /* @__PURE__ */ jsx30(
6302
+ /* @__PURE__ */ jsxs22(CommandList, { className: "max-h-48", children: [
6303
+ /* @__PURE__ */ jsx31(CommandEmpty, { className: "py-3 text-xs text-muted-foreground", children: "No matches" }),
6304
+ /* @__PURE__ */ jsxs22(CommandGroup, { children: [
6305
+ /* @__PURE__ */ jsx31(
6248
6306
  CommandItem,
6249
6307
  {
6250
6308
  value: "__all__",
@@ -6255,7 +6313,7 @@ function SearchableSelectFilter({
6255
6313
  ),
6256
6314
  filtered.map((o) => {
6257
6315
  const active = selected.includes(o.value);
6258
- return /* @__PURE__ */ jsxs21(
6316
+ return /* @__PURE__ */ jsxs22(
6259
6317
  CommandItem,
6260
6318
  {
6261
6319
  value: o.value,
@@ -6265,7 +6323,7 @@ function SearchableSelectFilter({
6265
6323
  active && "bg-accent text-accent-foreground"
6266
6324
  ),
6267
6325
  children: [
6268
- /* @__PURE__ */ jsx30(
6326
+ /* @__PURE__ */ jsx31(
6269
6327
  "span",
6270
6328
  {
6271
6329
  className: cn(
@@ -6273,7 +6331,7 @@ function SearchableSelectFilter({
6273
6331
  single ? "rounded-full" : "rounded-sm",
6274
6332
  active ? "border-primary bg-primary text-primary-foreground" : "border-muted-foreground/40"
6275
6333
  ),
6276
- children: active && /* @__PURE__ */ jsx30(Check, { className: "h-2.5 w-2.5" })
6334
+ children: active && /* @__PURE__ */ jsx31(Check, { className: "h-2.5 w-2.5" })
6277
6335
  }
6278
6336
  ),
6279
6337
  o.label
@@ -6293,8 +6351,8 @@ function NumberFilterBody({
6293
6351
  }) {
6294
6352
  const min = value?.kind === "number" ? value.min : void 0;
6295
6353
  const max = value?.kind === "number" ? value.max : void 0;
6296
- const [minText, setMinText] = useState13(min !== void 0 ? String(min) : "");
6297
- const [maxText, setMaxText] = useState13(max !== void 0 ? String(max) : "");
6354
+ const [minText, setMinText] = useState14(min !== void 0 ? String(min) : "");
6355
+ const [maxText, setMaxText] = useState14(max !== void 0 ? String(max) : "");
6298
6356
  const commit = (raw, which) => {
6299
6357
  const nextMin = which === "min" ? parseOptionalNumber(raw) : min;
6300
6358
  const nextMax = which === "max" ? parseOptionalNumber(raw) : max;
@@ -6304,10 +6362,10 @@ function NumberFilterBody({
6304
6362
  }
6305
6363
  onChange({ kind: "number", min: nextMin, max: nextMax });
6306
6364
  };
6307
- return /* @__PURE__ */ jsxs21("div", { className: "space-y-1.5 px-1", children: [
6308
- /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between", children: [
6309
- /* @__PURE__ */ jsx30("p", { className: "text-[11px] font-medium uppercase tracking-wider text-muted-foreground", children: "Range" }),
6310
- (min !== void 0 || max !== void 0) && /* @__PURE__ */ jsx30(
6365
+ return /* @__PURE__ */ jsxs22("div", { className: "space-y-1.5 px-1", children: [
6366
+ /* @__PURE__ */ jsxs22("div", { className: "flex items-center justify-between", children: [
6367
+ /* @__PURE__ */ jsx31("p", { className: "text-[11px] font-medium uppercase tracking-wider text-muted-foreground", children: "Range" }),
6368
+ (min !== void 0 || max !== void 0) && /* @__PURE__ */ jsx31(
6311
6369
  "button",
6312
6370
  {
6313
6371
  type: "button",
@@ -6321,8 +6379,8 @@ function NumberFilterBody({
6321
6379
  }
6322
6380
  )
6323
6381
  ] }),
6324
- /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-1.5", children: [
6325
- /* @__PURE__ */ jsx30(
6382
+ /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-1.5", children: [
6383
+ /* @__PURE__ */ jsx31(
6326
6384
  Input,
6327
6385
  {
6328
6386
  "data-matrx-filter-autofocus": true,
@@ -6337,8 +6395,8 @@ function NumberFilterBody({
6337
6395
  style: { fontSize: "16px" }
6338
6396
  }
6339
6397
  ),
6340
- /* @__PURE__ */ jsx30("span", { className: "text-xs text-muted-foreground", children: "\u2013" }),
6341
- /* @__PURE__ */ jsx30(
6398
+ /* @__PURE__ */ jsx31("span", { className: "text-xs text-muted-foreground", children: "\u2013" }),
6399
+ /* @__PURE__ */ jsx31(
6342
6400
  Input,
6343
6401
  {
6344
6402
  value: maxText,
@@ -6364,9 +6422,9 @@ function parseOptionalNumber(raw) {
6364
6422
  // src/data-table/ColumnResizeHandle.tsx
6365
6423
  import {
6366
6424
  useCallback as useCallback5,
6367
- useEffect as useEffect9,
6368
- useRef as useRef9,
6369
- useState as useState14
6425
+ useEffect as useEffect10,
6426
+ useRef as useRef10,
6427
+ useState as useState15
6370
6428
  } from "react";
6371
6429
 
6372
6430
  // src/data-table/column-resize.ts
@@ -6395,7 +6453,7 @@ function normalizeColumnWidthMap(widths, knownColumnIds) {
6395
6453
  }
6396
6454
 
6397
6455
  // src/data-table/ColumnResizeHandle.tsx
6398
- import { jsx as jsx31 } from "react/jsx-runtime";
6456
+ import { jsx as jsx32 } from "react/jsx-runtime";
6399
6457
  var KEYBOARD_STEP = 8;
6400
6458
  var KEYBOARD_LARGE_STEP = 24;
6401
6459
  function ColumnResizeHandle({
@@ -6409,12 +6467,12 @@ function ColumnResizeHandle({
6409
6467
  onResizeCancel,
6410
6468
  onResizeCommit
6411
6469
  }) {
6412
- const handleRef = useRef9(null);
6413
- const activeResizeRef = useRef9(null);
6414
- const previewRafRef = useRef9(null);
6415
- const queuedWidthRef = useRef9(null);
6416
- const keyboardWidthRef = useRef9(null);
6417
- const [announcedWidth, setAnnouncedWidth] = useState14(null);
6470
+ const handleRef = useRef10(null);
6471
+ const activeResizeRef = useRef10(null);
6472
+ const previewRafRef = useRef10(null);
6473
+ const queuedWidthRef = useRef10(null);
6474
+ const keyboardWidthRef = useRef10(null);
6475
+ const [announcedWidth, setAnnouncedWidth] = useState15(null);
6418
6476
  const bounds = resolveColumnResizeBounds(minWidth, maxWidth);
6419
6477
  const cssVar = columnResizeCssVar(columnId2);
6420
6478
  const readWidth = useCallback5(() => {
@@ -6461,7 +6519,7 @@ function ColumnResizeHandle({
6461
6519
  handleRef.current.releasePointerCapture(active.pointerId);
6462
6520
  }
6463
6521
  }, [clearQueuedPreview, columnId2, cssVar, onResizeCancel, onResizeCommit, tableRef, writePreview]);
6464
- useEffect9(() => () => clearQueuedPreview(), [clearQueuedPreview]);
6522
+ useEffect10(() => () => clearQueuedPreview(), [clearQueuedPreview]);
6465
6523
  const onPointerDown = (event) => {
6466
6524
  if (disabled || event.button !== 0 || !event.isPrimary) return;
6467
6525
  event.preventDefault();
@@ -6514,7 +6572,7 @@ function ColumnResizeHandle({
6514
6572
  onResizeCommit(columnId2, nextWidth);
6515
6573
  };
6516
6574
  const currentWidth = announcedWidth ?? keyboardWidthRef.current ?? bounds.minWidth;
6517
- return /* @__PURE__ */ jsx31(
6575
+ return /* @__PURE__ */ jsx32(
6518
6576
  "button",
6519
6577
  {
6520
6578
  ref: handleRef,
@@ -6616,9 +6674,9 @@ function rankTableSearchRows(rows, columns, query, options = {}, extraText) {
6616
6674
  }
6617
6675
 
6618
6676
  // src/data-table/ColumnManager.tsx
6619
- import { useEffect as useEffect10, useMemo as useMemo6, useState as useState15 } from "react";
6677
+ import { useEffect as useEffect11, useMemo as useMemo6, useState as useState16 } from "react";
6620
6678
  import { useDndMonitor, useDraggable as useDraggable2, useDroppable } from "@dnd-kit/core";
6621
- import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
6679
+ import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
6622
6680
  function ColumnManager({
6623
6681
  open,
6624
6682
  onOpenChange,
@@ -6631,11 +6689,11 @@ function ColumnManager({
6631
6689
  () => new Map(columns.map((column) => [columnId(column), column])),
6632
6690
  [columns]
6633
6691
  );
6634
- const [draftOrder, setDraftOrder] = useState15(order);
6635
- const [draftHidden, setDraftHidden] = useState15(() => new Set(hidden));
6636
- const [draggedColumnId, setDraggedColumnId] = useState15(null);
6637
- const [dropTarget, setDropTarget] = useState15(null);
6638
- useEffect10(() => {
6692
+ const [draftOrder, setDraftOrder] = useState16(order);
6693
+ const [draftHidden, setDraftHidden] = useState16(() => new Set(hidden));
6694
+ const [draggedColumnId, setDraggedColumnId] = useState16(null);
6695
+ const [dropTarget, setDropTarget] = useState16(null);
6696
+ useEffect11(() => {
6639
6697
  if (!open) return;
6640
6698
  setDraftOrder(order);
6641
6699
  setDraftHidden(new Set(hidden));
@@ -6692,18 +6750,18 @@ function ColumnManager({
6692
6750
  if (target) moveTo(dragged, String(target));
6693
6751
  }
6694
6752
  });
6695
- return /* @__PURE__ */ jsx32(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs22(DialogContent, { className: "max-w-md", children: [
6696
- /* @__PURE__ */ jsxs22(DialogHeader, { children: [
6697
- /* @__PURE__ */ jsx32(DialogTitle, { children: "Columns" }),
6698
- /* @__PURE__ */ jsx32(DialogDescription, { children: "Choose the columns to show and set their order." })
6753
+ return /* @__PURE__ */ jsx33(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs23(DialogContent, { className: "max-w-md", children: [
6754
+ /* @__PURE__ */ jsxs23(DialogHeader, { children: [
6755
+ /* @__PURE__ */ jsx33(DialogTitle, { children: "Columns" }),
6756
+ /* @__PURE__ */ jsx33(DialogDescription, { children: "Choose the columns to show and set their order." })
6699
6757
  ] }),
6700
- /* @__PURE__ */ jsx32("div", { className: "max-h-[55dvh] divide-y overflow-y-auto rounded-md border", children: draftOrder.map((id, index) => {
6758
+ /* @__PURE__ */ jsx33("div", { className: "max-h-[55dvh] divide-y overflow-y-auto rounded-md border", children: draftOrder.map((id, index) => {
6701
6759
  const column = byId.get(id);
6702
6760
  if (!column) return null;
6703
6761
  const label = typeof column.header === "string" ? column.header : id;
6704
6762
  const hideable = column.hideable !== false;
6705
6763
  const visible = !draftHidden.has(id);
6706
- return /* @__PURE__ */ jsxs22(
6764
+ return /* @__PURE__ */ jsxs23(
6707
6765
  ColumnManagerDropTarget,
6708
6766
  {
6709
6767
  id,
@@ -6713,8 +6771,8 @@ function ColumnManager({
6713
6771
  dropTarget === id && draggedColumnId !== id && "border-t-2 border-primary"
6714
6772
  ),
6715
6773
  children: [
6716
- /* @__PURE__ */ jsx32(ColumnManagerDragHandle, { id, label }),
6717
- /* @__PURE__ */ jsx32(
6774
+ /* @__PURE__ */ jsx33(ColumnManagerDragHandle, { id, label }),
6775
+ /* @__PURE__ */ jsx33(
6718
6776
  Checkbox,
6719
6777
  {
6720
6778
  checked: visible,
@@ -6731,8 +6789,8 @@ function ColumnManager({
6731
6789
  }
6732
6790
  }
6733
6791
  ),
6734
- /* @__PURE__ */ jsx32("span", { className: "min-w-0 flex-1 truncate text-sm", children: label }),
6735
- /* @__PURE__ */ jsx32(
6792
+ /* @__PURE__ */ jsx33("span", { className: "min-w-0 flex-1 truncate text-sm", children: label }),
6793
+ /* @__PURE__ */ jsx33(
6736
6794
  Button,
6737
6795
  {
6738
6796
  type: "button",
@@ -6742,10 +6800,10 @@ function ColumnManager({
6742
6800
  "aria-label": `Move ${label} earlier`,
6743
6801
  disabled: index === 0,
6744
6802
  onClick: () => move(id, -1),
6745
- children: /* @__PURE__ */ jsx32(ArrowUp, { className: "h-4 w-4" })
6803
+ children: /* @__PURE__ */ jsx33(ArrowUp, { className: "h-4 w-4" })
6746
6804
  }
6747
6805
  ),
6748
- /* @__PURE__ */ jsx32(
6806
+ /* @__PURE__ */ jsx33(
6749
6807
  Button,
6750
6808
  {
6751
6809
  type: "button",
@@ -6755,7 +6813,7 @@ function ColumnManager({
6755
6813
  "aria-label": `Move ${label} later`,
6756
6814
  disabled: index === draftOrder.length - 1,
6757
6815
  onClick: () => move(id, 1),
6758
- children: /* @__PURE__ */ jsx32(ArrowDown, { className: "h-4 w-4" })
6816
+ children: /* @__PURE__ */ jsx33(ArrowDown, { className: "h-4 w-4" })
6759
6817
  }
6760
6818
  )
6761
6819
  ]
@@ -6763,9 +6821,9 @@ function ColumnManager({
6763
6821
  id
6764
6822
  );
6765
6823
  }) }),
6766
- /* @__PURE__ */ jsxs22(DialogFooter, { children: [
6767
- /* @__PURE__ */ jsx32(Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), children: "Cancel" }),
6768
- /* @__PURE__ */ jsx32(
6824
+ /* @__PURE__ */ jsxs23(DialogFooter, { children: [
6825
+ /* @__PURE__ */ jsx33(Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), children: "Cancel" }),
6826
+ /* @__PURE__ */ jsx33(
6769
6827
  Button,
6770
6828
  {
6771
6829
  type: "button",
@@ -6788,14 +6846,14 @@ function ColumnManagerDropTarget({
6788
6846
  id: `matrx-column-manager:${id}`,
6789
6847
  data: { matrxDragKind: "column-manager", columnId: id }
6790
6848
  });
6791
- return /* @__PURE__ */ jsx32("div", { ref: setNodeRef, "data-matrx-column-manager-drop-target": id, className, children });
6849
+ return /* @__PURE__ */ jsx33("div", { ref: setNodeRef, "data-matrx-column-manager-drop-target": id, className, children });
6792
6850
  }
6793
6851
  function ColumnManagerDragHandle({ id, label }) {
6794
6852
  const { attributes, listeners, setNodeRef } = useDraggable2({
6795
6853
  id: `matrx-column-manager:${id}`,
6796
6854
  data: { matrxDragKind: "column-manager", columnId: id }
6797
6855
  });
6798
- return /* @__PURE__ */ jsx32(
6856
+ return /* @__PURE__ */ jsx33(
6799
6857
  "button",
6800
6858
  {
6801
6859
  ref: setNodeRef,
@@ -6805,7 +6863,7 @@ function ColumnManagerDragHandle({ id, label }) {
6805
6863
  title: `Drag to reorder ${label}`,
6806
6864
  ...attributes,
6807
6865
  ...listeners,
6808
- children: /* @__PURE__ */ jsx32(GripVertical, { className: "h-4 w-4" })
6866
+ children: /* @__PURE__ */ jsx33(GripVertical, { className: "h-4 w-4" })
6809
6867
  }
6810
6868
  );
6811
6869
  }
@@ -6869,11 +6927,11 @@ function parseTableViewSnapshot(raw) {
6869
6927
 
6870
6928
  // src/data-table/MatrxUuidCell.tsx
6871
6929
  import {
6872
- useEffect as useEffect11,
6873
- useRef as useRef10,
6874
- useState as useState16
6930
+ useEffect as useEffect12,
6931
+ useRef as useRef11,
6932
+ useState as useState17
6875
6933
  } from "react";
6876
- import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
6934
+ import { jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
6877
6935
  var SHORT_LEN = 8;
6878
6936
  function shortUuid(id, len = SHORT_LEN) {
6879
6937
  return id.slice(0, len);
@@ -6912,18 +6970,18 @@ function MatrxUuidCell({
6912
6970
  }) {
6913
6971
  const { resolveEntityDoors, ResourcePeek } = useMatrxDataTableHost();
6914
6972
  const { notify, notice } = useTableNotice();
6915
- const [copied, setCopied] = useState16(false);
6916
- const [opening, setOpening] = useState16(false);
6917
- const [peekOpen, setPeekOpen] = useState16(false);
6918
- const timer = useRef10(null);
6919
- useEffect11(
6973
+ const [copied, setCopied] = useState17(false);
6974
+ const [opening, setOpening] = useState17(false);
6975
+ const [peekOpen, setPeekOpen] = useState17(false);
6976
+ const timer = useRef11(null);
6977
+ useEffect12(
6920
6978
  () => () => {
6921
6979
  if (timer.current) clearTimeout(timer.current);
6922
6980
  },
6923
6981
  []
6924
6982
  );
6925
6983
  if (!value) {
6926
- return /* @__PURE__ */ jsx33("span", { className: "text-muted-foreground/40", children: "\u2014" });
6984
+ return /* @__PURE__ */ jsx34("span", { className: "text-muted-foreground/40", children: "\u2014" });
6927
6985
  }
6928
6986
  const doors = token ? resolveEntityDoors?.(token, value, href) ?? null : null;
6929
6987
  const resolvedHref = doors?.href ?? href ?? null;
@@ -6966,13 +7024,13 @@ function MatrxUuidCell({
6966
7024
  };
6967
7025
  const idNode = (() => {
6968
7026
  if (forbidden) {
6969
- return /* @__PURE__ */ jsxs23("span", { className: "inline-flex min-w-0 items-center gap-1 font-mono text-xs text-muted-foreground/70 tabular-nums", children: [
6970
- /* @__PURE__ */ jsx33("span", { className: "min-w-0 truncate", children: display }),
6971
- /* @__PURE__ */ jsx33(ShieldOff, { className: "h-3 w-3 shrink-0 opacity-60", "aria-hidden": true })
7027
+ return /* @__PURE__ */ jsxs24("span", { className: "inline-flex min-w-0 items-center gap-1 font-mono text-xs text-muted-foreground/70 tabular-nums", children: [
7028
+ /* @__PURE__ */ jsx34("span", { className: "min-w-0 truncate", children: display }),
7029
+ /* @__PURE__ */ jsx34(ShieldOff, { className: "h-3 w-3 shrink-0 opacity-60", "aria-hidden": true })
6972
7030
  ] });
6973
7031
  }
6974
7032
  if (onOpen) {
6975
- return /* @__PURE__ */ jsxs23(
7033
+ return /* @__PURE__ */ jsxs24(
6976
7034
  "button",
6977
7035
  {
6978
7036
  type: "button",
@@ -6981,14 +7039,14 @@ function MatrxUuidCell({
6981
7039
  disabled: opening,
6982
7040
  className: "inline-flex min-w-0 items-center gap-1 font-mono text-xs text-sky-600 hover:underline dark:text-sky-400 disabled:opacity-60",
6983
7041
  children: [
6984
- /* @__PURE__ */ jsx33("span", { className: "min-w-0 truncate tabular-nums", children: display }),
6985
- /* @__PURE__ */ jsx33(PanelRight, { className: "h-3 w-3 shrink-0 opacity-50" })
7042
+ /* @__PURE__ */ jsx34("span", { className: "min-w-0 truncate tabular-nums", children: display }),
7043
+ /* @__PURE__ */ jsx34(PanelRight, { className: "h-3 w-3 shrink-0 opacity-50" })
6986
7044
  ]
6987
7045
  }
6988
7046
  );
6989
7047
  }
6990
7048
  if (resolvedHref) {
6991
- return /* @__PURE__ */ jsxs23(
7049
+ return /* @__PURE__ */ jsxs24(
6992
7050
  "a",
6993
7051
  {
6994
7052
  href: resolvedHref,
@@ -6998,15 +7056,15 @@ function MatrxUuidCell({
6998
7056
  onClick: stop,
6999
7057
  className: "inline-flex min-w-0 items-center gap-1 font-mono text-xs text-sky-600 hover:underline dark:text-sky-400",
7000
7058
  children: [
7001
- /* @__PURE__ */ jsx33("span", { className: "min-w-0 truncate tabular-nums", children: display }),
7002
- /* @__PURE__ */ jsx33(ExternalLink, { className: "h-3 w-3 shrink-0 opacity-50" })
7059
+ /* @__PURE__ */ jsx34("span", { className: "min-w-0 truncate tabular-nums", children: display }),
7060
+ /* @__PURE__ */ jsx34(ExternalLink, { className: "h-3 w-3 shrink-0 opacity-50" })
7003
7061
  ]
7004
7062
  }
7005
7063
  );
7006
7064
  }
7007
- return /* @__PURE__ */ jsx33("span", { className: "min-w-0 truncate font-mono text-xs text-muted-foreground tabular-nums select-all", children: display });
7065
+ return /* @__PURE__ */ jsx34("span", { className: "min-w-0 truncate font-mono text-xs text-muted-foreground tabular-nums select-all", children: display });
7008
7066
  })();
7009
- return /* @__PURE__ */ jsx33(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs23(
7067
+ return /* @__PURE__ */ jsx34(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs24(
7010
7068
  "span",
7011
7069
  {
7012
7070
  "data-matrx-cell-control": true,
@@ -7016,12 +7074,12 @@ function MatrxUuidCell({
7016
7074
  ),
7017
7075
  onClick: stop,
7018
7076
  children: [
7019
- /* @__PURE__ */ jsxs23(Tooltip, { children: [
7020
- /* @__PURE__ */ jsx33(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx33("span", { className: "inline-flex min-w-0 max-w-full items-center", children: idNode }) }),
7021
- /* @__PURE__ */ jsx33(TooltipContent, { side: "top", className: "max-w-sm break-all font-mono", children: forbidden ? `No access \xB7 ${tip}` : tip })
7077
+ /* @__PURE__ */ jsxs24(Tooltip, { children: [
7078
+ /* @__PURE__ */ jsx34(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx34("span", { className: "inline-flex min-w-0 max-w-full items-center", children: idNode }) }),
7079
+ /* @__PURE__ */ jsx34(TooltipContent, { side: "top", className: "max-w-sm break-all font-mono", children: forbidden ? `No access \xB7 ${tip}` : tip })
7022
7080
  ] }),
7023
- /* @__PURE__ */ jsxs23(Tooltip, { children: [
7024
- /* @__PURE__ */ jsx33(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx33(
7081
+ /* @__PURE__ */ jsxs24(Tooltip, { children: [
7082
+ /* @__PURE__ */ jsx34(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx34(
7025
7083
  "button",
7026
7084
  {
7027
7085
  type: "button",
@@ -7031,13 +7089,13 @@ function MatrxUuidCell({
7031
7089
  "inline-flex h-4 w-4 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground focus:outline-none",
7032
7090
  copied && "text-primary"
7033
7091
  ),
7034
- children: copied ? /* @__PURE__ */ jsx33(Check, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx33(Copy, { className: "h-3 w-3" })
7092
+ children: copied ? /* @__PURE__ */ jsx34(Check, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx34(Copy, { className: "h-3 w-3" })
7035
7093
  }
7036
7094
  ) }),
7037
- /* @__PURE__ */ jsx33(TooltipContent, { side: "top", children: copied ? "Copied" : `Copy ${label ?? "id"}: ${value}` })
7095
+ /* @__PURE__ */ jsx34(TooltipContent, { side: "top", children: copied ? "Copied" : `Copy ${label ?? "id"}: ${value}` })
7038
7096
  ] }),
7039
- canPeek ? /* @__PURE__ */ jsxs23(Tooltip, { children: [
7040
- /* @__PURE__ */ jsx33(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx33(
7097
+ canPeek ? /* @__PURE__ */ jsxs24(Tooltip, { children: [
7098
+ /* @__PURE__ */ jsx34(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx34(
7041
7099
  "button",
7042
7100
  {
7043
7101
  type: "button",
@@ -7047,16 +7105,16 @@ function MatrxUuidCell({
7047
7105
  },
7048
7106
  "aria-label": `Quick look at ${label ?? "record"}`,
7049
7107
  className: "inline-flex h-4 w-4 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground focus:outline-none",
7050
- children: /* @__PURE__ */ jsx33(Lightbulb, { className: "h-3 w-3" })
7108
+ children: /* @__PURE__ */ jsx34(Lightbulb, { className: "h-3 w-3" })
7051
7109
  }
7052
7110
  ) }),
7053
- /* @__PURE__ */ jsxs23(TooltipContent, { side: "top", children: [
7111
+ /* @__PURE__ */ jsxs24(TooltipContent, { side: "top", children: [
7054
7112
  "Quick look at ",
7055
7113
  label ?? "record"
7056
7114
  ] })
7057
7115
  ] }) : null,
7058
- onOpen && resolvedHref && !forbidden ? /* @__PURE__ */ jsxs23(Tooltip, { children: [
7059
- /* @__PURE__ */ jsx33(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx33(
7116
+ onOpen && resolvedHref && !forbidden ? /* @__PURE__ */ jsxs24(Tooltip, { children: [
7117
+ /* @__PURE__ */ jsx34(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx34(
7060
7118
  "a",
7061
7119
  {
7062
7120
  href: resolvedHref,
@@ -7065,10 +7123,10 @@ function MatrxUuidCell({
7065
7123
  onClick: stop,
7066
7124
  "aria-label": `Open ${label ?? "record"} in a new tab`,
7067
7125
  className: "inline-flex h-4 w-4 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground focus:outline-none",
7068
- children: /* @__PURE__ */ jsx33(ExternalLink, { className: "h-3 w-3" })
7126
+ children: /* @__PURE__ */ jsx34(ExternalLink, { className: "h-3 w-3" })
7069
7127
  }
7070
7128
  ) }),
7071
- /* @__PURE__ */ jsxs23(TooltipContent, { side: "top", children: [
7129
+ /* @__PURE__ */ jsxs24(TooltipContent, { side: "top", children: [
7072
7130
  "Open ",
7073
7131
  label ?? "record",
7074
7132
  " in a new tab"
@@ -7076,7 +7134,7 @@ function MatrxUuidCell({
7076
7134
  ] }) : null,
7077
7135
  trailing,
7078
7136
  notice,
7079
- canPeek && peekOpen && ResourcePeek ? /* @__PURE__ */ jsx33(
7137
+ canPeek && peekOpen && ResourcePeek ? /* @__PURE__ */ jsx34(
7080
7138
  ResourcePeek,
7081
7139
  {
7082
7140
  kind: doors?.peekKind ?? token ?? "record",
@@ -7110,7 +7168,7 @@ function formatTableDisplayValue(value) {
7110
7168
  }
7111
7169
 
7112
7170
  // src/data-table/DataRowInspector.tsx
7113
- import { jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
7171
+ import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
7114
7172
  var noFieldToken = () => null;
7115
7173
  function formatValue(value) {
7116
7174
  if (value == null) return "\u2014";
@@ -7139,7 +7197,7 @@ function DataRowInspector({
7139
7197
  tokenForField = noFieldToken
7140
7198
  }) {
7141
7199
  const entries = isPlainObject(row) ? Object.entries(row) : [["value", row]];
7142
- const fieldButtons = (key, value) => fieldCopy ? /* @__PURE__ */ jsx34("div", { className: "absolute right-1 top-1 opacity-0 transition-opacity focus-within:opacity-100 group-hover/field:opacity-100", children: /* @__PURE__ */ jsx34(
7200
+ const fieldButtons = (key, value) => fieldCopy ? /* @__PURE__ */ jsx35("div", { className: "absolute right-1 top-1 opacity-0 transition-opacity focus-within:opacity-100 group-hover/field:opacity-100", children: /* @__PURE__ */ jsx35(
7143
7201
  CopyButtons,
7144
7202
  {
7145
7203
  size: "xs",
@@ -7154,21 +7212,21 @@ function DataRowInspector({
7154
7212
  })
7155
7213
  }
7156
7214
  ) }) : null;
7157
- return /* @__PURE__ */ jsxs24(
7215
+ return /* @__PURE__ */ jsxs25(
7158
7216
  "div",
7159
7217
  {
7160
7218
  className: cn("flex h-full min-h-0 flex-col overflow-hidden", className),
7161
7219
  children: [
7162
- title ? /* @__PURE__ */ jsx34("div", { className: "shrink-0 border-b border-border px-3 py-2 text-sm font-medium", children: title }) : null,
7163
- /* @__PURE__ */ jsx34("div", { className: "min-h-0 flex-1 overflow-auto p-3", children: /* @__PURE__ */ jsx34("dl", { className: "space-y-2", children: entries.map(([key, value]) => {
7220
+ title ? /* @__PURE__ */ jsx35("div", { className: "shrink-0 border-b border-border px-3 py-2 text-sm font-medium", children: title }) : null,
7221
+ /* @__PURE__ */ jsx35("div", { className: "min-h-0 flex-1 overflow-auto p-3", children: /* @__PURE__ */ jsx35("dl", { className: "space-y-2", children: entries.map(([key, value]) => {
7164
7222
  if (isUuidValue(value)) {
7165
- return /* @__PURE__ */ jsxs24(
7223
+ return /* @__PURE__ */ jsxs25(
7166
7224
  "div",
7167
7225
  {
7168
7226
  className: "group/field relative grid grid-cols-[minmax(7rem,9rem)_1fr] gap-2 rounded-md border border-border/60 bg-muted/20 px-2.5 py-2",
7169
7227
  children: [
7170
- /* @__PURE__ */ jsx34("dt", { className: "truncate text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: key }),
7171
- /* @__PURE__ */ jsx34("dd", { className: "min-w-0", children: /* @__PURE__ */ jsx34(
7228
+ /* @__PURE__ */ jsx35("dt", { className: "truncate text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: key }),
7229
+ /* @__PURE__ */ jsx35("dd", { className: "min-w-0", children: /* @__PURE__ */ jsx35(
7172
7230
  MatrxUuidCell,
7173
7231
  {
7174
7232
  value,
@@ -7183,13 +7241,13 @@ function DataRowInspector({
7183
7241
  }
7184
7242
  const formatted = value !== null && typeof value === "object" && !(value instanceof Date) ? formatValue(value) : formatTableDisplayValue(value);
7185
7243
  const multiline = formatted.includes("\n") || formatted.length > 80;
7186
- return /* @__PURE__ */ jsxs24(
7244
+ return /* @__PURE__ */ jsxs25(
7187
7245
  "div",
7188
7246
  {
7189
7247
  className: "group/field relative grid grid-cols-[minmax(7rem,9rem)_1fr] gap-2 rounded-md border border-border/60 bg-muted/20 py-2 pl-2.5 pr-12",
7190
7248
  children: [
7191
- /* @__PURE__ */ jsx34("dt", { className: "truncate text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: key }),
7192
- /* @__PURE__ */ jsx34(
7249
+ /* @__PURE__ */ jsx35("dt", { className: "truncate text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: key }),
7250
+ /* @__PURE__ */ jsx35(
7193
7251
  "dd",
7194
7252
  {
7195
7253
  className: cn(
@@ -7211,8 +7269,8 @@ function DataRowInspector({
7211
7269
  }
7212
7270
 
7213
7271
  // src/data-table/DataRowWindow.tsx
7214
- import { useEffect as useEffect12, useState as useState17 } from "react";
7215
- import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
7272
+ import { useEffect as useEffect13, useState as useState18 } from "react";
7273
+ import { jsx as jsx36, jsxs as jsxs26 } from "react/jsx-runtime";
7216
7274
  function DataRowWindow({
7217
7275
  isOpen,
7218
7276
  onClose,
@@ -7232,15 +7290,15 @@ function DataRowWindow({
7232
7290
  const hasEdit = editContent != null;
7233
7291
  const hasTabs = hasEdit && children == null;
7234
7292
  const initialTab = defaultTab ?? (hasEdit ? "edit" : "view");
7235
- const [tab, setTab] = useState17(initialTab);
7236
- useEffect12(() => {
7293
+ const [tab, setTab] = useState18(initialTab);
7294
+ useEffect13(() => {
7237
7295
  if (!isOpen) return;
7238
7296
  setTab(defaultTab ?? (hasEdit ? "edit" : "view"));
7239
7297
  }, [isOpen, windowId, hasEdit, defaultTab]);
7240
7298
  if (!isOpen) return null;
7241
- const viewBody = viewContent ?? /* @__PURE__ */ jsx35(DataRowInspector, { row });
7242
- const body = children ?? /* @__PURE__ */ jsx35("div", { className: "flex h-full min-h-0 flex-1 flex-col overflow-hidden", children: hasTabs ? tab === "edit" ? /* @__PURE__ */ jsx35("div", { className: "min-h-0 flex-1 overflow-y-auto", children: editContent }) : /* @__PURE__ */ jsx35("div", { className: "min-h-0 flex-1 overflow-y-auto", children: viewBody }) : /* @__PURE__ */ jsx35("div", { className: "min-h-0 flex-1 overflow-y-auto", children: viewBody }) });
7243
- return /* @__PURE__ */ jsx35(
7299
+ const viewBody = viewContent ?? /* @__PURE__ */ jsx36(DataRowInspector, { row });
7300
+ const body = children ?? /* @__PURE__ */ jsx36("div", { className: "flex h-full min-h-0 flex-1 flex-col overflow-hidden", children: hasTabs ? tab === "edit" ? /* @__PURE__ */ jsx36("div", { className: "min-h-0 flex-1 overflow-y-auto", children: editContent }) : /* @__PURE__ */ jsx36("div", { className: "min-h-0 flex-1 overflow-y-auto", children: viewBody }) : /* @__PURE__ */ jsx36("div", { className: "min-h-0 flex-1 overflow-y-auto", children: viewBody }) });
7301
+ return /* @__PURE__ */ jsx36(
7244
7302
  WindowPanel,
7245
7303
  {
7246
7304
  id: windowId,
@@ -7254,26 +7312,26 @@ function DataRowWindow({
7254
7312
  bodyClassName: "flex min-h-0 flex-1 flex-col overflow-hidden p-0",
7255
7313
  sidebarDefaultSize: 140,
7256
7314
  sidebarMinSize: 110,
7257
- sidebar: hasTabs ? /* @__PURE__ */ jsxs25(
7315
+ sidebar: hasTabs ? /* @__PURE__ */ jsxs26(
7258
7316
  "nav",
7259
7317
  {
7260
7318
  "aria-label": "Row window tabs",
7261
7319
  className: "flex h-full flex-col gap-0.5 overflow-y-auto p-1.5",
7262
7320
  children: [
7263
- /* @__PURE__ */ jsx35(
7321
+ /* @__PURE__ */ jsx36(
7264
7322
  TabButton,
7265
7323
  {
7266
7324
  active: tab === "view",
7267
- icon: /* @__PURE__ */ jsx35(Eye, { className: "h-4 w-4 shrink-0" }),
7325
+ icon: /* @__PURE__ */ jsx36(Eye, { className: "h-4 w-4 shrink-0" }),
7268
7326
  label: "View",
7269
7327
  onClick: () => setTab("view")
7270
7328
  }
7271
7329
  ),
7272
- /* @__PURE__ */ jsx35(
7330
+ /* @__PURE__ */ jsx36(
7273
7331
  TabButton,
7274
7332
  {
7275
7333
  active: tab === "edit",
7276
- icon: /* @__PURE__ */ jsx35(Pencil, { className: "h-4 w-4 shrink-0" }),
7334
+ icon: /* @__PURE__ */ jsx36(Pencil, { className: "h-4 w-4 shrink-0" }),
7277
7335
  label: "Edit",
7278
7336
  onClick: () => setTab("edit")
7279
7337
  }
@@ -7291,7 +7349,7 @@ function TabButton({
7291
7349
  label,
7292
7350
  onClick
7293
7351
  }) {
7294
- return /* @__PURE__ */ jsxs25(
7352
+ return /* @__PURE__ */ jsxs26(
7295
7353
  "button",
7296
7354
  {
7297
7355
  type: "button",
@@ -7304,7 +7362,7 @@ function TabButton({
7304
7362
  ),
7305
7363
  children: [
7306
7364
  icon,
7307
- /* @__PURE__ */ jsx35("span", { className: "min-w-0 flex-1 truncate", children: label })
7365
+ /* @__PURE__ */ jsx36("span", { className: "min-w-0 flex-1 truncate", children: label })
7308
7366
  ]
7309
7367
  }
7310
7368
  );
@@ -7327,7 +7385,7 @@ function defaultRowTitle(row, columns) {
7327
7385
  }
7328
7386
 
7329
7387
  // src/data-table/DirtySavePill.tsx
7330
- import { jsx as jsx36, jsxs as jsxs26 } from "react/jsx-runtime";
7388
+ import { jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
7331
7389
  function DirtySavePill({
7332
7390
  changeCount,
7333
7391
  saving,
@@ -7336,20 +7394,20 @@ function DirtySavePill({
7336
7394
  className
7337
7395
  }) {
7338
7396
  if (changeCount <= 0) return null;
7339
- return /* @__PURE__ */ jsx36(
7397
+ return /* @__PURE__ */ jsx37(
7340
7398
  "div",
7341
7399
  {
7342
7400
  className: cn(
7343
7401
  "pointer-events-none fixed inset-x-0 bottom-6 z-50 flex justify-center pb-safe",
7344
7402
  className
7345
7403
  ),
7346
- children: /* @__PURE__ */ jsxs26("div", { className: "pointer-events-auto flex items-center gap-2 rounded-full border border-border bg-card px-3 py-1.5 shadow-lg elevation-2", children: [
7347
- /* @__PURE__ */ jsxs26("span", { className: "px-1 text-xs font-medium text-muted-foreground", children: [
7404
+ children: /* @__PURE__ */ jsxs27("div", { className: "pointer-events-auto flex items-center gap-2 rounded-full border border-border bg-card px-3 py-1.5 shadow-lg elevation-2", children: [
7405
+ /* @__PURE__ */ jsxs27("span", { className: "px-1 text-xs font-medium text-muted-foreground", children: [
7348
7406
  changeCount,
7349
7407
  " unsaved change",
7350
7408
  changeCount === 1 ? "" : "s"
7351
7409
  ] }),
7352
- /* @__PURE__ */ jsxs26(
7410
+ /* @__PURE__ */ jsxs27(
7353
7411
  Button,
7354
7412
  {
7355
7413
  type: "button",
@@ -7359,12 +7417,12 @@ function DirtySavePill({
7359
7417
  disabled: saving,
7360
7418
  onClick: onCancel,
7361
7419
  children: [
7362
- /* @__PURE__ */ jsx36(X, { className: "h-3.5 w-3.5" }),
7420
+ /* @__PURE__ */ jsx37(X, { className: "h-3.5 w-3.5" }),
7363
7421
  "Cancel"
7364
7422
  ]
7365
7423
  }
7366
7424
  ),
7367
- /* @__PURE__ */ jsxs26(
7425
+ /* @__PURE__ */ jsxs27(
7368
7426
  Button,
7369
7427
  {
7370
7428
  type: "button",
@@ -7373,7 +7431,7 @@ function DirtySavePill({
7373
7431
  disabled: saving,
7374
7432
  onClick: onSave,
7375
7433
  children: [
7376
- saving ? /* @__PURE__ */ jsx36(Loader2, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx36(Save, { className: "h-3.5 w-3.5" }),
7434
+ saving ? /* @__PURE__ */ jsx37(Loader2, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx37(Save, { className: "h-3.5 w-3.5" }),
7377
7435
  "Save"
7378
7436
  ]
7379
7437
  }
@@ -7384,8 +7442,8 @@ function DirtySavePill({
7384
7442
  }
7385
7443
 
7386
7444
  // src/data-table/EditableTableCell.tsx
7387
- import { useState as useState18 } from "react";
7388
- import { jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
7445
+ import { useState as useState19 } from "react";
7446
+ import { jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
7389
7447
  function CellEditShell({
7390
7448
  href,
7391
7449
  display,
@@ -7394,8 +7452,8 @@ function CellEditShell({
7394
7452
  editButton
7395
7453
  }) {
7396
7454
  const { Link: HostLink } = useMatrxDataTableHost();
7397
- const Link = HostLink ?? ((props) => /* @__PURE__ */ jsx37("a", { ...props }));
7398
- return /* @__PURE__ */ jsxs27(
7455
+ const Link = HostLink ?? ((props) => /* @__PURE__ */ jsx38("a", { ...props }));
7456
+ return /* @__PURE__ */ jsxs28(
7399
7457
  "span",
7400
7458
  {
7401
7459
  className: cn(
@@ -7407,7 +7465,7 @@ function CellEditShell({
7407
7465
  className
7408
7466
  ),
7409
7467
  children: [
7410
- href ? /* @__PURE__ */ jsx37(
7468
+ href ? /* @__PURE__ */ jsx38(
7411
7469
  Link,
7412
7470
  {
7413
7471
  href,
@@ -7415,7 +7473,7 @@ function CellEditShell({
7415
7473
  className: "min-w-0 flex-1 overflow-hidden truncate rounded outline-none focus-visible:ring-2 focus-visible:ring-ring",
7416
7474
  children: display
7417
7475
  }
7418
- ) : /* @__PURE__ */ jsx37("span", { className: "block min-w-0 flex-1 overflow-hidden", children: display }),
7476
+ ) : /* @__PURE__ */ jsx38("span", { className: "block min-w-0 flex-1 overflow-hidden", children: display }),
7419
7477
  editButton
7420
7478
  ]
7421
7479
  }
@@ -7433,10 +7491,10 @@ function EditableTableCell({
7433
7491
  href,
7434
7492
  editTrigger = "click"
7435
7493
  }) {
7436
- const [open, setOpen] = useState18(false);
7494
+ const [open, setOpen] = useState19(false);
7437
7495
  const usePencil = Boolean(href) || editTrigger === "pencil";
7438
7496
  if (editType === "string") {
7439
- return /* @__PURE__ */ jsx37(
7497
+ return /* @__PURE__ */ jsx38(
7440
7498
  InlineStringEditor,
7441
7499
  {
7442
7500
  value: stringifyCellValue(value),
@@ -7449,30 +7507,30 @@ function EditableTableCell({
7449
7507
  }
7450
7508
  );
7451
7509
  }
7452
- return /* @__PURE__ */ jsxs27(Popover, { open, onOpenChange: setOpen, children: [
7453
- usePencil ? /* @__PURE__ */ jsx37(
7510
+ return /* @__PURE__ */ jsxs28(Popover, { open, onOpenChange: setOpen, children: [
7511
+ usePencil ? /* @__PURE__ */ jsx38(
7454
7512
  CellEditShell,
7455
7513
  {
7456
7514
  ...href === void 0 ? {} : { href },
7457
7515
  display,
7458
7516
  ...dirty === void 0 ? {} : { dirty },
7459
7517
  ...className === void 0 ? {} : { className },
7460
- editButton: /* @__PURE__ */ jsxs27(Tooltip, { children: [
7461
- /* @__PURE__ */ jsx37(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx37(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx37(
7518
+ editButton: /* @__PURE__ */ jsxs28(Tooltip, { children: [
7519
+ /* @__PURE__ */ jsx38(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx38(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx38(
7462
7520
  "button",
7463
7521
  {
7464
7522
  type: "button",
7465
7523
  "aria-label": "Edit",
7466
7524
  onClick: (e) => e.stopPropagation(),
7467
7525
  className: CELL_PENCIL_CLASS,
7468
- children: /* @__PURE__ */ jsx37(Pencil, { className: "h-3 w-3" })
7526
+ children: /* @__PURE__ */ jsx38(Pencil, { className: "h-3 w-3" })
7469
7527
  }
7470
7528
  ) }) }),
7471
- /* @__PURE__ */ jsx37(TooltipContent, { children: "Edit" })
7529
+ /* @__PURE__ */ jsx38(TooltipContent, { children: "Edit" })
7472
7530
  ] })
7473
7531
  }
7474
- ) : /* @__PURE__ */ jsxs27(Tooltip, { children: [
7475
- /* @__PURE__ */ jsx37(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx37(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs27(
7532
+ ) : /* @__PURE__ */ jsxs28(Tooltip, { children: [
7533
+ /* @__PURE__ */ jsx38(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx38(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs28(
7476
7534
  "button",
7477
7535
  {
7478
7536
  type: "button",
@@ -7483,20 +7541,20 @@ function EditableTableCell({
7483
7541
  className
7484
7542
  ),
7485
7543
  children: [
7486
- /* @__PURE__ */ jsx37("span", { className: "min-w-0 flex-1 overflow-hidden", children: display }),
7487
- editType === "select" ? /* @__PURE__ */ jsx37(ChevronDown, { className: "h-3 w-3 shrink-0 text-muted-foreground/70 transition-colors group-hover/cell-select:text-foreground" }) : null
7544
+ /* @__PURE__ */ jsx38("span", { className: "min-w-0 flex-1 overflow-hidden", children: display }),
7545
+ editType === "select" ? /* @__PURE__ */ jsx38(ChevronDown, { className: "h-3 w-3 shrink-0 text-muted-foreground/70 transition-colors group-hover/cell-select:text-foreground" }) : null
7488
7546
  ]
7489
7547
  }
7490
7548
  ) }) }),
7491
- /* @__PURE__ */ jsx37(TooltipContent, { children: "Edit value" })
7549
+ /* @__PURE__ */ jsx38(TooltipContent, { children: "Edit value" })
7492
7550
  ] }),
7493
- /* @__PURE__ */ jsx37(
7551
+ /* @__PURE__ */ jsx38(
7494
7552
  PopoverContent,
7495
7553
  {
7496
7554
  align: "start",
7497
7555
  className: "w-56 p-2",
7498
7556
  onClick: (e) => e.stopPropagation(),
7499
- children: /* @__PURE__ */ jsx37(
7557
+ children: /* @__PURE__ */ jsx38(
7500
7558
  TypedEditor,
7501
7559
  {
7502
7560
  editType,
@@ -7522,19 +7580,19 @@ function InlineStringEditor({
7522
7580
  href,
7523
7581
  usePencil
7524
7582
  }) {
7525
- const [editing, setEditing] = useState18(false);
7526
- const [draft, setDraft] = useState18(value);
7583
+ const [editing, setEditing] = useState19(false);
7584
+ const [draft, setDraft] = useState19(value);
7527
7585
  if (!editing) {
7528
7586
  if (usePencil) {
7529
- return /* @__PURE__ */ jsx37(
7587
+ return /* @__PURE__ */ jsx38(
7530
7588
  CellEditShell,
7531
7589
  {
7532
7590
  ...href === void 0 ? {} : { href },
7533
7591
  display,
7534
7592
  ...dirty === void 0 ? {} : { dirty },
7535
7593
  ...className === void 0 ? {} : { className },
7536
- editButton: /* @__PURE__ */ jsxs27(Tooltip, { children: [
7537
- /* @__PURE__ */ jsx37(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx37(
7594
+ editButton: /* @__PURE__ */ jsxs28(Tooltip, { children: [
7595
+ /* @__PURE__ */ jsx38(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx38(
7538
7596
  "button",
7539
7597
  {
7540
7598
  type: "button",
@@ -7545,16 +7603,16 @@ function InlineStringEditor({
7545
7603
  setEditing(true);
7546
7604
  },
7547
7605
  className: CELL_PENCIL_CLASS,
7548
- children: /* @__PURE__ */ jsx37(Pencil, { className: "h-3 w-3" })
7606
+ children: /* @__PURE__ */ jsx38(Pencil, { className: "h-3 w-3" })
7549
7607
  }
7550
7608
  ) }),
7551
- /* @__PURE__ */ jsx37(TooltipContent, { children: "Edit" })
7609
+ /* @__PURE__ */ jsx38(TooltipContent, { children: "Edit" })
7552
7610
  ] })
7553
7611
  }
7554
7612
  );
7555
7613
  }
7556
- return /* @__PURE__ */ jsxs27(Tooltip, { children: [
7557
- /* @__PURE__ */ jsx37(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx37(
7614
+ return /* @__PURE__ */ jsxs28(Tooltip, { children: [
7615
+ /* @__PURE__ */ jsx38(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx38(
7558
7616
  "button",
7559
7617
  {
7560
7618
  type: "button",
@@ -7571,10 +7629,10 @@ function InlineStringEditor({
7571
7629
  children: display
7572
7630
  }
7573
7631
  ) }),
7574
- /* @__PURE__ */ jsx37(TooltipContent, { children: "Click to edit" })
7632
+ /* @__PURE__ */ jsx38(TooltipContent, { children: "Click to edit" })
7575
7633
  ] });
7576
7634
  }
7577
- return /* @__PURE__ */ jsx37(
7635
+ return /* @__PURE__ */ jsx38(
7578
7636
  Input,
7579
7637
  {
7580
7638
  autoFocus: true,
@@ -7610,9 +7668,9 @@ function TypedEditor({
7610
7668
  }) {
7611
7669
  if (editType === "boolean") {
7612
7670
  const checked = Boolean(value);
7613
- return /* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between gap-2", children: [
7614
- /* @__PURE__ */ jsx37("span", { className: "text-xs font-medium", children: "Value" }),
7615
- /* @__PURE__ */ jsx37(
7671
+ return /* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between gap-2", children: [
7672
+ /* @__PURE__ */ jsx38("span", { className: "text-xs font-medium", children: "Value" }),
7673
+ /* @__PURE__ */ jsx38(
7616
7674
  Checkbox,
7617
7675
  {
7618
7676
  checked,
@@ -7622,7 +7680,7 @@ function TypedEditor({
7622
7680
  ] });
7623
7681
  }
7624
7682
  if (editType === "number") {
7625
- return /* @__PURE__ */ jsx37(
7683
+ return /* @__PURE__ */ jsx38(
7626
7684
  NumberEditor,
7627
7685
  {
7628
7686
  value: typeof value === "number" ? value : Number(value) || 0,
@@ -7632,7 +7690,7 @@ function TypedEditor({
7632
7690
  );
7633
7691
  }
7634
7692
  if (editType === "tags") {
7635
- return /* @__PURE__ */ jsx37(
7693
+ return /* @__PURE__ */ jsx38(
7636
7694
  TagsEditor,
7637
7695
  {
7638
7696
  value: Array.isArray(value) ? value.map(String) : [],
@@ -7643,19 +7701,19 @@ function TypedEditor({
7643
7701
  );
7644
7702
  }
7645
7703
  if (editType === "select") {
7646
- return /* @__PURE__ */ jsxs27(
7704
+ return /* @__PURE__ */ jsxs28(
7647
7705
  Select,
7648
7706
  {
7649
7707
  value: stringifyCellValue(value),
7650
7708
  onValueChange: (v) => onCommit(v),
7651
7709
  children: [
7652
- /* @__PURE__ */ jsx37(SelectTrigger, { className: "h-8 text-xs", children: /* @__PURE__ */ jsx37(SelectValue, {}) }),
7653
- /* @__PURE__ */ jsx37(SelectContent, { children: editOptions.map((o) => /* @__PURE__ */ jsx37(SelectItem, { value: o.value, children: o.label }, o.value)) })
7710
+ /* @__PURE__ */ jsx38(SelectTrigger, { className: "h-8 text-xs", children: /* @__PURE__ */ jsx38(SelectValue, {}) }),
7711
+ /* @__PURE__ */ jsx38(SelectContent, { children: editOptions.map((o) => /* @__PURE__ */ jsx38(SelectItem, { value: o.value, children: o.label }, o.value)) })
7654
7712
  ]
7655
7713
  }
7656
7714
  );
7657
7715
  }
7658
- return /* @__PURE__ */ jsx37(
7716
+ return /* @__PURE__ */ jsx38(
7659
7717
  Input,
7660
7718
  {
7661
7719
  type: "date",
@@ -7674,8 +7732,8 @@ function TagsEditor({
7674
7732
  onCommit,
7675
7733
  onCancel
7676
7734
  }) {
7677
- const [tags, setTags] = useState18(value);
7678
- const [draft, setDraft] = useState18("");
7735
+ const [tags, setTags] = useState19(value);
7736
+ const [draft, setDraft] = useState19("");
7679
7737
  const add = (raw) => {
7680
7738
  const next = raw.trim();
7681
7739
  if (!next || tags.includes(next)) return;
@@ -7685,11 +7743,11 @@ function TagsEditor({
7685
7743
  const matches = suggestions.filter(
7686
7744
  (s) => !tags.includes(s.value) && s.value !== "__none__" && (!draft || s.label.toLowerCase().includes(draft.trim().toLowerCase()))
7687
7745
  ).slice(0, 6);
7688
- return /* @__PURE__ */ jsxs27("div", { className: "space-y-2", onClick: (e) => e.stopPropagation(), children: [
7689
- /* @__PURE__ */ jsxs27("div", { className: "flex flex-wrap gap-1", children: [
7690
- tags.length === 0 && /* @__PURE__ */ jsx37("span", { className: "text-xs text-muted-foreground", children: "No tags" }),
7691
- tags.map((tag) => /* @__PURE__ */ jsxs27(Tooltip, { children: [
7692
- /* @__PURE__ */ jsx37(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs27(
7746
+ return /* @__PURE__ */ jsxs28("div", { className: "space-y-2", onClick: (e) => e.stopPropagation(), children: [
7747
+ /* @__PURE__ */ jsxs28("div", { className: "flex flex-wrap gap-1", children: [
7748
+ tags.length === 0 && /* @__PURE__ */ jsx38("span", { className: "text-xs text-muted-foreground", children: "No tags" }),
7749
+ tags.map((tag) => /* @__PURE__ */ jsxs28(Tooltip, { children: [
7750
+ /* @__PURE__ */ jsx38(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs28(
7693
7751
  "button",
7694
7752
  {
7695
7753
  type: "button",
@@ -7698,17 +7756,17 @@ function TagsEditor({
7698
7756
  className: "inline-flex items-center gap-1 rounded-full border border-border px-2 py-0.5 text-[11px] hover:border-destructive hover:text-destructive",
7699
7757
  children: [
7700
7758
  tag,
7701
- /* @__PURE__ */ jsx37(X, { className: "h-2.5 w-2.5" })
7759
+ /* @__PURE__ */ jsx38(X, { className: "h-2.5 w-2.5" })
7702
7760
  ]
7703
7761
  }
7704
7762
  ) }),
7705
- /* @__PURE__ */ jsxs27(TooltipContent, { children: [
7763
+ /* @__PURE__ */ jsxs28(TooltipContent, { children: [
7706
7764
  "Remove ",
7707
7765
  tag
7708
7766
  ] })
7709
7767
  ] }, tag))
7710
7768
  ] }),
7711
- /* @__PURE__ */ jsx37(
7769
+ /* @__PURE__ */ jsx38(
7712
7770
  Input,
7713
7771
  {
7714
7772
  autoFocus: true,
@@ -7729,7 +7787,7 @@ function TagsEditor({
7729
7787
  className: "h-8 text-xs"
7730
7788
  }
7731
7789
  ),
7732
- matches.length > 0 && /* @__PURE__ */ jsx37("div", { className: "flex flex-wrap gap-1", children: matches.map((s) => /* @__PURE__ */ jsxs27(
7790
+ matches.length > 0 && /* @__PURE__ */ jsx38("div", { className: "flex flex-wrap gap-1", children: matches.map((s) => /* @__PURE__ */ jsxs28(
7733
7791
  "button",
7734
7792
  {
7735
7793
  type: "button",
@@ -7742,8 +7800,8 @@ function TagsEditor({
7742
7800
  },
7743
7801
  s.value
7744
7802
  )) }),
7745
- /* @__PURE__ */ jsxs27("div", { className: "flex justify-end gap-1 pt-1", children: [
7746
- /* @__PURE__ */ jsx37(
7803
+ /* @__PURE__ */ jsxs28("div", { className: "flex justify-end gap-1 pt-1", children: [
7804
+ /* @__PURE__ */ jsx38(
7747
7805
  Button,
7748
7806
  {
7749
7807
  size: "sm",
@@ -7751,17 +7809,17 @@ function TagsEditor({
7751
7809
  className: "h-7 px-2",
7752
7810
  "aria-label": "Cancel edit",
7753
7811
  onClick: onCancel,
7754
- children: /* @__PURE__ */ jsx37(X, { className: "h-3.5 w-3.5" })
7812
+ children: /* @__PURE__ */ jsx38(X, { className: "h-3.5 w-3.5" })
7755
7813
  }
7756
7814
  ),
7757
- /* @__PURE__ */ jsx37(
7815
+ /* @__PURE__ */ jsx38(
7758
7816
  Button,
7759
7817
  {
7760
7818
  size: "sm",
7761
7819
  className: "h-7 px-2",
7762
7820
  "aria-label": "Apply tags",
7763
7821
  onClick: () => onCommit(tags),
7764
- children: /* @__PURE__ */ jsx37(Check, { className: "h-3.5 w-3.5" })
7822
+ children: /* @__PURE__ */ jsx38(Check, { className: "h-3.5 w-3.5" })
7765
7823
  }
7766
7824
  )
7767
7825
  ] })
@@ -7772,9 +7830,9 @@ function NumberEditor({
7772
7830
  onCommit,
7773
7831
  onCancel
7774
7832
  }) {
7775
- const [draft, setDraft] = useState18(String(value));
7776
- return /* @__PURE__ */ jsxs27("div", { className: "flex flex-col gap-2", children: [
7777
- /* @__PURE__ */ jsx37(
7833
+ const [draft, setDraft] = useState19(String(value));
7834
+ return /* @__PURE__ */ jsxs28("div", { className: "flex flex-col gap-2", children: [
7835
+ /* @__PURE__ */ jsx38(
7778
7836
  Input,
7779
7837
  {
7780
7838
  autoFocus: true,
@@ -7791,8 +7849,8 @@ function NumberEditor({
7791
7849
  }
7792
7850
  }
7793
7851
  ),
7794
- /* @__PURE__ */ jsxs27("div", { className: "flex justify-end gap-1", children: [
7795
- /* @__PURE__ */ jsx37(
7852
+ /* @__PURE__ */ jsxs28("div", { className: "flex justify-end gap-1", children: [
7853
+ /* @__PURE__ */ jsx38(
7796
7854
  Button,
7797
7855
  {
7798
7856
  type: "button",
@@ -7801,10 +7859,10 @@ function NumberEditor({
7801
7859
  className: "h-7",
7802
7860
  "aria-label": "Cancel edit",
7803
7861
  onClick: onCancel,
7804
- children: /* @__PURE__ */ jsx37(X, { className: "h-3.5 w-3.5" })
7862
+ children: /* @__PURE__ */ jsx38(X, { className: "h-3.5 w-3.5" })
7805
7863
  }
7806
7864
  ),
7807
- /* @__PURE__ */ jsx37(
7865
+ /* @__PURE__ */ jsx38(
7808
7866
  Button,
7809
7867
  {
7810
7868
  type: "button",
@@ -7815,7 +7873,7 @@ function NumberEditor({
7815
7873
  const n = Number(draft);
7816
7874
  if (Number.isFinite(n)) onCommit(n);
7817
7875
  },
7818
- children: /* @__PURE__ */ jsx37(Check, { className: "h-3.5 w-3.5" })
7876
+ children: /* @__PURE__ */ jsx38(Check, { className: "h-3.5 w-3.5" })
7819
7877
  }
7820
7878
  )
7821
7879
  ] })
@@ -7823,24 +7881,24 @@ function NumberEditor({
7823
7881
  }
7824
7882
 
7825
7883
  // src/data-table/ToolbarFacets.tsx
7826
- import { jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
7884
+ import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
7827
7885
  function ToolbarFacets({ facets }) {
7828
7886
  if (facets.length === 0) return null;
7829
- return /* @__PURE__ */ jsx38("div", { className: "flex flex-wrap items-center gap-2", children: facets.map((facet) => {
7887
+ return /* @__PURE__ */ jsx39("div", { className: "flex flex-wrap items-center gap-2", children: facets.map((facet) => {
7830
7888
  if (facet.type === "custom") {
7831
- return /* @__PURE__ */ jsx38("div", { children: facet.render() }, facet.id);
7889
+ return /* @__PURE__ */ jsx39("div", { children: facet.render() }, facet.id);
7832
7890
  }
7833
7891
  const defaultValue = facet.defaultValue ?? facet.options[0]?.value ?? "";
7834
7892
  const isNonDefault = facet.value !== defaultValue;
7835
- return /* @__PURE__ */ jsxs28(
7893
+ return /* @__PURE__ */ jsxs29(
7836
7894
  "div",
7837
7895
  {
7838
7896
  className: "flex flex-wrap items-center gap-1.5 max-sm:grid max-sm:w-full max-sm:grid-cols-3",
7839
7897
  children: [
7840
- facet.label ? /* @__PURE__ */ jsx38("span", { className: "mr-0.5 text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: facet.label }) : null,
7898
+ facet.label ? /* @__PURE__ */ jsx39("span", { className: "mr-0.5 text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: facet.label }) : null,
7841
7899
  facet.options.map((opt) => {
7842
7900
  const active = facet.value === opt.value;
7843
- return /* @__PURE__ */ jsxs28(
7901
+ return /* @__PURE__ */ jsxs29(
7844
7902
  Button,
7845
7903
  {
7846
7904
  type: "button",
@@ -7854,8 +7912,8 @@ function ToolbarFacets({ facets }) {
7854
7912
  children: [
7855
7913
  opt.icon,
7856
7914
  opt.label,
7857
- active && isNonDefault ? /* @__PURE__ */ jsx38(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs28(Tooltip, { children: [
7858
- /* @__PURE__ */ jsx38(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx38(
7915
+ active && isNonDefault ? /* @__PURE__ */ jsx39(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs29(Tooltip, { children: [
7916
+ /* @__PURE__ */ jsx39(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx39(
7859
7917
  "span",
7860
7918
  {
7861
7919
  role: "button",
@@ -7873,10 +7931,10 @@ function ToolbarFacets({ facets }) {
7873
7931
  facet.onChange(defaultValue);
7874
7932
  }
7875
7933
  },
7876
- children: /* @__PURE__ */ jsx38(X, { className: "h-3 w-3" })
7934
+ children: /* @__PURE__ */ jsx39(X, { className: "h-3 w-3" })
7877
7935
  }
7878
7936
  ) }),
7879
- /* @__PURE__ */ jsx38(TooltipContent, { side: "top", children: "Clear this filter" })
7937
+ /* @__PURE__ */ jsx39(TooltipContent, { side: "top", children: "Clear this filter" })
7880
7938
  ] }) }) : null
7881
7939
  ]
7882
7940
  },
@@ -7902,8 +7960,8 @@ function resetToolbarFacets(facets) {
7902
7960
  }
7903
7961
 
7904
7962
  // src/data-table/LayeredFilterBuilder.tsx
7905
- import { useState as useState19 } from "react";
7906
- import { Fragment as Fragment5, jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
7963
+ import { useState as useState20 } from "react";
7964
+ import { Fragment as Fragment5, jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
7907
7965
  function moveRule(rules, from, to) {
7908
7966
  if (from === to || to < 0 || to >= rules.length) return [...rules];
7909
7967
  const next = [...rules];
@@ -7919,8 +7977,8 @@ function LayeredFilterBuilder({
7919
7977
  maxRules = 20,
7920
7978
  label = "Advanced filters"
7921
7979
  }) {
7922
- const [open, setOpen] = useState19(false);
7923
- const [draggedIndex, setDraggedIndex] = useState19(null);
7980
+ const [open, setOpen] = useState20(false);
7981
+ const [draggedIndex, setDraggedIndex] = useState20(null);
7924
7982
  if (fields.length === 0) return null;
7925
7983
  const updateRule = (index, patch) => {
7926
7984
  onChange(
@@ -7949,8 +8007,8 @@ function LayeredFilterBuilder({
7949
8007
  const reorder = (from, to) => {
7950
8008
  onChange(moveRule(rules, from, to));
7951
8009
  };
7952
- return /* @__PURE__ */ jsxs29("div", { className: "flex min-w-0 flex-wrap items-center gap-1", children: [
7953
- /* @__PURE__ */ jsxs29(
8010
+ return /* @__PURE__ */ jsxs30("div", { className: "flex min-w-0 flex-wrap items-center gap-1", children: [
8011
+ /* @__PURE__ */ jsxs30(
7954
8012
  Popover,
7955
8013
  {
7956
8014
  open,
@@ -7962,7 +8020,7 @@ function LayeredFilterBuilder({
7962
8020
  }
7963
8021
  },
7964
8022
  children: [
7965
- /* @__PURE__ */ jsx39(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs29(
8023
+ /* @__PURE__ */ jsx40(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs30(
7966
8024
  Button,
7967
8025
  {
7968
8026
  type: "button",
@@ -7971,25 +8029,25 @@ function LayeredFilterBuilder({
7971
8029
  className: "h-8 gap-1.5 px-2 text-xs",
7972
8030
  "aria-label": label,
7973
8031
  children: [
7974
- /* @__PURE__ */ jsx39(SlidersHorizontal, { className: "h-3.5 w-3.5" }),
7975
- /* @__PURE__ */ jsx39("span", { className: "hidden sm:inline", children: rules.length > 0 ? `${rules.length} layers` : "Advanced" }),
7976
- rules.length > 0 ? /* @__PURE__ */ jsx39("span", { className: "sm:hidden", children: rules.length }) : null
8032
+ /* @__PURE__ */ jsx40(SlidersHorizontal, { className: "h-3.5 w-3.5" }),
8033
+ /* @__PURE__ */ jsx40("span", { className: "hidden sm:inline", children: rules.length > 0 ? `${rules.length} layers` : "Advanced" }),
8034
+ rules.length > 0 ? /* @__PURE__ */ jsx40("span", { className: "sm:hidden", children: rules.length }) : null
7977
8035
  ]
7978
8036
  }
7979
8037
  ) }),
7980
- /* @__PURE__ */ jsxs29(
8038
+ /* @__PURE__ */ jsxs30(
7981
8039
  PopoverContent,
7982
8040
  {
7983
8041
  align: "start",
7984
8042
  sideOffset: 6,
7985
8043
  className: "w-[min(46rem,calc(100vw-1rem))] p-0",
7986
8044
  children: [
7987
- /* @__PURE__ */ jsxs29("div", { className: "flex items-start justify-between gap-3 border-b border-border px-3 py-2.5", children: [
7988
- /* @__PURE__ */ jsxs29("div", { children: [
7989
- /* @__PURE__ */ jsx39("p", { className: "text-sm font-semibold text-foreground", children: "Narrow these results" }),
7990
- /* @__PURE__ */ jsx39("p", { className: "text-xs text-muted-foreground", children: "Every layer must match. Drag layers to put them in the order that makes sense to you." })
8045
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-start justify-between gap-3 border-b border-border px-3 py-2.5", children: [
8046
+ /* @__PURE__ */ jsxs30("div", { children: [
8047
+ /* @__PURE__ */ jsx40("p", { className: "text-sm font-semibold text-foreground", children: "Narrow these results" }),
8048
+ /* @__PURE__ */ jsx40("p", { className: "text-xs text-muted-foreground", children: "Every layer must match. Drag layers to put them in the order that makes sense to you." })
7991
8049
  ] }),
7992
- rules.length > 0 ? /* @__PURE__ */ jsx39(
8050
+ rules.length > 0 ? /* @__PURE__ */ jsx40(
7993
8051
  Button,
7994
8052
  {
7995
8053
  type: "button",
@@ -8001,10 +8059,10 @@ function LayeredFilterBuilder({
8001
8059
  }
8002
8060
  ) : null
8003
8061
  ] }),
8004
- /* @__PURE__ */ jsx39("div", { className: "max-h-[min(28rem,65dvh)] space-y-1.5 overflow-y-auto p-2.5 scrollbar-thin", children: rules.length === 0 ? /* @__PURE__ */ jsxs29("div", { className: "rounded-md border border-dashed border-border px-3 py-5 text-center", children: [
8005
- /* @__PURE__ */ jsx39("p", { className: "text-sm font-medium text-foreground", children: "Start with one simple layer" }),
8006
- /* @__PURE__ */ jsx39("p", { className: "mt-1 text-xs text-muted-foreground", children: "For example: Keyword contains ITAD, then Keyword doesn't have the word \u201Cwhat\u201D." })
8007
- ] }) : rules.map((rule, index) => /* @__PURE__ */ jsx39(
8062
+ /* @__PURE__ */ jsx40("div", { className: "max-h-[min(28rem,65dvh)] space-y-1.5 overflow-y-auto p-2.5 scrollbar-thin", children: rules.length === 0 ? /* @__PURE__ */ jsxs30("div", { className: "rounded-md border border-dashed border-border px-3 py-5 text-center", children: [
8063
+ /* @__PURE__ */ jsx40("p", { className: "text-sm font-medium text-foreground", children: "Start with one simple layer" }),
8064
+ /* @__PURE__ */ jsx40("p", { className: "mt-1 text-xs text-muted-foreground", children: "For example: Keyword contains ITAD, then Keyword doesn't have the word \u201Cwhat\u201D." })
8065
+ ] }) : rules.map((rule, index) => /* @__PURE__ */ jsx40(
8008
8066
  LayeredRuleRow,
8009
8067
  {
8010
8068
  index,
@@ -8024,9 +8082,9 @@ function LayeredFilterBuilder({
8024
8082
  },
8025
8083
  rule.id
8026
8084
  )) }),
8027
- /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between gap-2 border-t border-border px-3 py-2", children: [
8028
- /* @__PURE__ */ jsx39("p", { className: "text-[11px] text-muted-foreground", children: "The regular search still works and is applied before these layers." }),
8029
- /* @__PURE__ */ jsxs29(
8085
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between gap-2 border-t border-border px-3 py-2", children: [
8086
+ /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: "The regular search still works and is applied before these layers." }),
8087
+ /* @__PURE__ */ jsxs30(
8030
8088
  Button,
8031
8089
  {
8032
8090
  type: "button",
@@ -8036,7 +8094,7 @@ function LayeredFilterBuilder({
8036
8094
  disabled: rules.length >= maxRules,
8037
8095
  onClick: addRule,
8038
8096
  children: [
8039
- /* @__PURE__ */ jsx39(Plus, { className: "h-3.5 w-3.5" }),
8097
+ /* @__PURE__ */ jsx40(Plus, { className: "h-3.5 w-3.5" }),
8040
8098
  " Add layer"
8041
8099
  ]
8042
8100
  }
@@ -8048,7 +8106,7 @@ function LayeredFilterBuilder({
8048
8106
  ]
8049
8107
  }
8050
8108
  ),
8051
- rules.map((rule, index) => /* @__PURE__ */ jsxs29(
8109
+ rules.map((rule, index) => /* @__PURE__ */ jsxs30(
8052
8110
  "span",
8053
8111
  {
8054
8112
  className: cn(
@@ -8056,7 +8114,7 @@ function LayeredFilterBuilder({
8056
8114
  isCompleteLayeredFilterRule(rule) ? "border-border bg-muted/50 text-foreground" : "border-dashed border-warning/50 bg-warning/10 text-warning"
8057
8115
  ),
8058
8116
  children: [
8059
- /* @__PURE__ */ jsxs29(
8117
+ /* @__PURE__ */ jsxs30(
8060
8118
  "button",
8061
8119
  {
8062
8120
  type: "button",
@@ -8064,19 +8122,19 @@ function LayeredFilterBuilder({
8064
8122
  onClick: () => setOpen(true),
8065
8123
  title: isCompleteLayeredFilterRule(rule) ? layeredFilterRuleSummary(rule, fields) : `Layer ${index + 1} needs a value`,
8066
8124
  children: [
8067
- /* @__PURE__ */ jsx39("span", { className: "mr-1 text-muted-foreground", children: index + 1 }),
8125
+ /* @__PURE__ */ jsx40("span", { className: "mr-1 text-muted-foreground", children: index + 1 }),
8068
8126
  isCompleteLayeredFilterRule(rule) ? layeredFilterRuleSummary(rule, fields) : "Choose a value"
8069
8127
  ]
8070
8128
  }
8071
8129
  ),
8072
- /* @__PURE__ */ jsx39(
8130
+ /* @__PURE__ */ jsx40(
8073
8131
  "button",
8074
8132
  {
8075
8133
  type: "button",
8076
8134
  className: "shrink-0 rounded-full p-0.5 text-muted-foreground hover:bg-muted hover:text-foreground",
8077
8135
  "aria-label": `Remove filter layer ${index + 1}`,
8078
8136
  onClick: () => removeRule(index),
8079
- children: /* @__PURE__ */ jsx39(X, { className: "h-3 w-3" })
8137
+ children: /* @__PURE__ */ jsx40(X, { className: "h-3 w-3" })
8080
8138
  }
8081
8139
  )
8082
8140
  ]
@@ -8106,7 +8164,7 @@ function LayeredRuleRow({
8106
8164
  event.preventDefault();
8107
8165
  onKeyboardMove(event.key === "ArrowUp" ? -1 : 1);
8108
8166
  };
8109
- return /* @__PURE__ */ jsxs29(
8167
+ return /* @__PURE__ */ jsxs30(
8110
8168
  "div",
8111
8169
  {
8112
8170
  className: cn(
@@ -8119,7 +8177,7 @@ function LayeredRuleRow({
8119
8177
  onDrop(index);
8120
8178
  },
8121
8179
  children: [
8122
- /* @__PURE__ */ jsx39(
8180
+ /* @__PURE__ */ jsx40(
8123
8181
  "button",
8124
8182
  {
8125
8183
  type: "button",
@@ -8133,10 +8191,10 @@ function LayeredRuleRow({
8133
8191
  },
8134
8192
  onDragEnd,
8135
8193
  onKeyDown: handleMoveKey,
8136
- children: /* @__PURE__ */ jsx39(GripVertical, { className: "h-3.5 w-3.5" })
8194
+ children: /* @__PURE__ */ jsx40(GripVertical, { className: "h-3.5 w-3.5" })
8137
8195
  }
8138
8196
  ),
8139
- /* @__PURE__ */ jsxs29(
8197
+ /* @__PURE__ */ jsxs30(
8140
8198
  Select,
8141
8199
  {
8142
8200
  value: field.id,
@@ -8154,16 +8212,16 @@ function LayeredRuleRow({
8154
8212
  });
8155
8213
  },
8156
8214
  children: [
8157
- /* @__PURE__ */ jsx39(
8215
+ /* @__PURE__ */ jsx40(
8158
8216
  SelectTrigger,
8159
8217
  {
8160
8218
  size: "sm",
8161
8219
  className: "h-7 w-full text-xs max-sm:col-span-1",
8162
8220
  "aria-label": `Filter layer ${index + 1} field`,
8163
- children: /* @__PURE__ */ jsx39(SelectValue, {})
8221
+ children: /* @__PURE__ */ jsx40(SelectValue, {})
8164
8222
  }
8165
8223
  ),
8166
- /* @__PURE__ */ jsx39(SelectContent, { children: fields.map((candidate) => /* @__PURE__ */ jsx39(
8224
+ /* @__PURE__ */ jsx40(SelectContent, { children: fields.map((candidate) => /* @__PURE__ */ jsx40(
8167
8225
  SelectItem,
8168
8226
  {
8169
8227
  value: candidate.id,
@@ -8175,7 +8233,7 @@ function LayeredRuleRow({
8175
8233
  ]
8176
8234
  }
8177
8235
  ),
8178
- /* @__PURE__ */ jsxs29(
8236
+ /* @__PURE__ */ jsxs30(
8179
8237
  Select,
8180
8238
  {
8181
8239
  value: rule.operator,
@@ -8187,35 +8245,35 @@ function LayeredRuleRow({
8187
8245
  });
8188
8246
  },
8189
8247
  children: [
8190
- /* @__PURE__ */ jsx39(
8248
+ /* @__PURE__ */ jsx40(
8191
8249
  SelectTrigger,
8192
8250
  {
8193
8251
  size: "sm",
8194
8252
  className: "h-7 w-full text-xs max-sm:col-start-2",
8195
8253
  "aria-label": `Filter layer ${index + 1} operator`,
8196
- children: /* @__PURE__ */ jsx39(SelectValue, {})
8254
+ children: /* @__PURE__ */ jsx40(SelectValue, {})
8197
8255
  }
8198
8256
  ),
8199
- /* @__PURE__ */ jsx39(SelectContent, { children: operators.map((operator) => /* @__PURE__ */ jsx39(SelectItem, { value: operator, className: "text-xs", children: LAYERED_FILTER_OPERATOR_LABELS[operator] }, operator)) })
8257
+ /* @__PURE__ */ jsx40(SelectContent, { children: operators.map((operator) => /* @__PURE__ */ jsx40(SelectItem, { value: operator, className: "text-xs", children: LAYERED_FILTER_OPERATOR_LABELS[operator] }, operator)) })
8200
8258
  ]
8201
8259
  }
8202
8260
  ),
8203
- /* @__PURE__ */ jsx39("div", { className: "min-w-0 max-sm:col-span-3 max-sm:col-start-1", children: !needsValue ? /* @__PURE__ */ jsx39("span", { className: "flex h-7 items-center px-2 text-xs text-muted-foreground", children: "No value needed" }) : field.kind === "select" ? /* @__PURE__ */ jsxs29(
8261
+ /* @__PURE__ */ jsx40("div", { className: "min-w-0 max-sm:col-span-3 max-sm:col-start-1", children: !needsValue ? /* @__PURE__ */ jsx40("span", { className: "flex h-7 items-center px-2 text-xs text-muted-foreground", children: "No value needed" }) : field.kind === "select" ? /* @__PURE__ */ jsxs30(
8204
8262
  Select,
8205
8263
  {
8206
8264
  value: rule.value,
8207
8265
  onValueChange: (value) => onChange({ value }),
8208
8266
  children: [
8209
- /* @__PURE__ */ jsx39(
8267
+ /* @__PURE__ */ jsx40(
8210
8268
  SelectTrigger,
8211
8269
  {
8212
8270
  size: "sm",
8213
8271
  className: "h-7 w-full text-xs",
8214
8272
  "aria-label": `Filter layer ${index + 1} value`,
8215
- children: /* @__PURE__ */ jsx39(SelectValue, {})
8273
+ children: /* @__PURE__ */ jsx40(SelectValue, {})
8216
8274
  }
8217
8275
  ),
8218
- /* @__PURE__ */ jsx39(SelectContent, { children: field.options.map((option) => /* @__PURE__ */ jsx39(
8276
+ /* @__PURE__ */ jsx40(SelectContent, { children: field.options.map((option) => /* @__PURE__ */ jsx40(
8219
8277
  SelectItem,
8220
8278
  {
8221
8279
  value: option.value,
@@ -8226,8 +8284,8 @@ function LayeredRuleRow({
8226
8284
  )) })
8227
8285
  ]
8228
8286
  }
8229
- ) : /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-1", children: [
8230
- /* @__PURE__ */ jsx39(
8287
+ ) : /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-1", children: [
8288
+ /* @__PURE__ */ jsx40(
8231
8289
  Input,
8232
8290
  {
8233
8291
  value: rule.value,
@@ -8238,9 +8296,9 @@ function LayeredRuleRow({
8238
8296
  "aria-label": `Filter layer ${index + 1} value`
8239
8297
  }
8240
8298
  ),
8241
- rule.operator === "between" ? /* @__PURE__ */ jsxs29(Fragment5, { children: [
8242
- /* @__PURE__ */ jsx39("span", { className: "text-[11px] text-muted-foreground", children: "and" }),
8243
- /* @__PURE__ */ jsx39(
8299
+ rule.operator === "between" ? /* @__PURE__ */ jsxs30(Fragment5, { children: [
8300
+ /* @__PURE__ */ jsx40("span", { className: "text-[11px] text-muted-foreground", children: "and" }),
8301
+ /* @__PURE__ */ jsx40(
8244
8302
  Input,
8245
8303
  {
8246
8304
  value: rule.valueTo ?? "",
@@ -8253,7 +8311,7 @@ function LayeredRuleRow({
8253
8311
  )
8254
8312
  ] }) : null
8255
8313
  ] }) }),
8256
- /* @__PURE__ */ jsx39(
8314
+ /* @__PURE__ */ jsx40(
8257
8315
  Button,
8258
8316
  {
8259
8317
  type: "button",
@@ -8262,7 +8320,7 @@ function LayeredRuleRow({
8262
8320
  className: "h-7 w-7 p-0 text-muted-foreground hover:text-destructive max-sm:col-start-3 max-sm:row-start-1",
8263
8321
  "aria-label": `Remove filter layer ${index + 1}`,
8264
8322
  onClick: onRemove,
8265
- children: /* @__PURE__ */ jsx39(Trash2, { className: "h-3.5 w-3.5" })
8323
+ children: /* @__PURE__ */ jsx40(Trash2, { className: "h-3.5 w-3.5" })
8266
8324
  }
8267
8325
  )
8268
8326
  ]
@@ -8362,7 +8420,7 @@ function safeQueryPage(requestedPage, totalItems, pageSize) {
8362
8420
  }
8363
8421
 
8364
8422
  // src/data-table/MatrxDataTable.tsx
8365
- import { Fragment as Fragment7, jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
8423
+ import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
8366
8424
  function TableToolbarAction({
8367
8425
  HostAction,
8368
8426
  ariaLabel,
@@ -8373,10 +8431,10 @@ function TableToolbarAction({
8373
8431
  children
8374
8432
  }) {
8375
8433
  if (HostAction) {
8376
- return /* @__PURE__ */ jsx40("span", { "data-matrx-table-toolbar-action": true, children: /* @__PURE__ */ jsx40(HostAction, { ariaLabel, tooltip, disabled, busy, onClick, children }) });
8434
+ return /* @__PURE__ */ jsx41("span", { "data-matrx-table-toolbar-action": true, children: /* @__PURE__ */ jsx41(HostAction, { ariaLabel, tooltip, disabled, busy, onClick, children }) });
8377
8435
  }
8378
- return /* @__PURE__ */ jsxs30(Tooltip, { children: [
8379
- /* @__PURE__ */ jsx40(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx40("span", { "data-matrx-table-toolbar-action": true, className: "inline-flex", children: /* @__PURE__ */ jsx40(
8436
+ return /* @__PURE__ */ jsxs31(Tooltip, { children: [
8437
+ /* @__PURE__ */ jsx41(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx41("span", { "data-matrx-table-toolbar-action": true, className: "inline-flex", children: /* @__PURE__ */ jsx41(
8380
8438
  Button,
8381
8439
  {
8382
8440
  type: "button",
@@ -8391,7 +8449,7 @@ function TableToolbarAction({
8391
8449
  children: isValidElement2(children) ? cloneElement2(children, { className: cn("h-5 w-5", children.props.className) }) : children
8392
8450
  }
8393
8451
  ) }) }),
8394
- /* @__PURE__ */ jsx40(TooltipContent, { children: tooltip ?? ariaLabel })
8452
+ /* @__PURE__ */ jsx41(TooltipContent, { children: tooltip ?? ariaLabel })
8395
8453
  ] });
8396
8454
  }
8397
8455
  function hasSameRowReferences(previous, next) {
@@ -8404,20 +8462,20 @@ function TableRowCopyControl({
8404
8462
  sourceId,
8405
8463
  defaultColumns
8406
8464
  }) {
8407
- return /* @__PURE__ */ jsx40(
8408
- CopyButtons,
8409
- {
8410
- size,
8411
- sourceId,
8412
- label: copy.label,
8413
- ...copy.rowReferences ? { references: copy.rowReferences(row) } : {},
8414
- ...copy.triggerVariant ? { triggerVariant: copy.triggerVariant } : {},
8415
- human: () => copy.humanRow(row),
8416
- json: () => copy.agentRow ? copy.agentRow(row) : row,
8417
- agent: () => defaultColumns ? buildDefaultTableRowAgentInput(copy, row, defaultColumns) : buildRowAgentInput(copy, row),
8418
- ...copy.rowAiVariants?.(row) === void 0 ? {} : { aiVariants: copy.rowAiVariants?.(row) }
8419
- }
8420
- );
8465
+ return /* @__PURE__ */ jsx41(CopyButtons, { size, ...tableRowCopyProps(copy, row, sourceId, defaultColumns) });
8466
+ }
8467
+ function tableRowCopyProps(copy, row, sourceId, defaultColumns) {
8468
+ const aiVariants = copy.rowAiVariants?.(row);
8469
+ return {
8470
+ sourceId,
8471
+ label: copy.label,
8472
+ ...copy.rowReferences ? { references: copy.rowReferences(row) } : {},
8473
+ ...copy.triggerVariant ? { triggerVariant: copy.triggerVariant } : {},
8474
+ human: () => copy.humanRow(row),
8475
+ json: () => copy.agentRow ? copy.agentRow(row) : row,
8476
+ agent: () => defaultColumns ? buildDefaultTableRowAgentInput(copy, row, defaultColumns) : buildRowAgentInput(copy, row),
8477
+ ...aiVariants === void 0 ? {} : { aiVariants }
8478
+ };
8421
8479
  }
8422
8480
  function dragPointerY(event) {
8423
8481
  const activator = event.activatorEvent;
@@ -8428,8 +8486,8 @@ function isStringArray(value) {
8428
8486
  }
8429
8487
  var activeUrlTableIds = /* @__PURE__ */ new Set();
8430
8488
  function MatrxDataTable(props) {
8431
- if (!props.urlState) return /* @__PURE__ */ jsx40(MatrxDataTableCore, { ...props });
8432
- return /* @__PURE__ */ jsx40(MatrxDataTableWithUrlState, { ...props, urlState: props.urlState });
8489
+ if (!props.urlState) return /* @__PURE__ */ jsx41(MatrxDataTableCore, { ...props });
8490
+ return /* @__PURE__ */ jsx41(MatrxDataTableWithUrlState, { ...props, urlState: props.urlState });
8433
8491
  }
8434
8492
  function MatrxDataTableWithUrlState({
8435
8493
  urlState,
@@ -8447,7 +8505,7 @@ function MatrxDataTableWithUrlState({
8447
8505
  ...urlState.history === void 0 ? {} : { history: urlState.history },
8448
8506
  ...urlState.textHistory === void 0 ? {} : { textHistory: urlState.textHistory }
8449
8507
  });
8450
- useEffect13(() => {
8508
+ useEffect14(() => {
8451
8509
  if (activeUrlTableIds.has(urlState.id)) {
8452
8510
  throw new Error(
8453
8511
  `Duplicate MatrxDataTable urlState.id "${urlState.id}" on one page. Give every table a unique stable id.`
@@ -8484,7 +8542,7 @@ function MatrxDataTableWithUrlState({
8484
8542
  props.selection?.onSelectedIdsChange(ids);
8485
8543
  }
8486
8544
  } : props.selection;
8487
- return /* @__PURE__ */ jsx40(
8545
+ return /* @__PURE__ */ jsx41(
8488
8546
  MatrxDataTableCore,
8489
8547
  {
8490
8548
  ...props,
@@ -8543,6 +8601,7 @@ function MatrxDataTableCore({
8543
8601
  detail,
8544
8602
  window: windowConfig,
8545
8603
  copy,
8604
+ rowCopyPlacement = "inline",
8546
8605
  edit,
8547
8606
  hierarchy,
8548
8607
  selectedId: controlledSelectedId,
@@ -8561,6 +8620,7 @@ function MatrxDataTableCore({
8561
8620
  localPagination,
8562
8621
  pageSizeOptions = [10, 25, 50, 100, 200, 500, 1e3, 2e3],
8563
8622
  zebra = true,
8623
+ stickyHeader = true,
8564
8624
  className,
8565
8625
  tableClassName,
8566
8626
  mobileCards,
@@ -8570,7 +8630,7 @@ function MatrxDataTableCore({
8570
8630
  }) {
8571
8631
  const appendQuery = query?.mode === "controlled-append" ? query : null;
8572
8632
  const appendQueryKey = appendQuery?.pagination.queryKey ?? null;
8573
- const committedAppendQueryKey = useRef11(appendQueryKey);
8633
+ const committedAppendQueryKey = useRef12(appendQueryKey);
8574
8634
  const appendSourceChanged = appendQuery !== null && committedAppendQueryKey.current !== appendQueryKey;
8575
8635
  const data = appendQuery ? appendQuery.pagination.rows : suppliedData;
8576
8636
  const isLoading = appendQuery ? appendQuery.pagination.loading : suppliedLoading;
@@ -8581,10 +8641,10 @@ function MatrxDataTableCore({
8581
8641
  const Link = host.Link ?? DefaultTableLink;
8582
8642
  const SidePanelSurface = host.SidePanelSurface ?? DefaultTableSidePanel;
8583
8643
  const { notify: toast, notice } = useTableNotice();
8584
- const [savedViewError, setSavedViewError] = useState20(null);
8585
- const [toolbarActionError, setToolbarActionError] = useState20(null);
8586
- const [toolbarActionPending, setToolbarActionPending] = useState20({ refresh: false, add: false });
8587
- const toolbarActionPendingRef = useRef11({ refresh: false, add: false });
8644
+ const [savedViewError, setSavedViewError] = useState21(null);
8645
+ const [toolbarActionError, setToolbarActionError] = useState21(null);
8646
+ const [toolbarActionPending, setToolbarActionPending] = useState21({ refresh: false, add: false });
8647
+ const toolbarActionPendingRef = useRef12({ refresh: false, add: false });
8588
8648
  const CHECKBOX_TAP_AREA = "h-4 w-4 touch-manipulation";
8589
8649
  const mobileCardsClass = mobileCardsBreakpoint === "lg" ? "lg:hidden" : "sm:hidden";
8590
8650
  const tableWithCardsClass = mobileCardsBreakpoint === "lg" ? "max-lg:hidden" : "max-sm:hidden";
@@ -8606,8 +8666,8 @@ function MatrxDataTableCore({
8606
8666
  },
8607
8667
  [controlledQuery]
8608
8668
  );
8609
- const [internalSearch, setInternalSearch] = useState20("");
8610
- const [draggedRowId, setDraggedRowId] = useState20(null);
8669
+ const [internalSearch, setInternalSearch] = useState21("");
8670
+ const [draggedRowId, setDraggedRowId] = useState21(null);
8611
8671
  const hierarchySensors = useSensors(
8612
8672
  useSensor(PointerSensor, {
8613
8673
  activationConstraint: { distance: COLUMN_REORDER_ACTIVATION_DISTANCE }
@@ -8623,7 +8683,7 @@ function MatrxDataTableCore({
8623
8683
  }
8624
8684
  toolbar?.onSearchChange?.(v);
8625
8685
  };
8626
- const [internalSearchMatchMode, setInternalSearchMatchMode] = useState20(
8686
+ const [internalSearchMatchMode, setInternalSearchMatchMode] = useState21(
8627
8687
  toolbar?.searchMatch?.defaultMode ?? "contains"
8628
8688
  );
8629
8689
  const searchMatchMode = controlledQuery ? controlledQuery.state.searchMatchMode ?? toolbar?.searchMatch?.defaultMode ?? "contains" : internalSearchMatchMode;
@@ -8634,7 +8694,7 @@ function MatrxDataTableCore({
8634
8694
  }
8635
8695
  setInternalSearchMatchMode(mode);
8636
8696
  };
8637
- const [internalSearchScope, setInternalSearchScope] = useState20("all");
8697
+ const [internalSearchScope, setInternalSearchScope] = useState21("all");
8638
8698
  const searchScope = controlledQuery ? controlledQuery.state.searchScope ?? "all" : internalSearchScope;
8639
8699
  const setSearchScope = (scope) => {
8640
8700
  if (controlledQuery) {
@@ -8643,7 +8703,7 @@ function MatrxDataTableCore({
8643
8703
  }
8644
8704
  setInternalSearchScope(scope);
8645
8705
  };
8646
- const [internalAnyOf, setInternalAnyOf] = useState20("");
8706
+ const [internalAnyOf, setInternalAnyOf] = useState21("");
8647
8707
  const toolbarAnyOfControlled = toolbar?.anyOf?.value !== void 0;
8648
8708
  const anyOfValue = controlledQuery ? controlledQuery.state.anyOf : toolbarAnyOfControlled ? toolbar?.anyOf?.value ?? "" : internalAnyOf;
8649
8709
  const setAnyOfValue = (v) => {
@@ -8654,7 +8714,7 @@ function MatrxDataTableCore({
8654
8714
  }
8655
8715
  toolbar?.anyOf?.onChange?.(v);
8656
8716
  };
8657
- const [internalLayeredFilters, setInternalLayeredFilters] = useState20([]);
8717
+ const [internalLayeredFilters, setInternalLayeredFilters] = useState21([]);
8658
8718
  const layeredFilters = controlledQuery ? controlledQuery.state.layeredFilters ?? [] : internalLayeredFilters;
8659
8719
  const setLayeredFilters = (next) => {
8660
8720
  if (controlledQuery) {
@@ -8663,7 +8723,7 @@ function MatrxDataTableCore({
8663
8723
  }
8664
8724
  setInternalLayeredFilters(next);
8665
8725
  };
8666
- const [internalColumnFilters, setInternalColumnFilters] = useState20({});
8726
+ const [internalColumnFilters, setInternalColumnFilters] = useState21({});
8667
8727
  const columnFilters = controlledQuery ? controlledQuery.state.columnFilters : internalColumnFilters;
8668
8728
  const setColumnFilter = (id, next) => {
8669
8729
  const nextFilters = { ...columnFilters, [id]: next };
@@ -8676,7 +8736,7 @@ function MatrxDataTableCore({
8676
8736
  }
8677
8737
  setInternalColumnFilters(nextFilters);
8678
8738
  };
8679
- const [internalSort, setInternalSort] = useState20(defaultSort);
8739
+ const [internalSort, setInternalSort] = useState21(defaultSort);
8680
8740
  const sort = controlledQuery ? controlledQuery.state.sort : internalSort;
8681
8741
  const setSort = (next) => {
8682
8742
  if (controlledQuery) {
@@ -8685,7 +8745,7 @@ function MatrxDataTableCore({
8685
8745
  }
8686
8746
  setInternalSort(next);
8687
8747
  };
8688
- const [internalPage, setInternalPage] = useState20(1);
8748
+ const [internalPage, setInternalPage] = useState21(1);
8689
8749
  const page = controlledQuery ? controlledQuery.state.page : internalPage;
8690
8750
  const setPage = (next) => {
8691
8751
  if (controlledQuery) {
@@ -8694,7 +8754,7 @@ function MatrxDataTableCore({
8694
8754
  }
8695
8755
  setInternalPage(next);
8696
8756
  };
8697
- const [internalPageSize, setInternalPageSize] = useState20(
8757
+ const [internalPageSize, setInternalPageSize] = useState21(
8698
8758
  defaultPageSize === 0 ? Math.max(data.length, 1) : defaultPageSize
8699
8759
  );
8700
8760
  const pageSize = controlledQuery ? controlledQuery.state.pageSize : internalPageSize;
@@ -8705,26 +8765,26 @@ function MatrxDataTableCore({
8705
8765
  }
8706
8766
  setInternalPageSize(next);
8707
8767
  };
8708
- const [uncontrolledSelectedId, setUncontrolledSelectedId] = useState20(null);
8768
+ const [uncontrolledSelectedId, setUncontrolledSelectedId] = useState21(null);
8709
8769
  const rawSelectedId = controlledSelectedId !== void 0 ? controlledSelectedId : uncontrolledSelectedId;
8710
8770
  const selectedId = appendSourceChanged ? null : rawSelectedId;
8711
8771
  const setSelectedId = (id) => {
8712
8772
  if (controlledSelectedId === void 0) setUncontrolledSelectedId(id);
8713
8773
  onSelectedIdChange?.(id);
8714
8774
  };
8715
- const [uncontrolledWindowRowId, setUncontrolledWindowRowId] = useState20(null);
8775
+ const [uncontrolledWindowRowId, setUncontrolledWindowRowId] = useState21(null);
8716
8776
  const rawWindowRowId = controlledWindowRowId !== void 0 ? controlledWindowRowId : uncontrolledWindowRowId;
8717
8777
  const windowRowId = appendSourceChanged ? null : rawWindowRowId;
8718
8778
  const setWindowRowId = (id) => {
8719
8779
  if (controlledWindowRowId === void 0) setUncontrolledWindowRowId(id);
8720
8780
  onWindowRowIdChange?.(id);
8721
8781
  };
8722
- const [windowRowSnapshot, setWindowRowSnapshot] = useState20(null);
8782
+ const [windowRowSnapshot, setWindowRowSnapshot] = useState21(null);
8723
8783
  const editScopeKey = appendQueryKey === null ? "\0local" : `append:${appendQueryKey}`;
8724
- const [editsByScope, setEditsByScope] = useState20({});
8725
- const editRevisionRef = useRef11({});
8726
- const [savingByScope, setSavingByScope] = useState20({});
8727
- const [confirmForeignDraftDiscard, setConfirmForeignDraftDiscard] = useState20(false);
8784
+ const [editsByScope, setEditsByScope] = useState21({});
8785
+ const editRevisionRef = useRef12({});
8786
+ const [savingByScope, setSavingByScope] = useState21({});
8787
+ const [confirmForeignDraftDiscard, setConfirmForeignDraftDiscard] = useState21(false);
8728
8788
  const edits = editsByScope[editScopeKey]?.values ?? {};
8729
8789
  const saving = (savingByScope[editScopeKey] ?? 0) > 0;
8730
8790
  const setEdits = (next) => {
@@ -8791,7 +8851,7 @@ function MatrxDataTableCore({
8791
8851
  rows: Object.entries(draft.values).map(([rowId, columns2]) => ({ rowId, columns: columns2 }))
8792
8852
  }));
8793
8853
  const selection = appendSourceChanged && selectionConfig ? { ...selectionConfig, selectedIds: [] } : selectionConfig;
8794
- useEffect13(() => {
8854
+ useEffect14(() => {
8795
8855
  const previous = committedAppendQueryKey.current;
8796
8856
  committedAppendQueryKey.current = appendQueryKey;
8797
8857
  if (previous === null || appendQueryKey === null || previous === appendQueryKey) {
@@ -8809,10 +8869,13 @@ function MatrxDataTableCore({
8809
8869
  onWindowRowIdChange,
8810
8870
  selectionConfig
8811
8871
  ]);
8812
- const scrollRef = useRef11(null);
8813
- const tableRef = useRef11(null);
8814
- const cardsScrollRef = useRef11(null);
8815
- const previousAppendKeyForScrollReset = useRef11(appendQueryKey);
8872
+ const scrollRef = useRef12(null);
8873
+ const tableRef = useRef12(null);
8874
+ const tableHeaderRef = useRef12(null);
8875
+ const cardsScrollRef = useRef12(null);
8876
+ const [documentStickyHeader, setDocumentStickyHeader] = useState21(false);
8877
+ const documentStickyHeaderRef = useRef12(false);
8878
+ const previousAppendKeyForScrollReset = useRef12(appendQueryKey);
8816
8879
  useLayoutEffect2(() => {
8817
8880
  const previous = previousAppendKeyForScrollReset.current;
8818
8881
  previousAppendKeyForScrollReset.current = appendQueryKey;
@@ -8838,12 +8901,12 @@ function MatrxDataTableCore({
8838
8901
  ...appendScrollPolicy?.mode === "scroll" && appendScrollPolicy.thresholdPx !== void 0 ? { thresholdPx: appendScrollPolicy.thresholdPx } : {},
8839
8902
  ...appendScrollPolicy?.mode === "scroll" && appendScrollPolicy.intentTimeoutMs !== void 0 ? { intentTimeoutMs: appendScrollPolicy.intentTimeoutMs } : {}
8840
8903
  });
8841
- const rootRef = useRef11(null);
8904
+ const rootRef = useRef12(null);
8842
8905
  useClippedContentGuard(rootRef, {
8843
8906
  label: typeof copy === "object" && copy.listLabel ? `Table: ${copy.listLabel}` : "MatrxDataTable"
8844
8907
  });
8845
- const [scrollHintRight, setScrollHintRight] = useState20(false);
8846
- const [scrollHintLeft, setScrollHintLeft] = useState20(false);
8908
+ const [scrollHintRight, setScrollHintRight] = useState21(false);
8909
+ const [scrollHintLeft, setScrollHintLeft] = useState21(false);
8847
8910
  const updateScrollHint = useCallback6(() => {
8848
8911
  const el = scrollRef.current;
8849
8912
  if (!el) return;
@@ -8858,7 +8921,7 @@ function MatrxDataTableCore({
8858
8921
  behavior: "smooth"
8859
8922
  });
8860
8923
  };
8861
- useEffect13(() => {
8924
+ useEffect14(() => {
8862
8925
  updateScrollHint();
8863
8926
  window.addEventListener("resize", updateScrollHint);
8864
8927
  const el = scrollRef.current;
@@ -8873,26 +8936,85 @@ function MatrxDataTableCore({
8873
8936
  observer?.disconnect();
8874
8937
  };
8875
8938
  }, [updateScrollHint, data, columns]);
8876
- const [columnOrder, setColumnOrder] = useState20(() => columnState?.order ?? columns.map(columnId));
8877
- const [hiddenColumnIds, setHiddenColumnIds] = useState20(
8939
+ useLayoutEffect2(() => {
8940
+ const scroll = scrollRef.current;
8941
+ const table = tableRef.current;
8942
+ const header = tableHeaderRef.current;
8943
+ if (!scroll || !table || !header || !stickyHeader) return;
8944
+ let frame = 0;
8945
+ const update = () => {
8946
+ const hasInternalVerticalScroll = scroll.scrollHeight > scroll.clientHeight + 1;
8947
+ const nextDocumentSticky = !hasInternalVerticalScroll;
8948
+ if (documentStickyHeaderRef.current !== nextDocumentSticky) {
8949
+ documentStickyHeaderRef.current = nextDocumentSticky;
8950
+ setDocumentStickyHeader(nextDocumentSticky);
8951
+ }
8952
+ if (!nextDocumentSticky) {
8953
+ header.style.setProperty("--matrx-document-sticky-offset", "0px");
8954
+ return;
8955
+ }
8956
+ const previousOffset = Number.parseFloat(
8957
+ header.style.getPropertyValue("--matrx-document-sticky-offset")
8958
+ ) || 0;
8959
+ const headerRect = header.getBoundingClientRect();
8960
+ const naturalHeaderTop = headerRect.top - previousOffset;
8961
+ const tableRect = table.getBoundingClientRect();
8962
+ let scrollTargetTop = 0;
8963
+ for (let ancestor = scroll.parentElement; ancestor; ancestor = ancestor.parentElement) {
8964
+ const ancestorStyle = window.getComputedStyle(ancestor);
8965
+ const overflowY = ancestorStyle.overflowY;
8966
+ if (/^(auto|scroll|overlay)$/.test(overflowY) && ancestor.scrollHeight > ancestor.clientHeight + 1) {
8967
+ const scrollPaddingTop = Number.parseFloat(ancestorStyle.scrollPaddingTop) || 0;
8968
+ scrollTargetTop = ancestor.getBoundingClientRect().top + scrollPaddingTop;
8969
+ break;
8970
+ }
8971
+ }
8972
+ const offset = Math.max(
8973
+ 0,
8974
+ Math.min(
8975
+ scrollTargetTop - naturalHeaderTop,
8976
+ tableRect.bottom - headerRect.height - naturalHeaderTop
8977
+ )
8978
+ );
8979
+ header.style.setProperty("--matrx-document-sticky-offset", `${offset}px`);
8980
+ };
8981
+ const requestUpdate = () => {
8982
+ cancelAnimationFrame(frame);
8983
+ frame = requestAnimationFrame(update);
8984
+ };
8985
+ const resizeObserver = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(requestUpdate);
8986
+ resizeObserver?.observe(scroll);
8987
+ resizeObserver?.observe(table);
8988
+ window.addEventListener("scroll", requestUpdate, true);
8989
+ window.addEventListener("resize", requestUpdate);
8990
+ requestUpdate();
8991
+ return () => {
8992
+ cancelAnimationFrame(frame);
8993
+ resizeObserver?.disconnect();
8994
+ window.removeEventListener("scroll", requestUpdate, true);
8995
+ window.removeEventListener("resize", requestUpdate);
8996
+ };
8997
+ }, [stickyHeader, data, columns]);
8998
+ const [columnOrder, setColumnOrder] = useState21(() => columnState?.order ?? columns.map(columnId));
8999
+ const [hiddenColumnIds, setHiddenColumnIds] = useState21(
8878
9000
  () => new Set(columnState?.hidden ?? columns.filter((column) => column.hidden).map(columnId))
8879
9001
  );
8880
- const [columnWidths, setColumnWidths] = useState20(
9002
+ const [columnWidths, setColumnWidths] = useState21(
8881
9003
  () => normalizeColumnWidthsForColumns(columnState?.widths, columns)
8882
9004
  );
8883
- const [fixedTableGeometry, setFixedTableGeometry] = useState20(null);
8884
- const knownColumnIds = useRef11(new Set(columns.map(columnId)));
8885
- const draggedColumnId = useRef11(null);
8886
- const columnDragActive = useRef11(false);
8887
- const columnDragRaf = useRef11(null);
8888
- const columnDragScrollDirection = useRef11(0);
8889
- const [columnDragPreview, setColumnDragPreview] = useState20(null);
9005
+ const [fixedTableGeometry, setFixedTableGeometry] = useState21(null);
9006
+ const knownColumnIds = useRef12(new Set(columns.map(columnId)));
9007
+ const draggedColumnId = useRef12(null);
9008
+ const columnDragActive = useRef12(false);
9009
+ const columnDragRaf = useRef12(null);
9010
+ const columnDragScrollDirection = useRef12(0);
9011
+ const [columnDragPreview, setColumnDragPreview] = useState21(null);
8890
9012
  const stopColumnDragScroll = useCallback6(() => {
8891
9013
  if (columnDragRaf.current !== null) cancelAnimationFrame(columnDragRaf.current);
8892
9014
  columnDragRaf.current = null;
8893
9015
  columnDragScrollDirection.current = 0;
8894
9016
  }, []);
8895
- useEffect13(() => () => {
9017
+ useEffect14(() => () => {
8896
9018
  columnDragActive.current = false;
8897
9019
  stopColumnDragScroll();
8898
9020
  }, [stopColumnDragScroll]);
@@ -8930,7 +9052,7 @@ function MatrxDataTableCore({
8930
9052
  setHiddenColumnIds(hidden);
8931
9053
  }
8932
9054
  }, [columnState]);
8933
- const [internalColumnManagerOpen, setInternalColumnManagerOpen] = useState20(false);
9055
+ const [internalColumnManagerOpen, setInternalColumnManagerOpen] = useState21(false);
8934
9056
  const columnManagerOpen = controlledColumnManager?.open ?? internalColumnManagerOpen;
8935
9057
  const setColumnManagerOpen = controlledColumnManager?.onOpenChange ?? setInternalColumnManagerOpen;
8936
9058
  const columnIds = useMemo7(() => columns.map(columnId), [columns]);
@@ -8940,7 +9062,7 @@ function MatrxDataTableCore({
8940
9062
  () => normalizeColumnWidthsForColumns(columnState?.widths ?? columnWidths, columns),
8941
9063
  [columns, columnState?.widths, columnWidths]
8942
9064
  );
8943
- const resizeGestureSnapshotRef = useRef11(null);
9065
+ const resizeGestureSnapshotRef = useRef12(null);
8944
9066
  const measureVisibleColumnWidths = useCallback6(() => {
8945
9067
  const measured = {};
8946
9068
  const headers = tableRef.current ? Array.from(tableRef.current.querySelectorAll(
@@ -9013,7 +9135,7 @@ function MatrxDataTableCore({
9013
9135
  }
9014
9136
  setColumnWidths(normalized);
9015
9137
  }, [columnIds, columnState, columns, measureFixedTableGeometry, measureVisibleColumnWidths]);
9016
- useEffect13(() => {
9138
+ useEffect14(() => {
9017
9139
  const ids = columns.map(columnId);
9018
9140
  if (columnState) return;
9019
9141
  const previousIds = knownColumnIds.current;
@@ -9198,8 +9320,8 @@ function MatrxDataTableCore({
9198
9320
  intelligentSearchEnabled,
9199
9321
  searchScope
9200
9322
  ]);
9201
- const lastNotifiedViewRows = useRef11(null);
9202
- useEffect13(() => {
9323
+ const lastNotifiedViewRows = useRef12(null);
9324
+ useEffect14(() => {
9203
9325
  if (!onViewChange) {
9204
9326
  lastNotifiedViewRows.current = null;
9205
9327
  return;
@@ -9208,7 +9330,7 @@ function MatrxDataTableCore({
9208
9330
  lastNotifiedViewRows.current = processed;
9209
9331
  if (changed) onViewChange(processed);
9210
9332
  }, [processed, onViewChange]);
9211
- useEffect13(() => {
9333
+ useEffect14(() => {
9212
9334
  if (controlledQuery) return;
9213
9335
  setInternalPage(1);
9214
9336
  }, [
@@ -9260,7 +9382,7 @@ function MatrxDataTableCore({
9260
9382
  const start = (safePage - 1) * effectivePageSize;
9261
9383
  return processed.slice(start, start + effectivePageSize);
9262
9384
  }, [processed, safePage, effectivePageSize, pageSize, remoteQuery, hidePagination, localProgressiveEnabled, progressiveRows.rows]);
9263
- useEffect13(() => {
9385
+ useEffect14(() => {
9264
9386
  if (!controlledQuery || controlledQuery.state.page === safePage) return;
9265
9387
  emitControlledQueryChange({ page: safePage });
9266
9388
  }, [controlledQuery, emitControlledQueryChange, safePage]);
@@ -9279,7 +9401,21 @@ function MatrxDataTableCore({
9279
9401
  );
9280
9402
  const editEnabled = Boolean(edit?.enabled && edit.onSave);
9281
9403
  const showRowCopy = effectiveCopy !== void 0 && effectiveCopy.showRow !== false;
9404
+ const rowCopyInMenu = rowCopyPlacement === "menu" && Boolean(rowActions);
9405
+ const showInlineRowCopy = showRowCopy && !rowCopyInMenu;
9282
9406
  const showToolbarCopy = effectiveCopy !== void 0 && effectiveCopy.showToolbar !== false;
9407
+ const renderRowActions = (row, controls) => {
9408
+ const actions = rowActions?.(row, controls);
9409
+ if (!effectiveCopy || !showRowCopy) return actions;
9410
+ return /* @__PURE__ */ jsx41(
9411
+ MatrxTableRowAlchemyProvider,
9412
+ {
9413
+ copy: tableRowCopyProps(effectiveCopy, row, `${tableCopySourceNamespace}:row:${getRowId(row)}`, copy === void 0 ? declaredVisibleCopyColumns : void 0),
9414
+ placement: rowCopyInMenu ? "menu" : "inline",
9415
+ children: actions
9416
+ }
9417
+ );
9418
+ };
9283
9419
  const activeFilterCount = countActiveColumnFilters(columnFilters);
9284
9420
  const facetActive = (toolbar?.facets ?? []).some((f) => {
9285
9421
  if (f.type === "custom") return f.filter?.active ?? false;
@@ -9354,7 +9490,7 @@ function MatrxDataTableCore({
9354
9490
  const renderedEmptyState = remoteQuery === null && data.length > 0 && hasActiveFilters ? {
9355
9491
  title: "No matching rows",
9356
9492
  description: "No rows match the current search or filters.",
9357
- action: /* @__PURE__ */ jsx40(Button, { type: "button", variant: "outline", size: "sm", onClick: clearAllFilters, children: "Clear filters" }),
9493
+ action: /* @__PURE__ */ jsx41(Button, { type: "button", variant: "outline", size: "sm", onClick: clearAllFilters, children: "Clear filters" }),
9358
9494
  icon: void 0
9359
9495
  } : emptyState;
9360
9496
  const commitCell = (rowId, field, next) => {
@@ -9606,7 +9742,7 @@ function MatrxDataTableCore({
9606
9742
  setEdits({});
9607
9743
  edit?.onCancel?.();
9608
9744
  };
9609
- const showActionsCol = windowEnabled || Boolean(rowActions) || showRowCopy;
9745
+ const showActionsCol = windowEnabled || Boolean(rowActions) || showInlineRowCopy;
9610
9746
  const selectedIdSet = useMemo7(
9611
9747
  () => new Set(selection?.selectedIds ?? []),
9612
9748
  [selection?.selectedIds]
@@ -9623,7 +9759,7 @@ function MatrxDataTableCore({
9623
9759
  () => data.filter((row) => selectedIdSet.has(getRowId(row))),
9624
9760
  [data, selectedIdSet, getRowId]
9625
9761
  );
9626
- const lastToggledIndex = useRef11(null);
9762
+ const lastToggledIndex = useRef12(null);
9627
9763
  const setSelectedIds = (next) => selection?.onSelectedIdsChange([...next]);
9628
9764
  const toggleRowSelected = (index, shiftKey) => {
9629
9765
  if (!selection) return;
@@ -9676,7 +9812,7 @@ function MatrxDataTableCore({
9676
9812
  const display = renderCell(applyRowEdits(row, rowEdits), col, index);
9677
9813
  const href = col.href?.(row) ?? void 0;
9678
9814
  if (editEnabled && col.editable && (col.editableIf?.(row) ?? true)) {
9679
- return /* @__PURE__ */ jsx40(
9815
+ return /* @__PURE__ */ jsx41(
9680
9816
  EditableTableCell,
9681
9817
  {
9682
9818
  value: rowEdits && field in rowEdits ? rowEdits[field] : getCellValue(row, col),
@@ -9690,7 +9826,7 @@ function MatrxDataTableCore({
9690
9826
  }
9691
9827
  );
9692
9828
  }
9693
- return href ? /* @__PURE__ */ jsx40(Link, { href, onClick: (event) => event.stopPropagation(), className: "block w-full min-w-0 rounded outline-none focus-visible:ring-2 focus-visible:ring-ring", children: display }) : display;
9829
+ return href ? /* @__PURE__ */ jsx41(Link, { href, onClick: (event) => event.stopPropagation(), className: "block w-full min-w-0 rounded outline-none focus-visible:ring-2 focus-visible:ring-ring", children: display }) : display;
9694
9830
  };
9695
9831
  const currentViewSnapshot = useMemo7(
9696
9832
  () => ({
@@ -9796,7 +9932,7 @@ function MatrxDataTableCore({
9796
9932
  },
9797
9933
  [columns, commitColumnState, commitColumnWidths, controlledQuery, intelligentSearchEnabled, intelligentSearchScopes, toolbar]
9798
9934
  );
9799
- return /* @__PURE__ */ jsx40(TooltipProvider, { children: /* @__PURE__ */ jsxs30(
9935
+ return /* @__PURE__ */ jsx41(TooltipProvider, { children: /* @__PURE__ */ jsxs31(
9800
9936
  DndContext,
9801
9937
  {
9802
9938
  id: tableDndContextId,
@@ -9889,7 +10025,7 @@ function MatrxDataTableCore({
9889
10025
  commitColumnState(order, effectiveHiddenColumnIds);
9890
10026
  },
9891
10027
  children: [
9892
- /* @__PURE__ */ jsxs30(
10028
+ /* @__PURE__ */ jsxs31(
9893
10029
  "div",
9894
10030
  {
9895
10031
  ref: rootRef,
@@ -9903,14 +10039,14 @@ function MatrxDataTableCore({
9903
10039
  ),
9904
10040
  children: [
9905
10041
  notice,
9906
- savedViewError ? /* @__PURE__ */ jsx40("p", { role: "alert", className: "shrink-0 text-xs text-destructive", children: savedViewError }) : null,
9907
- toolbarActionError ? /* @__PURE__ */ jsx40("p", { role: "alert", className: "shrink-0 text-xs text-destructive", children: toolbarActionError }) : null,
9908
- !hideToolbar && (viewTabs || toolbar?.title || showSearch || toolbar?.anyOf || toolbar?.layeredFilters || toolbar?.facets && toolbar.facets.length > 0 || toolbar?.leading || toolbar?.actions || toolbar?.refresh || toolbar?.add || tableId && SavedViews || hasActiveFilters || showToolbarCopy || columns.length > 0) && /* @__PURE__ */ jsxs30(
10042
+ savedViewError ? /* @__PURE__ */ jsx41("p", { role: "alert", className: "shrink-0 text-xs text-destructive", children: savedViewError }) : null,
10043
+ toolbarActionError ? /* @__PURE__ */ jsx41("p", { role: "alert", className: "shrink-0 text-xs text-destructive", children: toolbarActionError }) : null,
10044
+ !hideToolbar && (viewTabs || toolbar?.title || showSearch || toolbar?.anyOf || toolbar?.layeredFilters || toolbar?.facets && toolbar.facets.length > 0 || toolbar?.leading || toolbar?.actions || toolbar?.refresh || toolbar?.add || tableId && SavedViews || hasActiveFilters || showToolbarCopy || columns.length > 0) && /* @__PURE__ */ jsxs31(
9909
10045
  TableTitleRow,
9910
10046
  {
9911
- tabs: viewTabs ? /* @__PURE__ */ jsx40(TableViewWorkspace, { snapshot: currentViewSnapshot, onApply: applySavedView, related: relatedTableActions }, tableId ?? "table") : void 0,
10047
+ tabs: viewTabs ? /* @__PURE__ */ jsx41(TableViewWorkspace, { snapshot: currentViewSnapshot, onApply: applySavedView, related: relatedTableActions }, tableId ?? "table") : void 0,
9912
10048
  ...toolbar?.title === void 0 ? {} : { title: toolbar.title },
9913
- context: tableId && SavedViews ? /* @__PURE__ */ jsx40("span", { "data-matrx-table-view-control": true, children: /* @__PURE__ */ jsx40(
10049
+ context: tableId && SavedViews ? /* @__PURE__ */ jsx41("span", { "data-matrx-table-view-control": true, children: /* @__PURE__ */ jsx41(
9914
10050
  SavedViews,
9915
10051
  {
9916
10052
  tableId,
@@ -9919,7 +10055,7 @@ function MatrxDataTableCore({
9919
10055
  onApply: applySavedView
9920
10056
  }
9921
10057
  ) }) : void 0,
9922
- search: showSearch ? intelligentSearchEnabled ? /* @__PURE__ */ jsx40(
10058
+ search: showSearch ? intelligentSearchEnabled ? /* @__PURE__ */ jsx41(
9923
10059
  TableSearch,
9924
10060
  {
9925
10061
  value: searchValue,
@@ -9929,7 +10065,7 @@ function MatrxDataTableCore({
9929
10065
  scopes: intelligentSearchScopes,
9930
10066
  ...toolbar?.searchPlaceholder === void 0 ? {} : { placeholder: toolbar.searchPlaceholder }
9931
10067
  }
9932
- ) : /* @__PURE__ */ jsxs30(
10068
+ ) : /* @__PURE__ */ jsxs31(
9933
10069
  "div",
9934
10070
  {
9935
10071
  "data-matrx-table-search": true,
@@ -9938,9 +10074,9 @@ function MatrxDataTableCore({
9938
10074
  toolbar?.searchMatch ? "sm:max-w-md" : "sm:max-w-xs"
9939
10075
  ),
9940
10076
  children: [
9941
- /* @__PURE__ */ jsxs30("div", { className: "relative min-w-0 flex-1", children: [
9942
- /* @__PURE__ */ jsx40(Search, { className: "absolute left-2 top-1/2 h-5 w-5 -translate-y-1/2 text-muted-foreground" }),
9943
- /* @__PURE__ */ jsx40(
10077
+ /* @__PURE__ */ jsxs31("div", { className: "relative min-w-0 flex-1", children: [
10078
+ /* @__PURE__ */ jsx41(Search, { className: "absolute left-2 top-1/2 h-5 w-5 -translate-y-1/2 text-muted-foreground" }),
10079
+ /* @__PURE__ */ jsx41(
9944
10080
  Input,
9945
10081
  {
9946
10082
  value: searchValue,
@@ -9953,22 +10089,22 @@ function MatrxDataTableCore({
9953
10089
  style: { fontSize: "16px" }
9954
10090
  }
9955
10091
  ),
9956
- searchValue ? /* @__PURE__ */ jsxs30(Tooltip, { children: [
9957
- /* @__PURE__ */ jsx40(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx40(
10092
+ searchValue ? /* @__PURE__ */ jsxs31(Tooltip, { children: [
10093
+ /* @__PURE__ */ jsx41(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx41(
9958
10094
  "button",
9959
10095
  {
9960
10096
  type: "button",
9961
10097
  "aria-label": "Clear search",
9962
10098
  className: "absolute right-1.5 top-1/2 -translate-y-1/2 rounded p-0.5 text-muted-foreground hover:text-foreground",
9963
10099
  onClick: () => setSearchValue(""),
9964
- children: /* @__PURE__ */ jsx40(X, { className: "h-5 w-5" })
10100
+ children: /* @__PURE__ */ jsx41(X, { className: "h-5 w-5" })
9965
10101
  }
9966
10102
  ) }),
9967
- /* @__PURE__ */ jsx40(TooltipContent, { children: "Clear search" })
10103
+ /* @__PURE__ */ jsx41(TooltipContent, { children: "Clear search" })
9968
10104
  ] }) : null
9969
10105
  ] }),
9970
- toolbar?.searchMatch ? /* @__PURE__ */ jsxs30(Tooltip, { children: [
9971
- /* @__PURE__ */ jsx40(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs30(
10106
+ toolbar?.searchMatch ? /* @__PURE__ */ jsxs31(Tooltip, { children: [
10107
+ /* @__PURE__ */ jsx41(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs31(
9972
10108
  Button,
9973
10109
  {
9974
10110
  type: "button",
@@ -9981,18 +10117,18 @@ function MatrxDataTableCore({
9981
10117
  searchMatchMode === "whole_words" ? "contains" : "whole_words"
9982
10118
  ),
9983
10119
  children: [
9984
- /* @__PURE__ */ jsx40(WholeWord, { className: "h-5 w-5" }),
10120
+ /* @__PURE__ */ jsx41(WholeWord, { className: "h-5 w-5" }),
9985
10121
  searchMatchMode === "whole_words" ? "Whole words" : "Contains"
9986
10122
  ]
9987
10123
  }
9988
10124
  ) }),
9989
- /* @__PURE__ */ jsx40(TooltipContent, { children: searchMatchMode === "whole_words" ? "Whole words \u2014 click to match text anywhere" : "Contains text \u2014 click to require whole words" })
10125
+ /* @__PURE__ */ jsx41(TooltipContent, { children: searchMatchMode === "whole_words" ? "Whole words \u2014 click to match text anywhere" : "Contains text \u2014 click to require whole words" })
9990
10126
  ] }) : null
9991
10127
  ]
9992
10128
  }
9993
10129
  ) : null,
9994
10130
  children: [
9995
- toolbar?.layeredFilters ? /* @__PURE__ */ jsx40(
10131
+ toolbar?.layeredFilters ? /* @__PURE__ */ jsx41(
9996
10132
  LayeredFilterBuilder,
9997
10133
  {
9998
10134
  fields: toolbar.layeredFilters.fields,
@@ -10002,9 +10138,9 @@ function MatrxDataTableCore({
10002
10138
  label: toolbar.layeredFilters.label
10003
10139
  }
10004
10140
  ) : null,
10005
- toolbar?.anyOf ? /* @__PURE__ */ jsxs30("div", { className: "relative w-full max-w-xs", children: [
10006
- /* @__PURE__ */ jsx40(Search, { className: "absolute left-2 top-1/2 h-5 w-5 -translate-y-1/2 text-muted-foreground" }),
10007
- /* @__PURE__ */ jsx40(
10141
+ toolbar?.anyOf ? /* @__PURE__ */ jsxs31("div", { className: "relative w-full max-w-xs", children: [
10142
+ /* @__PURE__ */ jsx41(Search, { className: "absolute left-2 top-1/2 h-5 w-5 -translate-y-1/2 text-muted-foreground" }),
10143
+ /* @__PURE__ */ jsx41(
10008
10144
  Input,
10009
10145
  {
10010
10146
  value: anyOfValue,
@@ -10014,22 +10150,22 @@ function MatrxDataTableCore({
10014
10150
  style: { fontSize: "16px" }
10015
10151
  }
10016
10152
  ),
10017
- anyOfValue ? /* @__PURE__ */ jsxs30(Tooltip, { children: [
10018
- /* @__PURE__ */ jsx40(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx40(
10153
+ anyOfValue ? /* @__PURE__ */ jsxs31(Tooltip, { children: [
10154
+ /* @__PURE__ */ jsx41(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx41(
10019
10155
  "button",
10020
10156
  {
10021
10157
  type: "button",
10022
10158
  "aria-label": "Clear match-any search",
10023
10159
  className: "absolute right-1.5 top-1/2 -translate-y-1/2 rounded p-0.5 text-muted-foreground hover:text-foreground",
10024
10160
  onClick: () => setAnyOfValue(""),
10025
- children: /* @__PURE__ */ jsx40(X, { className: "h-5 w-5" })
10161
+ children: /* @__PURE__ */ jsx41(X, { className: "h-5 w-5" })
10026
10162
  }
10027
10163
  ) }),
10028
- /* @__PURE__ */ jsx40(TooltipContent, { children: "Clear match-any search" })
10164
+ /* @__PURE__ */ jsx41(TooltipContent, { children: "Clear match-any search" })
10029
10165
  ] }) : null
10030
10166
  ] }) : null,
10031
- renderedFacets ? /* @__PURE__ */ jsx40(ToolbarFacets, { facets: renderedFacets }) : null,
10032
- toolbar?.leading ? /* @__PURE__ */ jsx40(
10167
+ renderedFacets ? /* @__PURE__ */ jsx41(ToolbarFacets, { facets: renderedFacets }) : null,
10168
+ toolbar?.leading ? /* @__PURE__ */ jsx41(
10033
10169
  "div",
10034
10170
  {
10035
10171
  "data-matrx-table-toolbar-extras": true,
@@ -10037,13 +10173,13 @@ function MatrxDataTableCore({
10037
10173
  children: toolbar.leading
10038
10174
  }
10039
10175
  ) : null,
10040
- /* @__PURE__ */ jsxs30(
10176
+ /* @__PURE__ */ jsxs31(
10041
10177
  "div",
10042
10178
  {
10043
10179
  "data-matrx-table-actions": true,
10044
10180
  className: "ml-auto flex min-w-0 flex-wrap items-center gap-0",
10045
10181
  children: [
10046
- sourceTotal !== void 0 ? /* @__PURE__ */ jsxs30(
10182
+ sourceTotal !== void 0 ? /* @__PURE__ */ jsxs31(
10047
10183
  "span",
10048
10184
  {
10049
10185
  "data-matrx-table-source-total": true,
@@ -10060,7 +10196,7 @@ function MatrxDataTableCore({
10060
10196
  ]
10061
10197
  }
10062
10198
  ) : null,
10063
- /* @__PURE__ */ jsx40(
10199
+ /* @__PURE__ */ jsx41(
10064
10200
  TableToolbarAction,
10065
10201
  {
10066
10202
  HostAction: host.ToolbarAction,
@@ -10068,10 +10204,10 @@ function MatrxDataTableCore({
10068
10204
  tooltip: hasActiveFilters ? "Clear search and filters; keep columns and sort" : "No search or filters to clear",
10069
10205
  disabled: !hasActiveFilters,
10070
10206
  onClick: clearAllFilters,
10071
- children: /* @__PURE__ */ jsx40(Eraser, {})
10207
+ children: /* @__PURE__ */ jsx41(Eraser, {})
10072
10208
  }
10073
10209
  ),
10074
- showToolbarCopy && effectiveCopy ? /* @__PURE__ */ jsx40(
10210
+ showToolbarCopy && effectiveCopy ? /* @__PURE__ */ jsx41(
10075
10211
  CopyButtons,
10076
10212
  {
10077
10213
  size: "toolbar",
@@ -10114,17 +10250,17 @@ function MatrxDataTableCore({
10114
10250
  }
10115
10251
  }
10116
10252
  ) : null,
10117
- columns.length > 0 ? /* @__PURE__ */ jsx40(
10253
+ columns.length > 0 ? /* @__PURE__ */ jsx41(
10118
10254
  TableToolbarAction,
10119
10255
  {
10120
10256
  HostAction: host.ToolbarAction,
10121
10257
  ariaLabel: "Columns",
10122
10258
  tooltip: "Show, hide, or reorder columns",
10123
10259
  onClick: () => setColumnManagerOpen(true),
10124
- children: /* @__PURE__ */ jsx40(SlidersHorizontal, {})
10260
+ children: /* @__PURE__ */ jsx41(SlidersHorizontal, {})
10125
10261
  }
10126
10262
  ) : null,
10127
- toolbar?.refresh ? /* @__PURE__ */ jsx40(
10263
+ toolbar?.refresh ? /* @__PURE__ */ jsx41(
10128
10264
  TableToolbarAction,
10129
10265
  {
10130
10266
  HostAction: host.ToolbarAction,
@@ -10146,10 +10282,10 @@ function MatrxDataTableCore({
10146
10282
  setToolbarActionPending((current) => ({ ...current, refresh: false }));
10147
10283
  });
10148
10284
  },
10149
- children: /* @__PURE__ */ jsx40(RefreshControlIcon, { spinning: isFetching || toolbarActionPending.refresh })
10285
+ children: /* @__PURE__ */ jsx41(RefreshControlIcon, { spinning: isFetching || toolbarActionPending.refresh })
10150
10286
  }
10151
10287
  ) : null,
10152
- toolbar?.add ? /* @__PURE__ */ jsx40(
10288
+ toolbar?.add ? /* @__PURE__ */ jsx41(
10153
10289
  TableToolbarAction,
10154
10290
  {
10155
10291
  HostAction: host.ToolbarAction,
@@ -10171,7 +10307,7 @@ function MatrxDataTableCore({
10171
10307
  setToolbarActionPending((current) => ({ ...current, add: false }));
10172
10308
  });
10173
10309
  },
10174
- children: /* @__PURE__ */ jsx40(Plus, {})
10310
+ children: /* @__PURE__ */ jsx41(Plus, {})
10175
10311
  }
10176
10312
  ) : null,
10177
10313
  toolbar?.actions
@@ -10181,15 +10317,15 @@ function MatrxDataTableCore({
10181
10317
  ]
10182
10318
  }
10183
10319
  ),
10184
- selection && selectionCount > 0 ? /* @__PURE__ */ jsxs30("div", { className: "flex shrink-0 flex-wrap items-center gap-2 rounded-md border border-primary/30 bg-primary/5 px-2 py-1.5", children: [
10185
- /* @__PURE__ */ jsxs30("span", { className: "text-xs font-medium text-foreground", children: [
10320
+ selection && selectionCount > 0 ? /* @__PURE__ */ jsxs31("div", { className: "flex shrink-0 flex-wrap items-center gap-2 rounded-md border border-primary/30 bg-primary/5 px-2 py-1.5", children: [
10321
+ /* @__PURE__ */ jsxs31("span", { className: "text-xs font-medium text-foreground", children: [
10186
10322
  formatCount3(selectionCount),
10187
10323
  " ",
10188
10324
  selectionNoun,
10189
10325
  selectionCount === 1 ? "" : "s",
10190
10326
  " selected"
10191
10327
  ] }),
10192
- /* @__PURE__ */ jsxs30(
10328
+ /* @__PURE__ */ jsxs31(
10193
10329
  Button,
10194
10330
  {
10195
10331
  type: "button",
@@ -10201,13 +10337,13 @@ function MatrxDataTableCore({
10201
10337
  selection.onSelectedIdsChange([]);
10202
10338
  },
10203
10339
  children: [
10204
- /* @__PURE__ */ jsx40(X, { className: "h-3.5 w-3.5" }),
10340
+ /* @__PURE__ */ jsx41(X, { className: "h-3.5 w-3.5" }),
10205
10341
  "Clear"
10206
10342
  ]
10207
10343
  }
10208
10344
  ),
10209
- /* @__PURE__ */ jsxs30("div", { className: "ml-auto flex flex-wrap items-center gap-1.5", children: [
10210
- effectiveCopy && selectedRows.length > 0 ? /* @__PURE__ */ jsx40(
10345
+ /* @__PURE__ */ jsxs31("div", { className: "ml-auto flex flex-wrap items-center gap-1.5", children: [
10346
+ effectiveCopy && selectedRows.length > 0 ? /* @__PURE__ */ jsx41(
10211
10347
  CopyButtons,
10212
10348
  {
10213
10349
  size: "icon",
@@ -10240,9 +10376,9 @@ function MatrxDataTableCore({
10240
10376
  selection.actions?.(selectedRows, selection.selectedIds)
10241
10377
  ] })
10242
10378
  ] }) : null,
10243
- /* @__PURE__ */ jsxs30("div", { "data-matrx-table-body-region": true, className: "flex min-h-0 flex-1 flex-col gap-2", children: [
10244
- /* @__PURE__ */ jsxs30("div", { className: "relative min-h-0 flex-1", children: [
10245
- mobileCards ? /* @__PURE__ */ jsxs30(
10379
+ /* @__PURE__ */ jsxs31("div", { "data-matrx-table-body-region": true, className: "flex min-h-0 flex-1 flex-col gap-2", children: [
10380
+ /* @__PURE__ */ jsxs31("div", { className: "relative min-h-0 flex-1", children: [
10381
+ mobileCards ? /* @__PURE__ */ jsxs31(
10246
10382
  "div",
10247
10383
  {
10248
10384
  ref: cardsScrollRef,
@@ -10250,37 +10386,37 @@ function MatrxDataTableCore({
10250
10386
  "aria-busy": isLoading || isFetching,
10251
10387
  ...appendQuery === null ? {} : { style: { containerType: "inline-size" } },
10252
10388
  className: cn(
10253
- "flex h-full min-h-0 flex-col gap-2 overflow-y-auto rounded-md border border-border bg-card p-2",
10389
+ "relative flex h-full min-h-0 flex-col gap-2 overflow-y-auto rounded-md border border-border bg-card p-2",
10254
10390
  mobileCardsClass
10255
10391
  ),
10256
10392
  children: [
10257
- isFetching && !isLoading && appendQuery === null ? /* @__PURE__ */ jsxs30(
10393
+ isFetching && !isLoading && appendQuery === null ? /* @__PURE__ */ jsxs31(
10258
10394
  "div",
10259
10395
  {
10260
10396
  role: "status",
10261
- className: "h-0.5 shrink-0 overflow-hidden rounded-full bg-primary/15",
10397
+ className: "pointer-events-none absolute inset-x-0 top-0 z-20 h-0.5 overflow-hidden bg-primary/15",
10262
10398
  children: [
10263
- /* @__PURE__ */ jsx40("div", { className: "h-full w-full animate-pulse bg-primary" }),
10264
- /* @__PURE__ */ jsx40("span", { className: "sr-only", children: "Refreshing table data" })
10399
+ /* @__PURE__ */ jsx41("div", { className: "h-full w-full animate-pulse bg-primary" }),
10400
+ /* @__PURE__ */ jsx41("span", { className: "sr-only", children: "Refreshing table data" })
10265
10401
  ]
10266
10402
  }
10267
10403
  ) : null,
10268
- isLoading ? Array.from({ length: 4 }).map((_, index) => /* @__PURE__ */ jsx40(
10404
+ isLoading ? Array.from({ length: 4 }).map((_, index) => /* @__PURE__ */ jsx41(
10269
10405
  Skeleton,
10270
10406
  {
10271
10407
  className: "h-52 w-full shrink-0 rounded-lg"
10272
10408
  },
10273
10409
  `mobile-card-sk-${index}`
10274
- )) : paginated.length === 0 ? /* @__PURE__ */ jsx40("div", { className: "flex min-h-48 flex-1 items-center justify-center px-4 py-12 text-center", children: /* @__PURE__ */ jsxs30("div", { className: "flex max-w-sm flex-col items-center gap-2", children: [
10410
+ )) : paginated.length === 0 ? /* @__PURE__ */ jsx41("div", { className: "flex min-h-48 flex-1 items-center justify-center px-4 py-12 text-center", children: /* @__PURE__ */ jsxs31("div", { className: "flex max-w-sm flex-col items-center gap-2", children: [
10275
10411
  renderedEmptyState?.icon,
10276
- /* @__PURE__ */ jsx40("p", { className: "text-sm font-medium text-foreground", children: renderedEmptyState?.title ?? "No rows" }),
10277
- renderedEmptyState?.description ? /* @__PURE__ */ jsx40("p", { className: "text-xs text-muted-foreground", children: renderedEmptyState.description }) : null,
10412
+ /* @__PURE__ */ jsx41("p", { className: "text-sm font-medium text-foreground", children: renderedEmptyState?.title ?? "No rows" }),
10413
+ renderedEmptyState?.description ? /* @__PURE__ */ jsx41("p", { className: "text-xs text-muted-foreground", children: renderedEmptyState.description }) : null,
10278
10414
  renderedEmptyState?.action
10279
10415
  ] }) }) : paginated.map((row, index) => {
10280
10416
  const id = getRowId(row);
10281
10417
  const displayRow = applyRowEdits(row, edits[id]);
10282
10418
  const selectable = selection?.isRowSelectable?.(row) ?? Boolean(selection);
10283
- return /* @__PURE__ */ jsx40(Fragment6, { children: mobileCards(displayRow, index, {
10419
+ return /* @__PURE__ */ jsx41(Fragment6, { children: mobileCards(displayRow, index, {
10284
10420
  renderCell: (columnKey) => {
10285
10421
  const column = columns.find((candidate) => columnId(candidate) === columnKey);
10286
10422
  return column ? renderRecordCell(row, column, index) : null;
@@ -10296,14 +10432,14 @@ function MatrxDataTableCore({
10296
10432
  else next.delete(id);
10297
10433
  setSelectedIds(next);
10298
10434
  },
10299
- actions: showRowCopy || rowActions ? /* @__PURE__ */ jsxs30(
10435
+ actions: showInlineRowCopy || rowActions ? /* @__PURE__ */ jsxs31(
10300
10436
  "div",
10301
10437
  {
10302
10438
  "data-matrx-table-row-actions": true,
10303
10439
  className: "inline-flex items-center justify-end gap-0",
10304
10440
  onClick: (event) => event.stopPropagation(),
10305
10441
  children: [
10306
- showRowCopy && effectiveCopy ? /* @__PURE__ */ jsx40(
10442
+ showInlineRowCopy && effectiveCopy ? /* @__PURE__ */ jsx41(
10307
10443
  TableRowCopyControl,
10308
10444
  {
10309
10445
  size: "toolbar",
@@ -10313,7 +10449,7 @@ function MatrxDataTableCore({
10313
10449
  ...copy === void 0 ? { defaultColumns: declaredVisibleCopyColumns } : {}
10314
10450
  }
10315
10451
  ) : null,
10316
- rowActions?.(displayRow, {
10452
+ renderRowActions(displayRow, {
10317
10453
  closeDetail: () => setSelectedId(null),
10318
10454
  openDetail: () => openDetail(displayRow),
10319
10455
  openWindow: () => openWindow(displayRow),
@@ -10326,7 +10462,7 @@ function MatrxDataTableCore({
10326
10462
  ) : null
10327
10463
  }) }, id);
10328
10464
  }),
10329
- appendQuery !== null && isFetching && !isLoading ? /* @__PURE__ */ jsxs30(
10465
+ appendQuery !== null && isFetching && !isLoading ? /* @__PURE__ */ jsxs31(
10330
10466
  "div",
10331
10467
  {
10332
10468
  "data-matrx-table-append-loading-card": true,
@@ -10334,7 +10470,7 @@ function MatrxDataTableCore({
10334
10470
  "aria-live": "polite",
10335
10471
  className: "sticky bottom-0 z-20 flex h-16 w-full max-w-[100cqw] shrink-0 items-center justify-center gap-2 rounded-md border border-border bg-card/95 px-3 text-sm font-medium text-foreground shadow-sm backdrop-blur-sm",
10336
10472
  children: [
10337
- /* @__PURE__ */ jsx40(
10473
+ /* @__PURE__ */ jsx41(
10338
10474
  Loader2,
10339
10475
  {
10340
10476
  "aria-hidden": "true",
@@ -10348,7 +10484,7 @@ function MatrxDataTableCore({
10348
10484
  ]
10349
10485
  }
10350
10486
  ) : null,
10351
- /* @__PURE__ */ jsxs30(
10487
+ /* @__PURE__ */ jsxs31(
10352
10488
  "div",
10353
10489
  {
10354
10490
  ref: scrollRef,
@@ -10362,32 +10498,32 @@ function MatrxDataTableCore({
10362
10498
  tableClassName
10363
10499
  ),
10364
10500
  children: [
10365
- hierarchy && draggedRow ? /* @__PURE__ */ jsx40(
10501
+ hierarchy && draggedRow ? /* @__PURE__ */ jsx41(
10366
10502
  HierarchyRootDropTarget,
10367
10503
  {
10368
10504
  label: hierarchy.rootDropLabel ?? "Drop here to move to the top level",
10369
10505
  draggedLabel: hierarchy.itemLabel?.(draggedRow) ?? "Moving row"
10370
10506
  }
10371
10507
  ) : null,
10372
- hierarchy && draggedRowId ? /* @__PURE__ */ jsx40(
10508
+ hierarchy && draggedRowId ? /* @__PURE__ */ jsx41(
10373
10509
  HierarchyDragIndicatorLayer,
10374
10510
  {
10375
10511
  scrollRef,
10376
10512
  resolve: resolveHierarchyMove
10377
10513
  }
10378
10514
  ) : null,
10379
- isFetching && !isLoading && appendQuery === null ? /* @__PURE__ */ jsxs30(
10515
+ isFetching && !isLoading && appendQuery === null ? /* @__PURE__ */ jsxs31(
10380
10516
  "div",
10381
10517
  {
10382
10518
  role: "status",
10383
- className: "sticky left-0 top-0 z-20 h-0.5 w-full overflow-hidden bg-primary/15",
10519
+ className: "pointer-events-none absolute inset-x-0 top-0 z-20 h-0.5 overflow-hidden bg-primary/15",
10384
10520
  children: [
10385
- /* @__PURE__ */ jsx40("div", { className: "h-full w-full animate-pulse bg-primary" }),
10386
- /* @__PURE__ */ jsx40("span", { className: "sr-only", children: "Refreshing table data" })
10521
+ /* @__PURE__ */ jsx41("div", { className: "h-full w-full animate-pulse bg-primary" }),
10522
+ /* @__PURE__ */ jsx41("span", { className: "sr-only", children: "Refreshing table data" })
10387
10523
  ]
10388
10524
  }
10389
10525
  ) : null,
10390
- /* @__PURE__ */ jsxs30(
10526
+ /* @__PURE__ */ jsxs31(
10391
10527
  "table",
10392
10528
  {
10393
10529
  ref: tableRef,
@@ -10405,146 +10541,157 @@ function MatrxDataTableCore({
10405
10541
  fixedLayoutActive && "sm:table-fixed sm:max-w-none sm:w-[var(--matrx-resized-table-width)]"
10406
10542
  ),
10407
10543
  children: [
10408
- /* @__PURE__ */ jsx40("thead", { className: "sticky top-0 z-10 border-b border-border bg-muted/90 shadow-[0_1px_0_0_var(--border)] backdrop-blur-sm", children: /* @__PURE__ */ jsxs30("tr", { children: [
10409
- selection ? /* @__PURE__ */ jsx40(
10410
- "th",
10411
- {
10412
- "data-matrx-table-selection-column": true,
10413
- className: "h-9 w-9 px-2 text-left align-middle",
10414
- style: fixedUtilityWidth(fixedTableGeometry?.selectionWidth),
10415
- children: /* @__PURE__ */ jsx40(
10416
- "div",
10544
+ /* @__PURE__ */ jsx41(
10545
+ "thead",
10546
+ {
10547
+ ref: tableHeaderRef,
10548
+ "data-matrx-table-sticky-header": stickyHeader ? "true" : void 0,
10549
+ className: cn(
10550
+ "z-10 border-b border-border bg-muted/90 shadow-[0_1px_0_0_var(--border)] backdrop-blur-sm",
10551
+ stickyHeader && (documentStickyHeader ? "relative translate-y-[var(--matrx-document-sticky-offset)]" : "sticky top-0")
10552
+ ),
10553
+ children: /* @__PURE__ */ jsxs31("tr", { children: [
10554
+ selection ? /* @__PURE__ */ jsx41(
10555
+ "th",
10417
10556
  {
10418
- "data-matrx-table-selection-target": true,
10419
- onClick: (event) => {
10420
- if (event.target === event.currentTarget) {
10421
- event.currentTarget.querySelector('[role="checkbox"]')?.click();
10422
- }
10423
- },
10424
- children: /* @__PURE__ */ jsx40(
10425
- Checkbox,
10557
+ "data-matrx-table-selection-column": true,
10558
+ className: "h-9 w-9 px-2 text-left align-middle",
10559
+ style: fixedUtilityWidth(fixedTableGeometry?.selectionWidth),
10560
+ children: /* @__PURE__ */ jsx41(
10561
+ "div",
10426
10562
  {
10427
- className: CHECKBOX_TAP_AREA,
10428
- checked: allOnPageSelected ? true : someOnPageSelected ? "indeterminate" : false,
10429
- disabled: selectableRows.length === 0,
10430
- onCheckedChange: toggleAllOnPage,
10431
- "aria-label": allOnPageSelected ? "Clear selection on this page" : "Select every row on this page"
10563
+ "data-matrx-table-selection-target": true,
10564
+ onClick: (event) => {
10565
+ if (event.target === event.currentTarget) {
10566
+ event.currentTarget.querySelector('[role="checkbox"]')?.click();
10567
+ }
10568
+ },
10569
+ children: /* @__PURE__ */ jsx41(
10570
+ Checkbox,
10571
+ {
10572
+ className: CHECKBOX_TAP_AREA,
10573
+ checked: allOnPageSelected ? true : someOnPageSelected ? "indeterminate" : false,
10574
+ disabled: selectableRows.length === 0,
10575
+ onCheckedChange: toggleAllOnPage,
10576
+ "aria-label": allOnPageSelected ? "Clear selection on this page" : "Select every row on this page"
10577
+ }
10578
+ )
10432
10579
  }
10433
10580
  )
10434
10581
  }
10435
- )
10436
- }
10437
- ) : null,
10438
- visibleColumns.map((col) => {
10439
- const id = columnId(col);
10440
- const meta = filterMeta.get(id);
10441
- const isSorted = sort?.id === id;
10442
- const headerLabel = col.label ?? (typeof col.header === "string" ? col.header : id);
10443
- const defaultSortDirection = col.defaultSortDirection ?? "asc";
10444
- const isColumnDragShadow = columnDragPreview?.draggedId === id && columnDragPreview.targetId !== null;
10445
- const columnResizable = resizableColumns && col.resizable !== false;
10446
- return /* @__PURE__ */ jsxs30(
10447
- "th",
10448
- {
10449
- "data-matrx-table-column-id": id,
10450
- "data-matrx-column-drag-shadow": isColumnDragShadow ? "true" : void 0,
10451
- "aria-sort": isSorted ? sort?.direction === "asc" ? "ascending" : "descending" : void 0,
10452
- className: cn(
10453
- "relative h-9 text-left align-middle max-sm:whitespace-nowrap",
10454
- // ICON COLUMN (MatrxColumnDef.compact): a 40px star
10455
- // column cannot honor `width: 40` while paying 16px of
10456
- // padding for a 14px glyph.
10457
- col.compact ? "px-1" : "px-2",
10458
- // An intentional mobile column set (see
10459
- // MatrxColumnDef.mobileHidden). CSS, not a JS
10460
- // breakpoint — no hydration mismatch, and the column
10461
- // stays sortable/filterable from the toolbar.
10462
- col.mobileHidden && "max-sm:hidden",
10463
- // Consumer widths are desktop tuning: applied from `sm`
10464
- // up via a CSS var. The minimum is load-bearing: without
10465
- // it, a crowded table crushes a declared 190px column to a
10466
- // few characters wide instead of using the canonical
10467
- // horizontal-scroll surface.
10468
- (col.width !== void 0 || columnResizable) && "sm:w-[var(--matrx-col-w)] sm:min-w-[var(--matrx-col-w)]",
10469
- col.headerClassName,
10470
- isColumnDragShadow && "bg-primary/10 shadow-[inset_2px_0_0_var(--primary),inset_-2px_0_0_var(--primary)]",
10471
- col.align === "center" && "text-center",
10472
- col.align === "right" && "text-right"
10473
- ),
10474
- style: columnWidthVar(col.width, effectiveColumnWidths[id], id, columnResizable),
10475
- children: [
10476
- /* @__PURE__ */ jsx40(ColumnHeaderDropZone, { id, enabled: reorderableColumns, children: /* @__PURE__ */ jsx40(
10477
- ColumnHeaderCell,
10478
- {
10479
- label: col.header,
10480
- labelText: headerLabel,
10481
- sortable: col.sortable !== false,
10482
- isSorted: Boolean(isSorted),
10483
- sortDirection: sort?.direction ?? defaultSortDirection,
10484
- onSortAsc: () => setSort({ id, direction: "asc" }),
10485
- onSortDesc: () => setSort({ id, direction: "desc" }),
10486
- onClearSort: () => setSort(null),
10487
- onHeaderSortClick: () => {
10488
- if (!isSorted) {
10489
- setSort({ id, direction: defaultSortDirection });
10490
- return;
10582
+ ) : null,
10583
+ visibleColumns.map((col) => {
10584
+ const id = columnId(col);
10585
+ const meta = filterMeta.get(id);
10586
+ const isSorted = sort?.id === id;
10587
+ const headerLabel = col.label ?? (typeof col.header === "string" ? col.header : id);
10588
+ const defaultSortDirection = col.defaultSortDirection ?? "asc";
10589
+ const isColumnDragShadow = columnDragPreview?.draggedId === id && columnDragPreview.targetId !== null;
10590
+ const columnResizable = resizableColumns && col.resizable !== false;
10591
+ return /* @__PURE__ */ jsxs31(
10592
+ "th",
10593
+ {
10594
+ "data-matrx-table-column-id": id,
10595
+ "data-matrx-column-drag-shadow": isColumnDragShadow ? "true" : void 0,
10596
+ "aria-sort": isSorted ? sort?.direction === "asc" ? "ascending" : "descending" : void 0,
10597
+ className: cn(
10598
+ "relative h-9 text-left align-middle max-sm:whitespace-nowrap",
10599
+ // ICON COLUMN (MatrxColumnDef.compact): a 40px star
10600
+ // column cannot honor `width: 40` while paying 16px of
10601
+ // padding for a 14px glyph.
10602
+ col.compact ? "px-1" : "px-2",
10603
+ // An intentional mobile column set (see
10604
+ // MatrxColumnDef.mobileHidden). CSS, not a JS
10605
+ // breakpoint — no hydration mismatch, and the column
10606
+ // stays sortable/filterable from the toolbar.
10607
+ col.mobileHidden && "max-sm:hidden",
10608
+ // Consumer widths are desktop tuning: applied from `sm`
10609
+ // up via a CSS var. The minimum is load-bearing: without
10610
+ // it, a crowded table crushes a declared 190px column to a
10611
+ // few characters wide instead of using the canonical
10612
+ // horizontal-scroll surface.
10613
+ (col.width !== void 0 || columnResizable) && "sm:w-[var(--matrx-col-w)] sm:min-w-[var(--matrx-col-w)]",
10614
+ col.headerClassName,
10615
+ isColumnDragShadow && "bg-primary/10 shadow-[inset_2px_0_0_var(--primary),inset_-2px_0_0_var(--primary)]",
10616
+ col.align === "center" && "text-center",
10617
+ col.align === "right" && "text-right"
10618
+ ),
10619
+ style: columnWidthVar(col.width, effectiveColumnWidths[id], id, columnResizable),
10620
+ children: [
10621
+ /* @__PURE__ */ jsx41(ColumnHeaderDropZone, { id, enabled: reorderableColumns, children: /* @__PURE__ */ jsx41(
10622
+ ColumnHeaderCell,
10623
+ {
10624
+ label: col.header,
10625
+ labelText: headerLabel,
10626
+ sortable: col.sortable !== false,
10627
+ isSorted: Boolean(isSorted),
10628
+ sortDirection: sort?.direction ?? defaultSortDirection,
10629
+ onSortAsc: () => setSort({ id, direction: "asc" }),
10630
+ onSortDesc: () => setSort({ id, direction: "desc" }),
10631
+ onClearSort: () => setSort(null),
10632
+ onHeaderSortClick: () => {
10633
+ if (!isSorted) {
10634
+ setSort({ id, direction: defaultSortDirection });
10635
+ return;
10636
+ }
10637
+ if (sort?.direction === "asc") {
10638
+ setSort({ id, direction: "desc" });
10639
+ return;
10640
+ }
10641
+ setSort({ id, direction: "asc" });
10642
+ },
10643
+ filterKind: meta?.kind ?? null,
10644
+ filterValue: columnFilters[id],
10645
+ onFilterChange: (next) => setColumnFilter(id, next),
10646
+ selectOptions: meta?.options,
10647
+ selectSingle: col.filterSingle,
10648
+ filterApplyLabel: filterUi?.applyLabel,
10649
+ filterShowCancel: filterUi?.showCancel,
10650
+ filterFooterHint: filterUi?.footerHint,
10651
+ allowNegation: filterUi?.allowNegation,
10652
+ allowNullModes: filterUi?.allowNullModes,
10653
+ align: col.align,
10654
+ compact: col.compact,
10655
+ reorderColumn: reorderableColumns ? { id, label: headerLabel } : void 0
10491
10656
  }
10492
- if (sort?.direction === "asc") {
10493
- setSort({ id, direction: "desc" });
10494
- return;
10657
+ ) }),
10658
+ columnResizable ? /* @__PURE__ */ jsx41(
10659
+ ColumnResizeHandle,
10660
+ {
10661
+ columnId: id,
10662
+ label: headerLabel,
10663
+ tableRef,
10664
+ minWidth: col.minWidth,
10665
+ maxWidth: col.maxWidth,
10666
+ onResizeStart: captureResizeGestureSnapshot,
10667
+ onResizeCancel: clearResizeGestureSnapshot,
10668
+ onResizeCommit: (columnId2, width) => commitColumnWidths(
10669
+ { ...effectiveColumnWidths, [columnId2]: width },
10670
+ true
10671
+ )
10495
10672
  }
10496
- setSort({ id, direction: "asc" });
10497
- },
10498
- filterKind: meta?.kind ?? null,
10499
- filterValue: columnFilters[id],
10500
- onFilterChange: (next) => setColumnFilter(id, next),
10501
- selectOptions: meta?.options,
10502
- selectSingle: col.filterSingle,
10503
- filterApplyLabel: filterUi?.applyLabel,
10504
- filterShowCancel: filterUi?.showCancel,
10505
- filterFooterHint: filterUi?.footerHint,
10506
- allowNegation: filterUi?.allowNegation,
10507
- allowNullModes: filterUi?.allowNullModes,
10508
- align: col.align,
10509
- compact: col.compact,
10510
- reorderColumn: reorderableColumns ? { id, label: headerLabel } : void 0
10511
- }
10512
- ) }),
10513
- columnResizable ? /* @__PURE__ */ jsx40(
10514
- ColumnResizeHandle,
10515
- {
10516
- columnId: id,
10517
- label: headerLabel,
10518
- tableRef,
10519
- minWidth: col.minWidth,
10520
- maxWidth: col.maxWidth,
10521
- onResizeStart: captureResizeGestureSnapshot,
10522
- onResizeCancel: clearResizeGestureSnapshot,
10523
- onResizeCommit: (columnId2, width) => commitColumnWidths(
10524
- { ...effectiveColumnWidths, [columnId2]: width },
10525
- true
10526
- )
10527
- }
10528
- ) : null
10529
- ]
10530
- },
10531
- id
10532
- );
10533
- }),
10534
- showActionsCol && /* @__PURE__ */ jsx40(
10535
- "th",
10536
- {
10537
- "data-matrx-table-actions-column": true,
10538
- className: "h-9 w-px px-2 text-right align-middle text-xs font-semibold uppercase tracking-wide text-muted-foreground",
10539
- style: fixedUtilityWidth(fixedTableGeometry?.actionsWidth),
10540
- children: "Actions"
10541
- }
10542
- )
10543
- ] }) }),
10544
- /* @__PURE__ */ jsxs30("tbody", { children: [
10545
- isLoading ? Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ jsxs30("tr", { className: "border-b border-border/60", children: [
10546
- selection ? /* @__PURE__ */ jsx40("td", { className: "px-2 py-2", style: fixedUtilityWidth(fixedTableGeometry?.selectionWidth), children: /* @__PURE__ */ jsx40(Skeleton, { className: "h-3.5 w-3.5" }) }) : null,
10547
- visibleColumns.map((col) => /* @__PURE__ */ jsx40(
10673
+ ) : null
10674
+ ]
10675
+ },
10676
+ id
10677
+ );
10678
+ }),
10679
+ showActionsCol && /* @__PURE__ */ jsx41(
10680
+ "th",
10681
+ {
10682
+ "data-matrx-table-actions-column": true,
10683
+ className: "h-9 w-px px-2 text-right align-middle text-xs font-semibold uppercase tracking-wide text-muted-foreground",
10684
+ style: fixedUtilityWidth(fixedTableGeometry?.actionsWidth),
10685
+ children: "Actions"
10686
+ }
10687
+ )
10688
+ ] })
10689
+ }
10690
+ ),
10691
+ /* @__PURE__ */ jsxs31("tbody", { children: [
10692
+ isLoading ? Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ jsxs31("tr", { className: "border-b border-border/60", children: [
10693
+ selection ? /* @__PURE__ */ jsx41("td", { className: "px-2 py-2", style: fixedUtilityWidth(fixedTableGeometry?.selectionWidth), children: /* @__PURE__ */ jsx41(Skeleton, { className: "h-3.5 w-3.5" }) }) : null,
10694
+ visibleColumns.map((col) => /* @__PURE__ */ jsx41(
10548
10695
  "td",
10549
10696
  {
10550
10697
  className: cn(
@@ -10552,20 +10699,20 @@ function MatrxDataTableCore({
10552
10699
  col.compact ? "px-1" : "px-2",
10553
10700
  col.mobileHidden && "max-sm:hidden"
10554
10701
  ),
10555
- children: /* @__PURE__ */ jsx40(Skeleton, { className: "h-5 w-full" })
10702
+ children: /* @__PURE__ */ jsx41(Skeleton, { className: "h-5 w-full" })
10556
10703
  },
10557
10704
  columnId(col)
10558
10705
  )),
10559
- showActionsCol && /* @__PURE__ */ jsx40("td", { className: "text-right align-middle", style: fixedUtilityWidth(fixedTableGeometry?.actionsWidth), children: /* @__PURE__ */ jsx40(Skeleton, { className: "ml-auto h-5 w-10" }) })
10560
- ] }, `sk-${i}`)) : paginated.length === 0 ? /* @__PURE__ */ jsx40("tr", { children: /* @__PURE__ */ jsx40(
10706
+ showActionsCol && /* @__PURE__ */ jsx41("td", { className: "text-right align-middle", style: fixedUtilityWidth(fixedTableGeometry?.actionsWidth), children: /* @__PURE__ */ jsx41(Skeleton, { className: "ml-auto h-5 w-10" }) })
10707
+ ] }, `sk-${i}`)) : paginated.length === 0 ? /* @__PURE__ */ jsx41("tr", { children: /* @__PURE__ */ jsx41(
10561
10708
  "td",
10562
10709
  {
10563
10710
  colSpan: visibleColumns.length + leadingCols + (showActionsCol ? 1 : 0),
10564
10711
  className: "px-0 py-12 text-center",
10565
- children: /* @__PURE__ */ jsxs30("div", { "data-matrx-table-empty-state": true, className: "sticky left-0 flex flex-col items-center gap-2 whitespace-normal px-4", style: { width: "100cqw", maxWidth: "100%" }, children: [
10712
+ children: /* @__PURE__ */ jsxs31("div", { "data-matrx-table-empty-state": true, className: "sticky left-0 flex flex-col items-center gap-2 whitespace-normal px-4", style: { width: "100cqw", maxWidth: "100%" }, children: [
10566
10713
  renderedEmptyState?.icon,
10567
- /* @__PURE__ */ jsx40("p", { className: "text-sm font-medium text-foreground", children: renderedEmptyState?.title ?? "No rows" }),
10568
- renderedEmptyState?.description ? /* @__PURE__ */ jsx40("p", { className: "text-xs text-muted-foreground", children: renderedEmptyState.description }) : null,
10714
+ /* @__PURE__ */ jsx41("p", { className: "text-sm font-medium text-foreground", children: renderedEmptyState?.title ?? "No rows" }),
10715
+ renderedEmptyState?.description ? /* @__PURE__ */ jsx41("p", { className: "text-xs text-muted-foreground", children: renderedEmptyState.description }) : null,
10569
10716
  renderedEmptyState?.action
10570
10717
  ] })
10571
10718
  }
@@ -10575,7 +10722,7 @@ function MatrxDataTableCore({
10575
10722
  const rowEdits = edits[id];
10576
10723
  const displayRow = applyRowEdits(row, rowEdits);
10577
10724
  const isChecked = selectedIdSet.has(id);
10578
- const rowNode = /* @__PURE__ */ jsxs30(
10725
+ const rowNode = /* @__PURE__ */ jsxs31(
10579
10726
  "tr",
10580
10727
  {
10581
10728
  "data-row-id": id,
@@ -10598,13 +10745,13 @@ function MatrxDataTableCore({
10598
10745
  zebra && index % 2 === 1 && !isSelected && !isChecked && "sm:bg-muted/20"
10599
10746
  ),
10600
10747
  children: [
10601
- selection ? /* @__PURE__ */ jsx40(
10748
+ selection ? /* @__PURE__ */ jsx41(
10602
10749
  "td",
10603
10750
  {
10604
10751
  className: "px-2 py-1.5 align-middle lg:py-0.5",
10605
10752
  style: fixedUtilityWidth(fixedTableGeometry?.selectionWidth),
10606
10753
  onClick: (e) => e.stopPropagation(),
10607
- children: selection.isRowSelectable?.(row) ?? true ? /* @__PURE__ */ jsx40(
10754
+ children: selection.isRowSelectable?.(row) ?? true ? /* @__PURE__ */ jsx41(
10608
10755
  "div",
10609
10756
  {
10610
10757
  "data-matrx-table-selection-target": true,
@@ -10613,7 +10760,7 @@ function MatrxDataTableCore({
10613
10760
  event.currentTarget.querySelector('[role="checkbox"]')?.click();
10614
10761
  }
10615
10762
  },
10616
- children: /* @__PURE__ */ jsx40(
10763
+ children: /* @__PURE__ */ jsx41(
10617
10764
  Checkbox,
10618
10765
  {
10619
10766
  className: CHECKBOX_TAP_AREA,
@@ -10628,7 +10775,7 @@ function MatrxDataTableCore({
10628
10775
  ) : null,
10629
10776
  visibleColumns.map((col, colIdx) => {
10630
10777
  const isColumnDragShadow = columnDragPreview?.draggedId === columnId(col) && columnDragPreview.targetId !== null;
10631
- return /* @__PURE__ */ jsx40(
10778
+ return /* @__PURE__ */ jsx41(
10632
10779
  "td",
10633
10780
  {
10634
10781
  "data-matrx-table-column-id": columnId(col),
@@ -10652,14 +10799,14 @@ function MatrxDataTableCore({
10652
10799
  columnId(col),
10653
10800
  resizableColumns && col.resizable !== false
10654
10801
  ),
10655
- children: /* @__PURE__ */ jsxs30(
10802
+ children: /* @__PURE__ */ jsxs31(
10656
10803
  "div",
10657
10804
  {
10658
10805
  className: cn(
10659
10806
  colIdx === 0 && hierarchy && "flex min-w-0 items-center"
10660
10807
  ),
10661
10808
  children: [
10662
- colIdx === 0 && hierarchy ? /* @__PURE__ */ jsx40(
10809
+ colIdx === 0 && hierarchy ? /* @__PURE__ */ jsx41(
10663
10810
  HierarchyDragHandle,
10664
10811
  {
10665
10812
  id,
@@ -10667,7 +10814,7 @@ function MatrxDataTableCore({
10667
10814
  disabled: !(hierarchy.canReparent?.(row) ?? true)
10668
10815
  }
10669
10816
  ) : null,
10670
- /* @__PURE__ */ jsx40(
10817
+ /* @__PURE__ */ jsx41(
10671
10818
  "div",
10672
10819
  {
10673
10820
  "data-matrx-cell-content": true,
@@ -10682,20 +10829,20 @@ function MatrxDataTableCore({
10682
10829
  columnId(col)
10683
10830
  );
10684
10831
  }),
10685
- showActionsCol && /* @__PURE__ */ jsx40(
10832
+ showActionsCol && /* @__PURE__ */ jsx41(
10686
10833
  "td",
10687
10834
  {
10688
10835
  "data-matrx-table-row-action-cell": true,
10689
10836
  className: "text-right align-middle",
10690
10837
  style: fixedUtilityWidth(fixedTableGeometry?.actionsWidth),
10691
- children: /* @__PURE__ */ jsxs30(
10838
+ children: /* @__PURE__ */ jsxs31(
10692
10839
  "div",
10693
10840
  {
10694
10841
  "data-matrx-table-row-actions": true,
10695
10842
  className: "inline-flex items-center justify-end gap-0",
10696
10843
  onClick: (e) => e.stopPropagation(),
10697
10844
  children: [
10698
- showRowCopy && effectiveCopy ? /* @__PURE__ */ jsx40(
10845
+ showInlineRowCopy && effectiveCopy ? /* @__PURE__ */ jsx41(
10699
10846
  TableRowCopyControl,
10700
10847
  {
10701
10848
  size: "toolbar",
@@ -10705,7 +10852,7 @@ function MatrxDataTableCore({
10705
10852
  ...copy === void 0 ? { defaultColumns: declaredVisibleCopyColumns } : {}
10706
10853
  }
10707
10854
  ) : null,
10708
- rowActions?.(displayRow, {
10855
+ renderRowActions(displayRow, {
10709
10856
  closeDetail: () => setSelectedId(null),
10710
10857
  openDetail: () => openDetail(displayRow),
10711
10858
  openWindow: () => openWindow(displayRow),
@@ -10713,8 +10860,8 @@ function MatrxDataTableCore({
10713
10860
  hasPendingEdits: Boolean(rowEdits),
10714
10861
  discardPendingEdits: () => discardRowEdits(id)
10715
10862
  }),
10716
- windowEnabled ? /* @__PURE__ */ jsxs30(Tooltip, { children: [
10717
- /* @__PURE__ */ jsx40(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx40(
10863
+ windowEnabled ? /* @__PURE__ */ jsxs31(Tooltip, { children: [
10864
+ /* @__PURE__ */ jsx41(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx41(
10718
10865
  Button,
10719
10866
  {
10720
10867
  type: "button",
@@ -10728,10 +10875,10 @@ function MatrxDataTableCore({
10728
10875
  if (windowConfig?.openOnRowClick === true) openDetail(row);
10729
10876
  else openWindow(row);
10730
10877
  },
10731
- children: opensWindowOnRowClick ? /* @__PURE__ */ jsx40(PanelRightOpen, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx40(PanelRight, { className: "h-5 w-5" })
10878
+ children: opensWindowOnRowClick ? /* @__PURE__ */ jsx41(PanelRightOpen, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx41(PanelRight, { className: "h-5 w-5" })
10732
10879
  }
10733
10880
  ) }),
10734
- /* @__PURE__ */ jsx40(TooltipContent, { children: windowConfig?.openOnRowClick === true ? "Open in side panel" : "Open in window" })
10881
+ /* @__PURE__ */ jsx41(TooltipContent, { children: windowConfig?.openOnRowClick === true ? "Open in side panel" : "Open in window" })
10735
10882
  ] }) : null
10736
10883
  ]
10737
10884
  }
@@ -10743,7 +10890,7 @@ function MatrxDataTableCore({
10743
10890
  id
10744
10891
  );
10745
10892
  const wrappedRow = rowWrapper ? rowWrapper(row, rowNode) : rowNode;
10746
- return hierarchy ? /* @__PURE__ */ jsx40(
10893
+ return hierarchy ? /* @__PURE__ */ jsx41(
10747
10894
  HierarchyDroppableRow,
10748
10895
  {
10749
10896
  id,
@@ -10751,21 +10898,21 @@ function MatrxDataTableCore({
10751
10898
  children: wrappedRow
10752
10899
  },
10753
10900
  id
10754
- ) : /* @__PURE__ */ jsx40(Fragment6, { children: wrappedRow }, id);
10901
+ ) : /* @__PURE__ */ jsx41(Fragment6, { children: wrappedRow }, id);
10755
10902
  }),
10756
- appendQuery !== null && isFetching && !isLoading ? /* @__PURE__ */ jsx40("tr", { "data-matrx-table-append-loading-row": true, children: /* @__PURE__ */ jsx40(
10903
+ appendQuery !== null && isFetching && !isLoading ? /* @__PURE__ */ jsx41("tr", { "data-matrx-table-append-loading-row": true, children: /* @__PURE__ */ jsx41(
10757
10904
  "td",
10758
10905
  {
10759
10906
  colSpan: visibleColumns.length + leadingCols + (showActionsCol ? 1 : 0),
10760
10907
  className: "sticky bottom-0 z-20 h-16 border-y border-border bg-card/95 px-0 py-0 text-left shadow-sm backdrop-blur-sm",
10761
- children: /* @__PURE__ */ jsxs30(
10908
+ children: /* @__PURE__ */ jsxs31(
10762
10909
  "div",
10763
10910
  {
10764
10911
  role: "status",
10765
10912
  "aria-live": "polite",
10766
10913
  className: "sticky left-0 flex h-16 w-fit max-w-[100cqw] items-center justify-center gap-2 px-3 text-sm font-medium text-foreground",
10767
10914
  children: [
10768
- /* @__PURE__ */ jsx40(
10915
+ /* @__PURE__ */ jsx41(
10769
10916
  Loader2,
10770
10917
  {
10771
10918
  "aria-hidden": "true",
@@ -10779,9 +10926,9 @@ function MatrxDataTableCore({
10779
10926
  }
10780
10927
  ) }) : null
10781
10928
  ] }),
10782
- footerRows.length > 0 ? /* @__PURE__ */ jsx40("tfoot", { className: "border-t-2 border-border bg-muted/50 font-semibold", children: footerRows.map((row, index) => /* @__PURE__ */ jsxs30("tr", { children: [
10783
- selection ? /* @__PURE__ */ jsx40("td", { className: "px-2 py-2" }) : null,
10784
- visibleColumns.map((column) => /* @__PURE__ */ jsx40(
10929
+ footerRows.length > 0 ? /* @__PURE__ */ jsx41("tfoot", { className: "border-t-2 border-border bg-muted/50 font-semibold", children: footerRows.map((row, index) => /* @__PURE__ */ jsxs31("tr", { children: [
10930
+ selection ? /* @__PURE__ */ jsx41("td", { className: "px-2 py-2" }) : null,
10931
+ visibleColumns.map((column) => /* @__PURE__ */ jsx41(
10785
10932
  "td",
10786
10933
  {
10787
10934
  className: cn(
@@ -10801,7 +10948,7 @@ function MatrxDataTableCore({
10801
10948
  },
10802
10949
  columnId(column)
10803
10950
  )),
10804
- showActionsCol ? /* @__PURE__ */ jsx40("td", {}) : null
10951
+ showActionsCol ? /* @__PURE__ */ jsx41("td", {}) : null
10805
10952
  ] }, `footer-${index}`)) }) : null
10806
10953
  ]
10807
10954
  }
@@ -10809,8 +10956,8 @@ function MatrxDataTableCore({
10809
10956
  ]
10810
10957
  }
10811
10958
  ),
10812
- scrollHintLeft ? /* @__PURE__ */ jsxs30(Tooltip, { children: [
10813
- /* @__PURE__ */ jsx40(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx40(
10959
+ scrollHintLeft ? /* @__PURE__ */ jsxs31(Tooltip, { children: [
10960
+ /* @__PURE__ */ jsx41(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx41(
10814
10961
  Button,
10815
10962
  {
10816
10963
  type: "button",
@@ -10821,13 +10968,13 @@ function MatrxDataTableCore({
10821
10968
  "data-matrx-table-scroll-control": "left",
10822
10969
  className: "absolute left-1.5 top-1/2 z-30 hidden h-11 w-11 -translate-y-1/2 rounded-full border border-glass-edge bg-glass p-0 text-foreground shadow-glass backdrop-blur-glass backdrop-saturate-glass hover:bg-glass-hover active:bg-glass-active sm:inline-flex",
10823
10970
  onClick: () => scrollTableHorizontally("left"),
10824
- children: /* @__PURE__ */ jsx40(ChevronLeft, { className: "h-5 w-5" })
10971
+ children: /* @__PURE__ */ jsx41(ChevronLeft, { className: "h-5 w-5" })
10825
10972
  }
10826
10973
  ) }),
10827
- /* @__PURE__ */ jsx40(TooltipContent, { children: "More columns to the left" })
10974
+ /* @__PURE__ */ jsx41(TooltipContent, { children: "More columns to the left" })
10828
10975
  ] }) : null,
10829
- scrollHintRight ? /* @__PURE__ */ jsxs30(Tooltip, { children: [
10830
- /* @__PURE__ */ jsx40(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx40(
10976
+ scrollHintRight ? /* @__PURE__ */ jsxs31(Tooltip, { children: [
10977
+ /* @__PURE__ */ jsx41(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx41(
10831
10978
  Button,
10832
10979
  {
10833
10980
  type: "button",
@@ -10838,26 +10985,26 @@ function MatrxDataTableCore({
10838
10985
  "data-matrx-table-scroll-control": "right",
10839
10986
  className: "absolute right-1.5 top-1/2 z-30 hidden h-11 w-11 -translate-y-1/2 rounded-full border border-glass-edge bg-glass p-0 text-foreground shadow-glass backdrop-blur-glass backdrop-saturate-glass hover:bg-glass-hover active:bg-glass-active sm:inline-flex",
10840
10987
  onClick: () => scrollTableHorizontally("right"),
10841
- children: /* @__PURE__ */ jsx40(ChevronRight, { className: "h-5 w-5" })
10988
+ children: /* @__PURE__ */ jsx41(ChevronRight, { className: "h-5 w-5" })
10842
10989
  }
10843
10990
  ) }),
10844
- /* @__PURE__ */ jsx40(TooltipContent, { children: "More columns to the right" })
10991
+ /* @__PURE__ */ jsx41(TooltipContent, { children: "More columns to the right" })
10845
10992
  ] }) : null
10846
10993
  ] }),
10847
- appendQuery ? /* @__PURE__ */ jsxs30(
10994
+ appendQuery ? /* @__PURE__ */ jsxs31(
10848
10995
  "div",
10849
10996
  {
10850
10997
  "data-matrx-table-footer": true,
10851
10998
  className: "flex min-h-11 shrink-0 flex-wrap items-center gap-0 border-t border-border",
10852
10999
  "aria-busy": isLoading || isFetching,
10853
11000
  children: [
10854
- /* @__PURE__ */ jsxs30(
11001
+ /* @__PURE__ */ jsxs31(
10855
11002
  "div",
10856
11003
  {
10857
11004
  ...isFetching && !isLoading ? {} : { role: "status", "aria-live": "polite" },
10858
11005
  className: "flex w-full min-w-0 items-center gap-2 text-xs text-muted-foreground sm:w-auto sm:flex-1 sm:text-sm",
10859
11006
  children: [
10860
- isLoading ? /* @__PURE__ */ jsx40(
11007
+ isLoading ? /* @__PURE__ */ jsx41(
10861
11008
  Loader2,
10862
11009
  {
10863
11010
  "data-matrx-table-append-loader": true,
@@ -10865,17 +11012,17 @@ function MatrxDataTableCore({
10865
11012
  className: "h-5 w-5 shrink-0 animate-spin text-primary motion-reduce:animate-none"
10866
11013
  }
10867
11014
  ) : null,
10868
- /* @__PURE__ */ jsxs30("div", { className: "min-w-0 flex-1", children: [
10869
- /* @__PURE__ */ jsx40("p", { className: "font-medium text-foreground", children: isLoading ? "Loading rows\u2026" : `${formatCount3(data.length)} loaded${appendQuery.pagination.totalItems === void 0 ? "" : ` of ${formatCount3(appendQuery.pagination.totalItems)}`}` }),
10870
- appendQuery.pagination.sourceUntil ? /* @__PURE__ */ jsxs30("p", { children: [
11015
+ /* @__PURE__ */ jsxs31("div", { className: "min-w-0 flex-1", children: [
11016
+ /* @__PURE__ */ jsx41("p", { className: "font-medium text-foreground", children: isLoading ? "Loading rows\u2026" : `${formatCount3(data.length)} loaded${appendQuery.pagination.totalItems === void 0 ? "" : ` of ${formatCount3(appendQuery.pagination.totalItems)}`}` }),
11017
+ appendQuery.pagination.sourceUntil ? /* @__PURE__ */ jsxs31("p", { children: [
10871
11018
  "Source fixed through",
10872
11019
  " ",
10873
11020
  new Date(appendQuery.pagination.sourceUntil).toLocaleString(),
10874
11021
  "."
10875
11022
  ] }) : null,
10876
- !isLoading && !isFetching && !appendQuery.pagination.loadAll?.isLoading && !scrollPagination.error && !appendQuery.pagination.hasNextPage && appendQuery.pagination.totalItems !== void 0 && data.length === appendQuery.pagination.totalItems ? /* @__PURE__ */ jsx40("p", { children: "All source rows are loaded." }) : appendUsesLocalProcessing ? /* @__PURE__ */ jsx40("p", { children: "Local search and filters cover loaded rows." }) : null,
10877
- scrollPagination.error ? /* @__PURE__ */ jsx40("p", { role: "alert", className: "text-destructive", children: scrollPagination.error.message }) : null,
10878
- appendScrollPolicy?.mode === "suspended" ? /* @__PURE__ */ jsxs30("p", { role: "status", children: [
11023
+ !isLoading && !isFetching && !appendQuery.pagination.loadAll?.isLoading && !scrollPagination.error && !appendQuery.pagination.hasNextPage && appendQuery.pagination.totalItems !== void 0 && data.length === appendQuery.pagination.totalItems ? /* @__PURE__ */ jsx41("p", { children: "All source rows are loaded." }) : appendUsesLocalProcessing ? /* @__PURE__ */ jsx41("p", { children: "Local search and filters cover loaded rows." }) : null,
11024
+ scrollPagination.error ? /* @__PURE__ */ jsx41("p", { role: "alert", className: "text-destructive", children: scrollPagination.error.message }) : null,
11025
+ appendScrollPolicy?.mode === "suspended" ? /* @__PURE__ */ jsxs31("p", { role: "status", children: [
10879
11026
  appendScrollPolicy.reason,
10880
11027
  " Load more remains available."
10881
11028
  ] }) : null
@@ -10883,26 +11030,26 @@ function MatrxDataTableCore({
10883
11030
  ]
10884
11031
  }
10885
11032
  ),
10886
- appendQuery.pagination.sourcePageSize ? /* @__PURE__ */ jsxs30(
11033
+ appendQuery.pagination.sourcePageSize ? /* @__PURE__ */ jsxs31(
10887
11034
  Select,
10888
11035
  {
10889
11036
  value: String(appendQuery.pagination.sourcePageSize.value),
10890
11037
  onValueChange: (value) => appendQuery.pagination.sourcePageSize?.onChange(Number(value)),
10891
11038
  children: [
10892
- /* @__PURE__ */ jsx40(
11039
+ /* @__PURE__ */ jsx41(
10893
11040
  SelectTrigger,
10894
11041
  {
10895
11042
  "aria-label": "Rows per load",
10896
11043
  className: "h-11 min-w-20 shrink-0 rounded-md border border-border bg-card px-3 text-sm [&_svg]:size-5",
10897
11044
  disabled: isLoading || isFetching || appendQuery.pagination.loadAll?.isLoading,
10898
- children: /* @__PURE__ */ jsx40(SelectValue, {})
11045
+ children: /* @__PURE__ */ jsx41(SelectValue, {})
10899
11046
  }
10900
11047
  ),
10901
- /* @__PURE__ */ jsx40(SelectContent, { children: appendQuery.pagination.sourcePageSize.options.map((size) => /* @__PURE__ */ jsx40(SelectItem, { value: String(size), children: size }, size)) })
11048
+ /* @__PURE__ */ jsx41(SelectContent, { children: appendQuery.pagination.sourcePageSize.options.map((size) => /* @__PURE__ */ jsx41(SelectItem, { value: String(size), children: size }, size)) })
10902
11049
  ]
10903
11050
  }
10904
11051
  ) : null,
10905
- appendQuery.pagination.loadAll?.isLoading ? /* @__PURE__ */ jsx40(
11052
+ appendQuery.pagination.loadAll?.isLoading ? /* @__PURE__ */ jsx41(
10906
11053
  Button,
10907
11054
  {
10908
11055
  type: "button",
@@ -10911,7 +11058,7 @@ function MatrxDataTableCore({
10911
11058
  onClick: appendQuery.pagination.loadAll.stop,
10912
11059
  children: "Stop loading"
10913
11060
  }
10914
- ) : scrollPagination.error ? /* @__PURE__ */ jsx40(
11061
+ ) : scrollPagination.error ? /* @__PURE__ */ jsx41(
10915
11062
  Button,
10916
11063
  {
10917
11064
  type: "button",
@@ -10920,8 +11067,8 @@ function MatrxDataTableCore({
10920
11067
  onClick: appendQuery.pagination.retrySource ?? (appendQuery.pagination.hasNextPage ? appendQuery.pagination.loadNextPage : appendQuery.pagination.refresh),
10921
11068
  children: appendQuery.pagination.retrySource ? "Retry source" : appendQuery.pagination.hasNextPage ? "Retry" : "Reload rows"
10922
11069
  }
10923
- ) : appendQuery.pagination.hasNextPage || scrollPagination.error ? /* @__PURE__ */ jsxs30("div", { className: "flex min-w-0 max-w-full flex-wrap gap-0", children: [
10924
- /* @__PURE__ */ jsx40(
11070
+ ) : appendQuery.pagination.hasNextPage || scrollPagination.error ? /* @__PURE__ */ jsxs31("div", { className: "flex min-w-0 max-w-full flex-wrap gap-0", children: [
11071
+ /* @__PURE__ */ jsx41(
10925
11072
  Button,
10926
11073
  {
10927
11074
  type: "button",
@@ -10932,7 +11079,7 @@ function MatrxDataTableCore({
10932
11079
  children: "Load more"
10933
11080
  }
10934
11081
  ),
10935
- appendQuery.pagination.loadAll ? /* @__PURE__ */ jsx40(
11082
+ appendQuery.pagination.loadAll ? /* @__PURE__ */ jsx41(
10936
11083
  Button,
10937
11084
  {
10938
11085
  type: "button",
@@ -10943,10 +11090,10 @@ function MatrxDataTableCore({
10943
11090
  children: "Load all"
10944
11091
  }
10945
11092
  ) : null
10946
- ] }) : !isLoading && appendQuery.pagination.totalItems !== void 0 && data.length === appendQuery.pagination.totalItems ? /* @__PURE__ */ jsx40("span", { className: "min-w-0 max-w-full break-words whitespace-normal px-3 text-xs text-muted-foreground sm:text-sm", children: "All rows loaded" }) : null
11093
+ ] }) : !isLoading && appendQuery.pagination.totalItems !== void 0 && data.length === appendQuery.pagination.totalItems ? /* @__PURE__ */ jsx41("span", { className: "min-w-0 max-w-full break-words whitespace-normal px-3 text-xs text-muted-foreground sm:text-sm", children: "All rows loaded" }) : null
10947
11094
  ]
10948
11095
  }
10949
- ) : !hidePagination && totalItems > 0 ? /* @__PURE__ */ jsx40("div", { className: "shrink-0", children: /* @__PURE__ */ jsx40(
11096
+ ) : !hidePagination && totalItems > 0 ? /* @__PURE__ */ jsx41("div", { className: "shrink-0", children: /* @__PURE__ */ jsx41(
10950
11097
  GenericTablePagination,
10951
11098
  {
10952
11099
  totalItems,
@@ -10972,7 +11119,7 @@ function MatrxDataTableCore({
10972
11119
  }
10973
11120
  ) }) : null
10974
11121
  ] }),
10975
- /* @__PURE__ */ jsx40(
11122
+ /* @__PURE__ */ jsx41(
10976
11123
  ColumnManager,
10977
11124
  {
10978
11125
  open: columnManagerOpen,
@@ -10983,7 +11130,7 @@ function MatrxDataTableCore({
10983
11130
  onApply: commitColumnState
10984
11131
  }
10985
11132
  ),
10986
- detailEnabled && selectedRow ? /* @__PURE__ */ jsx40(
11133
+ detailEnabled && selectedRow ? /* @__PURE__ */ jsx41(
10987
11134
  SidePanelSurface,
10988
11135
  {
10989
11136
  title: resolveStringTitle(
@@ -10994,8 +11141,8 @@ function MatrxDataTableCore({
10994
11141
  description: detail?.description?.(selectedRow),
10995
11142
  onClose: () => setSelectedId(null),
10996
11143
  defaultWidth: detail?.defaultWidth ?? 480,
10997
- headerActions: /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-1", children: [
10998
- effectiveCopy && showRowCopy ? /* @__PURE__ */ jsx40(
11144
+ headerActions: /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-1", children: [
11145
+ effectiveCopy && showRowCopy ? /* @__PURE__ */ jsx41(
10999
11146
  TableRowCopyControl,
11000
11147
  {
11001
11148
  size: "icon",
@@ -11007,8 +11154,8 @@ function MatrxDataTableCore({
11007
11154
  }
11008
11155
  ) : null,
11009
11156
  detail?.headerActions?.(selectedRow),
11010
- windowEnabled ? /* @__PURE__ */ jsxs30(Tooltip, { children: [
11011
- /* @__PURE__ */ jsx40(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx40(
11157
+ windowEnabled ? /* @__PURE__ */ jsxs31(Tooltip, { children: [
11158
+ /* @__PURE__ */ jsx41(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx41(
11012
11159
  Button,
11013
11160
  {
11014
11161
  type: "button",
@@ -11018,10 +11165,10 @@ function MatrxDataTableCore({
11018
11165
  className: "h-7 w-7",
11019
11166
  "aria-label": "Open in window",
11020
11167
  onClick: () => openWindow(selectedRow),
11021
- children: /* @__PURE__ */ jsx40(PanelRight, { className: "h-5 w-5" })
11168
+ children: /* @__PURE__ */ jsx41(PanelRight, { className: "h-5 w-5" })
11022
11169
  }
11023
11170
  ) }),
11024
- /* @__PURE__ */ jsx40(TooltipContent, { children: "Open in window" })
11171
+ /* @__PURE__ */ jsx41(TooltipContent, { children: "Open in window" })
11025
11172
  ] }) : null
11026
11173
  ] }),
11027
11174
  children: detail?.render ? (
@@ -11032,7 +11179,7 @@ function MatrxDataTableCore({
11032
11179
  // fixes the whole class at once — a custom body that already
11033
11180
  // scrolls (`h-full` + `overflow-y-auto` root) still resolves to
11034
11181
  // this container's height, so no second scrollbar appears.
11035
- /* @__PURE__ */ jsx40("div", { className: "h-full min-h-0 overflow-y-auto", children: detail.render(selectedRow, {
11182
+ /* @__PURE__ */ jsx41("div", { className: "h-full min-h-0 overflow-y-auto", children: detail.render(selectedRow, {
11036
11183
  closeDetail: () => setSelectedId(null),
11037
11184
  openDetail: () => openDetail(selectedRow),
11038
11185
  openWindow: () => openWindow(selectedRow),
@@ -11040,7 +11187,7 @@ function MatrxDataTableCore({
11040
11187
  hasPendingEdits: Boolean(edits[getRowId(selectedRow)]),
11041
11188
  discardPendingEdits: () => discardRowEdits(getRowId(selectedRow))
11042
11189
  }) })
11043
- ) : /* @__PURE__ */ jsx40(
11190
+ ) : /* @__PURE__ */ jsx41(
11044
11191
  DataRowInspector,
11045
11192
  {
11046
11193
  row: selectedRow,
@@ -11052,7 +11199,7 @@ function MatrxDataTableCore({
11052
11199
  )
11053
11200
  }
11054
11201
  ) : null,
11055
- windowRow ? /* @__PURE__ */ jsx40(
11202
+ windowRow ? /* @__PURE__ */ jsx41(
11056
11203
  DataRowWindow,
11057
11204
  {
11058
11205
  isOpen: true,
@@ -11063,9 +11210,9 @@ function MatrxDataTableCore({
11063
11210
  height: windowConfig?.height,
11064
11211
  windowId: `matrx-data-row-${urlState?.id ?? "local"}-${getRowId(windowRow)}`,
11065
11212
  defaultTab: windowConfig?.defaultTab,
11066
- headerActions: /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-1", children: [
11067
- windowConfig?.openOnRowClick === true && detail?.enabled === true ? /* @__PURE__ */ jsxs30(Tooltip, { children: [
11068
- /* @__PURE__ */ jsx40(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx40(
11213
+ headerActions: /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-1", children: [
11214
+ windowConfig?.openOnRowClick === true && detail?.enabled === true ? /* @__PURE__ */ jsxs31(Tooltip, { children: [
11215
+ /* @__PURE__ */ jsx41(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx41(
11069
11216
  Button,
11070
11217
  {
11071
11218
  type: "button",
@@ -11078,12 +11225,12 @@ function MatrxDataTableCore({
11078
11225
  closeWindow();
11079
11226
  openDetail(windowRow);
11080
11227
  },
11081
- children: /* @__PURE__ */ jsx40(PanelRightOpen, { className: "h-5 w-5" })
11228
+ children: /* @__PURE__ */ jsx41(PanelRightOpen, { className: "h-5 w-5" })
11082
11229
  }
11083
11230
  ) }),
11084
- /* @__PURE__ */ jsx40(TooltipContent, { children: "Open in side panel" })
11231
+ /* @__PURE__ */ jsx41(TooltipContent, { children: "Open in side panel" })
11085
11232
  ] }) : null,
11086
- effectiveCopy && showRowCopy ? /* @__PURE__ */ jsx40(
11233
+ effectiveCopy && showRowCopy ? /* @__PURE__ */ jsx41(
11087
11234
  TableRowCopyControl,
11088
11235
  {
11089
11236
  size: "icon",
@@ -11102,7 +11249,7 @@ function MatrxDataTableCore({
11102
11249
  closeWindow,
11103
11250
  hasPendingEdits: Boolean(edits[getRowId(windowRow)]),
11104
11251
  discardPendingEdits: () => discardRowEdits(getRowId(windowRow))
11105
- }) ?? /* @__PURE__ */ jsx40(
11252
+ }) ?? /* @__PURE__ */ jsx41(
11106
11253
  DataRowInspector,
11107
11254
  {
11108
11255
  row: windowRow,
@@ -11138,15 +11285,15 @@ function MatrxDataTableCore({
11138
11285
  })
11139
11286
  }
11140
11287
  ) : null,
11141
- editEnabled ? /* @__PURE__ */ jsxs30(Fragment7, { children: [
11142
- foreignDrafts.length > 0 ? /* @__PURE__ */ jsxs30(
11288
+ editEnabled ? /* @__PURE__ */ jsxs31(Fragment7, { children: [
11289
+ foreignDrafts.length > 0 ? /* @__PURE__ */ jsxs31(
11143
11290
  "div",
11144
11291
  {
11145
11292
  "data-matrx-foreign-drafts": true,
11146
11293
  className: "fixed inset-x-3 bottom-20 z-50 flex flex-wrap items-center justify-center gap-2 rounded-lg border border-amber-500/40 bg-card px-3 py-2 text-xs shadow-lg sm:inset-x-auto sm:left-1/2 sm:-translate-x-1/2 sm:flex-nowrap",
11147
11294
  children: [
11148
- /* @__PURE__ */ jsx40("span", { children: "Unsaved edits from previous results" }),
11149
- /* @__PURE__ */ jsx40(
11295
+ /* @__PURE__ */ jsx41("span", { children: "Unsaved edits from previous results" }),
11296
+ /* @__PURE__ */ jsx41(
11150
11297
  CopyButtons,
11151
11298
  {
11152
11299
  size: "xs",
@@ -11155,11 +11302,11 @@ function MatrxDataTableCore({
11155
11302
  json: () => foreignDraftPayload
11156
11303
  }
11157
11304
  ),
11158
- /* @__PURE__ */ jsx40(Button, { type: "button", size: "sm", variant: "ghost", className: "h-7 text-xs text-destructive", onClick: () => setConfirmForeignDraftDiscard(true), children: "Discard drafts" })
11305
+ /* @__PURE__ */ jsx41(Button, { type: "button", size: "sm", variant: "ghost", className: "h-7 text-xs text-destructive", onClick: () => setConfirmForeignDraftDiscard(true), children: "Discard drafts" })
11159
11306
  ]
11160
11307
  }
11161
11308
  ) : null,
11162
- /* @__PURE__ */ jsx40(
11309
+ /* @__PURE__ */ jsx41(
11163
11310
  ConfirmDialog,
11164
11311
  {
11165
11312
  open: confirmForeignDraftDiscard,
@@ -11179,7 +11326,7 @@ function MatrxDataTableCore({
11179
11326
  }
11180
11327
  }
11181
11328
  ),
11182
- /* @__PURE__ */ jsx40(
11329
+ /* @__PURE__ */ jsx41(
11183
11330
  DirtySavePill,
11184
11331
  {
11185
11332
  changeCount,
@@ -11192,11 +11339,11 @@ function MatrxDataTableCore({
11192
11339
  ]
11193
11340
  }
11194
11341
  ),
11195
- /* @__PURE__ */ jsx40(DragOverlay, { children: draggedRow ? (
11342
+ /* @__PURE__ */ jsx41(DragOverlay, { children: draggedRow ? (
11196
11343
  // w-max: the overlay inherits the ACTIVE node's size, and the active
11197
11344
  // node is the 16px grip handle — without it the label wraps to one
11198
11345
  // character per line.
11199
- /* @__PURE__ */ jsx40("div", { className: "w-max max-w-xs truncate rounded border border-border bg-card px-2.5 py-1.5 text-sm font-medium text-foreground shadow-md", children: hierarchy?.itemLabel?.(draggedRow) ?? "Moving row" })
11346
+ /* @__PURE__ */ jsx41("div", { className: "w-max max-w-xs truncate rounded border border-border bg-card px-2.5 py-1.5 text-sm font-medium text-foreground shadow-md", children: hierarchy?.itemLabel?.(draggedRow) ?? "Moving row" })
11200
11347
  ) : null })
11201
11348
  ]
11202
11349
  }
@@ -11211,7 +11358,7 @@ function HierarchyDragHandle({
11211
11358
  id,
11212
11359
  disabled
11213
11360
  });
11214
- return /* @__PURE__ */ jsx40(
11361
+ return /* @__PURE__ */ jsx41(
11215
11362
  "button",
11216
11363
  {
11217
11364
  ref: setNodeRef,
@@ -11223,7 +11370,7 @@ function HierarchyDragHandle({
11223
11370
  onClick: (event) => event.stopPropagation(),
11224
11371
  ...attributes,
11225
11372
  ...listeners,
11226
- children: /* @__PURE__ */ jsx40(GripVertical, { className: "h-3.5 w-3.5" })
11373
+ children: /* @__PURE__ */ jsx41(GripVertical, { className: "h-3.5 w-3.5" })
11227
11374
  }
11228
11375
  );
11229
11376
  }
@@ -11232,7 +11379,7 @@ function HierarchyRootDropTarget({
11232
11379
  draggedLabel
11233
11380
  }) {
11234
11381
  const { isOver, setNodeRef } = useDroppable2({ id: "__root__" });
11235
- return /* @__PURE__ */ jsxs30(
11382
+ return /* @__PURE__ */ jsxs31(
11236
11383
  "div",
11237
11384
  {
11238
11385
  ref: setNodeRef,
@@ -11242,8 +11389,8 @@ function HierarchyRootDropTarget({
11242
11389
  isOver && "border-solid bg-primary/20 shadow-md shadow-primary/25"
11243
11390
  ),
11244
11391
  children: [
11245
- /* @__PURE__ */ jsx40("span", { className: "truncate", children: draggedLabel }),
11246
- /* @__PURE__ */ jsx40("span", { className: "text-primary/75", children: label })
11392
+ /* @__PURE__ */ jsx41("span", { className: "truncate", children: draggedLabel }),
11393
+ /* @__PURE__ */ jsx41("span", { className: "text-primary/75", children: label })
11247
11394
  ]
11248
11395
  }
11249
11396
  );
@@ -11252,7 +11399,7 @@ function HierarchyDragIndicatorLayer({
11252
11399
  scrollRef,
11253
11400
  resolve: resolve2
11254
11401
  }) {
11255
- const [indicator, setIndicator] = useState20(
11402
+ const [indicator, setIndicator] = useState21(
11256
11403
  null
11257
11404
  );
11258
11405
  useDndMonitor2({
@@ -11292,7 +11439,7 @@ function HierarchyDragIndicatorLayer({
11292
11439
  const { preview: preview2 } = indicator;
11293
11440
  const indent = indicator.left + 10 + preview2.depth * 12;
11294
11441
  if (preview2.position === "inside") {
11295
- return /* @__PURE__ */ jsx40(
11442
+ return /* @__PURE__ */ jsx41(
11296
11443
  "div",
11297
11444
  {
11298
11445
  "aria-hidden": "true",
@@ -11304,7 +11451,7 @@ function HierarchyDragIndicatorLayer({
11304
11451
  width: Math.max(0, indicator.width - 4),
11305
11452
  height: indicator.height
11306
11453
  },
11307
- children: /* @__PURE__ */ jsxs30(
11454
+ children: /* @__PURE__ */ jsxs31(
11308
11455
  "span",
11309
11456
  {
11310
11457
  className: "absolute top-1/2 -translate-y-1/2 whitespace-nowrap rounded bg-card/95 px-1.5 py-0.5 text-[10px] font-medium text-primary",
@@ -11319,7 +11466,7 @@ function HierarchyDragIndicatorLayer({
11319
11466
  );
11320
11467
  }
11321
11468
  const lineTop = preview2.position === "before" ? indicator.top - 1 : indicator.top + indicator.height - 1;
11322
- return /* @__PURE__ */ jsx40(
11469
+ return /* @__PURE__ */ jsx41(
11323
11470
  "div",
11324
11471
  {
11325
11472
  "aria-hidden": "true",
@@ -11330,9 +11477,9 @@ function HierarchyDragIndicatorLayer({
11330
11477
  left: indent,
11331
11478
  width: Math.max(0, indicator.left + indicator.width - indent - 8)
11332
11479
  },
11333
- children: /* @__PURE__ */ jsxs30("div", { className: "relative h-0.5 rounded-full bg-primary", children: [
11334
- /* @__PURE__ */ jsx40("span", { className: "absolute -left-1 top-1/2 h-2 w-2 -translate-y-1/2 rounded-full border-2 border-primary bg-card" }),
11335
- /* @__PURE__ */ jsxs30(
11480
+ children: /* @__PURE__ */ jsxs31("div", { className: "relative h-0.5 rounded-full bg-primary", children: [
11481
+ /* @__PURE__ */ jsx41("span", { className: "absolute -left-1 top-1/2 h-2 w-2 -translate-y-1/2 rounded-full border-2 border-primary bg-card" }),
11482
+ /* @__PURE__ */ jsxs31(
11336
11483
  "span",
11337
11484
  {
11338
11485
  className: cn(
@@ -11373,7 +11520,7 @@ function ColumnHeaderDropZone({
11373
11520
  disabled: !enabled,
11374
11521
  data: { matrxDragKind: "column-header", columnId: id }
11375
11522
  });
11376
- return /* @__PURE__ */ jsx40("div", { ref: setNodeRef, className: "flex min-w-0 items-center", children });
11523
+ return /* @__PURE__ */ jsx41("div", { ref: setNodeRef, className: "flex min-w-0 items-center", children });
11377
11524
  }
11378
11525
  function fixedUtilityWidth(width) {
11379
11526
  return width === void 0 ? void 0 : { width: `${width}px`, minWidth: `${width}px`, maxWidth: `${width}px` };
@@ -11398,14 +11545,14 @@ function columnWidthVar(width, resizedWidth, id, resizable) {
11398
11545
  };
11399
11546
  }
11400
11547
  function DefaultJsonCell({ value }) {
11401
- const [open, setOpen] = useState20(false);
11548
+ const [open, setOpen] = useState21(false);
11402
11549
  const host = useMatrxDataTableHost();
11403
11550
  const Viewer = host.JsonViewer;
11404
11551
  const text = JSON.stringify(value, null, 2);
11405
11552
  const summary = Array.isArray(value) ? `${value.length} items` : Object.keys(value).slice(0, 3).join(", ") || "Empty object";
11406
- return /* @__PURE__ */ jsxs30(Fragment7, { children: [
11407
- /* @__PURE__ */ jsxs30(Tooltip, { children: [
11408
- /* @__PURE__ */ jsx40(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs30("button", { type: "button", className: "block max-w-full truncate text-left text-sm text-foreground", onClick: (event) => {
11553
+ return /* @__PURE__ */ jsxs31(Fragment7, { children: [
11554
+ /* @__PURE__ */ jsxs31(Tooltip, { children: [
11555
+ /* @__PURE__ */ jsx41(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs31("button", { type: "button", className: "block max-w-full truncate text-left text-sm text-foreground", onClick: (event) => {
11409
11556
  event.stopPropagation();
11410
11557
  setOpen(true);
11411
11558
  }, style: { display: "-webkit-box", WebkitLineClamp: 2, WebkitBoxOrient: "vertical", overflow: "hidden", whiteSpace: "normal", overflowWrap: "anywhere" }, "aria-label": "Open JSON value", children: [
@@ -11413,9 +11560,9 @@ function DefaultJsonCell({ value }) {
11413
11560
  " ",
11414
11561
  summary
11415
11562
  ] }) }),
11416
- /* @__PURE__ */ jsx40(TooltipContent, { className: "max-w-md max-h-80 overflow-auto whitespace-pre-wrap break-words", children: text })
11563
+ /* @__PURE__ */ jsx41(TooltipContent, { className: "max-w-md max-h-80 overflow-auto whitespace-pre-wrap break-words", children: text })
11417
11564
  ] }),
11418
- /* @__PURE__ */ jsx40(DataRowWindow, { isOpen: open, onClose: () => setOpen(false), title: "JSON value", row: value, viewContent: Viewer ? /* @__PURE__ */ jsx40(Viewer, { data: value }) : /* @__PURE__ */ jsx40("pre", { className: "overflow-auto whitespace-pre-wrap p-3 text-xs", children: text }) })
11565
+ /* @__PURE__ */ jsx41(DataRowWindow, { isOpen: open, onClose: () => setOpen(false), title: "JSON value", row: value, viewContent: Viewer ? /* @__PURE__ */ jsx41(Viewer, { data: value }) : /* @__PURE__ */ jsx41("pre", { className: "overflow-auto whitespace-pre-wrap p-3 text-xs", children: text }) })
11419
11566
  ] });
11420
11567
  }
11421
11568
  function renderCell(row, col, index) {
@@ -11426,7 +11573,7 @@ function renderCell(row, col, index) {
11426
11573
  if (asUuid && typeof raw === "string") {
11427
11574
  const forbidden = typeof col.fk?.forbidden === "function" ? col.fk.forbidden(raw, row) : Boolean(col.fk?.forbidden);
11428
11575
  const declaredToken = typeof col.fk?.token === "function" ? col.fk.token(row) : col.fk?.token;
11429
- return /* @__PURE__ */ jsx40(
11576
+ return /* @__PURE__ */ jsx41(
11430
11577
  MatrxUuidCell,
11431
11578
  {
11432
11579
  value: raw,
@@ -11438,14 +11585,14 @@ function renderCell(row, col, index) {
11438
11585
  }
11439
11586
  );
11440
11587
  }
11441
- if (raw !== null && typeof raw === "object" && !(raw instanceof Date)) return /* @__PURE__ */ jsx40(DefaultJsonCell, { value: raw });
11588
+ if (raw !== null && typeof raw === "object" && !(raw instanceof Date)) return /* @__PURE__ */ jsx41(DefaultJsonCell, { value: raw });
11442
11589
  if (typeof raw === "boolean") {
11443
- return /* @__PURE__ */ jsx40("span", { className: raw ? "rounded bg-emerald-500/10 px-1.5 py-0.5 text-xs text-emerald-600" : "rounded bg-slate-500/10 px-1.5 py-0.5 text-xs text-muted-foreground", children: raw ? "Yes" : "No" });
11590
+ return /* @__PURE__ */ jsx41("span", { className: raw ? "rounded bg-emerald-500/10 px-1.5 py-0.5 text-xs text-emerald-600" : "rounded bg-slate-500/10 px-1.5 py-0.5 text-xs text-muted-foreground", children: raw ? "Yes" : "No" });
11444
11591
  }
11445
11592
  const formatted = formatTableDisplayValue(raw);
11446
- return /* @__PURE__ */ jsxs30(Tooltip, { children: [
11447
- /* @__PURE__ */ jsx40(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx40("span", { className: "block text-sm text-foreground", style: { display: "-webkit-box", WebkitLineClamp: 2, WebkitBoxOrient: "vertical", overflow: "hidden", overflowWrap: "anywhere" }, children: formatted }) }),
11448
- /* @__PURE__ */ jsx40(TooltipContent, { className: "max-w-md whitespace-pre-wrap break-words max-h-80 overflow-auto", children: typeof raw === "object" && raw !== null ? JSON.stringify(raw, null, 2) : formatted })
11593
+ return /* @__PURE__ */ jsxs31(Tooltip, { children: [
11594
+ /* @__PURE__ */ jsx41(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx41("span", { className: "block text-sm text-foreground", style: { display: "-webkit-box", WebkitLineClamp: 2, WebkitBoxOrient: "vertical", overflow: "hidden", overflowWrap: "anywhere" }, children: formatted }) }),
11595
+ /* @__PURE__ */ jsx41(TooltipContent, { className: "max-w-md whitespace-pre-wrap break-words max-h-80 overflow-auto", children: typeof raw === "object" && raw !== null ? JSON.stringify(raw, null, 2) : formatted })
11449
11596
  ] });
11450
11597
  }
11451
11598
  function resolveStringTitle(title, fallback) {
@@ -11455,19 +11602,19 @@ function resolveStringTitle(title, fallback) {
11455
11602
  }
11456
11603
 
11457
11604
  // src/data-table/SavedViewsControl.tsx
11458
- import { useId as useId3, useState as useState21 } from "react";
11605
+ import { useId as useId3, useState as useState22 } from "react";
11459
11606
 
11460
11607
  // src/dropdown-menu.tsx
11461
11608
  import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
11462
11609
  import * as React17 from "react";
11463
- import { jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
11610
+ import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
11464
11611
  var DropdownMenu = DropdownMenuPrimitive.Root;
11465
11612
  var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
11466
11613
  var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
11467
11614
  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";
11468
11615
  var MENU_ITEM_CLASS = "relative flex cursor-default 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]:pointer-events-none data-[disabled]:opacity-50";
11469
11616
  var MENU_INDICATOR_ITEM_CLASS = "relative flex cursor-default 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]:pointer-events-none data-[disabled]:opacity-50";
11470
- var DropdownMenuSubTrigger = React17.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs31(
11617
+ var DropdownMenuSubTrigger = React17.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs32(
11471
11618
  DropdownMenuPrimitive.SubTrigger,
11472
11619
  {
11473
11620
  ref,
@@ -11480,12 +11627,12 @@ var DropdownMenuSubTrigger = React17.forwardRef(({ className, inset, children, .
11480
11627
  ...props,
11481
11628
  children: [
11482
11629
  children,
11483
- /* @__PURE__ */ jsx41(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
11630
+ /* @__PURE__ */ jsx42(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
11484
11631
  ]
11485
11632
  }
11486
11633
  ));
11487
11634
  DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
11488
- var DropdownMenuSubContent = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx41(
11635
+ var DropdownMenuSubContent = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx42(
11489
11636
  DropdownMenuPrimitive.SubContent,
11490
11637
  {
11491
11638
  ref,
@@ -11497,7 +11644,7 @@ var DropdownMenuSubContent = React17.forwardRef(({ className, ...props }, ref) =
11497
11644
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
11498
11645
  var DropdownMenuContent = React17.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => {
11499
11646
  const portalContainer = usePortalContainer(container);
11500
- return /* @__PURE__ */ jsx41(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx41(
11647
+ return /* @__PURE__ */ jsx42(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx42(
11501
11648
  DropdownMenuPrimitive.Content,
11502
11649
  {
11503
11650
  ref,
@@ -11514,7 +11661,7 @@ var DropdownMenuContent = React17.forwardRef(({ className, sideOffset = 4, conta
11514
11661
  ) });
11515
11662
  });
11516
11663
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
11517
- var DropdownMenuItem = React17.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx41(
11664
+ var DropdownMenuItem = React17.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx42(
11518
11665
  DropdownMenuPrimitive.Item,
11519
11666
  {
11520
11667
  ref,
@@ -11524,7 +11671,7 @@ var DropdownMenuItem = React17.forwardRef(({ className, inset, ...props }, ref)
11524
11671
  }
11525
11672
  ));
11526
11673
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
11527
- var DropdownMenuCheckboxItem = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs31(
11674
+ var DropdownMenuCheckboxItem = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs32(
11528
11675
  DropdownMenuPrimitive.CheckboxItem,
11529
11676
  {
11530
11677
  ref,
@@ -11532,13 +11679,13 @@ var DropdownMenuCheckboxItem = React17.forwardRef(({ className, children, ...pro
11532
11679
  className: cn(MENU_INDICATOR_ITEM_CLASS, className),
11533
11680
  ...props,
11534
11681
  children: [
11535
- /* @__PURE__ */ jsx41("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx41(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx41(CheckIcon, { className: "h-4 w-4" }) }) }),
11682
+ /* @__PURE__ */ jsx42("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx42(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx42(CheckIcon, { className: "h-4 w-4" }) }) }),
11536
11683
  children
11537
11684
  ]
11538
11685
  }
11539
11686
  ));
11540
11687
  DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
11541
- var DropdownMenuRadioItem = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs31(
11688
+ var DropdownMenuRadioItem = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs32(
11542
11689
  DropdownMenuPrimitive.RadioItem,
11543
11690
  {
11544
11691
  ref,
@@ -11546,13 +11693,13 @@ var DropdownMenuRadioItem = React17.forwardRef(({ className, children, ...props
11546
11693
  className: cn(MENU_INDICATOR_ITEM_CLASS, className),
11547
11694
  ...props,
11548
11695
  children: [
11549
- /* @__PURE__ */ jsx41("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx41(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx41(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
11696
+ /* @__PURE__ */ jsx42("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx42(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx42(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
11550
11697
  children
11551
11698
  ]
11552
11699
  }
11553
11700
  ));
11554
11701
  DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
11555
- var DropdownMenuLabel = React17.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx41(
11702
+ var DropdownMenuLabel = React17.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx42(
11556
11703
  DropdownMenuPrimitive.Label,
11557
11704
  {
11558
11705
  ref,
@@ -11562,7 +11709,7 @@ var DropdownMenuLabel = React17.forwardRef(({ className, inset, ...props }, ref)
11562
11709
  }
11563
11710
  ));
11564
11711
  DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
11565
- var DropdownMenuSeparator = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx41(
11712
+ var DropdownMenuSeparator = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx42(
11566
11713
  DropdownMenuPrimitive.Separator,
11567
11714
  {
11568
11715
  ref,
@@ -11575,7 +11722,7 @@ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
11575
11722
  var DropdownMenuShortcut = ({
11576
11723
  className,
11577
11724
  ...props
11578
- }) => /* @__PURE__ */ jsx41(
11725
+ }) => /* @__PURE__ */ jsx42(
11579
11726
  "span",
11580
11727
  {
11581
11728
  "data-slot": "dropdown-menu-shortcut",
@@ -11586,7 +11733,7 @@ var DropdownMenuShortcut = ({
11586
11733
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
11587
11734
 
11588
11735
  // src/data-table/SavedViewsControl.tsx
11589
- import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
11736
+ import { jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
11590
11737
  function SavedViewsControl({
11591
11738
  views,
11592
11739
  activeId = null,
@@ -11599,10 +11746,10 @@ function SavedViewsControl({
11599
11746
  onReload
11600
11747
  }) {
11601
11748
  const unsavedChangesId = useId3();
11602
- const [saveOpen, setSaveOpen] = useState21(false);
11603
- const [name, setName] = useState21("");
11604
- const [saving, setSaving] = useState21(false);
11605
- const [actionError, setActionError] = useState21(null);
11749
+ const [saveOpen, setSaveOpen] = useState22(false);
11750
+ const [name, setName] = useState22("");
11751
+ const [saving, setSaving] = useState22(false);
11752
+ const [actionError, setActionError] = useState22(null);
11606
11753
  const visibleError = actionError ?? error;
11607
11754
  const save = async () => {
11608
11755
  const next = name.trim();
@@ -11644,10 +11791,10 @@ function SavedViewsControl({
11644
11791
  }
11645
11792
  };
11646
11793
  const activeName = activeId ? views.find((view) => view.id === activeId)?.name : void 0;
11647
- return /* @__PURE__ */ jsxs32("div", { className: "flex min-w-0 flex-wrap items-center gap-1", "data-matrx-table-saved-views": true, children: [
11648
- /* @__PURE__ */ jsxs32(DropdownMenu, { children: [
11649
- /* @__PURE__ */ jsxs32(Tooltip, { children: [
11650
- /* @__PURE__ */ jsx42(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx42(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs32(
11794
+ return /* @__PURE__ */ jsxs33("div", { className: "flex min-w-0 flex-wrap items-center gap-1", "data-matrx-table-saved-views": true, children: [
11795
+ /* @__PURE__ */ jsxs33(DropdownMenu, { children: [
11796
+ /* @__PURE__ */ jsxs33(Tooltip, { children: [
11797
+ /* @__PURE__ */ jsx43(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx43(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs33(
11651
11798
  Button,
11652
11799
  {
11653
11800
  type: "button",
@@ -11658,38 +11805,38 @@ function SavedViewsControl({
11658
11805
  "aria-describedby": dirty ? unsavedChangesId : void 0,
11659
11806
  disabled: saving,
11660
11807
  children: [
11661
- /* @__PURE__ */ jsx42("span", { className: "min-w-0 flex-1 truncate", children: loading ? "Loading views\u2026" : activeName ?? "Default view" }),
11662
- dirty ? /* @__PURE__ */ jsx42("span", { "aria-hidden": "true", className: "size-1.5 shrink-0 rounded-full bg-amber-500" }) : null,
11663
- /* @__PURE__ */ jsx42(ChevronDown, { className: "size-3.5 shrink-0" })
11808
+ /* @__PURE__ */ jsx43("span", { className: "min-w-0 flex-1 truncate", children: loading ? "Loading views\u2026" : activeName ?? "Default view" }),
11809
+ dirty ? /* @__PURE__ */ jsx43("span", { "aria-hidden": "true", className: "size-1.5 shrink-0 rounded-full bg-amber-500" }) : null,
11810
+ /* @__PURE__ */ jsx43(ChevronDown, { className: "size-3.5 shrink-0" })
11664
11811
  ]
11665
11812
  }
11666
11813
  ) }) }),
11667
- /* @__PURE__ */ jsx42(TooltipContent, { children: "Choose or save a table view" })
11814
+ /* @__PURE__ */ jsx43(TooltipContent, { children: "Choose or save a table view" })
11668
11815
  ] }),
11669
- /* @__PURE__ */ jsxs32(DropdownMenuContent, { align: "end", children: [
11670
- /* @__PURE__ */ jsx42(DropdownMenuLabel, { children: "Views" }),
11671
- /* @__PURE__ */ jsxs32(DropdownMenuRadioGroup, { value: activeId ?? "__default__", onValueChange: (value) => onSelect(value === "__default__" ? null : value), children: [
11672
- /* @__PURE__ */ jsx42(DropdownMenuRadioItem, { value: "__default__", children: "Default view" }),
11673
- views.map((view) => /* @__PURE__ */ jsx42(DropdownMenuRadioItem, { value: view.id, children: view.name }, view.id))
11816
+ /* @__PURE__ */ jsxs33(DropdownMenuContent, { align: "end", children: [
11817
+ /* @__PURE__ */ jsx43(DropdownMenuLabel, { children: "Views" }),
11818
+ /* @__PURE__ */ jsxs33(DropdownMenuRadioGroup, { value: activeId ?? "__default__", onValueChange: (value) => onSelect(value === "__default__" ? null : value), children: [
11819
+ /* @__PURE__ */ jsx43(DropdownMenuRadioItem, { value: "__default__", children: "Default view" }),
11820
+ views.map((view) => /* @__PURE__ */ jsx43(DropdownMenuRadioItem, { value: view.id, children: view.name }, view.id))
11674
11821
  ] }),
11675
- /* @__PURE__ */ jsx42(DropdownMenuSeparator, {}),
11676
- /* @__PURE__ */ jsx42(DropdownMenuItem, { disabled: saving, onSelect: () => {
11822
+ /* @__PURE__ */ jsx43(DropdownMenuSeparator, {}),
11823
+ /* @__PURE__ */ jsx43(DropdownMenuItem, { disabled: saving, onSelect: () => {
11677
11824
  setActionError(null);
11678
11825
  setSaveOpen(true);
11679
11826
  }, children: "Save current view\u2026" }),
11680
- activeId && onUpdate ? /* @__PURE__ */ jsx42(DropdownMenuItem, { disabled: saving, onSelect: () => void update(), children: "Update current view" }) : null,
11681
- onReload ? /* @__PURE__ */ jsx42(DropdownMenuItem, { disabled: saving || loading, onSelect: () => void reload(), children: "Reload views" }) : null
11827
+ activeId && onUpdate ? /* @__PURE__ */ jsx43(DropdownMenuItem, { disabled: saving, onSelect: () => void update(), children: "Update current view" }) : null,
11828
+ onReload ? /* @__PURE__ */ jsx43(DropdownMenuItem, { disabled: saving || loading, onSelect: () => void reload(), children: "Reload views" }) : null
11682
11829
  ] })
11683
11830
  ] }),
11684
- dirty ? /* @__PURE__ */ jsx42("span", { id: unsavedChangesId, className: "sr-only", children: "This table view has unsaved changes. Open the view menu to save or update it." }) : null,
11685
- visibleError ? /* @__PURE__ */ jsx42("p", { role: "alert", className: "basis-full break-words text-xs text-destructive", children: visibleError }) : null,
11686
- /* @__PURE__ */ jsx42(Dialog, { open: saveOpen, onOpenChange: setSaveOpen, children: /* @__PURE__ */ jsxs32(DialogContent, { children: [
11687
- /* @__PURE__ */ jsx42(DialogHeader, { children: /* @__PURE__ */ jsx42(DialogTitle, { children: "Save current view" }) }),
11688
- visibleError ? /* @__PURE__ */ jsx42("p", { role: "alert", className: "text-sm text-destructive", children: visibleError }) : null,
11689
- /* @__PURE__ */ jsx42(Input, { "aria-label": "View name", value: name, onChange: (event) => setName(event.target.value), placeholder: "View name", autoFocus: true }),
11690
- /* @__PURE__ */ jsxs32(DialogFooter, { children: [
11691
- /* @__PURE__ */ jsx42(Button, { type: "button", variant: "outline", onClick: () => setSaveOpen(false), children: "Cancel" }),
11692
- /* @__PURE__ */ jsx42(Button, { type: "button", disabled: !name.trim() || saving, onClick: () => void save(), children: saving ? "Saving\u2026" : "Save view" })
11831
+ dirty ? /* @__PURE__ */ jsx43("span", { id: unsavedChangesId, className: "sr-only", children: "This table view has unsaved changes. Open the view menu to save or update it." }) : null,
11832
+ visibleError ? /* @__PURE__ */ jsx43("p", { role: "alert", className: "basis-full break-words text-xs text-destructive", children: visibleError }) : null,
11833
+ /* @__PURE__ */ jsx43(Dialog, { open: saveOpen, onOpenChange: setSaveOpen, children: /* @__PURE__ */ jsxs33(DialogContent, { children: [
11834
+ /* @__PURE__ */ jsx43(DialogHeader, { children: /* @__PURE__ */ jsx43(DialogTitle, { children: "Save current view" }) }),
11835
+ visibleError ? /* @__PURE__ */ jsx43("p", { role: "alert", className: "text-sm text-destructive", children: visibleError }) : null,
11836
+ /* @__PURE__ */ jsx43(Input, { "aria-label": "View name", value: name, onChange: (event) => setName(event.target.value), placeholder: "View name", autoFocus: true }),
11837
+ /* @__PURE__ */ jsxs33(DialogFooter, { children: [
11838
+ /* @__PURE__ */ jsx43(Button, { type: "button", variant: "outline", onClick: () => setSaveOpen(false), children: "Cancel" }),
11839
+ /* @__PURE__ */ jsx43(Button, { type: "button", disabled: !name.trim() || saving, onClick: () => void save(), children: saving ? "Saving\u2026" : "Save view" })
11693
11840
  ] })
11694
11841
  ] }) })
11695
11842
  ] });
@@ -11736,6 +11883,7 @@ export {
11736
11883
  GenericTablePagination,
11737
11884
  MatrxDataTable,
11738
11885
  MatrxDataTableProvider,
11886
+ MatrxTableRowAlchemyProvider,
11739
11887
  MatrxUuidCell,
11740
11888
  SavedViewsControl,
11741
11889
  TableTitleRow,
@@ -11754,6 +11902,7 @@ export {
11754
11902
  shortUuid,
11755
11903
  tableUrlParamPrefix,
11756
11904
  useMatrxDataTableHost,
11905
+ useMatrxTableRowAlchemy,
11757
11906
  useScrollPagination,
11758
11907
  useTableUrlState
11759
11908
  };