import type { ReactNode } from "react"; import { type StepSuggestion } from "../stepAutocomplete"; import { type SnippetSuggestion } from "../snippetAutocomplete"; type Suggestion = StepSuggestion | SnippetSuggestion; type StepFieldProps = { label: string; showLabel?: boolean; labelToggle?: { onClick: () => void; expanded: boolean; }; labelAction?: ReactNode; placeholder?: string; value: string; onChange: (nextValue: string) => void; autoFocus?: boolean; focusSignal?: number; multiline?: boolean; disableNewlines?: boolean; enableAutocomplete?: boolean; fieldName?: string; suggestionFilter?: (suggestion: Suggestion) => boolean; suggestionsOverride?: Suggestion[]; onSuggestionSelect?: (suggestion: Suggestion) => void; readOnly?: boolean; showSuggestionsOnFocus?: boolean; enableImageUpload?: boolean; onImageFile?: (file: File) => Promise | void; rightAction?: ReactNode; showFormattingButtons?: boolean; showImageButton?: boolean; onFieldFocus?: () => void; /** * Reading-focused presentation: suppresses the toolbar and tightens the * field so it reads like plain text. The OverType editor stays mounted so * focusing the field (which expands the step) preserves the caret. */ compact?: boolean; /** * True whenever the step's view is compact, regardless of whether this field * is currently collapsed or expanded. Used to drop the editor's tall * min-height floor so reading rows hug their content — kept separate from * `compact` so it stays stable across focus and never re-lays-out on expand. */ compactMode?: boolean; }; export type LinkMeta = { start: number; end: number; url: string; }; export type FormattingMeta = { start: number; end: number; type: "bold" | "italic" | "code"; }; type FormatType = "bold" | "italic" | "code"; /** * Remove formatting and link entries that conflict with applying `fmtType` * over the half-open range [start, end). Exclusion rules: * - code: exclusive with everything — drops any overlapping formatting and links * - bold/italic: coexist with each other, but exclusive with code and links * — drops overlapping same-type, overlapping code, and overlapping links */ export declare function applyInlineExclusion(formatting: FormattingMeta[], links: LinkMeta[], start: number, end: number, fmtType: FormatType): { formatting: FormattingMeta[]; links: LinkMeta[]; }; export declare function stripInlineMarkdown(markdown: string): { plainText: string; links: LinkMeta[]; formatting: FormattingMeta[]; }; export declare function buildFullMarkdown(plainText: string, links: LinkMeta[], formatting: FormattingMeta[]): string; /** * Lightweight, non-interactive stand-in for {@link StepField}. Mounts no * OverType editor, observers, or event handlers — just a styled * `.bn-step-editor--preview` box whose markdown is rendered declaratively. Used * for every step that isn't currently being edited. */ export declare function StepFieldPreview({ value, fieldName, multiline, }: { value: string; fieldName?: string; multiline?: boolean; }): import("react/jsx-runtime").JSX.Element; export declare function StepField({ label, showLabel, labelToggle, labelAction, placeholder, value, onChange, autoFocus, focusSignal, multiline, disableNewlines, enableAutocomplete, fieldName, suggestionFilter, suggestionsOverride, onSuggestionSelect, readOnly, showSuggestionsOnFocus, enableImageUpload, onImageFile, rightAction, showFormattingButtons, showImageButton, onFieldFocus, compact, compactMode, }: StepFieldProps): import("react/jsx-runtime").JSX.Element; export {};