markdown-codec 0.0.0 → 1.0.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.
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 +361 -0
  35. package/dist/codec.d.ts +361 -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,361 @@
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<1>;
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<1>;
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
+ sourcePath: z.ZodOptional<z.ZodString>;
64
+ blocks: z.ZodArray<z.ZodCustom<import("document-schema.js").ContentBlock, import("document-schema.js").ContentBlock>>;
65
+ }, z.core.$strip>>;
66
+ notes: z.ZodString;
67
+ }, z.core.$strip>>;
68
+ }, z.core.$strip>, z.ZodObject<{
69
+ kind: z.ZodLiteral<"spreadsheet">;
70
+ formatVersion: z.ZodLiteral<1>;
71
+ metadata: z.ZodObject<{
72
+ title: z.ZodOptional<z.ZodString>;
73
+ author: z.ZodOptional<z.ZodString>;
74
+ subject: z.ZodOptional<z.ZodString>;
75
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
76
+ creator: z.ZodOptional<z.ZodString>;
77
+ producer: z.ZodOptional<z.ZodString>;
78
+ createdIso: z.ZodOptional<z.ZodString>;
79
+ modifiedIso: z.ZodOptional<z.ZodString>;
80
+ }, z.core.$strip>;
81
+ sheets: z.ZodArray<z.ZodObject<{
82
+ name: z.ZodString;
83
+ cells: z.ZodArray<z.ZodObject<{
84
+ row: z.ZodNumber;
85
+ column: z.ZodNumber;
86
+ value: z.ZodDiscriminatedUnion<[z.ZodObject<{
87
+ kind: z.ZodLiteral<"number">;
88
+ value: z.ZodNumber;
89
+ }, z.core.$strip>, z.ZodObject<{
90
+ kind: z.ZodLiteral<"percentage">;
91
+ value: z.ZodNumber;
92
+ }, z.core.$strip>, z.ZodObject<{
93
+ kind: z.ZodLiteral<"currency">;
94
+ value: z.ZodNumber;
95
+ currency: z.ZodOptional<z.ZodString>;
96
+ }, z.core.$strip>, z.ZodObject<{
97
+ kind: z.ZodLiteral<"boolean">;
98
+ value: z.ZodBoolean;
99
+ }, z.core.$strip>, z.ZodObject<{
100
+ kind: z.ZodLiteral<"date">;
101
+ value: z.ZodString;
102
+ }, z.core.$strip>, z.ZodObject<{
103
+ kind: z.ZodLiteral<"time">;
104
+ value: z.ZodString;
105
+ }, z.core.$strip>, z.ZodObject<{
106
+ kind: z.ZodLiteral<"string">;
107
+ value: z.ZodString;
108
+ }, z.core.$strip>, z.ZodObject<{
109
+ kind: z.ZodLiteral<"error">;
110
+ value: z.ZodString;
111
+ }, z.core.$strip>, z.ZodObject<{
112
+ kind: z.ZodLiteral<"empty">;
113
+ }, z.core.$strip>], "kind">;
114
+ formula: z.ZodOptional<z.ZodString>;
115
+ displayText: z.ZodString;
116
+ runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
117
+ text: z.ZodString;
118
+ bold: z.ZodOptional<z.ZodBoolean>;
119
+ italic: z.ZodOptional<z.ZodBoolean>;
120
+ underline: z.ZodOptional<z.ZodBoolean>;
121
+ strike: z.ZodOptional<z.ZodBoolean>;
122
+ fontFamily: z.ZodOptional<z.ZodString>;
123
+ sizePt: z.ZodOptional<z.ZodNumber>;
124
+ color: z.ZodOptional<z.ZodObject<{
125
+ r: z.ZodNumber;
126
+ g: z.ZodNumber;
127
+ b: z.ZodNumber;
128
+ }, z.core.$strip>>;
129
+ hyperlink: z.ZodOptional<z.ZodString>;
130
+ sourcePath: z.ZodOptional<z.ZodString>;
131
+ }, z.core.$strip>>>;
132
+ colSpan: z.ZodOptional<z.ZodNumber>;
133
+ rowSpan: z.ZodOptional<z.ZodNumber>;
134
+ }, z.core.$strip>>;
135
+ columns: z.ZodArray<z.ZodObject<{
136
+ index: z.ZodNumber;
137
+ widthPt: z.ZodNumber;
138
+ hidden: z.ZodOptional<z.ZodBoolean>;
139
+ }, z.core.$strip>>;
140
+ rows: z.ZodArray<z.ZodObject<{
141
+ index: z.ZodNumber;
142
+ heightPt: z.ZodNumber;
143
+ hidden: z.ZodOptional<z.ZodBoolean>;
144
+ }, z.core.$strip>>;
145
+ images: z.ZodArray<z.ZodObject<{
146
+ kind: z.ZodLiteral<"image">;
147
+ format: z.ZodEnum<{
148
+ png: "png";
149
+ jpeg: "jpeg";
150
+ }>;
151
+ base64: z.ZodString;
152
+ widthPt: z.ZodNumber;
153
+ heightPt: z.ZodNumber;
154
+ altText: z.ZodOptional<z.ZodString>;
155
+ sourcePath: z.ZodOptional<z.ZodString>;
156
+ anchorRow: z.ZodNumber;
157
+ anchorColumn: z.ZodNumber;
158
+ offsetXPt: z.ZodNumber;
159
+ offsetYPt: z.ZodNumber;
160
+ }, z.core.$strip>>;
161
+ printSettings: z.ZodObject<{
162
+ pageSize: z.ZodObject<{
163
+ widthPt: z.ZodNumber;
164
+ heightPt: z.ZodNumber;
165
+ }, z.core.$strip>;
166
+ margins: z.ZodObject<{
167
+ topPt: z.ZodNumber;
168
+ rightPt: z.ZodNumber;
169
+ bottomPt: z.ZodNumber;
170
+ leftPt: z.ZodNumber;
171
+ }, z.core.$strip>;
172
+ printRange: z.ZodOptional<z.ZodObject<{
173
+ startRow: z.ZodNumber;
174
+ startColumn: z.ZodNumber;
175
+ endRow: z.ZodNumber;
176
+ endColumn: z.ZodNumber;
177
+ }, z.core.$strip>>;
178
+ scale: z.ZodOptional<z.ZodNumber>;
179
+ fitToPages: z.ZodOptional<z.ZodObject<{
180
+ width: z.ZodNumber;
181
+ height: z.ZodNumber;
182
+ }, z.core.$strip>>;
183
+ repeatRows: z.ZodOptional<z.ZodObject<{
184
+ start: z.ZodNumber;
185
+ end: z.ZodNumber;
186
+ }, z.core.$strip>>;
187
+ repeatColumns: z.ZodOptional<z.ZodObject<{
188
+ start: z.ZodNumber;
189
+ end: z.ZodNumber;
190
+ }, z.core.$strip>>;
191
+ gridlines: z.ZodBoolean;
192
+ headers: z.ZodBoolean;
193
+ pageOrder: z.ZodEnum<{
194
+ downThenOver: "downThenOver";
195
+ overThenDown: "overThenDown";
196
+ }>;
197
+ manualBreaks: z.ZodOptional<z.ZodObject<{
198
+ rows: z.ZodArray<z.ZodNumber>;
199
+ columns: z.ZodArray<z.ZodNumber>;
200
+ }, z.core.$strip>>;
201
+ }, z.core.$strip>;
202
+ embeddedObjects: z.ZodOptional<z.ZodArray<z.ZodCustom<import("document-schema.js").ContentEmbeddedObject, import("document-schema.js").ContentEmbeddedObject>>>;
203
+ }, z.core.$strip>>;
204
+ }, z.core.$strip>, z.ZodObject<{
205
+ kind: z.ZodLiteral<"drawing">;
206
+ formatVersion: z.ZodLiteral<1>;
207
+ metadata: z.ZodObject<{
208
+ title: z.ZodOptional<z.ZodString>;
209
+ author: z.ZodOptional<z.ZodString>;
210
+ subject: z.ZodOptional<z.ZodString>;
211
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
212
+ creator: z.ZodOptional<z.ZodString>;
213
+ producer: z.ZodOptional<z.ZodString>;
214
+ createdIso: z.ZodOptional<z.ZodString>;
215
+ modifiedIso: z.ZodOptional<z.ZodString>;
216
+ }, z.core.$strip>;
217
+ pages: z.ZodArray<z.ZodObject<{
218
+ size: z.ZodObject<{
219
+ widthPt: z.ZodNumber;
220
+ heightPt: z.ZodNumber;
221
+ }, z.core.$strip>;
222
+ shapes: z.ZodArray<z.ZodObject<{
223
+ name: z.ZodOptional<z.ZodString>;
224
+ frame: z.ZodObject<{
225
+ xPt: z.ZodNumber;
226
+ yPt: z.ZodNumber;
227
+ widthPt: z.ZodNumber;
228
+ heightPt: z.ZodNumber;
229
+ }, z.core.$strip>;
230
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
231
+ insetLeftPt: z.ZodNumber;
232
+ insetTopPt: z.ZodNumber;
233
+ insetRightPt: z.ZodNumber;
234
+ insetBottomPt: z.ZodNumber;
235
+ fontScale: z.ZodOptional<z.ZodNumber>;
236
+ lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
237
+ sourcePath: z.ZodOptional<z.ZodString>;
238
+ blocks: z.ZodArray<z.ZodCustom<import("document-schema.js").ContentBlock, import("document-schema.js").ContentBlock>>;
239
+ }, z.core.$strip>>;
240
+ vectors: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
241
+ kind: z.ZodLiteral<"rect">;
242
+ frame: z.ZodObject<{
243
+ xPt: z.ZodNumber;
244
+ yPt: z.ZodNumber;
245
+ widthPt: z.ZodNumber;
246
+ heightPt: z.ZodNumber;
247
+ }, z.core.$strip>;
248
+ fill: z.ZodOptional<z.ZodObject<{
249
+ r: z.ZodNumber;
250
+ g: z.ZodNumber;
251
+ b: z.ZodNumber;
252
+ }, z.core.$strip>>;
253
+ stroke: z.ZodOptional<z.ZodObject<{
254
+ color: z.ZodObject<{
255
+ r: z.ZodNumber;
256
+ g: z.ZodNumber;
257
+ b: z.ZodNumber;
258
+ }, z.core.$strip>;
259
+ widthPt: z.ZodNumber;
260
+ }, z.core.$strip>>;
261
+ sourcePath: z.ZodOptional<z.ZodString>;
262
+ }, z.core.$strip>, z.ZodObject<{
263
+ kind: z.ZodLiteral<"ellipse">;
264
+ frame: z.ZodObject<{
265
+ xPt: z.ZodNumber;
266
+ yPt: z.ZodNumber;
267
+ widthPt: z.ZodNumber;
268
+ heightPt: z.ZodNumber;
269
+ }, z.core.$strip>;
270
+ fill: z.ZodOptional<z.ZodObject<{
271
+ r: z.ZodNumber;
272
+ g: z.ZodNumber;
273
+ b: z.ZodNumber;
274
+ }, z.core.$strip>>;
275
+ stroke: z.ZodOptional<z.ZodObject<{
276
+ color: z.ZodObject<{
277
+ r: z.ZodNumber;
278
+ g: z.ZodNumber;
279
+ b: z.ZodNumber;
280
+ }, z.core.$strip>;
281
+ widthPt: z.ZodNumber;
282
+ }, z.core.$strip>>;
283
+ sourcePath: z.ZodOptional<z.ZodString>;
284
+ }, z.core.$strip>, z.ZodObject<{
285
+ kind: z.ZodLiteral<"line">;
286
+ from: z.ZodObject<{
287
+ xPt: z.ZodNumber;
288
+ yPt: z.ZodNumber;
289
+ }, z.core.$strip>;
290
+ to: z.ZodObject<{
291
+ xPt: z.ZodNumber;
292
+ yPt: z.ZodNumber;
293
+ }, z.core.$strip>;
294
+ stroke: z.ZodObject<{
295
+ color: z.ZodObject<{
296
+ r: z.ZodNumber;
297
+ g: z.ZodNumber;
298
+ b: z.ZodNumber;
299
+ }, z.core.$strip>;
300
+ widthPt: z.ZodNumber;
301
+ }, z.core.$strip>;
302
+ sourcePath: z.ZodOptional<z.ZodString>;
303
+ }, z.core.$strip>, z.ZodObject<{
304
+ kind: z.ZodLiteral<"path">;
305
+ frame: z.ZodObject<{
306
+ xPt: z.ZodNumber;
307
+ yPt: z.ZodNumber;
308
+ widthPt: z.ZodNumber;
309
+ heightPt: z.ZodNumber;
310
+ }, z.core.$strip>;
311
+ subpaths: z.ZodArray<z.ZodObject<{
312
+ start: z.ZodObject<{
313
+ xPt: z.ZodNumber;
314
+ yPt: z.ZodNumber;
315
+ }, z.core.$strip>;
316
+ segments: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
317
+ kind: z.ZodLiteral<"line">;
318
+ to: z.ZodObject<{
319
+ xPt: z.ZodNumber;
320
+ yPt: z.ZodNumber;
321
+ }, z.core.$strip>;
322
+ }, z.core.$strip>, z.ZodObject<{
323
+ kind: z.ZodLiteral<"cubic">;
324
+ control1: z.ZodObject<{
325
+ xPt: z.ZodNumber;
326
+ yPt: z.ZodNumber;
327
+ }, z.core.$strip>;
328
+ control2: z.ZodObject<{
329
+ xPt: z.ZodNumber;
330
+ yPt: z.ZodNumber;
331
+ }, z.core.$strip>;
332
+ to: z.ZodObject<{
333
+ xPt: z.ZodNumber;
334
+ yPt: z.ZodNumber;
335
+ }, z.core.$strip>;
336
+ }, z.core.$strip>], "kind">>;
337
+ closed: z.ZodBoolean;
338
+ }, z.core.$strip>>;
339
+ fill: z.ZodOptional<z.ZodObject<{
340
+ r: z.ZodNumber;
341
+ g: z.ZodNumber;
342
+ b: z.ZodNumber;
343
+ }, z.core.$strip>>;
344
+ fillRule: z.ZodOptional<z.ZodEnum<{
345
+ nonzero: "nonzero";
346
+ evenodd: "evenodd";
347
+ }>>;
348
+ stroke: z.ZodOptional<z.ZodObject<{
349
+ color: z.ZodObject<{
350
+ r: z.ZodNumber;
351
+ g: z.ZodNumber;
352
+ b: z.ZodNumber;
353
+ }, z.core.$strip>;
354
+ widthPt: z.ZodNumber;
355
+ }, z.core.$strip>>;
356
+ sourcePath: z.ZodOptional<z.ZodString>;
357
+ }, z.core.$strip>], "kind">>;
358
+ }, z.core.$strip>>;
359
+ }, z.core.$strip>], "kind">>;
360
+ //#endregion
361
+ export { MarkdownBytesSchema, markdownCodec };