@ai-matrx/design-system 0.86.334 → 0.86.336

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 (79) hide show
  1. package/CHANGELOG.md +28 -68
  2. package/dist/carousel.cjs.map +1 -1
  3. package/dist/carousel.js +4 -4
  4. package/dist/{chunk-MFUNGDHO.js → chunk-B24DLFWR.js} +2 -2
  5. package/dist/{chunk-CSSD6NS4.js → chunk-DQUCOMAC.js} +2 -2
  6. package/dist/chunk-L5OACQXS.js +409 -0
  7. package/dist/chunk-L5OACQXS.js.map +1 -0
  8. package/dist/{chunk-6YZMGSQY.js → chunk-M34WPTPX.js} +2 -2
  9. package/dist/{chunk-7NEVJKDZ.js → chunk-MAMZGJJ3.js} +36 -7
  10. package/dist/chunk-MAMZGJJ3.js.map +1 -0
  11. package/dist/{chunk-VV6WZTH5.js → chunk-PBDQZPKV.js} +2 -2
  12. package/dist/{chunk-E4GS5QH7.js → chunk-Q2HWDJED.js} +2 -2
  13. package/dist/{chunk-ZOQ2XKXF.js → chunk-QOEKPR37.js} +5 -5
  14. package/dist/chunk-QOEKPR37.js.map +1 -0
  15. package/dist/{chunk-MEJVHDYJ.js → chunk-RGJPHRU3.js} +2 -2
  16. package/dist/{chunk-3MQMVPKO.js → chunk-VQ3G6AFN.js} +4 -4
  17. package/dist/{chunk-677JS6TX.js → chunk-WZC3K7SO.js} +75 -158
  18. package/dist/chunk-WZC3K7SO.js.map +1 -0
  19. package/dist/clipboard-fallback-dialog.cjs.map +1 -1
  20. package/dist/clipboard-fallback-dialog.js +1 -1
  21. package/dist/controls.cjs +4 -4
  22. package/dist/controls.cjs.map +1 -1
  23. package/dist/controls.css +6 -0
  24. package/dist/controls.js +4 -4
  25. package/dist/data-table/data-row-inspector.cjs.map +1 -1
  26. package/dist/data-table/data-row-inspector.js +4 -4
  27. package/dist/data-table/data-row-window.cjs.map +1 -1
  28. package/dist/data-table/data-row-window.js +5 -5
  29. package/dist/data-table/index.cjs +4 -4
  30. package/dist/data-table/index.cjs.map +1 -1
  31. package/dist/data-table/index.js +7 -7
  32. package/dist/data-table/pagination.cjs +4 -4
  33. package/dist/data-table/pagination.cjs.map +1 -1
  34. package/dist/data-table/pagination.js +2 -2
  35. package/dist/data-table/uuid-cell.cjs.map +1 -1
  36. package/dist/data-table/uuid-cell.js +2 -2
  37. package/dist/desktop.cjs.map +1 -1
  38. package/dist/desktop.js +9 -8
  39. package/dist/desktop.js.map +1 -1
  40. package/dist/index.cjs +1508 -1187
  41. package/dist/index.cjs.map +1 -1
  42. package/dist/index.d.cts +7 -3
  43. package/dist/index.d.ts +7 -3
  44. package/dist/index.js +24 -23
  45. package/dist/index.js.map +1 -1
  46. package/dist/item.cjs +646 -372
  47. package/dist/item.cjs.map +1 -1
  48. package/dist/item.d.cts +1 -3
  49. package/dist/item.d.ts +1 -3
  50. package/dist/item.js +26 -34
  51. package/dist/item.js.map +1 -1
  52. package/dist/lite-table.cjs.map +1 -1
  53. package/dist/lite-table.js +1 -1
  54. package/dist/menu-look.cjs +521 -36
  55. package/dist/menu-look.cjs.map +1 -1
  56. package/dist/menu-look.css +96 -1
  57. package/dist/menu-look.d.cts +320 -37
  58. package/dist/menu-look.d.ts +320 -37
  59. package/dist/menu-look.js +60 -121
  60. package/dist/menu-look.js.map +1 -1
  61. package/dist/record-list.cjs +533 -253
  62. package/dist/record-list.cjs.map +1 -1
  63. package/dist/record-list.js +4 -2
  64. package/dist/record-list.js.map +1 -1
  65. package/dist/settings.cjs.map +1 -1
  66. package/dist/settings.js +2 -2
  67. package/dist/writing-field.cjs.map +1 -1
  68. package/dist/writing-field.js +2 -2
  69. package/package.json +2 -2
  70. package/dist/chunk-677JS6TX.js.map +0 -1
  71. package/dist/chunk-7NEVJKDZ.js.map +0 -1
  72. package/dist/chunk-ZOQ2XKXF.js.map +0 -1
  73. /package/dist/{chunk-MFUNGDHO.js.map → chunk-B24DLFWR.js.map} +0 -0
  74. /package/dist/{chunk-CSSD6NS4.js.map → chunk-DQUCOMAC.js.map} +0 -0
  75. /package/dist/{chunk-6YZMGSQY.js.map → chunk-M34WPTPX.js.map} +0 -0
  76. /package/dist/{chunk-VV6WZTH5.js.map → chunk-PBDQZPKV.js.map} +0 -0
  77. /package/dist/{chunk-E4GS5QH7.js.map → chunk-Q2HWDJED.js.map} +0 -0
  78. /package/dist/{chunk-MEJVHDYJ.js.map → chunk-RGJPHRU3.js.map} +0 -0
  79. /package/dist/{chunk-3MQMVPKO.js.map → chunk-VQ3G6AFN.js.map} +0 -0
package/dist/item.cjs CHANGED
@@ -195,6 +195,12 @@ function RadixChevronUpIcon(props) {
195
195
  }
196
196
  ) });
197
197
  }
198
+ function PanelLeftIcon(props) {
199
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { ...lucideProps("panel-left", props), children: [
200
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
201
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M9 3v18" })
202
+ ] });
203
+ }
198
204
 
199
205
  // src/cn.ts
200
206
  var import_clsx = require("clsx");
