markdown-codec 11.2.0 → 11.2.1
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 +1 -1
- package/dist/codec.d.cts +24 -24
- package/dist/codec.d.ts +24 -24
- package/dist/emit/html-table.cjs +5 -1
- package/dist/emit/html-table.js +5 -1
- package/dist/html/html-table.cjs +9 -1
- package/dist/html/html-table.js +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -196,7 +196,7 @@ Every construct `src/lower`/`src/emit` cannot represent losslessly is a document
|
|
|
196
196
|
- **`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.
|
|
197
197
|
- **`md/image-unresolved`** — no resolver, `undefined` return, or non-PNG/JPEG bytes degrades to alt-text run.
|
|
198
198
|
- **`md/raw-html-preserved-as-text` / `md/raw-html-dropped`** — raw HTML kept as literal text (default) or dropped; never interpreted, except for the superscript and subscript elements in the next item. 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.
|
|
199
|
-
- **Superscripts and subscripts are written as `<sup>` and `<sub>`.** Markdown has no syntax for a raised or lowered run, so a `ContentRun` carrying `verticalAlign` is written wrapped in the inline HTML element every renderer draws that way (`m<sup>2</sup>`, `I<sub>a</sub>`), inside any emphasis or link around it. Reading recognises exactly that spelling back into the field: a bare `<sup>` or `<sub>` (any case, no attributes) closed by its own closing tag among the same inline siblings. Any other inline HTML, an unclosed `<sup>` or one carrying attributes included, is still preserved as text like the rest.
|
|
199
|
+
- **Superscripts and subscripts are written as `<sup>` and `<sub>`.** Markdown has no syntax for a raised or lowered run, so a `ContentRun` carrying `verticalAlign` is written wrapped in the inline HTML element every renderer draws that way (`m<sup>2</sup>`, `I<sub>a</sub>`), inside any emphasis or link around it, the same elements in a cell of an HTML-fallback table. Reading recognises exactly that spelling back into the field: a bare `<sup>` or `<sub>` (any case, no attributes) closed by its own closing tag among the same inline siblings. Any other inline HTML, an unclosed `<sup>` or one carrying attributes included, is still preserved as text like the rest. An HTML-fallback table reads `<sup>`/`<sub>` in a cell back the same way it reads `<strong>` and the rest.
|
|
200
200
|
- **`md/front-matter-key-unmapped`** — no YAML/TOML engine; only `LayoutMetadata`'s own string/array/enum fields are recognised (every one of them except `producer`, which is PDF-writer-only), each as a flat `key: value` (or `keywords: [a, b]`) line. The verbatim original block rides the package-level residue table (`readMarkdown`'s `documentPackage.source.frontmatter`), which `writeMarkdown` re-emits as-is.
|
|
201
201
|
- **`md/heading-level-clamped`** — styleId beyond `Heading6` (from another format) clamps to level 6 via document-schema.js's shared `clampHeadingLevel()`.
|
|
202
202
|
- **`md/heading-line-break-collapsed`** — a hard or soft break embedded in a heading's own runs (most commonly a setext heading read with more than one physical line) is promoted to setext output whenever the level admits one (1 or 2) and the break's own placement is safe to promote, the only markdown grammar that can hold a genuine line break inside heading text; a level 3-6 heading with the same shape has no such fallback and always collapses the break to a single space instead, as does a level 1/2 heading whose break placement is unsafe to promote (see `md/heading-line-break-unsafe-for-setext` below).
|
package/dist/codec.d.cts
CHANGED
|
@@ -27,8 +27,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
27
27
|
checked: z.ZodOptional<z.ZodBoolean>;
|
|
28
28
|
itemId: z.ZodOptional<z.ZodString>;
|
|
29
29
|
format: z.ZodOptional<z.ZodEnum<{
|
|
30
|
-
bullet: "bullet";
|
|
31
30
|
decimal: "decimal";
|
|
31
|
+
bullet: "bullet";
|
|
32
32
|
lowerLetter: "lowerLetter";
|
|
33
33
|
upperLetter: "upperLetter";
|
|
34
34
|
lowerRoman: "lowerRoman";
|
|
@@ -103,9 +103,9 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
103
103
|
symbol: z.ZodString;
|
|
104
104
|
name: z.ZodOptional<z.ZodString>;
|
|
105
105
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
106
|
+
time: "time";
|
|
106
107
|
length: "length";
|
|
107
108
|
mass: "mass";
|
|
108
|
-
time: "time";
|
|
109
109
|
electricCurrent: "electricCurrent";
|
|
110
110
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
111
111
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -182,8 +182,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
182
182
|
checked: z.ZodOptional<z.ZodBoolean>;
|
|
183
183
|
itemId: z.ZodOptional<z.ZodString>;
|
|
184
184
|
format: z.ZodOptional<z.ZodEnum<{
|
|
185
|
-
bullet: "bullet";
|
|
186
185
|
decimal: "decimal";
|
|
186
|
+
bullet: "bullet";
|
|
187
187
|
lowerLetter: "lowerLetter";
|
|
188
188
|
upperLetter: "upperLetter";
|
|
189
189
|
lowerRoman: "lowerRoman";
|
|
@@ -258,9 +258,9 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
258
258
|
symbol: z.ZodString;
|
|
259
259
|
name: z.ZodOptional<z.ZodString>;
|
|
260
260
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
261
|
+
time: "time";
|
|
261
262
|
length: "length";
|
|
262
263
|
mass: "mass";
|
|
263
|
-
time: "time";
|
|
264
264
|
electricCurrent: "electricCurrent";
|
|
265
265
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
266
266
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -342,8 +342,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
342
342
|
checked: z.ZodOptional<z.ZodBoolean>;
|
|
343
343
|
itemId: z.ZodOptional<z.ZodString>;
|
|
344
344
|
format: z.ZodOptional<z.ZodEnum<{
|
|
345
|
-
bullet: "bullet";
|
|
346
345
|
decimal: "decimal";
|
|
346
|
+
bullet: "bullet";
|
|
347
347
|
lowerLetter: "lowerLetter";
|
|
348
348
|
upperLetter: "upperLetter";
|
|
349
349
|
lowerRoman: "lowerRoman";
|
|
@@ -418,9 +418,9 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
418
418
|
symbol: z.ZodString;
|
|
419
419
|
name: z.ZodOptional<z.ZodString>;
|
|
420
420
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
421
|
+
time: "time";
|
|
421
422
|
length: "length";
|
|
422
423
|
mass: "mass";
|
|
423
|
-
time: "time";
|
|
424
424
|
electricCurrent: "electricCurrent";
|
|
425
425
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
426
426
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -497,8 +497,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
497
497
|
checked: z.ZodOptional<z.ZodBoolean>;
|
|
498
498
|
itemId: z.ZodOptional<z.ZodString>;
|
|
499
499
|
format: z.ZodOptional<z.ZodEnum<{
|
|
500
|
-
bullet: "bullet";
|
|
501
500
|
decimal: "decimal";
|
|
501
|
+
bullet: "bullet";
|
|
502
502
|
lowerLetter: "lowerLetter";
|
|
503
503
|
upperLetter: "upperLetter";
|
|
504
504
|
lowerRoman: "lowerRoman";
|
|
@@ -573,9 +573,9 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
573
573
|
symbol: z.ZodString;
|
|
574
574
|
name: z.ZodOptional<z.ZodString>;
|
|
575
575
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
576
|
+
time: "time";
|
|
576
577
|
length: "length";
|
|
577
578
|
mass: "mass";
|
|
578
|
-
time: "time";
|
|
579
579
|
electricCurrent: "electricCurrent";
|
|
580
580
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
581
581
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -711,8 +711,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
711
711
|
checked: z.ZodOptional<z.ZodBoolean>;
|
|
712
712
|
itemId: z.ZodOptional<z.ZodString>;
|
|
713
713
|
format: z.ZodOptional<z.ZodEnum<{
|
|
714
|
-
bullet: "bullet";
|
|
715
714
|
decimal: "decimal";
|
|
715
|
+
bullet: "bullet";
|
|
716
716
|
lowerLetter: "lowerLetter";
|
|
717
717
|
upperLetter: "upperLetter";
|
|
718
718
|
lowerRoman: "lowerRoman";
|
|
@@ -787,9 +787,9 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
787
787
|
symbol: z.ZodString;
|
|
788
788
|
name: z.ZodOptional<z.ZodString>;
|
|
789
789
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
790
|
+
time: "time";
|
|
790
791
|
length: "length";
|
|
791
792
|
mass: "mass";
|
|
792
|
-
time: "time";
|
|
793
793
|
electricCurrent: "electricCurrent";
|
|
794
794
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
795
795
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -937,9 +937,9 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
937
937
|
symbol: z.ZodString;
|
|
938
938
|
name: z.ZodOptional<z.ZodString>;
|
|
939
939
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
940
|
+
time: "time";
|
|
940
941
|
length: "length";
|
|
941
942
|
mass: "mass";
|
|
942
|
-
time: "time";
|
|
943
943
|
electricCurrent: "electricCurrent";
|
|
944
944
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
945
945
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -1133,9 +1133,9 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1133
1133
|
symbol: z.ZodString;
|
|
1134
1134
|
name: z.ZodOptional<z.ZodString>;
|
|
1135
1135
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
1136
|
+
time: "time";
|
|
1136
1137
|
length: "length";
|
|
1137
1138
|
mass: "mass";
|
|
1138
|
-
time: "time";
|
|
1139
1139
|
electricCurrent: "electricCurrent";
|
|
1140
1140
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
1141
1141
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -1648,6 +1648,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1648
1648
|
floatPosition: z.ZodOptional<z.ZodObject<{
|
|
1649
1649
|
horizontal: z.ZodUnion<readonly [z.ZodObject<{
|
|
1650
1650
|
relativeTo: z.ZodEnum<{
|
|
1651
|
+
column: "column";
|
|
1651
1652
|
page: "page";
|
|
1652
1653
|
margin: "margin";
|
|
1653
1654
|
leftMargin: "leftMargin";
|
|
@@ -1656,7 +1657,6 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1656
1657
|
bottomMargin: "bottomMargin";
|
|
1657
1658
|
insideMargin: "insideMargin";
|
|
1658
1659
|
outsideMargin: "outsideMargin";
|
|
1659
|
-
column: "column";
|
|
1660
1660
|
character: "character";
|
|
1661
1661
|
paragraph: "paragraph";
|
|
1662
1662
|
line: "line";
|
|
@@ -1665,6 +1665,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1665
1665
|
offsetPt: z.ZodNumber;
|
|
1666
1666
|
}, z.core.$strict>, z.ZodObject<{
|
|
1667
1667
|
relativeTo: z.ZodEnum<{
|
|
1668
|
+
column: "column";
|
|
1668
1669
|
page: "page";
|
|
1669
1670
|
margin: "margin";
|
|
1670
1671
|
leftMargin: "leftMargin";
|
|
@@ -1673,7 +1674,6 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1673
1674
|
bottomMargin: "bottomMargin";
|
|
1674
1675
|
insideMargin: "insideMargin";
|
|
1675
1676
|
outsideMargin: "outsideMargin";
|
|
1676
|
-
column: "column";
|
|
1677
1677
|
character: "character";
|
|
1678
1678
|
paragraph: "paragraph";
|
|
1679
1679
|
line: "line";
|
|
@@ -1691,6 +1691,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1691
1691
|
}, z.core.$strict>]>;
|
|
1692
1692
|
vertical: z.ZodUnion<readonly [z.ZodObject<{
|
|
1693
1693
|
relativeTo: z.ZodEnum<{
|
|
1694
|
+
column: "column";
|
|
1694
1695
|
page: "page";
|
|
1695
1696
|
margin: "margin";
|
|
1696
1697
|
leftMargin: "leftMargin";
|
|
@@ -1699,7 +1700,6 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1699
1700
|
bottomMargin: "bottomMargin";
|
|
1700
1701
|
insideMargin: "insideMargin";
|
|
1701
1702
|
outsideMargin: "outsideMargin";
|
|
1702
|
-
column: "column";
|
|
1703
1703
|
character: "character";
|
|
1704
1704
|
paragraph: "paragraph";
|
|
1705
1705
|
line: "line";
|
|
@@ -1708,6 +1708,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1708
1708
|
offsetPt: z.ZodNumber;
|
|
1709
1709
|
}, z.core.$strict>, z.ZodObject<{
|
|
1710
1710
|
relativeTo: z.ZodEnum<{
|
|
1711
|
+
column: "column";
|
|
1711
1712
|
page: "page";
|
|
1712
1713
|
margin: "margin";
|
|
1713
1714
|
leftMargin: "leftMargin";
|
|
@@ -1716,7 +1717,6 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1716
1717
|
bottomMargin: "bottomMargin";
|
|
1717
1718
|
insideMargin: "insideMargin";
|
|
1718
1719
|
outsideMargin: "outsideMargin";
|
|
1719
|
-
column: "column";
|
|
1720
1720
|
character: "character";
|
|
1721
1721
|
paragraph: "paragraph";
|
|
1722
1722
|
line: "line";
|
|
@@ -1819,9 +1819,9 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1819
1819
|
date: "date";
|
|
1820
1820
|
custom: "custom";
|
|
1821
1821
|
time: "time";
|
|
1822
|
+
whole: "whole";
|
|
1822
1823
|
decimal: "decimal";
|
|
1823
1824
|
list: "list";
|
|
1824
|
-
whole: "whole";
|
|
1825
1825
|
textLength: "textLength";
|
|
1826
1826
|
}>;
|
|
1827
1827
|
operator: z.ZodOptional<z.ZodEnum<{
|
|
@@ -2292,8 +2292,8 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
2292
2292
|
value: z.ZodObject<{
|
|
2293
2293
|
type: z.ZodEnum<{
|
|
2294
2294
|
formula: "formula";
|
|
2295
|
-
percent: "percent";
|
|
2296
2295
|
num: "num";
|
|
2296
|
+
percent: "percent";
|
|
2297
2297
|
max: "max";
|
|
2298
2298
|
min: "min";
|
|
2299
2299
|
percentile: "percentile";
|
|
@@ -2339,8 +2339,8 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
2339
2339
|
min: z.ZodObject<{
|
|
2340
2340
|
type: z.ZodEnum<{
|
|
2341
2341
|
formula: "formula";
|
|
2342
|
-
percent: "percent";
|
|
2343
2342
|
num: "num";
|
|
2343
|
+
percent: "percent";
|
|
2344
2344
|
max: "max";
|
|
2345
2345
|
min: "min";
|
|
2346
2346
|
percentile: "percentile";
|
|
@@ -2350,8 +2350,8 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
2350
2350
|
max: z.ZodObject<{
|
|
2351
2351
|
type: z.ZodEnum<{
|
|
2352
2352
|
formula: "formula";
|
|
2353
|
-
percent: "percent";
|
|
2354
2353
|
num: "num";
|
|
2354
|
+
percent: "percent";
|
|
2355
2355
|
max: "max";
|
|
2356
2356
|
min: "min";
|
|
2357
2357
|
percentile: "percentile";
|
|
@@ -2398,8 +2398,8 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
2398
2398
|
thresholds: z.ZodArray<z.ZodObject<{
|
|
2399
2399
|
type: z.ZodEnum<{
|
|
2400
2400
|
formula: "formula";
|
|
2401
|
-
percent: "percent";
|
|
2402
2401
|
num: "num";
|
|
2402
|
+
percent: "percent";
|
|
2403
2403
|
max: "max";
|
|
2404
2404
|
min: "min";
|
|
2405
2405
|
percentile: "percentile";
|
|
@@ -2478,9 +2478,9 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
2478
2478
|
symbol: z.ZodString;
|
|
2479
2479
|
name: z.ZodOptional<z.ZodString>;
|
|
2480
2480
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
2481
|
+
time: "time";
|
|
2481
2482
|
length: "length";
|
|
2482
2483
|
mass: "mass";
|
|
2483
|
-
time: "time";
|
|
2484
2484
|
electricCurrent: "electricCurrent";
|
|
2485
2485
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
2486
2486
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -3208,9 +3208,9 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
3208
3208
|
symbol: z.ZodString;
|
|
3209
3209
|
name: z.ZodOptional<z.ZodString>;
|
|
3210
3210
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
3211
|
+
time: "time";
|
|
3211
3212
|
length: "length";
|
|
3212
3213
|
mass: "mass";
|
|
3213
|
-
time: "time";
|
|
3214
3214
|
electricCurrent: "electricCurrent";
|
|
3215
3215
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
3216
3216
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -3336,9 +3336,9 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
3336
3336
|
symbol: z.ZodString;
|
|
3337
3337
|
name: z.ZodOptional<z.ZodString>;
|
|
3338
3338
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
3339
|
+
time: "time";
|
|
3339
3340
|
length: "length";
|
|
3340
3341
|
mass: "mass";
|
|
3341
|
-
time: "time";
|
|
3342
3342
|
electricCurrent: "electricCurrent";
|
|
3343
3343
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
3344
3344
|
amountOfSubstance: "amountOfSubstance";
|
package/dist/codec.d.ts
CHANGED
|
@@ -27,8 +27,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
27
27
|
checked: z.ZodOptional<z.ZodBoolean>;
|
|
28
28
|
itemId: z.ZodOptional<z.ZodString>;
|
|
29
29
|
format: z.ZodOptional<z.ZodEnum<{
|
|
30
|
-
bullet: "bullet";
|
|
31
30
|
decimal: "decimal";
|
|
31
|
+
bullet: "bullet";
|
|
32
32
|
lowerLetter: "lowerLetter";
|
|
33
33
|
upperLetter: "upperLetter";
|
|
34
34
|
lowerRoman: "lowerRoman";
|
|
@@ -103,9 +103,9 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
103
103
|
symbol: z.ZodString;
|
|
104
104
|
name: z.ZodOptional<z.ZodString>;
|
|
105
105
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
106
|
+
time: "time";
|
|
106
107
|
length: "length";
|
|
107
108
|
mass: "mass";
|
|
108
|
-
time: "time";
|
|
109
109
|
electricCurrent: "electricCurrent";
|
|
110
110
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
111
111
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -182,8 +182,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
182
182
|
checked: z.ZodOptional<z.ZodBoolean>;
|
|
183
183
|
itemId: z.ZodOptional<z.ZodString>;
|
|
184
184
|
format: z.ZodOptional<z.ZodEnum<{
|
|
185
|
-
bullet: "bullet";
|
|
186
185
|
decimal: "decimal";
|
|
186
|
+
bullet: "bullet";
|
|
187
187
|
lowerLetter: "lowerLetter";
|
|
188
188
|
upperLetter: "upperLetter";
|
|
189
189
|
lowerRoman: "lowerRoman";
|
|
@@ -258,9 +258,9 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
258
258
|
symbol: z.ZodString;
|
|
259
259
|
name: z.ZodOptional<z.ZodString>;
|
|
260
260
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
261
|
+
time: "time";
|
|
261
262
|
length: "length";
|
|
262
263
|
mass: "mass";
|
|
263
|
-
time: "time";
|
|
264
264
|
electricCurrent: "electricCurrent";
|
|
265
265
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
266
266
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -342,8 +342,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
342
342
|
checked: z.ZodOptional<z.ZodBoolean>;
|
|
343
343
|
itemId: z.ZodOptional<z.ZodString>;
|
|
344
344
|
format: z.ZodOptional<z.ZodEnum<{
|
|
345
|
-
bullet: "bullet";
|
|
346
345
|
decimal: "decimal";
|
|
346
|
+
bullet: "bullet";
|
|
347
347
|
lowerLetter: "lowerLetter";
|
|
348
348
|
upperLetter: "upperLetter";
|
|
349
349
|
lowerRoman: "lowerRoman";
|
|
@@ -418,9 +418,9 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
418
418
|
symbol: z.ZodString;
|
|
419
419
|
name: z.ZodOptional<z.ZodString>;
|
|
420
420
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
421
|
+
time: "time";
|
|
421
422
|
length: "length";
|
|
422
423
|
mass: "mass";
|
|
423
|
-
time: "time";
|
|
424
424
|
electricCurrent: "electricCurrent";
|
|
425
425
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
426
426
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -497,8 +497,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
497
497
|
checked: z.ZodOptional<z.ZodBoolean>;
|
|
498
498
|
itemId: z.ZodOptional<z.ZodString>;
|
|
499
499
|
format: z.ZodOptional<z.ZodEnum<{
|
|
500
|
-
bullet: "bullet";
|
|
501
500
|
decimal: "decimal";
|
|
501
|
+
bullet: "bullet";
|
|
502
502
|
lowerLetter: "lowerLetter";
|
|
503
503
|
upperLetter: "upperLetter";
|
|
504
504
|
lowerRoman: "lowerRoman";
|
|
@@ -573,9 +573,9 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
573
573
|
symbol: z.ZodString;
|
|
574
574
|
name: z.ZodOptional<z.ZodString>;
|
|
575
575
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
576
|
+
time: "time";
|
|
576
577
|
length: "length";
|
|
577
578
|
mass: "mass";
|
|
578
|
-
time: "time";
|
|
579
579
|
electricCurrent: "electricCurrent";
|
|
580
580
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
581
581
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -711,8 +711,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
711
711
|
checked: z.ZodOptional<z.ZodBoolean>;
|
|
712
712
|
itemId: z.ZodOptional<z.ZodString>;
|
|
713
713
|
format: z.ZodOptional<z.ZodEnum<{
|
|
714
|
-
bullet: "bullet";
|
|
715
714
|
decimal: "decimal";
|
|
715
|
+
bullet: "bullet";
|
|
716
716
|
lowerLetter: "lowerLetter";
|
|
717
717
|
upperLetter: "upperLetter";
|
|
718
718
|
lowerRoman: "lowerRoman";
|
|
@@ -787,9 +787,9 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
787
787
|
symbol: z.ZodString;
|
|
788
788
|
name: z.ZodOptional<z.ZodString>;
|
|
789
789
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
790
|
+
time: "time";
|
|
790
791
|
length: "length";
|
|
791
792
|
mass: "mass";
|
|
792
|
-
time: "time";
|
|
793
793
|
electricCurrent: "electricCurrent";
|
|
794
794
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
795
795
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -937,9 +937,9 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
937
937
|
symbol: z.ZodString;
|
|
938
938
|
name: z.ZodOptional<z.ZodString>;
|
|
939
939
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
940
|
+
time: "time";
|
|
940
941
|
length: "length";
|
|
941
942
|
mass: "mass";
|
|
942
|
-
time: "time";
|
|
943
943
|
electricCurrent: "electricCurrent";
|
|
944
944
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
945
945
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -1133,9 +1133,9 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1133
1133
|
symbol: z.ZodString;
|
|
1134
1134
|
name: z.ZodOptional<z.ZodString>;
|
|
1135
1135
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
1136
|
+
time: "time";
|
|
1136
1137
|
length: "length";
|
|
1137
1138
|
mass: "mass";
|
|
1138
|
-
time: "time";
|
|
1139
1139
|
electricCurrent: "electricCurrent";
|
|
1140
1140
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
1141
1141
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -1648,6 +1648,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1648
1648
|
floatPosition: z.ZodOptional<z.ZodObject<{
|
|
1649
1649
|
horizontal: z.ZodUnion<readonly [z.ZodObject<{
|
|
1650
1650
|
relativeTo: z.ZodEnum<{
|
|
1651
|
+
column: "column";
|
|
1651
1652
|
page: "page";
|
|
1652
1653
|
margin: "margin";
|
|
1653
1654
|
leftMargin: "leftMargin";
|
|
@@ -1656,7 +1657,6 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1656
1657
|
bottomMargin: "bottomMargin";
|
|
1657
1658
|
insideMargin: "insideMargin";
|
|
1658
1659
|
outsideMargin: "outsideMargin";
|
|
1659
|
-
column: "column";
|
|
1660
1660
|
character: "character";
|
|
1661
1661
|
paragraph: "paragraph";
|
|
1662
1662
|
line: "line";
|
|
@@ -1665,6 +1665,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1665
1665
|
offsetPt: z.ZodNumber;
|
|
1666
1666
|
}, z.core.$strict>, z.ZodObject<{
|
|
1667
1667
|
relativeTo: z.ZodEnum<{
|
|
1668
|
+
column: "column";
|
|
1668
1669
|
page: "page";
|
|
1669
1670
|
margin: "margin";
|
|
1670
1671
|
leftMargin: "leftMargin";
|
|
@@ -1673,7 +1674,6 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1673
1674
|
bottomMargin: "bottomMargin";
|
|
1674
1675
|
insideMargin: "insideMargin";
|
|
1675
1676
|
outsideMargin: "outsideMargin";
|
|
1676
|
-
column: "column";
|
|
1677
1677
|
character: "character";
|
|
1678
1678
|
paragraph: "paragraph";
|
|
1679
1679
|
line: "line";
|
|
@@ -1691,6 +1691,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1691
1691
|
}, z.core.$strict>]>;
|
|
1692
1692
|
vertical: z.ZodUnion<readonly [z.ZodObject<{
|
|
1693
1693
|
relativeTo: z.ZodEnum<{
|
|
1694
|
+
column: "column";
|
|
1694
1695
|
page: "page";
|
|
1695
1696
|
margin: "margin";
|
|
1696
1697
|
leftMargin: "leftMargin";
|
|
@@ -1699,7 +1700,6 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1699
1700
|
bottomMargin: "bottomMargin";
|
|
1700
1701
|
insideMargin: "insideMargin";
|
|
1701
1702
|
outsideMargin: "outsideMargin";
|
|
1702
|
-
column: "column";
|
|
1703
1703
|
character: "character";
|
|
1704
1704
|
paragraph: "paragraph";
|
|
1705
1705
|
line: "line";
|
|
@@ -1708,6 +1708,7 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1708
1708
|
offsetPt: z.ZodNumber;
|
|
1709
1709
|
}, z.core.$strict>, z.ZodObject<{
|
|
1710
1710
|
relativeTo: z.ZodEnum<{
|
|
1711
|
+
column: "column";
|
|
1711
1712
|
page: "page";
|
|
1712
1713
|
margin: "margin";
|
|
1713
1714
|
leftMargin: "leftMargin";
|
|
@@ -1716,7 +1717,6 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1716
1717
|
bottomMargin: "bottomMargin";
|
|
1717
1718
|
insideMargin: "insideMargin";
|
|
1718
1719
|
outsideMargin: "outsideMargin";
|
|
1719
|
-
column: "column";
|
|
1720
1720
|
character: "character";
|
|
1721
1721
|
paragraph: "paragraph";
|
|
1722
1722
|
line: "line";
|
|
@@ -1819,9 +1819,9 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1819
1819
|
date: "date";
|
|
1820
1820
|
custom: "custom";
|
|
1821
1821
|
time: "time";
|
|
1822
|
+
whole: "whole";
|
|
1822
1823
|
decimal: "decimal";
|
|
1823
1824
|
list: "list";
|
|
1824
|
-
whole: "whole";
|
|
1825
1825
|
textLength: "textLength";
|
|
1826
1826
|
}>;
|
|
1827
1827
|
operator: z.ZodOptional<z.ZodEnum<{
|
|
@@ -2292,8 +2292,8 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
2292
2292
|
value: z.ZodObject<{
|
|
2293
2293
|
type: z.ZodEnum<{
|
|
2294
2294
|
formula: "formula";
|
|
2295
|
-
percent: "percent";
|
|
2296
2295
|
num: "num";
|
|
2296
|
+
percent: "percent";
|
|
2297
2297
|
max: "max";
|
|
2298
2298
|
min: "min";
|
|
2299
2299
|
percentile: "percentile";
|
|
@@ -2339,8 +2339,8 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
2339
2339
|
min: z.ZodObject<{
|
|
2340
2340
|
type: z.ZodEnum<{
|
|
2341
2341
|
formula: "formula";
|
|
2342
|
-
percent: "percent";
|
|
2343
2342
|
num: "num";
|
|
2343
|
+
percent: "percent";
|
|
2344
2344
|
max: "max";
|
|
2345
2345
|
min: "min";
|
|
2346
2346
|
percentile: "percentile";
|
|
@@ -2350,8 +2350,8 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
2350
2350
|
max: z.ZodObject<{
|
|
2351
2351
|
type: z.ZodEnum<{
|
|
2352
2352
|
formula: "formula";
|
|
2353
|
-
percent: "percent";
|
|
2354
2353
|
num: "num";
|
|
2354
|
+
percent: "percent";
|
|
2355
2355
|
max: "max";
|
|
2356
2356
|
min: "min";
|
|
2357
2357
|
percentile: "percentile";
|
|
@@ -2398,8 +2398,8 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
2398
2398
|
thresholds: z.ZodArray<z.ZodObject<{
|
|
2399
2399
|
type: z.ZodEnum<{
|
|
2400
2400
|
formula: "formula";
|
|
2401
|
-
percent: "percent";
|
|
2402
2401
|
num: "num";
|
|
2402
|
+
percent: "percent";
|
|
2403
2403
|
max: "max";
|
|
2404
2404
|
min: "min";
|
|
2405
2405
|
percentile: "percentile";
|
|
@@ -2478,9 +2478,9 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
2478
2478
|
symbol: z.ZodString;
|
|
2479
2479
|
name: z.ZodOptional<z.ZodString>;
|
|
2480
2480
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
2481
|
+
time: "time";
|
|
2481
2482
|
length: "length";
|
|
2482
2483
|
mass: "mass";
|
|
2483
|
-
time: "time";
|
|
2484
2484
|
electricCurrent: "electricCurrent";
|
|
2485
2485
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
2486
2486
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -3208,9 +3208,9 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
3208
3208
|
symbol: z.ZodString;
|
|
3209
3209
|
name: z.ZodOptional<z.ZodString>;
|
|
3210
3210
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
3211
|
+
time: "time";
|
|
3211
3212
|
length: "length";
|
|
3212
3213
|
mass: "mass";
|
|
3213
|
-
time: "time";
|
|
3214
3214
|
electricCurrent: "electricCurrent";
|
|
3215
3215
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
3216
3216
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -3336,9 +3336,9 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
3336
3336
|
symbol: z.ZodString;
|
|
3337
3337
|
name: z.ZodOptional<z.ZodString>;
|
|
3338
3338
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
3339
|
+
time: "time";
|
|
3339
3340
|
length: "length";
|
|
3340
3341
|
mass: "mass";
|
|
3341
|
-
time: "time";
|
|
3342
3342
|
electricCurrent: "electricCurrent";
|
|
3343
3343
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
3344
3344
|
amountOfSubstance: "amountOfSubstance";
|
package/dist/emit/html-table.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_diagnostics_diagnostics = require("../diagnostics/diagnostics.cjs");
|
|
3
|
-
require("../shared/style-constants.cjs");
|
|
3
|
+
const require_shared_style_constants = require("../shared/style-constants.cjs");
|
|
4
4
|
let document_schema_js = require("document-schema.js");
|
|
5
5
|
//#region src/emit/html-table.ts
|
|
6
6
|
function escapeHtmlText(text) {
|
|
@@ -21,6 +21,10 @@ function tableNeedsHtmlFallback(table) {
|
|
|
21
21
|
function emitRunHtml(run) {
|
|
22
22
|
let text = escapeHtmlText(run.text);
|
|
23
23
|
if (run.fontFamily === "Courier New") text = `<code>${text}</code>`;
|
|
24
|
+
if (run.verticalAlign !== void 0) {
|
|
25
|
+
const tag = require_shared_style_constants.VERTICAL_ALIGN_TAG[run.verticalAlign];
|
|
26
|
+
text = `<${tag}>${text}</${tag}>`;
|
|
27
|
+
}
|
|
24
28
|
if (run.strike === true) text = `<del>${text}</del>`;
|
|
25
29
|
if (run.italic === true) text = `<em>${text}</em>`;
|
|
26
30
|
if (run.bold === true) text = `<strong>${text}</strong>`;
|
package/dist/emit/html-table.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MarkdownDiagnosticCodes, MarkdownTableGridFaultError } from "../diagnostics/diagnostics.js";
|
|
2
|
-
import "../shared/style-constants.js";
|
|
2
|
+
import { VERTICAL_ALIGN_TAG } from "../shared/style-constants.js";
|
|
3
3
|
import { colorToRgbHex, findTableGridFault, walkTableGrid } from "document-schema.js";
|
|
4
4
|
//#region src/emit/html-table.ts
|
|
5
5
|
function escapeHtmlText(text) {
|
|
@@ -20,6 +20,10 @@ function tableNeedsHtmlFallback(table) {
|
|
|
20
20
|
function emitRunHtml(run) {
|
|
21
21
|
let text = escapeHtmlText(run.text);
|
|
22
22
|
if (run.fontFamily === "Courier New") text = `<code>${text}</code>`;
|
|
23
|
+
if (run.verticalAlign !== void 0) {
|
|
24
|
+
const tag = VERTICAL_ALIGN_TAG[run.verticalAlign];
|
|
25
|
+
text = `<${tag}>${text}</${tag}>`;
|
|
26
|
+
}
|
|
23
27
|
if (run.strike === true) text = `<del>${text}</del>`;
|
|
24
28
|
if (run.italic === true) text = `<em>${text}</em>`;
|
|
25
29
|
if (run.bold === true) text = `<strong>${text}</strong>`;
|
package/dist/html/html-table.cjs
CHANGED
|
@@ -85,7 +85,7 @@ function readTextAlign(attrs) {
|
|
|
85
85
|
function unescapeHtml(text) {
|
|
86
86
|
return text.replaceAll("<", "<").replaceAll(">", ">").replaceAll(""", "\"").replaceAll("'", "'").replaceAll("&", "&");
|
|
87
87
|
}
|
|
88
|
-
const INLINE_TAG_PATTERN = /<(a|strong|b|em|i|del|s|strike|code)\b([^>]*)>/i;
|
|
88
|
+
const INLINE_TAG_PATTERN = /<(a|strong|b|em|i|del|s|strike|code|sup|sub)\b([^>]*)>/i;
|
|
89
89
|
function applyTagStyle(style, tagName, attrs) {
|
|
90
90
|
switch (tagName) {
|
|
91
91
|
case "strong":
|
|
@@ -108,6 +108,14 @@ function applyTagStyle(style, tagName, attrs) {
|
|
|
108
108
|
...style,
|
|
109
109
|
fontFamily: require_shared_style_constants.MONOSPACE_FONT_FAMILY
|
|
110
110
|
};
|
|
111
|
+
case "sup": return {
|
|
112
|
+
...style,
|
|
113
|
+
verticalAlign: "superscript"
|
|
114
|
+
};
|
|
115
|
+
case "sub": return {
|
|
116
|
+
...style,
|
|
117
|
+
verticalAlign: "subscript"
|
|
118
|
+
};
|
|
111
119
|
case "a": {
|
|
112
120
|
const href = readAttr(attrs, "href");
|
|
113
121
|
return href === void 0 ? style : {
|
package/dist/html/html-table.js
CHANGED
|
@@ -84,7 +84,7 @@ function readTextAlign(attrs) {
|
|
|
84
84
|
function unescapeHtml(text) {
|
|
85
85
|
return text.replaceAll("<", "<").replaceAll(">", ">").replaceAll(""", "\"").replaceAll("'", "'").replaceAll("&", "&");
|
|
86
86
|
}
|
|
87
|
-
const INLINE_TAG_PATTERN = /<(a|strong|b|em|i|del|s|strike|code)\b([^>]*)>/i;
|
|
87
|
+
const INLINE_TAG_PATTERN = /<(a|strong|b|em|i|del|s|strike|code|sup|sub)\b([^>]*)>/i;
|
|
88
88
|
function applyTagStyle(style, tagName, attrs) {
|
|
89
89
|
switch (tagName) {
|
|
90
90
|
case "strong":
|
|
@@ -107,6 +107,14 @@ function applyTagStyle(style, tagName, attrs) {
|
|
|
107
107
|
...style,
|
|
108
108
|
fontFamily: MONOSPACE_FONT_FAMILY
|
|
109
109
|
};
|
|
110
|
+
case "sup": return {
|
|
111
|
+
...style,
|
|
112
|
+
verticalAlign: "superscript"
|
|
113
|
+
};
|
|
114
|
+
case "sub": return {
|
|
115
|
+
...style,
|
|
116
|
+
verticalAlign: "subscript"
|
|
117
|
+
};
|
|
110
118
|
case "a": {
|
|
111
119
|
const href = readAttr(attrs, "href");
|
|
112
120
|
return href === void 0 ? style : {
|