markdown-codec 0.0.0 → 1.0.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.
Files changed (171) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +215 -0
  3. package/dist/ast/ast.cjs +25 -0
  4. package/dist/ast/ast.d.cts +2 -0
  5. package/dist/ast/ast.d.ts +2 -0
  6. package/dist/ast/ast.js +23 -0
  7. package/dist/ast-BXYwy08e.d.cts +160 -0
  8. package/dist/ast-BXYwy08e.d.ts +160 -0
  9. package/dist/block/block.cjs +530 -0
  10. package/dist/block/block.d.cts +18 -0
  11. package/dist/block/block.d.ts +18 -0
  12. package/dist/block/block.js +529 -0
  13. package/dist/block/definitions.cjs +59 -0
  14. package/dist/block/definitions.d.cts +6 -0
  15. package/dist/block/definitions.d.ts +6 -0
  16. package/dist/block/definitions.js +58 -0
  17. package/dist/block/line.cjs +76 -0
  18. package/dist/block/line.d.cts +28 -0
  19. package/dist/block/line.d.ts +28 -0
  20. package/dist/block/line.js +74 -0
  21. package/dist/block/list.cjs +110 -0
  22. package/dist/block/list.d.cts +8 -0
  23. package/dist/block/list.d.ts +8 -0
  24. package/dist/block/list.js +107 -0
  25. package/dist/block/node.cjs +68 -0
  26. package/dist/block/node.d.cts +45 -0
  27. package/dist/block/node.d.ts +45 -0
  28. package/dist/block/node.js +65 -0
  29. package/dist/block/table.cjs +64 -0
  30. package/dist/block/table.d.cts +7 -0
  31. package/dist/block/table.d.ts +7 -0
  32. package/dist/block/table.js +61 -0
  33. package/dist/codec.cjs +22 -0
  34. package/dist/codec.d.cts +492 -0
  35. package/dist/codec.d.ts +492 -0
  36. package/dist/codec.js +20 -0
  37. package/dist/defaults/defaults.cjs +31 -0
  38. package/dist/defaults/defaults.d.cts +16 -0
  39. package/dist/defaults/defaults.d.ts +16 -0
  40. package/dist/defaults/defaults.js +20 -0
  41. package/dist/diagnostics/diagnostics.cjs +85 -0
  42. package/dist/diagnostics/diagnostics.d.cts +2 -0
  43. package/dist/diagnostics/diagnostics.d.ts +2 -0
  44. package/dist/diagnostics/diagnostics.js +77 -0
  45. package/dist/diagnostics-DmuWc7d8.d.cts +61 -0
  46. package/dist/diagnostics-DmuWc7d8.d.ts +61 -0
  47. package/dist/emit/emit.cjs +228 -0
  48. package/dist/emit/emit.d.cts +6 -0
  49. package/dist/emit/emit.d.ts +6 -0
  50. package/dist/emit/emit.js +227 -0
  51. package/dist/emit/front-matter.cjs +24 -0
  52. package/dist/emit/front-matter.d.cts +5 -0
  53. package/dist/emit/front-matter.d.ts +5 -0
  54. package/dist/emit/front-matter.js +23 -0
  55. package/dist/emit/image.cjs +10 -0
  56. package/dist/emit/image.d.cts +5 -0
  57. package/dist/emit/image.d.ts +5 -0
  58. package/dist/emit/image.js +9 -0
  59. package/dist/emit/inline.cjs +183 -0
  60. package/dist/emit/inline.d.cts +12 -0
  61. package/dist/emit/inline.d.ts +12 -0
  62. package/dist/emit/inline.js +180 -0
  63. package/dist/emit/table.cjs +73 -0
  64. package/dist/emit/table.d.cts +10 -0
  65. package/dist/emit/table.d.ts +10 -0
  66. package/dist/emit/table.js +72 -0
  67. package/dist/html/html.cjs +116 -0
  68. package/dist/html/html.d.cts +2 -0
  69. package/dist/html/html.d.ts +2 -0
  70. package/dist/html/html.js +113 -0
  71. package/dist/html/render.cjs +193 -0
  72. package/dist/html/render.d.cts +8 -0
  73. package/dist/html/render.d.ts +8 -0
  74. package/dist/html/render.js +189 -0
  75. package/dist/html-bkz2QTuq.d.cts +7 -0
  76. package/dist/html-bkz2QTuq.d.ts +7 -0
  77. package/dist/image/image.cjs +129 -0
  78. package/dist/image/image.d.cts +2 -0
  79. package/dist/image/image.d.ts +2 -0
  80. package/dist/image/image.js +125 -0
  81. package/dist/image-C4KYmz_L.d.cts +19 -0
  82. package/dist/image-Cm3hT5PS.d.ts +19 -0
  83. package/dist/image-DescdRgq.d.cts +12 -0
  84. package/dist/image-DescdRgq.d.ts +12 -0
  85. package/dist/index.cjs +17 -0
  86. package/dist/index.d.cts +7 -0
  87. package/dist/index.d.ts +7 -0
  88. package/dist/index.js +5 -0
  89. package/dist/inline/chars.cjs +50 -0
  90. package/dist/inline/chars.d.cts +11 -0
  91. package/dist/inline/chars.d.ts +11 -0
  92. package/dist/inline/chars.js +42 -0
  93. package/dist/inline/delimiter.cjs +136 -0
  94. package/dist/inline/delimiter.d.cts +29 -0
  95. package/dist/inline/delimiter.d.ts +29 -0
  96. package/dist/inline/delimiter.js +132 -0
  97. package/dist/inline/entity.cjs +67 -0
  98. package/dist/inline/entity.d.cts +9 -0
  99. package/dist/inline/entity.d.ts +9 -0
  100. package/dist/inline/entity.js +65 -0
  101. package/dist/inline/gfm-autolink.cjs +156 -0
  102. package/dist/inline/gfm-autolink.d.cts +5 -0
  103. package/dist/inline/gfm-autolink.d.ts +5 -0
  104. package/dist/inline/gfm-autolink.js +155 -0
  105. package/dist/inline/inline.cjs +457 -0
  106. package/dist/inline/inline.d.cts +2 -0
  107. package/dist/inline/inline.d.ts +2 -0
  108. package/dist/inline/inline.js +456 -0
  109. package/dist/inline/link.cjs +130 -0
  110. package/dist/inline/link.d.cts +2 -0
  111. package/dist/inline/link.d.ts +2 -0
  112. package/dist/inline/link.js +124 -0
  113. package/dist/inline/node.cjs +57 -0
  114. package/dist/inline/node.d.cts +23 -0
  115. package/dist/inline/node.d.ts +23 -0
  116. package/dist/inline/node.js +55 -0
  117. package/dist/inline-B50cM6cn.d.ts +10 -0
  118. package/dist/inline-C9YEGDV5.d.cts +10 -0
  119. package/dist/link-Dv4kxVjk.d.cts +18 -0
  120. package/dist/link-Dv4kxVjk.d.ts +18 -0
  121. package/dist/lower/front-matter.cjs +75 -0
  122. package/dist/lower/front-matter.d.cts +10 -0
  123. package/dist/lower/front-matter.d.ts +10 -0
  124. package/dist/lower/front-matter.js +74 -0
  125. package/dist/lower/image.cjs +29 -0
  126. package/dist/lower/image.d.cts +2 -0
  127. package/dist/lower/image.d.ts +2 -0
  128. package/dist/lower/image.js +28 -0
  129. package/dist/lower/inline.cjs +96 -0
  130. package/dist/lower/inline.d.cts +19 -0
  131. package/dist/lower/inline.d.ts +19 -0
  132. package/dist/lower/inline.js +93 -0
  133. package/dist/lower/lower.cjs +293 -0
  134. package/dist/lower/lower.d.cts +8 -0
  135. package/dist/lower/lower.d.ts +8 -0
  136. package/dist/lower/lower.js +291 -0
  137. package/dist/lower/table.cjs +27 -0
  138. package/dist/lower/table.d.cts +7 -0
  139. package/dist/lower/table.d.ts +7 -0
  140. package/dist/lower/table.js +26 -0
  141. package/dist/options/options.cjs +0 -0
  142. package/dist/options/options.d.cts +43 -0
  143. package/dist/options/options.d.ts +43 -0
  144. package/dist/options/options.js +0 -0
  145. package/dist/read.cjs +20 -0
  146. package/dist/read.d.cts +11 -0
  147. package/dist/read.d.ts +11 -0
  148. package/dist/read.js +19 -0
  149. package/dist/scan/entity-table.cjs +2131 -0
  150. package/dist/scan/entity-table.d.cts +4 -0
  151. package/dist/scan/entity-table.d.ts +4 -0
  152. package/dist/scan/entity-table.js +2130 -0
  153. package/dist/scan/scan.cjs +80 -0
  154. package/dist/scan/scan.d.cts +2 -0
  155. package/dist/scan/scan.d.ts +2 -0
  156. package/dist/scan/scan.js +78 -0
  157. package/dist/scan-DeBxgG-r.d.cts +30 -0
  158. package/dist/scan-DeBxgG-r.d.ts +30 -0
  159. package/dist/shared/list-id.cjs +36 -0
  160. package/dist/shared/list-id.d.cts +22 -0
  161. package/dist/shared/list-id.d.ts +22 -0
  162. package/dist/shared/list-id.js +32 -0
  163. package/dist/shared/style-constants.cjs +34 -0
  164. package/dist/shared/style-constants.d.cts +14 -0
  165. package/dist/shared/style-constants.d.ts +14 -0
  166. package/dist/shared/style-constants.js +23 -0
  167. package/dist/write.cjs +9 -0
  168. package/dist/write.d.cts +6 -0
  169. package/dist/write.d.ts +6 -0
  170. package/dist/write.js +8 -0
  171. package/package.json +92 -2
