/** * GFM- and Obsidian-style callouts (alerts / admonitions). * * A callout is a blockquote whose first line is a type marker: * * ``` * > [!NOTE] * > Body text. * ``` * * Obsidian extends it with a fold indicator and a custom title on the marker * line — `> [!warning]- Collapsed by default` — where `-` starts closed and `+` * starts open. * * The type keyword is normalized to a small set of visual kinds here rather * than in each renderer, so every consumer styles the same twenty-odd aliases * the same way. * * @see https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts * @see https://help.obsidian.md/callouts */ /** The visual families a callout type can map to; each drives a colour + icon. */ export type CalloutKind = "note" | "abstract" | "info" | "todo" | "tip" | "success" | "question" | "warning" | "failure" | "danger" | "bug" | "example" | "quote"; /** Resolve a type keyword to its visual kind (defaults to `note`). */ export declare function calloutKindForType(type: string): CalloutKind; export interface CalloutMarker { /** The normalized type keyword, always lowercase (e.g. `note`). */ type: string; kind: CalloutKind; /** Author-supplied title from the marker line, when there was one. */ title?: string; /** Set only when a `-`/`+` fold indicator made the callout collapsible. */ fold?: "open" | "closed"; /** Length of the matched marker, for slicing it off the body. */ matchLength: number; } /** * Read a callout marker off the start of a blockquote's leading text, or null * when the blockquote is an ordinary quote. */ export declare function parseCalloutMarker(text: string): CalloutMarker | null; //# sourceMappingURL=callouts.d.ts.map