@kreuzberg/html-to-markdown-wasm 3.6.0-rc.1 → 3.6.0-rc.2
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/README.md +19 -0
- package/package.json +1 -1
- package/pkg/bundler/README.md +19 -0
- package/pkg/bundler/html_to_markdown_wasm.d.ts +15 -2
- package/pkg/bundler/html_to_markdown_wasm.js +1 -1
- package/pkg/bundler/html_to_markdown_wasm_bg.js +66 -4
- package/pkg/bundler/html_to_markdown_wasm_bg.wasm +0 -0
- package/pkg/bundler/html_to_markdown_wasm_bg.wasm.d.ts +6 -2
- package/pkg/bundler/package.json +1 -1
- package/pkg/deno/README.md +19 -0
- package/pkg/deno/html_to_markdown_wasm.d.ts +15 -2
- package/pkg/deno/html_to_markdown_wasm.js +66 -4
- package/pkg/deno/html_to_markdown_wasm_bg.wasm +0 -0
- package/pkg/deno/html_to_markdown_wasm_bg.wasm.d.ts +6 -2
- package/pkg/nodejs/README.md +19 -0
- package/pkg/nodejs/html_to_markdown_wasm.d.ts +15 -2
- package/pkg/nodejs/html_to_markdown_wasm.js +67 -4
- package/pkg/nodejs/html_to_markdown_wasm_bg.wasm +0 -0
- package/pkg/nodejs/html_to_markdown_wasm_bg.wasm.d.ts +6 -2
- package/pkg/nodejs/package.json +1 -1
- package/pkg/web/README.md +19 -0
- package/pkg/web/html_to_markdown_wasm.d.ts +21 -4
- package/pkg/web/html_to_markdown_wasm.js +66 -4
- package/pkg/web/html_to_markdown_wasm_bg.wasm +0 -0
- package/pkg/web/html_to_markdown_wasm_bg.wasm.d.ts +6 -2
- package/pkg/web/package.json +1 -1
package/README.md
CHANGED
|
@@ -126,6 +126,25 @@ const markdown = result.content;
|
|
|
126
126
|
console.log(markdown);
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
+
## Architecture
|
|
130
|
+
|
|
131
|
+
The converter routes each input through one of three tiers based on a fast prescan of the byte stream:
|
|
132
|
+
|
|
133
|
+
1. **Tier-1 — single-pass byte scanner.** Handles 110+ HTML tags directly. Bails on any construct it cannot prove byte-equivalent to Tier-2.
|
|
134
|
+
2. **Tier-2 — DOM walker.** Picks up Tier-1 bails and inputs the classifier rejected up front.
|
|
135
|
+
3. **Tier-3 — standards-conformant parser.** Engaged for malformed HTML requiring full HTML5 repair.
|
|
136
|
+
|
|
137
|
+
The dispatcher is invisible to the caller. Output is byte-identical across tiers — enforced by a 116-snapshot oracle.
|
|
138
|
+
|
|
139
|
+
## Capabilities
|
|
140
|
+
|
|
141
|
+
- **16 languages, one Rust core.** Rust, Python, Node.js, WASM, Java, Go, C#, PHP, Ruby, Elixir, R, Dart, Kotlin (Android), Swift, Zig, C ABI.
|
|
142
|
+
- **CommonMark-compatible Markdown** with GFM-style tables.
|
|
143
|
+
- **Djot output**: set `output_format = "djot"` (see Djot Output Format section below).
|
|
144
|
+
- **Real-HTML robust**: unclosed tags, CDATA, custom elements, malformed entities, nested tables, mixed encodings handled without losing content.
|
|
145
|
+
- **Metadata extraction**, **visitor API**, **inline images**, **configurable preprocessing presets**.
|
|
146
|
+
- **Per-group regression gates in CI**: every PR runs the bench harness against per-group thresholds.
|
|
147
|
+
|
|
129
148
|
## API Reference
|
|
130
149
|
|
|
131
150
|
### Core Function
|
package/package.json
CHANGED
package/pkg/bundler/README.md
CHANGED
|
@@ -126,6 +126,25 @@ const markdown = result.content;
|
|
|
126
126
|
console.log(markdown);
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
+
## Architecture
|
|
130
|
+
|
|
131
|
+
The converter routes each input through one of three tiers based on a fast prescan of the byte stream:
|
|
132
|
+
|
|
133
|
+
1. **Tier-1 — single-pass byte scanner.** Handles 110+ HTML tags directly. Bails on any construct it cannot prove byte-equivalent to Tier-2.
|
|
134
|
+
2. **Tier-2 — DOM walker.** Picks up Tier-1 bails and inputs the classifier rejected up front.
|
|
135
|
+
3. **Tier-3 — standards-conformant parser.** Engaged for malformed HTML requiring full HTML5 repair.
|
|
136
|
+
|
|
137
|
+
The dispatcher is invisible to the caller. Output is byte-identical across tiers — enforced by a 116-snapshot oracle.
|
|
138
|
+
|
|
139
|
+
## Capabilities
|
|
140
|
+
|
|
141
|
+
- **16 languages, one Rust core.** Rust, Python, Node.js, WASM, Java, Go, C#, PHP, Ruby, Elixir, R, Dart, Kotlin (Android), Swift, Zig, C ABI.
|
|
142
|
+
- **CommonMark-compatible Markdown** with GFM-style tables.
|
|
143
|
+
- **Djot output**: set `output_format = "djot"` (see Djot Output Format section below).
|
|
144
|
+
- **Real-HTML robust**: unclosed tags, CDATA, custom elements, malformed entities, nested tables, mixed encodings handled without losing content.
|
|
145
|
+
- **Metadata extraction**, **visitor API**, **inline images**, **configurable preprocessing presets**.
|
|
146
|
+
- **Per-group regression gates in CI**: every PR runs the bench harness against per-group thresholds.
|
|
147
|
+
|
|
129
148
|
## API Reference
|
|
130
149
|
|
|
131
150
|
### Core Function
|
|
@@ -40,7 +40,7 @@ export class WasmConversionOptions {
|
|
|
40
40
|
free(): void;
|
|
41
41
|
[Symbol.dispose](): void;
|
|
42
42
|
static default(): WasmConversionOptions;
|
|
43
|
-
constructor(headingStyle?: WasmHeadingStyle | null, listIndentType?: WasmListIndentType | null, listIndentWidth?: number | null, bullets?: string | null, strongEmSymbol?: string | null, escapeAsterisks?: boolean | null, escapeUnderscores?: boolean | null, escapeMisc?: boolean | null, escapeAscii?: boolean | null, codeLanguage?: string | null, autolinks?: boolean | null, defaultTitle?: boolean | null, brInTables?: boolean | null, compactTables?: boolean | null, highlightStyle?: WasmHighlightStyle | null, extractMetadata?: boolean | null, whitespaceMode?: WasmWhitespaceMode | null, stripNewlines?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, convertAsInline?: boolean | null, subSymbol?: string | null, supSymbol?: string | null, newlineStyle?: WasmNewlineStyle | null, codeBlockStyle?: WasmCodeBlockStyle | null, keepInlineImagesIn?: string[] | null, preprocessing?: WasmPreprocessingOptions | null, encoding?: string | null, debug?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, skipImages?: boolean | null, urlEscapeStyle?: WasmUrlEscapeStyle | null, linkStyle?: WasmLinkStyle | null, outputFormat?: WasmOutputFormat | null, includeDocumentStructure?: boolean | null, extractImages?: boolean | null, maxImageSize?: bigint | null, captureSvg?: boolean | null, inferDimensions?: boolean | null, excludeSelectors?: string[] | null, maxDepth?: number | null);
|
|
43
|
+
constructor(headingStyle?: WasmHeadingStyle | null, listIndentType?: WasmListIndentType | null, listIndentWidth?: number | null, bullets?: string | null, strongEmSymbol?: string | null, escapeAsterisks?: boolean | null, escapeUnderscores?: boolean | null, escapeMisc?: boolean | null, escapeAscii?: boolean | null, codeLanguage?: string | null, autolinks?: boolean | null, defaultTitle?: boolean | null, brInTables?: boolean | null, compactTables?: boolean | null, highlightStyle?: WasmHighlightStyle | null, extractMetadata?: boolean | null, whitespaceMode?: WasmWhitespaceMode | null, stripNewlines?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, convertAsInline?: boolean | null, subSymbol?: string | null, supSymbol?: string | null, newlineStyle?: WasmNewlineStyle | null, codeBlockStyle?: WasmCodeBlockStyle | null, keepInlineImagesIn?: string[] | null, preprocessing?: WasmPreprocessingOptions | null, encoding?: string | null, debug?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, skipImages?: boolean | null, urlEscapeStyle?: WasmUrlEscapeStyle | null, linkStyle?: WasmLinkStyle | null, outputFormat?: WasmOutputFormat | null, includeDocumentStructure?: boolean | null, extractImages?: boolean | null, maxImageSize?: bigint | null, captureSvg?: boolean | null, inferDimensions?: boolean | null, excludeSelectors?: string[] | null, tierStrategy?: WasmTierStrategy | null, maxDepth?: number | null);
|
|
44
44
|
autolinks: boolean;
|
|
45
45
|
brInTables: boolean;
|
|
46
46
|
bullets: string;
|
|
@@ -87,6 +87,8 @@ export class WasmConversionOptions {
|
|
|
87
87
|
strongEmSymbol: string;
|
|
88
88
|
subSymbol: string;
|
|
89
89
|
supSymbol: string;
|
|
90
|
+
get tierStrategy(): string;
|
|
91
|
+
set tierStrategy(value: WasmTierStrategy);
|
|
90
92
|
get urlEscapeStyle(): string;
|
|
91
93
|
set urlEscapeStyle(value: WasmUrlEscapeStyle);
|
|
92
94
|
get visitor(): WasmVisitorHandle | undefined;
|
|
@@ -107,7 +109,7 @@ export class WasmConversionOptionsUpdate {
|
|
|
107
109
|
free(): void;
|
|
108
110
|
[Symbol.dispose](): void;
|
|
109
111
|
static default(): WasmConversionOptionsUpdate;
|
|
110
|
-
constructor(headingStyle?: WasmHeadingStyle | null, listIndentType?: WasmListIndentType | null, listIndentWidth?: number | null, bullets?: string | null, strongEmSymbol?: string | null, escapeAsterisks?: boolean | null, escapeUnderscores?: boolean | null, escapeMisc?: boolean | null, escapeAscii?: boolean | null, codeLanguage?: string | null, autolinks?: boolean | null, defaultTitle?: boolean | null, brInTables?: boolean | null, compactTables?: boolean | null, highlightStyle?: WasmHighlightStyle | null, extractMetadata?: boolean | null, whitespaceMode?: WasmWhitespaceMode | null, stripNewlines?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, convertAsInline?: boolean | null, subSymbol?: string | null, supSymbol?: string | null, newlineStyle?: WasmNewlineStyle | null, codeBlockStyle?: WasmCodeBlockStyle | null, keepInlineImagesIn?: string[] | null, preprocessing?: WasmPreprocessingOptionsUpdate | null, encoding?: string | null, debug?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, skipImages?: boolean | null, urlEscapeStyle?: WasmUrlEscapeStyle | null, linkStyle?: WasmLinkStyle | null, outputFormat?: WasmOutputFormat | null, includeDocumentStructure?: boolean | null, extractImages?: boolean | null, maxImageSize?: bigint | null, captureSvg?: boolean | null, inferDimensions?: boolean | null, maxDepth?: number | null, excludeSelectors?: string[] | null);
|
|
112
|
+
constructor(headingStyle?: WasmHeadingStyle | null, listIndentType?: WasmListIndentType | null, listIndentWidth?: number | null, bullets?: string | null, strongEmSymbol?: string | null, escapeAsterisks?: boolean | null, escapeUnderscores?: boolean | null, escapeMisc?: boolean | null, escapeAscii?: boolean | null, codeLanguage?: string | null, autolinks?: boolean | null, defaultTitle?: boolean | null, brInTables?: boolean | null, compactTables?: boolean | null, highlightStyle?: WasmHighlightStyle | null, extractMetadata?: boolean | null, whitespaceMode?: WasmWhitespaceMode | null, stripNewlines?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, convertAsInline?: boolean | null, subSymbol?: string | null, supSymbol?: string | null, newlineStyle?: WasmNewlineStyle | null, codeBlockStyle?: WasmCodeBlockStyle | null, keepInlineImagesIn?: string[] | null, preprocessing?: WasmPreprocessingOptionsUpdate | null, encoding?: string | null, debug?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, skipImages?: boolean | null, urlEscapeStyle?: WasmUrlEscapeStyle | null, linkStyle?: WasmLinkStyle | null, outputFormat?: WasmOutputFormat | null, includeDocumentStructure?: boolean | null, extractImages?: boolean | null, maxImageSize?: bigint | null, captureSvg?: boolean | null, inferDimensions?: boolean | null, maxDepth?: number | null, excludeSelectors?: string[] | null, tierStrategy?: WasmTierStrategy | null);
|
|
111
113
|
get autolinks(): boolean | undefined;
|
|
112
114
|
set autolinks(value: boolean | null | undefined);
|
|
113
115
|
get brInTables(): boolean | undefined;
|
|
@@ -184,6 +186,8 @@ export class WasmConversionOptionsUpdate {
|
|
|
184
186
|
set subSymbol(value: string | null | undefined);
|
|
185
187
|
get supSymbol(): string | undefined;
|
|
186
188
|
set supSymbol(value: string | null | undefined);
|
|
189
|
+
get tierStrategy(): string | undefined;
|
|
190
|
+
set tierStrategy(value: WasmTierStrategy | null | undefined);
|
|
187
191
|
get urlEscapeStyle(): string | undefined;
|
|
188
192
|
set urlEscapeStyle(value: WasmUrlEscapeStyle | null | undefined);
|
|
189
193
|
get visitor(): WasmVisitorHandle | undefined;
|
|
@@ -830,6 +834,15 @@ export enum WasmTextDirection {
|
|
|
830
834
|
Auto = 2,
|
|
831
835
|
}
|
|
832
836
|
|
|
837
|
+
/**
|
|
838
|
+
* Controls which conversion tier is used.
|
|
839
|
+
*/
|
|
840
|
+
export enum WasmTierStrategy {
|
|
841
|
+
Auto = 0,
|
|
842
|
+
Tier2 = 1,
|
|
843
|
+
Tier1 = 2,
|
|
844
|
+
}
|
|
845
|
+
|
|
833
846
|
/**
|
|
834
847
|
* URL encoding strategy for link and image destinations.
|
|
835
848
|
*
|
|
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./html_to_markdown_wasm_bg.js";
|
|
|
5
5
|
__wbg_set_wasm(wasm);
|
|
6
6
|
|
|
7
7
|
export {
|
|
8
|
-
WasmAnnotationKind, WasmCodeBlockStyle, WasmConversionOptions, WasmConversionOptionsUpdate, WasmConversionResult, WasmDocumentMetadata, WasmDocumentNode, WasmDocumentStructure, WasmGridCell, WasmHeaderMetadata, WasmHeadingStyle, WasmHighlightStyle, WasmHtmlMetadata, WasmImageMetadata, WasmImageType, WasmLinkMetadata, WasmLinkStyle, WasmLinkType, WasmListIndentType, WasmNewlineStyle, WasmNodeContent, WasmNodeContext, WasmNodeType, WasmOutputFormat, WasmPreprocessingOptions, WasmPreprocessingOptionsUpdate, WasmPreprocessingPreset, WasmProcessingWarning, WasmStructuredData, WasmStructuredDataType, WasmTableData, WasmTableGrid, WasmTextAnnotation, WasmTextDirection, WasmUrlEscapeStyle, WasmVisitResult, WasmVisitorHandle, WasmWarningKind, WasmWhitespaceMode, convert
|
|
8
|
+
WasmAnnotationKind, WasmCodeBlockStyle, WasmConversionOptions, WasmConversionOptionsUpdate, WasmConversionResult, WasmDocumentMetadata, WasmDocumentNode, WasmDocumentStructure, WasmGridCell, WasmHeaderMetadata, WasmHeadingStyle, WasmHighlightStyle, WasmHtmlMetadata, WasmImageMetadata, WasmImageType, WasmLinkMetadata, WasmLinkStyle, WasmLinkType, WasmListIndentType, WasmNewlineStyle, WasmNodeContent, WasmNodeContext, WasmNodeType, WasmOutputFormat, WasmPreprocessingOptions, WasmPreprocessingOptionsUpdate, WasmPreprocessingPreset, WasmProcessingWarning, WasmStructuredData, WasmStructuredDataType, WasmTableData, WasmTableGrid, WasmTextAnnotation, WasmTextDirection, WasmTierStrategy, WasmUrlEscapeStyle, WasmVisitResult, WasmVisitorHandle, WasmWarningKind, WasmWhitespaceMode, convert
|
|
9
9
|
} from "./html_to_markdown_wasm_bg.js";
|
|
@@ -512,9 +512,10 @@ export class WasmConversionOptions {
|
|
|
512
512
|
* @param {boolean | null} [captureSvg]
|
|
513
513
|
* @param {boolean | null} [inferDimensions]
|
|
514
514
|
* @param {string[] | null} [excludeSelectors]
|
|
515
|
+
* @param {WasmTierStrategy | null} [tierStrategy]
|
|
515
516
|
* @param {number | null} [maxDepth]
|
|
516
517
|
*/
|
|
517
|
-
constructor(headingStyle, listIndentType, listIndentWidth, bullets, strongEmSymbol, escapeAsterisks, escapeUnderscores, escapeMisc, escapeAscii, codeLanguage, autolinks, defaultTitle, brInTables, compactTables, highlightStyle, extractMetadata, whitespaceMode, stripNewlines, wrap, wrapWidth, convertAsInline, subSymbol, supSymbol, newlineStyle, codeBlockStyle, keepInlineImagesIn, preprocessing, encoding, debug, stripTags, preserveTags, skipImages, urlEscapeStyle, linkStyle, outputFormat, includeDocumentStructure, extractImages, maxImageSize, captureSvg, inferDimensions, excludeSelectors, maxDepth) {
|
|
518
|
+
constructor(headingStyle, listIndentType, listIndentWidth, bullets, strongEmSymbol, escapeAsterisks, escapeUnderscores, escapeMisc, escapeAscii, codeLanguage, autolinks, defaultTitle, brInTables, compactTables, highlightStyle, extractMetadata, whitespaceMode, stripNewlines, wrap, wrapWidth, convertAsInline, subSymbol, supSymbol, newlineStyle, codeBlockStyle, keepInlineImagesIn, preprocessing, encoding, debug, stripTags, preserveTags, skipImages, urlEscapeStyle, linkStyle, outputFormat, includeDocumentStructure, extractImages, maxImageSize, captureSvg, inferDimensions, excludeSelectors, tierStrategy, maxDepth) {
|
|
518
519
|
var ptr0 = isLikeNone(bullets) ? 0 : passStringToWasm0(bullets, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
519
520
|
var len0 = WASM_VECTOR_LEN;
|
|
520
521
|
var ptr1 = isLikeNone(strongEmSymbol) ? 0 : passStringToWasm0(strongEmSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -540,7 +541,7 @@ export class WasmConversionOptions {
|
|
|
540
541
|
var len9 = WASM_VECTOR_LEN;
|
|
541
542
|
var ptr10 = isLikeNone(excludeSelectors) ? 0 : passArrayJsValueToWasm0(excludeSelectors, wasm.__wbindgen_export);
|
|
542
543
|
var len10 = WASM_VECTOR_LEN;
|
|
543
|
-
const ret = wasm.wasmconversionoptions_new(isLikeNone(headingStyle) ? 3 : headingStyle, isLikeNone(listIndentType) ? 2 : listIndentType, isLikeNone(listIndentWidth) ? Number.MAX_SAFE_INTEGER : (listIndentWidth) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escapeAsterisks) ? 0xFFFFFF : escapeAsterisks ? 1 : 0, isLikeNone(escapeUnderscores) ? 0xFFFFFF : escapeUnderscores ? 1 : 0, isLikeNone(escapeMisc) ? 0xFFFFFF : escapeMisc ? 1 : 0, isLikeNone(escapeAscii) ? 0xFFFFFF : escapeAscii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(defaultTitle) ? 0xFFFFFF : defaultTitle ? 1 : 0, isLikeNone(brInTables) ? 0xFFFFFF : brInTables ? 1 : 0, isLikeNone(compactTables) ? 0xFFFFFF : compactTables ? 1 : 0, isLikeNone(highlightStyle) ? 4 : highlightStyle, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(whitespaceMode) ? 2 : whitespaceMode, isLikeNone(stripNewlines) ? 0xFFFFFF : stripNewlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(convertAsInline) ? 0xFFFFFF : convertAsInline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newlineStyle) ? 2 : newlineStyle, isLikeNone(codeBlockStyle) ? 3 : codeBlockStyle, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(urlEscapeStyle) ? 2 : urlEscapeStyle, isLikeNone(linkStyle) ? 2 : linkStyle, isLikeNone(outputFormat) ? 3 : outputFormat, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractImages) ? 0xFFFFFF : extractImages ? 1 : 0, !isLikeNone(maxImageSize), isLikeNone(maxImageSize) ? BigInt(0) : maxImageSize, isLikeNone(captureSvg) ? 0xFFFFFF : captureSvg ? 1 : 0, isLikeNone(inferDimensions) ? 0xFFFFFF : inferDimensions ? 1 : 0, ptr10, len10, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0);
|
|
544
|
+
const ret = wasm.wasmconversionoptions_new(isLikeNone(headingStyle) ? 3 : headingStyle, isLikeNone(listIndentType) ? 2 : listIndentType, isLikeNone(listIndentWidth) ? Number.MAX_SAFE_INTEGER : (listIndentWidth) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escapeAsterisks) ? 0xFFFFFF : escapeAsterisks ? 1 : 0, isLikeNone(escapeUnderscores) ? 0xFFFFFF : escapeUnderscores ? 1 : 0, isLikeNone(escapeMisc) ? 0xFFFFFF : escapeMisc ? 1 : 0, isLikeNone(escapeAscii) ? 0xFFFFFF : escapeAscii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(defaultTitle) ? 0xFFFFFF : defaultTitle ? 1 : 0, isLikeNone(brInTables) ? 0xFFFFFF : brInTables ? 1 : 0, isLikeNone(compactTables) ? 0xFFFFFF : compactTables ? 1 : 0, isLikeNone(highlightStyle) ? 4 : highlightStyle, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(whitespaceMode) ? 2 : whitespaceMode, isLikeNone(stripNewlines) ? 0xFFFFFF : stripNewlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(convertAsInline) ? 0xFFFFFF : convertAsInline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newlineStyle) ? 2 : newlineStyle, isLikeNone(codeBlockStyle) ? 3 : codeBlockStyle, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(urlEscapeStyle) ? 2 : urlEscapeStyle, isLikeNone(linkStyle) ? 2 : linkStyle, isLikeNone(outputFormat) ? 3 : outputFormat, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractImages) ? 0xFFFFFF : extractImages ? 1 : 0, !isLikeNone(maxImageSize), isLikeNone(maxImageSize) ? BigInt(0) : maxImageSize, isLikeNone(captureSvg) ? 0xFFFFFF : captureSvg ? 1 : 0, isLikeNone(inferDimensions) ? 0xFFFFFF : inferDimensions ? 1 : 0, ptr10, len10, isLikeNone(tierStrategy) ? 3 : tierStrategy, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0);
|
|
544
545
|
this.__wbg_ptr = ret;
|
|
545
546
|
WasmConversionOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
546
547
|
return this;
|
|
@@ -856,6 +857,12 @@ export class WasmConversionOptions {
|
|
|
856
857
|
const len0 = WASM_VECTOR_LEN;
|
|
857
858
|
wasm.wasmconversionoptions_set_supSymbol(this.__wbg_ptr, ptr0, len0);
|
|
858
859
|
}
|
|
860
|
+
/**
|
|
861
|
+
* @param {WasmTierStrategy} value
|
|
862
|
+
*/
|
|
863
|
+
set tierStrategy(value) {
|
|
864
|
+
wasm.wasmconversionoptions_set_tierStrategy(this.__wbg_ptr, value);
|
|
865
|
+
}
|
|
859
866
|
/**
|
|
860
867
|
* @param {WasmUrlEscapeStyle} value
|
|
861
868
|
*/
|
|
@@ -978,6 +985,25 @@ export class WasmConversionOptions {
|
|
|
978
985
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
979
986
|
}
|
|
980
987
|
}
|
|
988
|
+
/**
|
|
989
|
+
* @returns {string}
|
|
990
|
+
*/
|
|
991
|
+
get tierStrategy() {
|
|
992
|
+
let deferred1_0;
|
|
993
|
+
let deferred1_1;
|
|
994
|
+
try {
|
|
995
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
996
|
+
wasm.wasmconversionoptions_tierStrategy(retptr, this.__wbg_ptr);
|
|
997
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
998
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
999
|
+
deferred1_0 = r0;
|
|
1000
|
+
deferred1_1 = r1;
|
|
1001
|
+
return getStringFromWasm0(r0, r1);
|
|
1002
|
+
} finally {
|
|
1003
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1004
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
981
1007
|
/**
|
|
982
1008
|
* @returns {string}
|
|
983
1009
|
*/
|
|
@@ -1436,8 +1462,9 @@ export class WasmConversionOptionsUpdate {
|
|
|
1436
1462
|
* @param {boolean | null} [inferDimensions]
|
|
1437
1463
|
* @param {number | null} [maxDepth]
|
|
1438
1464
|
* @param {string[] | null} [excludeSelectors]
|
|
1465
|
+
* @param {WasmTierStrategy | null} [tierStrategy]
|
|
1439
1466
|
*/
|
|
1440
|
-
constructor(headingStyle, listIndentType, listIndentWidth, bullets, strongEmSymbol, escapeAsterisks, escapeUnderscores, escapeMisc, escapeAscii, codeLanguage, autolinks, defaultTitle, brInTables, compactTables, highlightStyle, extractMetadata, whitespaceMode, stripNewlines, wrap, wrapWidth, convertAsInline, subSymbol, supSymbol, newlineStyle, codeBlockStyle, keepInlineImagesIn, preprocessing, encoding, debug, stripTags, preserveTags, skipImages, urlEscapeStyle, linkStyle, outputFormat, includeDocumentStructure, extractImages, maxImageSize, captureSvg, inferDimensions, maxDepth, excludeSelectors) {
|
|
1467
|
+
constructor(headingStyle, listIndentType, listIndentWidth, bullets, strongEmSymbol, escapeAsterisks, escapeUnderscores, escapeMisc, escapeAscii, codeLanguage, autolinks, defaultTitle, brInTables, compactTables, highlightStyle, extractMetadata, whitespaceMode, stripNewlines, wrap, wrapWidth, convertAsInline, subSymbol, supSymbol, newlineStyle, codeBlockStyle, keepInlineImagesIn, preprocessing, encoding, debug, stripTags, preserveTags, skipImages, urlEscapeStyle, linkStyle, outputFormat, includeDocumentStructure, extractImages, maxImageSize, captureSvg, inferDimensions, maxDepth, excludeSelectors, tierStrategy) {
|
|
1441
1468
|
var ptr0 = isLikeNone(bullets) ? 0 : passStringToWasm0(bullets, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1442
1469
|
var len0 = WASM_VECTOR_LEN;
|
|
1443
1470
|
var ptr1 = isLikeNone(strongEmSymbol) ? 0 : passStringToWasm0(strongEmSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -1463,7 +1490,7 @@ export class WasmConversionOptionsUpdate {
|
|
|
1463
1490
|
var len9 = WASM_VECTOR_LEN;
|
|
1464
1491
|
var ptr10 = isLikeNone(excludeSelectors) ? 0 : passArrayJsValueToWasm0(excludeSelectors, wasm.__wbindgen_export);
|
|
1465
1492
|
var len10 = WASM_VECTOR_LEN;
|
|
1466
|
-
const ret = wasm.wasmconversionoptionsupdate_new(isLikeNone(headingStyle) ? 3 : headingStyle, isLikeNone(listIndentType) ? 2 : listIndentType, isLikeNone(listIndentWidth) ? Number.MAX_SAFE_INTEGER : (listIndentWidth) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escapeAsterisks) ? 0xFFFFFF : escapeAsterisks ? 1 : 0, isLikeNone(escapeUnderscores) ? 0xFFFFFF : escapeUnderscores ? 1 : 0, isLikeNone(escapeMisc) ? 0xFFFFFF : escapeMisc ? 1 : 0, isLikeNone(escapeAscii) ? 0xFFFFFF : escapeAscii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(defaultTitle) ? 0xFFFFFF : defaultTitle ? 1 : 0, isLikeNone(brInTables) ? 0xFFFFFF : brInTables ? 1 : 0, isLikeNone(compactTables) ? 0xFFFFFF : compactTables ? 1 : 0, isLikeNone(highlightStyle) ? 4 : highlightStyle, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(whitespaceMode) ? 2 : whitespaceMode, isLikeNone(stripNewlines) ? 0xFFFFFF : stripNewlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(convertAsInline) ? 0xFFFFFF : convertAsInline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newlineStyle) ? 2 : newlineStyle, isLikeNone(codeBlockStyle) ? 3 : codeBlockStyle, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(urlEscapeStyle) ? 2 : urlEscapeStyle, isLikeNone(linkStyle) ? 2 : linkStyle, isLikeNone(outputFormat) ? 3 : outputFormat, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractImages) ? 0xFFFFFF : extractImages ? 1 : 0, !isLikeNone(maxImageSize), isLikeNone(maxImageSize) ? BigInt(0) : maxImageSize, isLikeNone(captureSvg) ? 0xFFFFFF : captureSvg ? 1 : 0, isLikeNone(inferDimensions) ? 0xFFFFFF : inferDimensions ? 1 : 0, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0, ptr10, len10);
|
|
1493
|
+
const ret = wasm.wasmconversionoptionsupdate_new(isLikeNone(headingStyle) ? 3 : headingStyle, isLikeNone(listIndentType) ? 2 : listIndentType, isLikeNone(listIndentWidth) ? Number.MAX_SAFE_INTEGER : (listIndentWidth) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escapeAsterisks) ? 0xFFFFFF : escapeAsterisks ? 1 : 0, isLikeNone(escapeUnderscores) ? 0xFFFFFF : escapeUnderscores ? 1 : 0, isLikeNone(escapeMisc) ? 0xFFFFFF : escapeMisc ? 1 : 0, isLikeNone(escapeAscii) ? 0xFFFFFF : escapeAscii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(defaultTitle) ? 0xFFFFFF : defaultTitle ? 1 : 0, isLikeNone(brInTables) ? 0xFFFFFF : brInTables ? 1 : 0, isLikeNone(compactTables) ? 0xFFFFFF : compactTables ? 1 : 0, isLikeNone(highlightStyle) ? 4 : highlightStyle, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(whitespaceMode) ? 2 : whitespaceMode, isLikeNone(stripNewlines) ? 0xFFFFFF : stripNewlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(convertAsInline) ? 0xFFFFFF : convertAsInline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newlineStyle) ? 2 : newlineStyle, isLikeNone(codeBlockStyle) ? 3 : codeBlockStyle, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(urlEscapeStyle) ? 2 : urlEscapeStyle, isLikeNone(linkStyle) ? 2 : linkStyle, isLikeNone(outputFormat) ? 3 : outputFormat, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractImages) ? 0xFFFFFF : extractImages ? 1 : 0, !isLikeNone(maxImageSize), isLikeNone(maxImageSize) ? BigInt(0) : maxImageSize, isLikeNone(captureSvg) ? 0xFFFFFF : captureSvg ? 1 : 0, isLikeNone(inferDimensions) ? 0xFFFFFF : inferDimensions ? 1 : 0, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0, ptr10, len10, isLikeNone(tierStrategy) ? 3 : tierStrategy);
|
|
1467
1494
|
this.__wbg_ptr = ret;
|
|
1468
1495
|
WasmConversionOptionsUpdateFinalization.register(this, this.__wbg_ptr, this);
|
|
1469
1496
|
return this;
|
|
@@ -1785,6 +1812,12 @@ export class WasmConversionOptionsUpdate {
|
|
|
1785
1812
|
var len0 = WASM_VECTOR_LEN;
|
|
1786
1813
|
wasm.wasmconversionoptionsupdate_set_supSymbol(this.__wbg_ptr, ptr0, len0);
|
|
1787
1814
|
}
|
|
1815
|
+
/**
|
|
1816
|
+
* @param {WasmTierStrategy | null} [value]
|
|
1817
|
+
*/
|
|
1818
|
+
set tierStrategy(value) {
|
|
1819
|
+
wasm.wasmconversionoptionsupdate_set_tierStrategy(this.__wbg_ptr, isLikeNone(value) ? 3 : value);
|
|
1820
|
+
}
|
|
1788
1821
|
/**
|
|
1789
1822
|
* @param {WasmUrlEscapeStyle | null} [value]
|
|
1790
1823
|
*/
|
|
@@ -1910,6 +1943,25 @@ export class WasmConversionOptionsUpdate {
|
|
|
1910
1943
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1911
1944
|
}
|
|
1912
1945
|
}
|
|
1946
|
+
/**
|
|
1947
|
+
* @returns {string | undefined}
|
|
1948
|
+
*/
|
|
1949
|
+
get tierStrategy() {
|
|
1950
|
+
try {
|
|
1951
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1952
|
+
wasm.wasmconversionoptionsupdate_tierStrategy(retptr, this.__wbg_ptr);
|
|
1953
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1954
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1955
|
+
let v1;
|
|
1956
|
+
if (r0 !== 0) {
|
|
1957
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1958
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1959
|
+
}
|
|
1960
|
+
return v1;
|
|
1961
|
+
} finally {
|
|
1962
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1913
1965
|
/**
|
|
1914
1966
|
* @returns {string | undefined}
|
|
1915
1967
|
*/
|
|
@@ -5233,6 +5285,16 @@ export const WasmTextDirection = Object.freeze({
|
|
|
5233
5285
|
Auto: 2, "2": "Auto",
|
|
5234
5286
|
});
|
|
5235
5287
|
|
|
5288
|
+
/**
|
|
5289
|
+
* Controls which conversion tier is used.
|
|
5290
|
+
* @enum {0 | 1 | 2}
|
|
5291
|
+
*/
|
|
5292
|
+
export const WasmTierStrategy = Object.freeze({
|
|
5293
|
+
Auto: 0, "0": "Auto",
|
|
5294
|
+
Tier2: 1, "1": "Tier2",
|
|
5295
|
+
Tier1: 2, "2": "Tier1",
|
|
5296
|
+
});
|
|
5297
|
+
|
|
5236
5298
|
/**
|
|
5237
5299
|
* URL encoding strategy for link and image destinations.
|
|
5238
5300
|
*
|
|
Binary file
|
|
@@ -59,7 +59,7 @@ export const wasmconversionoptions_listIndentType: (a: number, b: number) => voi
|
|
|
59
59
|
export const wasmconversionoptions_listIndentWidth: (a: number) => number;
|
|
60
60
|
export const wasmconversionoptions_maxDepth: (a: number) => number;
|
|
61
61
|
export const wasmconversionoptions_maxImageSize: (a: number) => bigint;
|
|
62
|
-
export const wasmconversionoptions_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: number, u1: number, v1: bigint, w1: number, x1: number, y1: number, z1: number, a2: number) => number;
|
|
62
|
+
export const wasmconversionoptions_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: number, u1: number, v1: bigint, w1: number, x1: number, y1: number, z1: number, a2: number, b2: number) => number;
|
|
63
63
|
export const wasmconversionoptions_newlineStyle: (a: number, b: number) => void;
|
|
64
64
|
export const wasmconversionoptions_outputFormat: (a: number, b: number) => void;
|
|
65
65
|
export const wasmconversionoptions_preprocessing: (a: number) => number;
|
|
@@ -102,6 +102,7 @@ export const wasmconversionoptions_set_stripTags: (a: number, b: number, c: numb
|
|
|
102
102
|
export const wasmconversionoptions_set_strongEmSymbol: (a: number, b: number, c: number) => void;
|
|
103
103
|
export const wasmconversionoptions_set_subSymbol: (a: number, b: number, c: number) => void;
|
|
104
104
|
export const wasmconversionoptions_set_supSymbol: (a: number, b: number, c: number) => void;
|
|
105
|
+
export const wasmconversionoptions_set_tierStrategy: (a: number, b: number) => void;
|
|
105
106
|
export const wasmconversionoptions_set_urlEscapeStyle: (a: number, b: number) => void;
|
|
106
107
|
export const wasmconversionoptions_set_visitor: (a: number, b: number) => void;
|
|
107
108
|
export const wasmconversionoptions_set_whitespaceMode: (a: number, b: number) => void;
|
|
@@ -113,6 +114,7 @@ export const wasmconversionoptions_stripTags: (a: number, b: number) => void;
|
|
|
113
114
|
export const wasmconversionoptions_strongEmSymbol: (a: number, b: number) => void;
|
|
114
115
|
export const wasmconversionoptions_subSymbol: (a: number, b: number) => void;
|
|
115
116
|
export const wasmconversionoptions_supSymbol: (a: number, b: number) => void;
|
|
117
|
+
export const wasmconversionoptions_tierStrategy: (a: number, b: number) => void;
|
|
116
118
|
export const wasmconversionoptions_urlEscapeStyle: (a: number, b: number) => void;
|
|
117
119
|
export const wasmconversionoptions_visitor: (a: number) => number;
|
|
118
120
|
export const wasmconversionoptions_whitespaceMode: (a: number, b: number) => void;
|
|
@@ -147,7 +149,7 @@ export const wasmconversionoptionsupdate_listIndentType: (a: number, b: number)
|
|
|
147
149
|
export const wasmconversionoptionsupdate_listIndentWidth: (a: number) => number;
|
|
148
150
|
export const wasmconversionoptionsupdate_maxDepth: (a: number) => number;
|
|
149
151
|
export const wasmconversionoptionsupdate_maxImageSize: (a: number, b: number) => void;
|
|
150
|
-
export const wasmconversionoptionsupdate_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: number, u1: number, v1: bigint, w1: number, x1: number, y1: number, z1: number, a2: number) => number;
|
|
152
|
+
export const wasmconversionoptionsupdate_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: number, u1: number, v1: bigint, w1: number, x1: number, y1: number, z1: number, a2: number, b2: number) => number;
|
|
151
153
|
export const wasmconversionoptionsupdate_newlineStyle: (a: number, b: number) => void;
|
|
152
154
|
export const wasmconversionoptionsupdate_outputFormat: (a: number, b: number) => void;
|
|
153
155
|
export const wasmconversionoptionsupdate_preprocessing: (a: number) => number;
|
|
@@ -190,6 +192,7 @@ export const wasmconversionoptionsupdate_set_stripTags: (a: number, b: number, c
|
|
|
190
192
|
export const wasmconversionoptionsupdate_set_strongEmSymbol: (a: number, b: number, c: number) => void;
|
|
191
193
|
export const wasmconversionoptionsupdate_set_subSymbol: (a: number, b: number, c: number) => void;
|
|
192
194
|
export const wasmconversionoptionsupdate_set_supSymbol: (a: number, b: number, c: number) => void;
|
|
195
|
+
export const wasmconversionoptionsupdate_set_tierStrategy: (a: number, b: number) => void;
|
|
193
196
|
export const wasmconversionoptionsupdate_set_urlEscapeStyle: (a: number, b: number) => void;
|
|
194
197
|
export const wasmconversionoptionsupdate_set_visitor: (a: number, b: number) => void;
|
|
195
198
|
export const wasmconversionoptionsupdate_set_whitespaceMode: (a: number, b: number) => void;
|
|
@@ -201,6 +204,7 @@ export const wasmconversionoptionsupdate_stripTags: (a: number, b: number) => vo
|
|
|
201
204
|
export const wasmconversionoptionsupdate_strongEmSymbol: (a: number, b: number) => void;
|
|
202
205
|
export const wasmconversionoptionsupdate_subSymbol: (a: number, b: number) => void;
|
|
203
206
|
export const wasmconversionoptionsupdate_supSymbol: (a: number, b: number) => void;
|
|
207
|
+
export const wasmconversionoptionsupdate_tierStrategy: (a: number, b: number) => void;
|
|
204
208
|
export const wasmconversionoptionsupdate_urlEscapeStyle: (a: number, b: number) => void;
|
|
205
209
|
export const wasmconversionoptionsupdate_visitor: (a: number) => number;
|
|
206
210
|
export const wasmconversionoptionsupdate_whitespaceMode: (a: number, b: number) => void;
|
package/pkg/bundler/package.json
CHANGED
package/pkg/deno/README.md
CHANGED
|
@@ -126,6 +126,25 @@ const markdown = result.content;
|
|
|
126
126
|
console.log(markdown);
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
+
## Architecture
|
|
130
|
+
|
|
131
|
+
The converter routes each input through one of three tiers based on a fast prescan of the byte stream:
|
|
132
|
+
|
|
133
|
+
1. **Tier-1 — single-pass byte scanner.** Handles 110+ HTML tags directly. Bails on any construct it cannot prove byte-equivalent to Tier-2.
|
|
134
|
+
2. **Tier-2 — DOM walker.** Picks up Tier-1 bails and inputs the classifier rejected up front.
|
|
135
|
+
3. **Tier-3 — standards-conformant parser.** Engaged for malformed HTML requiring full HTML5 repair.
|
|
136
|
+
|
|
137
|
+
The dispatcher is invisible to the caller. Output is byte-identical across tiers — enforced by a 116-snapshot oracle.
|
|
138
|
+
|
|
139
|
+
## Capabilities
|
|
140
|
+
|
|
141
|
+
- **16 languages, one Rust core.** Rust, Python, Node.js, WASM, Java, Go, C#, PHP, Ruby, Elixir, R, Dart, Kotlin (Android), Swift, Zig, C ABI.
|
|
142
|
+
- **CommonMark-compatible Markdown** with GFM-style tables.
|
|
143
|
+
- **Djot output**: set `output_format = "djot"` (see Djot Output Format section below).
|
|
144
|
+
- **Real-HTML robust**: unclosed tags, CDATA, custom elements, malformed entities, nested tables, mixed encodings handled without losing content.
|
|
145
|
+
- **Metadata extraction**, **visitor API**, **inline images**, **configurable preprocessing presets**.
|
|
146
|
+
- **Per-group regression gates in CI**: every PR runs the bench harness against per-group thresholds.
|
|
147
|
+
|
|
129
148
|
## API Reference
|
|
130
149
|
|
|
131
150
|
### Core Function
|
|
@@ -40,7 +40,7 @@ export class WasmConversionOptions {
|
|
|
40
40
|
free(): void;
|
|
41
41
|
[Symbol.dispose](): void;
|
|
42
42
|
static default(): WasmConversionOptions;
|
|
43
|
-
constructor(headingStyle?: WasmHeadingStyle | null, listIndentType?: WasmListIndentType | null, listIndentWidth?: number | null, bullets?: string | null, strongEmSymbol?: string | null, escapeAsterisks?: boolean | null, escapeUnderscores?: boolean | null, escapeMisc?: boolean | null, escapeAscii?: boolean | null, codeLanguage?: string | null, autolinks?: boolean | null, defaultTitle?: boolean | null, brInTables?: boolean | null, compactTables?: boolean | null, highlightStyle?: WasmHighlightStyle | null, extractMetadata?: boolean | null, whitespaceMode?: WasmWhitespaceMode | null, stripNewlines?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, convertAsInline?: boolean | null, subSymbol?: string | null, supSymbol?: string | null, newlineStyle?: WasmNewlineStyle | null, codeBlockStyle?: WasmCodeBlockStyle | null, keepInlineImagesIn?: string[] | null, preprocessing?: WasmPreprocessingOptions | null, encoding?: string | null, debug?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, skipImages?: boolean | null, urlEscapeStyle?: WasmUrlEscapeStyle | null, linkStyle?: WasmLinkStyle | null, outputFormat?: WasmOutputFormat | null, includeDocumentStructure?: boolean | null, extractImages?: boolean | null, maxImageSize?: bigint | null, captureSvg?: boolean | null, inferDimensions?: boolean | null, excludeSelectors?: string[] | null, maxDepth?: number | null);
|
|
43
|
+
constructor(headingStyle?: WasmHeadingStyle | null, listIndentType?: WasmListIndentType | null, listIndentWidth?: number | null, bullets?: string | null, strongEmSymbol?: string | null, escapeAsterisks?: boolean | null, escapeUnderscores?: boolean | null, escapeMisc?: boolean | null, escapeAscii?: boolean | null, codeLanguage?: string | null, autolinks?: boolean | null, defaultTitle?: boolean | null, brInTables?: boolean | null, compactTables?: boolean | null, highlightStyle?: WasmHighlightStyle | null, extractMetadata?: boolean | null, whitespaceMode?: WasmWhitespaceMode | null, stripNewlines?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, convertAsInline?: boolean | null, subSymbol?: string | null, supSymbol?: string | null, newlineStyle?: WasmNewlineStyle | null, codeBlockStyle?: WasmCodeBlockStyle | null, keepInlineImagesIn?: string[] | null, preprocessing?: WasmPreprocessingOptions | null, encoding?: string | null, debug?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, skipImages?: boolean | null, urlEscapeStyle?: WasmUrlEscapeStyle | null, linkStyle?: WasmLinkStyle | null, outputFormat?: WasmOutputFormat | null, includeDocumentStructure?: boolean | null, extractImages?: boolean | null, maxImageSize?: bigint | null, captureSvg?: boolean | null, inferDimensions?: boolean | null, excludeSelectors?: string[] | null, tierStrategy?: WasmTierStrategy | null, maxDepth?: number | null);
|
|
44
44
|
autolinks: boolean;
|
|
45
45
|
brInTables: boolean;
|
|
46
46
|
bullets: string;
|
|
@@ -87,6 +87,8 @@ export class WasmConversionOptions {
|
|
|
87
87
|
strongEmSymbol: string;
|
|
88
88
|
subSymbol: string;
|
|
89
89
|
supSymbol: string;
|
|
90
|
+
get tierStrategy(): string;
|
|
91
|
+
set tierStrategy(value: WasmTierStrategy);
|
|
90
92
|
get urlEscapeStyle(): string;
|
|
91
93
|
set urlEscapeStyle(value: WasmUrlEscapeStyle);
|
|
92
94
|
get visitor(): WasmVisitorHandle | undefined;
|
|
@@ -107,7 +109,7 @@ export class WasmConversionOptionsUpdate {
|
|
|
107
109
|
free(): void;
|
|
108
110
|
[Symbol.dispose](): void;
|
|
109
111
|
static default(): WasmConversionOptionsUpdate;
|
|
110
|
-
constructor(headingStyle?: WasmHeadingStyle | null, listIndentType?: WasmListIndentType | null, listIndentWidth?: number | null, bullets?: string | null, strongEmSymbol?: string | null, escapeAsterisks?: boolean | null, escapeUnderscores?: boolean | null, escapeMisc?: boolean | null, escapeAscii?: boolean | null, codeLanguage?: string | null, autolinks?: boolean | null, defaultTitle?: boolean | null, brInTables?: boolean | null, compactTables?: boolean | null, highlightStyle?: WasmHighlightStyle | null, extractMetadata?: boolean | null, whitespaceMode?: WasmWhitespaceMode | null, stripNewlines?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, convertAsInline?: boolean | null, subSymbol?: string | null, supSymbol?: string | null, newlineStyle?: WasmNewlineStyle | null, codeBlockStyle?: WasmCodeBlockStyle | null, keepInlineImagesIn?: string[] | null, preprocessing?: WasmPreprocessingOptionsUpdate | null, encoding?: string | null, debug?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, skipImages?: boolean | null, urlEscapeStyle?: WasmUrlEscapeStyle | null, linkStyle?: WasmLinkStyle | null, outputFormat?: WasmOutputFormat | null, includeDocumentStructure?: boolean | null, extractImages?: boolean | null, maxImageSize?: bigint | null, captureSvg?: boolean | null, inferDimensions?: boolean | null, maxDepth?: number | null, excludeSelectors?: string[] | null);
|
|
112
|
+
constructor(headingStyle?: WasmHeadingStyle | null, listIndentType?: WasmListIndentType | null, listIndentWidth?: number | null, bullets?: string | null, strongEmSymbol?: string | null, escapeAsterisks?: boolean | null, escapeUnderscores?: boolean | null, escapeMisc?: boolean | null, escapeAscii?: boolean | null, codeLanguage?: string | null, autolinks?: boolean | null, defaultTitle?: boolean | null, brInTables?: boolean | null, compactTables?: boolean | null, highlightStyle?: WasmHighlightStyle | null, extractMetadata?: boolean | null, whitespaceMode?: WasmWhitespaceMode | null, stripNewlines?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, convertAsInline?: boolean | null, subSymbol?: string | null, supSymbol?: string | null, newlineStyle?: WasmNewlineStyle | null, codeBlockStyle?: WasmCodeBlockStyle | null, keepInlineImagesIn?: string[] | null, preprocessing?: WasmPreprocessingOptionsUpdate | null, encoding?: string | null, debug?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, skipImages?: boolean | null, urlEscapeStyle?: WasmUrlEscapeStyle | null, linkStyle?: WasmLinkStyle | null, outputFormat?: WasmOutputFormat | null, includeDocumentStructure?: boolean | null, extractImages?: boolean | null, maxImageSize?: bigint | null, captureSvg?: boolean | null, inferDimensions?: boolean | null, maxDepth?: number | null, excludeSelectors?: string[] | null, tierStrategy?: WasmTierStrategy | null);
|
|
111
113
|
get autolinks(): boolean | undefined;
|
|
112
114
|
set autolinks(value: boolean | null | undefined);
|
|
113
115
|
get brInTables(): boolean | undefined;
|
|
@@ -184,6 +186,8 @@ export class WasmConversionOptionsUpdate {
|
|
|
184
186
|
set subSymbol(value: string | null | undefined);
|
|
185
187
|
get supSymbol(): string | undefined;
|
|
186
188
|
set supSymbol(value: string | null | undefined);
|
|
189
|
+
get tierStrategy(): string | undefined;
|
|
190
|
+
set tierStrategy(value: WasmTierStrategy | null | undefined);
|
|
187
191
|
get urlEscapeStyle(): string | undefined;
|
|
188
192
|
set urlEscapeStyle(value: WasmUrlEscapeStyle | null | undefined);
|
|
189
193
|
get visitor(): WasmVisitorHandle | undefined;
|
|
@@ -830,6 +834,15 @@ export enum WasmTextDirection {
|
|
|
830
834
|
Auto = 2,
|
|
831
835
|
}
|
|
832
836
|
|
|
837
|
+
/**
|
|
838
|
+
* Controls which conversion tier is used.
|
|
839
|
+
*/
|
|
840
|
+
export enum WasmTierStrategy {
|
|
841
|
+
Auto = 0,
|
|
842
|
+
Tier2 = 1,
|
|
843
|
+
Tier1 = 2,
|
|
844
|
+
}
|
|
845
|
+
|
|
833
846
|
/**
|
|
834
847
|
* URL encoding strategy for link and image destinations.
|
|
835
848
|
*
|
|
@@ -514,9 +514,10 @@ export class WasmConversionOptions {
|
|
|
514
514
|
* @param {boolean | null} [captureSvg]
|
|
515
515
|
* @param {boolean | null} [inferDimensions]
|
|
516
516
|
* @param {string[] | null} [excludeSelectors]
|
|
517
|
+
* @param {WasmTierStrategy | null} [tierStrategy]
|
|
517
518
|
* @param {number | null} [maxDepth]
|
|
518
519
|
*/
|
|
519
|
-
constructor(headingStyle, listIndentType, listIndentWidth, bullets, strongEmSymbol, escapeAsterisks, escapeUnderscores, escapeMisc, escapeAscii, codeLanguage, autolinks, defaultTitle, brInTables, compactTables, highlightStyle, extractMetadata, whitespaceMode, stripNewlines, wrap, wrapWidth, convertAsInline, subSymbol, supSymbol, newlineStyle, codeBlockStyle, keepInlineImagesIn, preprocessing, encoding, debug, stripTags, preserveTags, skipImages, urlEscapeStyle, linkStyle, outputFormat, includeDocumentStructure, extractImages, maxImageSize, captureSvg, inferDimensions, excludeSelectors, maxDepth) {
|
|
520
|
+
constructor(headingStyle, listIndentType, listIndentWidth, bullets, strongEmSymbol, escapeAsterisks, escapeUnderscores, escapeMisc, escapeAscii, codeLanguage, autolinks, defaultTitle, brInTables, compactTables, highlightStyle, extractMetadata, whitespaceMode, stripNewlines, wrap, wrapWidth, convertAsInline, subSymbol, supSymbol, newlineStyle, codeBlockStyle, keepInlineImagesIn, preprocessing, encoding, debug, stripTags, preserveTags, skipImages, urlEscapeStyle, linkStyle, outputFormat, includeDocumentStructure, extractImages, maxImageSize, captureSvg, inferDimensions, excludeSelectors, tierStrategy, maxDepth) {
|
|
520
521
|
var ptr0 = isLikeNone(bullets) ? 0 : passStringToWasm0(bullets, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
521
522
|
var len0 = WASM_VECTOR_LEN;
|
|
522
523
|
var ptr1 = isLikeNone(strongEmSymbol) ? 0 : passStringToWasm0(strongEmSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -542,7 +543,7 @@ export class WasmConversionOptions {
|
|
|
542
543
|
var len9 = WASM_VECTOR_LEN;
|
|
543
544
|
var ptr10 = isLikeNone(excludeSelectors) ? 0 : passArrayJsValueToWasm0(excludeSelectors, wasm.__wbindgen_export);
|
|
544
545
|
var len10 = WASM_VECTOR_LEN;
|
|
545
|
-
const ret = wasm.wasmconversionoptions_new(isLikeNone(headingStyle) ? 3 : headingStyle, isLikeNone(listIndentType) ? 2 : listIndentType, isLikeNone(listIndentWidth) ? Number.MAX_SAFE_INTEGER : (listIndentWidth) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escapeAsterisks) ? 0xFFFFFF : escapeAsterisks ? 1 : 0, isLikeNone(escapeUnderscores) ? 0xFFFFFF : escapeUnderscores ? 1 : 0, isLikeNone(escapeMisc) ? 0xFFFFFF : escapeMisc ? 1 : 0, isLikeNone(escapeAscii) ? 0xFFFFFF : escapeAscii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(defaultTitle) ? 0xFFFFFF : defaultTitle ? 1 : 0, isLikeNone(brInTables) ? 0xFFFFFF : brInTables ? 1 : 0, isLikeNone(compactTables) ? 0xFFFFFF : compactTables ? 1 : 0, isLikeNone(highlightStyle) ? 4 : highlightStyle, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(whitespaceMode) ? 2 : whitespaceMode, isLikeNone(stripNewlines) ? 0xFFFFFF : stripNewlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(convertAsInline) ? 0xFFFFFF : convertAsInline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newlineStyle) ? 2 : newlineStyle, isLikeNone(codeBlockStyle) ? 3 : codeBlockStyle, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(urlEscapeStyle) ? 2 : urlEscapeStyle, isLikeNone(linkStyle) ? 2 : linkStyle, isLikeNone(outputFormat) ? 3 : outputFormat, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractImages) ? 0xFFFFFF : extractImages ? 1 : 0, !isLikeNone(maxImageSize), isLikeNone(maxImageSize) ? BigInt(0) : maxImageSize, isLikeNone(captureSvg) ? 0xFFFFFF : captureSvg ? 1 : 0, isLikeNone(inferDimensions) ? 0xFFFFFF : inferDimensions ? 1 : 0, ptr10, len10, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0);
|
|
546
|
+
const ret = wasm.wasmconversionoptions_new(isLikeNone(headingStyle) ? 3 : headingStyle, isLikeNone(listIndentType) ? 2 : listIndentType, isLikeNone(listIndentWidth) ? Number.MAX_SAFE_INTEGER : (listIndentWidth) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escapeAsterisks) ? 0xFFFFFF : escapeAsterisks ? 1 : 0, isLikeNone(escapeUnderscores) ? 0xFFFFFF : escapeUnderscores ? 1 : 0, isLikeNone(escapeMisc) ? 0xFFFFFF : escapeMisc ? 1 : 0, isLikeNone(escapeAscii) ? 0xFFFFFF : escapeAscii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(defaultTitle) ? 0xFFFFFF : defaultTitle ? 1 : 0, isLikeNone(brInTables) ? 0xFFFFFF : brInTables ? 1 : 0, isLikeNone(compactTables) ? 0xFFFFFF : compactTables ? 1 : 0, isLikeNone(highlightStyle) ? 4 : highlightStyle, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(whitespaceMode) ? 2 : whitespaceMode, isLikeNone(stripNewlines) ? 0xFFFFFF : stripNewlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(convertAsInline) ? 0xFFFFFF : convertAsInline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newlineStyle) ? 2 : newlineStyle, isLikeNone(codeBlockStyle) ? 3 : codeBlockStyle, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(urlEscapeStyle) ? 2 : urlEscapeStyle, isLikeNone(linkStyle) ? 2 : linkStyle, isLikeNone(outputFormat) ? 3 : outputFormat, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractImages) ? 0xFFFFFF : extractImages ? 1 : 0, !isLikeNone(maxImageSize), isLikeNone(maxImageSize) ? BigInt(0) : maxImageSize, isLikeNone(captureSvg) ? 0xFFFFFF : captureSvg ? 1 : 0, isLikeNone(inferDimensions) ? 0xFFFFFF : inferDimensions ? 1 : 0, ptr10, len10, isLikeNone(tierStrategy) ? 3 : tierStrategy, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0);
|
|
546
547
|
this.__wbg_ptr = ret;
|
|
547
548
|
WasmConversionOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
548
549
|
return this;
|
|
@@ -858,6 +859,12 @@ export class WasmConversionOptions {
|
|
|
858
859
|
const len0 = WASM_VECTOR_LEN;
|
|
859
860
|
wasm.wasmconversionoptions_set_supSymbol(this.__wbg_ptr, ptr0, len0);
|
|
860
861
|
}
|
|
862
|
+
/**
|
|
863
|
+
* @param {WasmTierStrategy} value
|
|
864
|
+
*/
|
|
865
|
+
set tierStrategy(value) {
|
|
866
|
+
wasm.wasmconversionoptions_set_tierStrategy(this.__wbg_ptr, value);
|
|
867
|
+
}
|
|
861
868
|
/**
|
|
862
869
|
* @param {WasmUrlEscapeStyle} value
|
|
863
870
|
*/
|
|
@@ -980,6 +987,25 @@ export class WasmConversionOptions {
|
|
|
980
987
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
981
988
|
}
|
|
982
989
|
}
|
|
990
|
+
/**
|
|
991
|
+
* @returns {string}
|
|
992
|
+
*/
|
|
993
|
+
get tierStrategy() {
|
|
994
|
+
let deferred1_0;
|
|
995
|
+
let deferred1_1;
|
|
996
|
+
try {
|
|
997
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
998
|
+
wasm.wasmconversionoptions_tierStrategy(retptr, this.__wbg_ptr);
|
|
999
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1000
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1001
|
+
deferred1_0 = r0;
|
|
1002
|
+
deferred1_1 = r1;
|
|
1003
|
+
return getStringFromWasm0(r0, r1);
|
|
1004
|
+
} finally {
|
|
1005
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1006
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
983
1009
|
/**
|
|
984
1010
|
* @returns {string}
|
|
985
1011
|
*/
|
|
@@ -1438,8 +1464,9 @@ export class WasmConversionOptionsUpdate {
|
|
|
1438
1464
|
* @param {boolean | null} [inferDimensions]
|
|
1439
1465
|
* @param {number | null} [maxDepth]
|
|
1440
1466
|
* @param {string[] | null} [excludeSelectors]
|
|
1467
|
+
* @param {WasmTierStrategy | null} [tierStrategy]
|
|
1441
1468
|
*/
|
|
1442
|
-
constructor(headingStyle, listIndentType, listIndentWidth, bullets, strongEmSymbol, escapeAsterisks, escapeUnderscores, escapeMisc, escapeAscii, codeLanguage, autolinks, defaultTitle, brInTables, compactTables, highlightStyle, extractMetadata, whitespaceMode, stripNewlines, wrap, wrapWidth, convertAsInline, subSymbol, supSymbol, newlineStyle, codeBlockStyle, keepInlineImagesIn, preprocessing, encoding, debug, stripTags, preserveTags, skipImages, urlEscapeStyle, linkStyle, outputFormat, includeDocumentStructure, extractImages, maxImageSize, captureSvg, inferDimensions, maxDepth, excludeSelectors) {
|
|
1469
|
+
constructor(headingStyle, listIndentType, listIndentWidth, bullets, strongEmSymbol, escapeAsterisks, escapeUnderscores, escapeMisc, escapeAscii, codeLanguage, autolinks, defaultTitle, brInTables, compactTables, highlightStyle, extractMetadata, whitespaceMode, stripNewlines, wrap, wrapWidth, convertAsInline, subSymbol, supSymbol, newlineStyle, codeBlockStyle, keepInlineImagesIn, preprocessing, encoding, debug, stripTags, preserveTags, skipImages, urlEscapeStyle, linkStyle, outputFormat, includeDocumentStructure, extractImages, maxImageSize, captureSvg, inferDimensions, maxDepth, excludeSelectors, tierStrategy) {
|
|
1443
1470
|
var ptr0 = isLikeNone(bullets) ? 0 : passStringToWasm0(bullets, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1444
1471
|
var len0 = WASM_VECTOR_LEN;
|
|
1445
1472
|
var ptr1 = isLikeNone(strongEmSymbol) ? 0 : passStringToWasm0(strongEmSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -1465,7 +1492,7 @@ export class WasmConversionOptionsUpdate {
|
|
|
1465
1492
|
var len9 = WASM_VECTOR_LEN;
|
|
1466
1493
|
var ptr10 = isLikeNone(excludeSelectors) ? 0 : passArrayJsValueToWasm0(excludeSelectors, wasm.__wbindgen_export);
|
|
1467
1494
|
var len10 = WASM_VECTOR_LEN;
|
|
1468
|
-
const ret = wasm.wasmconversionoptionsupdate_new(isLikeNone(headingStyle) ? 3 : headingStyle, isLikeNone(listIndentType) ? 2 : listIndentType, isLikeNone(listIndentWidth) ? Number.MAX_SAFE_INTEGER : (listIndentWidth) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escapeAsterisks) ? 0xFFFFFF : escapeAsterisks ? 1 : 0, isLikeNone(escapeUnderscores) ? 0xFFFFFF : escapeUnderscores ? 1 : 0, isLikeNone(escapeMisc) ? 0xFFFFFF : escapeMisc ? 1 : 0, isLikeNone(escapeAscii) ? 0xFFFFFF : escapeAscii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(defaultTitle) ? 0xFFFFFF : defaultTitle ? 1 : 0, isLikeNone(brInTables) ? 0xFFFFFF : brInTables ? 1 : 0, isLikeNone(compactTables) ? 0xFFFFFF : compactTables ? 1 : 0, isLikeNone(highlightStyle) ? 4 : highlightStyle, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(whitespaceMode) ? 2 : whitespaceMode, isLikeNone(stripNewlines) ? 0xFFFFFF : stripNewlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(convertAsInline) ? 0xFFFFFF : convertAsInline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newlineStyle) ? 2 : newlineStyle, isLikeNone(codeBlockStyle) ? 3 : codeBlockStyle, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(urlEscapeStyle) ? 2 : urlEscapeStyle, isLikeNone(linkStyle) ? 2 : linkStyle, isLikeNone(outputFormat) ? 3 : outputFormat, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractImages) ? 0xFFFFFF : extractImages ? 1 : 0, !isLikeNone(maxImageSize), isLikeNone(maxImageSize) ? BigInt(0) : maxImageSize, isLikeNone(captureSvg) ? 0xFFFFFF : captureSvg ? 1 : 0, isLikeNone(inferDimensions) ? 0xFFFFFF : inferDimensions ? 1 : 0, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0, ptr10, len10);
|
|
1495
|
+
const ret = wasm.wasmconversionoptionsupdate_new(isLikeNone(headingStyle) ? 3 : headingStyle, isLikeNone(listIndentType) ? 2 : listIndentType, isLikeNone(listIndentWidth) ? Number.MAX_SAFE_INTEGER : (listIndentWidth) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escapeAsterisks) ? 0xFFFFFF : escapeAsterisks ? 1 : 0, isLikeNone(escapeUnderscores) ? 0xFFFFFF : escapeUnderscores ? 1 : 0, isLikeNone(escapeMisc) ? 0xFFFFFF : escapeMisc ? 1 : 0, isLikeNone(escapeAscii) ? 0xFFFFFF : escapeAscii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(defaultTitle) ? 0xFFFFFF : defaultTitle ? 1 : 0, isLikeNone(brInTables) ? 0xFFFFFF : brInTables ? 1 : 0, isLikeNone(compactTables) ? 0xFFFFFF : compactTables ? 1 : 0, isLikeNone(highlightStyle) ? 4 : highlightStyle, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(whitespaceMode) ? 2 : whitespaceMode, isLikeNone(stripNewlines) ? 0xFFFFFF : stripNewlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(convertAsInline) ? 0xFFFFFF : convertAsInline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newlineStyle) ? 2 : newlineStyle, isLikeNone(codeBlockStyle) ? 3 : codeBlockStyle, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(urlEscapeStyle) ? 2 : urlEscapeStyle, isLikeNone(linkStyle) ? 2 : linkStyle, isLikeNone(outputFormat) ? 3 : outputFormat, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractImages) ? 0xFFFFFF : extractImages ? 1 : 0, !isLikeNone(maxImageSize), isLikeNone(maxImageSize) ? BigInt(0) : maxImageSize, isLikeNone(captureSvg) ? 0xFFFFFF : captureSvg ? 1 : 0, isLikeNone(inferDimensions) ? 0xFFFFFF : inferDimensions ? 1 : 0, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0, ptr10, len10, isLikeNone(tierStrategy) ? 3 : tierStrategy);
|
|
1469
1496
|
this.__wbg_ptr = ret;
|
|
1470
1497
|
WasmConversionOptionsUpdateFinalization.register(this, this.__wbg_ptr, this);
|
|
1471
1498
|
return this;
|
|
@@ -1787,6 +1814,12 @@ export class WasmConversionOptionsUpdate {
|
|
|
1787
1814
|
var len0 = WASM_VECTOR_LEN;
|
|
1788
1815
|
wasm.wasmconversionoptionsupdate_set_supSymbol(this.__wbg_ptr, ptr0, len0);
|
|
1789
1816
|
}
|
|
1817
|
+
/**
|
|
1818
|
+
* @param {WasmTierStrategy | null} [value]
|
|
1819
|
+
*/
|
|
1820
|
+
set tierStrategy(value) {
|
|
1821
|
+
wasm.wasmconversionoptionsupdate_set_tierStrategy(this.__wbg_ptr, isLikeNone(value) ? 3 : value);
|
|
1822
|
+
}
|
|
1790
1823
|
/**
|
|
1791
1824
|
* @param {WasmUrlEscapeStyle | null} [value]
|
|
1792
1825
|
*/
|
|
@@ -1912,6 +1945,25 @@ export class WasmConversionOptionsUpdate {
|
|
|
1912
1945
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1913
1946
|
}
|
|
1914
1947
|
}
|
|
1948
|
+
/**
|
|
1949
|
+
* @returns {string | undefined}
|
|
1950
|
+
*/
|
|
1951
|
+
get tierStrategy() {
|
|
1952
|
+
try {
|
|
1953
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1954
|
+
wasm.wasmconversionoptionsupdate_tierStrategy(retptr, this.__wbg_ptr);
|
|
1955
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1956
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1957
|
+
let v1;
|
|
1958
|
+
if (r0 !== 0) {
|
|
1959
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1960
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1961
|
+
}
|
|
1962
|
+
return v1;
|
|
1963
|
+
} finally {
|
|
1964
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1915
1967
|
/**
|
|
1916
1968
|
* @returns {string | undefined}
|
|
1917
1969
|
*/
|
|
@@ -5235,6 +5287,16 @@ export const WasmTextDirection = Object.freeze({
|
|
|
5235
5287
|
Auto: 2, "2": "Auto",
|
|
5236
5288
|
});
|
|
5237
5289
|
|
|
5290
|
+
/**
|
|
5291
|
+
* Controls which conversion tier is used.
|
|
5292
|
+
* @enum {0 | 1 | 2}
|
|
5293
|
+
*/
|
|
5294
|
+
export const WasmTierStrategy = Object.freeze({
|
|
5295
|
+
Auto: 0, "0": "Auto",
|
|
5296
|
+
Tier2: 1, "1": "Tier2",
|
|
5297
|
+
Tier1: 2, "2": "Tier1",
|
|
5298
|
+
});
|
|
5299
|
+
|
|
5238
5300
|
/**
|
|
5239
5301
|
* URL encoding strategy for link and image destinations.
|
|
5240
5302
|
*
|
|
Binary file
|