🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@cylixlee/mdocx

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cylixlee/mdocx - npm Package Compare versions

Comparing version
0.2.0
to
0.2.1
+319
dist/index-BglKdRKV.d.ts
import * as docx0 from "docx";
import { Document, FileChild, IParagraphStylePropertiesOptions, IPropertiesOptions, IRunStylePropertiesOptions, IStylesOptions, Packer, Paragraph, ParagraphChild } from "docx";
import { Lexer, MarkedOptions, Token, Tokens } from "marked";
//#region src/extensions/types.d.ts
/**
* Represents a single footnote.
*/
type Footnote = {
id: number;
type: 'footnote';
raw: string;
label: string;
tokens: Token[];
};
/**
* Represents a reference to a footnote.
*/
type FootnoteRef = {
type: 'footnoteRef';
raw: string;
id: number;
label: string;
};
type InlineKatex = {
type: 'inlineKatex';
raw: string;
displayMode: boolean;
text: string;
};
type BlockKatex = {
type: 'blockKatex';
raw: string;
displayMode: boolean;
text: string;
};
//#endregion
//#region src/types.d.ts
type MarkdownImageType = 'jpg' | 'png' | 'gif' | 'bmp' | 'svg' | 'webp';
type MarkdownImageItem = {
type: MarkdownImageType;
data: Buffer | string | Uint8Array | ArrayBuffer;
width: number;
height: number;
};
type MarkdownImageAdapter = (token: Tokens.Image) => Promise<null | MarkdownImageItem>;
interface MarkdownDocxOptions extends MarkedOptions {
imageAdapter?: MarkdownImageAdapter;
/**
* Built-in style preset name
* @default "academic"
*/
preset?: string;
/**
* Style overrides on top of the preset
*/
style?: Partial<IMarkdownStyleConfig>;
/**
* Math engine configuration
* builtin: simple unicode mapping
* katex: KaTeX -> MathML -> docx Math
*/
math?: {
engine?: 'builtin' | 'katex';
katexOptions?: Record<string, any>;
/** Prefer constructs that are broadly supported by LibreOffice (e.g., avoid true OMML matrices and n-ary) */
libreOfficeCompat?: boolean;
};
/**
* do not download image
* @default false
*/
ignoreImage?: boolean;
/**
* do not parse footnote
* @default false
*/
ignoreFootnote?: boolean;
/**
* do not parse html
* @default false
*/
ignoreHtml?: boolean;
/**
* Properties for the document
*/
document?: Omit<IPropertiesOptions, 'sections'>;
}
type IBlockToken = Tokens.Space | Tokens.Code | Tokens.Heading | Tokens.Hr | Tokens.Blockquote | Tokens.List | Tokens.HTML | Tokens.Def | Tokens.Table | Tokens.Heading | Tokens.Paragraph | Tokens.Text | Footnote;
type IInlineToken = Tokens.Escape | Tokens.Tag | Tokens.Link | Tokens.Em | Tokens.Strong | Tokens.Codespan | Tokens.Br | Tokens.Del | Tokens.Text | Tokens.Image | FootnoteRef | InlineKatex | BlockKatex;
type IParagraphToken = Tokens.Paragraph | Tokens.Blockquote | Tokens.Heading;
type ITextAttr = {
style?: string;
bold?: boolean;
italics?: boolean;
underline?: boolean;
strike?: boolean;
break?: boolean | number;
html?: boolean;
link?: boolean;
strong?: boolean;
em?: boolean;
codespan?: boolean;
del?: boolean;
br?: boolean;
};
type IBlockAttr = {
style?: string;
blockquote?: boolean;
list?: {
task?: boolean;
checked?: boolean;
level: number;
type?: 'number' | 'bullet';
/**
* @link https://github.com/dolanmiu/docx/pull/816
* @link https://github.com/dolanmiu/docx/issues/3037#issuecomment-3164253396
*/
instance?: number;
};
listNone?: boolean;
heading?: number;
code?: boolean;
align?: 'left' | 'center' | 'right' | null;
footnote?: boolean;
};
type Writeable<T> = { -readonly [P in keyof T]: T[P] };
type IMarkdownToken = 'space' | 'code' | 'hr' | 'blockquote' | 'html' | 'def' | 'paragraph' | 'text' | 'footnote' | 'listItem' | 'table' | 'tableHeader' | 'tableCell' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'tag' | 'link' | 'strong' | 'em' | 'codespan' | 'del' | 'br';
type IMarkdownStyle = {
inline?: boolean;
className: string;
name?: string;
basedOn?: string;
next?: string;
run?: IRunStylePropertiesOptions;
paragraph?: IParagraphStylePropertiesOptions;
quickFormat?: boolean;
properties?: any;
};
type IMarkdownRenderFunction = (render: MarkdownDocx, token: IInlineToken | IBlockToken, attr?: ITextAttr | IBlockAttr) => ParagraphChild | ParagraphChild[] | FileChild | FileChild[] | false | null;
type IFontConfig = string | {
ascii?: string;
eastAsia?: string;
hAnsi?: string;
cs?: string;
};
interface IBorderConfig {
style?: string;
size?: number;
color?: string;
space?: number;
}
interface IElementStyle {
font?: IFontConfig;
size?: number;
color?: string;
bold?: boolean;
italics?: boolean;
underline?: boolean;
strike?: boolean;
spacingBefore?: number;
spacingAfter?: number;
lineSpacing?: number;
alignment?: 'left' | 'center' | 'right' | 'both';
indentLeft?: number;
indentHanging?: number;
indentFirstLine?: number;
keepNext?: boolean;
outlineLevel?: number;
threeLine?: boolean;
borderTop?: IBorderConfig;
borderBottom?: IBorderConfig;
borderLeft?: IBorderConfig;
borderRight?: IBorderConfig;
background?: string;
}
interface IMarkdownStyleConfig {
defaultFont?: IFontConfig;
defaultSize?: number;
lineSpacing?: number;
paragraph?: Partial<IElementStyle>;
heading1?: Partial<IElementStyle>;
heading2?: Partial<IElementStyle>;
heading3?: Partial<IElementStyle>;
heading4?: Partial<IElementStyle>;
heading5?: Partial<IElementStyle>;
heading6?: Partial<IElementStyle>;
code?: Partial<IElementStyle>;
codespan?: Partial<IElementStyle>;
blockquote?: Partial<IElementStyle>;
link?: Partial<IElementStyle>;
strong?: Partial<IElementStyle>;
em?: Partial<IElementStyle>;
del?: Partial<IElementStyle>;
hr?: Partial<IElementStyle>;
listItem?: Partial<IElementStyle>;
table?: Partial<IElementStyle>;
tableHeader?: Partial<IElementStyle>;
tableCell?: Partial<IElementStyle>;
tag?: Partial<IElementStyle>;
html?: Partial<IElementStyle>;
space?: Partial<IElementStyle>;
footnote?: Partial<IElementStyle>;
br?: Partial<IElementStyle>;
}
//#endregion
//#region src/styles/styles.d.ts
declare function createDefaultStyle(config: IMarkdownStyleConfig): IStylesOptions['default'];
declare function createDocumentStyle(config: IMarkdownStyleConfig): IStylesOptions;
//#endregion
//#region src/styles/index.d.ts
declare const styles: {
classes: {
readonly Space: "MdSpace";
readonly Code: "MdCode";
readonly Hr: "MdHr";
readonly Blockquote: "MdBlockquote";
readonly Html: "MdHtml";
readonly Def: "MdDef";
readonly Paragraph: "MdParagraph";
readonly Text: "MdText";
readonly Footnote: "MdFootnote";
readonly ListItem: "MdListItem";
readonly Table: "MdTable";
readonly TableHeader: "MdTableHeader";
readonly TableCell: "MdTableCell";
readonly Heading1: "MdHeading1";
readonly Heading2: "MdHeading2";
readonly Heading3: "MdHeading3";
readonly Heading4: "MdHeading4";
readonly Heading5: "MdHeading5";
readonly Heading6: "MdHeading6";
readonly Tag: "MdTag";
readonly Link: "MdLink";
readonly Strong: "MdStrong";
readonly Em: "MdEm";
readonly Codespan: "MdCodespan";
readonly Del: "MdDel";
readonly Br: "MdBr";
};
markdown: Record<IMarkdownToken, IMarkdownStyle>;
numbering: docx0.INumberingOptions;
createDefaultStyle: typeof createDefaultStyle;
createDocumentStyle: typeof createDocumentStyle;
};
//#endregion
//#region src/MarkdownDocx.d.ts
declare class MarkdownDocx {
markdown: string;
options: MarkdownDocxOptions;
static defaultOptions: MarkdownDocxOptions;
styles: {
classes: {
readonly Space: "MdSpace";
readonly Code: "MdCode";
readonly Hr: "MdHr";
readonly Blockquote: "MdBlockquote";
readonly Html: "MdHtml";
readonly Def: "MdDef";
readonly Paragraph: "MdParagraph";
readonly Text: "MdText";
readonly Footnote: "MdFootnote";
readonly ListItem: "MdListItem";
readonly Table: "MdTable";
readonly TableHeader: "MdTableHeader";
readonly TableCell: "MdTableCell";
readonly Heading1: "MdHeading1";
readonly Heading2: "MdHeading2";
readonly Heading3: "MdHeading3";
readonly Heading4: "MdHeading4";
readonly Heading5: "MdHeading5";
readonly Heading6: "MdHeading6";
readonly Tag: "MdTag";
readonly Link: "MdLink";
readonly Strong: "MdStrong";
readonly Em: "MdEm";
readonly Codespan: "MdCodespan";
readonly Del: "MdDel";
readonly Br: "MdBr";
};
markdown: Record<IMarkdownToken, IMarkdownStyle>;
numbering: docx0.INumberingOptions;
createDefaultStyle: typeof createDefaultStyle;
createDocumentStyle: typeof createDocumentStyle;
};
_styleConfig: IMarkdownStyleConfig | undefined;
store: Map<Symbol, any>;
static covert(markdown: string, _options?: MarkdownDocxOptions): Promise<Document>;
protected _imageStore: Map<string, MarkdownImageItem>;
private footnotes;
constructor(markdown: string, options?: MarkdownDocxOptions);
get ignoreImage(): boolean;
get ignoreFootnote(): boolean;
get ignoreHtml(): boolean;
toDocument(options?: Omit<IPropertiesOptions, 'sections'>): Promise<Document>;
toSection(): Promise<FileChild[]>;
downloadImageList(tokens: Tokens.Image[]): Promise<(MarkdownImageItem | undefined)[]>;
toBlocks(tokens: IBlockToken[], attr?: IBlockAttr): FileChild[];
toTexts(tokens: IInlineToken[], attr?: ITextAttr): ParagraphChild[];
addFootnote(id: number, children: Paragraph[]): void;
findImage(token: Tokens.Image): MarkdownImageItem | null;
_blockRender: Map<string, Function>;
_inlineRender: Map<string, Function>;
addBlockRender(blockType: string, renderFn: Function): void;
addInlineRender(inlineType: string, renderFn: Function): void;
useBlockRender(block: IBlockToken, attr: IBlockAttr): FileChild | FileChild[] | false | null;
useInlineRender(token: IInlineToken, attr: ITextAttr): ParagraphChild | ParagraphChild[] | false | null;
}
//#endregion
//#region src/presets/index.d.ts
declare const presets: Record<string, IMarkdownStyleConfig>;
declare function getPreset(name: string): IMarkdownStyleConfig;
declare function resolveStyleConfig(preset: string | IMarkdownStyleConfig, overrides?: Partial<IMarkdownStyleConfig>): IMarkdownStyleConfig;
//#endregion
//#region src/index.d.ts
declare function markdownDocx(markdown: string, options?: MarkdownDocxOptions): Promise<docx0.Document>;
//#endregion
export { IBlockAttr, IBlockToken, IBorderConfig, IElementStyle, IFontConfig, IInlineToken, IMarkdownRenderFunction, IMarkdownStyle, IMarkdownStyleConfig, IMarkdownToken, IParagraphToken, ITextAttr, MarkdownDocx, MarkdownDocxOptions, MarkdownImageAdapter, MarkdownImageItem, MarkdownImageType, Packer, Writeable, markdownDocx as default, markdownDocx, getPreset, presets, resolveStyleConfig, styles };
+5
-21
import fs from 'node:fs/promises'
import path from 'node:path'
import { z } from 'zod/v4-mini'
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'

