@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
@@ -164,48 +164,6 @@ function XIcon(props) {
164
164
  /* @__PURE__ */ jsx2("path", { d: "m6 6 12 12" })
165
165
  ] });
166
166
  }
167
- function radixProps(props) {
168
- return {
169
- xmlns: "http://www.w3.org/2000/svg",
170
- viewBox: "0 0 15 15",
171
- width: 15,
172
- height: 15,
173
- fill: "none",
174
- "aria-hidden": true,
175
- ...props
176
- };
177
- }
178
- function CheckIcon(props) {
179
- return /* @__PURE__ */ jsx2("svg", { ...radixProps(props), children: /* @__PURE__ */ jsx2(
180
- "path",
181
- {
182
- 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",
183
- fill: "currentColor",
184
- fillRule: "evenodd",
185
- clipRule: "evenodd"
186
- }
187
- ) });
188
- }
189
- function DotFilledIcon(props) {
190
- return /* @__PURE__ */ jsx2("svg", { ...radixProps(props), children: /* @__PURE__ */ jsx2(
191
- "path",
192
- {
193
- 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",
194
- fill: "currentColor"
195
- }
196
- ) });
197
- }
198
- function RadixChevronRightIcon(props) {
199
- return /* @__PURE__ */ jsx2("svg", { ...radixProps(props), children: /* @__PURE__ */ jsx2(
200
- "path",
201
- {
202
- 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",
203
- fill: "currentColor",
204
- fillRule: "evenodd",
205
- clipRule: "evenodd"
206
- }
207
- ) });
208
- }
209
167
 
210
168
  // src/portal-container.tsx
211
169
  import * as React2 from "react";
