import type { ReactNode } from "react"; import type { SlotProps } from "../slotProps.ts"; export type MarkdownImageUpload = { /** Alt text. Defaults to the file's name when omitted. */ alt?: string; /** Where the image now lives. Inserted verbatim. */ url: string; }; /** * The toolbar's glyphs, by action. * * **No default, and none shipped** — this package ships no icons, * and a `⋯`/`▨` default renders as nothing where the font lacks it * ([decision](../../../../docs/decisions/2026-07-29-ship-no-icons-and-no-symbol-glyphs.md)). * With no icons the toolbar is nine word buttons, which works * everywhere and collapses into the overflow menu early; an app * that brings lucide gets a compact bar and keeps the words as the * accessible names. * * `overflow` is the odd one out: it is not a markdown command, it * is the **bar's own** trigger. It lives here because an app that * passes the nine and not the tenth gets nine icons followed by * the words *"More actions"* — which is the one width where an * icon bar looks unfinished, and there was no prop to fix it with. */ export type MarkdownEditorIcons = Partial>; export type MarkdownEditorProps = SlotProps & { className?: string; /** * **Initial** only. This control is uncontrolled, and the long * reason is in the doc comment below — it is the whole design. */ defaultValue?: string; /** See `MarkdownEditorIcons`. */ icons?: MarkdownEditorIcons; isDisabled?: boolean; isReadOnly?: boolean; /** * The accessible name, as `aria-label`. Omit it inside a `Field`, * which supplies a real `