@talk2view/sdk 0.16.1 → 0.17.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 (65) hide show
  1. package/dist/assistant-ui/index.d.ts +13 -2
  2. package/dist/assistant-ui/index.d.ts.map +1 -1
  3. package/dist/assistant-ui/index.js +19 -4
  4. package/dist/assistant-ui/index.js.map +1 -1
  5. package/dist/chat/chat.d.ts.map +1 -1
  6. package/dist/chat/chat.js +8 -3
  7. package/dist/chat/chat.js.map +1 -1
  8. package/dist/chat/lib/conversation-store.d.ts +105 -0
  9. package/dist/chat/lib/conversation-store.d.ts.map +1 -0
  10. package/dist/chat/lib/conversation-store.js +278 -0
  11. package/dist/chat/lib/conversation-store.js.map +1 -0
  12. package/dist/chat/lib/use-conversations.d.ts +13 -0
  13. package/dist/chat/lib/use-conversations.d.ts.map +1 -0
  14. package/dist/chat/lib/use-conversations.js +365 -0
  15. package/dist/chat/lib/use-conversations.js.map +1 -0
  16. package/dist/chat/provider.d.ts.map +1 -1
  17. package/dist/chat/provider.js +6 -0
  18. package/dist/chat/provider.js.map +1 -1
  19. package/dist/chat/ui/avatar.d.ts +7 -8
  20. package/dist/chat/ui/avatar.d.ts.map +1 -1
  21. package/dist/chat/ui/avatar.js +30 -18
  22. package/dist/chat/ui/avatar.js.map +1 -1
  23. package/dist/chat/ui/button.d.ts +5 -2
  24. package/dist/chat/ui/button.d.ts.map +1 -1
  25. package/dist/chat/ui/button.js +10 -3
  26. package/dist/chat/ui/button.js.map +1 -1
  27. package/dist/chat/ui/collapsible.d.ts +4 -4
  28. package/dist/chat/ui/collapsible.d.ts.map +1 -1
  29. package/dist/chat/ui/collapsible.js +18 -9
  30. package/dist/chat/ui/collapsible.js.map +1 -1
  31. package/dist/chat/ui/dialog.d.ts +11 -11
  32. package/dist/chat/ui/dialog.d.ts.map +1 -1
  33. package/dist/chat/ui/dialog.js +49 -28
  34. package/dist/chat/ui/dialog.js.map +1 -1
  35. package/dist/chat/ui/input.d.ts +1 -1
  36. package/dist/chat/ui/input.d.ts.map +1 -1
  37. package/dist/chat/ui/input.js +10 -3
  38. package/dist/chat/ui/input.js.map +1 -1
  39. package/dist/chat/ui/skeleton.d.ts +2 -1
  40. package/dist/chat/ui/skeleton.d.ts.map +1 -1
  41. package/dist/chat/ui/skeleton.js +10 -3
  42. package/dist/chat/ui/skeleton.js.map +1 -1
  43. package/dist/chat/ui/textarea.d.ts +1 -1
  44. package/dist/chat/ui/textarea.d.ts.map +1 -1
  45. package/dist/chat/ui/textarea.js +10 -3
  46. package/dist/chat/ui/textarea.js.map +1 -1
  47. package/dist/chat/ui/tooltip.d.ts +3 -2
  48. package/dist/chat/ui/tooltip.d.ts.map +1 -1
  49. package/dist/chat/ui/tooltip.js +25 -8
  50. package/dist/chat/ui/tooltip.js.map +1 -1
  51. package/dist/chat/vendor/thread-list.aui.d.ts +3 -3
  52. package/dist/chat/vendor/thread-list.aui.d.ts.map +1 -1
  53. package/dist/chat/vendor/thread-list.aui.js +7 -7
  54. package/dist/chat/vendor/thread-list.aui.js.map +1 -1
  55. package/dist/chat-css.js +1 -1
  56. package/dist/chat.css +1 -1
  57. package/dist/chat.isolated.css +3 -0
  58. package/dist/chat.raw.css +3 -0
  59. package/dist/index.d.ts +56 -2
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.js +104 -6
  62. package/dist/index.js.map +1 -1
  63. package/dist/types.d.ts +20 -0
  64. package/dist/types.d.ts.map +1 -1
  65. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
2
- declare function Collapsible({ ...props }: CollapsiblePrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
3
- declare function CollapsibleTrigger({ ...props }: CollapsiblePrimitive.Trigger.Props): import("react/jsx-runtime").JSX.Element;
4
- declare function CollapsibleContent({ ...props }: CollapsiblePrimitive.Panel.Props): import("react/jsx-runtime").JSX.Element;
1
+ import * as React from "react";
2
+ declare const Collapsible: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/collapsible").CollapsibleRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
3
+ declare const CollapsibleTrigger: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/collapsible").CollapsibleTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ declare const CollapsibleContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/collapsible").CollapsiblePanelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  export { Collapsible, CollapsibleTrigger, CollapsibleContent };
6
6
  //# sourceMappingURL=collapsible.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../src/chat/ui/collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAEhF,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAAK,2CAEjE;AAED,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,OAAO,CAAC,KAAK,2CAI3E;AAED,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,2CAIzE;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA"}
1
+ {"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../src/chat/ui/collapsible.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,QAAA,MAAM,WAAW,+IAOf,CAAA;AAGF,QAAA,MAAM,kBAAkB,qJAWtB,CAAA;AAGF,QAAA,MAAM,kBAAkB,gJAWtB,CAAA;AAGF,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA"}
@@ -1,13 +1,22 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Every component in this directory that renders a DOM element is wrapped in
3
+ // `forwardRef`. React 19 lets a plain function component read `ref` out of its
4
+ // props; React 18 — which this package still supports — strips it, warns, and
5
+ // the ref reaches nothing. Base UI hands refs to whatever it renders, so a
6
+ // plain function here loses them silently. See tests/chat/ui-refs.test.tsx.
7
+ import * as React from "react";
2
8
  import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
