@nadicodeai/ui 12.1.19 → 12.1.21

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 (42) hide show
  1. package/dist/components/command.js +1 -1
  2. package/dist/components/context-menu.d.ts +14 -22
  3. package/dist/components/context-menu.d.ts.map +1 -1
  4. package/dist/components/context-menu.js +29 -26
  5. package/dist/components/dialog.d.ts +8 -1
  6. package/dist/components/dialog.d.ts.map +1 -1
  7. package/dist/components/dialog.js +15 -6
  8. package/dist/components/disclosure.d.ts +17 -0
  9. package/dist/components/disclosure.d.ts.map +1 -0
  10. package/dist/components/disclosure.js +14 -0
  11. package/dist/components/drawer.d.ts +6 -1
  12. package/dist/components/drawer.d.ts.map +1 -1
  13. package/dist/components/drawer.js +8 -1
  14. package/dist/components/dropdown-menu.d.ts.map +1 -1
  15. package/dist/components/dropdown-menu.js +2 -1
  16. package/dist/components/file-diff.d.ts +12 -0
  17. package/dist/components/file-diff.d.ts.map +1 -0
  18. package/dist/components/file-diff.js +19 -0
  19. package/dist/components/settings-section.d.ts.map +1 -1
  20. package/dist/components/settings-section.js +3 -2
  21. package/dist/components/table-card.d.ts +13 -0
  22. package/dist/components/table-card.d.ts.map +1 -0
  23. package/dist/components/table-card.js +10 -0
  24. package/dist/components/table-layouts.d.ts +6 -0
  25. package/dist/components/table-layouts.d.ts.map +1 -1
  26. package/dist/components/table-layouts.js +6 -0
  27. package/dist/eslint/index.js +3 -0
  28. package/dist/eslint/rules/no-native-visible-control.js +6 -3
  29. package/dist/eslint/rules/overlay-body-owns-scroll.js +62 -0
  30. package/dist/index.d.ts +3 -0
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +3 -0
  33. package/dist/internal/footer-strip.d.ts +12 -0
  34. package/dist/internal/footer-strip.d.ts.map +1 -0
  35. package/dist/internal/footer-strip.js +13 -0
  36. package/dist/internal/menu-surface.d.ts +6 -0
  37. package/dist/internal/menu-surface.d.ts.map +1 -0
  38. package/dist/internal/menu-surface.js +5 -0
  39. package/dist/lib/line-diff.d.ts +15 -0
  40. package/dist/lib/line-diff.d.ts.map +1 -0
  41. package/dist/lib/line-diff.js +136 -0
  42. package/package.json +2 -2
@@ -27,7 +27,7 @@ function CommandSeparator({ className, ...props }) {
27
27
  return (_jsx(CommandPrimitive.Separator, { "data-slot": "command-separator", className: cn("-mx-1 h-px bg-border", className), ...props }));
28
28
  }
29
29
  function CommandItem({ className, children, ...props }) {
30
- return (_jsxs(CommandPrimitive.Item, { "data-slot": "command-item", className: cn("group/command-item relative flex min-h-touch-target cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground", className), ...props, children: [children, _jsx(CheckIcon, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })] }));
30
+ return (_jsxs(CommandPrimitive.Item, { "data-slot": "command-item", className: cn("group/command-item relative flex min-h-touch-target cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-muted data-[selected=true]:text-foreground [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[selected=true]:*:[svg]:text-foreground", className), ...props, children: [children, _jsx(CheckIcon, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })] }));
31
31
  }
32
32
  function CommandShortcut({ className, ...props }) {
33
33
  return (_jsx("span", { "data-slot": "command-shortcut", className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground", className), ...props }));
@@ -1,30 +1,22 @@
1
1
  import * as React from "react";
2
2
  import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
3
+ import { DropdownMenuCheckboxItem, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger } from "./dropdown-menu.js";
3
4
  declare function ContextMenu({ ...props }: ContextMenuPrimitive.Root.Props): React.JSX.Element;
4
5
  declare function ContextMenuPortal({ ...props }: ContextMenuPrimitive.Portal.Props): React.JSX.Element;
5
6
  declare function ContextMenuTrigger({ className, ...props }: ContextMenuPrimitive.Trigger.Props): React.JSX.Element;
6
- declare function ContextMenuContent({ className, align, alignOffset, side, sideOffset, ...props }: ContextMenuPrimitive.Popup.Props & Pick<ContextMenuPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React.JSX.Element;
7
- declare function ContextMenuGroup({ ...props }: ContextMenuPrimitive.Group.Props): React.JSX.Element;
8
- declare function ContextMenuLabel({ className, inset, ...props }: ContextMenuPrimitive.GroupLabel.Props & {
9
- inset?: boolean;
7
+ declare function ContextMenuContent({ className, align, alignOffset, density, side, sideOffset, ...props }: ContextMenuPrimitive.Popup.Props & Pick<ContextMenuPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset"> & {
8
+ density?: "compact" | "comfortable";
10
9
  }): React.JSX.Element;
11
- declare function ContextMenuItem({ className, inset, variant, ...props }: ContextMenuPrimitive.Item.Props & {
12
- inset?: boolean;
13
- variant?: "default" | "destructive";
14
- }): React.JSX.Element;
15
- declare function ContextMenuSub({ ...props }: ContextMenuPrimitive.SubmenuRoot.Props): React.JSX.Element;
16
- declare function ContextMenuSubTrigger({ className, inset, children, ...props }: ContextMenuPrimitive.SubmenuTrigger.Props & {
17
- inset?: boolean;
18
- }): React.JSX.Element;
19
- declare function ContextMenuSubContent({ ...props }: React.ComponentProps<typeof ContextMenuContent>): React.JSX.Element;
20
- declare function ContextMenuCheckboxItem({ className, children, checked, inset, ...props }: ContextMenuPrimitive.CheckboxItem.Props & {
21
- inset?: boolean;
22
- }): React.JSX.Element;
23
- declare function ContextMenuRadioGroup({ ...props }: ContextMenuPrimitive.RadioGroup.Props): React.JSX.Element;
24
- declare function ContextMenuRadioItem({ className, children, inset, ...props }: ContextMenuPrimitive.RadioItem.Props & {
25
- inset?: boolean;
26
- }): React.JSX.Element;
27
- declare function ContextMenuSeparator({ className, ...props }: ContextMenuPrimitive.Separator.Props): React.JSX.Element;
28
- declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
10
+ declare function ContextMenuGroup(props: React.ComponentProps<typeof DropdownMenuGroup>): React.JSX.Element;
11
+ declare function ContextMenuLabel(props: React.ComponentProps<typeof DropdownMenuLabel>): React.JSX.Element;
12
+ declare function ContextMenuItem(props: React.ComponentProps<typeof DropdownMenuItem>): React.JSX.Element;
13
+ declare function ContextMenuSub(props: React.ComponentProps<typeof DropdownMenuSub>): React.JSX.Element;
14
+ declare function ContextMenuSubTrigger(props: React.ComponentProps<typeof DropdownMenuSubTrigger>): React.JSX.Element;
15
+ declare function ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuContent>): React.JSX.Element;
16
+ declare function ContextMenuCheckboxItem(props: React.ComponentProps<typeof DropdownMenuCheckboxItem>): React.JSX.Element;
17
+ declare function ContextMenuRadioGroup(props: React.ComponentProps<typeof DropdownMenuRadioGroup>): React.JSX.Element;
18
+ declare function ContextMenuRadioItem(props: React.ComponentProps<typeof DropdownMenuRadioItem>): React.JSX.Element;
19
+ declare function ContextMenuSeparator(props: React.ComponentProps<typeof DropdownMenuSeparator>): React.JSX.Element;
20
+ declare function ContextMenuShortcut(props: React.ComponentProps<typeof DropdownMenuShortcut>): React.JSX.Element;
29
21
  export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
30
22
  //# sourceMappingURL=context-menu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../src/components/context-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAMlF,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAAK,qBAEjE;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,MAAM,CAAC,KAAK,qBAEzE;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,OAAO,CAAC,KAAK,qBAQtF;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,KAAe,EACf,WAAe,EACf,IAAc,EACd,UAAc,EACd,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,GACjC,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,YAAY,CAAC,qBAsB7F;AAED,iBAAS,gBAAgB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,qBAEvE;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,UAAU,CAAC,KAAK,GAAG;IACzC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,qBAYA;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,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AAc,CAAC,MAAM,CAAC,qBAWjF;AAED,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACtB,CAAC"}
1
+ {"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../src/components/context-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAKlF,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AAKpC,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAAK,qBAEjE;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,MAAM,CAAC,KAAK,qBAEzE;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,OAAO,CAAC,KAAK,qBAQtF;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,KAAe,EACf,WAAe,EACf,OAAuB,EACvB,IAAc,EACd,UAAc,EACd,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,GACjC,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,YAAY,CAAC,GAAG;IAC7F,OAAO,CAAC,EAAE,SAAS,GAA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BAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACtB,CAAC"}
@@ -1,9 +1,12 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
4
4
  import { cn } from "../lib/utils.js";
5
5
  import { anchoredOverlayMotion } from "../lib/motion.js";
6
- import { ChevronRightIcon, CheckIcon } from "lucide-react";
6
+ import { menuSurface } from "../internal/menu-surface.js";
7
+ import { DropdownMenuCheckboxItem, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, } from "./dropdown-menu.js";
8
+ // A context menu's items are Base UI's menu items, so every part below the popup is the dropdown's own: the two
9
+ // menus cannot drift apart in their rows, only in how they open.
7
10
  function ContextMenu({ ...props }) {
8
11
  return _jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
9
12
  }
@@ -13,40 +16,40 @@ function ContextMenuPortal({ ...props }) {
13
16
  function ContextMenuTrigger({ className, ...props }) {
14
17
  return (_jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", className: cn("select-none", className), ...props }));
15
18
  }
16
- function ContextMenuContent({ className, align = "start", alignOffset = 4, side = "right", sideOffset = 0, ...props }) {
17
- return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(ContextMenuPrimitive.Popup, { "data-slot": "context-menu-content", className: cn("z-50 max-h-(--available-height) min-w-36 overflow-x-hidden overflow-y-auto rounded-md border-0 nc-glass p-nadicode-xxs text-popover-foreground nc-elevation-floating outline-none data-closed:overflow-hidden", anchoredOverlayMotion, className), ...props }) }) }));
19
+ function ContextMenuContent({ className, align = "start", alignOffset = 4, density = "comfortable", side = "right", sideOffset = 0, ...props }) {
20
+ return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, collisionPadding: 8, children: _jsx(ContextMenuPrimitive.Popup, { "data-slot": "context-menu-content", "data-density": density, className: cn(menuSurface, anchoredOverlayMotion, className), ...props }) }) }));
18
21
  }
