document-schema 7.12.0 → 7.14.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 (44) hide show
  1. package/README.md +6 -0
  2. package/dist/codec.d.cts +1 -1
  3. package/dist/codec.d.ts +1 -1
  4. package/dist/{construct-C4XiF8OW.d.cts → construct-C9cYkjnd.d.cts} +6 -6
  5. package/dist/{construct-C4XiF8OW.d.ts → construct-C9cYkjnd.d.ts} +6 -6
  6. package/dist/construct.d.cts +1 -1
  7. package/dist/construct.d.ts +1 -1
  8. package/dist/{content-DnNAXdH_.d.cts → content-BNUhgRbB.d.cts} +129 -126
  9. package/dist/{content-vx3Mbnjy.d.ts → content-CYPkduUB.d.ts} +129 -126
  10. package/dist/content-json-schema-defs.cjs +2 -1
  11. package/dist/content-json-schema-defs.js +2 -1
  12. package/dist/content.cjs +3 -2
  13. package/dist/content.d.cts +1 -1
  14. package/dist/content.d.ts +1 -1
  15. package/dist/content.js +3 -2
  16. package/dist/decompose.d.cts +2 -2
  17. package/dist/decompose.d.ts +2 -2
  18. package/dist/definitions.d.cts +1 -1
  19. package/dist/definitions.d.ts +1 -1
  20. package/dist/factor-styles.d.cts +1 -1
  21. package/dist/factor-styles.d.ts +1 -1
  22. package/dist/flatten.d.cts +1 -1
  23. package/dist/flatten.d.ts +1 -1
  24. package/dist/index.cjs +2 -0
  25. package/dist/index.d.cts +5 -5
  26. package/dist/index.d.ts +5 -5
  27. package/dist/index.js +2 -2
  28. package/dist/{package-node-DMS4Zrfi.d.cts → package-node-C1HxQdNK.d.cts} +47 -47
  29. package/dist/{package-node-CjEahULr.d.ts → package-node-DdotoNEU.d.ts} +47 -47
  30. package/dist/package-node.d.cts +1 -1
  31. package/dist/package-node.d.ts +1 -1
  32. package/dist/package.d.cts +2 -2
  33. package/dist/package.d.ts +2 -2
  34. package/dist/schema-io.cjs +2 -2
  35. package/dist/schema-io.d.cts +1 -1
  36. package/dist/schema-io.d.ts +1 -1
  37. package/dist/schema-io.js +2 -2
  38. package/dist/table-grid.cjs +85 -0
  39. package/dist/table-grid.d.cts +50 -2
  40. package/dist/table-grid.d.ts +50 -2
  41. package/dist/table-grid.js +84 -1
  42. package/package.json +1 -1
  43. package/schemas/content-document.schema.json +19 -16
  44. package/schemas/document-tree.schema.json +6 -3
@@ -1,2 +1,2 @@
1
- import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-DMS4Zrfi.cjs";
1
+ import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-C1HxQdNK.cjs";
2
2
  export { DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, TreeBlockLeaf, TreeBlockLeafSchema, TreeGroup, TreeGroupSchema, TreeLeaf, TreeLeafSchema, TreeNode, TreeNodeSchema, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode };
@@ -1,2 +1,2 @@
1
- import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-CjEahULr.js";
1
+ import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-DdotoNEU.js";
2
2
  export { DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, TreeBlockLeaf, TreeBlockLeafSchema, TreeGroup, TreeGroupSchema, TreeLeaf, TreeLeafSchema, TreeNode, TreeNodeSchema, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode };
@@ -1,6 +1,6 @@
1
1
  import { d as MathMlNode } from "./mathml-Czqc1mdZ.cjs";
2
2
  import { p as MathExpression } from "./math-BScHxedi.cjs";
3
- import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-DMS4Zrfi.cjs";
3
+ import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-C1HxQdNK.cjs";
4
4
  import { z } from "zod";
5
5
  //#region src/package.d.ts
