
import "./d2.d.ts";
import { Root } from 'hast';
import { Plugin } from 'unified';

declare const strategies: readonly [
	"inline-svg",
	"inline-png"
];
export type Strategy = (typeof strategies)[number];
export type Themes = readonly [
	string,
	...string[]
];
export type RehypeD2Options<T extends Themes = Themes> = {
	strategy?: Strategy;
	cwd?: string;
	target?: {
		tagName: string;
		className: string;
	};
	defaultThemes?: T;
	defaultMetadata?: Record<T[number], {
		[k in keyof NodeMetadata]?: NodeMetadata[k] | ((value: string) => NodeMetadata[k]);
	}>;
	globalImports?: Record<T[number], Array<`${string}.d2` | {
		filename: `${string}.d2`;
		mode: "prepend" | "import";
	}>>;
};
export interface NodeMetadata extends Omit<CompileOptions, `font${string}` | "target" | "darkThemeId"> {
	title?: string;
	alt?: string;
	width?: string;
	height?: string;
	optimize?: boolean;
}
export declare class RehypeD2RendererError extends Error {
	constructor(message: string);
}
declare const rehypeD2: Plugin<[
	RehypeD2Options
], Root>;

export {
	rehypeD2 as default,
};

export {};