@@ -571,7 +577,6 @@ function keepMovedFocus(handler) {
571
577
  var import_jsx_runtime6 = require("react/jsx-runtime");
572
578
  var DropdownMenu = DropdownMenuPrimitive.Root;
573
579
  var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
574
- var DropdownMenuSub = DropdownMenuPrimitive.Sub;
575
580
  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";
576
581
  var MENU_ITEM_CLASS = "relative flex select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:text-disabled-foreground";
577
582
  var MENU_INDICATOR_ITEM_CLASS = "relative flex select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:text-disabled-foreground";
@@ -1326,7 +1331,6 @@ var React9 = __toESM(require("react"), 1);
1326
1331
  var import_jsx_runtime11 = require("react/jsx-runtime");
1327
1332
  var ContextMenu = ContextMenuPrimitive.Root;
1328
1333
  var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
1329
- var ContextMenuSub = ContextMenuPrimitive.Sub;
1330
1334
  var SURFACE_CLASS = "z-[10001] min-w-[8rem] max-h-[var(--radix-context-menu-content-available-height)] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border bg-popover p-1 text-popover-foreground";
1331
1335
  var ITEM_CLASS = "relative flex select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:text-disabled-foreground";
1332
1336
  var INDICATOR_ITEM_CLASS = "relative flex select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:text-disabled-foreground";
@@ -1483,19 +1487,381 @@ var ContextMenuShortcut = ({
1483
1487
  );
1484
1488
  ContextMenuShortcut.displayName = "ContextMenuShortcut";
1485
1489
 
1490
+ // src/menu-look.tsx
1491
+ var React11 = __toESM(require("react"), 1);
1492
+ var DropdownMenuPrimitive2 = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
1493
+ var ContextMenuPrimitive2 = __toESM(require("@radix-ui/react-context-menu"), 1);
1494
+
1495
+ // src/popover.tsx
1496
+ var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
1497
+ var React10 = __toESM(require("react"), 1);
1498
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1499
+ var POPOVER_WIDTH_CLASS = {
1500
+ xs: "w-48",
1501
+ sm: "w-60",
1502
+ md: "w-72",
1503
+ lg: "w-80",
1504
+ xl: "w-[26rem]",
1505
+ "2xl": "w-[34rem]"
1506
+ };
1507
+ var POPOVER_PADDING_CLASS = {
1508
+ none: "p-0",
1509
+ xs: "p-1",
1510
+ sm: "p-2",
1511
+ md: "p-3",
1512
+ default: "p-4"
1513
+ };
1514
+ var PopoverContent = React10.forwardRef(
1515
+ ({
1516
+ className,
1517
+ align = "center",
1518
+ sideOffset = 4,
1519
+ container,
1520
+ animated = true,
1521
+ sizing = "fixed",
1522
+ surface = "default",
1523
+ width = "md",
1524
+ padding = "default",
1525
+ collisionPadding = 16,
1526
+ onCloseAutoFocus,
1527
+ ...props
1528
+ }, ref) => {
1529
+ const portalContainer = usePortalContainer(container);
1530
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1531
+ PopoverPrimitive.Content,
1532
+ {
1533
+ ref,
1534
+ align,
1535
+ sideOffset,
1536
+ collisionPadding,
1537
+ "data-surface": surface === "solid" ? "solid" : void 0,
1538
+ "data-width": sizing === "content" ? void 0 : width,
1539
+ "data-padding": padding,
1540
+ className: cn(
1541
+ // Cap to the viewport space Radix measured and scroll — a popover taller
1542
+ // than the screen must never trap the user with unreachable content.
1543
+ // z must EQUAL the dialog layer (z-[10000]), never exceed it: with equal
1544
+ // z, DOM portal order decides, so a dialog opened FROM a popover stacks
1545
+ // above it, and a popover opened from a dialog still stacks above the
1546
+ // dialog. z-[10001] buried dialogs behind fullscreen popovers.
1547
+ "z-[10000] max-h-[var(--radix-popover-content-available-height)] overflow-y-auto overscroll-contain rounded-md border bg-popover text-popover-foreground shadow-md outline-none",
1548
+ POPOVER_PADDING_CLASS[padding],
1549
+ sizing === "content" ? "w-auto min-w-[min(max(var(--radix-popover-trigger-width),20rem),calc(100vw-2rem))] max-w-[min(28rem,calc(100vw-2rem))]" : cn(POPOVER_WIDTH_CLASS[width], "max-w-[calc(100vw-2rem)]"),
1550
+ surface === "solid" && SOLID_SURFACE_CLASS,
1551
+ animated && MOTION_POPPER,
1552
+ className
1553
+ ),
1554
+ ...props,
1555
+ onCloseAutoFocus: keepMovedFocus(onCloseAutoFocus)
1556
+ }
1557
+ ) });
1558
+ }
1559
+ );
1560
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
1561
+
1562
+ // src/menu-look.tsx
1563
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1564
+ var MENU_LOOK_CLASS = {
1565
+ panel: "cm-menu",
1566
+ item: "cm-item",
1567
+ iconSlot: "cm-icon-slot",
1568
+ icon: "cm-icon",
1569
+ text: "cm-text",
1570
+ label: "cm-label",
1571
+ hint: "cm-hint",
1572
+ current: "cm-current",
1573
+ chevron: "cm-chevron",
1574
+ search: "cm-search",
1575
+ trail: "cm-trail",
1576
+ badge: "cm-badge",
1577
+ shortcut: "cm-shortcut",
1578
+ control: "cm-control",
1579
+ divider: "cm-divider",
1580
+ sectionLabel: "cm-section-label",
1581
+ header: "cm-header",
1582
+ headerMark: "cm-header-mark",
1583
+ headerText: "cm-header-text",
1584
+ headerTitle: "cm-header-title",
1585
+ headerSubtitle: "cm-header-subtitle",
1586
+ danger: "cm-danger",
1587
+ dimmed: "cm-dimmed"
1588
+ };
1589
+ function MenuLookIconSlot({ children }) {
1590
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: MENU_LOOK_CLASS.iconSlot, children });
1591
+ }
1592
+ function MenuLookRowBody({ icon, label, labelTitle, description, trail, badge, shortcut, current }) {
1593
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1594
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuLookIconSlot, { children: icon }) : null,
1595
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: MENU_LOOK_CLASS.text, children: [
1596
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: MENU_LOOK_CLASS.label, title: labelTitle, children: label }),
1597
+ description ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: MENU_LOOK_CLASS.hint, children: description }) : null
1598
+ ] }),
1599
+ trail ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: MENU_LOOK_CLASS.trail, children: trail }) : null,
1600
+ badge ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: MENU_LOOK_CLASS.badge, children: badge }) : null,
1601
+ shortcut ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("kbd", { className: MENU_LOOK_CLASS.shortcut, children: shortcut }) : null,
1602
+ current ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RadixCheckIcon, { className: MENU_LOOK_CLASS.current, "aria-hidden": "true", "data-menu-current-mark": "" }) : null
1603
+ ] });
1604
+ }
1605
+ function menuLookItemClass({ destructive, dimmed } = {}) {
1606
+ return `${MENU_LOOK_CLASS.item}${destructive ? ` ${MENU_LOOK_CLASS.danger}` : ""}${dimmed ? ` ${MENU_LOOK_CLASS.dimmed}` : ""}`;
1607
+ }
1608
+ function DeclaredOverflow({ label, children }) {
1609
+ const fade = useScrollFade();
1610
+ const viewport = React11.useRef(null);
1611
+ const setViewport = React11.useCallback(
1612
+ (node) => {
1613
+ viewport.current = node;
1614
+ fade.ref(node);
1615
+ },
1616
+ [fade.ref]
1617
+ );
1618
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1619
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { ref: setViewport, className: "cm-viewport", "data-slot": "menu-look-viewport", children }),
1620
+ fade.state.bottom ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1621
+ "button",
1622
+ {
1623
+ type: "button",
1624
+ className: "cm-more-below",
1625
+ "data-slot": "menu-look-more-below",
1626
+ tabIndex: -1,
1627
+ "aria-hidden": "true",
1628
+ onPointerDown: (event) => event.preventDefault(),
1629
+ onClick: () => viewport.current?.scrollTo({ top: viewport.current.scrollHeight, behavior: "smooth" }),
1630
+ children: [
1631
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RadixChevronDownIcon, { "aria-hidden": "true" }),
1632
+ label
1633
+ ]
1634
+ }
1635
+ ) : null
1636
+ ] });
1637
+ }
1638
+ var MenuLookContent = React11.forwardRef(function MenuLookContent2({ size = "standard", density = "comfortable", moreBelowLabel, children, ...props }, ref) {
1639
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1640
+ DropdownMenuContent,
1641
+ {
1642
+ ref,
1643
+ surface: "solid",
1644
+ "data-menu-look": "",
1645
+ "data-menu-family": "dropdown",
1646
+ "data-size": size,
1647
+ "data-density": density,
1648
+ ...moreBelowLabel ? { "data-overflow": "declared" } : {},
1649
+ ...props,
1650
+ className: MENU_LOOK_CLASS.panel,
1651
+ children: moreBelowLabel ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DeclaredOverflow, { label: moreBelowLabel, children }) : children
1652
+ }
1653
+ );
1654
+ });
1655
+ var MenuLookSubContent = React11.forwardRef(function MenuLookSubContent2({ size = "standard", density = "comfortable", fit = "menu", ...props }, ref) {
1656
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1657
+ DropdownMenuSubContent,
1658
+ {
1659
+ ref,
1660
+ surface: "solid",
1661
+ "data-menu-look": "",
1662
+ "data-menu-family": "dropdown",
1663
+ "data-size": size,
1664
+ "data-density": density,
1665
+ "data-fit": fit,
1666
+ ...props,
1667
+ className: MENU_LOOK_CLASS.panel
1668
+ }
1669
+ );
1670
+ });
1671
+ var MenuLookContextContent = React11.forwardRef(function MenuLookContextContent2({ size = "standard", density = "comfortable", ...props }, ref) {
1672
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1673
+ ContextMenuContent,
1674
+ {
1675
+ ref,
1676
+ "data-menu-look": "",
1677
+ "data-menu-family": "context",
1678
+ "data-size": size,
1679
+ "data-density": density,
1680
+ ...props,
1681
+ className: MENU_LOOK_CLASS.panel
1682
+ }
1683
+ );
1684
+ });
1685
+ var MenuLookContextSubContent = React11.forwardRef(function MenuLookContextSubContent2({ size = "standard", density = "comfortable", fit = "menu", ...props }, ref) {
1686
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1687
+ ContextMenuSubContent,
1688
+ {
1689
+ ref,
1690
+ "data-menu-look": "",
1691
+ "data-menu-family": "context",
1692
+ "data-size": size,
1693
+ "data-density": density,
1694
+ "data-fit": fit,
1695
+ ...props,
1696
+ className: MENU_LOOK_CLASS.panel
1697
+ }
1698
+ );
1699
+ });
1700
+ function menuLookRows(P, family) {
1701
+ const Item3 = React11.forwardRef(function MenuLookItem2({ icon, label, labelTitle, description, trail, badge, shortcut, current, destructive, dimmed, href, target, linkProps, ...props }, ref) {
1702
+ const className = menuLookItemClass({ destructive, dimmed });
1703
+ const body = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuLookRowBody, { icon, label, labelTitle, description, trail, badge, shortcut, current });
1704
+ const mark = current ? { "data-current": "" } : {};
1705
+ if (href) {
1706
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(P.Item, { ref, asChild: true, "data-slot": `${family}-item`, ...props, ...mark, className, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("a", { href, target, rel: target === "_blank" ? "noopener noreferrer" : void 0, ...linkProps, children: body }) });
1707
+ }
1708
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(P.Item, { ref, "data-slot": `${family}-item`, ...props, ...mark, className, children: body });
1709
+ });
1710
+ const SubTrigger3 = React11.forwardRef(function MenuLookSubTrigger2({ icon, label, labelTitle, description, trail, badge, shortcut, current, ...props }, ref) {
1711
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(P.SubTrigger, { ref, "data-slot": `${family}-sub-trigger`, ...props, ...current ? { "data-current": "" } : {}, className: MENU_LOOK_CLASS.item, children: [
1712
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuLookRowBody, { icon, label, labelTitle, description, trail, badge, shortcut }),
1713
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RadixChevronRightIcon, { className: MENU_LOOK_CLASS.chevron, "aria-hidden": "true" })
1714
+ ] });
1715
+ });
1716
+ const CheckboxItem3 = React11.forwardRef(function MenuLookCheckboxItem2({ icon, label, labelTitle, description, trail, badge, shortcut, checked, ...props }, ref) {
1717
+ const on = checked === true;
1718
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(P.CheckboxItem, { ref, ...checked === void 0 ? {} : { checked }, ...props, className: MENU_LOOK_CLASS.item, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuLookRowBody, { icon: on ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RadixCheckIcon, { className: MENU_LOOK_CLASS.icon }) : icon ?? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: MENU_LOOK_CLASS.icon, "aria-hidden": "true" }), label, labelTitle, description, trail, badge, shortcut }) });
1719
+ });
1720
+ const RadioItem3 = React11.forwardRef(function MenuLookRadioItem2({ icon, label, labelTitle, description, trail, badge, shortcut, ...props }, ref) {
1721
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(P.RadioItem, { ref, ...props, className: MENU_LOOK_CLASS.item, children: [
1722
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuLookRowBody, { icon, label, labelTitle, description, trail, badge, shortcut }),
1723
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(P.ItemIndicator, { className: MENU_LOOK_CLASS.current, "data-menu-current-mark": "", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RadixCheckIcon, { "aria-hidden": "true" }) })
1724
+ ] });
1725
+ });
1726
+ const Label3 = React11.forwardRef(function MenuLookLabel2({ description, children, ...props }, ref) {
1727
+ if (!description) return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(P.Label, { ref, ...props, className: MENU_LOOK_CLASS.sectionLabel, children });
1728
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(P.Label, { ref, ...props, "data-has-hint": "", className: MENU_LOOK_CLASS.sectionLabel, children: [
1729
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children }),
1730
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: MENU_LOOK_CLASS.hint, children: description })
1731
+ ] });
1732
+ });
1733
+ const Separator3 = React11.forwardRef(function MenuLookSeparator2(props, ref) {
1734
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(P.Separator, { ref, ...props, className: MENU_LOOK_CLASS.divider });
1735
+ });
1736
+ return { Item: Item3, SubTrigger: SubTrigger3, CheckboxItem: CheckboxItem3, RadioItem: RadioItem3, Label: Label3, Separator: Separator3 };
1737
+ }
1738
+ var dropdownRows = menuLookRows(DropdownMenuPrimitive2, "dropdown-menu");
1739
+ var contextRows = menuLookRows(ContextMenuPrimitive2, "context-menu");
1740
+ var MenuLookItem = dropdownRows.Item;
1741
+ var MenuLookSub = DropdownMenuPrimitive2.Sub;
1742
+ var MenuLookSubTrigger = dropdownRows.SubTrigger;
1743
+ var MenuLookCheckboxItem = dropdownRows.CheckboxItem;
1744
+ var MenuLookRadioItem = dropdownRows.RadioItem;
1745
+ var MenuLookLabel = dropdownRows.Label;
1746
+ var MenuLookSeparator = dropdownRows.Separator;
1747
+ var MenuLookContextItem = contextRows.Item;
1748
+ var MenuLookContextSub = ContextMenuPrimitive2.Sub;
1749
+ var MenuLookContextSubTrigger = contextRows.SubTrigger;
1750
+ var MenuLookContextCheckboxItem = contextRows.CheckboxItem;
1751
+ var MenuLookContextRadioItem = contextRows.RadioItem;
1752
+ var MenuLookContextLabel = contextRows.Label;
1753
+ var MenuLookContextSeparator = contextRows.Separator;
1754
+ var MenuLookPanel = React11.forwardRef(function MenuLookPanel2({ size = "standard", density = "comfortable", surface = "floating", fillBelow, role = "menu", ...props }, ref) {
1755
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1756
+ "div",
1757
+ {
1758
+ ref,
1759
+ role,
1760
+ "data-menu-look": "",
1761
+ "data-menu-family": "panel",
1762
+ "data-surface": surface,
1763
+ ...fillBelow ? { "data-fill-below": fillBelow } : {},
1764
+ "data-size": size,
1765
+ "data-density": density,
1766
+ ...props,
1767
+ className: MENU_LOOK_CLASS.panel
1768
+ }
1769
+ );
1770
+ });
1771
+ var MenuLookPopoverContent = React11.forwardRef(function MenuLookPopoverContent2({ size = "standard", density = "comfortable", role = "menu", ...props }, ref) {
1772
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1773
+ PopoverContent,
1774
+ {
1775
+ ref,
1776
+ role,
1777
+ surface: "solid",
1778
+ padding: "none",
1779
+ animated: true,
1780
+ "data-menu-look": "",
1781
+ "data-menu-family": "panel",
1782
+ "data-in-popover": "",
1783
+ "data-surface": "floating",
1784
+ "data-size": size,
1785
+ "data-density": density,
1786
+ ...props,
1787
+ className: MENU_LOOK_CLASS.panel
1788
+ }
1789
+ );
1790
+ });
1791
+ var MenuLookPanelItem = React11.forwardRef(function MenuLookPanelItem2({ icon, label, labelTitle, description, trail, badge, shortcut, current, pressed, destructive, dimmed, href, target, rel, as, linkProps, onClick, role = "menuitem", ...props }, ref) {
1792
+ const marked = Boolean(current || pressed);
1793
+ const body = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuLookRowBody, { icon, label, labelTitle, description, trail, badge, shortcut, current: marked });
1794
+ const className = menuLookItemClass({ destructive, dimmed });
1795
+ const mark = marked ? { "data-current": "" } : {};
1796
+ if (href) {
1797
+ const Link = as ?? "a";
1798
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1799
+ Link,
1800
+ {
1801
+ ref,
1802
+ href,
1803
+ target,
1804
+ rel: rel ?? (target === "_blank" ? "noopener noreferrer" : void 0),
1805
+ role,
1806
+ onClick,
1807
+ ...props,
1808
+ ...linkProps,
1809
+ ...mark,
1810
+ className,
1811
+ children: body
1812
+ }
1813
+ );
1814
+ }
1815
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1816
+ "button",
1817
+ {
1818
+ ref,
1819
+ type: "button",
1820
+ role,
1821
+ onClick,
1822
+ ...pressed === void 0 ? {} : { "aria-pressed": pressed },
1823
+ ...props,
1824
+ ...mark,
1825
+ className,
1826
+ children: body
1827
+ }
1828
+ );
1829
+ });
1830
+ var MenuLookPanelControlRow = React11.forwardRef(function MenuLookPanelControlRow2({ icon, label, description, control, as = "div", ...props }, ref) {
1831
+ const Row = as;
1832
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Row, { ref, "data-control-row": "", ...props, className: MENU_LOOK_CLASS.item, children: [
1833
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuLookRowBody, { icon, label, description }),
1834
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: MENU_LOOK_CLASS.control, children: control })
1835
+ ] });
1836
+ });
1837
+ var MenuLookSearch = React11.forwardRef(function MenuLookSearch2({ placeholder = "Search", ...props }, ref) {
1838
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: MENU_LOOK_CLASS.search, "data-menu-look-search": "", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1839
+ "input",
1840
+ {
1841
+ ref,
1842
+ type: "search",
1843
+ autoComplete: "off",
1844
+ spellCheck: false,
1845
+ placeholder,
1846
+ "aria-label": props["aria-label"] ?? placeholder,
1847
+ ...props
1848
+ }
1849
+ ) });
1850
+ });
1851
+
1486
1852
  // src/item/ItemMenuDrawer.tsx
1487
1853
  var import_react5 = require("react");
1488
1854
 
1489
1855
  // src/drawer.tsx
1490
1856
  var import_react_tree = require("@ai-matrx/kit/react-tree");
1491
- var React12 = __toESM(require("react"), 1);
1857
+ var React14 = __toESM(require("react"), 1);
1492
1858
  var import_vaul = require("vaul");
1493
1859
 
1494
1860
  // src/floating-layer.tsx
1495
1861
  var import_react_focus_scope = require("@radix-ui/react-focus-scope");
1496
1862
  var import_react_slot3 = require("@radix-ui/react-slot");
1497
- var React10 = __toESM(require("react"), 1);
1498
- var import_jsx_runtime12 = require("react/jsx-runtime");
1863
+ var React12 = __toESM(require("react"), 1);
1864
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1499
1865
  var FLOATING_LAYER_ATTR = "data-matrx-floating-layer";
