@ai-matrx/design-system 0.18.8 → 0.18.10

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 (58) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/content-transfer.cjs +163 -202
  3. package/dist/content-transfer.cjs.map +1 -1
  4. package/dist/content-transfer.css +43 -30
  5. package/dist/content-transfer.d.cts +4 -0
  6. package/dist/content-transfer.d.ts +4 -0
  7. package/dist/content-transfer.js +225 -264
  8. package/dist/content-transfer.js.map +1 -1
  9. package/dist/data-table/copy-helpers.d.cts +1 -1
  10. package/dist/data-table/copy-helpers.d.ts +1 -1
  11. package/dist/data-table/data-row-inspector.cjs +163 -202
  12. package/dist/data-table/data-row-inspector.cjs.map +1 -1
  13. package/dist/data-table/data-row-inspector.js +245 -284
  14. package/dist/data-table/data-row-inspector.js.map +1 -1
  15. package/dist/data-table/data-row-window.cjs +163 -202
  16. package/dist/data-table/data-row-window.cjs.map +1 -1
  17. package/dist/data-table/data-row-window.js +245 -284
  18. package/dist/data-table/data-row-window.js.map +1 -1
  19. package/dist/data-table/filter-engine.d.cts +1 -1
  20. package/dist/data-table/filter-engine.d.ts +1 -1
  21. package/dist/data-table/host.cjs.map +1 -1
  22. package/dist/data-table/host.d.cts +2 -0
  23. package/dist/data-table/host.d.ts +2 -0
  24. package/dist/data-table/host.js.map +1 -1
  25. package/dist/data-table/index.cjs +1192 -751
  26. package/dist/data-table/index.cjs.map +1 -1
  27. package/dist/data-table/index.d.cts +24 -3
  28. package/dist/data-table/index.d.ts +24 -3
  29. package/dist/data-table/index.js +1264 -823
  30. package/dist/data-table/index.js.map +1 -1
  31. package/dist/data-table/infer-filter.d.cts +1 -1
  32. package/dist/data-table/infer-filter.d.ts +1 -1
  33. package/dist/data-table/layered-filters.d.cts +1 -1
  34. package/dist/data-table/layered-filters.d.ts +1 -1
  35. package/dist/data-table/pagination.cjs +5 -5
  36. package/dist/data-table/pagination.cjs.map +1 -1
  37. package/dist/data-table/pagination.js +5 -5
  38. package/dist/data-table/pagination.js.map +1 -1
  39. package/dist/data-table/query-control.d.cts +1 -1
  40. package/dist/data-table/query-control.d.ts +1 -1
  41. package/dist/data-table/types.cjs.map +1 -1
  42. package/dist/data-table/types.d.cts +1 -1
  43. package/dist/data-table/types.d.ts +1 -1
  44. package/dist/data-table/url-state.d.cts +1 -1
  45. package/dist/data-table/url-state.d.ts +1 -1
  46. package/dist/data-table/uuid-cell.cjs.map +1 -1
  47. package/dist/data-table/uuid-cell.js.map +1 -1
  48. package/dist/data-table/xlsx.d.cts +1 -1
  49. package/dist/data-table/xlsx.d.ts +1 -1
  50. package/dist/index.cjs +5 -5
  51. package/dist/index.cjs.map +1 -1
  52. package/dist/index.js +5 -5
  53. package/dist/index.js.map +1 -1
  54. package/dist/styles.css +8 -1
  55. package/dist/tokens.css +2 -0
  56. package/dist/{types-cH8oLqUx.d.ts → types-C2xN6W_q.d.ts} +46 -3
  57. package/dist/{types-0CNCWvdK.d.cts → types-D_tpuk6m.d.cts} +46 -3
  58. package/package.json +1 -1
@@ -62,48 +62,6 @@ function XIcon(props) {
62
62
  /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })
63
63
  ] });
64
64
  }
65
- function radixProps(props) {
66
- return {
67
- xmlns: "http://www.w3.org/2000/svg",
68
- viewBox: "0 0 15 15",
69
- width: 15,
70
- height: 15,
71
- fill: "none",
72
- "aria-hidden": true,
73
- ...props
74
- };
75
- }
76
- function CheckIcon(props) {
77
- return /* @__PURE__ */ jsx("svg", { ...radixProps(props), children: /* @__PURE__ */ jsx(
78
- "path",
79
- {
80
- d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
81
- fill: "currentColor",
82
- fillRule: "evenodd",
83
- clipRule: "evenodd"
84
- }
85
- ) });
86
- }
87
- function DotFilledIcon(props) {
88
- return /* @__PURE__ */ jsx("svg", { ...radixProps(props), children: /* @__PURE__ */ jsx(
89
- "path",
90
- {
91
- d: "M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",
92
- fill: "currentColor"
93
- }
94
- ) });
95
- }
96
- function RadixChevronRightIcon(props) {
97
- return /* @__PURE__ */ jsx("svg", { ...radixProps(props), children: /* @__PURE__ */ jsx(
98
- "path",
99
- {
100
- d: "M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",
101
- fill: "currentColor",
102
- fillRule: "evenodd",
103
- clipRule: "evenodd"
104
- }
105
- ) });
106
- }
107
65
 
108
66
  // src/portal-container.tsx
109
67
  import * as React from "react";
@@ -522,137 +480,50 @@ var Button = React5.forwardRef(
522
480
  );
523
481
  Button.displayName = "Button";
524
482
 
525
- // src/dropdown-menu.tsx
526
- import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
483
+ // src/popover.tsx
484
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
527
485
  import * as React6 from "react";
