markdown-codec 11.1.13 → 11.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/block/block.cjs +23 -612
- package/dist/block/block.d.cts +22 -3
- package/dist/block/block.d.ts +22 -3
- package/dist/block/block.js +2 -607
- package/dist/block/definitions.d.cts +1 -1
- package/dist/block/definitions.d.ts +1 -1
- package/dist/block/list.d.cts +1 -1
- package/dist/block/list.d.ts +1 -1
- package/dist/block/node.d.cts +1 -45
- package/dist/block/node.d.ts +1 -45
- package/dist/block/parser.cjs +3 -0
- package/dist/block/parser.d.cts +57 -0
- package/dist/block/parser.d.ts +57 -0
- package/dist/block/parser.js +2 -0
- package/dist/block-C3ftt8qO.js +610 -0
- package/dist/block-DsxTiUms.cjs +747 -0
- package/dist/codec.d.cts +18 -18
- package/dist/codec.d.ts +18 -18
- package/dist/defaults/defaults.d.cts +1 -1
- package/dist/defaults/defaults.d.ts +1 -1
- package/dist/emit/emit.cjs +7 -647
- package/dist/emit/emit.d.cts +22 -3
- package/dist/emit/emit.d.ts +22 -3
- package/dist/emit/emit.js +2 -646
- package/dist/emit/html-table.d.cts +1 -1
- package/dist/emit/html-table.d.ts +1 -1
- package/dist/emit/inline.cjs +1 -1
- package/dist/emit/inline.js +1 -1
- package/dist/emit/list-render.cjs +29 -0
- package/dist/emit/list-render.d.cts +81 -0
- package/dist/emit/list-render.d.ts +81 -0
- package/dist/emit/list-render.js +2 -0
- package/dist/emit/setext.cjs +143 -0
- package/dist/emit/setext.d.cts +30 -0
- package/dist/emit/setext.d.ts +30 -0
- package/dist/emit/setext.js +119 -0
- package/dist/emit/table.d.cts +1 -11
- package/dist/emit/table.d.ts +1 -11
- package/dist/emit-CCOoudJW.cjs +734 -0
- package/dist/emit-Do1KMQHB.js +537 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/inline/entity.cjs +1 -1
- package/dist/inline/entity.js +1 -1
- package/dist/inline/inline.cjs +2 -2
- package/dist/inline/inline.d.cts +1 -1
- package/dist/inline/inline.d.ts +1 -1
- package/dist/inline/inline.js +2 -2
- package/dist/{inline-CArcArOD.d.ts → inline-BG6ge5m2.d.ts} +1 -1
- package/dist/{inline-GzD5QtFh.d.cts → inline-BxX0iOy6.d.cts} +1 -1
- package/dist/lower/lower.cjs +3 -3
- package/dist/lower/lower.d.cts +1 -1
- package/dist/lower/lower.d.ts +1 -1
- package/dist/lower/lower.js +2 -2
- package/dist/node-DcxnTjF0.d.cts +46 -0
- package/dist/node-w8dVfAUD.d.ts +46 -0
- package/dist/options/options.d.cts +1 -43
- package/dist/options/options.d.ts +1 -43
- package/dist/options-CZoMEGL8.d.ts +44 -0
- package/dist/options-ZnZOMG3X.d.cts +44 -0
- package/dist/read.d.cts +1 -1
- package/dist/read.d.ts +1 -1
- package/dist/scan/entity-table-n-z.cjs +207 -0
- package/dist/scan/entity-table-n-z.d.cts +4 -0
- package/dist/scan/entity-table-n-z.d.ts +4 -0
- package/dist/scan/entity-table-n-z.js +206 -0
- package/dist/scan/entity-table-t-z.cjs +28 -0
- package/dist/scan/entity-table-t-z.d.cts +4 -0
- package/dist/scan/entity-table-t-z.d.ts +4 -0
- package/dist/scan/entity-table-t-z.js +27 -0
- package/dist/scan/entity-table-u-z.cjs +59 -0
- package/dist/scan/entity-table-u-z.d.cts +4 -0
- package/dist/scan/entity-table-u-z.d.ts +4 -0
- package/dist/scan/entity-table-u-z.js +58 -0
- package/dist/scan/entity-table-w-z.cjs +11 -0
- package/dist/scan/entity-table-w-z.d.cts +4 -0
- package/dist/scan/entity-table-w-z.d.ts +4 -0
- package/dist/scan/entity-table-w-z.js +10 -0
- package/dist/scan/entity-table-x-z.cjs +10 -0
- package/dist/scan/entity-table-x-z.d.cts +4 -0
- package/dist/scan/entity-table-x-z.d.ts +4 -0
- package/dist/scan/entity-table-x-z.js +9 -0
- package/dist/scan/entity-table-y-z-2.cjs +780 -0
- package/dist/scan/entity-table-y-z-2.d.cts +4 -0
- package/dist/scan/entity-table-y-z-2.d.ts +4 -0
- package/dist/scan/entity-table-y-z-2.js +779 -0
- package/dist/scan/entity-table-y-z.cjs +779 -0
- package/dist/scan/entity-table-y-z.d.cts +4 -0
- package/dist/scan/entity-table-y-z.d.ts +4 -0
- package/dist/scan/entity-table-y-z.js +778 -0
- package/dist/scan/entity-table.cjs +20 -1834
- package/dist/scan/entity-table.d.cts +2 -1
- package/dist/scan/entity-table.d.ts +2 -1
- package/dist/scan/entity-table.js +20 -1835
- package/dist/table-BFbOhm0R.d.ts +12 -0
- package/dist/table-PtkYEYdL.d.cts +12 -0
- package/dist/write.cjs +2 -2
- package/dist/write.d.cts +1 -1
- package/dist/write.d.ts +1 -1
- package/dist/write.js +1 -1
- package/package.json +2 -2
package/dist/lower/lower.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LinkReferenceMap } from "../inline/link.cjs";
|
|
2
2
|
import { ParsedMarkdown } from "../block/block.cjs";
|
|
3
|
-
import { ReadMarkdownOptions } from "../options
|
|
3
|
+
import { c as ReadMarkdownOptions } from "../options-ZnZOMG3X.cjs";
|
|
4
4
|
import { ContentDocument, LayoutMetadata } from "document-schema.js";
|
|
5
5
|
//#region src/lower/lower.d.ts
|
|
6
6
|
declare function lowerParsedMarkdown(parsed: ParsedMarkdown, options?: ReadMarkdownOptions, metadata?: LayoutMetadata): ContentDocument;
|
package/dist/lower/lower.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LinkReferenceMap } from "../inline/link.js";
|
|
2
2
|
import { ParsedMarkdown } from "../block/block.js";
|
|
3
|
-
import { ReadMarkdownOptions } from "../options
|
|
3
|
+
import { c as ReadMarkdownOptions } from "../options-CZoMEGL8.js";
|
|
4
4
|
import { ContentDocument, LayoutMetadata } from "document-schema.js";
|
|
5
5
|
//#region src/lower/lower.d.ts
|
|
6
6
|
declare function lowerParsedMarkdown(parsed: ParsedMarkdown, options?: ReadMarkdownOptions, metadata?: LayoutMetadata): ContentDocument;
|
package/dist/lower/lower.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DEFAULT_MARGINS } from "../defaults/defaults.js";
|
|
2
1
|
import { MarkdownDiagnosticCodes, MarkdownInputTooLargeError, NOOP_MARKDOWN_DIAGNOSTIC_SINK } from "../diagnostics/diagnostics.js";
|
|
3
|
-
import {
|
|
2
|
+
import { DEFAULT_MARGINS } from "../defaults/defaults.js";
|
|
3
|
+
import { x as parseMarkdown } from "../block-C3ftt8qO.js";
|
|
4
4
|
import { resolveMarkdownImage } from "./image.js";
|
|
5
5
|
import { CODE_BLOCK_STYLE_ID, HORIZONTAL_RULE_STYLE_ID, HTML_PREFORMATTED_STYLE_ID, QUOTE_STYLE_ID, headingStyleId } from "../shared/style-constants.js";
|
|
6
6
|
import { parseHtmlTable } from "../html/html-table.js";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { D as MarkdownOrderedListDelimiter, P as MarkdownTableAlignment, i as MarkdownBulletMarker } from "./ast-DI-t9uKv.cjs";
|
|
2
|
+
import { t as HtmlBlockType } from "./html-bkz2QTuq.cjs";
|
|
3
|
+
//#region src/block/node.d.ts
|
|
4
|
+
type BlockNodeKind = "document" | "paragraph" | "heading" | "blockquote" | "list" | "listItem" | "codeBlock" | "htmlBlock" | "thematicBreak" | "table" | "mathBlock" | "footnoteDefinition";
|
|
5
|
+
type BlockHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
6
|
+
interface ListMarkerData {
|
|
7
|
+
readonly type: "bullet" | "ordered";
|
|
8
|
+
readonly bulletChar?: MarkdownBulletMarker;
|
|
9
|
+
readonly delimiter?: MarkdownOrderedListDelimiter;
|
|
10
|
+
readonly start?: number;
|
|
11
|
+
readonly padding: number;
|
|
12
|
+
readonly markerOffset: number;
|
|
13
|
+
}
|
|
14
|
+
declare class BlockNode {
|
|
15
|
+
readonly kind: BlockNodeKind;
|
|
16
|
+
parent: BlockNode | undefined;
|
|
17
|
+
readonly children: BlockNode[];
|
|
18
|
+
open: boolean;
|
|
19
|
+
startLine: number;
|
|
20
|
+
content: string;
|
|
21
|
+
lastLineBlank: boolean;
|
|
22
|
+
lastLineChecked: boolean;
|
|
23
|
+
level: BlockHeadingLevel;
|
|
24
|
+
setext: boolean;
|
|
25
|
+
fenced: boolean;
|
|
26
|
+
fenceChar: "`" | "~";
|
|
27
|
+
fenceLength: number;
|
|
28
|
+
fenceOffset: number;
|
|
29
|
+
infoString: string;
|
|
30
|
+
literal: string;
|
|
31
|
+
htmlBlockType: HtmlBlockType;
|
|
32
|
+
listData: ListMarkerData | undefined;
|
|
33
|
+
tight: boolean;
|
|
34
|
+
alignments: MarkdownTableAlignment[];
|
|
35
|
+
headerLine: string;
|
|
36
|
+
footnoteLabel: string;
|
|
37
|
+
constructor(kind: BlockNodeKind, startLine: number);
|
|
38
|
+
get lastChild(): BlockNode | undefined;
|
|
39
|
+
appendChild(child: BlockNode): void;
|
|
40
|
+
replaceWith(replacement: BlockNode): void;
|
|
41
|
+
unlink(): void;
|
|
42
|
+
}
|
|
43
|
+
declare function canContain(parent: BlockNodeKind, child: BlockNodeKind): boolean;
|
|
44
|
+
declare function suppressesBlockStarts(kind: BlockNodeKind): boolean;
|
|
45
|
+
//#endregion
|
|
46
|
+
export { canContain as a, ListMarkerData as i, BlockNode as n, suppressesBlockStarts as o, BlockNodeKind as r, BlockHeadingLevel as t };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { D as MarkdownOrderedListDelimiter, P as MarkdownTableAlignment, i as MarkdownBulletMarker } from "./ast-DI-t9uKv.js";
|
|
2
|
+
import { t as HtmlBlockType } from "./html-bkz2QTuq.js";
|
|
3
|
+
//#region src/block/node.d.ts
|
|
4
|
+
type BlockNodeKind = "document" | "paragraph" | "heading" | "blockquote" | "list" | "listItem" | "codeBlock" | "htmlBlock" | "thematicBreak" | "table" | "mathBlock" | "footnoteDefinition";
|
|
5
|
+
type BlockHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
6
|
+
interface ListMarkerData {
|
|
7
|
+
readonly type: "bullet" | "ordered";
|
|
8
|
+
readonly bulletChar?: MarkdownBulletMarker;
|
|
9
|
+
readonly delimiter?: MarkdownOrderedListDelimiter;
|
|
10
|
+
readonly start?: number;
|
|
11
|
+
readonly padding: number;
|
|
12
|
+
readonly markerOffset: number;
|
|
13
|
+
}
|
|
14
|
+
declare class BlockNode {
|
|
15
|
+
readonly kind: BlockNodeKind;
|
|
16
|
+
parent: BlockNode | undefined;
|
|
17
|
+
readonly children: BlockNode[];
|
|
18
|
+
open: boolean;
|
|
19
|
+
startLine: number;
|
|
20
|
+
content: string;
|
|
21
|
+
lastLineBlank: boolean;
|
|
22
|
+
lastLineChecked: boolean;
|
|
23
|
+
level: BlockHeadingLevel;
|
|
24
|
+
setext: boolean;
|
|
25
|
+
fenced: boolean;
|
|
26
|
+
fenceChar: "`" | "~";
|
|
27
|
+
fenceLength: number;
|
|
28
|
+
fenceOffset: number;
|
|
29
|
+
infoString: string;
|
|
30
|
+
literal: string;
|
|
31
|
+
htmlBlockType: HtmlBlockType;
|
|
32
|
+
listData: ListMarkerData | undefined;
|
|
33
|
+
tight: boolean;
|
|
34
|
+
alignments: MarkdownTableAlignment[];
|
|
35
|
+
headerLine: string;
|
|
36
|
+
footnoteLabel: string;
|
|
37
|
+
constructor(kind: BlockNodeKind, startLine: number);
|
|
38
|
+
get lastChild(): BlockNode | undefined;
|
|
39
|
+
appendChild(child: BlockNode): void;
|
|
40
|
+
replaceWith(replacement: BlockNode): void;
|
|
41
|
+
unlink(): void;
|
|
42
|
+
}
|
|
43
|
+
declare function canContain(parent: BlockNodeKind, child: BlockNodeKind): boolean;
|
|
44
|
+
declare function suppressesBlockStarts(kind: BlockNodeKind): boolean;
|
|
45
|
+
//#endregion
|
|
46
|
+
export { canContain as a, ListMarkerData as i, BlockNode as n, suppressesBlockStarts as o, BlockNodeKind as r, BlockHeadingLevel as t };
|
|
@@ -1,44 +1,2 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import { n as MarkdownImageResolver } from "../image-B6p0Ovgy.cjs";
|
|
3
|
-
import { Margins, PageSize } from "document-schema.js";
|
|
4
|
-
//#region src/options/options.d.ts
|
|
5
|
-
interface ReadMarkdownOptions {
|
|
6
|
-
readonly sink?: MarkdownDiagnosticSink;
|
|
7
|
-
readonly signal?: AbortSignal;
|
|
8
|
-
readonly pageSize?: PageSize;
|
|
9
|
-
readonly margins?: Margins;
|
|
10
|
-
readonly images?: MarkdownImageResolver;
|
|
11
|
-
readonly rawHtml?: "preserve" | "drop";
|
|
12
|
-
readonly frontMatter?: boolean;
|
|
13
|
-
readonly gfmTables?: boolean;
|
|
14
|
-
readonly gfmAutolinks?: boolean;
|
|
15
|
-
readonly gfmStrikethrough?: boolean;
|
|
16
|
-
readonly gfmTaskLists?: boolean;
|
|
17
|
-
readonly footnotes?: boolean;
|
|
18
|
-
readonly maxInputBytes?: number;
|
|
19
|
-
readonly maxBlockNesting?: number;
|
|
20
|
-
}
|
|
21
|
-
type MarkdownHeadingStyle = "atx" | "setext";
|
|
22
|
-
type MarkdownBulletListMarker = "-" | "*" | "+";
|
|
23
|
-
type MarkdownOrderedListDelimiter = "." | ")";
|
|
24
|
-
type MarkdownEmphasisMarker = "_" | "*";
|
|
25
|
-
type MarkdownCodeFenceChar = "`" | "~";
|
|
26
|
-
type MarkdownThematicBreakChar = "-" | "_" | "*";
|
|
27
|
-
type MarkdownLineEnding = "lf" | "crlf";
|
|
28
|
-
interface WriteMarkdownStyleOptions {
|
|
29
|
-
readonly headingStyle?: MarkdownHeadingStyle;
|
|
30
|
-
readonly bulletListMarker?: MarkdownBulletListMarker;
|
|
31
|
-
readonly orderedListDelimiter?: MarkdownOrderedListDelimiter;
|
|
32
|
-
readonly emphasisMarker?: MarkdownEmphasisMarker;
|
|
33
|
-
readonly codeFenceChar?: MarkdownCodeFenceChar;
|
|
34
|
-
readonly thematicBreakChar?: MarkdownThematicBreakChar;
|
|
35
|
-
}
|
|
36
|
-
interface WriteMarkdownOptions extends WriteMarkdownStyleOptions {
|
|
37
|
-
readonly sink?: MarkdownDiagnosticSink;
|
|
38
|
-
readonly signal?: AbortSignal;
|
|
39
|
-
readonly images?: boolean;
|
|
40
|
-
readonly lineEnding?: MarkdownLineEnding;
|
|
41
|
-
readonly frontMatter?: boolean;
|
|
42
|
-
}
|
|
43
|
-
//#endregion
|
|
1
|
+
import { a as MarkdownLineEnding, c as ReadMarkdownOptions, i as MarkdownHeadingStyle, l as WriteMarkdownOptions, n as MarkdownCodeFenceChar, o as MarkdownOrderedListDelimiter, r as MarkdownEmphasisMarker, s as MarkdownThematicBreakChar, t as MarkdownBulletListMarker, u as WriteMarkdownStyleOptions } from "../options-ZnZOMG3X.cjs";
|
|
44
2
|
export { MarkdownBulletListMarker, MarkdownCodeFenceChar, MarkdownEmphasisMarker, MarkdownHeadingStyle, MarkdownLineEnding, MarkdownOrderedListDelimiter, MarkdownThematicBreakChar, ReadMarkdownOptions, WriteMarkdownOptions, WriteMarkdownStyleOptions };
|
|
@@ -1,44 +1,2 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import { n as MarkdownImageResolver } from "../image-gR1vISI0.js";
|
|
3
|
-
import { Margins, PageSize } from "document-schema.js";
|
|
4
|
-
//#region src/options/options.d.ts
|
|
5
|
-
interface ReadMarkdownOptions {
|
|
6
|
-
readonly sink?: MarkdownDiagnosticSink;
|
|
7
|
-
readonly signal?: AbortSignal;
|
|
8
|
-
readonly pageSize?: PageSize;
|
|
9
|
-
readonly margins?: Margins;
|
|
10
|
-
readonly images?: MarkdownImageResolver;
|
|
11
|
-
readonly rawHtml?: "preserve" | "drop";
|
|
12
|
-
readonly frontMatter?: boolean;
|
|
13
|
-
readonly gfmTables?: boolean;
|
|
14
|
-
readonly gfmAutolinks?: boolean;
|
|
15
|
-
readonly gfmStrikethrough?: boolean;
|
|
16
|
-
readonly gfmTaskLists?: boolean;
|
|
17
|
-
readonly footnotes?: boolean;
|
|
18
|
-
readonly maxInputBytes?: number;
|
|
19
|
-
readonly maxBlockNesting?: number;
|
|
20
|
-
}
|
|
21
|
-
type MarkdownHeadingStyle = "atx" | "setext";
|
|
22
|
-
type MarkdownBulletListMarker = "-" | "*" | "+";
|
|
23
|
-
type MarkdownOrderedListDelimiter = "." | ")";
|
|
24
|
-
type MarkdownEmphasisMarker = "_" | "*";
|
|
25
|
-
type MarkdownCodeFenceChar = "`" | "~";
|
|
26
|
-
type MarkdownThematicBreakChar = "-" | "_" | "*";
|
|
27
|
-
type MarkdownLineEnding = "lf" | "crlf";
|
|
28
|
-
interface WriteMarkdownStyleOptions {
|
|
29
|
-
readonly headingStyle?: MarkdownHeadingStyle;
|
|
30
|
-
readonly bulletListMarker?: MarkdownBulletListMarker;
|
|
31
|
-
readonly orderedListDelimiter?: MarkdownOrderedListDelimiter;
|
|
32
|
-
readonly emphasisMarker?: MarkdownEmphasisMarker;
|
|
33
|
-
readonly codeFenceChar?: MarkdownCodeFenceChar;
|
|
34
|
-
readonly thematicBreakChar?: MarkdownThematicBreakChar;
|
|
35
|
-
}
|
|
36
|
-
interface WriteMarkdownOptions extends WriteMarkdownStyleOptions {
|
|
37
|
-
readonly sink?: MarkdownDiagnosticSink;
|
|
38
|
-
readonly signal?: AbortSignal;
|
|
39
|
-
readonly images?: boolean;
|
|
40
|
-
readonly lineEnding?: MarkdownLineEnding;
|
|
41
|
-
readonly frontMatter?: boolean;
|
|
42
|
-
}
|
|
43
|
-
//#endregion
|
|
1
|
+
import { a as MarkdownLineEnding, c as ReadMarkdownOptions, i as MarkdownHeadingStyle, l as WriteMarkdownOptions, n as MarkdownCodeFenceChar, o as MarkdownOrderedListDelimiter, r as MarkdownEmphasisMarker, s as MarkdownThematicBreakChar, t as MarkdownBulletListMarker, u as WriteMarkdownStyleOptions } from "../options-CZoMEGL8.js";
|
|
44
2
|
export { MarkdownBulletListMarker, MarkdownCodeFenceChar, MarkdownEmphasisMarker, MarkdownHeadingStyle, MarkdownLineEnding, MarkdownOrderedListDelimiter, MarkdownThematicBreakChar, ReadMarkdownOptions, WriteMarkdownOptions, WriteMarkdownStyleOptions };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "./diagnostics-D3UiC9HL.js";
|
|
2
|
+
import { n as MarkdownImageResolver } from "./image-gR1vISI0.js";
|
|
3
|
+
import { Margins, PageSize } from "document-schema.js";
|
|
4
|
+
//#region src/options/options.d.ts
|
|
5
|
+
interface ReadMarkdownOptions {
|
|
6
|
+
readonly sink?: MarkdownDiagnosticSink;
|
|
7
|
+
readonly signal?: AbortSignal;
|
|
8
|
+
readonly pageSize?: PageSize;
|
|
9
|
+
readonly margins?: Margins;
|
|
10
|
+
readonly images?: MarkdownImageResolver;
|
|
11
|
+
readonly rawHtml?: "preserve" | "drop";
|
|
12
|
+
readonly frontMatter?: boolean;
|
|
13
|
+
readonly gfmTables?: boolean;
|
|
14
|
+
readonly gfmAutolinks?: boolean;
|
|
15
|
+
readonly gfmStrikethrough?: boolean;
|
|
16
|
+
readonly gfmTaskLists?: boolean;
|
|
17
|
+
readonly footnotes?: boolean;
|
|
18
|
+
readonly maxInputBytes?: number;
|
|
19
|
+
readonly maxBlockNesting?: number;
|
|
20
|
+
}
|
|
21
|
+
type MarkdownHeadingStyle = "atx" | "setext";
|
|
22
|
+
type MarkdownBulletListMarker = "-" | "*" | "+";
|
|
23
|
+
type MarkdownOrderedListDelimiter = "." | ")";
|
|
24
|
+
type MarkdownEmphasisMarker = "_" | "*";
|
|
25
|
+
type MarkdownCodeFenceChar = "`" | "~";
|
|
26
|
+
type MarkdownThematicBreakChar = "-" | "_" | "*";
|
|
27
|
+
type MarkdownLineEnding = "lf" | "crlf";
|
|
28
|
+
interface WriteMarkdownStyleOptions {
|
|
29
|
+
readonly headingStyle?: MarkdownHeadingStyle;
|
|
30
|
+
readonly bulletListMarker?: MarkdownBulletListMarker;
|
|
31
|
+
readonly orderedListDelimiter?: MarkdownOrderedListDelimiter;
|
|
32
|
+
readonly emphasisMarker?: MarkdownEmphasisMarker;
|
|
33
|
+
readonly codeFenceChar?: MarkdownCodeFenceChar;
|
|
34
|
+
readonly thematicBreakChar?: MarkdownThematicBreakChar;
|
|
35
|
+
}
|
|
36
|
+
interface WriteMarkdownOptions extends WriteMarkdownStyleOptions {
|
|
37
|
+
readonly sink?: MarkdownDiagnosticSink;
|
|
38
|
+
readonly signal?: AbortSignal;
|
|
39
|
+
readonly images?: boolean;
|
|
40
|
+
readonly lineEnding?: MarkdownLineEnding;
|
|
41
|
+
readonly frontMatter?: boolean;
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { MarkdownLineEnding as a, ReadMarkdownOptions as c, MarkdownHeadingStyle as i, WriteMarkdownOptions as l, MarkdownCodeFenceChar as n, MarkdownOrderedListDelimiter as o, MarkdownEmphasisMarker as r, MarkdownThematicBreakChar as s, MarkdownBulletListMarker as t, WriteMarkdownStyleOptions as u };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "./diagnostics-D3UiC9HL.cjs";
|
|
2
|
+
import { n as MarkdownImageResolver } from "./image-B6p0Ovgy.cjs";
|
|
3
|
+
import { Margins, PageSize } from "document-schema.js";
|
|
4
|
+
//#region src/options/options.d.ts
|
|
5
|
+
interface ReadMarkdownOptions {
|
|
6
|
+
readonly sink?: MarkdownDiagnosticSink;
|
|
7
|
+
readonly signal?: AbortSignal;
|
|
8
|
+
readonly pageSize?: PageSize;
|
|
9
|
+
readonly margins?: Margins;
|
|
10
|
+
readonly images?: MarkdownImageResolver;
|
|
11
|
+
readonly rawHtml?: "preserve" | "drop";
|
|
12
|
+
readonly frontMatter?: boolean;
|
|
13
|
+
readonly gfmTables?: boolean;
|
|
14
|
+
readonly gfmAutolinks?: boolean;
|
|
15
|
+
readonly gfmStrikethrough?: boolean;
|
|
16
|
+
readonly gfmTaskLists?: boolean;
|
|
17
|
+
readonly footnotes?: boolean;
|
|
18
|
+
readonly maxInputBytes?: number;
|
|
19
|
+
readonly maxBlockNesting?: number;
|
|
20
|
+
}
|
|
21
|
+
type MarkdownHeadingStyle = "atx" | "setext";
|
|
22
|
+
type MarkdownBulletListMarker = "-" | "*" | "+";
|
|
23
|
+
type MarkdownOrderedListDelimiter = "." | ")";
|
|
24
|
+
type MarkdownEmphasisMarker = "_" | "*";
|
|
25
|
+
type MarkdownCodeFenceChar = "`" | "~";
|
|
26
|
+
type MarkdownThematicBreakChar = "-" | "_" | "*";
|
|
27
|
+
type MarkdownLineEnding = "lf" | "crlf";
|
|
28
|
+
interface WriteMarkdownStyleOptions {
|
|
29
|
+
readonly headingStyle?: MarkdownHeadingStyle;
|
|
30
|
+
readonly bulletListMarker?: MarkdownBulletListMarker;
|
|
31
|
+
readonly orderedListDelimiter?: MarkdownOrderedListDelimiter;
|
|
32
|
+
readonly emphasisMarker?: MarkdownEmphasisMarker;
|
|
33
|
+
readonly codeFenceChar?: MarkdownCodeFenceChar;
|
|
34
|
+
readonly thematicBreakChar?: MarkdownThematicBreakChar;
|
|
35
|
+
}
|
|
36
|
+
interface WriteMarkdownOptions extends WriteMarkdownStyleOptions {
|
|
37
|
+
readonly sink?: MarkdownDiagnosticSink;
|
|
38
|
+
readonly signal?: AbortSignal;
|
|
39
|
+
readonly images?: boolean;
|
|
40
|
+
readonly lineEnding?: MarkdownLineEnding;
|
|
41
|
+
readonly frontMatter?: boolean;
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { MarkdownLineEnding as a, ReadMarkdownOptions as c, MarkdownHeadingStyle as i, WriteMarkdownOptions as l, MarkdownCodeFenceChar as n, MarkdownOrderedListDelimiter as o, MarkdownEmphasisMarker as r, MarkdownThematicBreakChar as s, MarkdownBulletListMarker as t, WriteMarkdownStyleOptions as u };
|
package/dist/read.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as MarkdownDiagnostic } from "./diagnostics-D3UiC9HL.cjs";
|
|
2
|
-
import { ReadMarkdownOptions } from "./options
|
|
2
|
+
import { c as ReadMarkdownOptions } from "./options-ZnZOMG3X.cjs";
|
|
3
3
|
import { ContentDocument, DocumentTree } from "document-schema.js";
|
|
4
4
|
//#region src/read.d.ts
|
|
5
5
|
interface ReadMarkdownResult {
|
package/dist/read.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as MarkdownDiagnostic } from "./diagnostics-D3UiC9HL.js";
|
|
2
|
-
import { ReadMarkdownOptions } from "./options
|
|
2
|
+
import { c as ReadMarkdownOptions } from "./options-CZoMEGL8.js";
|
|
3
3
|
import { ContentDocument, DocumentTree } from "document-schema.js";
|
|
4
4
|
//#region src/read.d.ts
|
|
5
5
|
interface ReadMarkdownResult {
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/scan/entity-table-n-z.ts
|
|
3
|
+
const HTML_ENTITY_TABLE_N_TO_S = {
|
|
4
|
+
NJcy: "Њ",
|
|
5
|
+
Nacute: "Ń",
|
|
6
|
+
Ncaron: "Ň",
|
|
7
|
+
Ncedil: "Ņ",
|
|
8
|
+
Ncy: "Н",
|
|
9
|
+
NegativeMediumSpace: "",
|
|
10
|
+
NegativeThickSpace: "",
|
|
11
|
+
NegativeThinSpace: "",
|
|
12
|
+
NegativeVeryThinSpace: "",
|
|
13
|
+
NestedGreaterGreater: "≫",
|
|
14
|
+
NestedLessLess: "≪",
|
|
15
|
+
NewLine: "\n",
|
|
16
|
+
Nfr: "𝔑",
|
|
17
|
+
NoBreak: "",
|
|
18
|
+
NonBreakingSpace: "\xA0",
|
|
19
|
+
Nopf: "ℕ",
|
|
20
|
+
Not: "⫬",
|
|
21
|
+
NotCongruent: "≢",
|
|
22
|
+
NotCupCap: "≭",
|
|
23
|
+
NotDoubleVerticalBar: "∦",
|
|
24
|
+
NotElement: "∉",
|
|
25
|
+
NotEqual: "≠",
|
|
26
|
+
NotEqualTilde: "≂̸",
|
|
27
|
+
NotExists: "∄",
|
|
28
|
+
NotGreater: "≯",
|
|
29
|
+
NotGreaterEqual: "≱",
|
|
30
|
+
NotGreaterFullEqual: "≧̸",
|
|
31
|
+
NotGreaterGreater: "≫̸",
|
|
32
|
+
NotGreaterLess: "≹",
|
|
33
|
+
NotGreaterSlantEqual: "⩾̸",
|
|
34
|
+
NotGreaterTilde: "≵",
|
|
35
|
+
NotHumpDownHump: "≎̸",
|
|
36
|
+
NotHumpEqual: "≏̸",
|
|
37
|
+
NotLeftTriangle: "⋪",
|
|
38
|
+
NotLeftTriangleBar: "⧏̸",
|
|
39
|
+
NotLeftTriangleEqual: "⋬",
|
|
40
|
+
NotLess: "≮",
|
|
41
|
+
NotLessEqual: "≰",
|
|
42
|
+
NotLessGreater: "≸",
|
|
43
|
+
NotLessLess: "≪̸",
|
|
44
|
+
NotLessSlantEqual: "⩽̸",
|
|
45
|
+
NotLessTilde: "≴",
|
|
46
|
+
NotNestedGreaterGreater: "⪢̸",
|
|
47
|
+
NotNestedLessLess: "⪡̸",
|
|
48
|
+
NotPrecedes: "⊀",
|
|
49
|
+
NotPrecedesEqual: "⪯̸",
|
|
50
|
+
NotPrecedesSlantEqual: "⋠",
|
|
51
|
+
NotReverseElement: "∌",
|
|
52
|
+
NotRightTriangle: "⋫",
|
|
53
|
+
NotRightTriangleBar: "⧐̸",
|
|
54
|
+
NotRightTriangleEqual: "⋭",
|
|
55
|
+
NotSquareSubset: "⊏̸",
|
|
56
|
+
NotSquareSubsetEqual: "⋢",
|
|
57
|
+
NotSquareSuperset: "⊐̸",
|
|
58
|
+
NotSquareSupersetEqual: "⋣",
|
|
59
|
+
NotSubset: "⊂⃒",
|
|
60
|
+
NotSubsetEqual: "⊈",
|
|
61
|
+
NotSucceeds: "⊁",
|
|
62
|
+
NotSucceedsEqual: "⪰̸",
|
|
63
|
+
NotSucceedsSlantEqual: "⋡",
|
|
64
|
+
NotSucceedsTilde: "≿̸",
|
|
65
|
+
NotSuperset: "⊃⃒",
|
|
66
|
+
NotSupersetEqual: "⊉",
|
|
67
|
+
NotTilde: "≁",
|
|
68
|
+
NotTildeEqual: "≄",
|
|
69
|
+
NotTildeFullEqual: "≇",
|
|
70
|
+
NotTildeTilde: "≉",
|
|
71
|
+
NotVerticalBar: "∤",
|
|
72
|
+
Nscr: "𝒩",
|
|
73
|
+
Ntilde: "Ñ",
|
|
74
|
+
Nu: "Ν",
|
|
75
|
+
OElig: "Œ",
|
|
76
|
+
Oacute: "Ó",
|
|
77
|
+
Ocirc: "Ô",
|
|
78
|
+
Ocy: "О",
|
|
79
|
+
Odblac: "Ő",
|
|
80
|
+
Ofr: "𝔒",
|
|
81
|
+
Ograve: "Ò",
|
|
82
|
+
Omacr: "Ō",
|
|
83
|
+
Omega: "Ω",
|
|
84
|
+
Omicron: "Ο",
|
|
85
|
+
Oopf: "𝕆",
|
|
86
|
+
OpenCurlyDoubleQuote: "“",
|
|
87
|
+
OpenCurlyQuote: "‘",
|
|
88
|
+
Or: "⩔",
|
|
89
|
+
Oscr: "𝒪",
|
|
90
|
+
Oslash: "Ø",
|
|
91
|
+
Otilde: "Õ",
|
|
92
|
+
Otimes: "⨷",
|
|
93
|
+
Ouml: "Ö",
|
|
94
|
+
OverBar: "‾",
|
|
95
|
+
OverBrace: "⏞",
|
|
96
|
+
OverBracket: "⎴",
|
|
97
|
+
OverParenthesis: "⏜",
|
|
98
|
+
PartialD: "∂",
|
|
99
|
+
Pcy: "П",
|
|
100
|
+
Pfr: "𝔓",
|
|
101
|
+
Phi: "Φ",
|
|
102
|
+
Pi: "Π",
|
|
103
|
+
PlusMinus: "±",
|
|
104
|
+
Poincareplane: "ℌ",
|
|
105
|
+
Popf: "ℙ",
|
|
106
|
+
Pr: "⪻",
|
|
107
|
+
Precedes: "≺",
|
|
108
|
+
PrecedesEqual: "⪯",
|
|
109
|
+
PrecedesSlantEqual: "≼",
|
|
110
|
+
PrecedesTilde: "≾",
|
|
111
|
+
Prime: "″",
|
|
112
|
+
Product: "∏",
|
|
113
|
+
Proportion: "∷",
|
|
114
|
+
Proportional: "∝",
|
|
115
|
+
Pscr: "𝒫",
|
|
116
|
+
Psi: "Ψ",
|
|
117
|
+
QUOT: "\"",
|
|
118
|
+
Qfr: "𝔔",
|
|
119
|
+
Qopf: "ℚ",
|
|
120
|
+
Qscr: "𝒬",
|
|
121
|
+
RBarr: "⤐",
|
|
122
|
+
REG: "®",
|
|
123
|
+
Racute: "Ŕ",
|
|
124
|
+
Rang: "⟫",
|
|
125
|
+
Rarr: "↠",
|
|
126
|
+
Rarrtl: "⤖",
|
|
127
|
+
Rcaron: "Ř",
|
|
128
|
+
Rcedil: "Ŗ",
|
|
129
|
+
Rcy: "Р",
|
|
130
|
+
Re: "ℜ",
|
|
131
|
+
ReverseElement: "∋",
|
|
132
|
+
ReverseEquilibrium: "⇋",
|
|
133
|
+
ReverseUpEquilibrium: "⥯",
|
|
134
|
+
Rfr: "ℜ",
|
|
135
|
+
Rho: "Ρ",
|
|
136
|
+
RightAngleBracket: "⟩",
|
|
137
|
+
RightArrow: "→",
|
|
138
|
+
RightArrowBar: "⇥",
|
|
139
|
+
RightArrowLeftArrow: "⇄",
|
|
140
|
+
RightCeiling: "⌉",
|
|
141
|
+
RightDoubleBracket: "⟧",
|
|
142
|
+
RightDownTeeVector: "⥝",
|
|
143
|
+
RightDownVector: "⇂",
|
|
144
|
+
RightDownVectorBar: "⥕",
|
|
145
|
+
RightFloor: "⌋",
|
|
146
|
+
RightTee: "⊢",
|
|
147
|
+
RightTeeArrow: "↦",
|
|
148
|
+
RightTeeVector: "⥛",
|
|
149
|
+
RightTriangle: "⊳",
|
|
150
|
+
RightTriangleBar: "⧐",
|
|
151
|
+
RightTriangleEqual: "⊵",
|
|
152
|
+
RightUpDownVector: "⥏",
|
|
153
|
+
RightUpTeeVector: "⥜",
|
|
154
|
+
RightUpVector: "↾",
|
|
155
|
+
RightUpVectorBar: "⥔",
|
|
156
|
+
RightVector: "⇀",
|
|
157
|
+
RightVectorBar: "⥓",
|
|
158
|
+
Rightarrow: "⇒",
|
|
159
|
+
Ropf: "ℝ",
|
|
160
|
+
RoundImplies: "⥰",
|
|
161
|
+
Rrightarrow: "⇛",
|
|
162
|
+
Rscr: "ℛ",
|
|
163
|
+
Rsh: "↱",
|
|
164
|
+
RuleDelayed: "⧴",
|
|
165
|
+
SHCHcy: "Щ",
|
|
166
|
+
SHcy: "Ш",
|
|
167
|
+
SOFTcy: "Ь",
|
|
168
|
+
Sacute: "Ś",
|
|
169
|
+
Sc: "⪼",
|
|
170
|
+
Scaron: "Š",
|
|
171
|
+
Scedil: "Ş",
|
|
172
|
+
Scirc: "Ŝ",
|
|
173
|
+
Scy: "С",
|
|
174
|
+
Sfr: "𝔖",
|
|
175
|
+
ShortDownArrow: "↓",
|
|
176
|
+
ShortLeftArrow: "←",
|
|
177
|
+
ShortRightArrow: "→",
|
|
178
|
+
ShortUpArrow: "↑",
|
|
179
|
+
Sigma: "Σ",
|
|
180
|
+
SmallCircle: "∘",
|
|
181
|
+
Sopf: "𝕊",
|
|
182
|
+
Sqrt: "√",
|
|
183
|
+
Square: "□",
|
|
184
|
+
SquareIntersection: "⊓",
|
|
185
|
+
SquareSubset: "⊏",
|
|
186
|
+
SquareSubsetEqual: "⊑",
|
|
187
|
+
SquareSuperset: "⊐",
|
|
188
|
+
SquareSupersetEqual: "⊒",
|
|
189
|
+
SquareUnion: "⊔",
|
|
190
|
+
Sscr: "𝒮",
|
|
191
|
+
Star: "⋆",
|
|
192
|
+
Sub: "⋐",
|
|
193
|
+
Subset: "⋐",
|
|
194
|
+
SubsetEqual: "⊆",
|
|
195
|
+
Succeeds: "≻",
|
|
196
|
+
SucceedsEqual: "⪰",
|
|
197
|
+
SucceedsSlantEqual: "≽",
|
|
198
|
+
SucceedsTilde: "≿",
|
|
199
|
+
SuchThat: "∋",
|
|
200
|
+
Sum: "∑",
|
|
201
|
+
Sup: "⋑",
|
|
202
|
+
Superset: "⊃",
|
|
203
|
+
SupersetEqual: "⊇",
|
|
204
|
+
Supset: "⋑"
|
|
205
|
+
};
|
|
206
|
+
//#endregion
|
|
207
|
+
exports.HTML_ENTITY_TABLE_N_TO_S = HTML_ENTITY_TABLE_N_TO_S;
|