1500
1866
  var REGISTRY_SLOT = /* @__PURE__ */ Symbol.for("ai-matrx.design-system.modal-layer-registry");
1501
1867
  var registryHost = globalThis;
@@ -1534,7 +1900,7 @@ function isModalLayerOpen() {
1534
1900
  return registry.count > 0;
1535
1901
  }
1536
1902
  function useModalLayer(active) {
1537
- React10.useLayoutEffect(() => active ? registerModalLayer() : void 0, [active]);
1903
+ React12.useLayoutEffect(() => active ? registerModalLayer() : void 0, [active]);
1538
1904
  }
1539
1905
  var POPPER_WRAPPER = "[data-radix-popper-content-wrapper]";
1540
1906
  function isInsideFloatingLayer(target) {
@@ -1549,8 +1915,8 @@ function keepFloatingLayersInside(handler) {
1549
1915
  };
1550
1916
  }
1551
1917
  var preventAutoFocus = (event) => event.preventDefault();
1552
- var FloatingLayer = React10.forwardRef(({ children }, ref) => {
1553
- const [opener] = React10.useState(
1918
+ var FloatingLayer = React12.forwardRef(({ children }, ref) => {
1919
+ const [opener] = React12.useState(
1554
1920
  () => typeof document === "undefined" ? null : document.activeElement
1555
1921
  );
1556
1922
  const returnFocus = (event) => {
@@ -1561,7 +1927,7 @@ var FloatingLayer = React10.forwardRef(({ children }, ref) => {
1561
1927
  opener.focus({ preventScroll: true });
1562
1928
  }
1563
1929
  };
1564
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1930
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1565
1931
  import_react_focus_scope.FocusScope,
1566
1932
  {
1567
1933
  asChild: true,
@@ -1569,7 +1935,7 @@ var FloatingLayer = React10.forwardRef(({ children }, ref) => {
1569
1935
  loop: false,
1570
1936
  onMountAutoFocus: preventAutoFocus,
1571
1937
  onUnmountAutoFocus: returnFocus,
1572
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1938
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1573
1939
  import_react_slot3.Slot,
1574
1940
  {
1575
1941
  ref,
@@ -1584,25 +1950,25 @@ var FloatingLayer = React10.forwardRef(({ children }, ref) => {
1584
1950
  FloatingLayer.displayName = "FloatingLayer";
1585
1951
 
1586
1952
  // src/radix-dialog-modal-context.tsx
1587
- var React11 = __toESM(require("react"), 1);
1588
- var import_jsx_runtime13 = require("react/jsx-runtime");
1953
+ var React13 = __toESM(require("react"), 1);
1954
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1589
1955
  var CONTEXT_SLOT2 = /* @__PURE__ */ Symbol.for("ai-matrx.design-system.dialog-modal-context");
1590
1956
  var contextRegistry2 = globalThis;
1591
- var RadixDialogModalContext = contextRegistry2[CONTEXT_SLOT2] ??= React11.createContext(true);
1957
+ var RadixDialogModalContext = contextRegistry2[CONTEXT_SLOT2] ??= React13.createContext(true);
1592
1958
  function RadixDialogModalProvider({
1593
1959
  children,
1594
1960
  modal
1595
1961
  }) {
1596
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RadixDialogModalContext.Provider, { value: modal, children });
1962
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(RadixDialogModalContext.Provider, { value: modal, children });
1597
1963
  }
1598
1964
  function useRadixDialogModal() {
1599
- return React11.useContext(RadixDialogModalContext);
1965
+ return React13.useContext(RadixDialogModalContext);
1600
1966
  }
1601
1967
 
1602
1968
  // src/drawer.tsx
1603
- var import_jsx_runtime14 = require("react/jsx-runtime");
1604
- var DrawerDirectionContext = React12.createContext("bottom");
1605
- var useDrawerDirection = () => React12.useContext(DrawerDirectionContext);
1969
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1970
+ var DrawerDirectionContext = React14.createContext("bottom");
1971
+ var useDrawerDirection = () => React14.useContext(DrawerDirectionContext);
1606
1972
  var Drawer = ({
1607
1973
  children,
1608
1974
  shouldScaleBackground = true,
@@ -1616,7 +1982,7 @@ var Drawer = ({
1616
1982
  }
1617
1983
  onOpenChange?.(open);
1618
1984
  };
1619
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RadixDialogModalProvider, { modal: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DrawerDirectionContext.Provider, { value: direction, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1985
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(RadixDialogModalProvider, { modal: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DrawerDirectionContext.Provider, { value: direction, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1620
1986
  import_vaul.Drawer.Root,
1621
1987
  {
1622
1988
  modal: true,
@@ -1632,7 +1998,7 @@ Drawer.displayName = "Drawer";
1632
1998
  var DrawerTrigger = import_vaul.Drawer.Trigger;
1633
1999
  var DrawerPortal = import_vaul.Drawer.Portal;
1634
2000
  var DrawerClose = import_vaul.Drawer.Close;
1635
- var DrawerOverlay = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2001
+ var DrawerOverlay = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1636
2002
  import_vaul.Drawer.Overlay,
1637
2003
  {
1638
2004
  ref,
@@ -1645,7 +2011,7 @@ var DrawerOverlay = React12.forwardRef(({ className, ...props }, ref) => /* @__P
1645
2011
  }
1646
2012
  ));
1647
2013
  DrawerOverlay.displayName = import_vaul.Drawer.Overlay.displayName;
1648
- var DrawerDescription = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2014
+ var DrawerDescription = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1649
2015
  import_vaul.Drawer.Description,
1650
2016
  {
1651
2017
  ref,
@@ -1655,9 +2021,9 @@ var DrawerDescription = React12.forwardRef(({ className, ...props }, ref) => /*
1655
2021
  }
1656
2022
  ));
1657
2023
  DrawerDescription.displayName = import_vaul.Drawer.Description.displayName;
1658
- var DrawerContentPrimitive = React12.forwardRef(({ onInteractOutside, ...props }, ref) => {
2024
+ var DrawerContentPrimitive = React14.forwardRef(({ onInteractOutside, ...props }, ref) => {
1659
2025
  useModalLayer(true);
1660
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2026
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1661
2027
  import_vaul.Drawer.Content,
1662
2028
  {
1663
2029
  "data-matrx-entrance": "none",
@@ -1681,13 +2047,13 @@ var SIZE_CLASSES = {
1681
2047
  left: { adaptive: "w-auto max-w-[92vw]", full: "h-dvh w-[92vw] max-w-sm" },
1682
2048
  right: { adaptive: "w-auto max-w-[92vw]", full: "h-dvh w-[92vw] max-w-sm" }
1683
2049
  };
1684
- var DrawerContent = React12.forwardRef(({ className, children, size = "adaptive", showHandle, ...props }, ref) => {
2050
+ var DrawerContent = React14.forwardRef(({ className, children, size = "adaptive", showHandle, ...props }, ref) => {
1685
2051
  const direction = useDrawerDirection();
1686
2052
  const hasDescription = (0, import_react_tree.treeContainsComponent)(children, DrawerDescription) || (0, import_react_tree.treeContainsComponent)(children, import_vaul.Drawer.Description);
1687
2053
  const withHandle = showHandle ?? (direction === "bottom" || direction === "top");
1688
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DrawerPortal, { children: [
1689
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DrawerOverlay, {}),
1690
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2054
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(DrawerPortal, { children: [
2055
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DrawerOverlay, {}),
2056
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1691
2057
  DrawerContentPrimitive,
1692
2058
  {
1693
2059
  ref,
@@ -1704,7 +2070,7 @@ var DrawerContent = React12.forwardRef(({ className, children, size = "adaptive"
1704
2070
  children: [
1705
2071
  withHandle ? (
1706
2072
  // Rule 3: the pill is 4px; the TARGET is 44px.
1707
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2073
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1708
2074
  "div",
1709
2075
  {
1710
2076
  "aria-hidden": true,
@@ -1713,7 +2079,7 @@ var DrawerContent = React12.forwardRef(({ className, children, size = "adaptive"
1713
2079
  "flex min-h-11 w-full shrink-0 cursor-grab items-center justify-center active:cursor-grabbing",
1714
2080
  direction === "top" && "order-last"
1715
2081
  ),
1716
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "h-1 w-[100px] rounded-full bg-muted" })
2082
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "h-1 w-[100px] rounded-full bg-muted" })
1717
2083
  }
1718
2084
  )
1719
2085
  ) : null,
@@ -1727,7 +2093,7 @@ DrawerContent.displayName = "DrawerContent";
1727
2093
  var DrawerHeader = ({
1728
2094
  className,
1729
2095
  ...props
1730
- }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2096
+ }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1731
2097
  "div",
1732
2098
  {
1733
2099
  "data-slot": "drawer-header",
@@ -1742,7 +2108,7 @@ DrawerHeader.displayName = "DrawerHeader";
1742
2108
  var DrawerBody = ({
1743
2109
  className,
1744
2110
  ...props
1745
- }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2111
+ }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1746
2112
  "div",
1747
2113
  {
1748
2114
  "data-slot": "drawer-body",
@@ -1754,7 +2120,7 @@ DrawerBody.displayName = "DrawerBody";
1754
2120
  var DrawerFooter = ({
1755
2121
  className,
1756
2122
  ...props
1757
- }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2123
+ }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1758
2124
  "div",
1759
2125
  {
1760
2126
  "data-slot": "drawer-footer",
@@ -1763,7 +2129,7 @@ var DrawerFooter = ({
1763
2129
  }
1764
2130
  );
1765
2131
  DrawerFooter.displayName = "DrawerFooter";
1766
- var DrawerTitle = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2132
+ var DrawerTitle = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1767
2133
  import_vaul.Drawer.Title,
1768
2134
  {
1769
2135
  ref,
@@ -1795,7 +2161,7 @@ function resolveItemMenuConfig(input) {
1795
2161
  }
1796
2162
 
1797
2163
  // src/item/ItemMenuDrawer.tsx
1798
- var import_jsx_runtime15 = require("react/jsx-runtime");
2164
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1799
2165
  function resolveSections(config, path) {
1800
2166
  let sections = config.sections;
1801
2167
  let title = null;
@@ -1836,24 +2202,24 @@ function ItemMenuDrawer({
1836
2202
  if (!next) setPath([]);
1837
2203
  onOpenChange(next);
1838
2204
  };
1839
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Drawer, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DrawerContent, { className: "max-h-[80dvh] flex flex-col", children: [
1840
- atRoot ? headerTitle ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex-shrink-0 border-b border-border px-4 pb-3 pt-1", children: [
1841
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DrawerTitle, { className: "text-center text-[15px] font-semibold", children: headerTitle }),
1842
- config.header?.description && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "mt-1 text-center type-body text-muted-foreground", children: config.header.description })
1843
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DrawerTitle, { className: "sr-only", children: "Options" }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex h-11 flex-shrink-0 items-center border-b border-border px-1", children: [
1844
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2205
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Drawer, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DrawerContent, { className: "max-h-[80dvh] flex flex-col", children: [
2206
+ atRoot ? headerTitle ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex-shrink-0 border-b border-border px-4 pb-3 pt-1", children: [
2207
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DrawerTitle, { className: "text-center text-[15px] font-semibold", children: headerTitle }),
2208
+ config.header?.description && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "mt-1 text-center type-body text-muted-foreground", children: config.header.description })
2209
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DrawerTitle, { className: "sr-only", children: "Options" }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex h-11 flex-shrink-0 items-center border-b border-border px-1", children: [
2210
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1845
2211
  "button",
1846
2212
  {
1847
2213
  type: "button",
1848
2214
  onClick: pop,
1849
2215
  "aria-label": "Back",
1850
2216
  className: "flex h-9 items-center gap-1 rounded-md px-2 text-sm text-muted-foreground hover:bg-accent hover:text-foreground",
1851
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChevronLeftIcon, { className: "h-5 w-5" })
2217
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChevronLeftIcon, { className: "h-5 w-5" })
1852
2218
  }
1853
2219
  ),
1854
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DrawerTitle, { className: "flex-1 truncate pr-10 text-center text-[15px] font-semibold", children: headerTitle ?? "Options" })
2220
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DrawerTitle, { className: "flex-1 truncate pr-10 text-center text-[15px] font-semibold", children: headerTitle ?? "Options" })
1855
2221
  ] }),
1856
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2222
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1857
2223
  "div",
1858
2224
  {
1859
2225
  className: cn(
@@ -1865,10 +2231,10 @@ function ItemMenuDrawer({
1865
2231
  sections.map((section, sIdx) => {
1866
2232
  const visible = section.items.filter((e) => !e.hidden);
1867
2233
  if (visible.length === 0) return null;
1868
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { children: [
1869
- sIdx > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "my-1 h-px bg-border" }),
1870
- section.label && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "px-4 pb-1 pt-2 type-secondary font-medium uppercase tracking-wide text-muted-foreground", children: section.label }),
1871
- visible.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2234
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
2235
+ sIdx > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "my-1 h-px bg-border" }),
2236
+ section.label && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "px-4 pb-1 pt-2 type-secondary font-medium uppercase tracking-wide text-muted-foreground", children: section.label }),
2237
+ visible.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1872
2238
  DrawerEntry,
1873
2239
  {
1874
2240
  entry,
@@ -1902,8 +2268,8 @@ function DrawerEntry({
1902
2268
  disabled ? "opacity-50" : "active:bg-accent",
1903
2269
  destructive && "text-destructive"
1904
2270
  );
1905
- const content = /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
1906
- Icon && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2271
+ const content = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
2272
+ Icon && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1907
2273
  Icon,
1908
2274
  {
1909
2275
  className: cn(
@@ -1912,19 +2278,19 @@ function DrawerEntry({
1912
2278
  )
1913
2279
  }
1914
2280
  ),
1915
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col", children: [
1916
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "truncate text-[15px]", title: entry.description, children: entry.label }),
1917
- disabled && entry.disabledReason ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "truncate type-body text-muted-foreground", children: entry.disabledReason }) : null
2281
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col", children: [
2282
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "truncate text-[15px]", title: entry.description, children: entry.label }),
2283
+ disabled && entry.disabledReason ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "truncate type-body text-muted-foreground", children: entry.disabledReason }) : null
1918
2284
  ] })
1919
2285
  ] });
1920
2286
  if (isSubmenu(entry)) {
1921
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { type: "button", disabled, onClick: onDrill, className: rowClass, children: [
2287
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", disabled, onClick: onDrill, className: rowClass, children: [
1922
2288
  content,
1923
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChevronRightIcon, { className: "h-5 w-5 shrink-0 text-muted-foreground" })
2289
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChevronRightIcon, { className: "h-5 w-5 shrink-0 text-muted-foreground" })
1924
2290
  ] });
1925
2291
  }
1926
2292
  if (isCheckbox(entry)) {
1927
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2293
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1928
2294
  "button",
1929
2295
  {
1930
2296
  type: "button",
@@ -1933,13 +2299,13 @@ function DrawerEntry({
1933
2299
  className: rowClass,
1934
2300
  children: [
1935
2301
  content,
1936
- entry.checked && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CheckIcon, { className: "h-5 w-5 shrink-0 text-primary" })
2302
+ entry.checked && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CheckIcon, { className: "h-5 w-5 shrink-0 text-primary" })
1937
2303
  ]
1938
2304
  }
1939
2305
  );
1940
2306
  }
1941
2307
  if (isLink(entry)) {
1942
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2308
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1943
2309
  "a",
1944
2310
  {
1945
2311
  href: entry.href,
@@ -1951,7 +2317,7 @@ function DrawerEntry({
1951
2317
  }
1952
2318
  );
1953
2319
  }
1954
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2320
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1955
2321
  "button",
1956
2322
  {
1957
2323
  type: "button",
@@ -1967,19 +2333,19 @@ function DrawerEntry({
1967
2333
  }
1968
2334
 
1969
2335
  // src/item/host.tsx
1970
- var React13 = __toESM(require("react"), 1);
1971
- var import_jsx_runtime16 = require("react/jsx-runtime");
2336
+ var React15 = __toESM(require("react"), 1);
2337
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1972
2338
  var HOST_KEY = /* @__PURE__ */ Symbol.for("@ai-matrx/design-system/item-menu-host");
1973
2339
  var hostRegistry2 = globalThis;
1974
- var ItemMenuHostContext = hostRegistry2[HOST_KEY] ?? (hostRegistry2[HOST_KEY] = React13.createContext(null));
2340
+ var ItemMenuHostContext = hostRegistry2[HOST_KEY] ?? (hostRegistry2[HOST_KEY] = React15.createContext(null));
1975
2341
  function ItemMenuHostProvider({
1976
2342
  host,
1977
2343
  children
1978
2344
  }) {
1979
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ItemMenuHostContext.Provider, { value: host, children });
2345
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ItemMenuHostContext.Provider, { value: host, children });
1980
2346
  }
1981
2347
  function useItemMenuHost() {
1982
- return React13.useContext(ItemMenuHostContext);
2348
+ return React15.useContext(ItemMenuHostContext);
1983
2349
  }
1984
2350
 
1985
2351
  // src/item/run-entry.ts
@@ -2008,54 +2374,39 @@ function runToggle(entry, next) {
2008
2374
  }
2009
2375
 
2010
2376
  // src/item/ItemMenu.tsx
2011
- var import_jsx_runtime17 = require("react/jsx-runtime");
2377
+ var import_jsx_runtime19 = require("react/jsx-runtime");
2012
2378
  var dropdownFamily = {
2013
- Item: DropdownMenuItem,
2014
- CheckboxItem: DropdownMenuCheckboxItem,
2015
- Sub: DropdownMenuSub,
2016
- SubTrigger: DropdownMenuSubTrigger,
2017
- SubContent: DropdownMenuSubContent,
2018
- Separator: DropdownMenuSeparator,
2019
- Label: DropdownMenuLabel,
2020
- Shortcut: DropdownMenuShortcut
2379
+ Item: MenuLookItem,
2380
+ CheckboxItem: MenuLookCheckboxItem,
2381
+ Sub: MenuLookSub,
2382
+ SubTrigger: MenuLookSubTrigger,
2383
+ SubContent: MenuLookSubContent,
2384
+ Separator: MenuLookSeparator,
2385
+ Label: MenuLookLabel
2021
2386
  };
2022
2387
  var contextFamily = {
2023
- Item: ContextMenuItem,
2024
- CheckboxItem: ContextMenuCheckboxItem,
2025
- Sub: ContextMenuSub,
2026
- SubTrigger: ContextMenuSubTrigger,
2027
- SubContent: ContextMenuSubContent,
2028
- Separator: ContextMenuSeparator,
2029
- Label: ContextMenuLabel,
2030
- Shortcut: ContextMenuShortcut
2388
+ Item: MenuLookContextItem,
2389
+ CheckboxItem: MenuLookContextCheckboxItem,
2390
+ Sub: MenuLookContextSub,
2391
+ SubTrigger: MenuLookContextSubTrigger,
2392
+ SubContent: MenuLookContextSubContent,
2393
+ Separator: MenuLookContextSeparator,
2394
+ Label: MenuLookContextLabel
2031
2395
  };
2032
- var DESTRUCTIVE_ITEM_CLASS = "text-destructive-ink focus:bg-destructive/10 focus:text-destructive-ink [&_svg]:text-destructive-ink";
2033
- function EntryInner({
2034
- entry,
2035
- Shortcut,
2036
- showShortcut = true
2037
- }) {
2396
+ function entryRow(entry, { showShortcut = true } = {}) {
2038
2397
  const Icon = entry.icon;
2039
- const destructive = isCommand(entry) && entry.tone === "destructive";
2040
- const shortcutText = isCommand(entry) || isCheckbox(entry) ? entry.shortcut ?? entry.shortcutKey?.toUpperCase() : void 0;
2041
- const secondLine = entry.disabled && entry.disabledReason ? entry.disabledReason : void 0;
2042
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
2043
- Icon && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2044
- Icon,
2045
- {
2046
- className: cn(
2047
- "h-4 w-4 shrink-0",
2048
- destructive ? "text-destructive" : entry.iconClassName ?? "text-muted-foreground"
2049
- )
2050
- }
2051
- ),
2052
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col", children: [
2053
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "truncate", title: entry.description, children: entry.label }),
2054
- secondLine && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "truncate type-secondary text-muted-foreground", children: secondLine })
2055
- ] }),
2056
- entry.badge && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ml-2 shrink-0 rounded border border-border px-1.5 py-px type-meta font-medium uppercase tracking-wide text-muted-foreground", children: entry.badge }),
2057
- showShortcut && shortcutText && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Shortcut, { children: shortcutText })
2058
- ] });
2398
+ const shortcut = showShortcut && (isCommand(entry) || isCheckbox(entry)) ? entry.shortcut ?? entry.shortcutKey?.toUpperCase() : void 0;
2399
+ return {
2400
+ // A destructive row's glyph takes the row's danger tone (menu-look.css); others keep their own color.
2401
+ icon: Icon ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { className: isCommand(entry) && entry.tone === "destructive" ? void 0 : entry.iconClassName }) : void 0,
2402
+ label: entry.label,
2403
+ labelTitle: entry.description,
2404
+ // The only second line an entry draws is why it is disabled; `description` is hover text
2405
+ // (Arman, 2026-10-14: no "novels" in menus).
2406
+ description: entry.disabled && entry.disabledReason ? entry.disabledReason : void 0,
2407
+ badge: entry.badge,
2408
+ shortcut
2409
+ };
2059
2410
  }
2060
2411
  function MenuSections({
2061
2412
  family,
@@ -2063,10 +2414,10 @@ function MenuSections({
2063
2414
  onCloseRequest
2064
2415
  }) {
2065
2416
  const visibleSections = sections.map((s) => ({ ...s, items: s.items.filter((e) => !e.hidden) })).filter((s) => s.items.length > 0);
2066
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, { children: visibleSections.map((section, sIdx) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react6.Fragment, { children: [
2067
- sIdx > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(family.Separator, {}),
2068
- section.label && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(family.Label, { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: section.label }),
2069
- section.items.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2417
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children: visibleSections.map((section, sIdx) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react6.Fragment, { children: [
2418
+ sIdx > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(family.Separator, {}),
2419
+ section.label && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(family.Label, { children: section.label }),
2420
+ section.items.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2070
2421
  MenuLeaf,
2071
2422
  {
2072
2423
  family,
@@ -2088,18 +2439,11 @@ function MenuLeaf({
2088
2439
  }) {
2089
2440
  const toastPromise = useItemMenuHost()?.toastPromise;
2090
2441
  if (isSubmenu(entry)) {
2091
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(family.Sub, { children: [
2092
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(family.SubTrigger, { disabled: entry.disabled, className: "gap-2", onPointerLeave: (event) => {
2442
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(family.Sub, { children: [
2443
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(family.SubTrigger, { ...entryRow(entry, { showShortcut: false }), disabled: entry.disabled, onPointerLeave: (event) => {
2093
2444
  if (entry.renderContent && event.relatedTarget instanceof Element && event.relatedTarget.closest("[data-canonical-alchemy-submenu]")) event.preventDefault();
2094
- }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2095
- EntryInner,
2096
- {
2097
- entry,
2098
- Shortcut: family.Shortcut,
2099
- showShortcut: false
2100
- }
2101
- ) }),
2102
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(family.SubContent, { onFocusOutside: keepCanonicalPaletteInteraction, onPointerDownOutside: keepCanonicalPaletteInteraction, className: entry.renderContent ? "p-0 [--radix-popover-content-available-height:var(--radix-dropdown-menu-content-available-height)]" : void 0, children: entry.renderContent ? entry.renderContent(onCloseRequest) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2445
+ } }),
2446
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(family.SubContent, { onFocusOutside: keepCanonicalPaletteInteraction, onPointerDownOutside: keepCanonicalPaletteInteraction, fit: entry.renderContent ? "content" : "menu", children: entry.renderContent ? entry.renderContent(onCloseRequest) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2103
2447
  MenuSections,
2104
2448
  {
2105
2449
  family,
@@ -2110,40 +2454,36 @@ function MenuLeaf({
2110
2454
  ] });
2111
2455
  }
2112
2456
  if (isCheckbox(entry)) {
2113
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2457
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2114
2458
  family.CheckboxItem,
2115
2459
  {
2460
+ ...entryRow(entry),
2116
2461
  checked: entry.checked,
2117
2462
  disabled: entry.disabled,
2118
2463
  onSelect: (e) => e.preventDefault(),
2119
- onCheckedChange: (next) => runToggle(entry, next),
2120
- className: "gap-2",
2121
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(EntryInner, { entry, Shortcut: family.Shortcut })
2464
+ onCheckedChange: (next) => runToggle(entry, next)
2122
2465
  }
2123
2466
  );
2124
2467
  }
2125
2468
  if (isLink(entry)) {
2126
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(family.Item, { asChild: true, disabled: entry.disabled, className: "gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2127
- "a",
2469
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2470
+ family.Item,
2128
2471
  {
2472
+ ...entryRow(entry),
2473
+ disabled: entry.disabled,
2129
2474
  href: entry.href,
2130
2475
  target: entry.target,
2131
- rel: entry.target === "_blank" ? "noopener noreferrer" : void 0,
2132
- onClick: onCloseRequest,
2133
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(EntryInner, { entry, Shortcut: family.Shortcut })
2476
+ linkProps: { onClick: onCloseRequest }
2134
2477
  }
2135
- ) });
2478
+ );
2136
2479
  }
2137
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2480
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2138
2481
  family.Item,
2139
2482
  {
2483
+ ...entryRow(entry),
2140
2484
  disabled: entry.disabled,
2141
- onSelect: () => runCommand(entry, toastPromise),
2142
- className: cn(
2143
- "gap-2",
2144
- entry.tone === "destructive" && DESTRUCTIVE_ITEM_CLASS
2145
- ),
2146
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(EntryInner, { entry, Shortcut: family.Shortcut })
2485
+ destructive: entry.tone === "destructive",
2486
+ onSelect: () => runCommand(entry, toastPromise)
2147
2487
  }
2148
2488
  );
2149
2489
  }
@@ -2168,7 +2508,7 @@ function makeShortcutHandler(config, close, toastPromise) {
2168
2508
  };
2169
2509
  }
2170
2510
  function RowAlchemyIcon(props) {
2171
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, ...props, children: ALCHEMY_GLYPH_PATHS.portal.map((d, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d }, index)) });
2511
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, ...props, children: ALCHEMY_GLYPH_PATHS.portal.map((d, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d }, index)) });
2172
2512
  }
2173
2513
  function hasVisibleEntry(config, id) {
2174
2514
  const entries = config?.sections.flatMap((section) => section.items) ?? [];
@@ -2197,7 +2537,7 @@ function RowAlchemySubmenuContent({ onClose, restoreFocus }) {
2197
2537
  mountMenu?.(target.current, () => closeRef.current(), () => focusRef.current());
2198
2538
  return () => mountMenu?.(null);
2199
2539
  }, [mountMenu]);
2200
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { ref: target, "data-canonical-alchemy-submenu": true, "aria-label": "Alchemy output options", onKeyDown: (event) => {
2540
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { ref: target, "data-canonical-alchemy-submenu": true, "aria-label": "Alchemy output options", onKeyDown: (event) => {
2201
2541
  if (event.key === "Tab") event.stopPropagation();
2202
2542
  } });
2203
2543
  }
@@ -2210,7 +2550,6 @@ function ItemMenu({
2210
2550
  open: openProp,
2211
2551
  onOpenChange,
2212
2552
  onCloseAutoFocus,
2213
- contentMinWidth = "12rem",
2214
2553
  presentation = "auto"
2215
2554
  }) {
2216
2555
  const toastPromise = useItemMenuHost()?.toastPromise;
@@ -2234,7 +2573,7 @@ function ItemMenu({
2234
2573
  icon: RowAlchemyIcon,
2235
2574
  disabled: rowAlchemy.copy.disabled,
2236
2575
  sections: [],
2237
- renderContent: (onClose) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(RowAlchemySubmenuContent, { onClose, restoreFocus: () => (dropdownTriggerRef.current ?? restoreTargetRef.current)?.focus() })
2576
+ renderContent: (onClose) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(RowAlchemySubmenuContent, { onClose, restoreFocus: () => (dropdownTriggerRef.current ?? restoreTargetRef.current)?.focus() })
2238
2577
  } : null;
2239
2578
  const normalSections = baseConfig?.sections.map((section, index) => ({ section, index })).filter(({ section }) => section.id !== "danger" && !containsDestructiveAction(section.items)) ?? [];
2240
2579
  const targetSection = (normalSections.find(({ section }) => !section.label) ?? normalSections[0])?.index;
@@ -2248,20 +2587,6 @@ function ItemMenu({
2248
2587
  ...baseConfig,
2249
2588
  sections: targetSection !== void 0 ? baseConfig.sections.map((section, index) => index === targetSection ? { ...section, items: [...section.items, ...injectedRowItems] } : section) : [{ id: "actions", items: injectedRowItems }, ...baseConfig.sections]
2250
2589
  } : baseConfig;
2251
- const scrollFade = useScrollFade();
2252
- const viewportRef = (0, import_react6.useRef)(null);
2253
- const setViewport = (0, import_react6.useCallback)(
2254
- (node) => {
2255
- viewportRef.current = node;
2256
- scrollFade.ref(node);
2257
- },
2258
- [scrollFade.ref]
2259
- );
2260
- const scrollToEnd = () => {
2261
- const el = viewportRef.current;
2262
- if (!el) return;
2263
- el.scrollTo({ top: el.scrollHeight, behavior: "smooth" });
2264
- };
2265
2590
  const handleOpenChange = (next) => {
2266
2591
  if (!isControlled) setUncontrolledOpen(next);
2267
2592
  onOpenChange?.(next);
@@ -2278,8 +2603,8 @@ function ItemMenu({
2278
2603
  dropdownTriggerRef.current?.focus();
2279
2604
  }, [armed]);
2280
2605
  if (mode === "drawer") {
2281
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
2282
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2606
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
2607
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2283
2608
  import_react_slot4.Slot,
2284
2609
  {
2285
2610
  onClick: (e) => {
@@ -2290,7 +2615,7 @@ function ItemMenu({
2290
2615
  children
2291
2616
  }
2292
2617
  ),
2293
- resolved && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2618
+ resolved && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2294
2619
  ItemMenuDrawer,
2295
2620
  {
2296
2621
  open,
@@ -2303,7 +2628,7 @@ function ItemMenu({
2303
2628
  ] });
2304
2629
  }
2305
2630
  if (!live) {
2306
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2631
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2307
2632
  import_react_slot4.Slot,
2308
2633
  {
2309
2634
  "data-item-menu-trigger": "idle",
@@ -2326,20 +2651,17 @@ function ItemMenu({
2326
2651
  }
2327
2652
  );
2328
2653
  }
2329
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DropdownMenu, { open, onOpenChange: handleOpenChange, modal: false, children: [
2330
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DropdownMenuTrigger, { ref: dropdownTriggerRef, asChild: true, children }),
2331
- resolved && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
2332
- DropdownMenuContent,
2654
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(DropdownMenu, { open, onOpenChange: handleOpenChange, modal: false, children: [
2655
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DropdownMenuTrigger, { ref: dropdownTriggerRef, asChild: true, children }),
2656
+ resolved && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2657
+ MenuLookContent,
2333
2658
  {
2334
2659
  onFocusOutside: keepCanonicalPaletteInteraction,
2335
2660
  onPointerDownOutside: keepCanonicalPaletteInteraction,
2336
2661
  align,
2337
2662
  ...side ? { side } : {},
2338
2663
  collisionPadding: 12,
2339
- className: cn(
2340
- "flex max-h-[var(--radix-dropdown-menu-content-available-height)] flex-col overflow-hidden p-0"
2341
- ),
2342
- style: { minWidth: contentMinWidth },
2664
+ moreBelowLabel: "More actions below",
2343
2665
  ...onCloseAutoFocus ? { onCloseAutoFocus } : {},
2344
2666
  onKeyDown: makeShortcutHandler(
2345
2667
  resolved,
@@ -2347,42 +2669,13 @@ function ItemMenu({
2347
2669
  toastPromise
2348
2670
  ),
2349
2671
  children: [
2350
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
2351
- "div",
2352
- {
2353
- ref: setViewport,
2354
- "data-slot": "item-menu-viewport",
2355
- className: "min-h-0 flex-1 overflow-y-auto overscroll-contain p-1",
2356
- children: [
2357
- resolved.header?.title && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DropdownMenuLabel, { className: "text-xs", children: [
2358
- resolved.header.title,
2359
- resolved.header.description && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "mt-0.5 block type-meta font-normal text-muted-foreground", children: resolved.header.description })
2360
- ] }),
2361
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2362
- MenuSections,
2363
- {
2364
- family: dropdownFamily,
2365
- sections: resolved.sections,
2366
- onCloseRequest: () => handleOpenChange(false)
2367
- }
2368
- )
2369
- ]
2370
- }
2371
- ),
2372
- scrollFade.state.bottom && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
2373
- "button",
2672
+ resolved.header?.title && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MenuLookLabel, { description: resolved.header.description, children: resolved.header.title }),
2673
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2674
+ MenuSections,
2374
2675
  {
2375
- type: "button",
2376
- "data-slot": "item-menu-more-below",
2377
- tabIndex: -1,
2378
- "aria-hidden": "true",
2379
- onPointerDown: (e) => e.preventDefault(),
2380
- onClick: scrollToEnd,
2381
- className: "flex w-full shrink-0 items-center justify-center gap-1 border-t border-border bg-popover px-2 py-1 text-[11px] font-medium text-muted-foreground hover:bg-accent hover:text-accent-foreground",
2382
- children: [
2383
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChevronDownIcon, { className: "h-3 w-3" }),
2384
- "More actions below"
2385
- ]
2676
+ family: dropdownFamily,
2677
+ sections: resolved.sections,
2678
+ onCloseRequest: () => handleOpenChange(false)
2386
2679
  }
2387
2680
  )
2388
2681
  ]
@@ -2393,10 +2686,10 @@ function ItemMenu({
2393
2686
  ItemMenu.routeHeaderMenu = true;
2394
2687
  function ItemContextMenu(props) {
2395
2688
  const host = useItemMenuHost();
2396
- if (props.enabled === false) return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, { children: props.children });
2689
+ if (props.enabled === false) return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children: props.children });
2397
2690
  const HostMenu = host?.ContextMenu;
2398
- if (HostMenu) return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(HostMenu, { ...props });
2399
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DefaultItemContextMenu, { ...props });
2691
+ if (HostMenu) return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(HostMenu, { ...props });
2692
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DefaultItemContextMenu, { ...props });
2400
2693
  }
2401
2694
  function DefaultItemContextMenu({
2402
2695
  config,
@@ -2407,7 +2700,7 @@ function DefaultItemContextMenu({
2407
2700
  }) {
2408
2701
  const [resolved, setResolved] = (0, import_react6.useState)(null);
2409
2702
  const targetRef = (0, import_react6.useRef)(null);
2410
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
2703
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2411
2704
  ContextMenu,
2412
2705
  {
2413
2706
  modal: false,
@@ -2419,7 +2712,7 @@ function DefaultItemContextMenu({
2419
2712
  onOpenChange?.(open);
2420
2713
  },
2421
2714
  children: [
2422
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2715
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2423
2716
  ContextMenuTrigger,
2424
2717
  {
2425
2718
  asChild: true,
@@ -2429,17 +2722,10 @@ function DefaultItemContextMenu({
2429
2722
  children
2430
2723
  }
2431
2724
  ),
2432
- resolved && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
2433
- ContextMenuContent,
2434
- {
2435
- className: "z-[9999] min-w-[12rem]",
2436
- onCloseAutoFocus,
2437
- children: [
2438
- resolved.header?.title && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ContextMenuLabel, { className: "text-xs font-medium text-muted-foreground", children: resolved.header.title }),
2439
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MenuSections, { family: contextFamily, sections: resolved.sections, onCloseRequest: () => onOpenChange?.(false) })
2440
- ]
2441
- }
2442
- )
2725
+ resolved && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(MenuLookContextContent, { onCloseAutoFocus, children: [
2726
+ resolved.header?.title && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MenuLookContextLabel, { description: resolved.header.description, children: resolved.header.title }),
2727
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MenuSections, { family: contextFamily, sections: resolved.sections, onCloseRequest: () => onOpenChange?.(false) })
2728
+ ] })
2443
2729
  ]
2444
2730
  }
2445
2731
  );
@@ -2448,7 +2734,7 @@ declareLazyDataProps(ItemMenu, ["config"]);
2448
2734
  declareLazyDataProps(ItemContextMenu, ["config"]);
2449
2735
 
2450
2736
  // src/item/ItemRow.tsx
2451
- var import_jsx_runtime18 = require("react/jsx-runtime");
2737
+ var import_jsx_runtime20 = require("react/jsx-runtime");
2452
2738
  var SIZE = {
2453
2739
  // A nested sub-row (a conversation's helpers under it in the chat sidebar):
2454
2740
  // finer and quieter than its parent, so a tree reads at a glance.
@@ -2537,7 +2823,7 @@ function ItemRow({
2537
2823
  const startInlineRename = () => {
2538
2824
  if (canRename) setEditing(true);
2539
2825
  };
2540
- const labelNode = editing && rename ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2826
+ const labelNode = editing && rename ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2541
2827
  EditableLabel,
2542
2828
  {
2543
2829
  activation: "controlled",
@@ -2552,17 +2838,17 @@ function ItemRow({
2552
2838
  className: "flex-1",
2553
2839
  inputClassName: cn("font-normal", sz.text)
2554
2840
  }
2555
- ) : subtitle != null ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col", children: [
2556
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: cn("item-fade min-w-0", sz.text), title: label, children: label }),
2557
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "min-w-0 truncate type-secondary text-muted-foreground", "data-item-subtitle": "", children: subtitle })
2558
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: cn("item-fade min-w-0 flex-1", sz.text), title: label, children: label });
2559
- const primaryInner = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
2560
- leading != null && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "flex shrink-0 items-center", children: leading }),
2841
+ ) : subtitle != null ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col", children: [
2842
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: cn("item-fade min-w-0", sz.text), title: label, children: label }),
2843
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "min-w-0 truncate type-secondary text-muted-foreground", "data-item-subtitle": "", children: subtitle })
2844
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: cn("item-fade min-w-0 flex-1", sz.text), title: label, children: label });
2845
+ const primaryInner = /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
2846
+ leading != null && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "flex shrink-0 items-center", children: leading }),
2561
2847
  labelNode,
2562
2848
  secondaryLabel && // Clamped: a secondary value can be a sentence (a lineage edge's
2563
2849
  // "140 cards - 1 section could not be covered …"). Unclamped it pushed
2564
2850
  // the label out of the row (owner, 2026-10-04).
2565
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2851
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2566
2852
  "span",
2567
2853
  {
2568
2854
  className: cn(
@@ -2573,14 +2859,14 @@ function ItemRow({
2573
2859
  children: secondaryLabel
2574
2860
  }
2575
2861
  ),
2576
- (trailing != null || trailingOnHover != null) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "item-shift flex shrink-0 items-center gap-1 pr-0.5", children: [
2862
+ (trailing != null || trailingOnHover != null) && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "item-shift flex shrink-0 items-center gap-1 pr-0.5", children: [
2577
2863
  trailing,
2578
- trailingOnHover != null && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: cn("hidden", REVEAL_DISPLAY), "data-item-trailing-hover": "", children: trailingOnHover })
2864
+ trailingOnHover != null && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: cn("hidden", REVEAL_DISPLAY), "data-item-trailing-hover": "", children: trailingOnHover })
2579
2865
  ] })
2580
2866
  ] });
