import { type ReactNode } from 'react'; import type { WithChildren } from '../../../core/types/with-children.js'; /** * Slot component that enables the actions menu in an editor. * * Must be a direct child of the editor (e.g. `CodeEditor.ActionsMenu` inside `CodeEditor`). * Rendering it displays a single Copy button. With a `Download` slot or custom * menu items as children, the button turns into a menu trigger. * @public */ export declare const ActionsMenu: (props: WithChildren) => null; /** * Props for the `Download` slot of an editor's actions menu. * @public */ export interface EditorDownloadProps { /** * Name of the downloaded file. If no extension is provided, it is derived * from the editor. Both the filename and extension are sanitized to keep * only letters, digits, `-`, and `_`. * If omitted, the editor provides a default file name. */ fileName?: string; /** * Callback fired when the download action is triggered. */ onDownload?: () => void; } /** * Slot that enables a Download action in the actions menu of an editor. * * Must be placed inside the editor's `ActionsMenu` slot * (e.g. `CodeEditor.Download` inside `CodeEditor.ActionsMenu`). It has no effect elsewhere. * @public */ export declare const Download: (props: EditorDownloadProps) => null; /** * Returns the children of the `ActionsMenu` slot among `children`, * or `undefined` when the slot isn't used. Other children are ignored, with a * dev warning whenever an unsupported child appears. * @param children - The children of the editor. * @param slot - The `ActionsMenu` slot component of the editor. * @internal */ export declare function useActionsMenuSlot(children: ReactNode, slot?: typeof ActionsMenu): { children: ReactNode; } | undefined; /** * Splits the `Download` slot from the remaining children of an `ActionsMenu`. * A repeated `Download` keeps the last occurrence. * @param children - The children of the `ActionsMenu` slot. * @internal */ export declare function splitDownloadSlot(children: ReactNode): { download?: EditorDownloadProps; rest: ReactNode[]; }; //# sourceMappingURL=slots.d.ts.map