@@ -0,0 +1,64 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/block/table.ts
3
+ const DELIMITER_CELL_PATTERN = /^:?-+:?$/;
4
+ function splitTableRow(line) {
5
+ let text = line.trim();
6
+ if (text.startsWith("|")) text = text.slice(1);
7
+ if (endsWithUnescapedPipe(text)) text = text.slice(0, -1);
8
+ const cells = [];
9
+ let current = "";
10
+ let index = 0;
11
+ while (index < text.length) {
12
+ const char = text.charAt(index);
13
+ if (char === "\\" && index + 1 < text.length) {
14
+ const escaped = text.charAt(index + 1);
15
+ current += escaped === "|" ? escaped : char + escaped;
16
+ index += 2;
17
+ continue;
18
+ }
19
+ if (char === "|") {
20
+ cells.push(current.trim());
21
+ current = "";
22
+ index += 1;
23
+ continue;
24
+ }
25
+ current += char;
26
+ index += 1;
27
+ }
28
+ cells.push(current.trim());
29
+ return cells;
30
+ }
31
+ function endsWithUnescapedPipe(text) {
32
+ if (!text.endsWith("|")) return false;
33
+ let backslashes = 0;
34
+ while (backslashes + 1 < text.length && text.charAt(text.length - 2 - backslashes) === "\\") backslashes += 1;
35
+ return backslashes % 2 === 0;
36
+ }
37
+ function alignmentOf(cell) {
38
+ const left = cell.startsWith(":");
39
+ const right = cell.endsWith(":");
40
+ if (left && right) return "center";
41
+ if (left) return "left";
42
+ if (right) return "right";
43
+ return "none";
44
+ }
45
+ function parseTableDelimiterRow(line) {
46
+ if (!line.includes("|")) return;
47
+ const cells = splitTableRow(line);
48
+ if (cells.length === 0) return;
49
+ const alignments = [];
50
+ for (const cell of cells) {
51
+ if (!DELIMITER_CELL_PATTERN.test(cell)) return;
52
+ alignments.push(alignmentOf(cell));
53
+ }
54
+ return alignments;
55
+ }
56
+ function fitRowToColumns(cells, columnCount) {
57
+ const fitted = cells.slice(0, columnCount);
58
+ while (fitted.length < columnCount) fitted.push("");
59
+ return fitted;
60
+ }
61
+ //#endregion
62
+ exports.fitRowToColumns = fitRowToColumns;
63
+ exports.parseTableDelimiterRow = parseTableDelimiterRow;
64
+ exports.splitTableRow = splitTableRow;
@@ -0,0 +1,7 @@
1
+ import { k as MarkdownTableAlignment } from "../ast-BXYwy08e.cjs";
2
+ //#region src/block/table.d.ts
3
+ declare function splitTableRow(line: string): string[];
4
+ declare function parseTableDelimiterRow(line: string): MarkdownTableAlignment[] | undefined;
5
+ declare function fitRowToColumns(cells: readonly string[], columnCount: number): string[];
6
+ //#endregion
7
+ export { fitRowToColumns, parseTableDelimiterRow, splitTableRow };
@@ -0,0 +1,7 @@
1
+ import { k as MarkdownTableAlignment } from "../ast-BXYwy08e.js";
2
+ //#region src/block/table.d.ts
3
+ declare function splitTableRow(line: string): string[];
4
+ declare function parseTableDelimiterRow(line: string): MarkdownTableAlignment[] | undefined;
5
+ declare function fitRowToColumns(cells: readonly string[], columnCount: number): string[];
6
+ //#endregion
7
+ export { fitRowToColumns, parseTableDelimiterRow, splitTableRow };
@@ -0,0 +1,61 @@
1
+ //#region src/block/table.ts
2
+ const DELIMITER_CELL_PATTERN = /^:?-+:?$/;
3
+ function splitTableRow(line) {
4
+ let text = line.trim();
5
+ if (text.startsWith("|")) text = text.slice(1);
6
+ if (endsWithUnescapedPipe(text)) text = text.slice(0, -1);
7
+ const cells = [];
8
+ let current = "";
9
+ let index = 0;
10
+ while (index < text.length) {
11
+ const char = text.charAt(index);
12
+ if (char === "\\" && index + 1 < text.length) {
13
+ const escaped = text.charAt(index + 1);
14
+ current += escaped === "|" ? escaped : char + escaped;
15
+ index += 2;
16
+ continue;
17
+ }
18
+ if (char === "|") {
19
+ cells.push(current.trim());
20
+ current = "";
21
+ index += 1;
22
+ continue;
23
+ }
24
+ current += char;
25
+ index += 1;
26
+ }
27
+ cells.push(current.trim());
28
+ return cells;
29
+ }
30
+ function endsWithUnescapedPipe(text) {
31
+ if (!text.endsWith("|")) return false;
32
+ let backslashes = 0;
33
+ while (backslashes + 1 < text.length && text.charAt(text.length - 2 - backslashes) === "\\") backslashes += 1;
34
+ return backslashes % 2 === 0;
35
+ }
36
+ function alignmentOf(cell) {
37
+ const left = cell.startsWith(":");
38
+ const right = cell.endsWith(":");
39
+ if (left && right) return "center";
40
+ if (left) return "left";
41
+ if (right) return "right";
42
+ return "none";
43
+ }
44
+ function parseTableDelimiterRow(line) {
45
+ if (!line.includes("|")) return;
46
+ const cells = splitTableRow(line);
47
+ if (cells.length === 0) return;
48
+ const alignments = [];
49
+ for (const cell of cells) {
50
+ if (!DELIMITER_CELL_PATTERN.test(cell)) return;
51
+ alignments.push(alignmentOf(cell));
52
+ }
53
+ return alignments;
54
+ }
55
+ function fitRowToColumns(cells, columnCount) {
56
+ const fitted = cells.slice(0, columnCount);
57
+ while (fitted.length < columnCount) fitted.push("");
58
+ return fitted;
59
+ }
60
+ //#endregion
61
+ export { fitRowToColumns, parseTableDelimiterRow, splitTableRow };
package/dist/codec.cjs ADDED
@@ -0,0 +1,22 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_read = require("./read.cjs");
3
+ const require_write = require("./write.cjs");
4
+ let zod = require("zod");
5
+ let document_schema_js = require("document-schema.js");
6
+ //#region src/codec.ts
7
+ function isWellFormedUtf8Text(bytes) {
8
+ try {
9
+ new TextDecoder("utf-8", { fatal: true }).decode(bytes);
10
+ return true;
11
+ } catch {
12
+ return false;
13
+ }
14
+ }
15
+ const MarkdownBytesSchema = zod.z.instanceof(Uint8Array).refine(isWellFormedUtf8Text, { message: "not well-formed UTF-8 text" });
16
+ const markdownCodec = zod.z.codec(MarkdownBytesSchema, document_schema_js.ContentDocumentSchema, {
17
+ decode: (bytes) => require_read.readMarkdown(new TextDecoder().decode(bytes)).document,
18
+ encode: (document) => new TextEncoder().encode(require_write.writeMarkdown(document))
19
+ });
20
+ //#endregion
21
+ exports.MarkdownBytesSchema = MarkdownBytesSchema;
22
+ exports.markdownCodec = markdownCodec;
@@ -0,0 +1,492 @@
1
+ import { z } from "zod";
2
+ //#region src/codec.d.ts
3
+ declare const MarkdownBytesSchema: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
4
+ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodDiscriminatedUnion<[z.ZodObject<{
5
+ kind: z.ZodLiteral<"wordprocessing">;
6
+ formatVersion: z.ZodLiteral<2>;
7
+ metadata: z.ZodObject<{
8
+ title: z.ZodOptional<z.ZodString>;
9
+ author: z.ZodOptional<z.ZodString>;
10
+ subject: z.ZodOptional<z.ZodString>;
11
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
12
+ creator: z.ZodOptional<z.ZodString>;
13
+ producer: z.ZodOptional<z.ZodString>;
14
+ createdIso: z.ZodOptional<z.ZodString>;
15
+ modifiedIso: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ sections: z.ZodArray<z.ZodObject<{
18
+ pageSize: z.ZodObject<{
19
+ widthPt: z.ZodNumber;
20
+ heightPt: z.ZodNumber;
21
+ }, z.core.$strip>;
22
+ margins: z.ZodObject<{
23
+ topPt: z.ZodNumber;
24
+ rightPt: z.ZodNumber;
25
+ bottomPt: z.ZodNumber;
26
+ leftPt: z.ZodNumber;
27
+ }, z.core.$strip>;
28
+ blocks: z.ZodArray<z.ZodCustom<import("document-schema.js").ContentBlock, import("document-schema.js").ContentBlock>>;
29
+ }, z.core.$strip>>;
30
+ }, z.core.$strip>, z.ZodObject<{
31
+ kind: z.ZodLiteral<"presentation">;
32
+ formatVersion: z.ZodLiteral<2>;
33
+ metadata: z.ZodObject<{
34
+ title: z.ZodOptional<z.ZodString>;
35
+ author: z.ZodOptional<z.ZodString>;
36
+ subject: z.ZodOptional<z.ZodString>;
37
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
38
+ creator: z.ZodOptional<z.ZodString>;
39
+ producer: z.ZodOptional<z.ZodString>;
40
+ createdIso: z.ZodOptional<z.ZodString>;
41
+ modifiedIso: z.ZodOptional<z.ZodString>;
42
+ }, z.core.$strip>;
43
+ slides: z.ZodArray<z.ZodObject<{
44
+ size: z.ZodObject<{
45
+ widthPt: z.ZodNumber;
46
+ heightPt: z.ZodNumber;
47
+ }, z.core.$strip>;
48
+ shapes: z.ZodArray<z.ZodObject<{
49
+ name: z.ZodOptional<z.ZodString>;
50
+ frame: z.ZodObject<{
51
+ xPt: z.ZodNumber;
52
+ yPt: z.ZodNumber;
53
+ widthPt: z.ZodNumber;
54
+ heightPt: z.ZodNumber;
55
+ }, z.core.$strip>;
56
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
57
+ insetLeftPt: z.ZodNumber;
58
+ insetTopPt: z.ZodNumber;
59
+ insetRightPt: z.ZodNumber;
60
+ insetBottomPt: z.ZodNumber;
61
+ fontScale: z.ZodOptional<z.ZodNumber>;
62
+ lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
63
+ paintOrder: z.ZodOptional<z.ZodNumber>;
64
+ sourcePath: z.ZodOptional<z.ZodString>;
65
+ blocks: z.ZodArray<z.ZodCustom<import("document-schema.js").ContentBlock, import("document-schema.js").ContentBlock>>;
66
+ }, z.core.$strip>>;
67
+ notes: z.ZodString;
68
+ }, z.core.$strip>>;
69
+ }, z.core.$strip>, z.ZodObject<{
70
+ kind: z.ZodLiteral<"spreadsheet">;
71
+ formatVersion: z.ZodLiteral<2>;
72
+ metadata: z.ZodObject<{
73
+ title: z.ZodOptional<z.ZodString>;
74
+ author: z.ZodOptional<z.ZodString>;
75
+ subject: z.ZodOptional<z.ZodString>;
76
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
77
+ creator: z.ZodOptional<z.ZodString>;
78
+ producer: z.ZodOptional<z.ZodString>;
79
+ createdIso: z.ZodOptional<z.ZodString>;
80
+ modifiedIso: z.ZodOptional<z.ZodString>;
81
+ }, z.core.$strip>;
82
+ sheets: z.ZodArray<z.ZodObject<{
83
+ name: z.ZodString;
84
+ cells: z.ZodArray<z.ZodObject<{
85
+ row: z.ZodNumber;
86
+ column: z.ZodNumber;
87
+ value: z.ZodDiscriminatedUnion<[z.ZodObject<{
88
+ kind: z.ZodLiteral<"number">;
89
+ value: z.ZodNumber;
90
+ exactValue: z.ZodOptional<z.ZodString>;
91
+ }, z.core.$strip>, z.ZodObject<{
92
+ kind: z.ZodLiteral<"percentage">;
93
+ value: z.ZodNumber;
94
+ exactValue: z.ZodOptional<z.ZodString>;
95
+ }, z.core.$strip>, z.ZodObject<{
96
+ kind: z.ZodLiteral<"currency">;
97
+ value: z.ZodNumber;
98
+ currency: z.ZodOptional<z.ZodString>;
99
+ exactValue: z.ZodOptional<z.ZodString>;
100
+ }, z.core.$strip>, z.ZodObject<{
101
+ kind: z.ZodLiteral<"boolean">;
102
+ value: z.ZodBoolean;
103
+ }, z.core.$strip>, z.ZodObject<{
104
+ kind: z.ZodLiteral<"date">;
105
+ value: z.ZodString;
106
+ }, z.core.$strip>, z.ZodObject<{
107
+ kind: z.ZodLiteral<"time">;
108
+ value: z.ZodString;
109
+ }, z.core.$strip>, z.ZodObject<{
110
+ kind: z.ZodLiteral<"dateTime">;
111
+ value: z.ZodString;
112
+ }, z.core.$strip>, z.ZodObject<{
113
+ kind: z.ZodLiteral<"string">;
114
+ value: z.ZodString;
115
+ }, z.core.$strip>, z.ZodObject<{
116
+ kind: z.ZodLiteral<"error">;
117
+ value: z.ZodString;
118
+ }, z.core.$strip>, z.ZodObject<{
119
+ kind: z.ZodLiteral<"empty">;
120
+ }, z.core.$strip>], "kind">;
121
+ formula: z.ZodOptional<z.ZodString>;
122
+ displayText: z.ZodString;
123
+ runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
124
+ text: z.ZodString;
125
+ bold: z.ZodOptional<z.ZodBoolean>;
126
+ italic: z.ZodOptional<z.ZodBoolean>;
127
+ underline: z.ZodOptional<z.ZodBoolean>;
128
+ strike: z.ZodOptional<z.ZodBoolean>;
129
+ fontFamily: z.ZodOptional<z.ZodString>;
130
+ sizePt: z.ZodOptional<z.ZodNumber>;
131
+ color: z.ZodOptional<z.ZodObject<{
132
+ r: z.ZodNumber;
133
+ g: z.ZodNumber;
134
+ b: z.ZodNumber;
135
+ }, z.core.$strip>>;
136
+ hyperlink: z.ZodOptional<z.ZodString>;
137
+ sourcePath: z.ZodOptional<z.ZodString>;
138
+ }, z.core.$strip>>>;
139
+ colSpan: z.ZodOptional<z.ZodNumber>;
140
+ rowSpan: z.ZodOptional<z.ZodNumber>;
141
+ background: z.ZodOptional<z.ZodObject<{
142
+ r: z.ZodNumber;
143
+ g: z.ZodNumber;
144
+ b: z.ZodNumber;
145
+ }, z.core.$strip>>;
146
+ borders: z.ZodOptional<z.ZodObject<{
147
+ left: z.ZodOptional<z.ZodObject<{
148
+ color: z.ZodObject<{
149
+ r: z.ZodNumber;
150
+ g: z.ZodNumber;
151
+ b: z.ZodNumber;
152
+ }, z.core.$strip>;
153
+ widthPt: z.ZodNumber;
154
+ style: z.ZodOptional<z.ZodEnum<{
155
+ solid: "solid";
156
+ dashed: "dashed";
157
+ dotted: "dotted";
158
+ double: "double";
159
+ }>>;
160
+ }, z.core.$strip>>;
161
+ right: z.ZodOptional<z.ZodObject<{
162
+ color: z.ZodObject<{
163
+ r: z.ZodNumber;
164
+ g: z.ZodNumber;
165
+ b: z.ZodNumber;
166
+ }, z.core.$strip>;
167
+ widthPt: z.ZodNumber;
168
+ style: z.ZodOptional<z.ZodEnum<{
169
+ solid: "solid";
170
+ dashed: "dashed";
171
+ dotted: "dotted";
172
+ double: "double";
173
+ }>>;
174
+ }, z.core.$strip>>;
175
+ top: z.ZodOptional<z.ZodObject<{
176
+ color: z.ZodObject<{
177
+ r: z.ZodNumber;
178
+ g: z.ZodNumber;
179
+ b: z.ZodNumber;
180
+ }, z.core.$strip>;
181
+ widthPt: z.ZodNumber;
182
+ style: z.ZodOptional<z.ZodEnum<{
183
+ solid: "solid";
184
+ dashed: "dashed";
185
+ dotted: "dotted";
186
+ double: "double";
187
+ }>>;
188
+ }, z.core.$strip>>;
189
+ bottom: z.ZodOptional<z.ZodObject<{
190
+ color: z.ZodObject<{
191
+ r: z.ZodNumber;
192
+ g: z.ZodNumber;
193
+ b: z.ZodNumber;
194
+ }, z.core.$strip>;
195
+ widthPt: z.ZodNumber;
196
+ style: z.ZodOptional<z.ZodEnum<{
197
+ solid: "solid";
198
+ dashed: "dashed";
199
+ dotted: "dotted";
200
+ double: "double";
201
+ }>>;
202
+ }, z.core.$strip>>;
203
+ }, z.core.$strip>>;
204
+ alignment: z.ZodOptional<z.ZodEnum<{
205
+ left: "left";
206
+ center: "center";
207
+ right: "right";
208
+ justify: "justify";
209
+ }>>;
210
+ verticalAlignment: z.ZodOptional<z.ZodEnum<{
211
+ top: "top";
212
+ bottom: "bottom";
213
+ middle: "middle";
214
+ }>>;
215
+ sourcePath: z.ZodOptional<z.ZodString>;
216
+ }, z.core.$strip>>;
217
+ columns: z.ZodArray<z.ZodObject<{
218
+ index: z.ZodNumber;
219
+ widthPt: z.ZodOptional<z.ZodNumber>;
220
+ hidden: z.ZodOptional<z.ZodBoolean>;
221
+ }, z.core.$strip>>;
222
+ rows: z.ZodArray<z.ZodObject<{
223
+ index: z.ZodNumber;
224
+ heightPt: z.ZodOptional<z.ZodNumber>;
225
+ hidden: z.ZodOptional<z.ZodBoolean>;
226
+ }, z.core.$strip>>;
227
+ images: z.ZodArray<z.ZodObject<{
228
+ kind: z.ZodLiteral<"image">;
229
+ format: z.ZodEnum<{
230
+ png: "png";
231
+ jpeg: "jpeg";
232
+ }>;
233
+ base64: z.ZodString;
234
+ widthPt: z.ZodNumber;
235
+ heightPt: z.ZodNumber;
236
+ altText: z.ZodOptional<z.ZodString>;
237
+ sourcePath: z.ZodOptional<z.ZodString>;
238
+ anchorRow: z.ZodNumber;
239
+ anchorColumn: z.ZodNumber;
240
+ offsetXPt: z.ZodNumber;
241
+ offsetYPt: z.ZodNumber;
242
+ }, z.core.$strip>>;
243
+ printSettings: z.ZodObject<{
244
+ pageSize: z.ZodObject<{
245
+ widthPt: z.ZodNumber;
246
+ heightPt: z.ZodNumber;
247
+ }, z.core.$strip>;
248
+ margins: z.ZodObject<{
249
+ topPt: z.ZodNumber;
250
+ rightPt: z.ZodNumber;
251
+ bottomPt: z.ZodNumber;
252
+ leftPt: z.ZodNumber;
253
+ }, z.core.$strip>;
254
+ printRange: z.ZodOptional<z.ZodObject<{
255
+ startRow: z.ZodNumber;
256
+ startColumn: z.ZodNumber;
257
+ endRow: z.ZodNumber;
258
+ endColumn: z.ZodNumber;
259
+ }, z.core.$strip>>;
260
+ scalePercent: z.ZodOptional<z.ZodNumber>;
261
+ fitToPages: z.ZodOptional<z.ZodObject<{
262
+ width: z.ZodNumber;
263
+ height: z.ZodNumber;
264
+ }, z.core.$strip>>;
265
+ repeatRows: z.ZodOptional<z.ZodObject<{
266
+ start: z.ZodNumber;
267
+ end: z.ZodNumber;
268
+ }, z.core.$strip>>;
269
+ repeatColumns: z.ZodOptional<z.ZodObject<{
270
+ start: z.ZodNumber;
271
+ end: z.ZodNumber;
272
+ }, z.core.$strip>>;
273
+ gridlines: z.ZodBoolean;
274
+ headers: z.ZodBoolean;
275
+ pageOrder: z.ZodEnum<{
276
+ downThenOver: "downThenOver";
277
+ overThenDown: "overThenDown";
278
+ }>;
279
+ manualBreaks: z.ZodOptional<z.ZodObject<{
280
+ rows: z.ZodArray<z.ZodNumber>;
281
+ columns: z.ZodArray<z.ZodNumber>;
282
+ }, z.core.$strip>>;
283
+ }, z.core.$strip>;
284
+ embeddedObjects: z.ZodOptional<z.ZodArray<z.ZodCustom<import("document-schema.js").ContentEmbeddedObject, import("document-schema.js").ContentEmbeddedObject>>>;
285
+ }, z.core.$strip>>;
286
+ }, z.core.$strip>, z.ZodObject<{
287
+ kind: z.ZodLiteral<"drawing">;
288
+ formatVersion: z.ZodLiteral<2>;
289
+ metadata: z.ZodObject<{
290
+ title: z.ZodOptional<z.ZodString>;
291
+ author: z.ZodOptional<z.ZodString>;
292
+ subject: z.ZodOptional<z.ZodString>;
293
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
294
+ creator: z.ZodOptional<z.ZodString>;
295
+ producer: z.ZodOptional<z.ZodString>;
296
+ createdIso: z.ZodOptional<z.ZodString>;
297
+ modifiedIso: z.ZodOptional<z.ZodString>;
298
+ }, z.core.$strip>;
299
+ pages: z.ZodArray<z.ZodObject<{
300
+ size: z.ZodObject<{
301
+ widthPt: z.ZodNumber;
302
+ heightPt: z.ZodNumber;
303
+ }, z.core.$strip>;
304
+ shapes: z.ZodArray<z.ZodObject<{
305
+ name: z.ZodOptional<z.ZodString>;
306
+ frame: z.ZodObject<{
307
+ xPt: z.ZodNumber;
308
+ yPt: z.ZodNumber;
309
+ widthPt: z.ZodNumber;
310
+ heightPt: z.ZodNumber;
311
+ }, z.core.$strip>;
312
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
313
+ insetLeftPt: z.ZodNumber;
314
+ insetTopPt: z.ZodNumber;
315
+ insetRightPt: z.ZodNumber;
316
+ insetBottomPt: z.ZodNumber;
317
+ fontScale: z.ZodOptional<z.ZodNumber>;
318
+ lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
319
+ paintOrder: z.ZodOptional<z.ZodNumber>;
320
+ sourcePath: z.ZodOptional<z.ZodString>;
321
+ blocks: z.ZodArray<z.ZodCustom<import("document-schema.js").ContentBlock, import("document-schema.js").ContentBlock>>;
322
+ }, z.core.$strip>>;
323
+ vectors: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
324
+ kind: z.ZodLiteral<"rect">;
325
+ frame: z.ZodObject<{
326
+ xPt: z.ZodNumber;
327
+ yPt: z.ZodNumber;
328
+ widthPt: z.ZodNumber;
329
+ heightPt: z.ZodNumber;
330
+ }, z.core.$strip>;
331
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
332
+ fill: z.ZodOptional<z.ZodObject<{
333
+ r: z.ZodNumber;
334
+ g: z.ZodNumber;
335
+ b: z.ZodNumber;
336
+ }, z.core.$strip>>;
337
+ stroke: z.ZodOptional<z.ZodObject<{
338
+ color: z.ZodObject<{
339
+ r: z.ZodNumber;
340
+ g: z.ZodNumber;
341
+ b: z.ZodNumber;
342
+ }, z.core.$strip>;
343
+ widthPt: z.ZodNumber;
344
+ style: z.ZodOptional<z.ZodEnum<{
345
+ solid: "solid";
346
+ dashed: "dashed";
347
+ dotted: "dotted";
348
+ double: "double";
349
+ }>>;
350
+ }, z.core.$strip>>;
351
+ paintOrder: z.ZodOptional<z.ZodNumber>;
352
+ sourcePath: z.ZodOptional<z.ZodString>;
353
+ }, z.core.$strip>, z.ZodObject<{
354
+ kind: z.ZodLiteral<"ellipse">;
355
+ frame: z.ZodObject<{
356
+ xPt: z.ZodNumber;
357
+ yPt: z.ZodNumber;
358
+ widthPt: z.ZodNumber;
359
+ heightPt: z.ZodNumber;
360
+ }, z.core.$strip>;
361
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
362
+ fill: z.ZodOptional<z.ZodObject<{
363
+ r: z.ZodNumber;
364
+ g: z.ZodNumber;
365
+ b: z.ZodNumber;
366
+ }, z.core.$strip>>;
367
+ stroke: z.ZodOptional<z.ZodObject<{
368
+ color: z.ZodObject<{
369
+ r: z.ZodNumber;
370
+ g: z.ZodNumber;
371
+ b: z.ZodNumber;
372
+ }, z.core.$strip>;
373
+ widthPt: z.ZodNumber;
374
+ style: z.ZodOptional<z.ZodEnum<{
375
+ solid: "solid";
376
+ dashed: "dashed";
377
+ dotted: "dotted";
378
+ double: "double";
379
+ }>>;
380
+ }, z.core.$strip>>;
381
+ paintOrder: z.ZodOptional<z.ZodNumber>;
382
+ sourcePath: z.ZodOptional<z.ZodString>;
383
+ }, z.core.$strip>, z.ZodObject<{
384
+ kind: z.ZodLiteral<"line">;
385
+ from: z.ZodObject<{
386
+ xPt: z.ZodNumber;
387
+ yPt: z.ZodNumber;
388
+ }, z.core.$strip>;
389
+ to: z.ZodObject<{
390
+ xPt: z.ZodNumber;
391
+ yPt: z.ZodNumber;
392
+ }, z.core.$strip>;
393
+ stroke: z.ZodObject<{
394
+ color: z.ZodObject<{
395
+ r: z.ZodNumber;
396
+ g: z.ZodNumber;
397
+ b: z.ZodNumber;
398
+ }, z.core.$strip>;
399
+ widthPt: z.ZodNumber;
400
+ style: z.ZodOptional<z.ZodEnum<{
401
+ solid: "solid";
402
+ dashed: "dashed";
403
+ dotted: "dotted";
404
+ double: "double";
405
+ }>>;
406
+ }, z.core.$strip>;
407
+ paintOrder: z.ZodOptional<z.ZodNumber>;
408
+ sourcePath: z.ZodOptional<z.ZodString>;
409
+ }, z.core.$strip>, z.ZodObject<{
410
+ kind: z.ZodLiteral<"path">;
411
+ frame: z.ZodObject<{
412
+ xPt: z.ZodNumber;
413
+ yPt: z.ZodNumber;
414
+ widthPt: z.ZodNumber;
415
+ heightPt: z.ZodNumber;
416
+ }, z.core.$strip>;
417
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
418
+ subpaths: z.ZodArray<z.ZodObject<{
419
+ start: z.ZodObject<{
420
+ xPt: z.ZodNumber;
421
+ yPt: z.ZodNumber;
422
+ }, z.core.$strip>;
423
+ segments: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
424
+ kind: z.ZodLiteral<"line">;
425
+ to: z.ZodObject<{
426
+ xPt: z.ZodNumber;
427
+ yPt: z.ZodNumber;
428
+ }, z.core.$strip>;
429
+ }, z.core.$strip>, z.ZodObject<{
430
+ kind: z.ZodLiteral<"cubic">;
431
+ control1: z.ZodObject<{
432
+ xPt: z.ZodNumber;
433
+ yPt: z.ZodNumber;
434
+ }, z.core.$strip>;
435
+ control2: z.ZodObject<{
436
+ xPt: z.ZodNumber;
437
+ yPt: z.ZodNumber;
438
+ }, z.core.$strip>;
439
+ to: z.ZodObject<{
440
+ xPt: z.ZodNumber;
441
+ yPt: z.ZodNumber;
442
+ }, z.core.$strip>;
443
+ }, z.core.$strip>], "kind">>;
444
+ closed: z.ZodBoolean;
445
+ }, z.core.$strip>>;
446
+ fill: z.ZodOptional<z.ZodObject<{
447
+ r: z.ZodNumber;
448
+ g: z.ZodNumber;
449
+ b: z.ZodNumber;
450
+ }, z.core.$strip>>;
451
+ fillRule: z.ZodOptional<z.ZodEnum<{
452
+ nonzero: "nonzero";
453
+ evenodd: "evenodd";
454
+ }>>;
455
+ stroke: z.ZodOptional<z.ZodObject<{
456
+ color: z.ZodObject<{
457
+ r: z.ZodNumber;
458
+ g: z.ZodNumber;
459
+ b: z.ZodNumber;
460
+ }, z.core.$strip>;
461
+ widthPt: z.ZodNumber;
462
+ style: z.ZodOptional<z.ZodEnum<{
463
+ solid: "solid";
464
+ dashed: "dashed";
465
+ dotted: "dotted";
466
+ double: "double";
467
+ }>>;
468
+ }, z.core.$strip>>;
469
+ paintOrder: z.ZodOptional<z.ZodNumber>;
470
+ sourcePath: z.ZodOptional<z.ZodString>;
471
+ }, z.core.$strip>], "kind">>;
472
+ }, z.core.$strip>>;
473
+ }, z.core.$strip>, z.ZodObject<{
474
+ kind: z.ZodLiteral<"formula">;
475
+ formatVersion: z.ZodLiteral<2>;
476
+ metadata: z.ZodObject<{
477
+ title: z.ZodOptional<z.ZodString>;
478
+ author: z.ZodOptional<z.ZodString>;
479
+ subject: z.ZodOptional<z.ZodString>;
480
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
481
+ creator: z.ZodOptional<z.ZodString>;
482
+ producer: z.ZodOptional<z.ZodString>;
483
+ createdIso: z.ZodOptional<z.ZodString>;
484
+ modifiedIso: z.ZodOptional<z.ZodString>;
485
+ }, z.core.$strip>;
486
+ formula: z.ZodObject<{
487
+ mathml: z.ZodArray<z.ZodCustom<import("document-schema.js").MathMlNode, import("document-schema.js").MathMlNode>>;
488
+ starMath: z.ZodOptional<z.ZodString>;
489
+ }, z.core.$strip>;
490
+ }, z.core.$strip>], "kind">>;
491
+ //#endregion
492
+ export { MarkdownBytesSchema, markdownCodec };