/** * Remark plugin that walks markdown text leaves and replaces `[card://:]` * patterns with synthetic `link` mdast nodes. The link's `url` is the literal * `card://:` (a non-standard scheme) so the downstream `` * component override can detect it and delegate rendering to the host's * `renderEntityCard` callback (see `chat-message-enhanced.tsx`). * * Why a remark plugin (NOT a regex on the raw markdown source): * - Preserves bold / italic / list / code wrapping around the marker. * `**The [card://webinar:42] discussed pricing**` keeps the bold span * because the plugin only splits TEXT leaves; the strong wrapper is * untouched. * - No clash with rehype-raw — the marker disappears before the HTML pass. * * Per v6.1 §B.2.6: "implement as a `react-markdown` `components.text` override * OR a remark plugin. NOT a regex-on-raw-text pre-pass (which loses formatting)." * * Regex shape: `[a-zA-Z0-9_-]+` for both type and id. Tolerates snake_case * AND kebab-case so it matches whatever `documentType` value the LLM echoes * from the server snapshot (e.g. `customer_interview` from the config vs * `customer-interview` if a future config switches conventions). */ import type { Plugin } from "unified"; import type { Root } from "mdast"; export declare const remarkCardLinks: Plugin<[], Root>; //# sourceMappingURL=remark-card-links.d.ts.map