2581
2867
  const twoLine = subtitle != null && !editing;
2582
2868
  const sideBySide = actions != null || leadingControl != null;
2583
- const disclosureButton = disclosure ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2869
+ const disclosureButton = disclosure ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2584
2870
  Button2,
2585
2871
  {
2586
2872
  type: "button",
@@ -2592,7 +2878,7 @@ function ItemRow({
2592
2878
  e.stopPropagation();
2593
2879
  disclosure.onToggle();
2594
2880
  },
2595
- icon: disclosure.open ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChevronDownIcon, { className: sz.icon }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChevronRightIcon, { className: sz.icon }),
2881
+ icon: disclosure.open ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChevronDownIcon, { className: sz.icon }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChevronRightIcon, { className: sz.icon }),
2596
2882
  className: "shrink-0"
2597
2883
  }
2598
2884
  ) : null;
@@ -2611,11 +2897,11 @@ function ItemRow({
2611
2897
  } : void 0;
2612
2898
  let primary;
2613
2899
  if (editing || disabled) {
2614
- primary = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: primaryClass, style: indentStyle, "data-item-primary": "", children: primaryInner });
2900
+ primary = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: primaryClass, style: indentStyle, "data-item-primary": "", children: primaryInner });
2615
2901
  } else if (href) {
2616
2902
  const RegisteredLink = getTapTargetLinkComponent();
2617
2903
  const Link = RegisteredLink ?? "a";
2618
- primary = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2904
+ primary = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2619
2905
  Link,
2620
2906
  {
2621
2907
  href,
@@ -2637,7 +2923,7 @@ function ItemRow({
2637
2923
  }
2638
2924
  );
2639
2925
  } else {
2640
- primary = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2926
+ primary = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2641
2927
  "button",
2642
2928
  {
2643
2929
  type: "button",
@@ -2654,19 +2940,19 @@ function ItemRow({
2654
2940
  }
2655
2941
  );
2656
2942
  }
2657
- const kebab = mappedMenu && !editing ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2943
+ const kebab = mappedMenu && !editing ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2658
2944
  ItemMenu,
2659
2945
  {
2660
2946
  config: mappedMenu,
2661
2947
  align: "end",
2662
2948
  onCloseAutoFocus: handleCloseAutoFocus,
2663
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2949
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2664
2950
  Button2,
2665
2951
  {
2666
2952
  type: "button",
2667
2953
  variant: "quiet",
2668
2954
  "aria-label": kebabAriaLabel ?? `Options for ${label}`,
2669
- icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MoreHorizontalIcon, { className: sz.icon }),
2955
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MoreHorizontalIcon, { className: sz.icon }),
2670
2956
  "aria-haspopup": "menu",
2671
2957
  onClick: (e) => e.stopPropagation(),
2672
2958
  "data-item-kebab": "",
@@ -2682,7 +2968,7 @@ function ItemRow({
2682
2968
  )
2683
2969
  }
2684
2970
  ) : null;
2685
- const row = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
2971
+ const row = /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
2686
2972
  "div",
2687
2973
  {
2688
2974
  "data-active": active || void 0,
@@ -2695,9 +2981,9 @@ function ItemRow({
2695
2981
  className
2696
2982
  ),
2697
2983
  children: [
2698
- leadingControl != null ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "flex shrink-0 items-center pl-2", "data-item-leading-control": "", children: leadingControl }) : null,
2984
+ leadingControl != null ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "flex shrink-0 items-center pl-2", "data-item-leading-control": "", children: leadingControl }) : null,
2699
2985
  primary,