6
6
  declare const TreeEmbeddedFontSchema: z.ZodObject<{
@@ -638,12 +638,12 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
638
638
  }, z.core.$strip>, z.ZodObject<{
639
639
  children: z.ZodArray<z.ZodObject<{
640
640
  origin: z.ZodOptional<z.ZodEnum<{
641
- body: "body";
642
641
  chart: "chart";
643
642
  diagram: "diagram";
644
643
  table: "table";
645
644
  image: "image";
646
645
  notes: "notes";
646
+ body: "body";
647
647
  }>>;
648
648
  interpretation: z.ZodOptional<z.ZodObject<{
649
649
  transcript: z.ZodOptional<z.ZodObject<{
package/dist/package.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { d as MathMlNode } from "./mathml-Czqc1mdZ.js";
2
2
  import { p as MathExpression } from "./math-BScHxedi.js";
3
- import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-CjEahULr.js";
3
+ import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-DdotoNEU.js";
4
4
  import { z } from "zod";
5
5
  //#region src/package.d.ts
6
6
  declare const TreeEmbeddedFontSchema: z.ZodObject<{
@@ -638,12 +638,12 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
638
638
  }, z.core.$strip>, z.ZodObject<{
639
639
  children: z.ZodArray<z.ZodObject<{
640
640
  origin: z.ZodOptional<z.ZodEnum<{
641
- body: "body";
642
641
  chart: "chart";
643
642
  diagram: "diagram";
644
643
  table: "table";
645
644
  image: "image";
646
645
  notes: "notes";
646
+ body: "body";
647
647
  }>>;
648
648
  interpretation: z.ZodOptional<z.ZodObject<{
649
649
  transcript: z.ZodOptional<z.ZodObject<{
@@ -7,7 +7,7 @@ const SCHEMA_FILE_NAMES = {
7
7
  ContentDocument: "content-document.schema.json"
8
8
  };
9
9
  function schemaUriFor(kind) {
10
- return `https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/${SCHEMA_FILE_NAMES[kind]}`;
10
+ return `https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/${SCHEMA_FILE_NAMES[kind]}`;
11
11
  }
12
12
  const SCHEMA_URI_PATTERN = /^https:\/\/cdn\.jsdelivr\.net\/npm\/document-schema\.js@([^/]+)\/schemas\/(document-tree|document-package|content-document|layout-document)\.schema\.json$/;
13
13
  function parseSchemaUri(uri) {
@@ -102,7 +102,7 @@ function documentFromJson(value) {
102
102
  if (parts.stem === "document-package") throw new DocumentPackageRenamedError(value.$schema);
103
103
  const kind = kindForFileStem(parts.stem);
104
104
  if (kind === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
105
- if (majorVersionOf(parts.version) !== majorVersionOf("7.12.0")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.12.0");
105
+ if (majorVersionOf(parts.version) !== majorVersionOf("7.14.0")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.14.0");
106
106
  switch (kind) {
107
107
  case "DocumentTree": return {
108
108
  kind,
@@ -1,4 +1,4 @@
1
- import { C as ContentDocument } from "./content-DnNAXdH_.cjs";
1
+ import { C as ContentDocument } from "./content-BNUhgRbB.cjs";
2
2
  import { DocumentTree } from "./package.cjs";
3
3
  //#region src/schema-io.d.ts
4
4
  type DocumentSchemaKind = "DocumentTree" | "ContentDocument";
@@ -1,4 +1,4 @@
1
- import { C as ContentDocument } from "./content-vx3Mbnjy.js";
1
+ import { C as ContentDocument } from "./content-CYPkduUB.js";
2
2
  import { DocumentTree } from "./package.js";
3
3
  //#region src/schema-io.d.ts
4
4
  type DocumentSchemaKind = "DocumentTree" | "ContentDocument";
package/dist/schema-io.js CHANGED
@@ -6,7 +6,7 @@ const SCHEMA_FILE_NAMES = {
6
6
  ContentDocument: "content-document.schema.json"
7
7
  };
8
8
  function schemaUriFor(kind) {
9
- return `https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/${SCHEMA_FILE_NAMES[kind]}`;
9
+ return `https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/${SCHEMA_FILE_NAMES[kind]}`;
10
10
  }
11
11
  const SCHEMA_URI_PATTERN = /^https:\/\/cdn\.jsdelivr\.net\/npm\/document-schema\.js@([^/]+)\/schemas\/(document-tree|document-package|content-document|layout-document)\.schema\.json$/;
12
12
  function parseSchemaUri(uri) {
@@ -101,7 +101,7 @@ function documentFromJson(value) {
101
101
  if (parts.stem === "document-package") throw new DocumentPackageRenamedError(value.$schema);
102
102
  const kind = kindForFileStem(parts.stem);
103
103
  if (kind === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
104
- if (majorVersionOf(parts.version) !== majorVersionOf("7.12.0")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.12.0");
104
+ if (majorVersionOf(parts.version) !== majorVersionOf("7.14.0")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.14.0");
105
105
  switch (kind) {
106
106
  case "DocumentTree": return {
107
107
  kind,
@@ -48,6 +48,89 @@ function walkTableGrid(table) {
48
48
  };
49
49
  }));
50
50
  }
51
+ /** The span of a cell that occupies its own grid position only, which is what an absent `colSpan` or `rowSpan` means. */
52
+ const UNMERGED_SPAN = 1;
53
+ function widestRowLength(table) {
54
+ let width = 0;
55
+ for (const row of table.rows) width = Math.max(width, row.cells.length);
56
+ return width;
57
+ }
58
+ function coveredFault(position) {
59
+ const { rowIndex, columnIndex, anchorRowIndex, anchorColumnIndex, cell } = position;
60
+ if (cell.blocks.length > 0) return {
61
+ kind: "coveredContent",
62
+ rowIndex,
63
+ columnIndex,
64
+ anchorRowIndex,
65
+ anchorColumnIndex
66
+ };
67
+ if (tableCellColumnSpan(cell) > UNMERGED_SPAN || tableCellRowSpan(cell) > UNMERGED_SPAN) return {
68
+ kind: "coveredSpan",
69
+ rowIndex,
70
+ columnIndex,
71
+ anchorRowIndex,
72
+ anchorColumnIndex
73
+ };
74
+ }
75
+ function overlappedRegion(anchor, row) {
76
+ const footprintEnd = anchor.columnIndex + tableCellColumnSpan(anchor.cell);
77
+ for (const position of row.slice(anchor.columnIndex + 1, footprintEnd)) if (position.anchorRowIndex !== void 0 && position.anchorRowIndex < anchor.rowIndex) return position;
78
+ }
79
+ function anchorFault(anchor, row, rowCount) {
80
+ const { rowIndex, columnIndex, cell } = anchor;
81
+ if (columnIndex + tableCellColumnSpan(cell) > row.length) return {
82
+ kind: "anchorOverrunsColumns",
83
+ rowIndex,
84
+ columnIndex
85
+ };
86
+ if (rowIndex + tableCellRowSpan(cell) > rowCount) return {
87
+ kind: "anchorOverrunsRows",
88
+ rowIndex,
89
+ columnIndex
90
+ };
91
+ const overlapped = overlappedRegion(anchor, row);
92
+ if (overlapped !== void 0) return {
93
+ kind: "overlappingAnchors",
94
+ rowIndex,
95
+ columnIndex,
96
+ earlierAnchorRowIndex: overlapped.anchorRowIndex,
97
+ earlierAnchorColumnIndex: overlapped.anchorColumnIndex
98
+ };
99
+ }
100
+ /**
101
+ * The first place `table` contradicts the grid rule, or `undefined` when it obeys it. It never throws: a caller decides what a fault means for it, the way findConstructMarkerImbalance leaves that decision to each consumer of a block list.
102
+ *
103
+ * Rows are compared with each other before any position is classified, since an anchor's footprint can only be measured against a grid every row shares; the positions are then checked in row-major order, so the fault returned is the earliest one in reading order.
104
+ *
105
+ * The check states the whole of the rule and nothing beyond it: a table with no rows, or whose rows are all empty, has no fault, and neither `columnWidthsPt` nor a cell's own properties other than its blocks and spans are consulted.
106
+ */
107
+ function findTableGridFault(table) {
108
+ const gridColumnCount = widestRowLength(table);
109
+ for (const [rowIndex, row] of table.rows.entries()) if (row.cells.length !== gridColumnCount) return {
110
+ kind: "raggedRow",
111
+ rowIndex,
112
+ cellCount: row.cells.length,
113
+ gridColumnCount
114
+ };
115
+ const grid = walkTableGrid(table);
116
+ for (const row of grid) for (const position of row) {
117
+ const fault = position.anchorRowIndex === void 0 ? anchorFault(position, row, grid.length) : coveredFault(position);
118
+ if (fault !== void 0) return fault;
119
+ }
120
+ }
121
+ /**
122
+ * One sentence stating a fault in words, for a writer that refuses or reports a table the grid rule does not admit: it names the fault by its position and, where the fault involves a second region, by that region's anchor. Indices are 0-based, matching every index in the descriptor. The sentence carries no entry point or format of its own, so each caller prefixes whatever names its own operation.
123
+ */
124
+ function describeTableGridFault(fault) {
125
+ switch (fault.kind) {
126
+ case "raggedRow": return `row ${String(fault.rowIndex)} holds ${String(fault.cellCount)} cells where the widest row holds ${String(fault.gridColumnCount)}, but every row of a table covers the same grid`;
127
+ case "coveredContent": return `the cell at row ${String(fault.rowIndex)}, column ${String(fault.columnIndex)} lies inside the merged region anchored at row ${String(fault.anchorRowIndex)}, column ${String(fault.anchorColumnIndex)} but carries content of its own, and a merged region's content belongs to its anchor`;
128
+ case "coveredSpan": return `the cell at row ${String(fault.rowIndex)}, column ${String(fault.columnIndex)} lies inside the merged region anchored at row ${String(fault.anchorRowIndex)}, column ${String(fault.anchorColumnIndex)} but states a span of its own, and only a region's anchor carries a span`;
129
+ case "anchorOverrunsColumns": return `the merged region anchored at row ${String(fault.rowIndex)}, column ${String(fault.columnIndex)} spans past the last column of the grid`;
130
+ case "anchorOverrunsRows": return `the merged region anchored at row ${String(fault.rowIndex)}, column ${String(fault.columnIndex)} spans past the last row of the table`;
131
+ case "overlappingAnchors": return `the merged region anchored at row ${String(fault.rowIndex)}, column ${String(fault.columnIndex)} overlaps the region anchored at row ${String(fault.earlierAnchorRowIndex)}, column ${String(fault.earlierAnchorColumnIndex)}, but a grid position belongs to one region only`;
132
+ }
133
+ }
51
134
  function placedGridWidth(rows, columnCount) {
52
135
  let width = columnCount;
53
136
  for (const row of rows) for (const { columnIndex, cell } of row.cells) width = Math.max(width, columnIndex + tableCellColumnSpan(cell));
@@ -112,6 +195,8 @@ function placeAnchorTableRows(rows, columnCount) {
112
195
  }
113
196
  //#endregion
114
197
  exports.denseTableRows = denseTableRows;
198
+ exports.describeTableGridFault = describeTableGridFault;
199
+ exports.findTableGridFault = findTableGridFault;
115
200
  exports.placeAnchorTableRows = placeAnchorTableRows;
116
201
  exports.tableCellColumnSpan = tableCellColumnSpan;
117
202
  exports.tableCellRowSpan = tableCellRowSpan;
@@ -1,5 +1,5 @@
1
1
  import { o as TextDirection } from "./style-D06NwxAJ.cjs";
2
- import { _n as ContentTableRow, hn as ContentTableCell, mn as ContentTable } from "./content-DnNAXdH_.cjs";
2
+ import { _n as ContentTableRow, hn as ContentTableCell, mn as ContentTable } from "./content-BNUhgRbB.cjs";
3
3
  //#region src/table-grid.d.ts
4
4
  /** The number of grid columns a cell occupies; an absent `colSpan` means the cell occupies its own column only. */
5
5
  declare function tableCellColumnSpan(cell: ContentTableCell): number;
@@ -33,6 +33,52 @@ type TableGridPosition = TableGridAnchor | TableGridCovered;
33
33
  * This is the walk a consumer runs instead of accumulating spans itself. A writer targeting a format that stores only anchors (HTML's `<td colspan>`, a docx `w:tc` with `w:gridSpan`) keeps the anchors and drops the covered positions; a writer targeting a format that stores covered positions explicitly (ODF, pptx) writes both; a reader checks its own output against it.
34
34
  */
35
35
  declare function walkTableGrid(table: ContentTable): TableGridPosition[][];
36
+ /**
37
+ * Where a table stops obeying the grid rule (ContentTableCell in src/content.ts states the rule; walkTableGrid derives the classification every check here is made against). Every variant names a position in the table's own row and column indices.
38
+ *
39
+ * - `raggedRow`: the row holds `cellCount` entries where the table's widest row holds `gridColumnCount`, so the rows do not all cover the same grid.
40
+ * - `coveredContent`: the position is covered by the region anchored at `anchorRowIndex`, `anchorColumnIndex` yet carries blocks of its own; the region's content belongs to its anchor, so a second copy has nowhere to go.
41
+ * - `coveredSpan`: the position is covered by the region anchored at `anchorRowIndex`, `anchorColumnIndex` yet carries a `colSpan` or `rowSpan` of its own. Spans are set on the anchor only and walkTableGrid never consults a covered entry's, so this is how a second anchor starting inside another's footprint shows up: the walk assigns each position to the first anchor covering it, which leaves the second entry classified as covered and its span ignored.
42
+ * - `anchorOverrunsColumns`: the anchor at this position has a `colSpan` reaching past the last grid column.
43
+ * - `anchorOverrunsRows`: the anchor at this position has a `rowSpan` reaching past the last row of the table.
44
+ * - `overlappingAnchors`: the anchor at this position starts outside every other region but its footprint reaches a position already covered by the region anchored at `earlierAnchorRowIndex`, `earlierAnchorColumnIndex`, so two regions claim one position.
45
+ *
46
+ * A `kind` tag discriminates rather than property presence, because the variants' required fields are not mutually exclusive: several variants' fields include another's.
47
+ */
48
+ type TableGridFault = {
49
+ readonly kind: "raggedRow";
50
+ readonly rowIndex: number;
51
+ readonly cellCount: number;
52
+ readonly gridColumnCount: number;
53
+ } | {
54
+ readonly kind: "coveredContent" | "coveredSpan";
55
+ readonly rowIndex: number;
56
+ readonly columnIndex: number;
57
+ readonly anchorRowIndex: number;
58
+ readonly anchorColumnIndex: number;
59
+ } | {
60
+ readonly kind: "anchorOverrunsColumns" | "anchorOverrunsRows";
61
+ readonly rowIndex: number;
62
+ readonly columnIndex: number;
63
+ } | {
64
+ readonly kind: "overlappingAnchors";
65
+ readonly rowIndex: number;
66
+ readonly columnIndex: number;
67
+ readonly earlierAnchorRowIndex: number;
68
+ readonly earlierAnchorColumnIndex: number;
69
+ };
70
+ /**
71
+ * The first place `table` contradicts the grid rule, or `undefined` when it obeys it. It never throws: a caller decides what a fault means for it, the way findConstructMarkerImbalance leaves that decision to each consumer of a block list.
72
+ *
73
+ * Rows are compared with each other before any position is classified, since an anchor's footprint can only be measured against a grid every row shares; the positions are then checked in row-major order, so the fault returned is the earliest one in reading order.
74
+ *
75
+ * The check states the whole of the rule and nothing beyond it: a table with no rows, or whose rows are all empty, has no fault, and neither `columnWidthsPt` nor a cell's own properties other than its blocks and spans are consulted.
76
+ */
77
+ declare function findTableGridFault(table: ContentTable): TableGridFault | undefined;
78
+ /**
79
+ * One sentence stating a fault in words, for a writer that refuses or reports a table the grid rule does not admit: it names the fault by its position and, where the fault involves a second region, by that region's anchor. Indices are 0-based, matching every index in the descriptor. The sentence carries no entry point or format of its own, so each caller prefixes whatever names its own operation.
80
+ */
81
+ declare function describeTableGridFault(fault: TableGridFault): string;
36
82
  /** A cell together with the grid column it starts at, for a reader whose source format states that column directly. */
37
83
  interface PositionedTableCell {
38
84
  readonly columnIndex: number;
@@ -43,6 +89,7 @@ interface PositionedTableRow {
43
89
  readonly cells: readonly PositionedTableCell[];
44
90
  readonly heightPt?: number;
45
91
  readonly direction?: TextDirection;
92
+ readonly isHeader?: boolean;
46
93
  }
47
94
  /**
48
95
  * Build dense rows from cells a reader has already positioned, filling every position no cell was placed at with an empty covered cell.
@@ -55,6 +102,7 @@ interface AnchorTableRow {
55
102
  readonly cells: readonly ContentTableCell[];
56
103
  readonly heightPt?: number;
57
104
  readonly direction?: TextDirection;
105
+ readonly isHeader?: boolean;
58
106
  }
59
107
  /**
60
108
  * Build dense rows from anchor cells alone, placing each at the first grid column no earlier cell already reaches -- the placement HTML's own table model needs, where a `rowspan` in one row silently consumes a column in the rows below it and nothing marks the consumed position.
@@ -63,4 +111,4 @@ interface AnchorTableRow {
63
111
  */
64
112
  declare function placeAnchorTableRows(rows: readonly AnchorTableRow[], columnCount: number): ContentTableRow[];
65
113
  //#endregion
66
- export { AnchorTableRow, PositionedTableCell, PositionedTableRow, TableGridAnchor, TableGridCovered, TableGridPosition, denseTableRows, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid };
114
+ export { AnchorTableRow, PositionedTableCell, PositionedTableRow, TableGridAnchor, TableGridCovered, TableGridFault, TableGridPosition, denseTableRows, describeTableGridFault, findTableGridFault, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid };
@@ -1,5 +1,5 @@
1
1
  import { o as TextDirection } from "./style-D06NwxAJ.js";
2
- import { _n as ContentTableRow, hn as ContentTableCell, mn as ContentTable } from "./content-vx3Mbnjy.js";
2
+ import { _n as ContentTableRow, hn as ContentTableCell, mn as ContentTable } from "./content-CYPkduUB.js";
3
3
  //#region src/table-grid.d.ts
4
4
  /** The number of grid columns a cell occupies; an absent `colSpan` means the cell occupies its own column only. */
5
5
  declare function tableCellColumnSpan(cell: ContentTableCell): number;
@@ -33,6 +33,52 @@ type TableGridPosition = TableGridAnchor | TableGridCovered;
33
33
  * This is the walk a consumer runs instead of accumulating spans itself. A writer targeting a format that stores only anchors (HTML's `<td colspan>`, a docx `w:tc` with `w:gridSpan`) keeps the anchors and drops the covered positions; a writer targeting a format that stores covered positions explicitly (ODF, pptx) writes both; a reader checks its own output against it.
34
34
  */
35
35
  declare function walkTableGrid(table: ContentTable): TableGridPosition[][];
36
+ /**
37
+ * Where a table stops obeying the grid rule (ContentTableCell in src/content.ts states the rule; walkTableGrid derives the classification every check here is made against). Every variant names a position in the table's own row and column indices.
38
+ *
39
+ * - `raggedRow`: the row holds `cellCount` entries where the table's widest row holds `gridColumnCount`, so the rows do not all cover the same grid.
40
+ * - `coveredContent`: the position is covered by the region anchored at `anchorRowIndex`, `anchorColumnIndex` yet carries blocks of its own; the region's content belongs to its anchor, so a second copy has nowhere to go.
41
+ * - `coveredSpan`: the position is covered by the region anchored at `anchorRowIndex`, `anchorColumnIndex` yet carries a `colSpan` or `rowSpan` of its own. Spans are set on the anchor only and walkTableGrid never consults a covered entry's, so this is how a second anchor starting inside another's footprint shows up: the walk assigns each position to the first anchor covering it, which leaves the second entry classified as covered and its span ignored.
42
+ * - `anchorOverrunsColumns`: the anchor at this position has a `colSpan` reaching past the last grid column.
43
+ * - `anchorOverrunsRows`: the anchor at this position has a `rowSpan` reaching past the last row of the table.
44
+ * - `overlappingAnchors`: the anchor at this position starts outside every other region but its footprint reaches a position already covered by the region anchored at `earlierAnchorRowIndex`, `earlierAnchorColumnIndex`, so two regions claim one position.
45
+ *
46
+ * A `kind` tag discriminates rather than property presence, because the variants' required fields are not mutually exclusive: several variants' fields include another's.
47
+ */
48
+ type TableGridFault = {
49
+ readonly kind: "raggedRow";
50
+ readonly rowIndex: number;
51
+ readonly cellCount: number;
52
+ readonly gridColumnCount: number;
53
+ } | {
54
+ readonly kind: "coveredContent" | "coveredSpan";
55
+ readonly rowIndex: number;
56
+ readonly columnIndex: number;
57
+ readonly anchorRowIndex: number;
58
+ readonly anchorColumnIndex: number;
59
+ } | {
60
+ readonly kind: "anchorOverrunsColumns" | "anchorOverrunsRows";
61
+ readonly rowIndex: number;
62
+ readonly columnIndex: number;
63
+ } | {
64
+ readonly kind: "overlappingAnchors";
65
+ readonly rowIndex: number;
66
+ readonly columnIndex: number;
67
+ readonly earlierAnchorRowIndex: number;
68
+ readonly earlierAnchorColumnIndex: number;
69
+ };
70
+ /**
71
+ * The first place `table` contradicts the grid rule, or `undefined` when it obeys it. It never throws: a caller decides what a fault means for it, the way findConstructMarkerImbalance leaves that decision to each consumer of a block list.
72
+ *
73
+ * Rows are compared with each other before any position is classified, since an anchor's footprint can only be measured against a grid every row shares; the positions are then checked in row-major order, so the fault returned is the earliest one in reading order.
74
+ *
75
+ * The check states the whole of the rule and nothing beyond it: a table with no rows, or whose rows are all empty, has no fault, and neither `columnWidthsPt` nor a cell's own properties other than its blocks and spans are consulted.
76
+ */
77
+ declare function findTableGridFault(table: ContentTable): TableGridFault | undefined;
78
+ /**
79
+ * One sentence stating a fault in words, for a writer that refuses or reports a table the grid rule does not admit: it names the fault by its position and, where the fault involves a second region, by that region's anchor. Indices are 0-based, matching every index in the descriptor. The sentence carries no entry point or format of its own, so each caller prefixes whatever names its own operation.
80
+ */
81
+ declare function describeTableGridFault(fault: TableGridFault): string;
36
82
  /** A cell together with the grid column it starts at, for a reader whose source format states that column directly. */
37
83
  interface PositionedTableCell {
38
84
  readonly columnIndex: number;
@@ -43,6 +89,7 @@ interface PositionedTableRow {
43
89
  readonly cells: readonly PositionedTableCell[];
44
90
  readonly heightPt?: number;
45
91
  readonly direction?: TextDirection;
92
+ readonly isHeader?: boolean;
46
93
  }
47
94
  /**
48
95
  * Build dense rows from cells a reader has already positioned, filling every position no cell was placed at with an empty covered cell.
@@ -55,6 +102,7 @@ interface AnchorTableRow {
55
102
  readonly cells: readonly ContentTableCell[];
56
103
  readonly heightPt?: number;
57
104
  readonly direction?: TextDirection;
105
+ readonly isHeader?: boolean;
58
106
  }
59
107
  /**
60
108
  * Build dense rows from anchor cells alone, placing each at the first grid column no earlier cell already reaches -- the placement HTML's own table model needs, where a `rowspan` in one row silently consumes a column in the rows below it and nothing marks the consumed position.
@@ -63,4 +111,4 @@ interface AnchorTableRow {
63
111
  */
64
112
  declare function placeAnchorTableRows(rows: readonly AnchorTableRow[], columnCount: number): ContentTableRow[];
65
113
  //#endregion
66
- export { AnchorTableRow, PositionedTableCell, PositionedTableRow, TableGridAnchor, TableGridCovered, TableGridPosition, denseTableRows, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid };
114
+ export { AnchorTableRow, PositionedTableCell, PositionedTableRow, TableGridAnchor, TableGridCovered, TableGridFault, TableGridPosition, denseTableRows, describeTableGridFault, findTableGridFault, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid };
@@ -47,6 +47,89 @@ function walkTableGrid(table) {
47
47
  };
48
48
  }));
49
49
  }
50
+ /** The span of a cell that occupies its own grid position only, which is what an absent `colSpan` or `rowSpan` means. */
51
+ const UNMERGED_SPAN = 1;
52
+ function widestRowLength(table) {
53
+ let width = 0;
54
+ for (const row of table.rows) width = Math.max(width, row.cells.length);
55
+ return width;
56
+ }
57
+ function coveredFault(position) {
58
+ const { rowIndex, columnIndex, anchorRowIndex, anchorColumnIndex, cell } = position;
59
+ if (cell.blocks.length > 0) return {
60
+ kind: "coveredContent",
61
+ rowIndex,
62
+ columnIndex,
63
+ anchorRowIndex,
64
+ anchorColumnIndex
65
+ };
66
+ if (tableCellColumnSpan(cell) > UNMERGED_SPAN || tableCellRowSpan(cell) > UNMERGED_SPAN) return {
67
+ kind: "coveredSpan",
68
+ rowIndex,
69
+ columnIndex,
70
+ anchorRowIndex,
71
+ anchorColumnIndex
72
+ };
73
+ }
74
+ function overlappedRegion(anchor, row) {
75
+ const footprintEnd = anchor.columnIndex + tableCellColumnSpan(anchor.cell);
76
+ for (const position of row.slice(anchor.columnIndex + 1, footprintEnd)) if (position.anchorRowIndex !== void 0 && position.anchorRowIndex < anchor.rowIndex) return position;
77
+ }
78
+ function anchorFault(anchor, row, rowCount) {
79
+ const { rowIndex, columnIndex, cell } = anchor;
80
+ if (columnIndex + tableCellColumnSpan(cell) > row.length) return {
81
+ kind: "anchorOverrunsColumns",
82
+ rowIndex,
83
+ columnIndex
84
+ };
85
+ if (rowIndex + tableCellRowSpan(cell) > rowCount) return {
86
+ kind: "anchorOverrunsRows",
87
+ rowIndex,
88
+ columnIndex
89
+ };
90
+ const overlapped = overlappedRegion(anchor, row);
91
+ if (overlapped !== void 0) return {
92
+ kind: "overlappingAnchors",
93
+ rowIndex,
94
+ columnIndex,
95
+ earlierAnchorRowIndex: overlapped.anchorRowIndex,
96
+ earlierAnchorColumnIndex: overlapped.anchorColumnIndex
97
+ };
98
+ }
99
+ /**
100
+ * The first place `table` contradicts the grid rule, or `undefined` when it obeys it. It never throws: a caller decides what a fault means for it, the way findConstructMarkerImbalance leaves that decision to each consumer of a block list.
101
+ *
102
+ * Rows are compared with each other before any position is classified, since an anchor's footprint can only be measured against a grid every row shares; the positions are then checked in row-major order, so the fault returned is the earliest one in reading order.
103
+ *
104
+ * The check states the whole of the rule and nothing beyond it: a table with no rows, or whose rows are all empty, has no fault, and neither `columnWidthsPt` nor a cell's own properties other than its blocks and spans are consulted.
105
+ */
106
+ function findTableGridFault(table) {
107
+ const gridColumnCount = widestRowLength(table);
108
+ for (const [rowIndex, row] of table.rows.entries()) if (row.cells.length !== gridColumnCount) return {
109
+ kind: "raggedRow",
110
+ rowIndex,
111
+ cellCount: row.cells.length,
112
+ gridColumnCount
113
+ };
114
+ const grid = walkTableGrid(table);
115
+ for (const row of grid) for (const position of row) {
116
+ const fault = position.anchorRowIndex === void 0 ? anchorFault(position, row, grid.length) : coveredFault(position);
117
+ if (fault !== void 0) return fault;
118
+ }
119
+ }
120
+ /**
121
+ * One sentence stating a fault in words, for a writer that refuses or reports a table the grid rule does not admit: it names the fault by its position and, where the fault involves a second region, by that region's anchor. Indices are 0-based, matching every index in the descriptor. The sentence carries no entry point or format of its own, so each caller prefixes whatever names its own operation.
122
+ */
123
+ function describeTableGridFault(fault) {
124
+ switch (fault.kind) {
125
+ case "raggedRow": return `row ${String(fault.rowIndex)} holds ${String(fault.cellCount)} cells where the widest row holds ${String(fault.gridColumnCount)}, but every row of a table covers the same grid`;
126
+ case "coveredContent": return `the cell at row ${String(fault.rowIndex)}, column ${String(fault.columnIndex)} lies inside the merged region anchored at row ${String(fault.anchorRowIndex)}, column ${String(fault.anchorColumnIndex)} but carries content of its own, and a merged region's content belongs to its anchor`;
127
+ case "coveredSpan": return `the cell at row ${String(fault.rowIndex)}, column ${String(fault.columnIndex)} lies inside the merged region anchored at row ${String(fault.anchorRowIndex)}, column ${String(fault.anchorColumnIndex)} but states a span of its own, and only a region's anchor carries a span`;
128
+ case "anchorOverrunsColumns": return `the merged region anchored at row ${String(fault.rowIndex)}, column ${String(fault.columnIndex)} spans past the last column of the grid`;
129
+ case "anchorOverrunsRows": return `the merged region anchored at row ${String(fault.rowIndex)}, column ${String(fault.columnIndex)} spans past the last row of the table`;
130
+ case "overlappingAnchors": return `the merged region anchored at row ${String(fault.rowIndex)}, column ${String(fault.columnIndex)} overlaps the region anchored at row ${String(fault.earlierAnchorRowIndex)}, column ${String(fault.earlierAnchorColumnIndex)}, but a grid position belongs to one region only`;
131
+ }
132
+ }
50
133
  function placedGridWidth(rows, columnCount) {
51
134
  let width = columnCount;
52
135
  for (const row of rows) for (const { columnIndex, cell } of row.cells) width = Math.max(width, columnIndex + tableCellColumnSpan(cell));
@@ -110,4 +193,4 @@ function placeAnchorTableRows(rows, columnCount) {
110
193
  return denseTableRows(positionAnchorRows(rows), columnCount);
111
194
  }
112
195
  //#endregion
113
- export { denseTableRows, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid };
196
+ export { denseTableRows, describeTableGridFault, findTableGridFault, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-schema",
3
- "version": "7.12.0",
3
+ "version": "7.14.0",
4
4
  "description": "The canonical, format-agnostic content and document-tree schemas shared by ooxml.js, odf.js, documents.js, pdf-codec, and markdown-codec, plus the structural transform between them -- no format-specific or I/O behaviour.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/content-document.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/content-document.schema.json",
4
4
  "oneOf": [
5
5
  {
6
6
  "type": "object",
@@ -133,7 +133,7 @@
133
133
  "blocks": {
134
134
  "type": "array",
135
135
  "items": {
136
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
136
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/undefined#/$defs/schema2"
137
137
  }
138
138
  },
139
139
  "breakType": {
@@ -151,19 +151,19 @@
151
151
  "default": {
152
152
  "type": "array",
153
153
  "items": {
154
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
154
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/undefined#/$defs/schema2"
155
155
  }
156
156
  },
157
157
  "even": {
158
158
  "type": "array",
159
159
  "items": {
160
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
160
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/undefined#/$defs/schema2"
161
161
  }
162
162
  },
163
163
  "first": {
164
164
  "type": "array",
165
165
  "items": {
166
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
166
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/undefined#/$defs/schema2"
167
167
  }
168
168
  }
169
169
  },
@@ -175,19 +175,19 @@
175
175
  "default": {
176
176
  "type": "array",
177
177
  "items": {
178
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
178
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/undefined#/$defs/schema2"
179
179
  }
180
180
  },
181
181
  "even": {
182
182
  "type": "array",
183
183
  "items": {
184
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
184
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/undefined#/$defs/schema2"
185
185
  }
186
186
  },
187
187
  "first": {
188
188
  "type": "array",
189
189
  "items": {
190
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
190
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/undefined#/$defs/schema2"
191
191
  }
192
192
  }
193
193
  },
@@ -199,19 +199,19 @@
199
199
  "default": {
200
200
  "type": "array",
201
201
  "items": {
202
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
202
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/undefined#/$defs/schema2"
203
203
  }
204
204
  },
205
205
  "even": {
206
206
  "type": "array",
207
207
  "items": {
208
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
208
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/undefined#/$defs/schema2"
209
209
  }
210
210
  },
211
211
  "first": {
212
212
  "type": "array",
213
213
  "items": {
214
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
214
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/undefined#/$defs/schema2"
215
215
  }
216
216
  }
217
217
  },
@@ -638,7 +638,7 @@
638
638
  "blocks": {
639
639
  "type": "array",
640
640
  "items": {
641
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
641
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/undefined#/$defs/schema2"
642
642
  }
643
643
  }
644
644
  },
@@ -2659,7 +2659,7 @@
2659
2659
  ]
2660
2660
  },
2661
2661
  "document": {
2662
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/content-document.schema.json"
2662
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/content-document.schema.json"
2663
2663
  },
2664
2664
  "frame": {
2665
2665
  "type": "object",
@@ -5021,7 +5021,7 @@
5021
5021
  "blocks": {
5022
5022
  "type": "array",
5023
5023
  "items": {
5024
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
5024
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/undefined#/$defs/schema2"
5025
5025
  }
5026
5026
  }
5027
5027
  },
@@ -7955,6 +7955,9 @@
7955
7955
  "ltr",
7956
7956
  "rtl"
7957
7957
  ]
7958
+ },
7959
+ "isHeader": {
7960
+ "type": "boolean"
7958
7961
  }
7959
7962
  },
7960
7963
  "required": [
@@ -8027,7 +8030,7 @@
8027
8030
  ]
8028
8031
  },
8029
8032
  "document": {
8030
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/content-document.schema.json"
8033
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/content-document.schema.json"
8031
8034
  },
8032
8035
  "frame": {
8033
8036
  "$ref": "#/$defs/Box"
@@ -10353,7 +10356,7 @@
10353
10356
  ]
10354
10357
  },
10355
10358
  "document": {
10356
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/content-document.schema.json"
10359
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.0/schemas/content-document.schema.json"
10357
10360
  },
10358
10361
  "frame": {
10359
10362
  "$ref": "#/$defs/Box"