import type { Components } from "react-markdown";
import remarkGfm from "remark-gfm";
/**
 * Remark plugins applied to all SDK markdown surfaces.
 * Includes GFM (tables, strikethrough, autolinks, task lists).
 */
export declare const REMARK_PLUGINS: (typeof remarkGfm)[];
/**
 * Strips YAML frontmatter from markdown content.
 *
 * SKILL.md files store metadata (`name`, `description`) in a `---` delimited
 * YAML block at the top. The backend extracts these into separate proto fields,
 * but the raw `skill_md` still contains the block. `react-markdown` does not
 * understand frontmatter and renders it as a plain paragraph — this utility
 * removes it before rendering.
 */
export declare function stripFrontmatter(content: string): string;
/**
 * Unwraps a message the model wrapped entirely in a ```markdown / ```md fence.
 *
 * Some models emit their whole markdown reply inside one fenced block (a
 * Plan-mode plan is the common case). Rendered as-is that becomes a single flat
 * code block instead of rich markdown — headings, lists, and tables collapse to
 * monospace text. This returns the inner markdown in exactly that case and is a
 * no-op for everything else (already-rich markdown, prose, or a reply that is
 * legitimately a single code block).
 *
 * `allowBareFence` extends the unwrap to a whole-body fence with NO language
 * tag. For an ordinary chat message a bare fence is ambiguous (it may be a
 * legitimate single code block), so the default stays strict. A Plan-mode plan
 * is different by contract: the turn's output IS a markdown document, so a
 * reply that is one giant untagged fence is a wrapped plan, not code. Only
 * plan-document surfaces pass `true`. A fence tagged with any other language
 * (```python …) is never unwrapped in either mode.
 *
 * Render-time only: callers pass it the text right before handing it to the
 * markdown renderer, so the transcript and the raw artifact stay faithful to
 * what the agent produced — a single source of truth for the unwrap, with no
 * duplicated logic in the runner. While streaming, the closing fence has not
 * arrived yet, so this no-ops and the live text renders as typed; it unwraps
 * once the block closes.
 */
export declare function unwrapEnclosingMarkdownFence(content: string, allowBareFence?: boolean): string;
/**
 * Splits a markdown document into its leading `# H1` title and the remaining
 * body, for surfaces that render the title in their own chrome (the plan
 * document header) instead of inside the prose flow.
 *
 * Only a heading at the very start of the document counts as the title — an
 * `# H1` further down is document content and stays in the body. When there is
 * no leading H1, `title` is `null` and `body` is the input unchanged.
 *
 * Render-time only, like {@link unwrapEnclosingMarkdownFence}: the stored
 * message/artifact keeps its heading; only the presentation moves it.
 */
export declare function extractLeadingH1(markdown: string): {
    readonly title: string | null;
    readonly body: string;
};
/**
 * Styled react-markdown component overrides for SDK markdown surfaces.
 *
 * Every element uses `--stgm-*` design tokens via Tailwind semantic classes,
 * ensuring correct rendering in both the Stigmer Console and third-party
 * host applications with custom themes.
 *
 * Used by `MessageEntry` (chat messages) and `SkillDetailView` (SKILL.md).
 */
export declare const MARKDOWN_COMPONENTS: Components;
/**
 * Document-grade typography for a Plan-mode plan: one step up the heading
 * scale from the chat-tuned {@link MARKDOWN_COMPONENTS}, wider section
 * spacing, and a hairline under `##` section headings for scannability. The
 * plan is a reviewable document, not a chat bubble — its headings must carry
 * the structure at a glance.
 *
 * Everything except the headings is inherited from `MARKDOWN_COMPONENTS`, so
 * body text, code, tables, and links render identically across chat and plan
 * surfaces. Used by `PlanDocumentMessage` (thread) — the same treatment any
 * plan-document surface should share.
 */
export declare const PLAN_DOCUMENT_MARKDOWN_COMPONENTS: Components;
//# sourceMappingURL=markdown-components.d.ts.map