3
- function Collapsible({ ...props }) {
4
- return _jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
5
- }
6
- function CollapsibleTrigger({ ...props }) {
7
- return (_jsx(CollapsiblePrimitive.Trigger, { "data-slot": "collapsible-trigger", ...props }));
8
- }
9
- function CollapsibleContent({ ...props }) {
10
- return (_jsx(CollapsiblePrimitive.Panel, { "data-slot": "collapsible-content", ...props }));
11
- }
9
+ const Collapsible = React.forwardRef(function Collapsible({ ...props }, ref) {
10
+ return (_jsx(CollapsiblePrimitive.Root, { ref: ref, "data-slot": "collapsible", ...props }));
11
+ });
12
+ Collapsible.displayName = "Collapsible";
13
+ const CollapsibleTrigger = React.forwardRef(function CollapsibleTrigger({ ...props }, ref) {
14
+ return (_jsx(CollapsiblePrimitive.Trigger, { ref: ref, "data-slot": "collapsible-trigger", ...props }));
15
+ });
16
+ CollapsibleTrigger.displayName = "CollapsibleTrigger";
17
+ const CollapsibleContent = React.forwardRef(function CollapsibleContent({ ...props }, ref) {
18
+ return (_jsx(CollapsiblePrimitive.Panel, { ref: ref, "data-slot": "collapsible-content", ...props }));
19
+ });
20
+ CollapsibleContent.displayName = "CollapsibleContent";
12
21
  export { Collapsible, CollapsibleTrigger, CollapsibleContent };
13
22
  //# sourceMappingURL=collapsible.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible.js","sourceRoot":"","sources":["../../../src/chat/ui/collapsible.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,IAAI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CAAC,OAAO,IAC3B,GAAG,EAAE,GAAG,eACE,qBAAqB,KAC3B,KAAK,GACT,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AACF,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAA;AAErD,MAAM,kBAAkB,GAAG,KAAK,CAAC,UAAU,CAGzC,SAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG;IAC7C,OAAO,CACL,KAAC,oBAAoB,CAAC,KAAK,IACzB,GAAG,EAAE,GAAG,eACE,qBAAqB,KAC3B,KAAK,GACT,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AACF,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAA;AAErD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA"}
@@ -1,18 +1,18 @@
1
1
  import * as React from "react";
2
2
  import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
3
3
  declare function Dialog({ ...props }: DialogPrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
4
- declare function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props): import("react/jsx-runtime").JSX.Element;
5
- declare function DialogPortal({ ...props }: DialogPrimitive.Portal.Props): import("react/jsx-runtime").JSX.Element;
6
- declare function DialogClose({ ...props }: DialogPrimitive.Close.Props): import("react/jsx-runtime").JSX.Element;
7
- declare function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props): import("react/jsx-runtime").JSX.Element;
8
- declare function DialogContent({ className, children, showCloseButton, ...props }: DialogPrimitive.Popup.Props & {
4
+ declare const DialogTrigger: React.ForwardRefExoticComponent<Omit<DialogPrimitive.Trigger.Props<unknown>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DialogPortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const DialogClose: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogPopupProps & {
9
9
  showCloseButton?: boolean;
10
- }): import("react/jsx-runtime").JSX.Element;
11
- declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
12
- declare function DialogFooter({ className, showCloseButton, children, ...props }: React.ComponentProps<"div"> & {
10
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const DialogHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const DialogFooter: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
13
13
  showCloseButton?: boolean;
14
- }): import("react/jsx-runtime").JSX.Element;
15
- declare function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props): import("react/jsx-runtime").JSX.Element;
16
- declare function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props): import("react/jsx-runtime").JSX.Element;
14
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
16
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
17
17
  export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
18
18
  //# sourceMappingURL=dialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"d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S,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,WAAW,CAAC,KAAK,2CAWnC;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAA"}
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/chat/ui/dialog.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAOjE,iBAAS,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,IAAI,CAAC,KAAK,2CAEvD;AAED,QAAA,MAAM,aAAa,+HAOjB,CAAA;AAGF,QAAA,MAAM,YAAY,uIAiBhB,CAAA;AAGF,QAAA,MAAM,WAAW,yIAKf,CAAA;AAGF,QAAA,MAAM,aAAa,yIAejB,CAAA;AAGF,QAAA,MAAM,aAAa;sBAGG,OAAO;gDAsC3B,CAAA;AAGF,QAAA,MAAM,YAAY,mKAYhB,CAAA;AAGF,QAAA,MAAM,YAAY;sBAGI,OAAO;gDAwB3B,CAAA;AAGF,QAAA,MAAM,WAAW,0IAef,CAAA;AAGF,QAAA,MAAM,iBAAiB,kJAerB,CAAA;AAGF,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAA"}
@@ -1,5 +1,15 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ // Every component in this directory that renders a DOM element is wrapped in
4
+ // `forwardRef`. React 19 lets a plain function component read `ref` out of its
5
+ // props; React 18 — which this package still supports — strips it, warns, and
6
+ // the ref reaches nothing. Base UI hands refs to whatever it renders, so a
7
+ // plain function here loses them silently. See tests/chat/ui-refs.test.tsx.
8
+ //
9
+ // `Dialog` is the exception: Base UI's `Dialog.Root` renders no element of its
10
+ // own and takes no `ref`, and so neither does this. Wrapping it would advertise
11
+ // a ref that nothing could ever attach.
12
+ import * as React from "react";
3
13
  import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
4
14
  import { cn } from "../lib/cn.js";
5
15
  import { usePortalHost } from "../lib/portal-host.js";
@@ -8,35 +18,46 @@ import { XIcon } from "lucide-react";
8
18
  function Dialog({ ...props }) {
9
19
  return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
10
20
  }