@@ -469,137 +427,50 @@ var DialogDescription = React5.forwardRef(({ className, ...props }, ref) => /* @
469
427
  ));
470
428
  DialogDescription.displayName = DialogPrimitive.Description.displayName;
471
429
 
472
- // src/dropdown-menu.tsx
473
- import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
430
+ // src/popover.tsx
431
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
474
432
  import * as React6 from "react";
475
- import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
476
- var DropdownMenu = DropdownMenuPrimitive.Root;
477
- var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
478
- 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";
479
- 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";
480
- 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";
481
- var DropdownMenuSubTrigger = React6.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs3(
482
- DropdownMenuPrimitive.SubTrigger,
483
- {
484
- ref,
485
- "data-slot": "dropdown-menu-sub-trigger",
486
- className: cn(
487
- "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",
488
- inset && "pl-8",
489
- className
490
- ),
491
- ...props,
492
- children: [
493
- children,
494
- /* @__PURE__ */ jsx6(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
495
- ]
496
- }
497
- ));
498
- DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
499
- var DropdownMenuSubContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
500
- DropdownMenuPrimitive.SubContent,
501
- {
502
- ref,
503
- "data-slot": "dropdown-menu-sub-content",
504
- className: cn(MENU_SURFACE_CLASS, "shadow-lg", MOTION_POPPER, className),
505
- ...props
506
- }
507
- ));
508
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
509
- var DropdownMenuContent = React6.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => {
510
- const portalContainer = usePortalContainer(container);
511
- return /* @__PURE__ */ jsx6(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx6(
512
- DropdownMenuPrimitive.Content,
513
- {
514
- ref,
515
- "data-slot": "dropdown-menu-content",
516
- sideOffset,
517
- className: cn(
518
- MENU_SURFACE_CLASS,
519
- "shadow-md",
520
- MOTION_POPPER,
521
- className
522
- ),
523
- ...props
524
- }
525
- ) });
526
- });
527
- DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
528
- var DropdownMenuItem = React6.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx6(
529
- DropdownMenuPrimitive.Item,
530
- {
531
- ref,
532
- "data-slot": "dropdown-menu-item",
533
- className: cn(MENU_ITEM_CLASS, inset && "pl-8", className),
534
- ...props
535
- }
536
- ));
537
- DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
538
- var DropdownMenuCheckboxItem = React6.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs3(
539
- DropdownMenuPrimitive.CheckboxItem,
540
- {
541
- ref,
542
- "data-slot": "dropdown-menu-checkbox-item",
543
- className: cn(MENU_INDICATOR_ITEM_CLASS, className),
544
- ...props,
545
- children: [
546
- /* @__PURE__ */ jsx6("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx6(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx6(CheckIcon, { className: "h-4 w-4" }) }) }),
547
- children
548
- ]
549
- }
550
- ));
551
- DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
552
- var DropdownMenuRadioItem = React6.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs3(
553
- DropdownMenuPrimitive.RadioItem,
554
- {
555
- ref,
556
- "data-slot": "dropdown-menu-radio-item",
557
- className: cn(MENU_INDICATOR_ITEM_CLASS, className),
558
- ...props,
559
- children: [
560
- /* @__PURE__ */ jsx6("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx6(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx6(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
561
- children
562
- ]
563
- }
564
- ));
565
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
566
- var DropdownMenuLabel = React6.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx6(
567
- DropdownMenuPrimitive.Label,
568
- {
569
- ref,
570
- "data-slot": "dropdown-menu-label",
571
- className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
572
- ...props
573
- }
574
- ));
575
- DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
576
- var DropdownMenuSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
577
- DropdownMenuPrimitive.Separator,
578
- {
579
- ref,
580
- "data-slot": "dropdown-menu-separator",
581
- className: cn("-mx-1 my-1 h-px bg-muted", className),
582
- ...props
583
- }
584
- ));
585
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
586
- var DropdownMenuShortcut = ({
587
- className,
588
- ...props
589
- }) => /* @__PURE__ */ jsx6(
590
- "span",
591
- {
592
- "data-slot": "dropdown-menu-shortcut",
593
- className: cn("ml-auto text-xs tracking-widest opacity-60", className),
433
+ import { jsx as jsx6 } from "react/jsx-runtime";
434
+ var Popover = PopoverPrimitive.Root;
435
+ var PopoverTrigger = PopoverPrimitive.Trigger;
436
+ var PopoverContent = React6.forwardRef(
437
+ ({
438
+ className,
439
+ align = "center",
440
+ sideOffset = 4,
441
+ container,
442
+ animated = true,
594
443
  ...props
444
+ }, ref) => {
445
+ const portalContainer = usePortalContainer(container);
446
+ return /* @__PURE__ */ jsx6(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx6(
447
+ PopoverPrimitive.Content,
448
+ {
449
+ ref,
450
+ align,
451
+ sideOffset,
452
+ className: cn(
453
+ // Cap to the viewport space Radix measured and scroll — a popover taller
454
+ // than the screen must never trap the user with unreachable content.
455
+ // z must EQUAL the dialog layer (z-[10000]), never exceed it: with equal
456
+ // z, DOM portal order decides, so a dialog opened FROM a popover stacks
457
+ // above it, and a popover opened from a dialog still stacks above the
458
+ // dialog. z-[10001] buried dialogs behind fullscreen popovers.
459
+ "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",
460
+ animated && MOTION_POPPER,
461
+ className
462
+ ),
463
+ ...props
464
+ }
465
+ ) });
595
466
  }
596
467
  );
597
- DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
468
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
598
469
 
599
470
  // src/content-transfer/index.tsx
600
- import { Fragment, jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
471
+ import { Fragment, jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
601
472
  function AlchemyGlyph(props) {
602
- return /* @__PURE__ */ jsxs4("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...props, children: [
473
+ return /* @__PURE__ */ jsxs3("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...props, children: [
603
474
  /* @__PURE__ */ jsx7("path", { d: "M4.5 5.5h8v11h-8z" }),
604
475
  /* @__PURE__ */ jsx7("path", { d: "M8.5 9.5h8v9h-8z" }),
605
476
  /* @__PURE__ */ jsx7("path", { d: "m18.5 3 .65 1.85L21 5.5l-1.85.65L18.5 8l-.65-1.85L16 5.5l1.85-.65z" })
@@ -609,14 +480,61 @@ var CapabilityContext = React7.createContext({});
609
480
  var useContentTransferCapabilities = () => React7.useContext(CapabilityContext);
610
481
  var SurfaceContext = React7.createContext(null);
611
482
  function MenuPresentation({ label, hint, icon: Icon2 }) {
612
- return /* @__PURE__ */ jsxs4(Fragment, { children: [
483
+ return /* @__PURE__ */ jsxs3(Fragment, { children: [
613
484
  Icon2 ? /* @__PURE__ */ jsx7(Icon2, { className: "matrx-alchemy-menu-icon" }) : null,
614
- /* @__PURE__ */ jsxs4("span", { children: [
485
+ /* @__PURE__ */ jsxs3("span", { children: [
615
486
  label,
616
487
  hint ? /* @__PURE__ */ jsx7("small", { className: "matrx-alchemy-menu-hint", children: hint }) : null
617
488
  ] })
618
489
  ] });
619
490
  }
491
+ function PaletteGlyph({ format, ai = false, file = false }) {
492
+ if (ai) return /* @__PURE__ */ jsxs3("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: [
493
+ /* @__PURE__ */ jsx7("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" }),
494
+ /* @__PURE__ */ jsx7("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" }),
495
+ /* @__PURE__ */ jsx7("path", { d: "M12 5v14M8 9h1M15 9h1M8 15h1M15 15h1" })
496
+ ] });
497
+ if (file) return /* @__PURE__ */ jsxs3("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: [
498
+ /* @__PURE__ */ jsx7("path", { d: "M6 3h8l4 4v14H6z" }),
499
+ /* @__PURE__ */ jsx7("path", { d: "M14 3v5h5M9 13h6M9 17h6" })
500
+ ] });
501
+ const path = format === "json" ? /* @__PURE__ */ jsxs3(Fragment, { children: [
502
+ /* @__PURE__ */ jsx7("path", { d: "M9 4C7 4 7 7 5 7v3c2 0 2 1 2 2s0 2-2 2v3c2 0 2 3 4 3" }),
503
+ /* @__PURE__ */ jsx7("path", { d: "M15 4c2 0 2 3 4 3v3c-2 0-2 1-2 2s0 2 2 2v3c-2 0-2 3-4 3" })
504
+ ] }) : format === "compact-json" ? /* @__PURE__ */ jsxs3(Fragment, { children: [
505
+ /* @__PURE__ */ jsx7("path", { d: "m14 10 7-7" }),
506
+ /* @__PURE__ */ jsx7("path", { d: "M20 10h-6V4" }),
507
+ /* @__PURE__ */ jsx7("path", { d: "m3 21 7-7" }),
508
+ /* @__PURE__ */ jsx7("path", { d: "M4 14h6v6" })
509
+ ] }) : format === "csv" ? /* @__PURE__ */ jsxs3(Fragment, { children: [
510
+ /* @__PURE__ */ jsx7("rect", { x: "4", y: "4", width: "16", height: "16", rx: "1" }),
511
+ /* @__PURE__ */ jsx7("path", { d: "M4 10h16M10 4v16" })
512
+ ] }) : format === "tsv" ? /* @__PURE__ */ jsxs3(Fragment, { children: [
513
+ /* @__PURE__ */ jsx7("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
514
+ /* @__PURE__ */ jsx7("path", { d: "M14 2v6h6M8 13h2M14 13h2M8 17h2M14 17h2" })
515
+ ] }) : format === "xlsx" ? /* @__PURE__ */ jsxs3(Fragment, { children: [
516
+ /* @__PURE__ */ jsx7("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
517
+ /* @__PURE__ */ jsx7("path", { d: "M14 2v6h6M8 13h8M8 17h8M12 11v8" })
518
+ ] }) : format === "markdown" ? /* @__PURE__ */ jsxs3(Fragment, { children: [
519
+ /* @__PURE__ */ jsx7("path", { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5z" }),
520
+ /* @__PURE__ */ jsx7("path", { d: "M14 2v6h6M10 13l-2 2 2 2M14 17l2-2-2-2" })
521
+ ] }) : format === "html" ? /* @__PURE__ */ jsx7(Fragment, { children: /* @__PURE__ */ jsx7("path", { d: "M15 6h6M3 6h7M3 12h18M3 18h12" }) }) : /* @__PURE__ */ jsx7(Fragment, { children: /* @__PURE__ */ jsx7("path", { d: "M4 7V4h16v3M9 20h6M12 4v16" }) });
522
+ return /* @__PURE__ */ jsx7("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 });
523
+ }
524
+ function PaletteRows({ title, items, onRun, extra, ai = false }) {
525
+ if (!items.length && !extra) return null;
526
+ return /* @__PURE__ */ jsxs3("section", { className: "matrx-alchemy-palette-section", children: [
527
+ /* @__PURE__ */ jsx7("h3", { children: title }),
528
+ items.map((item) => /* @__PURE__ */ jsxs3("button", { type: "button", className: cn("matrx-alchemy-palette-row", ai && "matrx-alchemy-palette-row-ai"), "aria-label": item.ariaLabel, onClick: () => onRun?.(item), children: [
529
+ item.icon ? /* @__PURE__ */ jsx7(item.icon, { className: "matrx-alchemy-menu-icon" }) : /* @__PURE__ */ jsx7(PaletteGlyph, { ai }),
530
+ /* @__PURE__ */ jsxs3("span", { children: [
531
+ item.copyLabel ?? item.label,
532
+ item.hint ? /* @__PURE__ */ jsx7("small", { className: "matrx-alchemy-menu-hint", children: item.hint }) : null
533
+ ] })
534
+ ] }, item.id)),
535
+ extra
536
+ ] });
537
+ }
620
538
  var LABEL = { plain: "Plain text", markdown: "Markdown", html: "Formatted", json: "JSON", "compact-json": "Compact JSON", csv: "CSV", tsv: "Google Sheets", xlsx: "Excel workbook" };
621
539
  var BUILT_INS = Object.freeze(Object.keys(LABEL).map((id) => ({ id })));
622
540
  var COPIES = ["plain", "markdown", "html", "json", "compact-json", "csv", "tsv"];
@@ -705,7 +623,7 @@ function ContentTransferMenu(props) {
705
623
  const identityKey = props.capabilities?.identityKey ?? inherited.identityKey;
706
624
  return /* @__PURE__ */ jsx7(ContentTransferMenuSession, { ...props }, identityKey ?? "anonymous");
707
625
  }
708
- function ContentTransferMenuSession({ source, surface, label, projection, sections, preferences, table, formatSources, variants = EMPTY_VARIANTS, actions = [], capabilities: local, disabled, enabled = true, className, stopPropagation = true, hide = [], controllerRef }) {
626
+ 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 }) {
709
627
  const triggerRef = React7.useRef(null);
710
628
  const inherited = React7.useContext(CapabilityContext);
711
629
  const nearestSurface = React7.useContext(SurfaceContext);
@@ -718,6 +636,8 @@ function ContentTransferMenuSession({ source, surface, label, projection, sectio
718
636
  const workspaceCaptures = React7.useRef(/* @__PURE__ */ new Map());
719
637
  const externalWorkspaceKeys = React7.useRef(/* @__PURE__ */ new Set());
720
638
  const [notice, setNotice] = React7.useState(null);
639
+ const [paletteOpen, setPaletteOpen] = React7.useState(false);
640
+ const [mode, setMode] = React7.useState("copy");
721
641
  const scopes = React7.useMemo(() => table?.availableScopes ?? ["target"], [table]);
722
642
  const initialScope = table?.initialScope ?? "target";
723
643
  if (!scopes.includes(initialScope)) throw new Error("Alchemy initialScope must be included in availableScopes.");
@@ -969,48 +889,87 @@ function ContentTransferMenuSession({ source, surface, label, projection, sectio
969
889
  }, [captureOne, capturePrimary, fence, initialScope, preferences, providerPreferences, report]);
970
890
  if (!enabled) return null;
971
891
  const payload = menuCapture?.snapshot.payload ?? (source && "kind" in source ? source : void 0);
972
- const quickVariants = (section) => variants.filter((v) => v.copyLabel && (v.section ?? "ai") === section).map((v) => /* @__PURE__ */ jsx7(DropdownMenuItem, { "aria-label": v.ariaLabel, onSelect: () => void transfer("markdown", false, v), children: /* @__PURE__ */ jsx7(MenuPresentation, { ...v, label: v.copyLabel }) }, `copy:${v.id}`));
973
- const visibleCopies = COPIES.filter((f) => Boolean(formatSources?.[f]) || !["csv", "tsv"].includes(f) || payload?.kind === "rows");
974
- const visibleDownloads = DOWNLOADS.filter((f) => f !== "xlsx" && Boolean(formatSources?.[f]) || !["csv", "tsv", "xlsx"].includes(f) || payload?.kind === "rows");
975
- const visibleAdapters = menuCapture ? adapters.filter((a) => a.supports(menuCapture.snapshot.payload)) : [];
892
+ const quickVariants = (section) => variants.filter((v) => v.copyLabel && (v.section ?? "ai") === section);
893
+ const visibleCopies = sourceFormats ? COPIES.filter((f) => Boolean(formatSources?.[f]) || !["csv", "tsv"].includes(f) || payload?.kind === "rows") : [];
894
+ const visibleDownloads = sourceFormats ? DOWNLOADS.filter((f) => f !== "xlsx" && Boolean(formatSources?.[f]) || !["csv", "tsv", "xlsx"].includes(f) || payload?.kind === "rows") : [];
895
+ const visibleAdapters = sourceFormats && menuCapture ? adapters.filter((a) => a.supports(menuCapture.snapshot.payload)) : [];
976
896
  const visibleActions = menuCapture ? registeredActions.filter((a) => a.supports(menuCapture.snapshot)) : [];
977
- return /* @__PURE__ */ jsxs4("span", { className: cn("matrx-alchemy", className), onClick: stopPropagation ? (event) => event.stopPropagation() : void 0, children: [
978
- /* @__PURE__ */ jsxs4(DropdownMenu, { onOpenChange: (open) => {
979
- if (open) void preflight();
897
+ const downloadActions = visibleActions.filter((action) => action.placement === "download");
898
+ const ordinaryActions = visibleActions.filter((action) => action.placement !== "download");
899
+ const copyAvailable = !hide.includes("copy") && visibleCopies.length + visibleAdapters.length + quickVariants("copy").length > 0;
900
+ const downloadAvailable = !hide.includes("download") && visibleDownloads.length + visibleAdapters.length + downloadActions.length > 0;
901
+ const prepareAvailable = !hide.includes("prepare") && (quickVariants("ai").length > 0 || Boolean(primary) || Boolean(nearestWorkspaceKey) || variants.length > 0);
902
+ const resolvedMode = mode === "copy" && !copyAvailable ? "download" : mode === "download" && !downloadAvailable ? "copy" : mode;
903
+ const closePalette = () => setPaletteOpen(false);
904
+ const tile = (id, label2, onClick, options = {}) => {
905
+ const presentation = options.action;
906
+ const Icon2 = presentation?.icon;
907
+ const fallbackLabel = options.file && !/^download\b/i.test(label2) ? `Download ${label2}` : label2;
908
+ return /* @__PURE__ */ jsxs3("button", { type: "button", className: "matrx-alchemy-palette-tile", "aria-label": presentation?.ariaLabel ?? (presentation ? fallbackLabel : options.ariaLabel ?? `${resolvedMode === "copy" ? "Copy" : "Download"} ${label2}`), onClick: () => {
909
+ closePalette();
910
+ onClick();
980
911
  }, children: [
981
- /* @__PURE__ */ jsx7(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx7("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__ */ jsx7(AlchemyGlyph, {}) }) }),
982
- /* @__PURE__ */ jsxs4(DropdownMenuContent, { align: "end", className: "matrx-alchemy-menu", children: [
983
- menuStatus === "loading" ? /* @__PURE__ */ jsx7(DropdownMenuItem, { disabled: true, children: "Inspecting content\u2026" }) : menuStatus !== "idle" ? /* @__PURE__ */ jsx7(DropdownMenuItem, { disabled: true, children: menuStatus }) : null,
984
- !hide.includes("copy") ? /* @__PURE__ */ jsxs4(Fragment, { children: [
985
- /* @__PURE__ */ jsx7(DropdownMenuLabel, { children: "Copy" }),
986
- quickVariants("copy"),
987
- visibleCopies.map((format) => /* @__PURE__ */ jsx7(DropdownMenuItem, { onSelect: () => void transfer(format, false), children: format === "plain" ? "Copy" : `Copy ${LABEL[format]}` }, format)),
988
- visibleAdapters.map((adapter) => /* @__PURE__ */ jsxs4(DropdownMenuItem, { onSelect: () => void transfer(adapter, false), children: [
989
- "Copy ",
990
- adapter.label
991
- ] }, adapter.id))
992
- ] }) : null,
993
- !hide.includes("prepare") ? /* @__PURE__ */ jsxs4(Fragment, { children: [
994
- /* @__PURE__ */ jsx7(DropdownMenuSeparator, {}),
995
- quickVariants("ai"),
996
- /* @__PURE__ */ jsx7(DropdownMenuItem, { onSelect: () => void openWorkspace(), children: "Prepare for AI\u2026" }),
997
- nearestWorkspaceKey && nearestSurface ? /* @__PURE__ */ jsx7(DropdownMenuItem, { onSelect: () => void openWorkspace(nearestWorkspaceKey, { source: nearestSurface, label: nearestSurface.surfaceName }), children: "Prepare this surface\u2026" }) : null,
998
- variants.map((variant) => /* @__PURE__ */ jsx7(DropdownMenuItem, { onSelect: () => void openWorkspace(variantWorkspaceKeys.get(variant.id), variant), children: /* @__PURE__ */ jsx7(MenuPresentation, { ...variant, label: `Prepare ${variant.label}\u2026` }) }, variant.id))
912
+ Icon2 ? /* @__PURE__ */ jsx7(Icon2, { className: "matrx-alchemy-menu-icon" }) : /* @__PURE__ */ jsx7(PaletteGlyph, { ...!options.custom ? { format: id } : {}, ...options.ai ? { ai: true } : {}, ...options.file ? { file: true } : {} }),
913
+ /* @__PURE__ */ jsxs3("span", { children: [
914
+ label2,
915
+ presentation?.hint ? /* @__PURE__ */ jsx7("small", { className: "matrx-alchemy-menu-hint", children: presentation.hint }) : null
916
+ ] })
917
+ ] }, id);
918
+ };
919
+ return /* @__PURE__ */ jsxs3("span", { className: cn("matrx-alchemy", className), onClick: stopPropagation ? (event) => event.stopPropagation() : void 0, children: [
920
+ /* @__PURE__ */ jsxs3(Popover, { open: paletteOpen, onOpenChange: (open) => {
921
+ setPaletteOpen(open);
922
+ if (open) {
923
+ setMode("copy");
924
+ void preflight();
925
+ }
926
+ }, children: [
927
+ /* @__PURE__ */ jsx7(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx7("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__ */ jsx7(AlchemyGlyph, {}) }) }),
928
+ /* @__PURE__ */ jsxs3(PopoverContent, { align: "end", className: "matrx-alchemy-menu matrx-alchemy-palette", "aria-label": "Alchemy output options", onCloseAutoFocus: () => triggerRef.current?.focus(), children: [
929
+ copyAvailable && downloadAvailable ? /* @__PURE__ */ jsxs3("div", { className: "matrx-alchemy-mode", "aria-label": "Output action", children: [
930
+ /* @__PURE__ */ jsx7("button", { type: "button", "aria-label": "Copy mode", "aria-pressed": resolvedMode === "copy", onClick: () => setMode("copy"), children: "Copy" }),
931
+ /* @__PURE__ */ jsx7("button", { type: "button", "aria-label": "Download mode", "aria-pressed": resolvedMode === "download", onClick: () => setMode("download"), children: "Download" })
999
932
  ] }) : null,
1000
- !hide.includes("download") ? /* @__PURE__ */ jsxs4(Fragment, { children: [
1001
- /* @__PURE__ */ jsx7(DropdownMenuSeparator, {}),
1002
- /* @__PURE__ */ jsx7(DropdownMenuLabel, { children: "Download" }),
1003
- visibleDownloads.map((format) => /* @__PURE__ */ jsxs4(DropdownMenuItem, { onSelect: () => void transfer(format, true), children: [
1004
- "Download ",
1005
- LABEL[format]
1006
- ] }, format)),
1007
- visibleAdapters.map((adapter) => /* @__PURE__ */ jsxs4(DropdownMenuItem, { onSelect: () => void transfer(adapter, true), children: [
1008
- "Download ",
1009
- adapter.label
1010
- ] }, `download:${adapter.id}`))
933
+ menuStatus === "loading" ? /* @__PURE__ */ jsx7("p", { className: "matrx-alchemy-palette-status", children: "Inspecting content\u2026" }) : menuStatus !== "idle" ? /* @__PURE__ */ jsx7("p", { className: "matrx-alchemy-error", children: menuStatus }) : null,
934
+ resolvedMode === "copy" && copyAvailable ? /* @__PURE__ */ jsxs3(Fragment, { children: [
935
+ /* @__PURE__ */ jsxs3("div", { className: "matrx-alchemy-palette-grid", children: [
936
+ 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]}` })),
937
+ visibleAdapters.map((adapter) => tile(adapter.id, adapter.label, () => void transfer(adapter, false), { custom: true }))
938
+ ] }),
939
+ quickVariants("copy").length ? /* @__PURE__ */ jsx7(PaletteRows, { title: "Quick copy", items: quickVariants("copy"), onRun: (variant) => {
940
+ closePalette();
941
+ void transfer("markdown", false, variant);
942
+ } }) : null
1011
943
  ] }) : null,
1012
- visibleActions.length ? /* @__PURE__ */ jsx7(DropdownMenuSeparator, {}) : null,
1013
- visibleActions.map((action) => /* @__PURE__ */ jsx7(DropdownMenuItem, { "aria-label": action.ariaLabel, onSelect: () => void runAction(action), children: /* @__PURE__ */ jsx7(MenuPresentation, { ...action, label: action.label }) }, action.id))
944
+ resolvedMode === "download" && downloadAvailable ? /* @__PURE__ */ jsx7(Fragment, { children: /* @__PURE__ */ jsxs3("div", { className: "matrx-alchemy-palette-grid", children: [
945
+ 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]}` })),
946
+ visibleAdapters.map((adapter) => tile(adapter.id, adapter.label, () => void transfer(adapter, true), { custom: true })),
947
+ downloadActions.map((action) => tile(action.id, action.label, () => void runAction(action), { custom: true, action, file: true }))
948
+ ] }) }) : null,
949
+ prepareAvailable ? /* @__PURE__ */ jsx7(PaletteRows, { title: "Prepare", ai: true, items: quickVariants("ai"), onRun: (variant) => {
950
+ closePalette();
951
+ void transfer("markdown", false, variant);
952
+ }, extra: /* @__PURE__ */ jsxs3("button", { type: "button", className: "matrx-alchemy-palette-row", onClick: () => {
953
+ closePalette();
954
+ void openWorkspace();
955
+ }, children: [
956
+ /* @__PURE__ */ jsx7(PaletteGlyph, { ai: true }),
957
+ /* @__PURE__ */ jsx7("span", { children: "Prepare for AI\u2026" })
958
+ ] }) }) : null,
959
+ prepareAvailable && (nearestWorkspaceKey || variants.length) ? /* @__PURE__ */ jsx7(PaletteRows, { title: "Context", items: [], extra: /* @__PURE__ */ jsxs3(Fragment, { children: [
960
+ nearestWorkspaceKey && nearestSurface ? /* @__PURE__ */ jsx7("button", { type: "button", className: "matrx-alchemy-palette-row", onClick: () => {
961
+ closePalette();
962
+ void openWorkspace(nearestWorkspaceKey, { source: nearestSurface, label: nearestSurface.surfaceName });
963
+ }, children: /* @__PURE__ */ jsx7("span", { children: "Prepare this surface\u2026" }) }) : null,
964
+ variants.map((variant) => /* @__PURE__ */ jsx7("button", { type: "button", className: "matrx-alchemy-palette-row", "aria-label": variant.ariaLabel, onClick: () => {
965
+ closePalette();
966
+ void openWorkspace(variantWorkspaceKeys.get(variant.id), variant);
967
+ }, children: /* @__PURE__ */ jsx7(MenuPresentation, { ...variant, label: `Prepare ${variant.label}\u2026` }) }, variant.id))
968
+ ] }) }) : null,
969
+ ordinaryActions.length ? /* @__PURE__ */ jsx7(PaletteRows, { title: "Actions", items: [], extra: ordinaryActions.map((action) => /* @__PURE__ */ jsx7("button", { type: "button", className: "matrx-alchemy-palette-row", "aria-label": action.ariaLabel, onClick: () => {
970
+ closePalette();
971
+ void runAction(action);
972
+ }, children: /* @__PURE__ */ jsx7(MenuPresentation, { ...action, label: action.label }) }, action.id)) }) : null
1014
973
  ] })
1015
974
  ] }),
1016
975
  notice ? /* @__PURE__ */ jsx7("span", { className: "matrx-alchemy-notice", role: "status", children: notice }) : null,
@@ -1273,31 +1232,31 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1273
1232
  const limitText = Object.entries(state.preferences.limits).filter(([, value]) => value != null).map(([key, value]) => `${key.replace(/^max/, "max ")} ${Number(value).toLocaleString()}`).join(" \xB7 ");
1274
1233
  return /* @__PURE__ */ jsx7(Dialog, { open, onOpenChange: (next) => {
1275
1234
  if (!next) close();
1276
- }, children: /* @__PURE__ */ jsxs4(DialogContent, { onCloseAutoFocus: (event) => {
1235
+ }, children: /* @__PURE__ */ jsxs3(DialogContent, { onCloseAutoFocus: (event) => {
1277
1236
  event.preventDefault();
1278
1237
  restoreFocus();
1279
1238
  }, className: "matrx-alchemy-workspace max-w-5xl", "aria-busy": busy !== null, children: [
1280
- /* @__PURE__ */ jsxs4(DialogHeader, { children: [
1281
- /* @__PURE__ */ jsxs4(DialogTitle, { children: [
1239
+ /* @__PURE__ */ jsxs3(DialogHeader, { children: [
1240
+ /* @__PURE__ */ jsxs3(DialogTitle, { children: [
1282
1241
  "Prepare ",
1283
1242
  state.snapshot.label
1284
1243
  ] }),
1285
- /* @__PURE__ */ jsxs4(DialogDescription, { children: [
1244
+ /* @__PURE__ */ jsxs3(DialogDescription, { children: [
1286
1245
  "Captured ",
1287
1246
  state.snapshot.unsavedChanges ? "from your unsaved draft" : "as an immutable snapshot",
1288
1247
  ". Your source is never edited."
1289
1248
  ] })
1290
1249
  ] }),
1291
- /* @__PURE__ */ jsxs4("div", { className: "matrx-alchemy-workspace-grid", children: [
1292
- /* @__PURE__ */ jsxs4("section", { className: "matrx-alchemy-main", children: [
1293
- /* @__PURE__ */ jsxs4("div", { className: "matrx-alchemy-toolbar", children: [
1294
- scopes.length > 1 ? /* @__PURE__ */ jsxs4("label", { children: [
1250
+ /* @__PURE__ */ jsxs3("div", { className: "matrx-alchemy-workspace-grid", children: [
1251
+ /* @__PURE__ */ jsxs3("section", { className: "matrx-alchemy-main", children: [
1252
+ /* @__PURE__ */ jsxs3("div", { className: "matrx-alchemy-toolbar", children: [
1253
+ scopes.length > 1 ? /* @__PURE__ */ jsxs3("label", { children: [
1295
1254
  "Scope",
1296
1255
  /* @__PURE__ */ jsx7("select", { "aria-label": "Transfer scope", value: state.scope, disabled: busy !== null, onChange: (e) => void requestCapture(e.target.value), children: scopes.map((scope) => /* @__PURE__ */ jsx7("option", { value: scope, children: SCOPE_LABEL[scope] }, scope)) })
1297
1256
  ] }) : null,
1298
- /* @__PURE__ */ jsxs4("label", { children: [
1257
+ /* @__PURE__ */ jsxs3("label", { children: [
1299
1258
  "Detail",
1300
- /* @__PURE__ */ jsxs4("select", { "aria-label": "Detail preset", value: controls.preset, onChange: (e) => changeControls({ ...controls, preset: e.target.value }), children: [
1259
+ /* @__PURE__ */ jsxs3("select", { "aria-label": "Detail preset", value: controls.preset, onChange: (e) => changeControls({ ...controls, preset: e.target.value }), children: [
1301
1260
  /* @__PURE__ */ jsx7("option", { value: "full", children: "Full" }),
1302
1261
  /* @__PURE__ */ jsx7("option", { value: "compact", children: "Compact" }),
1303
1262
  /* @__PURE__ */ jsx7("option", { value: "brief", children: "Brief" }),
@@ -1323,24 +1282,24 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1323
1282
  }, children: "Reset" }),
1324
1283
  /* @__PURE__ */ jsx7(Button, { type: "button", size: "sm", variant: "outline", disabled: busy !== null, onClick: () => void requestCapture(state.scope), children: "Refresh source" })
1325
1284
  ] }),
1326
- controls.preset === "custom" && (state.draft.payload.kind === "json" || state.draft.payload.kind === "registered") ? /* @__PURE__ */ jsxs4("fieldset", { className: "matrx-alchemy-options", children: [
1285
+ controls.preset === "custom" && (state.draft.payload.kind === "json" || state.draft.payload.kind === "registered") ? /* @__PURE__ */ jsxs3("fieldset", { className: "matrx-alchemy-options", children: [
1327
1286
  /* @__PURE__ */ jsx7("legend", { children: "JSON limits" }),
1328
- [["maxDepth", "Maximum depth"], ["maxStringChars", "Maximum string characters"], ["maxArrayItems", "Maximum array items"]].map(([key, text]) => /* @__PURE__ */ jsxs4("label", { children: [
1287
+ [["maxDepth", "Maximum depth"], ["maxStringChars", "Maximum string characters"], ["maxArrayItems", "Maximum array items"]].map(([key, text]) => /* @__PURE__ */ jsxs3("label", { children: [
1329
1288
  text,
1330
1289
  /* @__PURE__ */ jsx7("input", { type: "number", min: "0", value: controls[key] ?? "", onChange: (e) => changeControls({ ...controls, [key]: Number.isNaN(e.target.valueAsNumber) ? null : e.target.valueAsNumber }) })
1331
1290
  ] }, key))
1332
1291
  ] }) : null,
1333
1292
  rows ? /* @__PURE__ */ jsx7(RowControls, { rows, controls, change: changeControls }) : null,
1334
- state.snapshot.sections.length ? /* @__PURE__ */ jsxs4("fieldset", { className: "matrx-alchemy-options", children: [
1293
+ state.snapshot.sections.length ? /* @__PURE__ */ jsxs3("fieldset", { className: "matrx-alchemy-options", children: [
1335
1294
  /* @__PURE__ */ jsx7("legend", { children: "Sections" }),
1336
- state.snapshot.sections.map((section) => /* @__PURE__ */ jsxs4("label", { children: [
1295
+ state.snapshot.sections.map((section) => /* @__PURE__ */ jsxs3("label", { children: [
1337
1296
  /* @__PURE__ */ jsx7("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) }) }),
1338
1297
  " ",
1339
1298
  section.label
1340
1299
  ] }, section.id))
1341
1300
  ] }) : null,
1342
- /* @__PURE__ */ jsxs4("div", { className: "matrx-alchemy-coverage", children: [
1343
- /* @__PURE__ */ jsxs4("span", { children: [
1301
+ /* @__PURE__ */ jsxs3("div", { className: "matrx-alchemy-coverage", children: [
1302
+ /* @__PURE__ */ jsxs3("span", { children: [
1344
1303
  state.snapshot.coverage.included.toLocaleString(),
1345
1304
  " included",
1346
1305
  state.snapshot.coverage.total == null ? "" : ` of ${state.snapshot.coverage.total.toLocaleString()}`,
@@ -1348,16 +1307,16 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1348
1307
  state.snapshot.coverage.status
1349
1308
  ] }),
1350
1309
  state.snapshot.coverage.reason ? /* @__PURE__ */ jsx7("span", { children: state.snapshot.coverage.reason }) : null,
1351
- limitText ? /* @__PURE__ */ jsxs4("span", { children: [
1310
+ limitText ? /* @__PURE__ */ jsxs3("span", { children: [
1352
1311
  "Limits: ",
1353
1312
  limitText
1354
1313
  ] }) : null,
1355
- displayedOmissions.length ? /* @__PURE__ */ jsxs4("details", { children: [
1356
- /* @__PURE__ */ jsxs4("summary", { children: [
1314
+ displayedOmissions.length ? /* @__PURE__ */ jsxs3("details", { children: [
1315
+ /* @__PURE__ */ jsxs3("summary", { children: [
1357
1316
  displayedOmissions.length,
1358
1317
  " omissions or adjustments"
1359
1318
  ] }),
1360
- /* @__PURE__ */ jsx7("ul", { children: displayedOmissions.map((o, i) => /* @__PURE__ */ jsxs4("li", { children: [
1319
+ /* @__PURE__ */ jsx7("ul", { children: displayedOmissions.map((o, i) => /* @__PURE__ */ jsxs3("li", { children: [
1361
1320
  o.path || "/",
1362
1321
  ": ",
1363
1322
  o.reason,
@@ -1365,9 +1324,9 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1365
1324
  ] }, `${o.path}-${o.reason}-${i}`)) })
1366
1325
  ] }) : null
1367
1326
  ] }),
1368
- /* @__PURE__ */ jsxs4("label", { className: "matrx-alchemy-preview-label", children: [
1327
+ /* @__PURE__ */ jsxs3("label", { className: "matrx-alchemy-preview-label", children: [
1369
1328
  "Output format",
1370
- /* @__PURE__ */ jsxs4("select", { "aria-label": "Output format", value: format, onChange: (e) => setFormat(e.target.value), children: [
1329
+ /* @__PURE__ */ jsxs3("select", { "aria-label": "Output format", value: format, onChange: (e) => setFormat(e.target.value), children: [
1371
1330
  formats.map((f) => /* @__PURE__ */ jsx7("option", { value: f, children: LABEL[f] }, f)),
1372
1331
  state.draft.payload.kind === "rows" ? /* @__PURE__ */ jsx7("option", { value: "xlsx", children: "Excel workbook" }) : null,
1373
1332
  workspaceAdapters.map((adapter) => /* @__PURE__ */ jsx7("option", { value: adapter.id, children: adapter.label }, adapter.id))
@@ -1383,9 +1342,9 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1383
1342
  setFormat("plain");
1384
1343
  }, children: "Use invalid JSON as plain text" }) : null
1385
1344
  ] }),
1386
- ai || busy === "capture" || state.error ? /* @__PURE__ */ jsxs4("aside", { children: [
1387
- ai ? /* @__PURE__ */ jsxs4(Fragment, { children: [
1388
- /* @__PURE__ */ jsxs4("label", { children: [
1345
+ ai || busy === "capture" || state.error ? /* @__PURE__ */ jsxs3("aside", { children: [
1346
+ ai ? /* @__PURE__ */ jsxs3(Fragment, { children: [
1347
+ /* @__PURE__ */ jsxs3("label", { children: [
1389
1348
  "AI instruction",
1390
1349
  /* @__PURE__ */ jsx7("textarea", { value: instruction, onChange: (e) => setInstruction(e.target.value), placeholder: "Tell AI how to prepare this content" })
1391
1350
  ] }),
@@ -1402,20 +1361,20 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1402
1361
  state.error ? /* @__PURE__ */ jsx7("p", { role: "alert", className: "matrx-alchemy-error", children: state.error }) : null
1403
1362
  ] }) : null
1404
1363
  ] }),
1405
- pendingControls ? /* @__PURE__ */ jsxs4("div", { className: "matrx-alchemy-decision", role: "alert", children: [
1364
+ pendingControls ? /* @__PURE__ */ jsxs3("div", { className: "matrx-alchemy-decision", role: "alert", children: [
1406
1365
  /* @__PURE__ */ jsx7("p", { children: "This control would replace your manual edit." }),
1407
1366
  /* @__PURE__ */ jsx7(Button, { type: "button", variant: "outline", onClick: () => setPendingControls(null), children: "Keep edited draft" }),
1408
1367
  /* @__PURE__ */ jsx7(Button, { type: "button", onClick: applyPendingControls, children: "Rebuild from source" })
1409
1368
  ] }) : null,
1410
1369
  state.sourceStale ? /* @__PURE__ */ jsx7("p", { role: "alert", className: "matrx-alchemy-decision", children: "The source changed since this draft. Use Refresh source to review the latest data." }) : null,
1411
- state.pending ? /* @__PURE__ */ jsxs4("div", { className: "matrx-alchemy-decision", role: "alert", children: [
1370
+ state.pending ? /* @__PURE__ */ jsxs3("div", { className: "matrx-alchemy-decision", role: "alert", children: [
1412
1371
  /* @__PURE__ */ jsx7("p", { children: "A fresh source snapshot is ready." }),
1413
1372
  /* @__PURE__ */ jsx7(Button, { type: "button", variant: "outline", onClick: () => resolveCapture("keep"), children: "Keep current snapshot and draft" }),
1414
1373
  /* @__PURE__ */ jsx7(Button, { type: "button", onClick: () => resolveCapture("regenerate"), children: "Regenerate from fresh source" })
1415
1374
  ] }) : null,
1416
1375
  deliveryNotice ? /* @__PURE__ */ jsx7("p", { role: "status", className: "matrx-alchemy-meta", children: deliveryNotice }) : null,
1417
- /* @__PURE__ */ jsxs4(DialogFooter, { children: [
1418
- /* @__PURE__ */ jsxs4("span", { className: "matrx-alchemy-meta", children: [
1376
+ /* @__PURE__ */ jsxs3(DialogFooter, { children: [
1377
+ /* @__PURE__ */ jsxs3("span", { className: "matrx-alchemy-meta", children: [
1419
1378
  buffer.length.toLocaleString(),
1420
1379
  " characters \xB7 ~",
1421
1380
  estimateTokens(buffer).toLocaleString(),
@@ -1428,35 +1387,35 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1428
1387
  ] }) });
1429
1388
  }
1430
1389
  function RowControls({ rows, controls, change }) {
1431
- return /* @__PURE__ */ jsxs4(Fragment, { children: [
1432
- /* @__PURE__ */ jsxs4("div", { className: "matrx-alchemy-toolbar", children: [
1433
- /* @__PURE__ */ jsxs4("label", { children: [
1390
+ return /* @__PURE__ */ jsxs3(Fragment, { children: [
1391
+ /* @__PURE__ */ jsxs3("div", { className: "matrx-alchemy-toolbar", children: [
1392
+ /* @__PURE__ */ jsxs3("label", { children: [
1434
1393
  "Search",
1435
1394
  /* @__PURE__ */ jsx7("input", { value: controls.search, onChange: (e) => change({ ...controls, search: e.target.value }) })
1436
1395
  ] }),
1437
- /* @__PURE__ */ jsxs4("label", { children: [
1396
+ /* @__PURE__ */ jsxs3("label", { children: [
1438
1397
  "Sort",
1439
- /* @__PURE__ */ jsxs4("select", { value: controls.sort, onChange: (e) => change({ ...controls, sort: e.target.value }), children: [
1398
+ /* @__PURE__ */ jsxs3("select", { value: controls.sort, onChange: (e) => change({ ...controls, sort: e.target.value }), children: [
1440
1399
  /* @__PURE__ */ jsx7("option", { value: "", children: "None" }),
1441
1400
  rows.columns.map((column) => /* @__PURE__ */ jsx7("option", { value: column.id, children: column.label }, column.id))
1442
1401
  ] })
1443
1402
  ] }),
1444
- /* @__PURE__ */ jsxs4("label", { children: [
1403
+ /* @__PURE__ */ jsxs3("label", { children: [
1445
1404
  "Direction",
1446
- /* @__PURE__ */ jsxs4("select", { value: controls.direction, disabled: !controls.sort, onChange: (e) => change({ ...controls, direction: e.target.value }), children: [
1405
+ /* @__PURE__ */ jsxs3("select", { value: controls.direction, disabled: !controls.sort, onChange: (e) => change({ ...controls, direction: e.target.value }), children: [
1447
1406
  /* @__PURE__ */ jsx7("option", { value: "asc", children: "Ascending" }),
1448
1407
  /* @__PURE__ */ jsx7("option", { value: "desc", children: "Descending" })
1449
1408
  ] })
1450
1409
  ] }),
1451
- /* @__PURE__ */ jsxs4("label", { children: [
1410
+ /* @__PURE__ */ jsxs3("label", { children: [
1452
1411
  "Top rows",
1453
1412
  /* @__PURE__ */ jsx7("input", { type: "number", min: "0", value: controls.top ?? "", onChange: (e) => change({ ...controls, top: Number.isNaN(e.target.valueAsNumber) ? null : e.target.valueAsNumber }) })
1454
1413
  ] })
1455
1414
  ] }),
1456
- /* @__PURE__ */ jsxs4("fieldset", { className: "matrx-alchemy-options", children: [
1415
+ /* @__PURE__ */ jsxs3("fieldset", { className: "matrx-alchemy-options", children: [
1457
1416
  /* @__PURE__ */ jsx7("legend", { children: "Columns and filters" }),
1458
- rows.columns.map((column) => /* @__PURE__ */ jsxs4("div", { className: "matrx-alchemy-column", children: [
1459
- /* @__PURE__ */ jsxs4("label", { children: [
1417
+ rows.columns.map((column) => /* @__PURE__ */ jsxs3("div", { className: "matrx-alchemy-column", children: [
1418
+ /* @__PURE__ */ jsxs3("label", { children: [
1460
1419
  /* @__PURE__ */ jsx7("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) }) }),
1461
1420
  " ",
1462
1421
  column.label
@@ -1464,15 +1423,15 @@ function RowControls({ rows, controls, change }) {
1464
1423
  /* @__PURE__ */ jsx7("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 } }) })
1465
1424
  ] }, column.id))
1466
1425
  ] }),
1467
- /* @__PURE__ */ jsxs4("fieldset", { className: "matrx-alchemy-options", children: [
1426
+ /* @__PURE__ */ jsxs3("fieldset", { className: "matrx-alchemy-options", children: [
1468
1427
  /* @__PURE__ */ jsx7("legend", { children: "Rows" }),
1469
- /* @__PURE__ */ jsxs4("label", { children: [
1428
+ /* @__PURE__ */ jsxs3("label", { children: [
1470
1429
  /* @__PURE__ */ jsx7("input", { type: "checkbox", checked: controls.selectedOnly, onChange: (e) => change({ ...controls, selectedOnly: e.target.checked }) }),
1471
1430
  " Only selected rows"
1472
1431
  ] }),
1473
1432
  /* @__PURE__ */ jsx7("div", { className: "matrx-alchemy-row-list", children: rows.rows.map((row, index) => {
1474
1433
  const summary = rows.columns.filter((column) => column.visible).slice(0, 2).map((column) => String(readTransferCell(row, column) ?? "")).filter(Boolean).join(" \xB7 ");
1475
- return /* @__PURE__ */ jsxs4("label", { children: [
1434
+ return /* @__PURE__ */ jsxs3("label", { children: [
1476
1435
  /* @__PURE__ */ jsx7("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) }) }),
1477
1436
  " Row ",
1478
1437
  index + 1,
@@ -1484,7 +1443,7 @@ function RowControls({ rows, controls, change }) {
1484
1443
  }
1485
1444
 
1486
1445
  // src/content-transfer/matrx-copy.tsx
1487
- import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
1446
+ import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
1488
1447
  var resolve = (value) => typeof value === "function" ? value() : value;
1489
1448
  var asPayload = (value) => ({
1490
1449
  kind: "markdown",
@@ -1655,6 +1614,7 @@ function MatrxCopyMenuSession(props) {
1655
1614
  label: item.label,
1656
1615
  supports: () => true,
1657
1616
  ...item.build && !item.onSelect ? {
1617
+ placement: "download",
1658
1618
  source: make(
1659
1619
  `export:${item.id}`,
1660
1620
  async () => {
@@ -1726,7 +1686,7 @@ function MatrxCopyMenuSession(props) {
1726
1686
  const source = (props.primarySource === "table" ? table : void 0) ?? json ?? table ?? structuredAgent ?? human ?? builderVariants[0]?.source;
1727
1687
  if (!source && !actions.length) return null;
1728
1688
  const target = source ?? make("actions", () => ({ kind: "text", text: props.label }));
1729
- return /* @__PURE__ */ jsxs5(Fragment2, { children: [
1689
+ return /* @__PURE__ */ jsxs4(Fragment2, { children: [
1730
1690
  /* @__PURE__ */ jsx8(
1731
1691
  ContentTransferMenu,
1732
1692
  {
@@ -1735,10 +1695,11 @@ function MatrxCopyMenuSession(props) {
1735
1695
  label: props.label,
1736
1696
  variants,
1737
1697
  actions,
1698
+ sourceFormats: Boolean(source),
1738
1699
  hide: [
1739
1700
  ...!copyVisible || !source ? ["copy"] : [],
1740
1701
  ...!aiVisible || !source ? ["prepare"] : [],
1741
- ...!exportVisible || !source ? ["download"] : []
1702
+ ...!exportVisible ? ["download"] : []
1742
1703
  ],
1743
1704
  formatSources: {
1744
1705
  ...human ? { plain: human, markdown: humanMarkdown, html: humanMarkdown } : {},
@@ -1847,7 +1808,7 @@ function SourceConfiguration({
1847
1808
  onOpenChange: (open) => {
1848
1809
  if (!open && !busy) onClose();
1849
1810
  },
1850
- children: /* @__PURE__ */ jsxs5(
1811
+ children: /* @__PURE__ */ jsxs4(
1851
1812
  DialogContent,
1852
1813
  {
1853
1814
  onCloseAutoFocus: (event) => {
@@ -1856,12 +1817,12 @@ function SourceConfiguration({
1856
1817
  },
1857
1818
  className: "matrx-alchemy-workspace",
1858
1819
  children: [
1859
- /* @__PURE__ */ jsxs5(DialogHeader, { children: [
1820
+ /* @__PURE__ */ jsxs4(DialogHeader, { children: [
1860
1821
  /* @__PURE__ */ jsx8(DialogTitle, { children: title }),
1861
1822
  /* @__PURE__ */ jsx8(DialogDescription, { children: custom?.dialogDescription ?? "Choose the source detail, then prepare, edit, summarize, copy or export it in Alchemy." })
1862
1823
  ] }),
1863
- /* @__PURE__ */ jsxs5("div", { className: "matrx-alchemy-main matrx-alchemy-toolbar", children: [
1864
- custom?.options.map((option) => /* @__PURE__ */ jsxs5("label", { children: [
1824
+ /* @__PURE__ */ jsxs4("div", { className: "matrx-alchemy-main matrx-alchemy-toolbar", children: [
1825
+ custom?.options.map((option) => /* @__PURE__ */ jsxs4("label", { children: [
1865
1826
  option.label,
1866
1827
  "hint" in option && option.hint ? /* @__PURE__ */ jsx8("small", { children: option.hint }) : null,
1867
1828
  option.kind === "toggle" ? /* @__PURE__ */ jsx8(
@@ -1881,7 +1842,7 @@ function SourceConfiguration({
1881
1842
  }),
1882
1843
  children: option.options.map((choice) => /* @__PURE__ */ jsx8("option", { value: choice.value, children: choice.label }, choice.value))
1883
1844
  }
1884
- ) : option.kind === "slider" ? /* @__PURE__ */ jsxs5(Fragment2, { children: [
1845
+ ) : option.kind === "slider" ? /* @__PURE__ */ jsxs4(Fragment2, { children: [
1885
1846
  /* @__PURE__ */ jsx8(
1886
1847
  "input",
1887
1848
  {
@@ -1897,7 +1858,7 @@ function SourceConfiguration({
1897
1858
  }
1898
1859
  ),
1899
1860
  /* @__PURE__ */ jsx8("span", { children: option.formatValue(Number(values[option.key])) })
1900
- ] }) : /* @__PURE__ */ jsxs5(Fragment2, { children: [
1861
+ ] }) : /* @__PURE__ */ jsxs4(Fragment2, { children: [
1901
1862
  /* @__PURE__ */ jsx8(
1902
1863
  "input",
1903
1864
  {
@@ -1923,7 +1884,7 @@ function SourceConfiguration({
1923
1884
  ))
1924
1885
  ] })
1925
1886
  ] }, option.key)),
1926
- groomer ? /* @__PURE__ */ jsxs5(Fragment2, { children: [
1887
+ groomer ? /* @__PURE__ */ jsxs4(Fragment2, { children: [
1927
1888
  /* @__PURE__ */ jsx8("div", { children: ["full", "compact", "brief"].map((level) => /* @__PURE__ */ jsx8(
1928
1889
  Button,
1929
1890
  {
@@ -1941,9 +1902,9 @@ function SourceConfiguration({
1941
1902
  },
1942
1903
  level
1943
1904
  )) }),
1944
- groomer.sections.map((section) => /* @__PURE__ */ jsxs5("label", { children: [
1905
+ groomer.sections.map((section) => /* @__PURE__ */ jsxs4("label", { children: [
1945
1906
  section.title,
1946
- /* @__PURE__ */ jsxs5(
1907
+ /* @__PURE__ */ jsxs4(
1947
1908
  "select",
1948
1909
  {
1949
1910
  value: sections[section.id],
@@ -1961,7 +1922,7 @@ function SourceConfiguration({
1961
1922
  ] }, section.id))
1962
1923
  ] }) : null
1963
1924
  ] }),
1964
- /* @__PURE__ */ jsxs5("p", { children: [
1925
+ /* @__PURE__ */ jsxs4("p", { children: [
1965
1926
  text.length.toLocaleString(),
1966
1927
  " characters \xB7 approximately",
1967
1928
  " ",
@@ -1969,7 +1930,7 @@ function SourceConfiguration({
1969
1930
  " tokens"
1970
1931
  ] }),
1971
1932
  error || buildError ? /* @__PURE__ */ jsx8("p", { role: "alert", children: error ?? buildError }) : null,
1972
- /* @__PURE__ */ jsxs5(DialogFooter, { children: [
1933
+ /* @__PURE__ */ jsxs4(DialogFooter, { children: [
1973
1934
  /* @__PURE__ */ jsx8(
1974
1935
  Button,
1975
1936
  {
@@ -2039,17 +2000,17 @@ import {
2039
2000
  } from "react";
2040
2001
 
2041
2002
  // src/data-table/icons.tsx
2042
- import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
2003
+ import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
2043
2004
  function Icon({ children, ...props }) {
2044
2005
  return /* @__PURE__ */ jsx11("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": "true", ...props, children });
2045
2006
  }
2046
2007
  var Check = (p) => /* @__PURE__ */ jsx11(Icon, { ...p, children: /* @__PURE__ */ jsx11("path", { d: "m5 12 4 4L19 6" }) });
2047
- var PanelRight = (p) => /* @__PURE__ */ jsxs6(Icon, { ...p, children: [
2008
+ var PanelRight = (p) => /* @__PURE__ */ jsxs5(Icon, { ...p, children: [
2048
2009
  /* @__PURE__ */ jsx11("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
2049
2010
  /* @__PURE__ */ jsx11("path", { d: "M15 4v16" })
2050
2011
  ] });
2051
2012
  var ExternalLink = (p) => /* @__PURE__ */ jsx11(Icon, { ...p, children: /* @__PURE__ */ jsx11("path", { d: "M14 4h6v6M20 4l-9 9M19 13v6H5V5h6" }) });
2052
- var Copy = (p) => /* @__PURE__ */ jsxs6(Icon, { ...p, children: [
2013
+ var Copy = (p) => /* @__PURE__ */ jsxs5(Icon, { ...p, children: [
2053
2014
  /* @__PURE__ */ jsx11("rect", { x: "9", y: "9", width: "11", height: "11", rx: "2" }),
2054
2015
  /* @__PURE__ */ jsx11("path", { d: "M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3" })
2055
2016
  ] });
@@ -2058,7 +2019,7 @@ var ShieldOff = (p) => /* @__PURE__ */ jsx11(Icon, { ...p, children: /* @__PURE_
2058
2019
 
2059
2020
  // src/data-table/useTableNotice.tsx
2060
2021
  import { useState as useState5 } from "react";
2061
- import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
2022
+ import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
2062
2023
  function useTableNotice() {
2063
2024
  const host = useMatrxDataTableHost();
2064
2025
  const [message, setMessage] = useState5(null);
@@ -2072,7 +2033,7 @@ function useTableNotice() {
2072
2033
  else setMessage({ text, error: true });
2073
2034
  }
2074
2035
  };
2075
- const notice = message ? /* @__PURE__ */ jsxs7("span", { role: message.error ? "alert" : "status", className: message.error ? "text-xs text-destructive" : "text-xs text-muted-foreground", children: [
2036
+ const notice = message ? /* @__PURE__ */ jsxs6("span", { role: message.error ? "alert" : "status", className: message.error ? "text-xs text-destructive" : "text-xs text-muted-foreground", children: [
2076
2037
  message.text,
2077
2038
  /* @__PURE__ */ jsx12("button", { type: "button", "aria-label": "Dismiss notification", className: "ml-2 underline", onClick: () => setMessage(null), children: "Dismiss" })
2078
2039
  ] }) : null;
@@ -2106,7 +2067,7 @@ var TooltipContent = React9.forwardRef(({ className, sideOffset = 4, container,
2106
2067
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
2107
2068
 
2108
2069
  // src/data-table/MatrxUuidCell.tsx
2109
- import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
2070
+ import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
2110
2071
  var SHORT_LEN = 8;
2111
2072
  function shortUuid(id, len = SHORT_LEN) {
2112
2073
  return id.slice(0, len);
@@ -2199,13 +2160,13 @@ function MatrxUuidCell({
2199
2160
  };
2200
2161
  const idNode = (() => {
2201
2162
  if (forbidden) {
2202
- 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: [
2163
+ return /* @__PURE__ */ jsxs7("span", { className: "inline-flex min-w-0 items-center gap-1 font-mono text-xs text-muted-foreground/70 tabular-nums", children: [
2203
2164
  /* @__PURE__ */ jsx14("span", { className: "min-w-0 truncate", children: display }),
2204
2165
  /* @__PURE__ */ jsx14(ShieldOff, { className: "h-3 w-3 shrink-0 opacity-60", "aria-hidden": true })
2205
2166
  ] });
2206
2167
  }
2207
2168
  if (onOpen) {
2208
- return /* @__PURE__ */ jsxs8(
2169
+ return /* @__PURE__ */ jsxs7(
2209
2170
  "button",
2210
2171
  {
2211
2172
  type: "button",
@@ -2221,7 +2182,7 @@ function MatrxUuidCell({
2221
2182
  );
2222
2183
  }
2223
2184
  if (resolvedHref) {
2224
- return /* @__PURE__ */ jsxs8(
2185
+ return /* @__PURE__ */ jsxs7(
2225
2186
  "a",
2226
2187
  {
2227
2188
  href: resolvedHref,
@@ -2239,7 +2200,7 @@ function MatrxUuidCell({
2239
2200
  }
2240
2201
  return /* @__PURE__ */ jsx14("span", { className: "min-w-0 truncate font-mono text-xs text-muted-foreground tabular-nums select-all", children: display });
2241
2202
  })();
2242
- return /* @__PURE__ */ jsx14(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs8(
2203
+ return /* @__PURE__ */ jsx14(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs7(
2243
2204
  "span",
2244
2205
  {
2245
2206
  "data-matrx-cell-control": true,
@@ -2249,11 +2210,11 @@ function MatrxUuidCell({
2249
2210
  ),
2250
2211
  onClick: stop,
2251
2212
  children: [
2252
- /* @__PURE__ */ jsxs8(Tooltip, { children: [
2213
+ /* @__PURE__ */ jsxs7(Tooltip, { children: [
2253
2214
  /* @__PURE__ */ jsx14(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx14("span", { className: "inline-flex min-w-0 max-w-full items-center", children: idNode }) }),
2254
2215
  /* @__PURE__ */ jsx14(TooltipContent, { side: "top", className: "max-w-sm break-all font-mono", children: forbidden ? `No access \xB7 ${tip}` : tip })
2255
2216
  ] }),
2256
- /* @__PURE__ */ jsxs8(Tooltip, { children: [
2217
+ /* @__PURE__ */ jsxs7(Tooltip, { children: [
2257
2218
  /* @__PURE__ */ jsx14(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx14(
2258
2219
  "button",
2259
2220
  {
@@ -2269,7 +2230,7 @@ function MatrxUuidCell({
2269
2230
  ) }),
2270
2231
  /* @__PURE__ */ jsx14(TooltipContent, { side: "top", children: copied ? "Copied" : `Copy ${label ?? "id"}: ${value}` })
2271
2232
  ] }),
2272
- canPeek ? /* @__PURE__ */ jsxs8(Tooltip, { children: [
2233
+ canPeek ? /* @__PURE__ */ jsxs7(Tooltip, { children: [
2273
2234
  /* @__PURE__ */ jsx14(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx14(
2274
2235
  "button",
2275
2236
  {
@@ -2283,12 +2244,12 @@ function MatrxUuidCell({
2283
2244
  children: /* @__PURE__ */ jsx14(Lightbulb, { className: "h-3 w-3" })
2284
2245
  }
2285
2246
  ) }),
2286
- /* @__PURE__ */ jsxs8(TooltipContent, { side: "top", children: [
2247
+ /* @__PURE__ */ jsxs7(TooltipContent, { side: "top", children: [
2287
2248
  "Quick look at ",
2288
2249
  label ?? "record"
2289
2250
  ] })
2290
2251
  ] }) : null,
2291
- onOpen && resolvedHref && !forbidden ? /* @__PURE__ */ jsxs8(Tooltip, { children: [
2252
+ onOpen && resolvedHref && !forbidden ? /* @__PURE__ */ jsxs7(Tooltip, { children: [
2292
2253
  /* @__PURE__ */ jsx14(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx14(
2293
2254
  "a",
2294
2255
  {
@@ -2301,7 +2262,7 @@ function MatrxUuidCell({
2301
2262
  children: /* @__PURE__ */ jsx14(ExternalLink, { className: "h-3 w-3" })
2302
2263
  }
2303
2264
  ) }),
2304
- /* @__PURE__ */ jsxs8(TooltipContent, { side: "top", children: [
2265
+ /* @__PURE__ */ jsxs7(TooltipContent, { side: "top", children: [
2305
2266
  "Open ",
2306
2267
  label ?? "record",
2307
2268
  " in a new tab"
@@ -2329,7 +2290,7 @@ function isUuidValue(value) {
2329
2290
  }
2330
2291
 
2331
2292
  // src/data-table/DataRowInspector.tsx
2332
- import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
2293
+ import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
2333
2294
  var noFieldToken = () => null;
2334
2295
  function formatValue(value) {
2335
2296
  if (value == null) return "\u2014";
@@ -2373,7 +2334,7 @@ function DataRowInspector({
2373
2334
  })
2374
2335
  }
2375
2336
  ) }) : null;
2376
- return /* @__PURE__ */ jsxs9(
2337
+ return /* @__PURE__ */ jsxs8(
2377
2338
  "div",
2378
2339
  {
2379
2340
  className: cn("flex h-full min-h-0 flex-col overflow-hidden", className),
@@ -2381,7 +2342,7 @@ function DataRowInspector({
2381
2342
  title ? /* @__PURE__ */ jsx15("div", { className: "shrink-0 border-b border-border px-3 py-2 text-sm font-medium", children: title }) : null,
2382
2343
  /* @__PURE__ */ jsx15("div", { className: "min-h-0 flex-1 overflow-auto p-3", children: /* @__PURE__ */ jsx15("dl", { className: "space-y-2", children: entries.map(([key, value]) => {
2383
2344
  if (isUuidValue(value)) {
2384
- return /* @__PURE__ */ jsxs9(
2345
+ return /* @__PURE__ */ jsxs8(
2385
2346
  "div",
2386
2347
  {
2387
2348
  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",
@@ -2402,7 +2363,7 @@ function DataRowInspector({
2402
2363
  }
2403
2364
  const formatted = formatValue(value);
2404
2365
  const multiline = formatted.includes("\n") || formatted.length > 80;
2405
- return /* @__PURE__ */ jsxs9(
2366
+ return /* @__PURE__ */ jsxs8(
2406
2367
  "div",
2407
2368
  {
2408
2369
  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",