19
- function ContextMenuGroup({ ...props }) {
20
- return _jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props });
22
+ function ContextMenuGroup(props) {
23
+ return _jsx(DropdownMenuGroup, { "data-slot": "context-menu-group", ...props });
21
24
  }
22
- function ContextMenuLabel({ className, inset, ...props }) {
23
- return (_jsx(ContextMenuPrimitive.GroupLabel, { "data-slot": "context-menu-label", "data-inset": inset, className: cn("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", className), ...props }));
25
+ function ContextMenuLabel(props) {
26
+ return _jsx(DropdownMenuLabel, { "data-slot": "context-menu-label", ...props });
24
27
  }
25
- function ContextMenuItem({ className, inset, variant = "default", ...props }) {
26
- return (_jsx(ContextMenuPrimitive.Item, { "data-slot": "context-menu-item", "data-inset": inset, "data-variant": variant, className: cn("group/context-menu-item relative flex min-h-touch-target cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive-soft-foreground data-[variant=destructive]:focus:bg-destructive-soft data-[variant=destructive]:focus:text-destructive-soft-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive-soft-foreground", className), ...props }));
28
+ function ContextMenuItem(props) {
29
+ return _jsx(DropdownMenuItem, { "data-slot": "context-menu-item", ...props });
27
30
  }
28
- function ContextMenuSub({ ...props }) {
29
- return _jsx(ContextMenuPrimitive.SubmenuRoot, { "data-slot": "context-menu-sub", ...props });
31
+ function ContextMenuSub(props) {
32
+ return _jsx(DropdownMenuSub, { "data-slot": "context-menu-sub", ...props });
30
33
  }
31
- function ContextMenuSubTrigger({ className, inset, children, ...props }) {
32
- return (_jsxs(ContextMenuPrimitive.SubmenuTrigger, { "data-slot": "context-menu-sub-trigger", "data-inset": inset, className: cn("flex min-h-touch-target cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto" })] }));
34
+ function ContextMenuSubTrigger(props) {
35
+ return _jsx(DropdownMenuSubTrigger, { "data-slot": "context-menu-sub-trigger", ...props });
33
36
  }
34
- function ContextMenuSubContent({ ...props }) {
35
- return (_jsx(ContextMenuContent, { "data-slot": "context-menu-sub-content", className: "min-w-24", side: "right", ...props }));
37
+ function ContextMenuSubContent({ className, ...props }) {
38
+ return (_jsx(ContextMenuContent, { "data-slot": "context-menu-sub-content", className: cn("w-auto min-w-24", className), side: "right", ...props }));
36
39
  }
37
- function ContextMenuCheckboxItem({ className, children, checked, inset, ...props }) {
38
- return (_jsxs(ContextMenuPrimitive.CheckboxItem, { "data-slot": "context-menu-checkbox-item", "data-inset": inset, className: cn("relative flex min-h-touch-target cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute right-2", children: _jsx(ContextMenuPrimitive.CheckboxItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
40
+ function ContextMenuCheckboxItem(props) {
41
+ return _jsx(DropdownMenuCheckboxItem, { "data-slot": "context-menu-checkbox-item", ...props });
39
42
  }
40
- function ContextMenuRadioGroup({ ...props }) {
41
- return _jsx(ContextMenuPrimitive.RadioGroup, { "data-slot": "context-menu-radio-group", ...props });
43
+ function ContextMenuRadioGroup(props) {
44
+ return _jsx(DropdownMenuRadioGroup, { "data-slot": "context-menu-radio-group", ...props });
42
45
  }
43
- function ContextMenuRadioItem({ className, children, inset, ...props }) {
44
- return (_jsxs(ContextMenuPrimitive.RadioItem, { "data-slot": "context-menu-radio-item", "data-inset": inset, className: cn("relative flex min-h-touch-target cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute right-2", children: _jsx(ContextMenuPrimitive.RadioItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
46
+ function ContextMenuRadioItem(props) {
47
+ return _jsx(DropdownMenuRadioItem, { "data-slot": "context-menu-radio-item", ...props });
45
48
  }
46
- function ContextMenuSeparator({ className, ...props }) {
47
- return (_jsx(ContextMenuPrimitive.Separator, { "data-slot": "context-menu-separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
49
+ function ContextMenuSeparator(props) {
50
+ return _jsx(DropdownMenuSeparator, { "data-slot": "context-menu-separator", ...props });
48
51
  }
49
- function ContextMenuShortcut({ className, ...props }) {
50
- return (_jsx("span", { "data-slot": "context-menu-shortcut", className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground", className), ...props }));
52
+ function ContextMenuShortcut(props) {
53
+ return _jsx(DropdownMenuShortcut, { "data-slot": "context-menu-shortcut", ...props });
51
54
  }
52
55
  export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
@@ -16,6 +16,13 @@ type DialogContentProps = DialogPrimitive.Popup.Props & {
16
16
  };
17
17
  declare function DialogContent({ className, children, showCloseButton, closeLabel, motion, ...props }: DialogContentProps): React.JSX.Element;
18
18
  declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
19
+ /**
20
+ * The part of a dialog that scrolls, between a header and a footer that stay
21
+ * in place, so the actions remain reachable on a short viewport. The inline
22
+ * padding is cancelled by the negative margin so a field's focus outline at the
23
+ * edge is not clipped by the scroll container.
24
+ */
25
+ declare function DialogBody({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
19
26
  type DialogFooterProps = React.ComponentProps<"div"> & {
20
27
  showCloseButton?: boolean;
21
28
  closeLabel?: React.ReactNode;
@@ -23,5 +30,5 @@ type DialogFooterProps = React.ComponentProps<"div"> & {
23
30
  declare function DialogFooter({ className, showCloseButton, closeLabel, children, ...props }: DialogFooterProps): React.JSX.Element;
24
31
  declare function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props): React.JSX.Element;
25
32
  declare function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props): React.JSX.Element;
26
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
33
+ export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, Dialog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CAAC,KAAK,qBAQxE;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,WAAW,CAAC,KAAK,qBAWpF;AAED,OAAO,EACL,MAAM,EACN,UAAU,EACV,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC"}
@@ -23,16 +23,25 @@ function DialogContent({ className, children, showCloseButton = true, closeLabel
23
23
  return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, { motion: motion }), _jsxs(DialogPrimitive.Popup, { "data-slot": "dialog-content", className: cn(
24
24
  // A dialog never grows past the viewport: it stops one margin short of
25
25
  // both edges and scrolls what does not fit. A dialog that wants a
26
- // fixed header and footer keeps this scroll and gives its own body
27
- // `min-h-0 flex-1 overflow-y-auto`, which leaves nothing here to
28
- // scroll. It must not clip this popup with `overflow-hidden`: that
29
- // hides Base UI's trailing focus guard, and Tab then walks out of the
30
- // dialog into the page behind it.
26
+ // fixed header and footer puts its content in `DialogBody`, which
27
+ // then owns the scroll and leaves nothing here to scroll. It must not
28
+ // clip this popup with `overflow-hidden`: that hides Base UI's
29
+ // trailing focus guard, and Tab then walks out of the dialog into the
30
+ // page behind it.
31
31
  "fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100svh-var(--nc-xl))] w-full max-w-[calc(100%-var(--nc-xl))] -translate-x-1/2 -translate-y-1/2 flex-col gap-nadicode-md overflow-y-auto rounded-md border-0 bg-popover p-nadicode-lg text-sm text-popover-foreground nc-elevation-modal outline-none sm:max-w-sm", motion === "instant" ? instantModalOverlayMotion : modalOverlayMotion, className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-nadicode-md right-nadicode-md", size: "icon-sm" }), children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: closeLabel })] }))] })] }));
32
32
  }
33
33
  function DialogHeader({ className, ...props }) {
34
34
  return (_jsx("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2", className), ...props }));
35
35
  }
36
+ /**
37
+ * The part of a dialog that scrolls, between a header and a footer that stay
38
+ * in place, so the actions remain reachable on a short viewport. The inline
39
+ * padding is cancelled by the negative margin so a field's focus outline at the
40
+ * edge is not clipped by the scroll container.
41
+ */
42
+ function DialogBody({ className, ...props }) {
43
+ return (_jsx("div", { "data-slot": "dialog-body", className: cn("-mx-nadicode-xxs flex min-h-0 flex-1 flex-col gap-nadicode-md overflow-y-auto px-nadicode-xxs", className), ...props }));
44
+ }
36
45
  function DialogFooter({ className, showCloseButton = false, closeLabel = "Close", children, ...props }) {
37
46
  return (_jsxs("div", { "data-slot": "dialog-footer", className: cn("-mx-nadicode-lg -mb-nadicode-lg flex flex-col-reverse gap-2 p-nadicode-md sm:flex-row sm:justify-end", className), ...props, children: [children, showCloseButton && (_jsx(DialogPrimitive.Close, { render: _jsx(Button, { variant: "outline" }), children: closeLabel }))] }));
38
47
  }
@@ -42,4 +51,4 @@ function DialogTitle({ className, ...props }) {
42
51
  function DialogDescription({ className, ...props }) {
43
52
  return (_jsx(DialogPrimitive.Description, { "data-slot": "dialog-description", className: cn("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className), ...props }));
44
53
  }
45
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
54
+ export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -0,0 +1,17 @@
1
+ import type { ReactNode } from "react";
2
+ interface DisclosureProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ defaultOpen?: boolean;
6
+ label: ReactNode;
7
+ }
8
+ /**
9
+ * Supporting detail a person opens on demand, such as other download formats
10
+ * or a checksum. It is the native `<details>` element, so it opens without
11
+ * JavaScript, renders on the server, and is announced as a disclosure; the
12
+ * closed label names what is inside, because a closed disclosure must still say
13
+ * what it holds (DESIGN.md "Page compositions").
14
+ */
15
+ declare function Disclosure({ children, className, defaultOpen, label }: DisclosureProps): import("react").JSX.Element;
16
+ export { Disclosure };
17
+ //# sourceMappingURL=disclosure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disclosure.d.ts","sourceRoot":"","sources":["../../src/components/disclosure.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,UAAU,eAAe;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,SAAS,CAAC;CAClB;AAED;;;;;;GAMG;AACH,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,eAAe,+BAsB/E;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ChevronRightIcon } from "lucide-react";
3
+ import { cn } from "../lib/utils.js";
4
+ /**
5
+ * Supporting detail a person opens on demand, such as other download formats
6
+ * or a checksum. It is the native `<details>` element, so it opens without
7
+ * JavaScript, renders on the server, and is announced as a disclosure; the
8
+ * closed label names what is inside, because a closed disclosure must still say
9
+ * what it holds (DESIGN.md "Page compositions").
10
+ */
11
+ function Disclosure({ children, className, defaultOpen, label }) {
12
+ return (_jsxs("details", { className: cn("group/disclosure", className), "data-slot": "disclosure", open: defaultOpen, children: [_jsxs("summary", { className: "nc-transition-paint flex min-h-6 w-fit cursor-pointer list-none items-center gap-1 text-sm font-medium text-muted-foreground underline-offset-4 hover:text-foreground hover:underline [&::-webkit-details-marker]:hidden", "data-slot": "disclosure-trigger", children: [_jsx(ChevronRightIcon, { "aria-hidden": "true", className: "nc-transition-transform size-4 shrink-0 group-open/disclosure:rotate-90" }), label] }), _jsx("div", { className: "flex flex-col gap-nadicode-sm pt-nadicode-xs", "data-slot": "disclosure-content", children: children })] }));
13
+ }
14
+ export { Disclosure };
@@ -10,8 +10,13 @@ declare function DrawerOverlay({ className, ...props }: DrawerPrimitive.Backdrop
10
10
  declare function DrawerSwipeHandle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
11
  declare function DrawerContent({ className, children, ...props }: DrawerPrimitive.Popup.Props): React.JSX.Element;
12
12
  declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
13
+ /**
14
+ * The part of a drawer that scrolls, between its header and footer, which stay
15
+ * in place so the actions remain reachable.
16
+ */
17
+ declare function DrawerBody({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
13
18
  declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
14
19
  declare function DrawerTitle({ className, ...props }: DrawerPrimitive.Title.Props): React.JSX.Element;
15
20
  declare function DrawerDescription({ className, ...props }: DrawerPrimitive.Description.Props): React.JSX.Element;
16
- export { Drawer, DrawerPortal, DrawerOverlay, DrawerSwipeHandle, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
21
+ export { Drawer, DrawerPortal, DrawerOverlay, DrawerSwipeHandle, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerBody, DrawerFooter, DrawerTitle, DrawerDescription, };
17
22
  //# sourceMappingURL=drawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/components/drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAuBlE,iBAAS,MAAM,CAAC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BAWzE;AAED;;;GAGG;AACH,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQzE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBAQxE;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,WAAW,CAAC,KAAK,qBAQpF;AAED,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,aAAa,EACb,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
@@ -63,6 +63,13 @@ function DrawerContent({ className, children, ...props }) {
63
63
  function DrawerHeader({ className, ...props }) {
64
64
  return (_jsx("div", { "data-slot": "drawer-header", className: cn("flex shrink-0 flex-col gap-0.5 p-nadicode-lg pb-0 group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-0.5 md:text-left", className), ...props }));
65
65
  }
66
+ /**
67
+ * The part of a drawer that scrolls, between its header and footer, which stay
68
+ * in place so the actions remain reachable.
69
+ */
70
+ function DrawerBody({ className, ...props }) {
71
+ return (_jsx("div", { "data-slot": "drawer-body", className: cn("flex min-h-0 flex-1 flex-col gap-nadicode-md overflow-y-auto p-nadicode-lg", className), ...props }));
72
+ }
66
73
  function DrawerFooter({ className, ...props }) {
67
74
  return (_jsx("div", { "data-slot": "drawer-footer", className: cn("mt-auto flex shrink-0 flex-col gap-2 p-nadicode-lg pt-0", className), ...props }));
68
75
  }
@@ -72,4 +79,4 @@ function DrawerTitle({ className, ...props }) {
72
79
  function DrawerDescription({ className, ...props }) {
73
80
  return (_jsx(DrawerPrimitive.Description, { "data-slot": "drawer-description", className: cn("text-sm text-balance text-muted-foreground", className), ...props }));
74
81
  }
75
- export { Drawer, DrawerPortal, DrawerOverlay, DrawerSwipeHandle, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
82
+ export { Drawer, DrawerPortal, DrawerOverlay, DrawerSwipeHandle, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerBody, DrawerFooter, DrawerTitle, DrawerDescription, };
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../src/components/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAM5D,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,CAAC,IAAI,CAAC,KAAK,qBAE3D;AAED,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,qBAEnE;AAED,iBAAS,mBAAmB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,CAAC,OAAO,CAAC,KAAK,qBAErE;AAED,iBAAS,mBAAmB,CAAC,EAC3B,KAAe,EACf,WAAe,EACf,OAAuB,EACvB,IAAe,EACf,UAAc,EACd,SAAS,EACT,GAAG,KAAK,EACT,EAAE,aAAa,CAAC,KAAK,CAAC,KAAK,GAC1B,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,YAAY,CAAC,GAAG;IACtF,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;CACrC,qBAwBF;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,CAAC,KAAK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AAgB,EAChB,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,GACvB,CAAC"}
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Menu as MenuPrimitive } from "@base-ui/react/menu";
3
3
  import { cn } from "../lib/utils.js";
4
4
  import { anchoredOverlayMotion } from "../lib/motion.js";
5
+ import { menuSurface } from "../internal/menu-surface.js";
5
6
  import { ChevronRightIcon, CheckIcon } from "lucide-react";
6
7
  function DropdownMenu({ ...props }) {
7
8
  return _jsx(MenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
@@ -13,7 +14,7 @@ function DropdownMenuTrigger({ ...props }) {
13
14
  return _jsx(MenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
14
15
  }
15
16
  function DropdownMenuContent({ align = "start", alignOffset = 0, density = "comfortable", side = "bottom", sideOffset = 6, className, ...props }) {
16
- return (_jsx(MenuPrimitive.Portal, { children: _jsx(MenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, collisionPadding: 8, children: _jsx(MenuPrimitive.Popup, { "data-slot": "dropdown-menu-content", "data-density": density, className: cn("group/menu z-50 max-h-(--available-height) w-max min-w-[min(14rem,var(--available-width))] max-w-(--available-width) overflow-x-hidden overflow-y-auto rounded-md border-0 bg-popover p-nadicode-xxs text-popover-foreground nc-elevation-floating outline-none data-closed:overflow-hidden", anchoredOverlayMotion, className), ...props }) }) }));
17
+ return (_jsx(MenuPrimitive.Portal, { children: _jsx(MenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, collisionPadding: 8, children: _jsx(MenuPrimitive.Popup, { "data-slot": "dropdown-menu-content", "data-density": density, className: cn(menuSurface, anchoredOverlayMotion, className), ...props }) }) }));
17
18
  }
18
19
  function DropdownMenuGroup({ ...props }) {
19
20
  return _jsx(MenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
@@ -0,0 +1,12 @@
1
+ interface FileDiffProps extends Omit<React.ComponentProps<"div">, "children"> {
2
+ addedLabel?: string;
3
+ after: string;
4
+ before: string;
5
+ /** Unchanged lines kept on each side of a change; the rest fold into one marker. */
6
+ context?: number;
7
+ removedLabel?: string;
8
+ skippedLabel?: (count: number) => string;
9
+ }
10
+ declare function FileDiff({ addedLabel, after, before, className, context, removedLabel, skippedLabel, ...props }: FileDiffProps): import("react").JSX.Element;
11
+ export { FileDiff };
12
+ //# sourceMappingURL=file-diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-diff.d.ts","sourceRoot":"","sources":["../../src/components/file-diff.tsx"],"names":[],"mappings":"AAKA,UAAU,aAAc,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC1C;AAcD,iBAAS,QAAQ,CAAC,EAChB,UAAoB,EACpB,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAW,EACX,YAAwB,EACxB,YAAoD,EACpD,GAAG,KAAK,EACT,EAAE,aAAa,+BAkCf;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo } from "react";
3
+ import { lineDiff } from "../lib/line-diff.js";
4
+ import { cn } from "../lib/utils.js";
5
+ const ROW = {
6
+ added: "bg-success-soft text-success-soft-foreground",
7
+ context: "text-muted-foreground",
8
+ removed: "bg-destructive-soft text-destructive-soft-foreground",
9
+ };
10
+ const MARK = {
11
+ added: "+",
12
+ context: "",
13
+ removed: "−",
14
+ };
15
+ function FileDiff({ addedLabel = "Added", after, before, className, context = 3, removedLabel = "Removed", skippedLabel = (count) => `${count} unchanged lines`, ...props }) {
16
+ const diff = useMemo(() => lineDiff(before, after, context), [after, before, context]);
17
+ return (_jsx("div", { className: cn("overflow-hidden rounded-md border border-border bg-recessed font-mono text-xs leading-5", className), "data-slot": "file-diff", ...props, children: diff.lines.map((line, index) => line.kind === "skipped" ? (_jsx("div", { className: "px-2.5 py-0.5 text-muted-foreground select-none", children: `… ${skippedLabel(line.count)}` }, index)) : (_jsxs("div", { className: cn("grid grid-cols-[1.25rem_minmax(0,1fr)] pr-2.5", ROW[line.kind]), "data-kind": line.kind, children: [_jsx("span", { "aria-hidden": "true", className: "text-center select-none", children: MARK[line.kind] }), line.kind !== "context" ? (_jsx("span", { className: "sr-only", children: line.kind === "added" ? addedLabel : removedLabel })) : null, _jsx("span", { className: "break-words whitespace-pre-wrap", children: line.text || " " })] }, index))) }));
18
+ }
19
+ export { FileDiff };
@@ -1 +1 @@
1
- {"version":3,"file":"settings-section.d.ts","sourceRoot":"","sources":["../../src/components/settings-section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAQL,KAAK,WAAW,EACjB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EACL,KAAK,EAMN,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,CAAC,EAAE,IAAI,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,iBAAS,eAAe,C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;AAED,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"settings-section.d.ts","sourceRoot":"","sources":["../../src/components/settings-section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAOL,KAAK,WAAW,EACjB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EACL,KAAK,EAMN,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,CAAC,EAAE,IAAI,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,iBAAS,eAAe,CAAC,EACvB,KAAK,EACL,WAAW,EACX,OAAO,EACP,MAAM,EACN,UAAU,EACV,QAAQ,EACR,SAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,GAAG;IAClD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,qBA6BA;AAED,iBAAS,aAAa,CAAC,EACrB,EAAE,EACF,KAAK,EACL,WAAW,EACX,KAAK,EACL,OAAwB,EACxB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACxD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,YAAY,EAAE,yBAAyB,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IAClF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,qBAsCA;AAED,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC"}
@@ -1,10 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { cn } from "../lib/utils.js";
3
- import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "./card.js";
3
+ import { FooterStrip } from "../internal/footer-strip.js";
4
+ import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle, } from "./card.js";
4
5
  import { Separator } from "./separator.js";
5
6
  import { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, } from "./field.js";
6
7
  function SettingsSection({ title, description, actions, footer, footerHint, children, className, surface = "resting", ...props }) {
7
- return (_jsxs(Card, { render: _jsx("section", { ...props, "data-slot": "settings-section" }), surface: surface, className: cn("min-w-0", className), children: [(title || description || actions) && (_jsxs(_Fragment, { children: [_jsxs(CardHeader, { children: [title && (_jsx(CardTitle, { children: _jsx("h2", { children: title }) })), description && _jsx(CardDescription, { children: description }), actions && _jsx(CardAction, { children: actions })] }), _jsx(Separator, {})] })), _jsx(CardContent, { children: _jsx(FieldGroup, { "data-slot": "settings-section-fields", children: children }) }), (footer || footerHint) && (_jsxs(CardFooter, { className: "mx-px mb-px flex-wrap gap-3 rounded-b-[calc(var(--radius-md)-1px)] border-t border-border bg-recessed py-3", children: [footerHint && (_jsx("div", { "data-slot": "settings-section-hint", className: "min-w-0 flex-1 text-muted-foreground", children: footerHint })), footer && _jsx("div", { className: "ml-auto flex flex-wrap items-center gap-3", children: footer })] }))] }));
8
+ return (_jsxs(Card, { render: _jsx("section", { ...props, "data-slot": "settings-section" }), surface: surface, className: cn("min-w-0", className), children: [(title || description || actions) && (_jsxs(_Fragment, { children: [_jsxs(CardHeader, { children: [title && (_jsx(CardTitle, { children: _jsx("h2", { children: title }) })), description && _jsx(CardDescription, { children: description }), actions && _jsx(CardAction, { children: actions })] }), _jsx(Separator, {})] })), _jsx(CardContent, { children: _jsx(FieldGroup, { "data-slot": "settings-section-fields", children: children }) }), _jsx(FooterStrip, { hint: footerHint, hintSlot: "settings-section-hint", children: footer })] }));
8
9
  }
9
10
  function SettingsField({ id, label, description, error, invalid = Boolean(error), disabled, required, children, className, contentClassName, controlClassName, ...props }) {
10
11
  const descriptionId = description ? `${id}-description` : undefined;
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ import { type CardSurface } from "./card.js";
3
+ /** The Portal's registry tables draw the same frame. */
4
+ declare function TableCard({ title, description, actions, footer, footerHint, children, className, surface, ...props }: Omit<React.ComponentProps<"section">, "title"> & {
5
+ title?: React.ReactNode;
6
+ description?: React.ReactNode;
7
+ actions?: React.ReactNode;
8
+ footer?: React.ReactNode;
9
+ footerHint?: React.ReactNode;
10
+ surface?: CardSurface;
11
+ }): React.JSX.Element;
12
+ export { TableCard };
13
+ //# sourceMappingURL=table-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-card.d.ts","sourceRoot":"","sources":["../../src/components/table-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAA4D,KAAK,WAAW,EAAE,MAAM,QAAQ,CAAC;AAGpG,wDAAwD;AACxD,iBAAS,SAAS,CAAC,EACjB,KAAK,EACL,WAAW,EACX,OAAO,EACP,MAAM,EACN,UAAU,EACV,QAAQ,EACR,SAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,GAAG;IAClD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,qBA6BA;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { cn } from "../lib/utils.js";
3
+ import { FooterStrip } from "../internal/footer-strip.js";
4
+ import { Card, CardAction, CardDescription, CardHeader, CardTitle } from "./card.js";
5
+ import { Separator } from "./separator.js";
6
+ /** The Portal's registry tables draw the same frame. */
7
+ function TableCard({ title, description, actions, footer, footerHint, children, className, surface = "resting", ...props }) {
8
+ return (_jsxs(Card, { render: _jsx("section", { ...props, "data-slot": "table-card" }), surface: surface, className: cn("min-w-0 gap-0 py-0", className), children: [(title || description || actions) && (_jsxs(_Fragment, { children: [_jsxs(CardHeader, { className: "py-(--card-spacing)", children: [title && (_jsx(CardTitle, { children: _jsx("h2", { children: title }) })), description && _jsx(CardDescription, { children: description }), actions && _jsx(CardAction, { children: actions })] }), _jsx(Separator, {})] })), _jsx("div", { "data-slot": "table-card-body", className: "min-w-0", children: children }), _jsx(FooterStrip, { hint: footerHint, hintSlot: "table-card-hint", children: footer })] }));
9
+ }
10
+ export { TableCard };
@@ -1,4 +1,10 @@
1
1
  export declare const tableCompactLayouts: {
2
+ readonly tight: {
3
+ readonly column: "hidden @xl/table:table-cell";
4
+ readonly row: "@max-xl/table:border-b-0";
5
+ readonly details: "@xl/table:hidden";
6
+ readonly table: "@max-xl/table:table-auto @max-xl/table:[&_td]:whitespace-normal @max-xl/table:[&_th:not(:first-child)]:w-px @max-xl/table:[&_th]:px-2 @max-xl/table:[&_td]:px-2 @xl/table:[&_th]:px-4 @xl/table:[&_td]:px-4";
7
+ };
2
8
  readonly standard: {
3
9
  readonly column: "hidden @3xl/table:table-cell";
4
10
  readonly row: "@max-3xl/table:border-b-0";
@@ -1 +1 @@
1
- {"version":3,"file":"table-layouts.d.ts","sourceRoot":"","sources":["../../src/components/table-layouts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;CAsBtB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,mBAAmB,CAAC"}
1
+ {"version":3,"file":"table-layouts.d.ts","sourceRoot":"","sources":["../../src/components/table-layouts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;CA6BtB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,mBAAmB,CAAC"}
@@ -1,4 +1,10 @@
1
1
  export const tableCompactLayouts = {
2
+ tight: {
3
+ column: "hidden @xl/table:table-cell",
4
+ row: "@max-xl/table:border-b-0",
5
+ details: "@xl/table:hidden",
6
+ table: "@max-xl/table:table-auto @max-xl/table:[&_td]:whitespace-normal @max-xl/table:[&_th:not(:first-child)]:w-px @max-xl/table:[&_th]:px-2 @max-xl/table:[&_td]:px-2 @xl/table:[&_th]:px-4 @xl/table:[&_td]:px-4",
7
+ },
2
8
  standard: {
3
9
  column: "hidden @3xl/table:table-cell",
4
10
  row: "@max-3xl/table:border-b-0",
@@ -19,6 +19,7 @@ import { noPackageComponentRedefinition } from "./rules/no-package-component-red
19
19
  import { noPairedSizeUtility } from "./rules/no-paired-size-utility.js";
20
20
  import { noRestingSettingsControl } from "./rules/no-resting-settings-control.js";
21
21
  import { oneControlHeight } from "./rules/one-control-height.js";
22
+ import { overlayBodyOwnsScroll } from "./rules/overlay-body-owns-scroll.js";
22
23
  import { tableColumnWrapsByMeta } from "./rules/table-column-wraps-by-meta.js";
23
24
  import { noShadcnAppearanceOverride } from "./rules/no-shadcn-appearance-override.js";
24
25
  import { noSubjectDerivedExpectation } from "./rules/no-subject-derived-expectation.js";
@@ -96,6 +97,7 @@ export const strictDesignSystemRules = {
96
97
  "nadicodeai/no-repainted-focus": "error",
97
98
  "nadicodeai/no-shadcn-appearance-override": "error",
98
99
  "nadicodeai/no-token-category-bypass": "error",
100
+ "nadicodeai/overlay-body-owns-scroll": "error",
99
101
  "nadicodeai/prefer-radio-for-few-static-options": "error",
100
102
  };
101
103
 
@@ -132,6 +134,7 @@ const plugin = {
132
134
  "no-invalid-token-utility": noInvalidTokenUtility,
133
135
  "no-token-category-bypass": noTokenCategoryBypass,
134
136
  "one-control-height": oneControlHeight,
137
+ "overlay-body-owns-scroll": overlayBodyOwnsScroll,
135
138
  "table-column-wraps-by-meta": tableColumnWrapsByMeta,
136
139
  "server-action-discipline": serverActionDiscipline,
137
140
  "settings-section-description": settingsSectionDescription,
@@ -1,6 +1,6 @@
1
1
  import { packageOwnedPrimitivesSchema, skipsPackageOwnedPrimitive } from "./jsx-class-utility.js";
2
2
 
3
- const NATIVE_CONTROLS = new Set(["button", "input", "select", "textarea"]);
3
+ const NATIVE_CONTROLS = new Set(["button", "details", "input", "select", "textarea"]);
4
4
 
5
5
  function staticValue(node) {
6
6
  if (node?.type === "Literal") {
@@ -48,7 +48,7 @@ export const noNativeVisibleControl = {
48
48
  schema: [packageOwnedPrimitivesSchema],
49
49
  messages: {
50
50
  nativeVisibleControl:
51
- "Use the @nadicodeai/ui primitive instead of native visible <{{element}}>.",
51
+ "Use the @nadicodeai/ui primitive instead of native visible <{{element}}>{{hint}}.",
52
52
  },
53
53
  },
54
54
  create(context) {
@@ -81,7 +81,10 @@ export const noNativeVisibleControl = {
81
81
  context.report({
82
82
  node: node.name,
83
83
  messageId: "nativeVisibleControl",
84
- data: { element: node.name.name },
84
+ data: {
85
+ element: node.name.name,
86
+ hint: node.name.name === "details" ? ": Disclosure draws the one disclosure" : "",
87
+ },
85
88
  });
86
89
  },
87
90
  };
@@ -0,0 +1,62 @@
1
+ /*
2
+ * An overlay scrolls in its body slot.
3
+ *
4
+ * `DialogContent` already scrolls when its content outgrows the viewport. A
5
+ * dialog or drawer that keeps its header and actions in place while the rest
6
+ * scrolls puts that rest in `DialogBody` or `DrawerBody` from `@nadicodeai/ui`,
7
+ * which own the scroll, the flex sizing that lets it shrink, and the inset that
8
+ * keeps a field's focus outline from being clipped. A caller that writes its own
9
+ * `overflow-y-auto` inside the overlay repeats that geometry, and the copies
10
+ * drift: the Portal's action dialog carried two, a pixel apart.
11
+ *
12
+ * Standard tool checked first: `better-tailwindcss/no-restricted-classes` bans a
13
+ * class everywhere and cannot ask what encloses it. "A scroll container inside an
14
+ * overlay" is a relationship between two elements, so it is read here, on the
15
+ * shared component-name and className readers.
16
+ */
17
+ import { jsxComponentName, openingElementClassUtilities } from "./jsx-class-utility.js";
18
+
19
+ const OVERLAY_CONTENT = new Map([
20
+ ["DialogContent", "DialogBody"],
21
+ ["DrawerContent", "DrawerBody"],
22
+ ]);
23
+
24
+ const SCROLL_UTILITIES = new Set(["overflow-y-auto", "overflow-y-scroll", "overflow-auto"]);
25
+
26
+ export const overlayBodyOwnsScroll = {
27
+ meta: {
28
+ type: "problem",
29
+ docs: {
30
+ description: "Require an overlay's scrolling region to be its package body slot",
31
+ },
32
+ schema: [],
33
+ messages: {
34
+ ownScroll:
35
+ '"{{utility}}" makes this element a second scroll container inside <{{overlay}}>. The body slot owns an overlay\'s scroll, its shrinking and the inset that keeps focus outlines visible. Put the content in <{{body}}> from @nadicodeai/ui and drop the overflow classes (rule/overlay-body-owns-scroll).',
36
+ },
37
+ },
38
+ create(context) {
39
+ return {
40
+ JSXOpeningElement(node) {
41
+ const utility = openingElementClassUtilities(node, context).find((candidate) =>
42
+ SCROLL_UTILITIES.has(candidate),
43
+ );
44
+ if (!utility) return;
45
+ const own = jsxComponentName(node, context);
46
+ if (own && OVERLAY_CONTENT.has(own)) return;
47
+
48
+ for (const ancestor of context.sourceCode.getAncestors(node)) {
49
+ if (ancestor.type !== "JSXElement" || ancestor.openingElement === node) continue;
50
+ const overlay = jsxComponentName(ancestor.openingElement, context);
51
+ if (!overlay || !OVERLAY_CONTENT.has(overlay)) continue;
52
+ context.report({
53
+ node,
54
+ messageId: "ownScroll",
55
+ data: { utility, overlay, body: OVERLAY_CONTENT.get(overlay) },
56
+ });
57
+ return;
58
+ }
59
+ },
60
+ };
61
+ },
62
+ };
package/dist/index.d.ts CHANGED
@@ -45,6 +45,7 @@ export * from "./components/desktop-shell.js";
45
45
  export * from "./components/dialog.js";
46
46
  export * from "./components/diff-count.js";
47
47
  export * from "./components/direction.js";
48
+ export * from "./components/disclosure.js";
48
49
  export * from "./components/disclosure-row.js";
49
50
  export * from "./components/drawer.js";
50
51
  export * from "./components/dropdown-menu.js";
@@ -53,6 +54,7 @@ export * from "./components/expandable-block.js";
53
54
  export * from "./components/fact-cell.js";
54
55
  export * from "./components/feedback-state.js";
55
56
  export * from "./components/field.js";
57
+ export * from "./components/file-diff.js";
56
58
  export * from "./components/file-type-icon.js";
57
59
  export * from "./components/footer.js";
58
60
  export * from "./components/form.js";
@@ -100,6 +102,7 @@ export * from "./components/status-dot.js";
100
102
  export * from "./components/status-row.js";
101
103
  export * from "./components/switch.js";
102
104
  export * from "./components/table.js";
105
+ export * from "./components/table-card.js";
103
106
  export * from "./components/table-value.js";
104
107
  export * from "./components/object-workspace.js";
105
108
  export * from "./components/tabs.js";
@@ -1 +1 @@
1
- {"version":3,"file":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AAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC"}
package/dist/index.js CHANGED
@@ -45,6 +45,7 @@ export * from "./components/desktop-shell.js";
45
45
  export * from "./components/dialog.js";
46
46
  export * from "./components/diff-count.js";
47
47
  export * from "./components/direction.js";
48
+ export * from "./components/disclosure.js";
48
49
  export * from "./components/disclosure-row.js";
49
50
  export * from "./components/drawer.js";
50
51
  export * from "./components/dropdown-menu.js";
@@ -53,6 +54,7 @@ export * from "./components/expandable-block.js";
53
54
  export * from "./components/fact-cell.js";
54
55
  export * from "./components/feedback-state.js";
55
56
  export * from "./components/field.js";
57
+ export * from "./components/file-diff.js";
56
58
  export * from "./components/file-type-icon.js";
57
59
  export * from "./components/footer.js";
58
60
  export * from "./components/form.js";
@@ -100,6 +102,7 @@ export * from "./components/status-dot.js";
100
102
  export * from "./components/status-row.js";
101
103
  export * from "./components/switch.js";
102
104
  export * from "./components/table.js";
105
+ export * from "./components/table-card.js";
103
106
  export * from "./components/table-value.js";
104
107
  export * from "./components/object-workspace.js";
105
108
  export * from "./components/tabs.js";
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ /**
3
+ * The strip a settings section and a table card close with (DESIGN.md "Settings cards"), drawn once so the two never
4
+ * drift apart.
5
+ */
6
+ declare function FooterStrip({ hint, hintSlot, children, }: {
7
+ hint?: React.ReactNode;
8
+ hintSlot: string;
9
+ children?: React.ReactNode;
10
+ }): React.JSX.Element | null;
11
+ export { FooterStrip };
12
+ //# sourceMappingURL=footer-strip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"footer-strip.d.ts","sourceRoot":"","sources":["../../src/internal/footer-strip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;GAGG;AACH,iBAAS,WAAW,CAAC,EACnB,IAAI,EACJ,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,4BAeA;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CardFooter } from "../components/card.js";
3
+ /**
4
+ * The strip a settings section and a table card close with (DESIGN.md "Settings cards"), drawn once so the two never
5
+ * drift apart.
6
+ */
7
+ function FooterStrip({ hint, hintSlot, children, }) {
8
+ if (!hint && !children) {
9
+ return null;
10
+ }
11
+ return (_jsxs(CardFooter, { className: "mx-px mb-px flex-wrap gap-3 rounded-b-[calc(var(--radius-md)-1px)] border-t border-border bg-recessed py-3", children: [hint && (_jsx("div", { "data-slot": hintSlot, className: "min-w-0 flex-1 text-muted-foreground", children: hint })), children && _jsx("div", { className: "ml-auto flex flex-wrap items-center gap-3", children: children })] }));
12
+ }
13
+ export { FooterStrip };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A dropdown and a context menu carry the same commands over the same dense rows, so both take this solid floating
3
+ * surface; DESIGN.md ("Elevation & Depth") keeps glass for chrome that floats over colour or motion.
4
+ */
5
+ export declare const menuSurface = "group/menu z-50 max-h-(--available-height) w-max min-w-[min(14rem,var(--available-width))] max-w-(--available-width) overflow-x-hidden overflow-y-auto rounded-md border-0 bg-popover p-nadicode-xxs text-popover-foreground nc-elevation-floating outline-none data-closed:overflow-hidden";
6
+ //# sourceMappingURL=menu-surface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-surface.d.ts","sourceRoot":"","sources":["../../src/internal/menu-surface.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW,gSACuQ,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A dropdown and a context menu carry the same commands over the same dense rows, so both take this solid floating
3
+ * surface; DESIGN.md ("Elevation & Depth") keeps glass for chrome that floats over colour or motion.
4
+ */
5
+ export const menuSurface = "group/menu z-50 max-h-(--available-height) w-max min-w-[min(14rem,var(--available-width))] max-w-(--available-width) overflow-x-hidden overflow-y-auto rounded-md border-0 bg-popover p-nadicode-xxs text-popover-foreground nc-elevation-floating outline-none data-closed:overflow-hidden";
@@ -0,0 +1,15 @@
1
+ export type DiffLine = {
2
+ kind: "added" | "context" | "removed";
3
+ text: string;
4
+ } | {
5
+ kind: "skipped";
6
+ count: number;
7
+ };
8
+ export interface LineDiff {
9
+ added: number;
10
+ lines: DiffLine[];
11
+ removed: number;
12
+ }
13
+ /** Unchanged lines fold to `context` lines around each change. */
14
+ export declare function lineDiff(before: string, after: string, context?: number): LineDiff;
15
+ //# sourceMappingURL=line-diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line-diff.d.ts","sourceRoot":"","sources":["../../src/lib/line-diff.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAChB;IAAE,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvC,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAqID,kEAAkE;AAClE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,SAAI,GAAG,QAAQ,CAO7E"}
@@ -0,0 +1,136 @@
1
+ /**
2
+ * Each round keeps only its own diagonals, so the search holds at most about two million numbers whatever the texts'
3
+ * length; a change past it shows its changed stretch as every line removed, then every line added.
4
+ */
5
+ const MAX_EDITS = 2000;
6
+ function linesOf(text) {
7
+ if (text === "")
8
+ return [];
9
+ const lines = text.split("\n");
10
+ if (lines[lines.length - 1] === "")
11
+ lines.pop();
12
+ return lines;
13
+ }
14
+ /** A round's diagonals `k` run from `-d` to `d` in steps of two. */
15
+ function reached(rounds, d, k) {
16
+ return rounds[d][(k + d) >> 1];
17
+ }
18
+ /** Myers's algorithm, or null when the script needs more than MAX_EDITS. */
19
+ function shortestScript(before, after) {
20
+ const n = before.length;
21
+ const m = after.length;
22
+ const rounds = [];
23
+ let found = false;
24
+ for (let d = 0; d <= Math.min(n + m, MAX_EDITS) && !found; d += 1) {
25
+ const round = new Int32Array(d + 1);
26
+ for (let k = -d; k <= d; k += 2) {
27
+ let x = d === 0
28
+ ? 0
29
+ : k === -d || (k !== d && reached(rounds, d - 1, k - 1) < reached(rounds, d - 1, k + 1))
30
+ ? reached(rounds, d - 1, k + 1)
31
+ : reached(rounds, d - 1, k - 1) + 1;
32
+ let y = x - k;
33
+ while (x < n && y < m && before[x] === after[y]) {
34
+ x += 1;
35
+ y += 1;
36
+ }
37
+ round[(k + d) >> 1] = x;
38
+ if (x >= n && y >= m) {
39
+ found = true;
40
+ break;
41
+ }
42
+ }
43
+ rounds.push(round);
44
+ }
45
+ if (!found)
46
+ return null;
47
+ const edits = [];
48
+ let x = n;
49
+ let y = m;
50
+ for (let d = rounds.length - 1; d > 0; d -= 1) {
51
+ const k = x - y;
52
+ const previousK = k === -d || (k !== d && reached(rounds, d - 1, k - 1) < reached(rounds, d - 1, k + 1))
53
+ ? k + 1
54
+ : k - 1;
55
+ const previousX = reached(rounds, d - 1, previousK);
56
+ const previousY = previousX - previousK;
57
+ while (x > previousX && y > previousY) {
58
+ x -= 1;
59
+ y -= 1;
60
+ edits.push({ kind: "context", text: before[x] });
61
+ }
62
+ if (x === previousX) {
63
+ y -= 1;
64
+ edits.push({ kind: "added", text: after[y] });
65
+ }
66
+ else {
67
+ x -= 1;
68
+ edits.push({ kind: "removed", text: before[x] });
69
+ }
70
+ }
71
+ while (x > 0 && y > 0) {
72
+ x -= 1;
73
+ y -= 1;
74
+ edits.push({ kind: "context", text: before[x] });
75
+ }
76
+ return edits.reverse();
77
+ }
78
+ function editScript(before, after) {
79
+ let start = 0;
80
+ while (start < before.length && start < after.length && before[start] === after[start])
81
+ start += 1;
82
+ let endBefore = before.length;
83
+ let endAfter = after.length;
84
+ while (endBefore > start && endAfter > start && before[endBefore - 1] === after[endAfter - 1]) {
85
+ endBefore -= 1;
86
+ endAfter -= 1;
87
+ }
88
+ const changedBefore = before.slice(start, endBefore);
89
+ const changedAfter = after.slice(start, endAfter);
90
+ const changed = shortestScript(changedBefore, changedAfter) ?? [
91
+ ...changedBefore.map((text) => ({ kind: "removed", text })),
92
+ ...changedAfter.map((text) => ({ kind: "added", text })),
93
+ ];
94
+ return [
95
+ ...before.slice(0, start).map((text) => ({ kind: "context", text })),
96
+ ...changed,
97
+ ...before.slice(endBefore).map((text) => ({ kind: "context", text })),
98
+ ];
99
+ }
100
+ function fold(edits, context) {
101
+ const out = [];
102
+ let run = [];
103
+ const flush = (leading, trailing) => {
104
+ if (run.length <= leading + trailing) {
105
+ out.push(...run);
106
+ }
107
+ else {
108
+ out.push(...run.slice(0, leading));
109
+ out.push({ kind: "skipped", count: run.length - leading - trailing });
110
+ out.push(...run.slice(run.length - trailing));
111
+ }
112
+ run = [];
113
+ };
114
+ let seenChange = false;
115
+ for (const edit of edits) {
116
+ if (edit.kind === "context") {
117
+ run.push(edit);
118
+ }
119
+ else {
120
+ flush(seenChange ? context : 0, context);
121
+ out.push(edit);
122
+ seenChange = true;
123
+ }
124
+ }
125
+ flush(seenChange ? context : 0, 0);
126
+ return out;
127
+ }
128
+ /** Unchanged lines fold to `context` lines around each change. */
129
+ export function lineDiff(before, after, context = 3) {
130
+ const edits = editScript(linesOf(before), linesOf(after));
131
+ return {
132
+ added: edits.filter((edit) => edit.kind === "added").length,
133
+ lines: fold(edits, context),
134
+ removed: edits.filter((edit) => edit.kind === "removed").length,
135
+ };
136
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nadicodeai/ui",
3
- "version": "12.1.19",
3
+ "version": "12.1.21",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -71,7 +71,7 @@
71
71
  "@assistant-ui/react": "0.15.21",
72
72
  "@assistant-ui/react-markdown": "0.14.16",
73
73
  "@base-ui/react": "^1.8.0",
74
- "@nadicodeai/design-system": "12.1.19",
74
+ "@nadicodeai/design-system": "12.1.21",
75
75
  "class-variance-authority": "^0.7.1",
76
76
  "clsx": "^2.1.1",
77
77
  "cmdk": "^1.1.1",