/** * ChatActions — the composer's `+` menu, forked dependency-light 1:1 from * Studio's `PromptMenuContent`. A DropdownMenu with the built-in attach rows * ("Attach Files or Photos", "Attach Figma File") and a "Settings" submenu of * toggle rows (auto-send queue, autofix errors). * * Studio composes `PromptMenuContent` *inside* a caller-owned `DropdownMenu`; * here `ChatActions` is the whole self-contained menu (trigger + content) so it * drops into a composer with a small, focused prop surface. * * @module react/components/chat/chat-actions */ import * as React from "react"; import { ChatActionsTrigger } from "./chat-actions-trigger.js"; import type { ChatActionsContentProps, ChatActionsContextValue, ChatActionsItemProps, ChatActionsProps } from "./chat-actions.types.js"; export type * from "./chat-actions.types.js"; /** * Read the current `ChatActions` preset configuration from a composed * `ChatActions.*` part. Throws outside `ChatActions` / `ChatActions.Root`. */ export declare const useChatActions: () => ChatActionsContextValue; /** * `ChatActions.Root` — the `DropdownMenu` wrapper + context provider. No * children renders the default preset (`Trigger` + `Content` with the attach * row, `actions`, and `settings` submenu); pass children to recompose. Portals * its surface via `Floating` (DropdownMenu) so it never clips inside the * composer or a Storybook iframe. */ declare function ChatActionsRoot({ actions, onAttachFiles, attachFilesLabel, settings, trigger, open, defaultOpen, onOpenChange, className, children, }: ChatActionsProps): React.ReactElement; declare namespace ChatActionsRoot { var displayName: string; } /** * `ChatActions.Content` — the portalled dropdown surface. Pass `ChatActions.Item` * children (or your own rows). `className` merges onto the menu surface. */ declare function ChatActionsContent({ children, align, className, ref }: ChatActionsContentProps): React.ReactElement; declare namespace ChatActionsContent { var displayName: string; } /** * `ChatActions.Item` — a single action row. Wraps `DropdownMenuItem` (so it * closes the menu on select). `className` merges onto the row. */ declare function ChatActionsItem({ children, icon, onSelect, title, disabled, className, ref }: ChatActionsItemProps): React.ReactElement; declare namespace ChatActionsItem { var displayName: string; } /** * `ChatActions.Preset` — the default menu body (attach row + `actions` + * `settings` submenu), driven from `useChatActions()`. Rendered by the preset * path; also exported so a composed `ChatActions.Content` can drop the whole * data-driven body back in alongside custom rows. */ declare function ChatActionsPreset(): React.ReactElement; declare namespace ChatActionsPreset { var displayName: string; } /** * ChatActions — render `` for the * default preset menu, or compose `ChatActions.Trigger` / `Content` / `Item` * (each reads `useChatActions()`) for a custom menu. Mirrors the `ToolCall` * compound: render it, or compose it. */ export declare const ChatActions: typeof ChatActionsRoot & { Root: typeof ChatActionsRoot; Trigger: typeof ChatActionsTrigger; Content: typeof ChatActionsContent; Item: typeof ChatActionsItem; Preset: typeof ChatActionsPreset; }; //# sourceMappingURL=chat-actions.d.ts.map