@@ -32,23 +33,6 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'

inputSchema: {
type: 'object',
properties: {
inputPath: {
type: 'string',
description: 'Path to the input Markdown file (.md)',
},
outputPath: {
type: 'string',
description: 'Path for the output DOCX file (defaults to input filename with .docx extension)',
},
preset: {
type: 'string',
enum: Object.keys(presets),
description: `Style preset: ${Object.keys(presets).join(', ')} (default: "academic")`,
},
config: {
type: 'string',
description: 'Path to a JSON config file (may include preset, style, ignoreImage, math, etc.)',
},
},
required: ['inputPath'],
inputPath: z.string({ description: 'Path to the input Markdown file (.md)' }),
outputPath: z.optional(z.string({ description: 'Path for the output DOCX file (defaults to input filename with .docx extension)' })),
preset: z.optional(z.enum(Object.keys(presets), { description: `Style preset: ${Object.keys(presets).join(', ')} (default: "academic")` })),
config: z.optional(z.string({ description: 'Path to a JSON config file (may include preset, style, ignoreImage, math, etc.)' })),
},

@@ -55,0 +39,0 @@ },

{
"name": "@cylixlee/mdocx",
"version": "0.2.0",
"version": "0.2.1",
"description": "Convert Markdown file to DOCX format",

@@ -59,3 +59,4 @@ "keywords": [

"katex": "^0.16.23",
"marked": "^15.0.8"
"marked": "^15.0.8",
"zod": "^4.4.3"
},

@@ -62,0 +63,0 @@ "devDependencies": {

import * as docx1 from "docx";
import { Document, FileChild, IParagraphStylePropertiesOptions, IPropertiesOptions, IRunStylePropertiesOptions, IStylesOptions, Packer, Paragraph, ParagraphChild } from "docx";
import { Lexer, MarkedOptions, Token, Tokens } from "marked";
//#region src/extensions/types.d.ts
/**
* Represents a single footnote.
*/
type Footnote = {
id: number;
type: 'footnote';
raw: string;
label: string;
tokens: Token[];
};
/**
* Represents a reference to a footnote.
*/
type FootnoteRef = {
type: 'footnoteRef';
raw: string;
id: number;
label: string;
};
type InlineKatex = {
type: 'inlineKatex';
raw: string;
displayMode: boolean;
text: string;
};
type BlockKatex = {
type: 'blockKatex';
raw: string;
displayMode: boolean;
text: string;
};
//#endregion
//#region src/types.d.ts
type MarkdownImageType = 'jpg' | 'png' | 'gif' | 'bmp' | 'svg' | 'webp';
type MarkdownImageItem = {
type: MarkdownImageType;
data: Buffer | string | Uint8Array | ArrayBuffer;
width: number;
height: number;
};
type MarkdownImageAdapter = (token: Tokens.Image) => Promise<null | MarkdownImageItem>;
interface MarkdownDocxOptions extends MarkedOptions {
imageAdapter?: MarkdownImageAdapter;
/**
* Built-in style preset name
* @default "academic"
*/
preset?: string;
/**
* Style overrides on top of the preset
*/
style?: Partial<IMarkdownStyleConfig>;
/**
* Math engine configuration
* builtin: simple unicode mapping
* katex: KaTeX -> MathML -> docx Math
*/
math?: {
engine?: 'builtin' | 'katex';
katexOptions?: Record<string, any>;
/** Prefer constructs that are broadly supported by LibreOffice (e.g., avoid true OMML matrices and n-ary) */
libreOfficeCompat?: boolean;
};
/**
* do not download image
* @default false
*/
ignoreImage?: boolean;
/**
* do not parse footnote
* @default false
*/
ignoreFootnote?: boolean;
/**
* do not parse html
* @default false
*/
ignoreHtml?: boolean;
/**
* Properties for the document
*/
document?: Omit<IPropertiesOptions, 'sections'>;
}
type IBlockToken = Tokens.Space | Tokens.Code | Tokens.Heading | Tokens.Hr | Tokens.Blockquote | Tokens.List | Tokens.HTML | Tokens.Def | Tokens.Table | Tokens.Heading | Tokens.Paragraph | Tokens.Text | Footnote;
type IInlineToken = Tokens.Escape | Tokens.Tag | Tokens.Link | Tokens.Em | Tokens.Strong | Tokens.Codespan | Tokens.Br | Tokens.Del | Tokens.Text | Tokens.Image | FootnoteRef | InlineKatex | BlockKatex;
type IParagraphToken = Tokens.Paragraph | Tokens.Blockquote | Tokens.Heading;
type ITextAttr = {
style?: string;
bold?: boolean;
italics?: boolean;
underline?: boolean;
strike?: boolean;
break?: boolean | number;
html?: boolean;
link?: boolean;
strong?: boolean;
em?: boolean;
codespan?: boolean;
del?: boolean;
br?: boolean;
};
type IBlockAttr = {
style?: string;
blockquote?: boolean;
list?: {
task?: boolean;
checked?: boolean;
level: number;
type?: 'number' | 'bullet';
/**
* @link https://github.com/dolanmiu/docx/pull/816
* @link https://github.com/dolanmiu/docx/issues/3037#issuecomment-3164253396
*/
instance?: number;
};
listNone?: boolean;
heading?: number;
code?: boolean;
align?: 'left' | 'center' | 'right' | null;
footnote?: boolean;
};
type Writeable<T> = { -readonly [P in keyof T]: T[P] };
type IMarkdownToken = 'space' | 'code' | 'hr' | 'blockquote' | 'html' | 'def' | 'paragraph' | 'text' | 'footnote' | 'listItem' | 'table' | 'tableHeader' | 'tableCell' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'tag' | 'link' | 'strong' | 'em' | 'codespan' | 'del' | 'br';
type IMarkdownStyle = {
inline?: boolean;
className: string;
name?: string;
basedOn?: string;
next?: string;
run?: IRunStylePropertiesOptions;
paragraph?: IParagraphStylePropertiesOptions;
quickFormat?: boolean;
properties?: any;
};
type IMarkdownRenderFunction = (render: MarkdownDocx, token: IInlineToken | IBlockToken, attr?: ITextAttr | IBlockAttr) => ParagraphChild | ParagraphChild[] | FileChild | FileChild[] | false | null;
type IFontConfig = string | {
ascii?: string;
eastAsia?: string;
hAnsi?: string;
cs?: string;
};
interface IBorderConfig {
style?: string;
size?: number;
color?: string;
space?: number;
}
interface IElementStyle {
font?: IFontConfig;
size?: number;
color?: string;
bold?: boolean;
italics?: boolean;
underline?: boolean;
strike?: boolean;
spacingBefore?: number;
spacingAfter?: number;
lineSpacing?: number;
alignment?: 'left' | 'center' | 'right' | 'both';
indentLeft?: number;
indentHanging?: number;
indentFirstLine?: number;
keepNext?: boolean;
outlineLevel?: number;
threeLine?: boolean;
borderTop?: IBorderConfig;
borderBottom?: IBorderConfig;
borderLeft?: IBorderConfig;
borderRight?: IBorderConfig;
background?: string;
}
interface IMarkdownStyleConfig {
defaultFont?: IFontConfig;
defaultSize?: number;
lineSpacing?: number;
paragraph?: Partial<IElementStyle>;
heading1?: Partial<IElementStyle>;
heading2?: Partial<IElementStyle>;
heading3?: Partial<IElementStyle>;
heading4?: Partial<IElementStyle>;
heading5?: Partial<IElementStyle>;
heading6?: Partial<IElementStyle>;
code?: Partial<IElementStyle>;
codespan?: Partial<IElementStyle>;
blockquote?: Partial<IElementStyle>;
link?: Partial<IElementStyle>;
strong?: Partial<IElementStyle>;
em?: Partial<IElementStyle>;
del?: Partial<IElementStyle>;
hr?: Partial<IElementStyle>;
listItem?: Partial<IElementStyle>;
table?: Partial<IElementStyle>;
tableHeader?: Partial<IElementStyle>;
tableCell?: Partial<IElementStyle>;
tag?: Partial<IElementStyle>;
html?: Partial<IElementStyle>;
space?: Partial<IElementStyle>;
footnote?: Partial<IElementStyle>;
br?: Partial<IElementStyle>;
}
//#endregion
//#region src/styles/styles.d.ts
declare function createDefaultStyle(config: IMarkdownStyleConfig): IStylesOptions['default'];
declare function createDocumentStyle(config: IMarkdownStyleConfig): IStylesOptions;
//#endregion
//#region src/styles/index.d.ts
declare const styles: {
classes: {
readonly Space: "MdSpace";
readonly Code: "MdCode";
readonly Hr: "MdHr";
readonly Blockquote: "MdBlockquote";
readonly Html: "MdHtml";
readonly Def: "MdDef";
readonly Paragraph: "MdParagraph";
readonly Text: "MdText";
readonly Footnote: "MdFootnote";
readonly ListItem: "MdListItem";
readonly Table: "MdTable";
readonly TableHeader: "MdTableHeader";
readonly TableCell: "MdTableCell";
readonly Heading1: "MdHeading1";
readonly Heading2: "MdHeading2";
readonly Heading3: "MdHeading3";
readonly Heading4: "MdHeading4";
readonly Heading5: "MdHeading5";
readonly Heading6: "MdHeading6";
readonly Tag: "MdTag";
readonly Link: "MdLink";
readonly Strong: "MdStrong";
readonly Em: "MdEm";
readonly Codespan: "MdCodespan";
readonly Del: "MdDel";
readonly Br: "MdBr";
};
markdown: Record<IMarkdownToken, IMarkdownStyle>;
numbering: docx1.INumberingOptions;
createDefaultStyle: typeof createDefaultStyle;
createDocumentStyle: typeof createDocumentStyle;
};
//#endregion
//#region src/MarkdownDocx.d.ts
declare class MarkdownDocx {
markdown: string;
options: MarkdownDocxOptions;
static defaultOptions: MarkdownDocxOptions;
styles: {
classes: {
readonly Space: "MdSpace";
readonly Code: "MdCode";
readonly Hr: "MdHr";
readonly Blockquote: "MdBlockquote";
readonly Html: "MdHtml";
readonly Def: "MdDef";
readonly Paragraph: "MdParagraph";
readonly Text: "MdText";
readonly Footnote: "MdFootnote";
readonly ListItem: "MdListItem";
readonly Table: "MdTable";
readonly TableHeader: "MdTableHeader";
readonly TableCell: "MdTableCell";
readonly Heading1: "MdHeading1";
readonly Heading2: "MdHeading2";
readonly Heading3: "MdHeading3";
readonly Heading4: "MdHeading4";
readonly Heading5: "MdHeading5";
readonly Heading6: "MdHeading6";
readonly Tag: "MdTag";
readonly Link: "MdLink";
readonly Strong: "MdStrong";
readonly Em: "MdEm";
readonly Codespan: "MdCodespan";
readonly Del: "MdDel";
readonly Br: "MdBr";
};
markdown: Record<IMarkdownToken, IMarkdownStyle>;
numbering: docx1.INumberingOptions;
createDefaultStyle: typeof createDefaultStyle;
createDocumentStyle: typeof createDocumentStyle;
};
_styleConfig: IMarkdownStyleConfig | undefined;
store: Map<Symbol, any>;
static covert(markdown: string, _options?: MarkdownDocxOptions): Promise<Document>;
protected _imageStore: Map<string, MarkdownImageItem>;
private footnotes;
constructor(markdown: string, options?: MarkdownDocxOptions);
get ignoreImage(): boolean;
get ignoreFootnote(): boolean;
get ignoreHtml(): boolean;
toDocument(options?: Omit<IPropertiesOptions, 'sections'>): Promise<Document>;
toSection(): Promise<FileChild[]>;
downloadImageList(tokens: Tokens.Image[]): Promise<(MarkdownImageItem | undefined)[]>;
toBlocks(tokens: IBlockToken[], attr?: IBlockAttr): FileChild[];
toTexts(tokens: IInlineToken[], attr?: ITextAttr): ParagraphChild[];
addFootnote(id: number, children: Paragraph[]): void;
findImage(token: Tokens.Image): MarkdownImageItem | null;
_blockRender: Map<string, Function>;
_inlineRender: Map<string, Function>;
addBlockRender(blockType: string, renderFn: Function): void;
addInlineRender(inlineType: string, renderFn: Function): void;
useBlockRender(block: IBlockToken, attr: IBlockAttr): FileChild | FileChild[] | false | null;
useInlineRender(token: IInlineToken, attr: ITextAttr): ParagraphChild | ParagraphChild[] | false | null;
}
//#endregion
//#region src/presets/index.d.ts
declare const presets: Record<string, IMarkdownStyleConfig>;
declare function getPreset(name: string): IMarkdownStyleConfig;
declare function resolveStyleConfig(preset: string | IMarkdownStyleConfig, overrides?: Partial<IMarkdownStyleConfig>): IMarkdownStyleConfig;
//#endregion
//#region src/index.d.ts
declare function markdownDocx(markdown: string, options?: MarkdownDocxOptions): Promise<docx1.Document>;
//#endregion
export { IBlockAttr, IBlockToken, IBorderConfig, IElementStyle, IFontConfig, IInlineToken, IMarkdownRenderFunction, IMarkdownStyle, IMarkdownStyleConfig, IMarkdownToken, IParagraphToken, ITextAttr, MarkdownDocx, MarkdownDocxOptions, MarkdownImageAdapter, MarkdownImageItem, MarkdownImageType, Packer, Writeable, markdownDocx as default, markdownDocx, getPreset, presets, resolveStyleConfig, styles };