UNPKG

@mieweb/wikigdrive

Version:

Google Drive to MarkDown synchronization

63 lines 2.2 kB
import { ListStyle, Style } from './LibreOffice.js'; export type OutputMode = 'md' | 'html' | 'raw'; export type TAG = 'BODY' | 'HR/' | 'B' | 'I' | 'BI' | 'BLANK/' | // | '/B' | '/I' | '/BI' 'BR/' | // BR/ is intentional line break (2 spaces at the end of line) - shift+enter 'EOL/' | // EOL/ is line ending 'EMPTY_LINE/' | // EMPTY_LINE/ is blank line (it can be merged or removed) 'H1' | 'H2' | 'H3' | 'H4' | //'/H1' | '/H2' | '/H3' | '/H4' | 'P' | 'CODE' | 'PRE' | // '/P' | '/CODE' | '/PRE' | 'UL' | 'LI' | 'A' | // | '/UL' | '/LI' | '/A' 'TABLE' | 'TR' | 'TD' | // | '/TABLE' | '/TR' | '/TD' 'TOC' | 'SVG/' | 'IMG/' | // | '/TOC' 'EMB_SVG' | 'EMB_SVG_G' | 'EMB_SVG_P/' | 'EMB_SVG_TEXT' | // | '/EMB_SVG' | '/EMB_SVG_G' | '/EMB_SVG_TEXT' 'EMB_SVG_TSPAN' | // | '/EMB_SVG_TSPAN' 'MATHML' | 'CHANGE_START' | 'CHANGE_END' | 'RAW_MODE/' | 'HTML_MODE/' | 'MD_MODE/' | 'MACRO_MODE/' | 'COMMENT' | 'BOOKMARK/'; export interface TagPayload { lang?: string; position?: number; id?: string; listId?: string; continueList?: string; href?: string; alt?: string; marginLeft?: number; bullet?: boolean; numFormat?: string; number?: number; style?: Style; styleTxt?: string; listStyle?: ListStyle; continueNumbering?: boolean; listLevel?: number; pathD?: string; x?: number; y?: number; width?: number; height?: number; transform?: string; } export interface MarkdownTextNode { isTag: false; text: string; comment?: string; parent?: MarkdownTagNode; } export interface MarkdownTagNode { isTag: true; tag: TAG; payload: TagPayload; comment?: string; children: MarkdownNode[]; parent?: MarkdownTagNode; } export type MarkdownNode = MarkdownTextNode | MarkdownTagNode; export declare class MarkdownNodes { readonly body: MarkdownTagNode; constructor(); createNode(tag: TAG, payload?: TagPayload): MarkdownTagNode; toString(): string; replace(start: number, end: number, chunk: MarkdownNode): void; append(parent: MarkdownTagNode, child: MarkdownTagNode): void; appendText(parent: MarkdownTagNode, txt: string): void; } //# sourceMappingURL=MarkdownNodes.d.ts.map