import { n as ShikiOptions } from "./shiki-B4uMZbMY.mjs"; import { CriticOptions, css as criticCss } from "comark-critic"; import { FigureOptions } from "comark-figure"; import { FootnotesOptions } from "comark-footnotes"; import { CalloutsOptions, ReferencesOptions } from "comark-github"; import { IconOptions, Icons } from "comark-icon"; import { IncludeOptions } from "comark-include"; import { KeysOptions } from "comark-keys"; import { ReadingTimeOptions } from "comark-reading-time"; import { XrefOptions } from "comark-xref"; import { ComarkPlugin } from "comark"; import { CommentsOptions, css as commentsCss } from "comark-comments"; import { PropertiesOptions } from "comark-properties"; import { PeleConfig } from "comark-pele"; import { BadgeOptions } from "comark-badge"; import { AnnotateOptions } from "comark-annotate"; import { CastOptions } from "comark-cast"; import { ChartsOptions } from "comark-charts"; import { ChipsOptions } from "comark-chips"; import { CodeOptions } from "comark-code"; import { DetailsOptions } from "comark-details"; import { DiagramsOptions } from "comark-diagrams"; import { EmbedOptions } from "comark-embed"; import { FileTreeOptions } from "comark-file-tree"; import { AnchorsOptions, ExternalOptions } from "comark-links"; import { MathOptions } from "comark-mathml"; import { MediaOptions } from "comark-media"; import { OutlineOptions } from "comark-outline"; import { QuizOptions } from "comark-quiz"; import { TableOptions } from "comark-table"; import { TabsOptions } from "comark-tabs"; import { TestsOptions } from "comark-tests"; import { BundleOptions } from "comark-bundle"; import { TimeOptions } from "comark-time"; import { ZoomOptions } from "comark-zoom"; //#region ../../shared/component-info.d.ts /** One prop of a block. */ interface ComponentProp { /** How the value is written: a string as is (`title="Q3"`), the others with Comark's `:` prefix (`:start="90"`). */ type: "string" | "number" | "boolean" | "json"; description?: string; /** What the block uses when the prop is left out. */ default?: string | number | boolean; /** The values a string takes. */ options?: readonly string[]; } /** One block a document can write. */ interface ComponentInfo { /** `block` is written `::name` to `::`; `inline` sits in text, as `:name[text]`. */ kind: "block" | "inline"; label: string; /** One sentence: what the block shows. */ description: string; props?: Record; /** The named slots, such as `summary` for `#summary`, with what each holds. The content is the default slot. */ slots?: Record; } //#endregion //#region src/info.d.ts /** * What an editor shows for each block the preset's plugins read, keyed by its name as written, such as `embed` for * `::embed`: a label, a description, its props, and its named slots. Pass the options you give the preset. The map is * plain data, so a server can pass it on, and `ComarkEditor` takes it as `components`. A package used alone exports its * own as `componentInfo` from its `/info` entry, such as `comark-embed/info`. */ declare function componentInfo(options?: PresetOptions): Record; //#endregion //#region src/mermaid-limits.d.ts type MermaidOptions = PeleConfig & { /** How many diagrams a document draws. The ones after show their source as a code block. */ maxDiagrams?: number; /** How many characters of Mermaid source a document draws, over all its diagrams. A diagram past it shows its source. */ maxSource?: number; }; //#endregion //#region src/typeset.d.ts /** The node that adds the styles. The plugin adds one at the end of every document. */ declare const TYPESET_TAG = "typeset-styles"; /** Adds the node that writes the typeset styles at the end of the document. The preset turns it on by default. */ declare const typeset: import("comark").ComarkPluginFactory; //#endregion //#region src/index.d.ts /** * `false` turns a plugin off, and an object turns it on with those options. Everything but `include` is on, and cast, * table, tests, and bundle read no files until they get options. */ type PresetOptions = { /** Pastes files into the Markdown before the other plugins read it. Off, since it reads from disk by default. */ include?: IncludeOptions | boolean; /** HTML only: Vue, React, and Svelte have no annotate components. */ annotate?: AnnotateOptions | boolean; carousel?: boolean; /** Reads no cast files unless you pass `{ root }` or `{ read }`; inline casts render either way. */ cast?: CastOptions | boolean; cjk?: boolean; deflist?: boolean; figure?: FigureOptions | boolean; critic?: CriticOptions | boolean; charts?: ChartsOptions | boolean; /** Pass `{ download: false }` when parsing in a browser, which may not download another site's images. */ chips?: ChipsOptions | boolean; colors?: boolean; /** * HTML only: Vue, React, and Svelte have no comments components. `{ mark: "pen" }` draws suggestions with a * hand-drawn pen unless one sets its own `mark`. */ comments?: CommentsOptions | boolean; /** Sends each diagram's source to `https://kroki.io` unless you pass your own `server`, or `{ draw: false }`. */ diagrams?: DiagramsOptions | boolean; /** * Draws `mermaid` fences with comark-pele, on the server and offline. A host that renders documents it didn't write * can pass `{ maxDiagrams, maxSource }`: the diagrams past either limit show their source as code, each with an issue. */ mermaid?: MermaidOptions | boolean; /** HTML only: Vue, React, and Svelte have no diff components. */ diff?: boolean; /** `{ player }` plays a host's own links, such as its recordings, before the built-in providers. */ embed?: EmbedOptions | boolean; footnotes?: FootnotesOptions | boolean; github?: { callouts?: CalloutsOptions | boolean; references?: ReferencesOptions | boolean; html?: boolean; } | boolean; /** Also resolves the icons of cards, details, file trees, tabs, and code actions, so they share its options. */ icon?: IconOptions | boolean; magicMove?: boolean; mark?: boolean; /** Typesets `$…$`, `$$…$$`, and `math` fences as MathML while parsing, in place of Comark's math plugin. */ math?: MathOptions | boolean; details?: DetailsOptions | boolean; links?: { external?: ExternalOptions | boolean; anchors?: AnchorsOptions | boolean; } | boolean; fileTree?: FileTreeOptions | boolean; fields?: boolean; properties?: PropertiesOptions | boolean; /** HTML only: Vue, React, and Svelte have no quiz components. */ quiz?: QuizOptions | boolean; keys?: KeysOptions | boolean; badge?: BadgeOptions | boolean; media?: MediaOptions | boolean; metrics?: boolean; /** Reads no data files unless you pass `{ root }` or `{ read }`; CSV fences render either way. */ table?: TableOptions | boolean; cards?: boolean; qr?: boolean; sources?: boolean; steps?: boolean; readingTime?: ReadingTimeOptions | boolean; tabs?: TabsOptions | boolean; /** `{ rail: true }` adds a side outline beside the text of every document with two headings or more. Off by default. */ outline?: OutlineOptions | boolean; xref?: XrefOptions | boolean; /** Reads no JUnit reports unless you pass `{ root }` or `{ read }`; inline reports render either way. */ tests?: TestsOptions | boolean; /** `::git-graph` around pasted `git log --graph --oneline --decorate --parents` output, with picks from `git cherry` and `git cherry-pick`. */ gitGraph?: boolean; /** Reads no builds unless you pass `{ root }`, or `{ read, list }` in a runtime without a disk. */ bundle?: BundleOptions | boolean; /** `:time[2026-10-12]` as relative time: "3 days ago", a date past `threshold`, and the full date in a tooltip. */ time?: TimeOptions | boolean; zoom?: ZoomOptions | boolean; /** * Highlights fenced code with your own Shiki, before comark-code. Off unless you pass one, so the preset bundles no * grammars. A host that renders documents it didn't write can pass `{ maxBlocks, maxSource }`: the blocks past either * limit show without colors, each with an issue. */ shiki?: ShikiOptions | false; code?: CodeOptions | boolean; codeNotes?: boolean; /** * The text around the blocks, from shadcn/typeset on the same tokens: headings, paragraphs, lists, tables, code, and * quotes. `false` leaves the text to your own styles. */ typeset?: boolean; }; type AnyPlugin = ComarkPlugin; type Part = { default: (options?: O) => AnyPlugin; components: Record; scripts?: readonly string[]; }; /** One renderer's entry of each package with components, by the option that turns it on. */ type Renderer = { annotate?: Part; carousel: Part; cast: Part; charts: Part; chips: Part; colors: Part; comments?: Part; diagrams: Part; mermaid: Part; diff?: Part; embed: Part; github: { callouts: (options?: CalloutsOptions) => AnyPlugin; references: (options?: ReferencesOptions) => AnyPlugin; html: () => AnyPlugin; components: Record; }; icon: Part; details: Part; links: { external: (options?: ExternalOptions) => AnyPlugin; anchors: (options?: AnchorsOptions) => AnyPlugin; components: Record; }; fileTree: Part; fields: Part; properties: Part; quiz?: Part; badge: Part; magicMove: Part; mark: Part; math: Part; media: Part; metrics: Part; table: Part; cards: Part; qr: Part; sources: Part; steps: Part; tabs: Part; outline: Part; tests: Part; gitGraph: Part; bundle: Part; time: Part; zoom: Part; code: Part; codeNotes: Part; /** The component that writes the typeset styles into the document, as `typeset-styles`. */ typeset: C; }; type Preset = { plugins: AnyPlugin[]; components: Record; /** * Every tag but `components`' that a document parsed with `plugins` can hold: Markdown's own, the raw HTML that * GitHub's `html` plugin keeps, and the plain elements the plugins draw with. With `components`' names, it's the * allowlist a host that sanitizes the tree needs. With GitHub's `html` off, raw HTML is left to the host. */ tags: string[]; /** * The blocks a document may write that the plugins turn into other nodes while parsing, such as `::code-group`. A * linter that reports unknown components needs them beside `components`' names. */ blocks: string[]; /** * The text of every inline `