/** * Deck widget mapping (GH-doc-deck-mode). Lowers fenced directive containers * (`::: ` … `:::`) authored inside deck markdown into the reference * deck's rich widget markup (`.pillars`, `.frame`, `.timeline`, `.track`, * `.split`), grounded in nmex-owners-portal star-plan-ejecutivo.html. * * The mechanism is a pre-parse STASH transform (the mermaid idiom in * export.ts): {@link stashDeckWidgets} lifts each `:::` block out of the source * markdown, replacing it with a `@@WIDGET_n@@` placeholder that survives the * `marked` parse and `neutralizeDangerousHtml` escape; {@link restoreDeckWidgets} * swaps the assembled widget HTML back in afterwards. Widget HTML uses only * benign structural tags (div/ul/li/h3/p/span/small/i/b) so the dangerous-tag * escape leaves it intact. * * A `mode` flag selects the emitter: `'deck'` renders the rich widget; `'linear'` * degrades to plain themed flow (headings + lists + paragraphs, icon/tag/color * dropped) so mode A carries the content without the deck scaffolding. The * tokenizer is a strict no-op when no `:::` fence is present, keeping mode A * byte-for-byte stable for existing documents. * * The icon and color vocabularies are CLOSED: an unknown/omitted `icon=` becomes * `i-check` and an unknown color becomes `--sf-blue-light`, normalized BEFORE * emission so no arbitrary string ever reaches a `class=` or inline `style=`. */ export type DeckWidgetMode = 'deck' | 'linear'; /** A rendered inner-markdown fragment (already HTML) → placeholder inputs. */ export type StashedWidget = { /** The widget kind, or `null` for an unknown kind (degraded to plain flow). */ kind: WidgetKind | null; /** Raw inner block text (markdown), verbatim between the fences. */ inner: string; }; type WidgetKind = 'pillars' | 'frame' | 'timeline' | 'track' | 'split'; /** * Lift every `::: ` … `:::` block out of `markdown`, replacing each with a * `@@WIDGET_n@@` placeholder on its own line and returning the collected blocks in * document order. Strict no-op (returns the input unchanged, empty list) when no * opening `:::` fence is present, so mode A stays byte-stable. Fences are matched * at the start of a line; the kind token is the first word after `:::`. */ export declare function stashDeckWidgets(markdown: string): { text: string; widgets: StashedWidget[]; }; /** * Swap each `@@WIDGET_n@@` placeholder in the parsed `html` back for the emitted * widget markup. `marked` wraps a placeholder that sat on its own line in a * `

`; both that and the bare form are replaced. `renderInner` renders an * inner-markdown fragment to HTML (the caller passes `marked.parse`), so widget * bodies get full markdown (bold, inline code) without re-implementing a parser. */ export declare function restoreDeckWidgets(html: string, widgets: StashedWidget[], mode: DeckWidgetMode, renderInner: (md: string) => string): string; export {};