markdown-codec 4.0.14 → 4.1.0
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 +13 -12
- package/dist/block/block.d.cts +3 -3
- package/dist/block/block.d.ts +3 -3
- package/dist/block/definitions.d.cts +2 -2
- package/dist/block/definitions.d.ts +2 -2
- package/dist/codec.d.cts +20 -0
- package/dist/codec.d.ts +20 -0
- package/dist/diagnostics/diagnostics.cjs +12 -4
- package/dist/diagnostics/diagnostics.d.cts +2 -2
- package/dist/diagnostics/diagnostics.d.ts +2 -2
- package/dist/diagnostics/diagnostics.js +12 -5
- package/dist/{diagnostics-BWK1iGy7.d.cts → diagnostics-CUMLtGHJ.d.cts} +7 -5
- package/dist/{diagnostics-BWK1iGy7.d.ts → diagnostics-CUMLtGHJ.d.ts} +7 -5
- package/dist/emit/emit.cjs +93 -27
- package/dist/emit/emit.js +96 -30
- package/dist/emit/inline.cjs +22 -14
- package/dist/emit/inline.d.cts +7 -5
- package/dist/emit/inline.d.ts +7 -5
- package/dist/emit/inline.js +21 -15
- package/dist/emit/table.cjs +1 -1
- package/dist/emit/table.d.cts +1 -1
- package/dist/emit/table.d.ts +1 -1
- package/dist/emit/table.js +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/inline/inline.d.cts +1 -1
- package/dist/inline/inline.d.ts +1 -1
- package/dist/inline/link.d.cts +17 -1
- package/dist/inline/link.d.ts +17 -1
- package/dist/{inline-CXVQWQnW.d.cts → inline-CoS1JzxI.d.cts} +1 -1
- package/dist/{inline-B_V7bs5j.d.ts → inline-OGXVE6hB.d.ts} +1 -1
- package/dist/lower/front-matter.cjs +7 -4
- package/dist/lower/front-matter.d.cts +2 -1
- package/dist/lower/front-matter.d.ts +2 -1
- package/dist/lower/front-matter.js +7 -4
- package/dist/lower/inline.cjs +73 -29
- package/dist/lower/inline.d.cts +7 -10
- package/dist/lower/inline.d.ts +7 -10
- package/dist/lower/inline.js +74 -29
- package/dist/lower/lower.cjs +140 -71
- package/dist/lower/lower.d.cts +8 -1
- package/dist/lower/lower.d.ts +8 -1
- package/dist/lower/lower.js +142 -74
- package/dist/lower/table.cjs +3 -2
- package/dist/lower/table.js +3 -2
- package/dist/options/options.d.cts +1 -1
- package/dist/options/options.d.ts +1 -1
- package/dist/read.cjs +45 -9
- package/dist/read.d.cts +1 -1
- package/dist/read.d.ts +1 -1
- package/dist/read.js +46 -10
- package/dist/shared/list-id.cjs +6 -0
- package/dist/shared/list-id.d.cts +2 -1
- package/dist/shared/list-id.d.ts +2 -1
- package/dist/shared/list-id.js +6 -1
- package/dist/write.cjs +31 -4
- package/dist/write.js +31 -4
- package/package.json +2 -2
- package/dist/link-Dv4kxVjk.d.cts +0 -18
- package/dist/link-Dv4kxVjk.d.ts +0 -18
package/README.md
CHANGED
|
@@ -93,7 +93,7 @@ const markdown = writeMarkdown(documentPackage, {
|
|
|
93
93
|
|
|
94
94
|
`documentPackage` is a `DocumentPackage` — document-schema.js's tree form, with a minted styles table (see [Two encodings](#two-encodings-documentpackage-and-contentdocument)). The field is named `documentPackage` rather than `package` because `package` is a reserved word in strict mode, so `const { package } = readMarkdown(src)` would not parse.
|
|
95
95
|
|
|
96
|
-
Both accept an optional `signal` (`AbortSignal`) and `sink` (`MarkdownDiagnosticSink`, called once per recoverable issue or construct-mapping gap — see [Gotchas](#gotchas-and-quirks)). `writeMarkdown` throws `MarkdownUnsupportedDocumentKindError` for a package whose `kind` is not `'wordprocessing'`, checked before flattening so every non-`'wordprocessing'` package reaches it the same way regardless of what else about that package would have failed document-schema.js's own `flattenPackage`. A `'wordprocessing'` package can still fail to flatten — a group carrying a style reference the package's own `styles` table has no entry for — and that failure surfaces as `MarkdownPackageFlattenError`, not a bare `Error` from the dependency. A `DocumentPackage`'s own `
|
|
96
|
+
Both accept an optional `signal` (`AbortSignal`) and `sink` (`MarkdownDiagnosticSink`, called once per recoverable issue or construct-mapping gap — see [Gotchas](#gotchas-and-quirks)). `writeMarkdown` throws `MarkdownUnsupportedDocumentKindError` for a package whose `kind` is not `'wordprocessing'`, checked before flattening so every non-`'wordprocessing'` package reaches it the same way regardless of what else about that package would have failed document-schema.js's own `flattenPackage`. A `'wordprocessing'` package can still fail to flatten — a group carrying a style reference the package's own `styles` table has no entry for — and that failure surfaces as `MarkdownPackageFlattenError`, not a bare `Error` from the dependency. A `DocumentPackage`'s own `layers`/`attachments`/`destinations`/`pages` tables have no flat-`ContentDocument` home to land in; `writeMarkdown` reports one `PACKAGE_TABLE_DROPPED` diagnostic per non-empty table it finds rather than dropping them without a trace. The `definitions` table is the one exemption: this package's own link-tenant entries (what `readMarkdown` splices there from the source's reference definitions) render back out as `[label]: destination "title"` lines, so only a table holding foreign tenants reports.
|
|
97
97
|
|
|
98
98
|
The same round trip as a schema-validated [`z.codec()`](https://zod.dev) pair, mirroring `pdf-codec`'s `pdfCodec`:
|
|
99
99
|
|
|
@@ -118,7 +118,7 @@ This package exposes a read/write pair and a codec at each level. The unsuffixed
|
|
|
118
118
|
| Tree (default) | `readMarkdown` | `writeMarkdown` | `markdownCodec` | `DocumentPackage` |
|
|
119
119
|
| Flat | `readMarkdownContent` | `writeMarkdownContent` | `markdownContentCodec` | `ContentDocument` |
|
|
120
120
|
|
|
121
|
-
The tree pair is
|
|
121
|
+
The tree pair is the flat pair with the transform composed on — `readMarkdown` is `assemblePackage` over `readMarkdownContent`, `writeMarkdown` is `flattenPackage` before `writeMarkdownContent` — plus the two tree-only carries the flat form has no root for: the source's reference definitions splice into `documentPackage.definitions` (link tenant, keyed by normalised label) and the verbatim front-matter block into `documentPackage.source.frontmatter`, both rendered back out by `writeMarkdown` (`[label]: dest "title"` lines after the body; the original front matter verbatim in place of the regenerated block). Sources carrying neither render identically to the flat pair, pinned in `src/package.test.ts`; a source carrying either renders its extra block, which is the point of reaching for the tree. Options, diagnostics, and error behaviour are identical at both levels.
|
|
122
122
|
|
|
123
123
|
Reach for the flat pair when composing a package boundary by hand (`decompose`/`flattenPackage` directly, or `factorStyles` with your own minting policy), when feeding a `ContentDocument`-consuming builder such as `documents.js`'s conversion pipeline, or when a layout stage needs to stamp frames onto content before it is decomposed. Everything else wants the tree.
|
|
124
124
|
|
|
@@ -185,18 +185,19 @@ Every construct `src/lower`/`src/emit` cannot represent losslessly is a document
|
|
|
185
185
|
|
|
186
186
|
- **`md/invented-page-geometry`** — no page concept in markdown; one `ContentSection` with A4 + 1in defaults (overridable). Fires once.
|
|
187
187
|
- **`md/nested-emphasis-flattened`** — same-kind nested emphasis flattens to one run.
|
|
188
|
-
- **`md/link-title-dropped`** — link
|
|
189
|
-
- **`md/
|
|
190
|
-
- **`md/
|
|
191
|
-
- **`md/list-
|
|
192
|
-
- **`md/
|
|
188
|
+
- **`md/link-title-dropped`** — the one titled shape still dropping: a nested image (inside a link or emphasis) or an unresolved image. Every other title rides a `link` construct's `title` field — a run-level extent for an inline or reference link, a block-scoped marker pair around a resolved image (which also restores the image's original destination on the way out).
|
|
189
|
+
- **`md/blockquote-container-skipped`** — a blockquote containing a heading anywhere in its subtree cannot carry its division construct (a marker extent may not open a heading scope), so that quote degrades to indent-only structure while the heading keeps its fidelity. Every other quote carries a `division` construct pair — exact container boundary and exact nesting depth, with the indent and `Quote` styleId kept as the materialised formatting.
|
|
190
|
+
- **`md/list-item-block-unlisted`** — a table, resolved image, or display-math block in a list item cannot carry `ContentListMembership` (paragraphs only).
|
|
191
|
+
- **`md/list-marker-type-conflict`** — a nested list whose marker type disagrees with its enclosing list's minted numId keeps the enclosing type (first-wins).
|
|
192
|
+
- **`md/math-inline-preserved-as-text`** — inline `\( \)` math stays a Cambria-Math-marked raw-LaTeX run; display `$$` math is a real embedded formula carrying the presentation layer.
|
|
193
193
|
- **`md/image-unresolved`** — no resolver, `undefined` return, or non-PNG/JPEG bytes degrades to alt-text run.
|
|
194
|
-
- **`md/raw-html-preserved-as-text` / `md/raw-html-dropped`** — raw HTML kept as literal text (default) or dropped; never interpreted.
|
|
195
|
-
- **`md/front-matter-key-unmapped`** — no YAML/TOML engine; only five known `LayoutMetadata` keys recognised.
|
|
194
|
+
- **`md/raw-html-preserved-as-text` / `md/raw-html-dropped`** — raw HTML kept as literal text (default) or dropped; never interpreted. The preserved text's verbatim original quarantines as markdown residue on its node, and this package's own writer re-emits that residue as-is.
|
|
195
|
+
- **`md/front-matter-key-unmapped`** — no YAML/TOML engine; only five known `LayoutMetadata` keys recognised. The verbatim original block rides the package-level residue table (`readMarkdown`'s `documentPackage.source.frontmatter`), which `writeMarkdown` re-emits as-is.
|
|
196
196
|
- **`md/heading-level-clamped`** — styleId beyond `Heading6` (from another format) clamps to level 6 via document-schema.js's shared `clampHeadingLevel()`.
|
|
197
197
|
- **`md/adjacent-links-merged`** / **`md/code-span-as-monospace-run`** — same-destination adjacent links merge; monospace runs emit as code spans.
|
|
198
198
|
- **`md/paragraph-indent-dropped`** — `indentLeftPt` without a recognised styleId; indent dropped, paragraph renders.
|
|
199
199
|
- **`md/list-numid-fallback`** — a foreign or absent `numId` (depth-only `ContentListMembership`) falls back to a plain bullet list.
|
|
200
|
+
- **`md/raw-html-preserved-as-text`** — see the raw-HTML entry above.
|
|
200
201
|
- **`md/table-cell-formatting-dropped`** / **`md/table-cell-multi-paragraph-joined`** — GFM cells have no rich-formatting or multi-paragraph representation.
|
|
201
202
|
- **`md/duplicate-footnote-definition`** — two definitions share a label; every reference resolves to the first, both are kept as written.
|
|
202
203
|
- **`md/footnote-reference-preserved-as-text`** — a reference site is a marked run, not an `anchor` construct; see [Footnotes](#footnotes).
|
|
@@ -225,11 +226,11 @@ Emission is the inverse and validates first: a section's markers must pair as ba
|
|
|
225
226
|
|
|
226
227
|
| Corpus | Examples | Passing round trip | Rate |
|
|
227
228
|
| --- | --- | --- | --- |
|
|
228
|
-
| CommonMark 0.31.2 (`assets/commonmark/spec.json`) | 652 |
|
|
229
|
+
| CommonMark 0.31.2 (`assets/commonmark/spec.json`) | 652 | 511 | 78.4% |
|
|
229
230
|
| GFM tagged extensions (table/strikethrough/autolink/task-list, `assets/gfm/spec.txt`) | 23 | 22 | 95.7% |
|
|
230
|
-
| Combined | 675 |
|
|
231
|
+
| Combined | 675 | 533 | 79.0% |
|
|
231
232
|
|
|
232
|
-
Every non-passing example is named individually in `src/test-support/conformance-exclusions.ts`, attributed to a closed set of causes (shrink-only — see [Conventions](#conventions)): most commonly a soft line break collapsing to a space, a
|
|
233
|
+
Every non-passing example is named individually in `src/test-support/conformance-exclusions.ts`, attributed to a closed set of causes (shrink-only — see [Conventions](#conventions)): most commonly a soft line break collapsing to a space, a nested/unresolved image title, an emphasis-span collision, or a blockquote whose heading content skips its container pair.
|
|
233
234
|
|
|
234
235
|
**Optional real-world corpus.** `test/corpus/` (gitignored) holds a `pnpm test:corpus` project for a manual sanity check against sibling READMEs on disk — asserts no throw and real content on reparse, not byte fidelity. Not part of `pnpm test`; run locally before significant parser/lower/emit changes.
|
|
235
236
|
|
package/dist/block/block.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as MarkdownDocumentNode } from "../ast-8XCbjRQT.cjs";
|
|
2
2
|
import { r as FootnoteLabelSet } from "../footnote-CKk4JbLk.cjs";
|
|
3
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
4
|
-
import {
|
|
5
|
-
import { t as InlineParseOptions } from "../inline-
|
|
3
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-CUMLtGHJ.cjs";
|
|
4
|
+
import { LinkReferenceMap } from "../inline/link.cjs";
|
|
5
|
+
import { t as InlineParseOptions } from "../inline-CoS1JzxI.cjs";
|
|
6
6
|
//#region src/block/block.d.ts
|
|
7
7
|
interface MarkdownParseOptions extends InlineParseOptions {
|
|
8
8
|
readonly gfmTables?: boolean;
|
package/dist/block/block.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as MarkdownDocumentNode } from "../ast-8XCbjRQT.js";
|
|
2
2
|
import { r as FootnoteLabelSet } from "../footnote-CKk4JbLk.js";
|
|
3
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
4
|
-
import {
|
|
5
|
-
import { t as InlineParseOptions } from "../inline-
|
|
3
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-CUMLtGHJ.js";
|
|
4
|
+
import { LinkReferenceMap } from "../inline/link.js";
|
|
5
|
+
import { t as InlineParseOptions } from "../inline-OGXVE6hB.js";
|
|
6
6
|
//#region src/block/block.d.ts
|
|
7
7
|
interface MarkdownParseOptions extends InlineParseOptions {
|
|
8
8
|
readonly gfmTables?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
2
|
-
import {
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-CUMLtGHJ.cjs";
|
|
2
|
+
import { LinkReferenceDefinition } from "../inline/link.cjs";
|
|
3
3
|
//#region src/block/definitions.d.ts
|
|
4
4
|
declare function extractDefinitions(content: string, references: Map<string, LinkReferenceDefinition>, sink?: MarkdownDiagnosticSink, startLine?: number): string;
|
|
5
5
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
2
|
-
import {
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-CUMLtGHJ.js";
|
|
2
|
+
import { LinkReferenceDefinition } from "../inline/link.js";
|
|
3
3
|
//#region src/block/definitions.d.ts
|
|
4
4
|
declare function extractDefinitions(content: string, references: Map<string, LinkReferenceDefinition>, sink?: MarkdownDiagnosticSink, startLine?: number): string;
|
|
5
5
|
//#endregion
|
package/dist/codec.d.cts
CHANGED
|
@@ -18,6 +18,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
18
18
|
list: z.ZodOptional<z.ZodObject<{
|
|
19
19
|
numId: z.ZodOptional<z.ZodString>;
|
|
20
20
|
level: z.ZodNumber;
|
|
21
|
+
checked: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
21
23
|
}, z.core.$strip>>;
|
|
22
24
|
spacingBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
23
25
|
spacingAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -120,6 +122,7 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
120
122
|
producer: z.ZodOptional<z.ZodString>;
|
|
121
123
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
122
124
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
125
|
+
language: z.ZodOptional<z.ZodString>;
|
|
123
126
|
}, z.core.$strip>;
|
|
124
127
|
kind: z.ZodLiteral<"wordprocessing">;
|
|
125
128
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -139,6 +142,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
139
142
|
list: z.ZodOptional<z.ZodObject<{
|
|
140
143
|
numId: z.ZodOptional<z.ZodString>;
|
|
141
144
|
level: z.ZodNumber;
|
|
145
|
+
checked: z.ZodOptional<z.ZodBoolean>;
|
|
146
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
142
147
|
}, z.core.$strip>>;
|
|
143
148
|
spacingBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
144
149
|
spacingAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -241,6 +246,7 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
241
246
|
producer: z.ZodOptional<z.ZodString>;
|
|
242
247
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
243
248
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
249
|
+
language: z.ZodOptional<z.ZodString>;
|
|
244
250
|
}, z.core.$strip>;
|
|
245
251
|
kind: z.ZodLiteral<"presentation">;
|
|
246
252
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -260,6 +266,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
260
266
|
list: z.ZodOptional<z.ZodObject<{
|
|
261
267
|
numId: z.ZodOptional<z.ZodString>;
|
|
262
268
|
level: z.ZodNumber;
|
|
269
|
+
checked: z.ZodOptional<z.ZodBoolean>;
|
|
270
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
263
271
|
}, z.core.$strip>>;
|
|
264
272
|
spacingBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
265
273
|
spacingAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -362,6 +370,7 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
362
370
|
producer: z.ZodOptional<z.ZodString>;
|
|
363
371
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
364
372
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
373
|
+
language: z.ZodOptional<z.ZodString>;
|
|
365
374
|
}, z.core.$strip>;
|
|
366
375
|
kind: z.ZodLiteral<"spreadsheet">;
|
|
367
376
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -381,6 +390,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
381
390
|
list: z.ZodOptional<z.ZodObject<{
|
|
382
391
|
numId: z.ZodOptional<z.ZodString>;
|
|
383
392
|
level: z.ZodNumber;
|
|
393
|
+
checked: z.ZodOptional<z.ZodBoolean>;
|
|
394
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
384
395
|
}, z.core.$strip>>;
|
|
385
396
|
spacingBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
386
397
|
spacingAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -483,6 +494,7 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
483
494
|
producer: z.ZodOptional<z.ZodString>;
|
|
484
495
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
485
496
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
497
|
+
language: z.ZodOptional<z.ZodString>;
|
|
486
498
|
}, z.core.$strip>;
|
|
487
499
|
kind: z.ZodLiteral<"drawing">;
|
|
488
500
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -531,6 +543,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
531
543
|
list: z.ZodOptional<z.ZodObject<{
|
|
532
544
|
numId: z.ZodOptional<z.ZodString>;
|
|
533
545
|
level: z.ZodNumber;
|
|
546
|
+
checked: z.ZodOptional<z.ZodBoolean>;
|
|
547
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
534
548
|
}, z.core.$strip>>;
|
|
535
549
|
spacingBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
536
550
|
spacingAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -633,6 +647,7 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
633
647
|
producer: z.ZodOptional<z.ZodString>;
|
|
634
648
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
635
649
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
650
|
+
language: z.ZodOptional<z.ZodString>;
|
|
636
651
|
}, z.core.$strip>;
|
|
637
652
|
kind: z.ZodLiteral<"formula">;
|
|
638
653
|
}, z.core.$strip>], "kind">>;
|
|
@@ -726,6 +741,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
726
741
|
producer: z.ZodOptional<z.ZodString>;
|
|
727
742
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
728
743
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
744
|
+
language: z.ZodOptional<z.ZodString>;
|
|
729
745
|
}, z.core.$strip>;
|
|
730
746
|
}, z.core.$strip>, z.ZodObject<{
|
|
731
747
|
slides: z.ZodArray<z.ZodObject<{
|
|
@@ -848,6 +864,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
848
864
|
producer: z.ZodOptional<z.ZodString>;
|
|
849
865
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
850
866
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
867
|
+
language: z.ZodOptional<z.ZodString>;
|
|
851
868
|
}, z.core.$strip>;
|
|
852
869
|
}, z.core.$strip>, z.ZodObject<{
|
|
853
870
|
sheets: z.ZodArray<z.ZodObject<{
|
|
@@ -1205,6 +1222,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1205
1222
|
producer: z.ZodOptional<z.ZodString>;
|
|
1206
1223
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
1207
1224
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
1225
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1208
1226
|
}, z.core.$strip>;
|
|
1209
1227
|
}, z.core.$strip>, z.ZodObject<{
|
|
1210
1228
|
pages: z.ZodArray<z.ZodObject<{
|
|
@@ -1571,6 +1589,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1571
1589
|
producer: z.ZodOptional<z.ZodString>;
|
|
1572
1590
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
1573
1591
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
1592
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1574
1593
|
}, z.core.$strip>;
|
|
1575
1594
|
}, z.core.$strip>, z.ZodObject<{
|
|
1576
1595
|
formula: z.ZodObject<{
|
|
@@ -1656,6 +1675,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1656
1675
|
producer: z.ZodOptional<z.ZodString>;
|
|
1657
1676
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
1658
1677
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
1678
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1659
1679
|
}, z.core.$strip>;
|
|
1660
1680
|
}, z.core.$strip>], "kind">>;
|
|
1661
1681
|
//#endregion
|
package/dist/codec.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
18
18
|
list: z.ZodOptional<z.ZodObject<{
|
|
19
19
|
numId: z.ZodOptional<z.ZodString>;
|
|
20
20
|
level: z.ZodNumber;
|
|
21
|
+
checked: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
21
23
|
}, z.core.$strip>>;
|
|
22
24
|
spacingBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
23
25
|
spacingAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -120,6 +122,7 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
120
122
|
producer: z.ZodOptional<z.ZodString>;
|
|
121
123
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
122
124
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
125
|
+
language: z.ZodOptional<z.ZodString>;
|
|
123
126
|
}, z.core.$strip>;
|
|
124
127
|
kind: z.ZodLiteral<"wordprocessing">;
|
|
125
128
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -139,6 +142,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
139
142
|
list: z.ZodOptional<z.ZodObject<{
|
|
140
143
|
numId: z.ZodOptional<z.ZodString>;
|
|
141
144
|
level: z.ZodNumber;
|
|
145
|
+
checked: z.ZodOptional<z.ZodBoolean>;
|
|
146
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
142
147
|
}, z.core.$strip>>;
|
|
143
148
|
spacingBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
144
149
|
spacingAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -241,6 +246,7 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
241
246
|
producer: z.ZodOptional<z.ZodString>;
|
|
242
247
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
243
248
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
249
|
+
language: z.ZodOptional<z.ZodString>;
|
|
244
250
|
}, z.core.$strip>;
|
|
245
251
|
kind: z.ZodLiteral<"presentation">;
|
|
246
252
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -260,6 +266,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
260
266
|
list: z.ZodOptional<z.ZodObject<{
|
|
261
267
|
numId: z.ZodOptional<z.ZodString>;
|
|
262
268
|
level: z.ZodNumber;
|
|
269
|
+
checked: z.ZodOptional<z.ZodBoolean>;
|
|
270
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
263
271
|
}, z.core.$strip>>;
|
|
264
272
|
spacingBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
265
273
|
spacingAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -362,6 +370,7 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
362
370
|
producer: z.ZodOptional<z.ZodString>;
|
|
363
371
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
364
372
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
373
|
+
language: z.ZodOptional<z.ZodString>;
|
|
365
374
|
}, z.core.$strip>;
|
|
366
375
|
kind: z.ZodLiteral<"spreadsheet">;
|
|
367
376
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -381,6 +390,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
381
390
|
list: z.ZodOptional<z.ZodObject<{
|
|
382
391
|
numId: z.ZodOptional<z.ZodString>;
|
|
383
392
|
level: z.ZodNumber;
|
|
393
|
+
checked: z.ZodOptional<z.ZodBoolean>;
|
|
394
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
384
395
|
}, z.core.$strip>>;
|
|
385
396
|
spacingBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
386
397
|
spacingAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -483,6 +494,7 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
483
494
|
producer: z.ZodOptional<z.ZodString>;
|
|
484
495
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
485
496
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
497
|
+
language: z.ZodOptional<z.ZodString>;
|
|
486
498
|
}, z.core.$strip>;
|
|
487
499
|
kind: z.ZodLiteral<"drawing">;
|
|
488
500
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -531,6 +543,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
531
543
|
list: z.ZodOptional<z.ZodObject<{
|
|
532
544
|
numId: z.ZodOptional<z.ZodString>;
|
|
533
545
|
level: z.ZodNumber;
|
|
546
|
+
checked: z.ZodOptional<z.ZodBoolean>;
|
|
547
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
534
548
|
}, z.core.$strip>>;
|
|
535
549
|
spacingBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
536
550
|
spacingAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -633,6 +647,7 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
633
647
|
producer: z.ZodOptional<z.ZodString>;
|
|
634
648
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
635
649
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
650
|
+
language: z.ZodOptional<z.ZodString>;
|
|
636
651
|
}, z.core.$strip>;
|
|
637
652
|
kind: z.ZodLiteral<"formula">;
|
|
638
653
|
}, z.core.$strip>], "kind">>;
|
|
@@ -726,6 +741,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
726
741
|
producer: z.ZodOptional<z.ZodString>;
|
|
727
742
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
728
743
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
744
|
+
language: z.ZodOptional<z.ZodString>;
|
|
729
745
|
}, z.core.$strip>;
|
|
730
746
|
}, z.core.$strip>, z.ZodObject<{
|
|
731
747
|
slides: z.ZodArray<z.ZodObject<{
|
|
@@ -848,6 +864,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
848
864
|
producer: z.ZodOptional<z.ZodString>;
|
|
849
865
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
850
866
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
867
|
+
language: z.ZodOptional<z.ZodString>;
|
|
851
868
|
}, z.core.$strip>;
|
|
852
869
|
}, z.core.$strip>, z.ZodObject<{
|
|
853
870
|
sheets: z.ZodArray<z.ZodObject<{
|
|
@@ -1205,6 +1222,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1205
1222
|
producer: z.ZodOptional<z.ZodString>;
|
|
1206
1223
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
1207
1224
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
1225
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1208
1226
|
}, z.core.$strip>;
|
|
1209
1227
|
}, z.core.$strip>, z.ZodObject<{
|
|
1210
1228
|
pages: z.ZodArray<z.ZodObject<{
|
|
@@ -1571,6 +1589,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1571
1589
|
producer: z.ZodOptional<z.ZodString>;
|
|
1572
1590
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
1573
1591
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
1592
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1574
1593
|
}, z.core.$strip>;
|
|
1575
1594
|
}, z.core.$strip>, z.ZodObject<{
|
|
1576
1595
|
formula: z.ZodObject<{
|
|
@@ -1656,6 +1675,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1656
1675
|
producer: z.ZodOptional<z.ZodString>;
|
|
1657
1676
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
1658
1677
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
1678
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1659
1679
|
}, z.core.$strip>;
|
|
1660
1680
|
}, z.core.$strip>], "kind">>;
|
|
1661
1681
|
//#endregion
|
|
@@ -12,14 +12,11 @@ const MarkdownDiagnosticCodes = {
|
|
|
12
12
|
INVENTED_PAGE_GEOMETRY: "md/invented-page-geometry",
|
|
13
13
|
NESTED_EMPHASIS_FLATTENED: "md/nested-emphasis-flattened",
|
|
14
14
|
LINK_TITLE_DROPPED: "md/link-title-dropped",
|
|
15
|
-
|
|
16
|
-
BLOCKQUOTE_NESTED_DEPTH: "md/blockquote-nested-depth",
|
|
15
|
+
BLOCKQUOTE_CONTAINER_SKIPPED: "md/blockquote-container-skipped",
|
|
17
16
|
LIST_ITEM_BLOCK_UNLISTED: "md/list-item-block-unlisted",
|
|
18
|
-
LIST_ITEM_MULTI_BLOCK_FLATTENED: "md/list-item-multi-block-flattened",
|
|
19
17
|
IMAGE_UNRESOLVED: "md/image-unresolved",
|
|
20
18
|
RAW_HTML_PRESERVED_AS_TEXT: "md/raw-html-preserved-as-text",
|
|
21
19
|
RAW_HTML_DROPPED: "md/raw-html-dropped",
|
|
22
|
-
MATH_BLOCK_PRESERVED_AS_TEXT: "md/math-block-preserved-as-text",
|
|
23
20
|
MATH_INLINE_PRESERVED_AS_TEXT: "md/math-inline-preserved-as-text",
|
|
24
21
|
FRONT_MATTER_KEY_UNMAPPED: "md/front-matter-key-unmapped",
|
|
25
22
|
FOOTNOTE_REFERENCE_PRESERVED_AS_TEXT: "md/footnote-reference-preserved-as-text",
|
|
@@ -84,6 +81,16 @@ var MarkdownUnbalancedConstructMarkersError = class extends MarkdownWriteError {
|
|
|
84
81
|
this.blockIndex = blockIndex;
|
|
85
82
|
}
|
|
86
83
|
};
|
|
84
|
+
var MarkdownInvalidRunConstructExtentError = class extends MarkdownWriteError {
|
|
85
|
+
faultKind;
|
|
86
|
+
entryIndex;
|
|
87
|
+
constructor(faultKind, entryIndex) {
|
|
88
|
+
super("md/run-construct-extent-invalid", `a paragraph's run-level construct extent ${faultKind === "invertedRange" ? "ends before it starts" : "reaches outside the paragraph's own runs"} (constructs entry ${String(entryIndex)}); a run extent must name real runs in 0..runs.length`);
|
|
89
|
+
this.name = "MarkdownInvalidRunConstructExtentError";
|
|
90
|
+
this.faultKind = faultKind;
|
|
91
|
+
this.entryIndex = entryIndex;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
87
94
|
var MarkdownUnsupportedDocumentKindError = class extends MarkdownWriteError {
|
|
88
95
|
kind;
|
|
89
96
|
constructor(kind) {
|
|
@@ -102,6 +109,7 @@ var MarkdownPackageFlattenError = class extends MarkdownWriteError {
|
|
|
102
109
|
//#endregion
|
|
103
110
|
exports.MarkdownDiagnosticCodes = MarkdownDiagnosticCodes;
|
|
104
111
|
exports.MarkdownInputTooLargeError = MarkdownInputTooLargeError;
|
|
112
|
+
exports.MarkdownInvalidRunConstructExtentError = MarkdownInvalidRunConstructExtentError;
|
|
105
113
|
exports.MarkdownInvalidUtf8Error = MarkdownInvalidUtf8Error;
|
|
106
114
|
exports.MarkdownNestingLimitExceededError = MarkdownNestingLimitExceededError;
|
|
107
115
|
exports.MarkdownPackageFlattenError = MarkdownPackageFlattenError;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MarkdownInputTooLargeError, c as
|
|
2
|
-
export { MarkdownDiagnostic, MarkdownDiagnosticCodes, MarkdownDiagnosticSeverity, MarkdownDiagnosticSink, MarkdownInputTooLargeError, MarkdownInvalidUtf8Error, MarkdownNestingLimitExceededError, MarkdownPackageFlattenError, MarkdownParseError, MarkdownUnbalancedConstructMarkersError, MarkdownUnsupportedDocumentKindError, MarkdownWriteError, NOOP_MARKDOWN_DIAGNOSTIC_SINK };
|
|
1
|
+
import { a as MarkdownInputTooLargeError, c as MarkdownNestingLimitExceededError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUnsupportedDocumentKindError, i as MarkdownDiagnosticSink, l as MarkdownPackageFlattenError, m as NOOP_MARKDOWN_DIAGNOSTIC_SINK, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownWriteError, r as MarkdownDiagnosticSeverity, s as MarkdownInvalidUtf8Error, t as MarkdownDiagnostic, u as MarkdownParseError } from "../diagnostics-CUMLtGHJ.cjs";
|
|
2
|
+
export { MarkdownDiagnostic, MarkdownDiagnosticCodes, MarkdownDiagnosticSeverity, MarkdownDiagnosticSink, MarkdownInputTooLargeError, MarkdownInvalidRunConstructExtentError, MarkdownInvalidUtf8Error, MarkdownNestingLimitExceededError, MarkdownPackageFlattenError, MarkdownParseError, MarkdownUnbalancedConstructMarkersError, MarkdownUnsupportedDocumentKindError, MarkdownWriteError, NOOP_MARKDOWN_DIAGNOSTIC_SINK };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MarkdownInputTooLargeError, c as
|
|
2
|
-
export { MarkdownDiagnostic, MarkdownDiagnosticCodes, MarkdownDiagnosticSeverity, MarkdownDiagnosticSink, MarkdownInputTooLargeError, MarkdownInvalidUtf8Error, MarkdownNestingLimitExceededError, MarkdownPackageFlattenError, MarkdownParseError, MarkdownUnbalancedConstructMarkersError, MarkdownUnsupportedDocumentKindError, MarkdownWriteError, NOOP_MARKDOWN_DIAGNOSTIC_SINK };
|
|
1
|
+
import { a as MarkdownInputTooLargeError, c as MarkdownNestingLimitExceededError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUnsupportedDocumentKindError, i as MarkdownDiagnosticSink, l as MarkdownPackageFlattenError, m as NOOP_MARKDOWN_DIAGNOSTIC_SINK, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownWriteError, r as MarkdownDiagnosticSeverity, s as MarkdownInvalidUtf8Error, t as MarkdownDiagnostic, u as MarkdownParseError } from "../diagnostics-CUMLtGHJ.js";
|
|
2
|
+
export { MarkdownDiagnostic, MarkdownDiagnosticCodes, MarkdownDiagnosticSeverity, MarkdownDiagnosticSink, MarkdownInputTooLargeError, MarkdownInvalidRunConstructExtentError, MarkdownInvalidUtf8Error, MarkdownNestingLimitExceededError, MarkdownPackageFlattenError, MarkdownParseError, MarkdownUnbalancedConstructMarkersError, MarkdownUnsupportedDocumentKindError, MarkdownWriteError, NOOP_MARKDOWN_DIAGNOSTIC_SINK };
|
|
@@ -11,14 +11,11 @@ const MarkdownDiagnosticCodes = {
|
|
|
11
11
|
INVENTED_PAGE_GEOMETRY: "md/invented-page-geometry",
|
|
12
12
|
NESTED_EMPHASIS_FLATTENED: "md/nested-emphasis-flattened",
|
|
13
13
|
LINK_TITLE_DROPPED: "md/link-title-dropped",
|
|
14
|
-
|
|
15
|
-
BLOCKQUOTE_NESTED_DEPTH: "md/blockquote-nested-depth",
|
|
14
|
+
BLOCKQUOTE_CONTAINER_SKIPPED: "md/blockquote-container-skipped",
|
|
16
15
|
LIST_ITEM_BLOCK_UNLISTED: "md/list-item-block-unlisted",
|
|
17
|
-
LIST_ITEM_MULTI_BLOCK_FLATTENED: "md/list-item-multi-block-flattened",
|
|
18
16
|
IMAGE_UNRESOLVED: "md/image-unresolved",
|
|
19
17
|
RAW_HTML_PRESERVED_AS_TEXT: "md/raw-html-preserved-as-text",
|
|
20
18
|
RAW_HTML_DROPPED: "md/raw-html-dropped",
|
|
21
|
-
MATH_BLOCK_PRESERVED_AS_TEXT: "md/math-block-preserved-as-text",
|
|
22
19
|
MATH_INLINE_PRESERVED_AS_TEXT: "md/math-inline-preserved-as-text",
|
|
23
20
|
FRONT_MATTER_KEY_UNMAPPED: "md/front-matter-key-unmapped",
|
|
24
21
|
FOOTNOTE_REFERENCE_PRESERVED_AS_TEXT: "md/footnote-reference-preserved-as-text",
|
|
@@ -83,6 +80,16 @@ var MarkdownUnbalancedConstructMarkersError = class extends MarkdownWriteError {
|
|
|
83
80
|
this.blockIndex = blockIndex;
|
|
84
81
|
}
|
|
85
82
|
};
|
|
83
|
+
var MarkdownInvalidRunConstructExtentError = class extends MarkdownWriteError {
|
|
84
|
+
faultKind;
|
|
85
|
+
entryIndex;
|
|
86
|
+
constructor(faultKind, entryIndex) {
|
|
87
|
+
super("md/run-construct-extent-invalid", `a paragraph's run-level construct extent ${faultKind === "invertedRange" ? "ends before it starts" : "reaches outside the paragraph's own runs"} (constructs entry ${String(entryIndex)}); a run extent must name real runs in 0..runs.length`);
|
|
88
|
+
this.name = "MarkdownInvalidRunConstructExtentError";
|
|
89
|
+
this.faultKind = faultKind;
|
|
90
|
+
this.entryIndex = entryIndex;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
86
93
|
var MarkdownUnsupportedDocumentKindError = class extends MarkdownWriteError {
|
|
87
94
|
kind;
|
|
88
95
|
constructor(kind) {
|
|
@@ -99,4 +106,4 @@ var MarkdownPackageFlattenError = class extends MarkdownWriteError {
|
|
|
99
106
|
}
|
|
100
107
|
};
|
|
101
108
|
//#endregion
|
|
102
|
-
export { MarkdownDiagnosticCodes, MarkdownInputTooLargeError, MarkdownInvalidUtf8Error, MarkdownNestingLimitExceededError, MarkdownPackageFlattenError, MarkdownParseError, MarkdownUnbalancedConstructMarkersError, MarkdownUnsupportedDocumentKindError, MarkdownWriteError, NOOP_MARKDOWN_DIAGNOSTIC_SINK };
|
|
109
|
+
export { MarkdownDiagnosticCodes, MarkdownInputTooLargeError, MarkdownInvalidRunConstructExtentError, MarkdownInvalidUtf8Error, MarkdownNestingLimitExceededError, MarkdownPackageFlattenError, MarkdownParseError, MarkdownUnbalancedConstructMarkersError, MarkdownUnsupportedDocumentKindError, MarkdownWriteError, NOOP_MARKDOWN_DIAGNOSTIC_SINK };
|
|
@@ -19,14 +19,11 @@ declare const MarkdownDiagnosticCodes: {
|
|
|
19
19
|
readonly INVENTED_PAGE_GEOMETRY: "md/invented-page-geometry";
|
|
20
20
|
readonly NESTED_EMPHASIS_FLATTENED: "md/nested-emphasis-flattened";
|
|
21
21
|
readonly LINK_TITLE_DROPPED: "md/link-title-dropped";
|
|
22
|
-
readonly
|
|
23
|
-
readonly BLOCKQUOTE_NESTED_DEPTH: "md/blockquote-nested-depth";
|
|
22
|
+
readonly BLOCKQUOTE_CONTAINER_SKIPPED: "md/blockquote-container-skipped";
|
|
24
23
|
readonly LIST_ITEM_BLOCK_UNLISTED: "md/list-item-block-unlisted";
|
|
25
|
-
readonly LIST_ITEM_MULTI_BLOCK_FLATTENED: "md/list-item-multi-block-flattened";
|
|
26
24
|
readonly IMAGE_UNRESOLVED: "md/image-unresolved";
|
|
27
25
|
readonly RAW_HTML_PRESERVED_AS_TEXT: "md/raw-html-preserved-as-text";
|
|
28
26
|
readonly RAW_HTML_DROPPED: "md/raw-html-dropped";
|
|
29
|
-
readonly MATH_BLOCK_PRESERVED_AS_TEXT: "md/math-block-preserved-as-text";
|
|
30
27
|
readonly MATH_INLINE_PRESERVED_AS_TEXT: "md/math-inline-preserved-as-text";
|
|
31
28
|
readonly FRONT_MATTER_KEY_UNMAPPED: "md/front-matter-key-unmapped";
|
|
32
29
|
readonly FOOTNOTE_REFERENCE_PRESERVED_AS_TEXT: "md/footnote-reference-preserved-as-text";
|
|
@@ -66,6 +63,11 @@ declare class MarkdownUnbalancedConstructMarkersError extends MarkdownWriteError
|
|
|
66
63
|
readonly blockIndex: number;
|
|
67
64
|
constructor(imbalanceKind: 'unmatchedEnd' | 'unclosedStart', blockIndex: number);
|
|
68
65
|
}
|
|
66
|
+
declare class MarkdownInvalidRunConstructExtentError extends MarkdownWriteError {
|
|
67
|
+
readonly faultKind: 'invertedRange' | 'beyondRuns';
|
|
68
|
+
readonly entryIndex: number;
|
|
69
|
+
constructor(faultKind: 'invertedRange' | 'beyondRuns', entryIndex: number);
|
|
70
|
+
}
|
|
69
71
|
declare class MarkdownUnsupportedDocumentKindError extends MarkdownWriteError {
|
|
70
72
|
readonly kind: string;
|
|
71
73
|
constructor(kind: string);
|
|
@@ -74,4 +76,4 @@ declare class MarkdownPackageFlattenError extends MarkdownWriteError {
|
|
|
74
76
|
constructor(cause: unknown);
|
|
75
77
|
}
|
|
76
78
|
//#endregion
|
|
77
|
-
export { MarkdownInputTooLargeError as a,
|
|
79
|
+
export { MarkdownInputTooLargeError as a, MarkdownNestingLimitExceededError as c, MarkdownUnbalancedConstructMarkersError as d, MarkdownUnsupportedDocumentKindError as f, MarkdownDiagnosticSink as i, MarkdownPackageFlattenError as l, NOOP_MARKDOWN_DIAGNOSTIC_SINK as m, MarkdownDiagnosticCodes as n, MarkdownInvalidRunConstructExtentError as o, MarkdownWriteError as p, MarkdownDiagnosticSeverity as r, MarkdownInvalidUtf8Error as s, MarkdownDiagnostic as t, MarkdownParseError as u };
|
|
@@ -19,14 +19,11 @@ declare const MarkdownDiagnosticCodes: {
|
|
|
19
19
|
readonly INVENTED_PAGE_GEOMETRY: "md/invented-page-geometry";
|
|
20
20
|
readonly NESTED_EMPHASIS_FLATTENED: "md/nested-emphasis-flattened";
|
|
21
21
|
readonly LINK_TITLE_DROPPED: "md/link-title-dropped";
|
|
22
|
-
readonly
|
|
23
|
-
readonly BLOCKQUOTE_NESTED_DEPTH: "md/blockquote-nested-depth";
|
|
22
|
+
readonly BLOCKQUOTE_CONTAINER_SKIPPED: "md/blockquote-container-skipped";
|
|
24
23
|
readonly LIST_ITEM_BLOCK_UNLISTED: "md/list-item-block-unlisted";
|
|
25
|
-
readonly LIST_ITEM_MULTI_BLOCK_FLATTENED: "md/list-item-multi-block-flattened";
|
|
26
24
|
readonly IMAGE_UNRESOLVED: "md/image-unresolved";
|
|
27
25
|
readonly RAW_HTML_PRESERVED_AS_TEXT: "md/raw-html-preserved-as-text";
|
|
28
26
|
readonly RAW_HTML_DROPPED: "md/raw-html-dropped";
|
|
29
|
-
readonly MATH_BLOCK_PRESERVED_AS_TEXT: "md/math-block-preserved-as-text";
|
|
30
27
|
readonly MATH_INLINE_PRESERVED_AS_TEXT: "md/math-inline-preserved-as-text";
|
|
31
28
|
readonly FRONT_MATTER_KEY_UNMAPPED: "md/front-matter-key-unmapped";
|
|
32
29
|
readonly FOOTNOTE_REFERENCE_PRESERVED_AS_TEXT: "md/footnote-reference-preserved-as-text";
|
|
@@ -66,6 +63,11 @@ declare class MarkdownUnbalancedConstructMarkersError extends MarkdownWriteError
|
|
|
66
63
|
readonly blockIndex: number;
|
|
67
64
|
constructor(imbalanceKind: 'unmatchedEnd' | 'unclosedStart', blockIndex: number);
|
|
68
65
|
}
|
|
66
|
+
declare class MarkdownInvalidRunConstructExtentError extends MarkdownWriteError {
|
|
67
|
+
readonly faultKind: 'invertedRange' | 'beyondRuns';
|
|
68
|
+
readonly entryIndex: number;
|
|
69
|
+
constructor(faultKind: 'invertedRange' | 'beyondRuns', entryIndex: number);
|
|
70
|
+
}
|
|
69
71
|
declare class MarkdownUnsupportedDocumentKindError extends MarkdownWriteError {
|
|
70
72
|
readonly kind: string;
|
|
71
73
|
constructor(kind: string);
|
|
@@ -74,4 +76,4 @@ declare class MarkdownPackageFlattenError extends MarkdownWriteError {
|
|
|
74
76
|
constructor(cause: unknown);
|
|
75
77
|
}
|
|
76
78
|
//#endregion
|
|
77
|
-
export { MarkdownInputTooLargeError as a,
|
|
79
|
+
export { MarkdownInputTooLargeError as a, MarkdownNestingLimitExceededError as c, MarkdownUnbalancedConstructMarkersError as d, MarkdownUnsupportedDocumentKindError as f, MarkdownDiagnosticSink as i, MarkdownPackageFlattenError as l, NOOP_MARKDOWN_DIAGNOSTIC_SINK as m, MarkdownDiagnosticCodes as n, MarkdownInvalidRunConstructExtentError as o, MarkdownWriteError as p, MarkdownDiagnosticSeverity as r, MarkdownInvalidUtf8Error as s, MarkdownDiagnostic as t, MarkdownParseError as u };
|