11
- function DialogTrigger({ ...props }) {
12
- return _jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
13
- }
14
- function DialogPortal({ ...props }) {
21
+ const DialogTrigger = React.forwardRef(function DialogTrigger({ ...props }, ref) {
22
+ return (_jsx(DialogPrimitive.Trigger, { ref: ref, "data-slot": "dialog-trigger", ...props }));
23
+ });
24
+ DialogTrigger.displayName = "DialogTrigger";
25
+ const DialogPortal = React.forwardRef(function DialogPortal({ ...props }, ref) {
15
26
  // Into the chat's portal host, so the dialog is inside the scope the whole
16
- // stylesheet is written against. Null (no chat around it) means <body>.
27
+ // stylesheet is written against. Outside a chat the hook returns null, which
28
+ // Base UI reads as "not resolved yet" and renders nothing — undefined is what
29
+ // asks for the default of <body>.
17
30
  const portalHost = usePortalHost();
18
- return _jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", container: portalHost, ...props });
19
- }
20
- function DialogClose({ ...props }) {
21
- return _jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
22
- }
23
- function DialogOverlay({ className, ...props }) {
24
- return (_jsx(DialogPrimitive.Backdrop, { "data-slot": "dialog-overlay", className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className), ...props }));
25
- }
26
- function DialogContent({ className, children, showCloseButton = true, ...props }) {
27
- return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Popup, { "data-slot": "dialog-content", className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-2 right-2", size: "icon-sm" }), children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
28
- }
29
- function DialogHeader({ className, ...props }) {
30
- return (_jsx("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2", className), ...props }));
31
- }
32
- function DialogFooter({ className, showCloseButton = false, children, ...props }) {
33
- return (_jsxs("div", { "data-slot": "dialog-footer", className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end", className), ...props, children: [children, showCloseButton && (_jsx(DialogPrimitive.Close, { render: _jsx(Button, { variant: "outline" }), children: "Close" }))] }));
34
- }
35
- function DialogTitle({ className, ...props }) {
36
- return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn("font-heading text-base leading-none font-medium", className), ...props }));
37
- }
38
- function DialogDescription({ className, ...props }) {
39
- 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 }));
40
- }
31
+ return (_jsx(DialogPrimitive.Portal, { ref: ref, "data-slot": "dialog-portal", container: portalHost ?? undefined, ...props }));
32
+ });
33
+ DialogPortal.displayName = "DialogPortal";
34
+ const DialogClose = React.forwardRef(function DialogClose({ ...props }, ref) {
35
+ return _jsx(DialogPrimitive.Close, { ref: ref, "data-slot": "dialog-close", ...props });
36
+ });
37
+ DialogClose.displayName = "DialogClose";
38
+ const DialogOverlay = React.forwardRef(function DialogOverlay({ className, ...props }, ref) {
39
+ return (_jsx(DialogPrimitive.Backdrop, { ref: ref, "data-slot": "dialog-overlay", className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className), ...props }));
40
+ });
41
+ DialogOverlay.displayName = "DialogOverlay";
42
+ const DialogContent = React.forwardRef(function DialogContent({ className, children, showCloseButton = true, ...props }, ref) {
43
+ return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Popup, { ref: ref, "data-slot": "dialog-content", className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-2 right-2", size: "icon-sm" }), children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
44
+ });
45
+ DialogContent.displayName = "DialogContent";
46
+ const DialogHeader = React.forwardRef(function DialogHeader({ className, ...props }, ref) {
47
+ return (_jsx("div", { ref: ref, "data-slot": "dialog-header", className: cn("flex flex-col gap-2", className), ...props }));
48
+ });
49
+ DialogHeader.displayName = "DialogHeader";
50
+ const DialogFooter = React.forwardRef(function DialogFooter({ className, showCloseButton = false, children, ...props }, ref) {
51
+ return (_jsxs("div", { ref: ref, "data-slot": "dialog-footer", className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end", className), ...props, children: [children, showCloseButton && (_jsx(DialogPrimitive.Close, { render: _jsx(Button, { variant: "outline" }), children: "Close" }))] }));
52
+ });
53
+ DialogFooter.displayName = "DialogFooter";
54
+ const DialogTitle = React.forwardRef(function DialogTitle({ className, ...props }, ref) {
55
+ return (_jsx(DialogPrimitive.Title, { ref: ref, "data-slot": "dialog-title", className: cn("font-heading text-base leading-none font-medium", className), ...props }));
56
+ });
57
+ DialogTitle.displayName = "DialogTitle";
58
+ const DialogDescription = React.forwardRef(function DialogDescription({ className, ...props }, ref) {
59
+ return (_jsx(DialogPrimitive.Description, { ref: ref, "data-slot": "dialog-description", className: cn("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className), ...props }));
60
+ });
61
+ DialogDescription.displayName = "DialogDescription";
41
62
  export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
42
63
  //# sourceMappingURL=dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../src/chat/ui/dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAGZ,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEpC,SAAS,MAAM,CAAC,EAAE,GAAG,KAAK,EAA8B;IACtD,OAAO,KAAC,eAAe,CAAC,IAAI,iBAAW,QAAQ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SAAS,sBAAa,IAChB,CACzB,IACqB,IACX,CAChB,CAAA;AACH,CAAC;AAED,SAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACxE,OAAO,CACL,2BACY,eAAe,EACzB,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,KAC3C,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,YAAY,CAAC,EACpB,SAAS,EACT,eAAe,GAAG,KAAK,EACvB,QAAQ,EACR,GAAG,KAAK,EAGT;IACC,OAAO,CACL,4BACY,eAAe,EACzB,SAAS,EAAE,EAAE,CACX,0GAA0G,EAC1G,SAAS,CACV,KACG,KAAK,aAER,QAAQ,EACR,eAAe,IAAI,CAClB,KAAC,eAAe,CAAC,KAAK,IAAC,MAAM,EAAE,KAAC,MAAM,IAAC,OAAO,EAAC,SAAS,GAAG,sBAEnC,CACzB,IACG,CACP,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACvE,OAAO,CACL,KAAC,eAAe,CAAC,KAAK,iBACV,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,iDAAiD,EACjD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EAC0B;IAClC,OAAO,CACL,KAAC,eAAe,CAAC,WAAW,iBAChB,oBAAoB,EAC9B,SAAS,EAAE,EAAE,CACX,oGAAoG,EACpG,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAA"}
1
+ {"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../src/chat/ui/dialog.tsx"],"names":[],"mappings":"AAAA,YA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;AAEvC,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAGxC,SAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG;IACvD,OAAO,CACL,KAAC,eAAe,CAAC,WAAW,IAC1B,GAAG,EAAE,GAAG,eACE,oBAAoB,EAC9B,SAAS,EAAE,EAAE,CACX,oGAAoG,EACpG,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AACF,iBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAA;AAEnD,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import * as React from "react";
2
- declare function Input({ className, type, ...props }: React.ComponentProps<"input">): import("react/jsx-runtime").JSX.Element;
2
+ declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
3
3
  export { Input };
4
4
  //# sourceMappingURL=input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/chat/ui/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAY1E;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/chat/ui/input.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,QAAA,MAAM,KAAK,8KAeV,CAAA;AAGD,OAAO,EAAE,KAAK,EAAE,CAAA"}
@@ -1,8 +1,15 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Every component in this directory is wrapped in `forwardRef`. React 19 lets a
3
+ // plain function component read `ref` out of its props; React 18 — which this
4
+ // package still supports — strips it, warns, and the ref reaches nothing. Base
5
+ // UI hands refs to whatever it renders, so a plain function here loses them
6
+ // silently. See tests/chat/ui-refs.test.tsx.
7
+ import * as React from "react";
2
8
  import { Input as InputPrimitive } from "@base-ui/react/input";
3
9
  import { cn } from "../lib/cn.js";
4
- function Input({ className, type, ...props }) {
5
- return (_jsx(InputPrimitive, { type: type, "data-slot": "input", className: cn("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className), ...props }));
6
- }
10
+ const Input = React.forwardRef(function Input({ className, type, ...props }, ref) {
11
+ return (_jsx(InputPrimitive, { ref: ref, type: type, "data-slot": "input", className: cn("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className), ...props }));
12
+ });
13
+ Input.displayName = "Input";
7
14
  export { Input };
8
15
  //# sourceMappingURL=input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/chat/ui/input.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAEjC,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAiC;IACzE,OAAO,CACL,KAAC,cAAc,IACb,IAAI,EAAE,IAAI,eACA,OAAO,EACjB,SAAS,EAAE,EAAE,CACX,6oBAA6oB,EAC7oB,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
1
+ {"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/chat/ui/input.tsx"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,8EAA8E;AAC9E,+EAA+E;AAC/E,4EAA4E;AAC5E,6CAA6C;AAC7C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAEjC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG;IAC/C,OAAO,CACL,KAAC,cAAc,IACb,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,eACA,OAAO,EACjB,SAAS,EAAE,EAAE,CACX,6oBAA6oB,EAC7oB,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC,CACF,CAAA;AACD,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA;AAE3B,OAAO,EAAE,KAAK,EAAE,CAAA"}
@@ -1,3 +1,4 @@
1
- declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
1
+ import * as React from "react";
2
+ declare const Skeleton: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
2
3
  export { Skeleton };
3
4
  //# sourceMappingURL=skeleton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../../src/chat/ui/skeleton.tsx"],"names":[],"mappings":"AAEA,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQrE;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
1
+ {"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../../src/chat/ui/skeleton.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,QAAA,MAAM,QAAQ,mKAWb,CAAA;AAGD,OAAO,EAAE,QAAQ,EAAE,CAAA"}
@@ -1,7 +1,14 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Every component in this directory is wrapped in `forwardRef`. React 19 lets a
3
+ // plain function component read `ref` out of its props; React 18 — which this
4
+ // package still supports — strips it, warns, and the ref reaches nothing. Its
5
+ // props type advertises a `ref`, so a plain function here breaks that promise
6
+ // on 18. See tests/chat/ui-refs.test.tsx.
7
+ import * as React from "react";
2
8
  import { cn } from "../lib/cn.js";
3
- function Skeleton({ className, ...props }) {
4
- return (_jsx("div", { "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-muted", className), ...props }));
5
- }
9
+ const Skeleton = React.forwardRef(function Skeleton({ className, ...props }, ref) {
10
+ return (_jsx("div", { ref: ref, "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-muted", className), ...props }));
11
+ });
12
+ Skeleton.displayName = "Skeleton";
6
13
  export { Skeleton };
7
14
  //# sourceMappingURL=skeleton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton.js","sourceRoot":"","sources":["../../../src/chat/ui/skeleton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAEjC,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACpE,OAAO,CACL,2BACY,UAAU,EACpB,SAAS,EAAE,EAAE,CAAC,mCAAmC,EAAE,SAAS,CAAC,KACzD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
1
+ {"version":3,"file":"skeleton.js","sourceRoot":"","sources":["../../../src/chat/ui/skeleton.tsx"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAC9E,0CAA0C;AAC1C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAEjC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG;IAC5C,OAAO,CACL,cACE,GAAG,EAAE,GAAG,eACE,UAAU,EACpB,SAAS,EAAE,EAAE,CAAC,mCAAmC,EAAE,SAAS,CAAC,KACzD,KAAK,GACT,CACH,CAAA;AACH,CAAC,CACF,CAAA;AACD,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAA;AAEjC,OAAO,EAAE,QAAQ,EAAE,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import * as React from "react";
2
- declare function Textarea({ className, ...props }: React.ComponentProps<"textarea">): import("react/jsx-runtime").JSX.Element;
2
+ declare const Textarea: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
3
3
  export { Textarea };
4
4
  //# sourceMappingURL=textarea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/chat/ui/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,2CAW1E;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
1
+ {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/chat/ui/textarea.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,QAAA,MAAM,QAAQ,0LAeZ,CAAA;AAGF,OAAO,EAAE,QAAQ,EAAE,CAAA"}
@@ -1,7 +1,14 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Every component in this directory is wrapped in `forwardRef`. React 19 lets a
3
+ // plain function component read `ref` out of its props; React 18 — which this
4
+ // package still supports — strips it, warns, and the ref reaches nothing. Its
5
+ // props type advertises a `ref`, so a plain function here breaks that promise
6
+ // on 18. See tests/chat/ui-refs.test.tsx.
7
+ import * as React from "react";
2
8
  import { cn } from "../lib/cn.js";
3
- function Textarea({ className, ...props }) {
4
- return (_jsx("textarea", { "data-slot": "textarea", className: cn("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className), ...props }));
5
- }
9
+ const Textarea = React.forwardRef(function Textarea({ className, ...props }, ref) {
10
+ return (_jsx("textarea", { ref: ref, "data-slot": "textarea", className: cn("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className), ...props }));
11
+ });
12
+ Textarea.displayName = "Textarea";
6
13
  export { Textarea };
7
14
  //# sourceMappingURL=textarea.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/chat/ui/textarea.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAEjC,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoC;IACzE,OAAO,CACL,gCACY,UAAU,EACpB,SAAS,EAAE,EAAE,CACX,whBAAwhB,EACxhB,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
1
+ {"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/chat/ui/textarea.tsx"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAC9E,0CAA0C;AAC1C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAEjC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAG/B,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG;IAC9C,OAAO,CACL,mBACE,GAAG,EAAE,GAAG,eACE,UAAU,EACpB,SAAS,EAAE,EAAE,CACX,whBAAwhB,EACxhB,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AACF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAA;AAEjC,OAAO,EAAE,QAAQ,EAAE,CAAA"}
@@ -1,7 +1,8 @@
1
+ import * as React from "react";
1
2
  import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
2
3
  declare function TooltipProvider({ delay, ...props }: TooltipPrimitive.Provider.Props): import("react/jsx-runtime").JSX.Element;
3
4
  declare function Tooltip({ ...props }: TooltipPrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
4
- declare function TooltipTrigger({ ...props }: TooltipPrimitive.Trigger.Props): import("react/jsx-runtime").JSX.Element;
5
- declare function TooltipContent({ className, side, sideOffset, align, alignOffset, children, ...props }: TooltipPrimitive.Popup.Props & Pick<TooltipPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): import("react/jsx-runtime").JSX.Element;
5
+ declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.Trigger.Props<unknown>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const TooltipContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/tooltip").TooltipPopupProps & Pick<import("@base-ui/react/tooltip").TooltipPositionerProps, "align" | "alignOffset" | "side" | "sideOffset">, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
7
  export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
7
8
  //# sourceMappingURL=tooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/chat/ui/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAIpE,iBAAS,eAAe,CAAC,EACvB,KAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,CAAC,QAAQ,CAAC,KAAK,2CAQjC;AAED,iBAAS,OAAO,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,CAAC,IAAI,CAAC,KAAK,2CAEzD;AAED,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,CAAC,OAAO,CAAC,KAAK,2CAEnE;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,IAAY,EACZ,UAAc,EACd,KAAgB,EAChB,WAAe,EACf,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,gBAAgB,CAAC,KAAK,CAAC,KAAK,GAC7B,IAAI,CACF,gBAAgB,CAAC,UAAU,CAAC,KAAK,EACjC,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,YAAY,CAChD,2CA4BF;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA"}
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/chat/ui/tooltip.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAIpE,iBAAS,eAAe,CAAC,EACvB,KAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,CAAC,QAAQ,CAAC,KAAK,2CAQjC;AAED,iBAAS,OAAO,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,CAAC,IAAI,CAAC,KAAK,2CAEzD;AAED,QAAA,MAAM,cAAc,gIAWlB,CAAA;AAGF,QAAA,MAAM,cAAc,yPAmDlB,CAAA;AAGF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA"}
@@ -1,4 +1,15 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Every component in this directory that renders a DOM element is wrapped in
3
+ // `forwardRef`. React 19 lets a plain function component read `ref` out of its
4
+ // props; React 18 — which this package still supports — strips it, warns, and
5
+ // the ref reaches nothing. Base UI hands refs to whatever it renders, so a
6
+ // plain function here loses them silently. See tests/chat/ui-refs.test.tsx.
7
+ //
8
+ // `TooltipProvider` and `Tooltip` are the exceptions: Base UI's `Tooltip.Provider`
9
+ // and `Tooltip.Root` render no element of their own, take no `ref`, and so
10
+ // neither do these. Wrapping them would advertise a ref that nothing could ever
11
+ // attach.
12
+ import * as React from "react";
2
13
  import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
3
14
  import { cn } from "../lib/cn.js";
4
15
  import { usePortalHost } from "../lib/portal-host.js";
@@ -8,15 +19,21 @@ function TooltipProvider({ delay = 0, ...props }) {
8
19
  function Tooltip({ ...props }) {
9
20
  return _jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props });
10
21
  }
11
- function TooltipTrigger({ ...props }) {
12
- return _jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
13
- }
14
- function TooltipContent({ className, side = "top", sideOffset = 4, align = "center", alignOffset = 0, children, ...props }) {
22
+ const TooltipTrigger = React.forwardRef(function TooltipTrigger({ ...props }, ref) {
23
+ return (_jsx(TooltipPrimitive.Trigger, { ref: ref, "data-slot": "tooltip-trigger", ...props }));
24
+ });
25
+ TooltipTrigger.displayName = "TooltipTrigger";
26
+ const TooltipContent = React.forwardRef(function TooltipContent({ className, side = "top", sideOffset = 4, align = "center", alignOffset = 0, children, ...props }, ref) {
15
27
  // Portals default to <body>, outside the element the whole stylesheet is
16
- // scoped to — a tooltip there would render unstyled. Null (no chat around it)
17
- // means the default, which is what a standalone use of this file wants.
28
+ // scoped to — a tooltip there would render unstyled — so inside a chat this
29
+ // goes to its portal host instead. Outside one the hook returns null, and an
30
+ // explicit null container is NOT the same as omitting it: Base UI reads it as
31
+ // a container it has not resolved yet and renders nothing at all. Passing
32
+ // undefined is what actually asks for the default. See
33
+ // tests/chat/ui-standalone.test.tsx, which fails without the coalesce.
18
34
  const portalHost = usePortalHost();
19
- return (_jsx(TooltipPrimitive.Portal, { container: portalHost, children: _jsx(TooltipPrimitive.Positioner, { align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, className: "isolate z-50", children: _jsxs(TooltipPrimitive.Popup, { "data-slot": "tooltip-content", className: cn("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })] }) }) }));
20
- }
35
+ return (_jsx(TooltipPrimitive.Portal, { container: portalHost ?? undefined, children: _jsx(TooltipPrimitive.Positioner, { align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, className: "isolate z-50", children: _jsxs(TooltipPrimitive.Popup, { ref: ref, "data-slot": "tooltip-content", className: cn("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })] }) }) }));
36
+ });
37
+ TooltipContent.displayName = "TooltipContent";
21
38
  export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
22
39
  //# sourceMappingURL=tooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/chat/ui/tooltip.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACpE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAA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EACd,KAAK,GAAG,QAAQ,EAChB,WAAW,GAAG,CAAC,EACf,QAAQ,EACR,GAAG,KAAK,EACT,EACD,GAAG;IAEH,yEAAyE;IACzE,4EAA4E;IAC5E,6EAA6E;IAC7E,8EAA8E;IAC9E,0EAA0E;IAC1E,uDAAuD;IACvD,uEAAuE;IACvE,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAClC,OAAO,CACL,KAAC,gBAAgB,CAAC,MAAM,IAAC,SAAS,EAAE,UAAU,IAAI,SAAS,YACzD,KAAC,gBAAgB,CAAC,UAAU,IAC1B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,SAAS,EAAC,cAAc,YAExB,MAAC,gBAAgB,CAAC,KAAK,IACrB,GAAG,EAAE,GAAG,eACE,iBAAiB,EAC3B,SAAS,EAAE,EAAE,CACX,iwBAAiwB,EACjwB,SAAS,CACV,KACG,KAAK,aAER,QAAQ,EACT,KAAC,gBAAgB,CAAC,KAAK,IAAC,SAAS,EAAC,0hBAA0hB,GAAG,IACxiB,GACG,GACN,CAC3B,CAAA;AACH,CAAC,CAAC,CAAA;AACF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAA;AAE7C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { ThreadListPrimitive } from "@assistant-ui/react";
2
2
  import { type ComponentPropsWithoutRef, type FC } from "react";
3
3
  export declare const ThreadList: FC;
4
- export declare const ThreadListSearch: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement>, "ref">, "value" | "onChange"> & {
4
+ export declare const ThreadListSearch: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>, "ref">, "value" | "onChange"> & {
5
5
  value: string;
6
6
  onValueChange: (value: string) => void;
7
7
  } & import("react").RefAttributes<HTMLInputElement>>;
@@ -27,10 +27,10 @@ export declare const useThreadListGroups: (searchQuery?: string) => {
27
27
  filteredIndices: number[];
28
28
  groups: ThreadListGroup[];
29
29
  };
30
- export declare const ThreadListNew: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").ButtonProps & import("class-variance-authority").VariantProps<(props?: ({
30
+ export declare const ThreadListNew: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ButtonProps & import("class-variance-authority").VariantProps<(props?: ({
31
31
  variant?: "default" | "link" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
32
32
  size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
33
- } & import("class-variance-authority/types").ClassProp) | undefined) => string>, "ref"> & {
33
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string>, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & {
34
34
  labelClassName?: string;
35
35
  } & import("react").RefAttributes<HTMLButtonElement>>;
36
36
  export declare const ThreadListItem: FC;
@@ -1 +1 @@
1
- {"version":3,"file":"thread-list.aui.d.ts","sourceRoot":"","sources":["../../../src/chat/vendor/thread-list.aui.tsx"],"names":[],"mappings":"AAOA,OAAO,EAIL,mBAAmB,EAGpB,MAAM,qBAAqB,CAAC;AAU7B,OAAO,EAOL,KAAK,wBAAwB,EAC7B,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAEf,eAAO,MAAM,UAAU,EAAE,EAaxB,CAAC;AAEF,eAAO,MAAM,gBAAgB;WAGlB,MAAM;mBACE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;oDAqBxC,CAAC;AAIH,eAAO,MAAM,cAAc,EAAE,EAAE,CAC7B,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAS1D,CAAC;AA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Aa;;;;qBAEqC,MAAM;qDA2BnE,CAAC;AAyBH,eAAO,MAAM,cAAc,EAAE,EAiD5B,CAAC"}
@@ -6,7 +6,7 @@ import { Skeleton } from "../ui/skeleton.js";
6
6
  import { cn } from "../lib/cn.js";
7
7
  import { usePortalHost } from "../lib/portal-host.js";
8
8
  import { AuiIf, ThreadListItemMorePrimitive, ThreadListItemPrimitive, ThreadListPrimitive, useAui, useAuiState, } from "@assistant-ui/react";
9
- import { ArchiveIcon, Loader2Icon, MoreHorizontalIcon, PencilIcon, PlusIcon, SearchIcon, TrashIcon, } from "lucide-react";
9
+ import { Loader2Icon, MoreHorizontalIcon, PencilIcon, PlusIcon, SearchIcon, TrashIcon, } from "lucide-react";
10
10
  import { forwardRef, Fragment, useEffect, useMemo, useRef, useState, } from "react";
11
11
  export const ThreadList = () => {
12
12
  const [search, setSearch] = useState("");
@@ -14,7 +14,7 @@ export const ThreadList = () => {
14
14
  return (_jsxs(ThreadListRoot, { children: [_jsx(ThreadListNew, {}), hasThreads && (_jsx(ThreadListSearch, { value: search, onValueChange: setSearch })), _jsx(ThreadListItems, { searchQuery: hasThreads ? search : "" })] }));
15
15
  };
16
16
  export const ThreadListSearch = forwardRef(({ className, value, onValueChange, ...props }, ref) => {
17
- return (_jsxs("div", { "data-slot": "aui_thread-list-search", className: "relative px-0.5 py-1", children: [_jsx(SearchIcon, { "data-slot": "aui_thread-list-search-icon", className: "text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2" }), _jsx(Input, { ref: ref, type: "search", value: value, onChange: (event) => onValueChange(event.target.value), "aria-label": "Search threads", placeholder: "Search threads", className: cn("h-8 ps-8 text-sm", className), ...props })] }));
17
+ return (_jsxs("div", { "data-slot": "aui_thread-list-search", className: "relative px-0.5 py-1", children: [_jsx(SearchIcon, { "data-slot": "aui_thread-list-search-icon", className: "text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2" }), _jsx(Input, { ref: ref, type: "search", value: value, onChange: (event) => onValueChange(event.target.value), "aria-label": "Search chats", placeholder: "Search chats", className: cn("h-8 ps-8 text-sm", className), ...props })] }));
18
18
  });
19
19
  ThreadListSearch.displayName = "ThreadListSearch";
20
20
  export const ThreadListRoot = ({ className, ...props }) => {
@@ -46,7 +46,7 @@ export const useThreadListGroups = (searchQuery = "") => {
46
46
  const filteredIndices = threadIds
47
47
  .map((id, index) => ({ id, index }))
48
48
  .filter(({ id }) => !query ||
49
- (itemsById.get(id)?.title || "New Chat")
49
+ (itemsById.get(id)?.title || "New chat")
50
50
  .toLowerCase()
51
51
  .includes(query))
52
52
  .map(({ index }) => index);
@@ -75,7 +75,7 @@ const ThreadListItemGroups = ({ searchQuery = "", }) => {
75
75
  const { threadIds, filteredIndices, groups } = useThreadListGroups(searchQuery);
76
76
  const query = searchQuery.trim();
77
77
  if (query && filteredIndices.length === 0) {
78
- return (_jsx("div", { "data-slot": "aui_thread-list-empty", className: "text-muted-foreground px-2.5 py-4 text-sm", children: "No threads found" }));
78
+ return (_jsx("div", { "data-slot": "aui_thread-list-empty", className: "text-muted-foreground px-2.5 py-4 text-sm", children: "No chats found" }));
79
79
  }
80
80
  if (!groups) {
81
81
  return filteredIndices.map((index) => (_jsx(ThreadListPrimitive.ItemByIndex, { index: index, components: { ThreadListItem } }, threadIds[index])));
@@ -83,7 +83,7 @@ const ThreadListItemGroups = ({ searchQuery = "", }) => {
83
83
  return groups.map((group) => (_jsxs(Fragment, { children: [_jsx("div", { "data-slot": "aui_thread-list-group-label", className: "text-muted-foreground px-2.5 pt-3 pb-1 text-xs font-medium", children: group.label }), group.indices.map((index) => (_jsx(ThreadListPrimitive.ItemByIndex, { index: index, components: { ThreadListItem } }, threadIds[index])))] }, group.label)));
84
84
  };
85
85
  export const ThreadListNew = forwardRef(({ className, labelClassName, children, ...props }, ref) => {
86
- return (_jsx(ThreadListPrimitive.New, { render: _jsx(Button, { ref: ref, variant: "ghost", "data-slot": "aui_thread-list-new", className: cn("hover:bg-muted data-active:bg-muted h-8 justify-start gap-2 rounded-md px-2.5 text-sm font-normal", className), ...props }), children: children ?? (_jsxs(_Fragment, { children: [_jsx(PlusIcon, { "data-slot": "aui_thread-list-new-icon", className: "size-4 shrink-0" }), _jsx("span", { "data-slot": "aui_thread-list-new-label", className: cn("whitespace-nowrap", labelClassName), children: "New Thread" })] })) }));
86
+ return (_jsx(ThreadListPrimitive.New, { render: _jsx(Button, { ref: ref, variant: "ghost", "data-slot": "aui_thread-list-new", className: cn("hover:bg-muted data-active:bg-muted h-8 justify-start gap-2 rounded-md px-2.5 text-sm font-normal", className), ...props }), children: children ?? (_jsxs(_Fragment, { children: [_jsx(PlusIcon, { "data-slot": "aui_thread-list-new-icon", className: "size-4 shrink-0" }), _jsx("span", { "data-slot": "aui_thread-list-new-label", className: cn("whitespace-nowrap", labelClassName), children: "New chat" })] })) }));
87
87
  });
88
88
  ThreadListNew.displayName = "ThreadListNew";
89
89
  const ThreadListSkeleton = () => {
@@ -103,7 +103,7 @@ export const ThreadListItem = () => {
103
103
  return (_jsxs(ThreadListItemPrimitive.Root, { "data-slot": "aui_thread-list-item", className: "group hover:bg-muted focus-visible:bg-muted data-active:bg-muted has-focus-visible:bg-muted has-data-[state=open]:bg-muted relative flex h-8 items-center rounded-md transition-colors focus-visible:outline-none", children: [isRenaming ? (_jsx(ThreadListItemRename, { onDone: (restoreFocus) => {
104
104
  restoreFocusRef.current = restoreFocus;
105
105
  setIsRenaming(false);
106
- } })) : (_jsxs(ThreadListItemPrimitive.Trigger, { ref: triggerRef, "data-slot": "aui_thread-list-item-trigger", className: "focus-visible:ring-ring/50 flex h-full min-w-0 flex-1 items-center rounded-md px-2.5 text-start text-sm outline-none group-hover:pe-9 group-has-focus-visible:pe-9 group-has-data-[state=open]:pe-9 group-data-active:pe-9 focus-visible:ring-1", children: [isRunning && (_jsx(Loader2Icon, { "aria-hidden": true, "data-slot": "aui_thread-list-item-running", className: "text-muted-foreground me-1.5 size-3.5 shrink-0 animate-spin" })), _jsx("span", { "data-slot": "aui_thread-list-item-title", className: "min-w-0 flex-1 truncate", children: _jsx(ThreadListItemPrimitive.Title, { fallback: "New Chat" }) }), isRunning && _jsx("span", { className: "sr-only", children: "Running" })] })), _jsx(ThreadListItemMore, { onRename: () => setIsRenaming(true) })] }));
106
+ } })) : (_jsxs(ThreadListItemPrimitive.Trigger, { ref: triggerRef, "data-slot": "aui_thread-list-item-trigger", className: "focus-visible:ring-ring/50 flex h-full min-w-0 flex-1 items-center rounded-md px-2.5 text-start text-sm outline-none group-hover:pe-9 group-has-focus-visible:pe-9 group-has-data-[state=open]:pe-9 group-data-active:pe-9 focus-visible:ring-1", children: [isRunning && (_jsx(Loader2Icon, { "aria-hidden": true, "data-slot": "aui_thread-list-item-running", className: "text-muted-foreground me-1.5 size-3.5 shrink-0 animate-spin" })), _jsx("span", { "data-slot": "aui_thread-list-item-title", className: "min-w-0 flex-1 truncate", children: _jsx(ThreadListItemPrimitive.Title, { fallback: "New chat" }) }), isRunning && _jsx("span", { className: "sr-only", children: "Running" })] })), _jsx(ThreadListItemMore, { onRename: () => setIsRenaming(true) })] }));
107
107
  };
108
108
  const ThreadListItemRename = ({ onDone }) => {
109
109
  const aui = useAui();
@@ -153,6 +153,6 @@ const ThreadListItemMore = ({ onRename }) => {
153
153
  // Radix portals this menu to <body>, outside the chat's scoped stylesheet,
154
154
  // so without a container it renders with no background, border or padding.
155
155
  const portalHost = usePortalHost();
156
- return (_jsxs(ThreadListItemMorePrimitive.Root, { sharedFocusGroup: true, children: [_jsxs(ThreadListItemMorePrimitive.Trigger, { render: _jsx(Button, { variant: "ghost", size: "icon", "data-slot": "aui_thread-list-item-more", className: "data-[state=open]:bg-accent absolute end-1.5 top-1/2 size-6 -translate-y-1/2 p-0 opacity-0 group-hover:opacity-100 group-has-focus-visible:opacity-100 group-data-active:opacity-100 data-[state=open]:opacity-100" }), children: [_jsx(MoreHorizontalIcon, { className: "size-3.5" }), _jsx("span", { className: "sr-only", children: "More options" })] }), _jsxs(ThreadListItemMorePrimitive.Content, { portalProps: { container: portalHost }, side: "right", align: "start", sideOffset: 6, "data-slot": "aui_thread-list-item-more-content", className: "bg-popover text-popover-foreground data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out 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 z-50 min-w-32 overflow-hidden rounded-xl border p-1.5", children: [_jsxs(ThreadListItemMorePrimitive.Item, { "data-slot": "aui_thread-list-item-more-item", className: "hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground flex cursor-pointer items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm outline-none select-none", onSelect: onRename, children: [_jsx(PencilIcon, { className: "size-4" }), "Rename"] }), _jsxs(ThreadListItemPrimitive.Archive, { render: _jsx(ThreadListItemMorePrimitive.Item, { "data-slot": "aui_thread-list-item-more-item", className: "hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground flex cursor-pointer items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm outline-none select-none" }), children: [_jsx(ArchiveIcon, { className: "size-4" }), "Archive"] }), _jsxs(ThreadListItemPrimitive.Delete, { render: _jsx(ThreadListItemMorePrimitive.Item, { "data-slot": "aui_thread-list-item-more-item", className: "text-destructive hover:bg-destructive/10 hover:text-destructive focus:bg-destructive/10 focus:text-destructive flex cursor-pointer items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm outline-none select-none" }), children: [_jsx(TrashIcon, { className: "size-4" }), "Delete"] })] })] }));
156
+ return (_jsxs(ThreadListItemMorePrimitive.Root, { sharedFocusGroup: true, children: [_jsxs(ThreadListItemMorePrimitive.Trigger, { render: _jsx(Button, { variant: "ghost", size: "icon", "data-slot": "aui_thread-list-item-more", className: "data-[state=open]:bg-accent absolute end-1.5 top-1/2 size-6 -translate-y-1/2 p-0 opacity-0 group-hover:opacity-100 group-has-focus-visible:opacity-100 group-data-active:opacity-100 data-[state=open]:opacity-100" }), children: [_jsx(MoreHorizontalIcon, { className: "size-3.5" }), _jsx("span", { className: "sr-only", children: "More options" })] }), _jsxs(ThreadListItemMorePrimitive.Content, { portalProps: { container: portalHost }, side: "right", align: "start", sideOffset: 6, "data-slot": "aui_thread-list-item-more-content", className: "bg-popover text-popover-foreground data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out 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 z-50 min-w-32 overflow-hidden rounded-xl border p-1.5", children: [_jsxs(ThreadListItemMorePrimitive.Item, { "data-slot": "aui_thread-list-item-more-item", className: "hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground flex cursor-pointer items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm outline-none select-none", onSelect: onRename, children: [_jsx(PencilIcon, { className: "size-4" }), "Rename"] }), _jsxs(ThreadListItemPrimitive.Delete, { render: _jsx(ThreadListItemMorePrimitive.Item, { "data-slot": "aui_thread-list-item-more-item", className: "text-destructive hover:bg-destructive/10 hover:text-destructive focus:bg-destructive/10 focus:text-destructive flex cursor-pointer items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm outline-none select-none" }), children: [_jsx(TrashIcon, { className: "size-4" }), "Delete"] })] })] }));
157
157
  };
158
158
  //# sourceMappingURL=thread-list.aui.js.map