import type { MdastPluginInput, HastPluginInput } from "./plugin.js"; import type { MdastNode, HastNode, Data } from "./types.js"; /** Configuration for static subtree collapsing during MDX compilation. */ export interface OptimizeStaticConfig { component: string; prop: string; wrapPropValue?: boolean; ignoreElements?: string[]; } /** Granular smart-punctuation toggles. Omitted fields default to true. */ export interface SmartPunctuationOptions { /** Replace straight quotes with curly/smart quotes. Default: true. */ quotes?: boolean; /** Replace `--`/`---` with en-dash/em-dash. Default: true. */ dashes?: boolean; /** Replace `...` with ellipsis (`…`). Default: true. */ ellipses?: boolean; } /** * Per-backref callback. Invoked once per anchor in the footnotes section * with 1-based `referenceNumber` and `rerunIndex` (1 on the first backref * to that definition, 2 on the second, and so on). Must return the final * string used as the backref content or `aria-label`. */ export type FootnoteBackrefCallback = (referenceNumber: number, rerunIndex: number) => string; /** * i18n strings for the GFM footnotes section. Mirrors `footnoteLabel`, * `footnoteBackLabel`, and `footnoteBackContent` from remark-rehype. * * `backContent` and `backLabel` each accept either a template string with * the `{reference}` placeholder (substituted with `1` or `1-2` to match * remark-rehype's default suffix), or a callback receiving the raw * `(referenceNumber, rerunIndex)` pair. * * Passing this object enables footnotes. To turn them off, use * `gfm: { footnotes: false }`. */ export interface FootnoteOptions { /** `
= {
[K in keyof P]-?: FieldIsAsync = true extends AnyVisitorAsync ? true : false;
type ResolveInput = P extends () => infer D ? D : P;
type AnyInputAsync