import "./markdown.css"; import "./markdown_editor.css"; import type { Commit } from "./commit_mode"; /** * WHAT THIS EDITOR IS, which decides the box it draws. * * `"document"` (the default) is a soft 16px sheet — a knowledge doc, a settings * screen, anywhere the editor is the page's subject. `"field"` makes it a row of * a record: the control's own corner AND the control's own text inset, which a * document sets further in. */ export type MarkdownSurface = "document" | "field"; export interface MarkdownEditorBase { /** Which box the editor draws — see {@link MarkdownSurface}. Default "document". */ surface?: MarkdownSurface; /** Show the formatting toolbar. Defaults to ON for a `document` and OFF for a * `field`, where it would be a band arriving with the edit and moving * everything under it. */ toolbar?: boolean; placeholder?: string; /** A LARGER floor, in lines — never a height, and never a smaller one. On a * `field` anything under the note floor IS that floor: "always multi-line" is * an invariant of a note. */ numberOfLines?: number; disabled?: boolean; autoFocus?: boolean; /** Accessible name. Required in spirit whenever the field's visible label is * a sibling rather than a wrapping `FormField` — a `DetailRow`, a record row. */ accessibilityLabel?: string; testID?: string; onFocus?: () => void; onBlur?: () => void; } export type MarkdownEditorProps = MarkdownEditorBase & Commit; /** * WYSIWYG markdown editor. Users edit rich text directly; the value stays a plain * markdown string, and the ProseMirror engine lives in `@lotics/markdown-editor`. * * **ONE element, always mounted — it does not swap**, so the box never changes * height and a reader can select a sentence out of their own note. It costs a * ProseMirror view per field whether or not anyone edits. */ export declare function MarkdownEditor(props: MarkdownEditorProps): import("react").JSX.Element;