2700
- !sideBySide && disclosureButton ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2986
+ !sideBySide && disclosureButton ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2701
2987
  "span",
2702
2988
  {
2703
2989
  className: "item-shift absolute inset-y-0 right-1 flex items-center",
@@ -2706,7 +2992,7 @@ function ItemRow({
2706
2992
  }
2707
2993
  ) : null,
2708
2994
  !sideBySide && kebab,
2709
- sideBySide && (actions != null || kebab || disclosureButton) ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
2995
+ sideBySide && (actions != null || kebab || disclosureButton) ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
2710
2996
  "span",
2711
2997
  {
2712
2998
  className: "flex shrink-0 items-center [&>:not(.matrx-tap-target,.matrx-alchemy)]:mx-0.5",
@@ -2722,7 +3008,7 @@ function ItemRow({
2722
3008
  }
2723
3009
  );
2724
3010
  if (!mappedMenu || disableContextMenu) return row;
2725
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3011
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2726
3012
  ItemContextMenu,
2727
3013
  {
2728
3014
  config: mappedMenu,
@@ -2744,13 +3030,13 @@ function ItemRow({
2744
3030
 
2745
3031
  // src/checkbox.tsx
2746
3032
  var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
2747
- var React14 = __toESM(require("react"), 1);
2748
- var import_jsx_runtime19 = require("react/jsx-runtime");
3033
+ var React16 = __toESM(require("react"), 1);
3034
+ var import_jsx_runtime21 = require("react/jsx-runtime");
2749
3035
  var CHECKBOX_SIZES = {
2750
3036
  sm: { root: "h-3.5 w-3.5 rounded-xs", glyph: "h-3 w-3" },
2751
3037
  md: { root: "h-4 w-4 rounded-sm", glyph: "h-3.5 w-3.5" }
2752
3038
  };
2753
- var Checkbox = React14.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3039
+ var Checkbox = React16.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2754
3040
  CheckboxPrimitive.Root,
2755
3041
  {
2756
3042
  ref,
@@ -2761,12 +3047,12 @@ var Checkbox = React14.forwardRef(({ className, size = "md", ...props }, ref) =>
2761
3047
  className
2762
3048
  ),
2763
3049
  ...props,
2764
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3050
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2765
3051
  CheckboxPrimitive.Indicator,
2766
3052
  {
2767
3053
  "data-slot": "checkbox-indicator",
2768
3054
  className: "flex items-center justify-center text-current",
2769
- children: props.checked === "indeterminate" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DividerHorizontalIcon, { className: CHECKBOX_SIZES[size].glyph }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(RadixCheckIcon, { className: CHECKBOX_SIZES[size].glyph })
3055
+ children: props.checked === "indeterminate" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DividerHorizontalIcon, { className: CHECKBOX_SIZES[size].glyph }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(RadixCheckIcon, { className: CHECKBOX_SIZES[size].glyph })
2770
3056
  }
2771
3057
  )
2772
3058
  }
@@ -2777,46 +3063,46 @@ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
2777
3063
  var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"), 1);
2778
3064
  var VisuallyHidden = __toESM(require("@radix-ui/react-visually-hidden"), 1);
2779
3065
  var import_react_tree2 = require("@ai-matrx/kit/react-tree");
2780
- var React17 = __toESM(require("react"), 1);
3066
+ var React19 = __toESM(require("react"), 1);
2781
3067
 
2782
3068
  // src/close-slot.tsx
2783
3069
  var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
2784
- var React15 = __toESM(require("react"), 1);
2785
- var import_jsx_runtime20 = require("react/jsx-runtime");
3070
+ var React17 = __toESM(require("react"), 1);
3071
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2786
3072
  var CLOSE_CONTROL_CLASSES = "flex h-11 w-11 shrink-0 items-center justify-center rounded-sm text-muted-foreground ring-offset-background transition-colors hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none lg:h-8 lg:w-8";
2787
3073
  function CloseControl({ className }) {
2788
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(DialogPrimitive.Close, { "data-slot": "dialog-close", "aria-label": "Close", className: cn(CLOSE_CONTROL_CLASSES, className), children: [
2789
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(XIcon, { className: "h-4 w-4", "aria-hidden": "true" }),
2790
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "sr-only", children: "Close" })
3074
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(DialogPrimitive.Close, { "data-slot": "dialog-close", "aria-label": "Close", className: cn(CLOSE_CONTROL_CLASSES, className), children: [
3075
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(XIcon, { className: "h-4 w-4", "aria-hidden": "true" }),
3076
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "sr-only", children: "Close" })
2791
3077
  ] });
2792
3078
  }
2793
- var CloseSlotContext = React15.createContext(null);
2794
- var SearchRowCloseSlotContext = React15.createContext(null);
3079
+ var CloseSlotContext = React17.createContext(null);
3080
+ var SearchRowCloseSlotContext = React17.createContext(null);
2795
3081
  function useCloseSlot(enabled) {
2796
- const [claims, setClaims] = React15.useState([]);
3082
+ const [claims, setClaims] = React17.useState([]);
2797
3083
  const owner = claims[0] ?? null;
2798
- const claim = React15.useCallback((id) => {
3084
+ const claim = React17.useCallback((id) => {
2799
3085
  setClaims((list) => [...list, id]);
2800
3086
  return () => setClaims((list) => list.filter((c) => c !== id));
2801
3087
  }, []);
2802
- const slot = React15.useMemo(() => enabled ? { claim, owner } : null, [enabled, claim, owner]);
3088
+ const slot = React17.useMemo(() => enabled ? { claim, owner } : null, [enabled, claim, owner]);
2803
3089
  return { slot, claimed: owner !== null };
2804
3090
  }
2805
3091
  var CloseSlotProvider = CloseSlotContext.Provider;
2806
3092
  var SearchRowCloseSlotProvider = SearchRowCloseSlotContext.Provider;
2807
3093
  function useClaim(context, declined) {
2808
- const slot = React15.useContext(context);
2809
- const id = React15.useId();
3094
+ const slot = React17.useContext(context);
3095
+ const id = React17.useId();
2810
3096
  const claim = slot?.claim;
2811
3097
  const wants = claim !== void 0 && !declined;
2812
- React15.useLayoutEffect(() => wants && claim ? claim(id) : void 0, [wants, claim, id]);
3098
+ React17.useLayoutEffect(() => wants && claim ? claim(id) : void 0, [wants, claim, id]);
2813
3099
  return wants && slot?.owner === id;
2814
3100
  }
2815
3101
  function useCloseSlotClaim(declined = false) {
2816
3102
  return useClaim(CloseSlotContext, declined);
2817
3103
  }
2818
3104
  function CloseRow({ className }) {
2819
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { "data-slot": "close-row", className: cn("flex justify-end", className), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CloseControl, {}) });
3105
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { "data-slot": "close-row", className: cn("flex justify-end", className), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CloseControl, {}) });
2820
3106
  }
2821
3107
  var BODY_LAYOUT = /^!?(?:[a-z0-9]+:)*(?:flex|grid|flex-(?:row|col)(?:-reverse)?|grid-(?:cols|rows|flow)-\S+|place-\S+|items-\S+|justify-\S+|content-\S+|gap(?:-[xy])?-\S+|space-[xy]-\S+|text-(?:left|center|right|start|end)|flex-wrap|flex-nowrap)$/;
2822
3108
  var OLD_CLOSE_RESERVE = /^pr-(?:8|9|10|11|12|14|16)$/;
@@ -2839,24 +3125,24 @@ function HeaderWithClose({
2839
3125
  }) {
2840
3126
  const owns = useCloseSlotClaim(/(?:^|\s)(?:sr-only|hidden)(?:\s|$)/.test(className ?? ""));
2841
3127
  if (!owns) {
2842
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { "data-slot": slotName, className: cn(baseClassName, className), ...props, children });
3128
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { "data-slot": slotName, className: cn(baseClassName, className), ...props, children });
2843
3129
  }
