@agent-native/dispatch 0.21.0 → 0.22.0

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 (56) hide show
  1. package/dist/actions/get-agent-thread-debug.d.ts +2 -0
  2. package/dist/actions/provider-api-register.d.ts +8 -8
  3. package/dist/actions/search-agent-threads.js +2 -2
  4. package/dist/actions/search-agent-threads.js.map +1 -1
  5. package/dist/components/layout/HeaderActions.d.ts +1 -17
  6. package/dist/components/layout/HeaderActions.d.ts.map +1 -1
  7. package/dist/components/layout/HeaderActions.js +1 -51
  8. package/dist/components/layout/HeaderActions.js.map +1 -1
  9. package/dist/components/layout/Layout.d.ts.map +1 -1
  10. package/dist/components/layout/Layout.js +16 -14
  11. package/dist/components/layout/Layout.js.map +1 -1
  12. package/dist/components/ui/dialog.d.ts +1 -19
  13. package/dist/components/ui/dialog.d.ts.map +1 -1
  14. package/dist/components/ui/dialog.js +1 -22
  15. package/dist/components/ui/dialog.js.map +1 -1
  16. package/dist/components/ui/dropdown-menu.d.ts +1 -27
  17. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  18. package/dist/components/ui/dropdown-menu.js +1 -35
  19. package/dist/components/ui/dropdown-menu.js.map +1 -1
  20. package/dist/components/ui/popover.d.ts +2 -1
  21. package/dist/components/ui/popover.d.ts.map +1 -1
  22. package/dist/components/ui/popover.js +2 -1
  23. package/dist/components/ui/popover.js.map +1 -1
  24. package/dist/components/ui/select.d.ts +1 -13
  25. package/dist/components/ui/select.d.ts.map +1 -1
  26. package/dist/components/ui/select.js +1 -26
  27. package/dist/components/ui/select.js.map +1 -1
  28. package/dist/hooks/use-mobile.d.ts +1 -1
  29. package/dist/hooks/use-mobile.d.ts.map +1 -1
  30. package/dist/hooks/use-mobile.js +1 -15
  31. package/dist/hooks/use-mobile.js.map +1 -1
  32. package/dist/lib/automation-display.js +1 -1
  33. package/dist/lib/automation-display.js.map +1 -1
  34. package/dist/routes/pages/thread-debug.d.ts.map +1 -1
  35. package/dist/routes/pages/thread-debug.js +288 -118
  36. package/dist/routes/pages/thread-debug.js.map +1 -1
  37. package/dist/server/lib/thread-debug-store.d.ts +2 -0
  38. package/dist/server/lib/thread-debug-store.d.ts.map +1 -1
  39. package/dist/server/lib/thread-debug-store.js +6 -2
  40. package/dist/server/lib/thread-debug-store.js.map +1 -1
  41. package/package.json +3 -3
  42. package/src/actions/search-agent-threads.ts +2 -2
  43. package/src/components/layout/HeaderActions.tsx +1 -84
  44. package/src/components/layout/Layout.spec.tsx +19 -9
  45. package/src/components/layout/Layout.tsx +69 -71
  46. package/src/components/ui/dialog.tsx +1 -120
  47. package/src/components/ui/dropdown-menu.tsx +1 -198
  48. package/src/components/ui/popover.tsx +3 -1
  49. package/src/components/ui/select.tsx +1 -158
  50. package/src/hooks/use-mobile.tsx +1 -21
  51. package/src/lib/automation-display.spec.ts +1 -1
  52. package/src/lib/automation-display.ts +1 -1
  53. package/src/routes/pages/thread-debug.spec.tsx +103 -5
  54. package/src/routes/pages/thread-debug.tsx +1051 -451
  55. package/src/server/lib/thread-debug-store.spec.ts +17 -0
  56. package/src/server/lib/thread-debug-store.ts +9 -2
@@ -118,7 +118,6 @@ import { Skeleton } from "../ui/skeleton";
118
118
  import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip";
119
119
  import { Header } from "./Header";
120
120
  import { HeaderActionsProvider } from "./HeaderActions";
121
- import { WorkspaceAppsRail } from "./workspace-apps-rail";
122
121
 
123
122
  export type DispatchNavSection = "primary" | "operations";
124
123
 
