@notion-md-converter/core
Version:
Notion to Markdown Converter
45 lines (44 loc) • 1.76 kB
TypeScript
import type { ApiColor, ColorMap } from "@notion-md-converter/types";
/**
* @see https://www.markdownguide.org/basic-syntax/#reference-style-links
*/
export type BulletStyle = "-" | "*" | "+";
export type TableCell = {
content: string;
};
export type TableHeader = {
content: string;
alignment?: "left" | "center" | "right";
};
type DecorationFuncOption = {
decoration: string;
};
export declare const MarkdownUtils: {
heading: (text: string, level: 1 | 2 | 3 | 4 | 5 | 6) => string;
bold: (text: string) => string;
italic: (text: string) => string;
strikethrough: (text: string) => string;
inlineCode: (text: string) => string;
underline: (text: string) => string;
color: (text: string, color: ApiColor, colorMap?: ColorMap) => string;
bulletList: (text: string, style?: BulletStyle) => string;
numberedList: (text: string, number: number) => string;
checkList: (text: string, checked: boolean) => string;
link: (text: string, url: string) => string;
image: (text: string, url: string, options?: {
width?: string;
}) => string;
codeBlock: (code: string, language?: string) => string;
blockEquation: (equation: string) => string;
inlineEquation: (equation: string) => string;
blockquote: (text: string) => string;
table: (headers: TableHeader[], rows: TableCell[][]) => string;
horizontalRule: (style?: "hyphen" | "asterisk" | "underscore") => string;
wrapWithNewLines: (text: string) => string;
indent: (text: string, spaces?: number) => string;
details: (title: string, content: string) => string;
comment: (text: string) => string;
decoration: (text: string, options: DecorationFuncOption) => string;
COLOR_MAP: ColorMap;
};
export {};