2844
3130
  const { row, body } = splitHeaderClasses(className);
2845
3131
  const rowish = /(?:^|\s)(?:[a-z0-9]+:)*flex-row(?:\s|$)/.test(body);
2846
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { "data-slot": slotName, "data-has-close": "", className: cn("flex gap-2", rowish ? "items-center" : "items-start", row), ...props, children: [
2847
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { "data-slot": `${slotName}-body`, className: cn("min-w-0 flex-1", baseClassName, body), children }),
2848
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CloseControl, { className: cn("-mr-2", !rowish && closeOffsetClassName) })
3132
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { "data-slot": slotName, "data-has-close": "", className: cn("flex gap-2", rowish ? "items-center" : "items-start", row), ...props, children: [
3133
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { "data-slot": `${slotName}-body`, className: cn("min-w-0 flex-1", baseClassName, body), children }),
3134
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CloseControl, { className: cn("-mr-2", !rowish && closeOffsetClassName) })
2849
3135
  ] });
2850
3136
  }
2851
3137
 
2852
3138
  // src/look.tsx
2853
- var React16 = __toESM(require("react"), 1);
2854
- var import_jsx_runtime21 = require("react/jsx-runtime");
3139
+ var React18 = __toESM(require("react"), 1);
3140
+ var import_jsx_runtime23 = require("react/jsx-runtime");
2855
3141
  var CONTEXT_SLOT3 = /* @__PURE__ */ Symbol.for("ai-matrx.design-system.look-context");
2856
3142
  var registry2 = globalThis;
2857
- var LookContext = registry2[CONTEXT_SLOT3] ??= React16.createContext("web");
3143
+ var LookContext = registry2[CONTEXT_SLOT3] ??= React18.createContext("web");
2858
3144
  function useLook() {
2859
- return React16.useContext(LookContext);
3145
+ return React18.useContext(LookContext);
2860
3146
  }
2861
3147
 