@@ -521,14 +520,20 @@ function DispatchChatsSection({
521
520
  prelude,
522
521
  chatFirstMode = false,
523
522
  chatFirstEmbedded = false,
523
+ chatFirstNavigation,
524
524
  }: {
525
525
  onNavigate?: () => void;
526
526
  showNewChat?: boolean;
527
527
  prelude?: ReactNode;
528
528
  chatFirstMode?: boolean;
529
529
  chatFirstEmbedded?: boolean;
530
+ chatFirstNavigation?: {
531
+ onOpenIntegrations: () => void;
532
+ onOpenScheduled: () => void;
533
+ };
530
534
  }) {
531
535
  const t = useT();
536
+ const chatFirstCopy = useMemo(() => createDispatchChatFirstCopy(t), [t]);
532
537
  const navigate = useNavigate();
533
538
  const location = useLocation();
534
539
  const [includeExternal, setIncludeExternal] = useState(false);
@@ -662,54 +667,57 @@ function DispatchChatsSection({
662
667
  showNewChat && "dispatch-chat-first-chats",
663
668
  )}
664
669
  >
665
- {showNewChat ? (
666
- <button
667
- type="button"
668
- className="flex h-7 w-[calc(100%-0.5rem)] items-center gap-2 rounded-md px-2 text-sm text-sidebar-foreground/80 transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"
669
- onClick={() => void handleNewChat()}
670
- >
671
- <IconPlus size={16} className="shrink-0" aria-hidden="true" />
672
- <span>New chat</span>
673
- </button>
670
+ {showNewChat && chatFirstNavigation ? (
671
+ <nav className="space-y-0.5 px-2 py-2">
672
+ <ChatFirstPrimaryNavigation
673
+ copy={chatFirstCopy}
674
+ onNewChat={() => void handleNewChat()}
675
+ onOpenIntegrations={chatFirstNavigation.onOpenIntegrations}
676
+ onOpenScheduled={chatFirstNavigation.onOpenScheduled}
677
+ onSearch={openCommandMenu}
678
+ />
679
+ </nav>
674
680
  ) : null}
675
681
  {prelude}
676
- <div className="flex justify-end px-2 pt-0.5">
677
- <Tooltip>
678
- <TooltipTrigger asChild>
679
- <button
680
- type="button"
681
- data-dispatch-chat-source-toggle
682
- aria-pressed={includeExternal}
683
- aria-label={
684
- includeExternal
685
- ? t("dispatch.sidebar.showLocalChats", {
686
- defaultValue: "Show local chats",
687
- })
688
- : t("dispatch.sidebar.showAllChats", {
689
- defaultValue: "Show all chats",
690
- })
691
- }
692
- onClick={() => setIncludeExternal((current) => !current)}
693
- className="flex size-6 items-center justify-center rounded-md text-sidebar-foreground/55 transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"
694
- >
695
- {includeExternal ? (
696
- <IconWorld size={14} aria-hidden="true" />
697
- ) : (
698
- <IconDeviceDesktop size={14} aria-hidden="true" />
699
- )}
700
- </button>
701
- </TooltipTrigger>
702
- <TooltipContent side="right">
703
- {includeExternal
704
- ? t("dispatch.sidebar.showLocalChats", {
705
- defaultValue: "Show local chats",
706
- })
707
- : t("dispatch.sidebar.showAllChats", {
708
- defaultValue: "Show all chats",
709
- })}
710
- </TooltipContent>
711
- </Tooltip>
712
- </div>
682
+ {!chatFirstMode ? (
683
+ <div className="flex justify-end px-2 pt-0.5">
684
+ <Tooltip>
685
+ <TooltipTrigger asChild>
686
+ <button
687
+ type="button"
688
+ data-dispatch-chat-source-toggle
689
+ aria-pressed={includeExternal}
690
+ aria-label={
691
+ includeExternal
692
+ ? t("dispatch.sidebar.showLocalChats", {
693
+ defaultValue: "Show local chats",
694
+ })
695
+ : t("dispatch.sidebar.showAllChats", {
696
+ defaultValue: "Show all chats",
697
+ })
698
+ }
699
+ onClick={() => setIncludeExternal((current) => !current)}
700
+ className="flex size-6 items-center justify-center rounded-md text-sidebar-foreground/55 transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"
701
+ >
702
+ {includeExternal ? (
703
+ <IconWorld size={14} aria-hidden="true" />
704
+ ) : (
705
+ <IconDeviceDesktop size={14} aria-hidden="true" />
706
+ )}
707
+ </button>
708
+ </TooltipTrigger>
709
+ <TooltipContent side="right">
710
+ {includeExternal
711
+ ? t("dispatch.sidebar.showLocalChats", {
712
+ defaultValue: "Show local chats",
713
+ })
714
+ : t("dispatch.sidebar.showAllChats", {
715
+ defaultValue: "Show all chats",
716
+ })}
717
+ </TooltipContent>
718
+ </Tooltip>
719
+ </div>
720
+ ) : null}
713
721
  {!chatFirstMode &&
714
722
  chatsLoading &&
715
723
  visibleThreads.length === 0 &&
@@ -983,20 +991,6 @@ export function NavContent({
983
991
  />
984
992
  );
985
993
 
986
- const chatFirstPrimaryNavigation = (
987
- <ChatFirstPrimaryNavigation
988
- copy={chatFirstCopy}
989
- onOpenIntegrations={() => {
990
- navigate(dispatchNavLinkTarget("/admin/integrations"));
991
- onNavigate?.();
992
- }}
993
- onOpenScheduled={() => {
994
- navigate(dispatchNavLinkTarget("/admin/automations"));
995
- onNavigate?.();
996
- }}
997
- />
998
- );
999
-
1000
994
  const chatFirstAppsRail = (
1001
995
  <ChatFirstAppsRail
1002
996
  apps={chatFirstApps}
@@ -1055,6 +1049,7 @@ export function NavContent({
1055
1049
  onNavigate?.();
1056
1050
  }}
1057
1051
  aria-label={label}
1052
+ aria-current={itemMatchesLocalPath ? "page" : undefined}
1058
1053
  className={cn(
1059
1054
  "flex size-9 items-center justify-center rounded-md text-sm",
1060
1055
  itemMatchesLocalPath
@@ -1093,6 +1088,7 @@ export function NavContent({
1093
1088
  }
1094
1089
  onNavigate?.();
1095
1090
  }}
1091
+ aria-current={itemMatchesLocalPath ? "page" : undefined}
1096
1092
  className={cn(
1097
1093
  "flex h-8 w-full items-center gap-2 rounded-md px-2 text-sm",
1098
1094
  itemMatchesLocalPath
@@ -1175,14 +1171,18 @@ export function NavContent({
1175
1171
  onNavigate={onNavigate}
1176
1172
  showNewChat
1177
1173
  chatFirstMode
1178
- prelude={
1179
- <>
1180
- <nav className="space-y-0.5 px-2 py-2">
1181
- {chatFirstPrimaryNavigation}
1182
- </nav>
1183
- {chatFirstAppsRail}
1184
- </>
1185
- }
1174
+ chatFirstEmbedded={chatFirstEmbedded}
1175
+ chatFirstNavigation={{
1176
+ onOpenIntegrations: () => {
1177
+ navigate(dispatchNavLinkTarget("/admin/integrations"));
1178
+ onNavigate?.();
1179
+ },
1180
+ onOpenScheduled: () => {
1181
+ navigate(dispatchNavLinkTarget("/admin/automations"));
1182
+ onNavigate?.();
1183
+ },
1184
+ }}
1185
+ prelude={chatFirstAppsRail}
1186
1186
  />
1187
1187
  ) : (
1188
1188
  chatFirstAppsRail
@@ -1203,8 +1203,6 @@ export function NavContent({
1203
1203
  >
1204
1204
  {primaryNavItems.map(renderNavItem)}
1205
1205
  </ul>
1206
-
1207
- <WorkspaceAppsRail collapsed={collapsed} onNavigate={onNavigate} />
1208
1206
  </nav>
1209
1207
 
1210
1208
  <div className="mt-auto shrink-0">
@@ -1,120 +1 @@
1
- import * as DialogPrimitive from "@radix-ui/react-dialog";
2
- import { IconX } from "@tabler/icons-react";
3
- import * as React from "react";
4
-
5
- import { cn } from "../../lib/utils";
6
-
7
- const Dialog = DialogPrimitive.Root;
8
-
9
- const DialogTrigger = DialogPrimitive.Trigger;
10
-
11
- const DialogPortal = DialogPrimitive.Portal;
12
-
13
- const DialogClose = DialogPrimitive.Close;
14
-
15
- const DialogOverlay = React.forwardRef<
16
- React.ElementRef<typeof DialogPrimitive.Overlay>,
17
- React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
18
- >(({ className, ...props }, ref) => (
19
- <DialogPrimitive.Overlay
20
- ref={ref}
21
- className={cn(
22
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
23
- className,
24
- )}
25
- {...props}
26
- />
27
- ));
28
- DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
29
-
30
- const DialogContent = React.forwardRef<
31
- React.ElementRef<typeof DialogPrimitive.Content>,
32
- React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
33
- >(({ className, children, ...props }, ref) => (
34
- <DialogPortal>
35
- <DialogOverlay />
36
- <DialogPrimitive.Content
37
- ref={ref}
38
- className={cn(
39
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",
40
- className,
41
- )}
42
- {...props}
43
- >
44
- {children}
45
- <DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
46
- <IconX className="h-4 w-4" />
47
- <span className="sr-only">Close</span>
48
- </DialogPrimitive.Close>
49
- </DialogPrimitive.Content>
50
- </DialogPortal>
51
- ));
52
- DialogContent.displayName = DialogPrimitive.Content.displayName;
53
-
54
- const DialogHeader = ({
55
- className,
56
- ...props
57
- }: React.HTMLAttributes<HTMLDivElement>) => (
58
- <div
59
- className={cn(
60
- "flex flex-col space-y-1.5 text-center sm:text-left",
61
- className,
62
- )}
63
- {...props}
64
- />
65
- );
66
- DialogHeader.displayName = "DialogHeader";
67
-
68
- const DialogFooter = ({
69
- className,
70
- ...props
71
- }: React.HTMLAttributes<HTMLDivElement>) => (
72
- <div
73
- className={cn(
74
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
75
- className,
76
- )}
77
- {...props}
78
- />
79
- );
80
- DialogFooter.displayName = "DialogFooter";
81
-
82
- const DialogTitle = React.forwardRef<
83
- React.ElementRef<typeof DialogPrimitive.Title>,
84
- React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
85
- >(({ className, ...props }, ref) => (
86
- <DialogPrimitive.Title
87
- ref={ref}
88
- className={cn(
89
- "text-lg font-semibold leading-none tracking-tight",
90
- className,
91
- )}
92
- {...props}
93
- />
94
- ));
95
- DialogTitle.displayName = DialogPrimitive.Title.displayName;
96
-
97
- const DialogDescription = React.forwardRef<
98
- React.ElementRef<typeof DialogPrimitive.Description>,
99
- React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
100
- >(({ className, ...props }, ref) => (
101
- <DialogPrimitive.Description
102
- ref={ref}
103
- className={cn("text-sm text-muted-foreground", className)}
104
- {...props}
105
- />
106
- ));
107
- DialogDescription.displayName = DialogPrimitive.Description.displayName;
108
-
109
- export {
110
- Dialog,
111
- DialogPortal,
112
- DialogOverlay,
113
- DialogClose,
114
- DialogTrigger,
115
- DialogContent,
116
- DialogHeader,
117
- DialogFooter,
118
- DialogTitle,
119
- DialogDescription,
120
- };
1
+ export * from "@agent-native/toolkit/ui/dialog";
@@ -1,198 +1 @@
1
- import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
2
- import { IconCheck, IconChevronRight, IconCircle } from "@tabler/icons-react";
3
- import * as React from "react";
4
-
5
- import { cn } from "../../lib/utils";
6
-
7
- const DropdownMenu = DropdownMenuPrimitive.Root;
8
-
9
- const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
10
-
11
- const DropdownMenuGroup = DropdownMenuPrimitive.Group;
12
-
13
- const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
14
-
15
- const DropdownMenuSub = DropdownMenuPrimitive.Sub;
16
-
17
- const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
18
-
19
- const DropdownMenuSubTrigger = React.forwardRef<
20
- React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
21
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
22
- inset?: boolean;
23
- }
24
- >(({ className, inset, children, ...props }, ref) => (
25
- <DropdownMenuPrimitive.SubTrigger
26
- ref={ref}
27
- className={cn(
28
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
29
- inset && "pl-8",
30
- className,
31
- )}
32
- {...props}
33
- >
34
- {children}
35
- <IconChevronRight className="ml-auto h-4 w-4" />
36
- </DropdownMenuPrimitive.SubTrigger>
37
- ));
38
- DropdownMenuSubTrigger.displayName =
39
- DropdownMenuPrimitive.SubTrigger.displayName;
40
-
41
- const DropdownMenuSubContent = React.forwardRef<
42
- React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
43
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
44
- >(({ className, ...props }, ref) => (
45
- <DropdownMenuPrimitive.SubContent
46
- ref={ref}
47
- className={cn(
48
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
49
- className,
50
- )}
51
- {...props}
52
- />
53
- ));
54
- DropdownMenuSubContent.displayName =
55
- DropdownMenuPrimitive.SubContent.displayName;
56
-
57
- const DropdownMenuContent = React.forwardRef<
58
- React.ElementRef<typeof DropdownMenuPrimitive.Content>,
59
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
60
- >(({ className, sideOffset = 4, ...props }, ref) => (
61
- <DropdownMenuPrimitive.Portal>
62
- <DropdownMenuPrimitive.Content
63
- ref={ref}
64
- sideOffset={sideOffset}
65
- className={cn(
66
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
67
- className,
68
- )}
69
- {...props}
70
- />
71
- </DropdownMenuPrimitive.Portal>
72
- ));
73
- DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
74
-
75
- const DropdownMenuItem = React.forwardRef<
76
- React.ElementRef<typeof DropdownMenuPrimitive.Item>,
77
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
78
- inset?: boolean;
79
- }
80
- >(({ className, inset, ...props }, ref) => (
81
- <DropdownMenuPrimitive.Item
82
- ref={ref}
83
- className={cn(
84
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
85
- inset && "pl-8",
86
- className,
87
- )}
88
- {...props}
89
- />
90
- ));
91
- DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
92
-
93
- const DropdownMenuCheckboxItem = React.forwardRef<
94
- React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
95
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
96
- >(({ className, children, checked, ...props }, ref) => (
97
- <DropdownMenuPrimitive.CheckboxItem
98
- ref={ref}
99
- className={cn(
100
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
101
- className,
102
- )}
103
- checked={checked}
104
- {...props}
105
- >
106
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
107
- <DropdownMenuPrimitive.ItemIndicator>
108
- <IconCheck className="h-4 w-4" />
109
- </DropdownMenuPrimitive.ItemIndicator>
110
- </span>
111
- {children}
112
- </DropdownMenuPrimitive.CheckboxItem>
113
- ));
114
- DropdownMenuCheckboxItem.displayName =
115
- DropdownMenuPrimitive.CheckboxItem.displayName;
116
-
117
- const DropdownMenuRadioItem = React.forwardRef<
118
- React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
119
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
120
- >(({ className, children, ...props }, ref) => (
121
- <DropdownMenuPrimitive.RadioItem
122
- ref={ref}
123
- className={cn(
124
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
125
- className,
126
- )}
127
- {...props}
128
- >
129
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
130
- <DropdownMenuPrimitive.ItemIndicator>
131
- <IconCircle className="h-2 w-2 fill-current" />
132
- </DropdownMenuPrimitive.ItemIndicator>
133
- </span>
134
- {children}
135
- </DropdownMenuPrimitive.RadioItem>
136
- ));
137
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
138
-
139
- const DropdownMenuLabel = React.forwardRef<
140
- React.ElementRef<typeof DropdownMenuPrimitive.Label>,
141
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
142
- inset?: boolean;
143
- }
144
- >(({ className, inset, ...props }, ref) => (
145
- <DropdownMenuPrimitive.Label
146
- ref={ref}
147
- className={cn(
148
- "px-2 py-1.5 text-sm font-semibold",
149
- inset && "pl-8",
150
- className,
151
- )}
152
- {...props}
153
- />
154
- ));
155
- DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
156
-
157
- const DropdownMenuSeparator = React.forwardRef<
158
- React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
159
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
160
- >(({ className, ...props }, ref) => (
161
- <DropdownMenuPrimitive.Separator
162
- ref={ref}
163
- className={cn("-mx-1 my-1 h-px bg-muted", className)}
164
- {...props}
165
- />
166
- ));
167
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
168
-
169
- const DropdownMenuShortcut = ({
170
- className,
171
- ...props
172
- }: React.HTMLAttributes<HTMLSpanElement>) => {
173
- return (
174
- <span
175
- className={cn("ml-auto text-xs tracking-widest opacity-60", className)}
176
- {...props}
177
- />
178
- );
179
- };
180
- DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
181
-
182
- export {
183
- DropdownMenu,
184
- DropdownMenuTrigger,
185
- DropdownMenuContent,
186
- DropdownMenuItem,
187
- DropdownMenuCheckboxItem,
188
- DropdownMenuRadioItem,
189
- DropdownMenuLabel,
190
- DropdownMenuSeparator,
191
- DropdownMenuShortcut,
192
- DropdownMenuGroup,
193
- DropdownMenuPortal,
194
- DropdownMenuSub,
195
- DropdownMenuSubContent,
196
- DropdownMenuSubTrigger,
197
- DropdownMenuRadioGroup,
198
- };
1
+ export * from "@agent-native/toolkit/ui/dropdown-menu";
@@ -5,6 +5,8 @@ import { cn } from "../../lib/utils";
5
5
 
6
6
  const Popover = PopoverPrimitive.Root;
7
7
 
8
+ const PopoverAnchor = PopoverPrimitive.Anchor;
9
+
8
10
  const PopoverTrigger = PopoverPrimitive.Trigger;
9
11
 
10
12
  const PopoverContent = React.forwardRef<
@@ -26,4 +28,4 @@ const PopoverContent = React.forwardRef<
26
28
  ));
27
29
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
28
30
 
29
- export { Popover, PopoverTrigger, PopoverContent };
31
+ export { Popover, PopoverAnchor, PopoverTrigger, PopoverContent };