import type { Components } from 'react-markdown'; import type { ResolveLinkResult } from '../../../types/doc-source'; import type { TextSizeElement } from './text-size'; export declare function hasRenderableSrc(src: unknown): src is string; export interface BuildBaseComponentsOptions { textSizes: Record; demoteMarkdownH1ToH2: boolean; brokenLinks: readonly string[]; currentPath?: string; onInternalLinkClick?: (path: string, options?: { expandFolder?: boolean; fromInternalLink?: boolean; }) => void; onResolveLink?: (href: string, currentPath: string) => Promise; } /** * The standard leaf renderers (`code` block + inline, `blockquote`, `div` * pass-through) as standalone functions. * * SSOT for compositions that must OVERRIDE these renderers for a narrow * special case and then fall through: the rich composition intercepts embed * fence languages, shortcode-expanded `div`s and Reddit's `reddit-embed-bq` * blockquote, and delegates everything else here. Previously it reproduced * these renderers byte-for-byte, so any class change here silently drifted * on content surfaces. * * THESE MUST STAY HOOK-FREE: the rich composition calls them as plain * functions from inside its own renderers (`standard.code(props)`), which is * not a React render of a component and would break the rules of hooks. * Hook-using renderers (the headings, which read the heading-line offset * from context) live in `buildBaseComponents` below and are never delegated * to this way. * * ODS-TOKENS FLAG (ODS_TOKEN_RULES §Typography / §General): inline code keeps * an inline `text-[0.9em]`, carried over verbatim from the pre-unification * renderers — ODS has no relative-to-parent code size, so mapping it onto an * existing token would visibly change every inline code span. Same shape as * the flag in ./text-size.ts — flagged for addition to ODS, not copied * anywhere else. * * The code BLOCK's font is NOT flagged: the raw "JetBrains Mono", "SF Mono", * Consolas stack the old renderer inlined is gone, replaced by Tailwind's * `font-mono` (→ `var(--font-family-heading)`, the Azeret Mono ODS stack) — * the same class the inline-code branch below already used, so the two code * surfaces no longer disagree about their family. */ export declare function buildStandardLeafRenderers({ textSizes, }: { textSizes: Record; }): Pick; export declare function buildBaseComponents({ textSizes, demoteMarkdownH1ToH2, brokenLinks, currentPath: propCurrentPath, onInternalLinkClick, onResolveLink, }: BuildBaseComponentsOptions): Components; //# sourceMappingURL=base-components.d.ts.map