2862
3148
  // src/use-is-mobile.ts
@@ -3110,8 +3396,8 @@ function useDragMove(options) {
3110
3396
  }
3111
3397
 
3112
3398
  // src/dialog.tsx
3113
- var import_jsx_runtime22 = require("react/jsx-runtime");
3114
- var DialogWindowedByDefaultContext = React17.createContext(false);
3399
+ var import_jsx_runtime24 = require("react/jsx-runtime");
3400
+ var DialogWindowedByDefaultContext = React19.createContext(false);
3115
3401
  var Dialog = ({
3116
3402
  children,
3117
3403
  ...props
@@ -3119,7 +3405,7 @@ var Dialog = ({
3119
3405
  const isMobile = (0, import_media_query3.useIsMobile)();
3120
3406
  const desktopLook = useLook() === "desktop";
3121
3407
  const modal = desktopLook || (props.modal ?? isMobile);
3122
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DialogWindowedByDefaultContext.Provider, { value: !desktopLook && props.modal === void 0, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DialogPrimitive2.Root, { ...props, modal, children }) }) });
3408
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogWindowedByDefaultContext.Provider, { value: !desktopLook && props.modal === void 0, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogPrimitive2.Root, { ...props, modal, children }) }) });
3123
3409
  };
3124
3410
  Dialog.displayName = "Dialog";
3125
3411
  var DialogPortal = ({
@@ -3127,13 +3413,13 @@ var DialogPortal = ({
3127
3413
  ...props
3128
3414
  }) => {
3129
3415
  const resolved = usePortalContainer(container);
3130
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DialogPrimitive2.Portal, { container: resolved ?? null, ...props });
3416
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogPrimitive2.Portal, { container: resolved ?? null, ...props });
3131
3417
  };
3132
3418
  DialogPortal.displayName = "DialogPortal";
3133
3419
  var CONTEXT_SLOT4 = /* @__PURE__ */ Symbol.for("ai-matrx.design-system.dialog-container-context");
3134
3420
  var contextRegistry3 = globalThis;
3135
- var DialogContainerContext = contextRegistry3[CONTEXT_SLOT4] ??= React17.createContext(null);
3136
- var DialogOverlay = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3421
+ var DialogContainerContext = contextRegistry3[CONTEXT_SLOT4] ??= React19.createContext(null);
3422
+ var DialogOverlay = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3137
3423
  DialogPrimitive2.Overlay,