528
- import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
529
- var DropdownMenu = DropdownMenuPrimitive.Root;
530
- var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
531
- 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";
532
- 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";
533
- 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";
534
- var DropdownMenuSubTrigger = React6.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs5(
535
- DropdownMenuPrimitive.SubTrigger,
536
- {
537
- ref,
538
- "data-slot": "dropdown-menu-sub-trigger",
539
- className: cn(
540
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
541
- inset && "pl-8",
542
- className
543
- ),
544
- ...props,
545
- children: [
546
- children,
547
- /* @__PURE__ */ jsx9(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
548
- ]
549
- }
550
- ));
551
- DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
552
- var DropdownMenuSubContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
553
- DropdownMenuPrimitive.SubContent,
554
- {
555
- ref,
556
- "data-slot": "dropdown-menu-sub-content",
557
- className: cn(MENU_SURFACE_CLASS, "shadow-lg", MOTION_POPPER, className),
558
- ...props
559
- }
560
- ));
561
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
562
- var DropdownMenuContent = React6.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => {
563
- const portalContainer = usePortalContainer(container);
564
- return /* @__PURE__ */ jsx9(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx9(
565
- DropdownMenuPrimitive.Content,
566
- {
567
- ref,
568
- "data-slot": "dropdown-menu-content",
569
- sideOffset,
570
- className: cn(
571
- MENU_SURFACE_CLASS,
572
- "shadow-md",
573
- MOTION_POPPER,
574
- className
575
- ),
576
- ...props
577
- }
578
- ) });
579
- });
580
- DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
581
- var DropdownMenuItem = React6.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx9(
582
- DropdownMenuPrimitive.Item,
583
- {
584
- ref,
585
- "data-slot": "dropdown-menu-item",
586
- className: cn(MENU_ITEM_CLASS, inset && "pl-8", className),
587
- ...props
588
- }
589
- ));
590
- DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
591
- var DropdownMenuCheckboxItem = React6.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(
592
- DropdownMenuPrimitive.CheckboxItem,
593
- {
594
- ref,
595
- "data-slot": "dropdown-menu-checkbox-item",
596
- className: cn(MENU_INDICATOR_ITEM_CLASS, className),
597
- ...props,
598
- children: [
599
- /* @__PURE__ */ jsx9("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx9(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx9(CheckIcon, { className: "h-4 w-4" }) }) }),
600
- children
601
- ]
602
- }
603
- ));
604
- DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
605
- var DropdownMenuRadioItem = React6.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(
606
- DropdownMenuPrimitive.RadioItem,
607
- {
608
- ref,
609
- "data-slot": "dropdown-menu-radio-item",
610
- className: cn(MENU_INDICATOR_ITEM_CLASS, className),
611
- ...props,
612
- children: [
613
- /* @__PURE__ */ jsx9("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx9(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx9(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
614
- children
615
- ]
616
- }
617
- ));
618
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
619
- var DropdownMenuLabel = React6.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx9(
620
- DropdownMenuPrimitive.Label,
621
- {
622
- ref,
623
- "data-slot": "dropdown-menu-label",
624
- className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
625
- ...props
626
- }
627
- ));
628
- DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
629
- var DropdownMenuSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
630
- DropdownMenuPrimitive.Separator,
631
- {
632
- ref,
633
- "data-slot": "dropdown-menu-separator",
634
- className: cn("-mx-1 my-1 h-px bg-muted", className),
635
- ...props
636
- }
637
- ));
638
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
639
- var DropdownMenuShortcut = ({
640
- className,
641
- ...props
642
- }) => /* @__PURE__ */ jsx9(
643
- "span",
644
- {
645
- "data-slot": "dropdown-menu-shortcut",
646
- className: cn("ml-auto text-xs tracking-widest opacity-60", className),
486
+ import { jsx as jsx9 } from "react/jsx-runtime";
487
+ var Popover = PopoverPrimitive.Root;
488
+ var PopoverTrigger = PopoverPrimitive.Trigger;
489
+ var PopoverContent = React6.forwardRef(
490
+ ({
491
+ className,
492
+ align = "center",
493
+ sideOffset = 4,
494
+ container,
495
+ animated = true,
647
496
  ...props
497
+ }, ref) => {
498
+ const portalContainer = usePortalContainer(container);
499
+ return /* @__PURE__ */ jsx9(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx9(
500
+ PopoverPrimitive.Content,
501
+ {
502
+ ref,
503
+ align,
504
+ sideOffset,
505
+ className: cn(
506
+ // Cap to the viewport space Radix measured and scroll — a popover taller
507
+ // than the screen must never trap the user with unreachable content.
508
+ // z must EQUAL the dialog layer (z-[10000]), never exceed it: with equal
509
+ // z, DOM portal order decides, so a dialog opened FROM a popover stacks
510
+ // above it, and a popover opened from a dialog still stacks above the
511
+ // dialog. z-[10001] buried dialogs behind fullscreen popovers.
512
+ "z-[10000] w-72 max-h-[var(--radix-popover-content-available-height)] overflow-y-auto overscroll-contain rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
513
+ animated && MOTION_POPPER,
514
+ className
515
+ ),
516
+ ...props
517
+ }
518
+ ) });
648
519
  }
649
520
  );
650
- DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
521
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
651
522
 
652
523
  // src/content-transfer/index.tsx
653
- import { Fragment, jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
524
+ import { Fragment, jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
654
525
  function AlchemyGlyph(props) {
655
- return /* @__PURE__ */ jsxs6("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...props, children: [
526
+ return /* @__PURE__ */ jsxs5("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...props, children: [
656
527
  /* @__PURE__ */ jsx10("path", { d: "M4.5 5.5h8v11h-8z" }),
657
528
  /* @__PURE__ */ jsx10("path", { d: "M8.5 9.5h8v9h-8z" }),
658
529
  /* @__PURE__ */ jsx10("path", { d: "m18.5 3 .65 1.85L21 5.5l-1.85.65L18.5 8l-.65-1.85L16 5.5l1.85-.65z" })
@@ -662,14 +533,61 @@ var CapabilityContext = React7.createContext({});
662
533
  var useContentTransferCapabilities = () => React7.useContext(CapabilityContext);
663
534
  var SurfaceContext = React7.createContext(null);
664
535
  function MenuPresentation({ label, hint, icon: Icon2 }) {
665
- return /* @__PURE__ */ jsxs6(Fragment, { children: [
536
+ return /* @__PURE__ */ jsxs5(Fragment, { children: [
666
537
  Icon2 ? /* @__PURE__ */ jsx10(Icon2, { className: "matrx-alchemy-menu-icon" }) : null,
667
- /* @__PURE__ */ jsxs6("span", { children: [
538
+ /* @__PURE__ */ jsxs5("span", { children: [
668
539
  label,
669
540
  hint ? /* @__PURE__ */ jsx10("small", { className: "matrx-alchemy-menu-hint", children: hint }) : null
670
541
  ] })
671
542
  ] });
672
543
  }
544
+ function PaletteGlyph({ format, ai = false, file = false }) {
545
+ if (ai) return /* @__PURE__ */ jsxs5("svg", { className: "matrx-alchemy-palette-glyph", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
546
+ /* @__PURE__ */ jsx10("path", { d: "M12 5a3 3 0 1 0-5.997.125A4 4 0 0 0 3.5 10.9a4 4 0 0 0 .556 6.588A4 4 0 0 0 12 19" }),
547
+ /* @__PURE__ */ jsx10("path", { d: "M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.503 5.775 4 4 0 0 1-.556 6.588A4 4 0 0 1 12 19" }),
548
+ /* @__PURE__ */ jsx10("path", { d: "M12 5v14M8 9h1M15 9h1M8 15h1M15 15h1" })
549
+ ] });
550
+ if (file) return /* @__PURE__ */ jsxs5("svg", { className: "matrx-alchemy-palette-glyph", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
551
+ /* @__PURE__ */ jsx10("path", { d: "M6 3h8l4 4v14H6z" }),
552
+ /* @__PURE__ */ jsx10("path", { d: "M14 3v5h5M9 13h6M9 17h6" })
553
+ ] });
554
+ const path = format === "json" ? /* @__PURE__ */ jsxs5(Fragment, { children: [
555
+ /* @__PURE__ */ jsx10("path", { d: "M9 4C7 4 7 7 5 7v3c2 0 2 1 2 2s0 2-2 2v3c2 0 2 3 4 3" }),
556
+ /* @__PURE__ */ jsx10("path", { d: "M15 4c2 0 2 3 4 3v3c-2 0-2 1-2 2s0 2 2 2v3c-2 0-2 3-4 3" })
557
+ ] }) : format === "compact-json" ? /* @__PURE__ */ jsxs5(Fragment, { children: [
558
+ /* @__PURE__ */ jsx10("path", { d: "m14 10 7-7" }),
559
+ /* @__PURE__ */ jsx10("path", { d: "M20 10h-6V4" }),
560
+ /* @__PURE__ */ jsx10("path", { d: "m3 21 7-7" }),
561
+ /* @__PURE__ */ jsx10("path", { d: "M4 14h6v6" })
562
+ ] }) : format === "csv" ? /* @__PURE__ */ jsxs5(Fragment, { children: [
563
+ /* @__PURE__ */ jsx10("rect", { x: "4", y: "4", width: "16", height: "16", rx: "1" }),
564
+ /* @__PURE__ */ jsx10("path", { d: "M4 10h16M10 4v16" })
565
+ ] }) : format === "tsv" ? /* @__PURE__ */ jsxs5(Fragment, { children: [
566
+ /* @__PURE__ */ jsx10("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
567
+ /* @__PURE__ */ jsx10("path", { d: "M14 2v6h6M8 13h2M14 13h2M8 17h2M14 17h2" })
568
+ ] }) : format === "xlsx" ? /* @__PURE__ */ jsxs5(Fragment, { children: [
569
+ /* @__PURE__ */ jsx10("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
570
+ /* @__PURE__ */ jsx10("path", { d: "M14 2v6h6M8 13h8M8 17h8M12 11v8" })
571
+ ] }) : format === "markdown" ? /* @__PURE__ */ jsxs5(Fragment, { children: [
572
+ /* @__PURE__ */ jsx10("path", { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5z" }),
573
+ /* @__PURE__ */ jsx10("path", { d: "M14 2v6h6M10 13l-2 2 2 2M14 17l2-2-2-2" })
574
+ ] }) : format === "html" ? /* @__PURE__ */ jsx10(Fragment, { children: /* @__PURE__ */ jsx10("path", { d: "M15 6h6M3 6h7M3 12h18M3 18h12" }) }) : /* @__PURE__ */ jsx10(Fragment, { children: /* @__PURE__ */ jsx10("path", { d: "M4 7V4h16v3M9 20h6M12 4v16" }) });
575
+ return /* @__PURE__ */ jsx10("svg", { className: "matrx-alchemy-palette-glyph", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: path });
576
+ }
577
+ function PaletteRows({ title, items, onRun, extra, ai = false }) {
578
+ if (!items.length && !extra) return null;
579
+ return /* @__PURE__ */ jsxs5("section", { className: "matrx-alchemy-palette-section", children: [
580
+ /* @__PURE__ */ jsx10("h3", { children: title }),
581
+ items.map((item) => /* @__PURE__ */ jsxs5("button", { type: "button", className: cn("matrx-alchemy-palette-row", ai && "matrx-alchemy-palette-row-ai"), "aria-label": item.ariaLabel, onClick: () => onRun?.(item), children: [
582
+ item.icon ? /* @__PURE__ */ jsx10(item.icon, { className: "matrx-alchemy-menu-icon" }) : /* @__PURE__ */ jsx10(PaletteGlyph, { ai }),
583
+ /* @__PURE__ */ jsxs5("span", { children: [
584
+ item.copyLabel ?? item.label,
585
+ item.hint ? /* @__PURE__ */ jsx10("small", { className: "matrx-alchemy-menu-hint", children: item.hint }) : null
586
+ ] })
587
+ ] }, item.id)),
588
+ extra
589
+ ] });
590
+ }
673
591
  var LABEL = { plain: "Plain text", markdown: "Markdown", html: "Formatted", json: "JSON", "compact-json": "Compact JSON", csv: "CSV", tsv: "Google Sheets", xlsx: "Excel workbook" };
674
592
  var BUILT_INS = Object.freeze(Object.keys(LABEL).map((id) => ({ id })));
675
593
  var COPIES = ["plain", "markdown", "html", "json", "compact-json", "csv", "tsv"];
@@ -758,7 +676,7 @@ function ContentTransferMenu(props) {
758
676
  const identityKey = props.capabilities?.identityKey ?? inherited.identityKey;
759
677
  return /* @__PURE__ */ jsx10(ContentTransferMenuSession, { ...props }, identityKey ?? "anonymous");
760
678
  }
761
- function ContentTransferMenuSession({ source, surface, label, projection, sections, preferences, table, formatSources, variants = EMPTY_VARIANTS, actions = [], capabilities: local, disabled, enabled = true, className, stopPropagation = true, hide = [], controllerRef }) {
679
+ function ContentTransferMenuSession({ source, surface, label, projection, sections, preferences, table, formatSources, sourceFormats = true, variants = EMPTY_VARIANTS, actions = [], capabilities: local, disabled, enabled = true, className, stopPropagation = true, hide = [], controllerRef }) {
762
680
  const triggerRef = React7.useRef(null);
763
681
  const inherited = React7.useContext(CapabilityContext);
764
682
  const nearestSurface = React7.useContext(SurfaceContext);
@@ -771,6 +689,8 @@ function ContentTransferMenuSession({ source, surface, label, projection, sectio
771
689
  const workspaceCaptures = React7.useRef(/* @__PURE__ */ new Map());
772
690
  const externalWorkspaceKeys = React7.useRef(/* @__PURE__ */ new Set());
773
691
  const [notice, setNotice] = React7.useState(null);
692
+ const [paletteOpen, setPaletteOpen] = React7.useState(false);
693
+ const [mode, setMode] = React7.useState("copy");
774
694
  const scopes = React7.useMemo(() => table?.availableScopes ?? ["target"], [table]);
775
695
  const initialScope = table?.initialScope ?? "target";
776
696
  if (!scopes.includes(initialScope)) throw new Error("Alchemy initialScope must be included in availableScopes.");
@@ -1022,48 +942,87 @@ function ContentTransferMenuSession({ source, surface, label, projection, sectio
1022
942
  }, [captureOne, capturePrimary, fence, initialScope, preferences, providerPreferences, report]);
1023
943
  if (!enabled) return null;
1024
944
  const payload = menuCapture?.snapshot.payload ?? (source && "kind" in source ? source : void 0);
1025
- const quickVariants = (section) => variants.filter((v) => v.copyLabel && (v.section ?? "ai") === section).map((v) => /* @__PURE__ */ jsx10(DropdownMenuItem, { "aria-label": v.ariaLabel, onSelect: () => void transfer("markdown", false, v), children: /* @__PURE__ */ jsx10(MenuPresentation, { ...v, label: v.copyLabel }) }, `copy:${v.id}`));
1026
- const visibleCopies = COPIES.filter((f) => Boolean(formatSources?.[f]) || !["csv", "tsv"].includes(f) || payload?.kind === "rows");
1027
- const visibleDownloads = DOWNLOADS.filter((f) => f !== "xlsx" && Boolean(formatSources?.[f]) || !["csv", "tsv", "xlsx"].includes(f) || payload?.kind === "rows");
1028
- const visibleAdapters = menuCapture ? adapters.filter((a) => a.supports(menuCapture.snapshot.payload)) : [];
945
+ const quickVariants = (section) => variants.filter((v) => v.copyLabel && (v.section ?? "ai") === section);
946
+ const visibleCopies = sourceFormats ? COPIES.filter((f) => Boolean(formatSources?.[f]) || !["csv", "tsv"].includes(f) || payload?.kind === "rows") : [];
947
+ const visibleDownloads = sourceFormats ? DOWNLOADS.filter((f) => f !== "xlsx" && Boolean(formatSources?.[f]) || !["csv", "tsv", "xlsx"].includes(f) || payload?.kind === "rows") : [];
948
+ const visibleAdapters = sourceFormats && menuCapture ? adapters.filter((a) => a.supports(menuCapture.snapshot.payload)) : [];
1029
949
  const visibleActions = menuCapture ? registeredActions.filter((a) => a.supports(menuCapture.snapshot)) : [];
1030
- return /* @__PURE__ */ jsxs6("span", { className: cn("matrx-alchemy", className), onClick: stopPropagation ? (event) => event.stopPropagation() : void 0, children: [
1031
- /* @__PURE__ */ jsxs6(DropdownMenu, { onOpenChange: (open) => {
1032
- if (open) void preflight();
950
+ const downloadActions = visibleActions.filter((action) => action.placement === "download");
951
+ const ordinaryActions = visibleActions.filter((action) => action.placement !== "download");
952
+ const copyAvailable = !hide.includes("copy") && visibleCopies.length + visibleAdapters.length + quickVariants("copy").length > 0;
953
+ const downloadAvailable = !hide.includes("download") && visibleDownloads.length + visibleAdapters.length + downloadActions.length > 0;
954
+ const prepareAvailable = !hide.includes("prepare") && (quickVariants("ai").length > 0 || Boolean(primary) || Boolean(nearestWorkspaceKey) || variants.length > 0);
955
+ const resolvedMode = mode === "copy" && !copyAvailable ? "download" : mode === "download" && !downloadAvailable ? "copy" : mode;
956
+ const closePalette = () => setPaletteOpen(false);
957
+ const tile = (id, label2, onClick, options = {}) => {
958
+ const presentation = options.action;
959
+ const Icon2 = presentation?.icon;
960
+ const fallbackLabel = options.file && !/^download\b/i.test(label2) ? `Download ${label2}` : label2;
961
+ return /* @__PURE__ */ jsxs5("button", { type: "button", className: "matrx-alchemy-palette-tile", "aria-label": presentation?.ariaLabel ?? (presentation ? fallbackLabel : options.ariaLabel ?? `${resolvedMode === "copy" ? "Copy" : "Download"} ${label2}`), onClick: () => {
962
+ closePalette();
963
+ onClick();
1033
964
  }, children: [
1034
- /* @__PURE__ */ jsx10(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx10("button", { ref: triggerRef, type: "button", className: "matrx-alchemy-trigger", disabled, "aria-label": `Copy, transform or export ${sourceLabel}`, title: "Alchemy \u2014 copy, transform, export", children: /* @__PURE__ */ jsx10(AlchemyGlyph, {}) }) }),
1035
- /* @__PURE__ */ jsxs6(DropdownMenuContent, { align: "end", className: "matrx-alchemy-menu", children: [
1036
- menuStatus === "loading" ? /* @__PURE__ */ jsx10(DropdownMenuItem, { disabled: true, children: "Inspecting content\u2026" }) : menuStatus !== "idle" ? /* @__PURE__ */ jsx10(DropdownMenuItem, { disabled: true, children: menuStatus }) : null,
1037
- !hide.includes("copy") ? /* @__PURE__ */ jsxs6(Fragment, { children: [
1038
- /* @__PURE__ */ jsx10(DropdownMenuLabel, { children: "Copy" }),
1039
- quickVariants("copy"),
1040
- visibleCopies.map((format) => /* @__PURE__ */ jsx10(DropdownMenuItem, { onSelect: () => void transfer(format, false), children: format === "plain" ? "Copy" : `Copy ${LABEL[format]}` }, format)),
1041
- visibleAdapters.map((adapter) => /* @__PURE__ */ jsxs6(DropdownMenuItem, { onSelect: () => void transfer(adapter, false), children: [
1042
- "Copy ",
1043
- adapter.label
1044
- ] }, adapter.id))
1045
- ] }) : null,
1046
- !hide.includes("prepare") ? /* @__PURE__ */ jsxs6(Fragment, { children: [
1047
- /* @__PURE__ */ jsx10(DropdownMenuSeparator, {}),
1048
- quickVariants("ai"),
1049
- /* @__PURE__ */ jsx10(DropdownMenuItem, { onSelect: () => void openWorkspace(), children: "Prepare for AI\u2026" }),
1050
- nearestWorkspaceKey && nearestSurface ? /* @__PURE__ */ jsx10(DropdownMenuItem, { onSelect: () => void openWorkspace(nearestWorkspaceKey, { source: nearestSurface, label: nearestSurface.surfaceName }), children: "Prepare this surface\u2026" }) : null,
1051
- variants.map((variant) => /* @__PURE__ */ jsx10(DropdownMenuItem, { onSelect: () => void openWorkspace(variantWorkspaceKeys.get(variant.id), variant), children: /* @__PURE__ */ jsx10(MenuPresentation, { ...variant, label: `Prepare ${variant.label}\u2026` }) }, variant.id))
965
+ Icon2 ? /* @__PURE__ */ jsx10(Icon2, { className: "matrx-alchemy-menu-icon" }) : /* @__PURE__ */ jsx10(PaletteGlyph, { ...!options.custom ? { format: id } : {}, ...options.ai ? { ai: true } : {}, ...options.file ? { file: true } : {} }),
966
+ /* @__PURE__ */ jsxs5("span", { children: [
967
+ label2,
968
+ presentation?.hint ? /* @__PURE__ */ jsx10("small", { className: "matrx-alchemy-menu-hint", children: presentation.hint }) : null
969
+ ] })
970
+ ] }, id);
971
+ };
972
+ return /* @__PURE__ */ jsxs5("span", { className: cn("matrx-alchemy", className), onClick: stopPropagation ? (event) => event.stopPropagation() : void 0, children: [
973
+ /* @__PURE__ */ jsxs5(Popover, { open: paletteOpen, onOpenChange: (open) => {
974
+ setPaletteOpen(open);
975
+ if (open) {
976
+ setMode("copy");
977
+ void preflight();
978
+ }
979
+ }, children: [
980
+ /* @__PURE__ */ jsx10(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx10("button", { ref: triggerRef, type: "button", className: "matrx-alchemy-trigger", disabled, "aria-label": `Copy, transform or export ${sourceLabel}`, title: "Alchemy \u2014 copy, transform, export", children: /* @__PURE__ */ jsx10(AlchemyGlyph, {}) }) }),
981
+ /* @__PURE__ */ jsxs5(PopoverContent, { align: "end", className: "matrx-alchemy-menu matrx-alchemy-palette", "aria-label": "Alchemy output options", onCloseAutoFocus: () => triggerRef.current?.focus(), children: [
982
+ copyAvailable && downloadAvailable ? /* @__PURE__ */ jsxs5("div", { className: "matrx-alchemy-mode", "aria-label": "Output action", children: [
983
+ /* @__PURE__ */ jsx10("button", { type: "button", "aria-label": "Copy mode", "aria-pressed": resolvedMode === "copy", onClick: () => setMode("copy"), children: "Copy" }),
984
+ /* @__PURE__ */ jsx10("button", { type: "button", "aria-label": "Download mode", "aria-pressed": resolvedMode === "download", onClick: () => setMode("download"), children: "Download" })
1052
985
  ] }) : null,
1053
- !hide.includes("download") ? /* @__PURE__ */ jsxs6(Fragment, { children: [
1054
- /* @__PURE__ */ jsx10(DropdownMenuSeparator, {}),
1055
- /* @__PURE__ */ jsx10(DropdownMenuLabel, { children: "Download" }),
1056
- visibleDownloads.map((format) => /* @__PURE__ */ jsxs6(DropdownMenuItem, { onSelect: () => void transfer(format, true), children: [
1057
- "Download ",
1058
- LABEL[format]
1059
- ] }, format)),
1060
- visibleAdapters.map((adapter) => /* @__PURE__ */ jsxs6(DropdownMenuItem, { onSelect: () => void transfer(adapter, true), children: [
1061
- "Download ",
1062
- adapter.label
1063
- ] }, `download:${adapter.id}`))
986
+ menuStatus === "loading" ? /* @__PURE__ */ jsx10("p", { className: "matrx-alchemy-palette-status", children: "Inspecting content\u2026" }) : menuStatus !== "idle" ? /* @__PURE__ */ jsx10("p", { className: "matrx-alchemy-error", children: menuStatus }) : null,
987
+ resolvedMode === "copy" && copyAvailable ? /* @__PURE__ */ jsxs5(Fragment, { children: [
988
+ /* @__PURE__ */ jsxs5("div", { className: "matrx-alchemy-palette-grid", children: [
989
+ visibleCopies.map((format) => tile(format, { plain: "Text", markdown: "Markdown", html: "Formatted", json: "JSON", "compact-json": "Compact", csv: "CSV", tsv: "Sheets" }[format], () => void transfer(format, false), { ariaLabel: `Copy ${LABEL[format]}` })),
990
+ visibleAdapters.map((adapter) => tile(adapter.id, adapter.label, () => void transfer(adapter, false), { custom: true }))
991
+ ] }),
992
+ quickVariants("copy").length ? /* @__PURE__ */ jsx10(PaletteRows, { title: "Quick copy", items: quickVariants("copy"), onRun: (variant) => {
993
+ closePalette();
994
+ void transfer("markdown", false, variant);
995
+ } }) : null
1064
996
  ] }) : null,
1065
- visibleActions.length ? /* @__PURE__ */ jsx10(DropdownMenuSeparator, {}) : null,
1066
- visibleActions.map((action) => /* @__PURE__ */ jsx10(DropdownMenuItem, { "aria-label": action.ariaLabel, onSelect: () => void runAction(action), children: /* @__PURE__ */ jsx10(MenuPresentation, { ...action, label: action.label }) }, action.id))
997
+ resolvedMode === "download" && downloadAvailable ? /* @__PURE__ */ jsx10(Fragment, { children: /* @__PURE__ */ jsxs5("div", { className: "matrx-alchemy-palette-grid", children: [
998
+ visibleDownloads.map((format) => tile(format, { plain: "Text", markdown: "Markdown", html: "Formatted", json: "JSON", "compact-json": "Compact", csv: "CSV", tsv: "Sheets", xlsx: "Excel" }[format], () => void transfer(format, true), { ariaLabel: `Download ${LABEL[format]}` })),
999
+ visibleAdapters.map((adapter) => tile(adapter.id, adapter.label, () => void transfer(adapter, true), { custom: true })),
1000
+ downloadActions.map((action) => tile(action.id, action.label, () => void runAction(action), { custom: true, action, file: true }))
1001
+ ] }) }) : null,
1002
+ prepareAvailable ? /* @__PURE__ */ jsx10(PaletteRows, { title: "Prepare", ai: true, items: quickVariants("ai"), onRun: (variant) => {
1003
+ closePalette();
1004
+ void transfer("markdown", false, variant);
1005
+ }, extra: /* @__PURE__ */ jsxs5("button", { type: "button", className: "matrx-alchemy-palette-row", onClick: () => {
1006
+ closePalette();
1007
+ void openWorkspace();
1008
+ }, children: [
1009
+ /* @__PURE__ */ jsx10(PaletteGlyph, { ai: true }),
1010
+ /* @__PURE__ */ jsx10("span", { children: "Prepare for AI\u2026" })
1011
+ ] }) }) : null,
1012
+ prepareAvailable && (nearestWorkspaceKey || variants.length) ? /* @__PURE__ */ jsx10(PaletteRows, { title: "Context", items: [], extra: /* @__PURE__ */ jsxs5(Fragment, { children: [
1013
+ nearestWorkspaceKey && nearestSurface ? /* @__PURE__ */ jsx10("button", { type: "button", className: "matrx-alchemy-palette-row", onClick: () => {
1014
+ closePalette();
1015
+ void openWorkspace(nearestWorkspaceKey, { source: nearestSurface, label: nearestSurface.surfaceName });
1016
+ }, children: /* @__PURE__ */ jsx10("span", { children: "Prepare this surface\u2026" }) }) : null,
1017
+ variants.map((variant) => /* @__PURE__ */ jsx10("button", { type: "button", className: "matrx-alchemy-palette-row", "aria-label": variant.ariaLabel, onClick: () => {
1018
+ closePalette();
1019
+ void openWorkspace(variantWorkspaceKeys.get(variant.id), variant);
1020
+ }, children: /* @__PURE__ */ jsx10(MenuPresentation, { ...variant, label: `Prepare ${variant.label}\u2026` }) }, variant.id))
1021
+ ] }) }) : null,
1022
+ ordinaryActions.length ? /* @__PURE__ */ jsx10(PaletteRows, { title: "Actions", items: [], extra: ordinaryActions.map((action) => /* @__PURE__ */ jsx10("button", { type: "button", className: "matrx-alchemy-palette-row", "aria-label": action.ariaLabel, onClick: () => {
1023
+ closePalette();
1024
+ void runAction(action);
1025
+ }, children: /* @__PURE__ */ jsx10(MenuPresentation, { ...action, label: action.label }) }, action.id)) }) : null
1067
1026
  ] })
1068
1027
  ] }),
1069
1028
  notice ? /* @__PURE__ */ jsx10("span", { className: "matrx-alchemy-notice", role: "status", children: notice }) : null,
@@ -1326,31 +1285,31 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1326
1285
  const limitText = Object.entries(state.preferences.limits).filter(([, value]) => value != null).map(([key, value]) => `${key.replace(/^max/, "max ")} ${Number(value).toLocaleString()}`).join(" \xB7 ");
1327
1286
  return /* @__PURE__ */ jsx10(Dialog, { open, onOpenChange: (next) => {
1328
1287
  if (!next) close();
1329
- }, children: /* @__PURE__ */ jsxs6(DialogContent, { onCloseAutoFocus: (event) => {
1288
+ }, children: /* @__PURE__ */ jsxs5(DialogContent, { onCloseAutoFocus: (event) => {
1330
1289
  event.preventDefault();
1331
1290
  restoreFocus();
1332
1291
  }, className: "matrx-alchemy-workspace max-w-5xl", "aria-busy": busy !== null, children: [
1333
- /* @__PURE__ */ jsxs6(DialogHeader, { children: [
1334
- /* @__PURE__ */ jsxs6(DialogTitle, { children: [
1292
+ /* @__PURE__ */ jsxs5(DialogHeader, { children: [
1293
+ /* @__PURE__ */ jsxs5(DialogTitle, { children: [
1335
1294
  "Prepare ",
1336
1295
  state.snapshot.label
1337
1296
  ] }),
1338
- /* @__PURE__ */ jsxs6(DialogDescription, { children: [
1297
+ /* @__PURE__ */ jsxs5(DialogDescription, { children: [
1339
1298
  "Captured ",
1340
1299
  state.snapshot.unsavedChanges ? "from your unsaved draft" : "as an immutable snapshot",
1341
1300
  ". Your source is never edited."
1342
1301
  ] })
1343
1302
  ] }),
1344
- /* @__PURE__ */ jsxs6("div", { className: "matrx-alchemy-workspace-grid", children: [
1345
- /* @__PURE__ */ jsxs6("section", { className: "matrx-alchemy-main", children: [
1346
- /* @__PURE__ */ jsxs6("div", { className: "matrx-alchemy-toolbar", children: [
1347
- scopes.length > 1 ? /* @__PURE__ */ jsxs6("label", { children: [
1303
+ /* @__PURE__ */ jsxs5("div", { className: "matrx-alchemy-workspace-grid", children: [
1304
+ /* @__PURE__ */ jsxs5("section", { className: "matrx-alchemy-main", children: [
1305
+ /* @__PURE__ */ jsxs5("div", { className: "matrx-alchemy-toolbar", children: [
1306
+ scopes.length > 1 ? /* @__PURE__ */ jsxs5("label", { children: [
1348
1307
  "Scope",
1349
1308
  /* @__PURE__ */ jsx10("select", { "aria-label": "Transfer scope", value: state.scope, disabled: busy !== null, onChange: (e) => void requestCapture(e.target.value), children: scopes.map((scope) => /* @__PURE__ */ jsx10("option", { value: scope, children: SCOPE_LABEL[scope] }, scope)) })
1350
1309
  ] }) : null,
1351
- /* @__PURE__ */ jsxs6("label", { children: [
1310
+ /* @__PURE__ */ jsxs5("label", { children: [
1352
1311
  "Detail",
1353
- /* @__PURE__ */ jsxs6("select", { "aria-label": "Detail preset", value: controls.preset, onChange: (e) => changeControls({ ...controls, preset: e.target.value }), children: [
1312
+ /* @__PURE__ */ jsxs5("select", { "aria-label": "Detail preset", value: controls.preset, onChange: (e) => changeControls({ ...controls, preset: e.target.value }), children: [
1354
1313
  /* @__PURE__ */ jsx10("option", { value: "full", children: "Full" }),
1355
1314
  /* @__PURE__ */ jsx10("option", { value: "compact", children: "Compact" }),
1356
1315
  /* @__PURE__ */ jsx10("option", { value: "brief", children: "Brief" }),
@@ -1376,24 +1335,24 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1376
1335
  }, children: "Reset" }),
1377
1336
  /* @__PURE__ */ jsx10(Button, { type: "button", size: "sm", variant: "outline", disabled: busy !== null, onClick: () => void requestCapture(state.scope), children: "Refresh source" })
1378
1337
  ] }),
1379
- controls.preset === "custom" && (state.draft.payload.kind === "json" || state.draft.payload.kind === "registered") ? /* @__PURE__ */ jsxs6("fieldset", { className: "matrx-alchemy-options", children: [
1338
+ controls.preset === "custom" && (state.draft.payload.kind === "json" || state.draft.payload.kind === "registered") ? /* @__PURE__ */ jsxs5("fieldset", { className: "matrx-alchemy-options", children: [
1380
1339
  /* @__PURE__ */ jsx10("legend", { children: "JSON limits" }),
1381
- [["maxDepth", "Maximum depth"], ["maxStringChars", "Maximum string characters"], ["maxArrayItems", "Maximum array items"]].map(([key, text]) => /* @__PURE__ */ jsxs6("label", { children: [
1340
+ [["maxDepth", "Maximum depth"], ["maxStringChars", "Maximum string characters"], ["maxArrayItems", "Maximum array items"]].map(([key, text]) => /* @__PURE__ */ jsxs5("label", { children: [
1382
1341
  text,
1383
1342
  /* @__PURE__ */ jsx10("input", { type: "number", min: "0", value: controls[key] ?? "", onChange: (e) => changeControls({ ...controls, [key]: Number.isNaN(e.target.valueAsNumber) ? null : e.target.valueAsNumber }) })
1384
1343
  ] }, key))
1385
1344
  ] }) : null,
1386
1345
  rows ? /* @__PURE__ */ jsx10(RowControls, { rows, controls, change: changeControls }) : null,
1387
- state.snapshot.sections.length ? /* @__PURE__ */ jsxs6("fieldset", { className: "matrx-alchemy-options", children: [
1346
+ state.snapshot.sections.length ? /* @__PURE__ */ jsxs5("fieldset", { className: "matrx-alchemy-options", children: [
1388
1347
  /* @__PURE__ */ jsx10("legend", { children: "Sections" }),
1389
- state.snapshot.sections.map((section) => /* @__PURE__ */ jsxs6("label", { children: [
1348
+ state.snapshot.sections.map((section) => /* @__PURE__ */ jsxs5("label", { children: [
1390
1349
  /* @__PURE__ */ jsx10("input", { type: "checkbox", checked: controls.sections.includes(section.id), onChange: (e) => changeControls({ ...controls, sections: e.target.checked ? [...controls.sections, section.id] : controls.sections.filter((id) => id !== section.id) }) }),
1391
1350
  " ",
1392
1351
  section.label
1393
1352
  ] }, section.id))
1394
1353
  ] }) : null,
1395
- /* @__PURE__ */ jsxs6("div", { className: "matrx-alchemy-coverage", children: [
1396
- /* @__PURE__ */ jsxs6("span", { children: [
1354
+ /* @__PURE__ */ jsxs5("div", { className: "matrx-alchemy-coverage", children: [
1355
+ /* @__PURE__ */ jsxs5("span", { children: [
1397
1356
  state.snapshot.coverage.included.toLocaleString(),
1398
1357
  " included",
1399
1358
  state.snapshot.coverage.total == null ? "" : ` of ${state.snapshot.coverage.total.toLocaleString()}`,
@@ -1401,16 +1360,16 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1401
1360
  state.snapshot.coverage.status
1402
1361
  ] }),
1403
1362
  state.snapshot.coverage.reason ? /* @__PURE__ */ jsx10("span", { children: state.snapshot.coverage.reason }) : null,
1404
- limitText ? /* @__PURE__ */ jsxs6("span", { children: [
1363
+ limitText ? /* @__PURE__ */ jsxs5("span", { children: [
1405
1364
  "Limits: ",
1406
1365
  limitText
1407
1366
  ] }) : null,
1408
- displayedOmissions.length ? /* @__PURE__ */ jsxs6("details", { children: [
1409
- /* @__PURE__ */ jsxs6("summary", { children: [
1367
+ displayedOmissions.length ? /* @__PURE__ */ jsxs5("details", { children: [
1368
+ /* @__PURE__ */ jsxs5("summary", { children: [
1410
1369
  displayedOmissions.length,
1411
1370
  " omissions or adjustments"
1412
1371
  ] }),
1413
- /* @__PURE__ */ jsx10("ul", { children: displayedOmissions.map((o, i) => /* @__PURE__ */ jsxs6("li", { children: [
1372
+ /* @__PURE__ */ jsx10("ul", { children: displayedOmissions.map((o, i) => /* @__PURE__ */ jsxs5("li", { children: [
1414
1373
  o.path || "/",
1415
1374
  ": ",
1416
1375
  o.reason,
@@ -1418,9 +1377,9 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1418
1377
  ] }, `${o.path}-${o.reason}-${i}`)) })
1419
1378
  ] }) : null
1420
1379
  ] }),
1421
- /* @__PURE__ */ jsxs6("label", { className: "matrx-alchemy-preview-label", children: [
1380
+ /* @__PURE__ */ jsxs5("label", { className: "matrx-alchemy-preview-label", children: [
1422
1381
  "Output format",
1423
- /* @__PURE__ */ jsxs6("select", { "aria-label": "Output format", value: format, onChange: (e) => setFormat(e.target.value), children: [
1382
+ /* @__PURE__ */ jsxs5("select", { "aria-label": "Output format", value: format, onChange: (e) => setFormat(e.target.value), children: [
1424
1383
  formats.map((f) => /* @__PURE__ */ jsx10("option", { value: f, children: LABEL[f] }, f)),
1425
1384
  state.draft.payload.kind === "rows" ? /* @__PURE__ */ jsx10("option", { value: "xlsx", children: "Excel workbook" }) : null,
1426
1385
  workspaceAdapters.map((adapter) => /* @__PURE__ */ jsx10("option", { value: adapter.id, children: adapter.label }, adapter.id))
@@ -1436,9 +1395,9 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1436
1395
  setFormat("plain");
1437
1396
  }, children: "Use invalid JSON as plain text" }) : null
1438
1397
  ] }),
1439
- ai || busy === "capture" || state.error ? /* @__PURE__ */ jsxs6("aside", { children: [
1440
- ai ? /* @__PURE__ */ jsxs6(Fragment, { children: [
1441
- /* @__PURE__ */ jsxs6("label", { children: [
1398
+ ai || busy === "capture" || state.error ? /* @__PURE__ */ jsxs5("aside", { children: [
1399
+ ai ? /* @__PURE__ */ jsxs5(Fragment, { children: [
1400
+ /* @__PURE__ */ jsxs5("label", { children: [
1442
1401
  "AI instruction",
1443
1402
  /* @__PURE__ */ jsx10("textarea", { value: instruction, onChange: (e) => setInstruction(e.target.value), placeholder: "Tell AI how to prepare this content" })
1444
1403
  ] }),
@@ -1455,20 +1414,20 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1455
1414
  state.error ? /* @__PURE__ */ jsx10("p", { role: "alert", className: "matrx-alchemy-error", children: state.error }) : null
1456
1415
  ] }) : null
1457
1416
  ] }),
1458
- pendingControls ? /* @__PURE__ */ jsxs6("div", { className: "matrx-alchemy-decision", role: "alert", children: [
1417
+ pendingControls ? /* @__PURE__ */ jsxs5("div", { className: "matrx-alchemy-decision", role: "alert", children: [
1459
1418
  /* @__PURE__ */ jsx10("p", { children: "This control would replace your manual edit." }),
1460
1419
  /* @__PURE__ */ jsx10(Button, { type: "button", variant: "outline", onClick: () => setPendingControls(null), children: "Keep edited draft" }),
1461
1420
  /* @__PURE__ */ jsx10(Button, { type: "button", onClick: applyPendingControls, children: "Rebuild from source" })
1462
1421
  ] }) : null,
1463
1422
  state.sourceStale ? /* @__PURE__ */ jsx10("p", { role: "alert", className: "matrx-alchemy-decision", children: "The source changed since this draft. Use Refresh source to review the latest data." }) : null,
1464
- state.pending ? /* @__PURE__ */ jsxs6("div", { className: "matrx-alchemy-decision", role: "alert", children: [
1423
+ state.pending ? /* @__PURE__ */ jsxs5("div", { className: "matrx-alchemy-decision", role: "alert", children: [
1465
1424
  /* @__PURE__ */ jsx10("p", { children: "A fresh source snapshot is ready." }),
1466
1425
  /* @__PURE__ */ jsx10(Button, { type: "button", variant: "outline", onClick: () => resolveCapture("keep"), children: "Keep current snapshot and draft" }),
1467
1426
  /* @__PURE__ */ jsx10(Button, { type: "button", onClick: () => resolveCapture("regenerate"), children: "Regenerate from fresh source" })
1468
1427
  ] }) : null,
1469
1428
  deliveryNotice ? /* @__PURE__ */ jsx10("p", { role: "status", className: "matrx-alchemy-meta", children: deliveryNotice }) : null,
1470
- /* @__PURE__ */ jsxs6(DialogFooter, { children: [
1471
- /* @__PURE__ */ jsxs6("span", { className: "matrx-alchemy-meta", children: [
1429
+ /* @__PURE__ */ jsxs5(DialogFooter, { children: [
1430
+ /* @__PURE__ */ jsxs5("span", { className: "matrx-alchemy-meta", children: [
1472
1431
  buffer.length.toLocaleString(),
1473
1432
  " characters \xB7 ~",
1474
1433
  estimateTokens(buffer).toLocaleString(),
@@ -1481,35 +1440,35 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1481
1440
  ] }) });
1482
1441
  }
1483
1442
  function RowControls({ rows, controls, change }) {
1484
- return /* @__PURE__ */ jsxs6(Fragment, { children: [
1485
- /* @__PURE__ */ jsxs6("div", { className: "matrx-alchemy-toolbar", children: [
1486
- /* @__PURE__ */ jsxs6("label", { children: [
1443
+ return /* @__PURE__ */ jsxs5(Fragment, { children: [
1444
+ /* @__PURE__ */ jsxs5("div", { className: "matrx-alchemy-toolbar", children: [
1445
+ /* @__PURE__ */ jsxs5("label", { children: [
1487
1446
  "Search",
1488
1447
  /* @__PURE__ */ jsx10("input", { value: controls.search, onChange: (e) => change({ ...controls, search: e.target.value }) })
1489
1448
  ] }),
1490
- /* @__PURE__ */ jsxs6("label", { children: [
1449
+ /* @__PURE__ */ jsxs5("label", { children: [
1491
1450
  "Sort",
1492
- /* @__PURE__ */ jsxs6("select", { value: controls.sort, onChange: (e) => change({ ...controls, sort: e.target.value }), children: [
1451
+ /* @__PURE__ */ jsxs5("select", { value: controls.sort, onChange: (e) => change({ ...controls, sort: e.target.value }), children: [
1493
1452
  /* @__PURE__ */ jsx10("option", { value: "", children: "None" }),
1494
1453
  rows.columns.map((column) => /* @__PURE__ */ jsx10("option", { value: column.id, children: column.label }, column.id))
1495
1454
  ] })
1496
1455
  ] }),
1497
- /* @__PURE__ */ jsxs6("label", { children: [
1456
+ /* @__PURE__ */ jsxs5("label", { children: [
1498
1457
  "Direction",
1499
- /* @__PURE__ */ jsxs6("select", { value: controls.direction, disabled: !controls.sort, onChange: (e) => change({ ...controls, direction: e.target.value }), children: [
1458
+ /* @__PURE__ */ jsxs5("select", { value: controls.direction, disabled: !controls.sort, onChange: (e) => change({ ...controls, direction: e.target.value }), children: [
1500
1459
  /* @__PURE__ */ jsx10("option", { value: "asc", children: "Ascending" }),
1501
1460
  /* @__PURE__ */ jsx10("option", { value: "desc", children: "Descending" })
1502
1461
  ] })
1503
1462
  ] }),
1504
- /* @__PURE__ */ jsxs6("label", { children: [
1463
+ /* @__PURE__ */ jsxs5("label", { children: [
1505
1464
  "Top rows",
1506
1465
  /* @__PURE__ */ jsx10("input", { type: "number", min: "0", value: controls.top ?? "", onChange: (e) => change({ ...controls, top: Number.isNaN(e.target.valueAsNumber) ? null : e.target.valueAsNumber }) })
1507
1466
  ] })
1508
1467
  ] }),
1509
- /* @__PURE__ */ jsxs6("fieldset", { className: "matrx-alchemy-options", children: [
1468
+ /* @__PURE__ */ jsxs5("fieldset", { className: "matrx-alchemy-options", children: [
1510
1469
  /* @__PURE__ */ jsx10("legend", { children: "Columns and filters" }),
1511
- rows.columns.map((column) => /* @__PURE__ */ jsxs6("div", { className: "matrx-alchemy-column", children: [
1512
- /* @__PURE__ */ jsxs6("label", { children: [
1470
+ rows.columns.map((column) => /* @__PURE__ */ jsxs5("div", { className: "matrx-alchemy-column", children: [
1471
+ /* @__PURE__ */ jsxs5("label", { children: [
1513
1472
  /* @__PURE__ */ jsx10("input", { type: "checkbox", checked: controls.visibleColumns.includes(column.id), onChange: (e) => change({ ...controls, visibleColumns: e.target.checked ? [...controls.visibleColumns, column.id] : controls.visibleColumns.filter((id) => id !== column.id) }) }),
1514
1473
  " ",
1515
1474
  column.label
@@ -1517,15 +1476,15 @@ function RowControls({ rows, controls, change }) {
1517
1476
  /* @__PURE__ */ jsx10("input", { "aria-label": `Filter ${column.label}`, placeholder: "Filter", value: controls.filters[column.id] ?? "", onChange: (e) => change({ ...controls, filters: { ...controls.filters, [column.id]: e.target.value } }) })
1518
1477
  ] }, column.id))
1519
1478
  ] }),
1520
- /* @__PURE__ */ jsxs6("fieldset", { className: "matrx-alchemy-options", children: [
1479
+ /* @__PURE__ */ jsxs5("fieldset", { className: "matrx-alchemy-options", children: [
1521
1480
  /* @__PURE__ */ jsx10("legend", { children: "Rows" }),
1522
- /* @__PURE__ */ jsxs6("label", { children: [
1481
+ /* @__PURE__ */ jsxs5("label", { children: [
1523
1482
  /* @__PURE__ */ jsx10("input", { type: "checkbox", checked: controls.selectedOnly, onChange: (e) => change({ ...controls, selectedOnly: e.target.checked }) }),
1524
1483
  " Only selected rows"
1525
1484
  ] }),
1526
1485
  /* @__PURE__ */ jsx10("div", { className: "matrx-alchemy-row-list", children: rows.rows.map((row, index) => {
1527
1486
  const summary = rows.columns.filter((column) => column.visible).slice(0, 2).map((column) => String(readTransferCell(row, column) ?? "")).filter(Boolean).join(" \xB7 ");
1528
- return /* @__PURE__ */ jsxs6("label", { children: [
1487
+ return /* @__PURE__ */ jsxs5("label", { children: [
1529
1488
  /* @__PURE__ */ jsx10("input", { type: "checkbox", checked: controls.selectedIndices.includes(index), onChange: (e) => change({ ...controls, selectedIndices: e.target.checked ? [...controls.selectedIndices, index] : controls.selectedIndices.filter((value) => value !== index) }) }),
1530
1489
  " Row ",
1531
1490
  index + 1,
@@ -1537,7 +1496,7 @@ function RowControls({ rows, controls, change }) {
1537
1496
  }
1538
1497
 
1539
1498
  // src/content-transfer/matrx-copy.tsx
1540
- import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
1499
+ import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
1541
1500
  var resolve = (value) => typeof value === "function" ? value() : value;
1542
1501
  var asPayload = (value) => ({
1543
1502
  kind: "markdown",
@@ -1708,6 +1667,7 @@ function MatrxCopyMenuSession(props) {
1708
1667
  label: item.label,
1709
1668
  supports: () => true,
1710
1669
  ...item.build && !item.onSelect ? {
1670
+ placement: "download",
1711
1671
  source: make(
1712
1672
  `export:${item.id}`,
1713
1673
  async () => {
@@ -1779,7 +1739,7 @@ function MatrxCopyMenuSession(props) {
1779
1739
  const source = (props.primarySource === "table" ? table : void 0) ?? json ?? table ?? structuredAgent ?? human ?? builderVariants[0]?.source;
1780
1740
  if (!source && !actions.length) return null;
1781
1741
  const target = source ?? make("actions", () => ({ kind: "text", text: props.label }));
1782
- return /* @__PURE__ */ jsxs7(Fragment2, { children: [
1742
+ return /* @__PURE__ */ jsxs6(Fragment2, { children: [
1783
1743
  /* @__PURE__ */ jsx11(
1784
1744
  ContentTransferMenu,
1785
1745
  {
@@ -1788,10 +1748,11 @@ function MatrxCopyMenuSession(props) {
1788
1748
  label: props.label,
1789
1749
  variants,
1790
1750
  actions,
1751
+ sourceFormats: Boolean(source),
1791
1752
  hide: [
1792
1753
  ...!copyVisible || !source ? ["copy"] : [],
1793
1754
  ...!aiVisible || !source ? ["prepare"] : [],
1794
- ...!exportVisible || !source ? ["download"] : []
1755
+ ...!exportVisible ? ["download"] : []
1795
1756
  ],
1796
1757
  formatSources: {
1797
1758
  ...human ? { plain: human, markdown: humanMarkdown, html: humanMarkdown } : {},
@@ -1900,7 +1861,7 @@ function SourceConfiguration({
1900
1861
  onOpenChange: (open) => {
1901
1862
  if (!open && !busy) onClose();
1902
1863
  },
1903
- children: /* @__PURE__ */ jsxs7(
1864
+ children: /* @__PURE__ */ jsxs6(
1904
1865
  DialogContent,
1905
1866
  {
1906
1867
  onCloseAutoFocus: (event) => {
@@ -1909,12 +1870,12 @@ function SourceConfiguration({
1909
1870
  },
1910
1871
  className: "matrx-alchemy-workspace",
1911
1872
  children: [
1912
- /* @__PURE__ */ jsxs7(DialogHeader, { children: [
1873
+ /* @__PURE__ */ jsxs6(DialogHeader, { children: [
1913
1874
  /* @__PURE__ */ jsx11(DialogTitle, { children: title }),
1914
1875
  /* @__PURE__ */ jsx11(DialogDescription, { children: custom?.dialogDescription ?? "Choose the source detail, then prepare, edit, summarize, copy or export it in Alchemy." })
1915
1876
  ] }),
1916
- /* @__PURE__ */ jsxs7("div", { className: "matrx-alchemy-main matrx-alchemy-toolbar", children: [
1917
- custom?.options.map((option) => /* @__PURE__ */ jsxs7("label", { children: [
1877
+ /* @__PURE__ */ jsxs6("div", { className: "matrx-alchemy-main matrx-alchemy-toolbar", children: [
1878
+ custom?.options.map((option) => /* @__PURE__ */ jsxs6("label", { children: [
1918
1879
  option.label,
1919
1880
  "hint" in option && option.hint ? /* @__PURE__ */ jsx11("small", { children: option.hint }) : null,
1920
1881
  option.kind === "toggle" ? /* @__PURE__ */ jsx11(
@@ -1934,7 +1895,7 @@ function SourceConfiguration({
1934
1895
  }),
1935
1896
  children: option.options.map((choice) => /* @__PURE__ */ jsx11("option", { value: choice.value, children: choice.label }, choice.value))
1936
1897
  }
1937
- ) : option.kind === "slider" ? /* @__PURE__ */ jsxs7(Fragment2, { children: [
1898
+ ) : option.kind === "slider" ? /* @__PURE__ */ jsxs6(Fragment2, { children: [
1938
1899
  /* @__PURE__ */ jsx11(
1939
1900
  "input",
1940
1901
  {
@@ -1950,7 +1911,7 @@ function SourceConfiguration({
1950
1911
  }
1951
1912
  ),
1952
1913
  /* @__PURE__ */ jsx11("span", { children: option.formatValue(Number(values[option.key])) })
1953
- ] }) : /* @__PURE__ */ jsxs7(Fragment2, { children: [
1914
+ ] }) : /* @__PURE__ */ jsxs6(Fragment2, { children: [
1954
1915
  /* @__PURE__ */ jsx11(
1955
1916
  "input",
1956
1917
  {
@@ -1976,7 +1937,7 @@ function SourceConfiguration({
1976
1937
  ))
1977
1938
  ] })
1978
1939
  ] }, option.key)),
1979
- groomer ? /* @__PURE__ */ jsxs7(Fragment2, { children: [
1940
+ groomer ? /* @__PURE__ */ jsxs6(Fragment2, { children: [
1980
1941
  /* @__PURE__ */ jsx11("div", { children: ["full", "compact", "brief"].map((level) => /* @__PURE__ */ jsx11(
1981
1942
  Button,
1982
1943
  {
@@ -1994,9 +1955,9 @@ function SourceConfiguration({
1994
1955
  },
1995
1956
  level
1996
1957
  )) }),
1997
- groomer.sections.map((section) => /* @__PURE__ */ jsxs7("label", { children: [
1958
+ groomer.sections.map((section) => /* @__PURE__ */ jsxs6("label", { children: [
1998
1959
  section.title,
1999
- /* @__PURE__ */ jsxs7(
1960
+ /* @__PURE__ */ jsxs6(
2000
1961
  "select",
2001
1962
  {
2002
1963
  value: sections[section.id],
@@ -2014,7 +1975,7 @@ function SourceConfiguration({
2014
1975
  ] }, section.id))
2015
1976
  ] }) : null
2016
1977
  ] }),
2017
- /* @__PURE__ */ jsxs7("p", { children: [
1978
+ /* @__PURE__ */ jsxs6("p", { children: [
2018
1979
  text.length.toLocaleString(),
2019
1980
  " characters \xB7 approximately",
2020
1981
  " ",
@@ -2022,7 +1983,7 @@ function SourceConfiguration({
2022
1983
  " tokens"
2023
1984
  ] }),
2024
1985
  error || buildError ? /* @__PURE__ */ jsx11("p", { role: "alert", children: error ?? buildError }) : null,
2025
- /* @__PURE__ */ jsxs7(DialogFooter, { children: [
1986
+ /* @__PURE__ */ jsxs6(DialogFooter, { children: [
2026
1987
  /* @__PURE__ */ jsx11(
2027
1988
  Button,
2028
1989
  {
@@ -2083,7 +2044,7 @@ import {
2083
2044
 
2084
2045
  // src/data-table/useTableNotice.tsx
2085
2046
  import { useState as useState5 } from "react";
2086
- import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
2047
+ import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
2087
2048
  function useTableNotice() {
2088
2049
  const host = useMatrxDataTableHost();
2089
2050
  const [message, setMessage] = useState5(null);
@@ -2097,7 +2058,7 @@ function useTableNotice() {
2097
2058
  else setMessage({ text, error: true });
2098
2059
  }
2099
2060
  };
2100
- const notice = message ? /* @__PURE__ */ jsxs8("span", { role: message.error ? "alert" : "status", className: message.error ? "text-xs text-destructive" : "text-xs text-muted-foreground", children: [
2061
+ const notice = message ? /* @__PURE__ */ jsxs7("span", { role: message.error ? "alert" : "status", className: message.error ? "text-xs text-destructive" : "text-xs text-muted-foreground", children: [
2101
2062
  message.text,
2102
2063
  /* @__PURE__ */ jsx13("button", { type: "button", "aria-label": "Dismiss notification", className: "ml-2 underline", onClick: () => setMessage(null), children: "Dismiss" })
2103
2064
  ] }) : null;
@@ -2131,7 +2092,7 @@ var TooltipContent = React9.forwardRef(({ className, sideOffset = 4, container,
2131
2092
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
2132
2093
 
2133
2094
  // src/data-table/MatrxUuidCell.tsx
2134
- import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
2095
+ import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
2135
2096
  var SHORT_LEN = 8;
2136
2097
  function shortUuid(id, len = SHORT_LEN) {
2137
2098
  return id.slice(0, len);
@@ -2224,13 +2185,13 @@ function MatrxUuidCell({
2224
2185
  };
2225
2186
  const idNode = (() => {
2226
2187
  if (forbidden) {
2227
- return /* @__PURE__ */ jsxs9("span", { className: "inline-flex min-w-0 items-center gap-1 font-mono text-xs text-muted-foreground/70 tabular-nums", children: [
2188
+ return /* @__PURE__ */ jsxs8("span", { className: "inline-flex min-w-0 items-center gap-1 font-mono text-xs text-muted-foreground/70 tabular-nums", children: [
2228
2189
  /* @__PURE__ */ jsx15("span", { className: "min-w-0 truncate", children: display }),
2229
2190
  /* @__PURE__ */ jsx15(ShieldOff, { className: "h-3 w-3 shrink-0 opacity-60", "aria-hidden": true })
2230
2191
  ] });
2231
2192
  }
2232
2193
  if (onOpen) {
2233
- return /* @__PURE__ */ jsxs9(
2194
+ return /* @__PURE__ */ jsxs8(
2234
2195
  "button",
2235
2196
  {
2236
2197
  type: "button",
@@ -2246,7 +2207,7 @@ function MatrxUuidCell({
2246
2207
  );
2247
2208
  }
2248
2209
  if (resolvedHref) {
2249
- return /* @__PURE__ */ jsxs9(
2210
+ return /* @__PURE__ */ jsxs8(
2250
2211
  "a",
2251
2212
  {
2252
2213
  href: resolvedHref,
@@ -2264,7 +2225,7 @@ function MatrxUuidCell({
2264
2225
  }
2265
2226
  return /* @__PURE__ */ jsx15("span", { className: "min-w-0 truncate font-mono text-xs text-muted-foreground tabular-nums select-all", children: display });
2266
2227
  })();
2267
- return /* @__PURE__ */ jsx15(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs9(
2228
+ return /* @__PURE__ */ jsx15(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs8(
2268
2229
  "span",
2269
2230
  {
2270
2231
  "data-matrx-cell-control": true,
@@ -2274,11 +2235,11 @@ function MatrxUuidCell({
2274
2235
  ),
2275
2236
  onClick: stop,
2276
2237
  children: [
2277
- /* @__PURE__ */ jsxs9(Tooltip, { children: [
2238
+ /* @__PURE__ */ jsxs8(Tooltip, { children: [
2278
2239
  /* @__PURE__ */ jsx15(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx15("span", { className: "inline-flex min-w-0 max-w-full items-center", children: idNode }) }),
2279
2240
  /* @__PURE__ */ jsx15(TooltipContent, { side: "top", className: "max-w-sm break-all font-mono", children: forbidden ? `No access \xB7 ${tip}` : tip })
2280
2241
  ] }),
2281
- /* @__PURE__ */ jsxs9(Tooltip, { children: [
2242
+ /* @__PURE__ */ jsxs8(Tooltip, { children: [
2282
2243
  /* @__PURE__ */ jsx15(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx15(
2283
2244
  "button",
2284
2245
  {
@@ -2294,7 +2255,7 @@ function MatrxUuidCell({
2294
2255
  ) }),
2295
2256
  /* @__PURE__ */ jsx15(TooltipContent, { side: "top", children: copied ? "Copied" : `Copy ${label ?? "id"}: ${value}` })
2296
2257
  ] }),
2297
- canPeek ? /* @__PURE__ */ jsxs9(Tooltip, { children: [
2258
+ canPeek ? /* @__PURE__ */ jsxs8(Tooltip, { children: [
2298
2259
  /* @__PURE__ */ jsx15(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx15(
2299
2260
  "button",
2300
2261
  {
@@ -2308,12 +2269,12 @@ function MatrxUuidCell({
2308
2269
  children: /* @__PURE__ */ jsx15(Lightbulb, { className: "h-3 w-3" })
2309
2270
  }
2310
2271
  ) }),
2311
- /* @__PURE__ */ jsxs9(TooltipContent, { side: "top", children: [
2272
+ /* @__PURE__ */ jsxs8(TooltipContent, { side: "top", children: [
2312
2273
  "Quick look at ",
2313
2274
  label ?? "record"
2314
2275
  ] })
2315
2276
  ] }) : null,
2316
- onOpen && resolvedHref && !forbidden ? /* @__PURE__ */ jsxs9(Tooltip, { children: [
2277
+ onOpen && resolvedHref && !forbidden ? /* @__PURE__ */ jsxs8(Tooltip, { children: [
2317
2278
  /* @__PURE__ */ jsx15(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx15(
2318
2279
  "a",
2319
2280
  {
@@ -2326,7 +2287,7 @@ function MatrxUuidCell({
2326
2287
  children: /* @__PURE__ */ jsx15(ExternalLink, { className: "h-3 w-3" })
2327
2288
  }
2328
2289
  ) }),
2329
- /* @__PURE__ */ jsxs9(TooltipContent, { side: "top", children: [
2290
+ /* @__PURE__ */ jsxs8(TooltipContent, { side: "top", children: [
2330
2291
  "Open ",
2331
2292
  label ?? "record",
2332
2293
  " in a new tab"
@@ -2354,7 +2315,7 @@ function isUuidValue(value) {
2354
2315
  }
2355
2316
 
2356
2317
  // src/data-table/DataRowInspector.tsx
2357
- import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
2318
+ import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
2358
2319
  var noFieldToken = () => null;
2359
2320
  function formatValue(value) {
2360
2321
  if (value == null) return "\u2014";
@@ -2398,7 +2359,7 @@ function DataRowInspector({
2398
2359
  })
2399
2360
  }
2400
2361
  ) }) : null;
2401
- return /* @__PURE__ */ jsxs10(
2362
+ return /* @__PURE__ */ jsxs9(
2402
2363
  "div",
2403
2364
  {
2404
2365
  className: cn("flex h-full min-h-0 flex-col overflow-hidden", className),
@@ -2406,7 +2367,7 @@ function DataRowInspector({
2406
2367
  title ? /* @__PURE__ */ jsx16("div", { className: "shrink-0 border-b border-border px-3 py-2 text-sm font-medium", children: title }) : null,
2407
2368
  /* @__PURE__ */ jsx16("div", { className: "min-h-0 flex-1 overflow-auto p-3", children: /* @__PURE__ */ jsx16("dl", { className: "space-y-2", children: entries.map(([key, value]) => {
2408
2369
  if (isUuidValue(value)) {
2409
- return /* @__PURE__ */ jsxs10(
2370
+ return /* @__PURE__ */ jsxs9(
2410
2371
  "div",
2411
2372
  {
2412
2373
  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",
@@ -2427,7 +2388,7 @@ function DataRowInspector({
2427
2388
  }
2428
2389
  const formatted = formatValue(value);
2429
2390
  const multiline = formatted.includes("\n") || formatted.length > 80;
2430
- return /* @__PURE__ */ jsxs10(
2391
+ return /* @__PURE__ */ jsxs9(
2431
2392
  "div",
2432
2393
  {
2433
2394
  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",
@@ -2455,7 +2416,7 @@ function DataRowInspector({
2455
2416
  }
2456
2417
 
2457
2418
  // src/data-table/DataRowWindow.tsx
2458
- import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
2419
+ import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
2459
2420
  function DataRowWindow({
2460
2421
  isOpen,
2461
2422
  onClose,
@@ -2497,7 +2458,7 @@ function DataRowWindow({
2497
2458
  bodyClassName: "flex min-h-0 flex-1 flex-col overflow-hidden p-0",
2498
2459
  sidebarDefaultSize: 140,
2499
2460
  sidebarMinSize: 110,
2500
- sidebar: hasTabs ? /* @__PURE__ */ jsxs11(
2461
+ sidebar: hasTabs ? /* @__PURE__ */ jsxs10(
2501
2462
  "nav",
2502
2463
  {
2503
2464
  "aria-label": "Row window tabs",
@@ -2534,7 +2495,7 @@ function TabButton({
2534
2495
  label,
2535
2496
  onClick
2536
2497
  }) {
2537
- return /* @__PURE__ */ jsxs11(
2498
+ return /* @__PURE__ */ jsxs10(
2538
2499
  "button",
2539
2500
  {
2540
2501
  type: "button",