import type { Node as TiptapNode } from "@tiptap/core"; import type { createLowlight } from "lowlight"; /** * A selectable language for the code-block picker. `value === null` is the * "Auto" sentinel: the block stores no language and the lowlight plugin * auto-detects (biased toward the editor's registered, web-leaning grammar * set). Keeping it first makes Auto the default, matching how plans skew toward * JS/TS/JSON without the author having to choose. */ export interface CodeLanguageOption { value: string | null; label: string; } /** Default picker list — Auto first, then the web-leaning grammars plans use. */ export declare const DEFAULT_CODE_LANGUAGES: CodeLanguageOption[]; /** Class hooks so each app themes the shared node with its own palette. */ export interface CodeBlockClassNames { wrapper: string; header: string; langButton: string; langButtonReadonly: string; picker: string; search: string; list: string; option: string; optionActive: string; } export interface CreateCodeBlockNodeOptions { /** Lowlight instance backing syntax highlighting (same one the app registers). */ lowlight: ReturnType; /** Picker languages. Defaults to {@link DEFAULT_CODE_LANGUAGES} (Auto first). */ languages?: CodeLanguageOption[]; /** Class hooks for per-app theming. Defaults to the shared `an-code-block__*`. */ classNames?: Partial; } /** * The shared Notion-style code block: {@link CodeBlockLowlight} (so fenced * markdown round-trips byte-identically — the node name and `language` attr are * unchanged) plus a React node view that adds a language picker header instead * of a bare highlighted `
`. "Auto" stores no language and the lowlight
 * plugin auto-detects.
 *
 * Lifted from the Content editor's bespoke code block so Plans (and any app
 * opting into `features.codeBlock`) share one implementation. Theming is fully
 * class-driven via {@link CreateCodeBlockNodeOptions.classNames}, so each app
 * maps the hooks onto its own palette.
 */
export declare function createCodeBlockNode({ lowlight, languages, classNames, }: CreateCodeBlockNodeOptions): TiptapNode;
//# sourceMappingURL=CodeBlockNode.d.ts.map