3138
3424
  {
3139
3425
  ref,
@@ -3149,10 +3435,10 @@ var DialogOverlay = React17.forwardRef(({ className, ...props }, ref) => /* @__P
3149
3435
  }
3150
3436
  ));
3151
3437
  DialogOverlay.displayName = DialogPrimitive2.Overlay.displayName;
3152
- var DialogContentPrimitive = React17.forwardRef(({ onInteractOutside, onCloseAutoFocus, ...props }, ref) => {
3438
+ var DialogContentPrimitive = React19.forwardRef(({ onInteractOutside, onCloseAutoFocus, ...props }, ref) => {
3153
3439
  const isModal = useRadixDialogModal();
3154
3440
  useModalLayer(isModal);
3155
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3441
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3156
3442
  DialogPrimitive2.Content,
3157
3443
  {
3158
3444
  ...props,
@@ -3167,7 +3453,7 @@ DialogContentPrimitive.displayName = "DialogContentPrimitive";
3167
3453
  var DIALOG_DESKTOP_CLASSES = "matrx-dialog-card fixed inset-0 z-[10000] m-auto grid h-fit min-w-0 w-full max-w-lg gap-4 max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full sm:rounded-lg";
3168
3454
  var DIALOG_MOBILE_SHEET_CLASSES = "matrx-mobile-sheet matrx-dialog-card fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] gap-4 [--dialog-pad:1rem] overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain";
3169
3455
  var DIALOG_MOBILE_SHEET_OVERRIDE = "inset-x-0 bottom-0 left-0 right-0 top-auto translate-none w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto";
3170
- var DialogWindowHandleContext = React17.createContext(null);
3456
+ var DialogWindowHandleContext = React19.createContext(null);
3171
3457
  var WINDOW_KEEP_VISIBLE = 80;
3172
3458
  var DIALOG_SIZE_CLASS = {
3173
3459
  sm: "max-w-md",
@@ -3178,7 +3464,7 @@ var DIALOG_SIZE_CLASS = {
3178
3464
  full: "max-w-[calc(100vw-2rem)]",
3179
3465
  screen: "max-w-none w-screen h-dvh max-h-none rounded-none sm:rounded-none"
3180
3466
  };
3181
- var DialogContent = React17.forwardRef(
3467
+ var DialogContent = React19.forwardRef(
3182
3468
  ({
3183
3469
  className,
3184
3470
  children,
@@ -3203,13 +3489,13 @@ var DialogContent = React17.forwardRef(
3203
3489
  const desktopLook = useLook() === "desktop";
3204
3490
  const asSheet = mobileSheet && isMobile && !desktopLook;
3205
3491
  const windowed = !isModal && !asSheet;
3206
- const windowedByDefault = React17.useContext(DialogWindowedByDefaultContext);
3207
- const [containerEl, setContainerEl] = React17.useState(
3492
+ const windowedByDefault = React19.useContext(DialogWindowedByDefaultContext);
3493
+ const [containerEl, setContainerEl] = React19.useState(
3208
3494
  null
3209
3495
  );
3210
3496
  const stacks = windowed && windowedByDefault;
3211
- const [behind, setBehind] = React17.useState(false);
3212
- React17.useEffect(() => {
3497
+ const [behind, setBehind] = React19.useState(false);
3498
+ React19.useEffect(() => {
3213
3499
  if (!stacks || !containerEl) return;
3214
3500
  const onFront = (event) => {
3215
3501
  const element = event.detail?.element ?? null;
@@ -3225,7 +3511,7 @@ var DialogContent = React17.forwardRef(
3225
3511
  setBehind(false);
3226
3512
  announceLayerFront(containerEl);
3227
3513
  };
3228
- const [offset, setOffset] = React17.useState({ x: 0, y: 0 });
3514
+ const [offset, setOffset] = React19.useState({ x: 0, y: 0 });
3229
3515
  const drag = useDragMove({
3230
3516
  element: containerEl,
3231
3517
  enabled: windowed,
@@ -3234,11 +3520,11 @@ var DialogContent = React17.forwardRef(
3234
3520
  constrain: (next) => clampRectToViewport(next, readViewport(), { keepVisible: WINDOW_KEEP_VISIBLE }),
3235
3521
  onCommit: (_rect, commit) => setOffset(commit.offset)
3236
3522
  });
3237
- const handle = React17.useMemo(
3523
+ const handle = React19.useMemo(
3238
3524
  () => windowed ? { onPointerDown: drag.onPointerDown, onDoubleClick: () => setOffset({ x: 0, y: 0 }) } : null,
3239
3525
  [windowed, drag.onPointerDown]
3240
3526
  );
3241
- const mergedRef = React17.useCallback(
3527
+ const mergedRef = React19.useCallback(
3242
3528
  (node) => {
3243
3529
  setContainerEl(node);
3244
3530
  if (typeof ref === "function") ref(node);
@@ -3250,9 +3536,9 @@ var DialogContent = React17.forwardRef(
3250
3536
  const closeSlot = useCloseSlot(showCloseButton && !desktopLook);
3251
3537
  const hasTitle = (0, import_react_tree2.treeContainsComponent)(children, DialogTitle) || (0, import_react_tree2.treeContainsComponent)(children, DialogPrimitive2.Title);
3252
3538
  const hasDescription = (0, import_react_tree2.treeContainsComponent)(children, DialogDescription) || (0, import_react_tree2.treeContainsComponent)(children, DialogPrimitive2.Description);
3253
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(DialogPortal, { container, children: [
3254
- isModal ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DialogOverlay, {}) : null,
3255
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3539
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DialogPortal, { container, children: [
3540
+ isModal ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogOverlay, {}) : null,
3541
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
3256
3542
  DialogContentPrimitive,
3257
3543
  {
3258
3544
  ref: mergedRef,
@@ -3303,9 +3589,9 @@ var DialogContent = React17.forwardRef(
3303
3589
  ...hasDescription ? {} : { "aria-describedby": void 0 },
3304
3590
  ...props,
3305
3591
  children: [
3306
- hasTitle ? null : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(VisuallyHidden.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DialogPrimitive2.Title, { children: "Dialog" }) }),
3307
- closeSlot.slot && !closeSlot.claimed ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CloseRow, {}) : null,
3308
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CloseSlotProvider, { value: closeSlot.slot, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DialogContainerContext.Provider, { value: containerEl, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DialogWindowHandleContext.Provider, { value: handle, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3592
+ hasTitle ? null : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(VisuallyHidden.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogPrimitive2.Title, { children: "Dialog" }) }),
3593
+ closeSlot.slot && !closeSlot.claimed ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CloseRow, {}) : null,
3594
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CloseSlotProvider, { value: closeSlot.slot, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogContainerContext.Provider, { value: containerEl, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogWindowHandleContext.Provider, { value: handle, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3309
3595
  PortalContainerProvider,
3310
3596
  {
3311
3597
  container: containerEl ?? injectedContainer ?? null,
@@ -3323,8 +3609,8 @@ var DialogHeader = ({
3323
3609
  className,
3324
3610
  ...props
3325
3611
  }) => {
3326
- const handle = React17.useContext(DialogWindowHandleContext);
3327
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3612
+ const handle = React19.useContext(DialogWindowHandleContext);
3613
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3328
3614
  HeaderWithClose,
3329
3615
  {
3330
3616
  slotName: "dialog-header",
@@ -3344,7 +3630,7 @@ DialogHeader.displayName = "DialogHeader";
3344
3630
  var DialogFooter = ({
3345
3631
  className,
3346
3632
  ...props
3347
- }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3633
+ }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3348
3634
  "div",
3349
3635
  {
3350
3636
  "data-slot": "dialog-footer",
@@ -3378,7 +3664,7 @@ var DialogFooter = ({
3378
3664
  }
3379
3665
  );
3380
3666
  DialogFooter.displayName = "DialogFooter";
3381
- var DialogTitle = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3667
+ var DialogTitle = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3382
3668
  DialogPrimitive2.Title,
3383
3669
  {
3384
3670
  ref,
@@ -3388,7 +3674,7 @@ var DialogTitle = React17.forwardRef(({ className, ...props }, ref) => /* @__PUR
3388
3674
  }
3389
3675
  ));
3390
3676
  DialogTitle.displayName = DialogPrimitive2.Title.displayName;
3391
- var DialogDescription = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3677
+ var DialogDescription = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3392
3678
  DialogPrimitive2.Description,
3393
3679
  {
3394
3680
  ref,
@@ -3400,8 +3686,8 @@ var DialogDescription = React17.forwardRef(({ className, ...props }, ref) => /*
3400
3686
  DialogDescription.displayName = DialogPrimitive2.Description.displayName;
3401
3687
 
3402
3688
  // src/input.tsx
3403
- var React18 = __toESM(require("react"), 1);
3404
- var import_jsx_runtime23 = require("react/jsx-runtime");
3689
+ var React20 = __toESM(require("react"), 1);
3690
+ var import_jsx_runtime25 = require("react/jsx-runtime");
3405
3691
  var getVariantStyles = (variant = "default") => {
3406
3692
  const baseStyles = `flex h-10 w-full ${FIELD_SURFACE_CLASS} text-foreground shadow-input rounded-md px-3 py-2 text-sm file:border-0 file:bg-transparent
3407
3693
  file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground
@@ -3429,9 +3715,9 @@ var getVariantStyles = (variant = "default") => {
3429
3715
  return baseStyles;
3430
3716
  }
3431
3717
  };
3432
- var Input = React18.forwardRef(
3718
+ var Input = React20.forwardRef(
3433
3719
  ({ className, type, variant = "default", ...props }, ref) => {
3434
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3720
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3435
3721
  "input",
3436
3722
  {
3437
3723
  type,
@@ -3443,7 +3729,7 @@ var Input = React18.forwardRef(
3443
3729
  }
3444
3730
  );
3445
3731
  Input.displayName = "Input";
3446
- var EnterInput = React18.forwardRef(
3732
+ var EnterInput = React20.forwardRef(
3447
3733
  ({ onEnter, ...props }, ref) => {
3448
3734
  const handleKeyDown = (e) => {
3449
3735
  if (e.key === "Enter" && onEnter) {
@@ -3451,7 +3737,7 @@ var EnterInput = React18.forwardRef(
3451
3737
  onEnter();
3452
3738
  }
3453
3739
  };
3454
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3740
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3455
3741
  Input,
3456
3742
  {
3457
3743
  ...props,
@@ -3467,11 +3753,11 @@ var EnterInput = React18.forwardRef(
3467
3753
  }
3468
3754
  );
3469
3755
  EnterInput.displayName = "EnterInput";
3470
- var BasicInput = React18.forwardRef(
3756
+ var BasicInput = React20.forwardRef(
3471
3757
  // `variant` is accepted (prop-compatible with Input) but intentionally
3472
3758
  // unused — and destructured so it never leaks onto the DOM element.
3473
3759
  ({ className, type, variant: _variant = "default", ...props }, ref) => {
3474
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3760
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3475
3761
  "input",
3476
3762
  {
3477
3763
  type,
@@ -3486,10 +3772,10 @@ var BasicInput = React18.forwardRef(
3486
3772
  }
3487
3773
  );
3488
3774
  BasicInput.displayName = "BasicInput";
3489
- var InputWithPrefix = React18.forwardRef(({ prefix, prefixInset = "default", className, wrapperClassName, ...props }, ref) => {
3775
+ var InputWithPrefix = React20.forwardRef(({ prefix, prefixInset = "default", className, wrapperClassName, ...props }, ref) => {
3490
3776
  const edge = prefixInset === "edge";
3491
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: cn("relative", wrapperClassName), children: [
3492
- prefix && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3777
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: cn("relative", wrapperClassName), children: [
3778
+ prefix && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3493
3779
  "div",
3494
3780
  {
3495
3781
  className: cn(
@@ -3500,7 +3786,7 @@ var InputWithPrefix = React18.forwardRef(({ prefix, prefixInset = "default", cla
3500
3786
  children: prefix
3501
3787
  }
3502
3788
  ),
3503
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3789
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3504
3790
  Input,
3505
3791
  {
3506
3792
  ref,
@@ -3513,7 +3799,7 @@ var InputWithPrefix = React18.forwardRef(({ prefix, prefixInset = "default", cla
3513
3799
  InputWithPrefix.displayName = "InputWithPrefix";
3514
3800
 
3515
3801
  // src/item/ProductSidebarTop.tsx
3516
- var import_jsx_runtime24 = require("react/jsx-runtime");
3802
+ var import_jsx_runtime26 = require("react/jsx-runtime");
3517
3803
  function splitSidebarPlaces(places, chosen) {
3518
3804
  const byId = new Map(places.map((p) => [p.id, p]));
3519
3805
  const above = chosen.map((id) => byId.get(id)).filter((p) => p != null);
@@ -3542,15 +3828,15 @@ function ProductSidebarTop({
3542
3828
  search.onChange("");
3543
3829
  }
3544
3830
  };
3545
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { "data-product-sidebar-top": "", className: cn("flex shrink-0 flex-col gap-1 px-2 pb-1 pt-2", className), children: [
3831
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { "data-product-sidebar-top": "", className: cn("flex shrink-0 flex-col gap-1 px-2 pb-1 pt-2", className), children: [
3546
3832
  status,
3547
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-col", children: [
3548
- newItem ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3833
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col", children: [
3834
+ newItem ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3549
3835
  ItemRow,
3550
3836
  {
3551
3837
  size: "sm",
3552
3838
  label: newItem.label ?? "New",
3553
- leading: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(PlusIcon, { className: "size-4" }),
3839
+ leading: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(PlusIcon, { className: "size-4" }),
3554
3840
  href: newItem.href,
3555
3841
  openInPlace: newItem.href ? true : void 0,
3556
3842
  onOpen: newItem.onOpen,
@@ -3558,37 +3844,37 @@ function ProductSidebarTop({
3558
3844
  disableContextMenu: true
3559
3845
  }
3560
3846
  ) : null,
3561
- above.map((p) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(PlaceRow, { place: p, onOpen: onOpenPlace ? open : void 0, sourceFeature, chevron: true }, p.id)),
3562
- more.length > 0 || groups.length > 0 || onEditSidebar ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DropdownMenu, { children: [
3563
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { "data-sidebar-more-trigger": "", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3847
+ above.map((p) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(PlaceRow, { place: p, onOpen: onOpenPlace ? open : void 0, sourceFeature, chevron: true }, p.id)),
3848
+ more.length > 0 || groups.length > 0 || onEditSidebar ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DropdownMenu, { children: [
3849
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { "data-sidebar-more-trigger": "", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3564
3850
  ItemRow,
3565
3851
  {
3566
3852
  size: "sm",
3567
3853
  label: "More",
3568
- leading: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MoreHorizontalIcon, { className: "size-4" }),
3854
+ leading: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MoreHorizontalIcon, { className: "size-4" }),
3569
3855
  sourceFeature,
3570
3856
  disableContextMenu: true
3571
3857
  }
3572
3858
  ) }) }),
3573
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DropdownMenuContent, { align: "start", className: "w-56", children: [
3574
- more.map((p) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(PlaceMenuItem, { place: p, onOpen: open }, p.id)),
3575
- groups.map((g, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { role: "group", "aria-label": g.label, children: [
3576
- more.length > 0 || i > 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenuSeparator, {}) : null,
3577
- g.label ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenuLabel, { children: g.label }) : null,
3578
- g.places.map((p) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(PlaceMenuItem, { place: p, onOpen: open }, p.id))
3859
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(MenuLookContent, { align: "start", "data-sidebar-more-menu": "", children: [
3860
+ more.map((p) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(PlaceMenuItem, { place: p, onOpen: open }, p.id)),
3861
+ groups.map((g, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { role: "group", "aria-label": g.label, children: [
3862
+ more.length > 0 || i > 0 ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MenuLookSeparator, {}) : null,
3863
+ g.label ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MenuLookLabel, { children: g.label }) : null,
3864
+ g.places.map((p) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(PlaceMenuItem, { place: p, onOpen: open }, p.id))
3579
3865
  ] }, g.id)),
3580
- onEditSidebar ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
3581
- more.length > 0 || groups.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenuSeparator, {}) : null,
3582
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenuItem, { onSelect: onEditSidebar, children: "Edit sidebar\u2026" })
3866
+ onEditSidebar ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
3867
+ more.length > 0 || groups.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MenuLookSeparator, {}) : null,
3868
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MenuLookItem, { icon: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(PanelLeftIcon, {}), label: "Edit sidebar\u2026", onSelect: onEditSidebar })
3583
3869
  ] }) : null
3584
3870
  ] })
3585
3871
  ] }) : null
3586
3872
  ] }),
3587
3873
  children,
3588
- search ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3874
+ search ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3589
3875
  InputWithPrefix,
3590
3876
  {
3591
- prefix: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SearchIcon, { className: "size-4" }),
3877
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SearchIcon, { className: "size-4" }),
3592
3878
  prefixInset: "edge",
3593
3879
  value: search.value,
3594
3880
  onChange: (e) => search.onChange(e.target.value),
@@ -3609,29 +3895,29 @@ function PlaceRow({
3609
3895
  chevron
3610
3896
  }) {
3611
3897
  const Icon = place.icon;
3612
- const trailing = chevron ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChevronRightIcon, { className: "size-4 text-muted-foreground" }) : void 0;
3898
+ const trailing = chevron ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChevronRightIcon, { className: "size-4 text-muted-foreground" }) : void 0;
3613
3899
  if (place.children && place.children.length > 0) {
3614
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DropdownMenu, { children: [
3615
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { "data-sidebar-place": place.id, "data-sidebar-place-flyout": "", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3900
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DropdownMenu, { children: [
3901
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { "data-sidebar-place": place.id, "data-sidebar-place-flyout": "", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3616
3902
  ItemRow,
3617
3903
  {
3618
3904
  size: "sm",
3619
3905
  label: place.label,
3620
- leading: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { className: "size-4" }),
3906
+ leading: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { className: "size-4" }),
3621
3907
  trailing,
3622
3908
  sourceFeature,
3623
3909
  disableContextMenu: true
3624
3910
  }
3625
3911
  ) }) }),
3626
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenuContent, { side: "right", align: "start", className: "w-56", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FlyoutItems, { place, onOpen: (p) => onOpen ? onOpen(p) : goTo(p) }) })
3912
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MenuLookContent, { side: "right", align: "start", "data-sidebar-place-menu": place.id, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FlyoutItems, { place, onOpen: (p) => onOpen ? onOpen(p) : goTo(p) }) })
3627
3913
  ] });
3628
3914
  }
3629
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { "data-sidebar-place": place.id, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3915
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { "data-sidebar-place": place.id, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3630
3916
  ItemRow,
3631
3917
  {
3632
3918
  size: "sm",
3633
3919
  label: place.label,
3634
- leading: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { className: "size-4" }),
3920
+ leading: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { className: "size-4" }),
3635
3921
  trailing,
3636
3922
  href: place.href,
3637
3923
  openInPlace: place.href && onOpen ? true : void 0,
@@ -3643,38 +3929,26 @@ function PlaceRow({
3643
3929
  }
3644
3930
  function FlyoutItems({ place, onOpen }) {
3645
3931
  const Icon = place.icon;
3646
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
3647
- place.href ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
3648
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DropdownMenuItem, { onSelect: () => onOpen({ ...place, children: void 0 }), children: [
3649
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { className: "size-4" }),
3650
- place.label
3651
- ] }),
3652
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenuSeparator, {})
3932
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
3933
+ place.href ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
3934
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MenuLookItem, { icon: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, {}), label: place.label, onSelect: () => onOpen({ ...place, children: void 0 }) }),
3935
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MenuLookSeparator, {})
3653
3936
  ] }) : null,
3654
3937
  (place.children ?? []).map((c) => {
3655
3938
  const CIcon = c.icon;
3656
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DropdownMenuItem, { onSelect: () => onOpen(c), children: [
3657
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CIcon, { className: "size-4" }),
3658
- c.label
3659
- ] }, c.id);
3939
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MenuLookItem, { icon: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CIcon, {}), label: c.label, onSelect: () => onOpen(c) }, c.id);
3660
3940
  })
3661
3941
  ] });
3662
3942
  }
3663
3943
  function PlaceMenuItem({ place, onOpen }) {
3664
3944
  const Icon = place.icon;
3665
3945
  if (place.children && place.children.length > 0) {
3666
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DropdownMenuSub, { children: [
3667
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DropdownMenuSubTrigger, { children: [
3668
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { className: "size-4" }),
3669
- place.label
3670
- ] }),
3671
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenuSubContent, { className: "w-56", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FlyoutItems, { place, onOpen }) })
3946
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(MenuLookSub, { children: [
3947
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MenuLookSubTrigger, { icon: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, {}), label: place.label, "data-sidebar-more-place": place.id }),
3948
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MenuLookSubContent, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FlyoutItems, { place, onOpen }) })
3672
3949
  ] });
3673
3950
  }
3674
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DropdownMenuItem, { onSelect: () => onOpen(place), children: [
3675
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { className: "size-4" }),
3676
- place.label
3677
- ] });
3951
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MenuLookItem, { icon: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, {}), label: place.label, onSelect: () => onOpen(place), "data-sidebar-more-place": place.id });
3678
3952
  }
3679
3953
  function goTo(place) {
3680
3954
  if (place.href && typeof window !== "undefined") window.location.assign(place.href);
@@ -3686,14 +3960,14 @@ function SidebarPlacesChooser({
3686
3960
  title = "Above More"
3687
3961
  }) {
3688
3962
  const flip = (id) => onChange(places.filter((p) => p.id === id ? !chosen.includes(id) : chosen.includes(p.id)).map((p) => p.id));
3689
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("section", { className: "flex flex-col gap-1", "data-sidebar-places-chooser": "", children: [
3690
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-sm font-medium text-foreground", children: title }),
3963
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("section", { className: "flex flex-col gap-1", "data-sidebar-places-chooser": "", children: [
3964
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-sm font-medium text-foreground", children: title }),
3691
3965
  places.map((p) => {
3692
3966
  const Icon = p.icon;
3693
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { className: "flex h-8 cursor-pointer items-center gap-2 rounded-md px-1 text-sm hover:bg-muted", children: [
3694
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Checkbox, { size: "sm", checked: chosen.includes(p.id), onCheckedChange: () => flip(p.id) }),
3695
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { className: "size-4 text-muted-foreground" }),
3696
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-foreground", children: p.label })
3967
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { className: "flex h-8 cursor-pointer items-center gap-2 rounded-md px-1 text-sm hover:bg-muted", children: [
3968
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Checkbox, { size: "sm", checked: chosen.includes(p.id), onCheckedChange: () => flip(p.id) }),
3969
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { className: "size-4 text-muted-foreground" }),
3970
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-foreground", children: p.label })
3697
3971
  ] }, p.id);
3698
3972
  })
3699
3973
  ] });
@@ -3706,15 +3980,15 @@ function SidebarEditDialog({
3706
3980
  saveLabel = "Save as my default",
3707
3981
  children
3708
3982
  }) {
3709
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DialogContent, { size: "sm", onOpenAutoFocus: (e) => e.preventDefault(), children: [
3710
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogTitle, { children: "Edit sidebar" }) }),
3711
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-col gap-4", children: [
3983
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DialogContent, { size: "sm", onOpenAutoFocus: (e) => e.preventDefault(), children: [
3984
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogTitle, { children: "Edit sidebar" }) }),
3985
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col gap-4", children: [
3712
3986
  children,
3713
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-5 truncate text-sm text-destructive", role: "status", children: refusal ?? "" })
3987
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "h-5 truncate text-sm text-destructive", role: "status", children: refusal ?? "" })
3714
3988
  ] }),
3715
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DialogFooter, { children: [
3716
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Button, { variant: "ghost", onClick: () => onOpenChange(false), children: "Cancel" }),
3717
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Button, { onClick: onSave, children: saveLabel })
3989
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DialogFooter, { children: [
3990
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Button, { variant: "ghost", onClick: () => onOpenChange(false), children: "Cancel" }),
3991
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Button, { onClick: onSave, children: saveLabel })
3718
3992
  ] })
3719
3993
  ] }) });
3720
3994
  }