document-content-model 7.16.1 → 7.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bijection-corpus.d.cts +2 -2
- package/dist/bijection-corpus.d.ts +2 -2
- package/dist/codec.d.cts +1 -1
- package/dist/codec.d.ts +1 -1
- package/dist/{construct-C9cYkjnd.d.cts → construct-GVdTKrE7.d.cts} +3 -3
- package/dist/{construct-C9cYkjnd.d.ts → construct-GVdTKrE7.d.ts} +3 -3
- package/dist/construct.d.cts +1 -1
- package/dist/construct.d.ts +1 -1
- package/dist/{content-drawing-3yNJVteg.d.cts → content-drawing-B8qYC1v8.d.cts} +1 -1
- package/dist/{content-drawing-cjm6n33_.d.ts → content-drawing-CypGc2s2.d.ts} +1 -1
- package/dist/content-drawing.d.cts +1 -1
- package/dist/content-drawing.d.ts +1 -1
- package/dist/{content-UFAqR2zQ.d.cts → content-jSzkMuZE.d.cts} +59 -59
- package/dist/content-sheet.d.cts +1 -1
- package/dist/content-sheet.d.ts +1 -1
- package/dist/{content-C8oVg7U_.d.ts → content-t8l-stjQ.d.ts} +59 -59
- package/dist/content-vocabulary.d.cts +1 -1
- package/dist/content-vocabulary.d.ts +1 -1
- package/dist/content.d.cts +1 -1
- package/dist/content.d.ts +1 -1
- package/dist/decompose.d.cts +3 -3
- package/dist/decompose.d.ts +3 -3
- package/dist/definitions.d.cts +1 -1
- package/dist/definitions.d.ts +1 -1
- package/dist/factor-styles.d.cts +1 -1
- package/dist/factor-styles.d.ts +1 -1
- package/dist/flatten.d.cts +1 -1
- package/dist/flatten.d.ts +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/{math-BScHxedi.d.cts → math-DdIQCljT.d.cts} +9 -9
- package/dist/{math-BScHxedi.d.ts → math-DdIQCljT.d.ts} +9 -9
- package/dist/math.d.cts +1 -1
- package/dist/math.d.ts +1 -1
- package/dist/{package-node-CoWOKxt7.d.ts → package-node-1GqgqcZC.d.ts} +42 -42
- package/dist/{package-node-H2Calta4.d.cts → package-node-ChN_eQFL.d.cts} +42 -42
- package/dist/package-node.d.cts +1 -1
- package/dist/package-node.d.ts +1 -1
- package/dist/package.d.cts +7 -7
- package/dist/package.d.ts +7 -7
- package/dist/schema-io.cjs +2 -2
- package/dist/schema-io.d.cts +1 -1
- package/dist/schema-io.d.ts +1 -1
- package/dist/schema-io.js +2 -2
- package/dist/table-grid.cjs +20 -6
- package/dist/table-grid.d.cts +3 -1
- package/dist/table-grid.d.ts +3 -1
- package/dist/table-grid.js +20 -6
- package/package.json +1 -1
- package/schemas/content-document.schema.json +16 -16
- package/schemas/document-tree.schema.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as ContentEmbeddedObject, h as ContentFormula, i as ContentConstructEnd, n as ContentBlock, o as ContentConstructStart, vt as ContentSheetImage } from "./content-
|
|
2
|
-
import { k as ContentVector } from "./content-drawing-
|
|
3
|
-
import { a as ConstructDescriptor } from "./construct-
|
|
1
|
+
import { f as ContentEmbeddedObject, h as ContentFormula, i as ContentConstructEnd, n as ContentBlock, o as ContentConstructStart, vt as ContentSheetImage } from "./content-jSzkMuZE.cjs";
|
|
2
|
+
import { k as ContentVector } from "./content-drawing-B8qYC1v8.cjs";
|
|
3
|
+
import { a as ConstructDescriptor } from "./construct-GVdTKrE7.cjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/package-node.d.ts
|
|
6
6
|
declare const SectionDescriptorSchema: z.ZodObject<{
|
|
@@ -61,17 +61,17 @@ declare const SectionDescriptorSchema: z.ZodObject<{
|
|
|
61
61
|
bottomPt: z.ZodNumber;
|
|
62
62
|
leftPt: z.ZodNumber;
|
|
63
63
|
}, z.core.$strip>;
|
|
64
|
+
headers: z.ZodOptional<z.ZodObject<{
|
|
65
|
+
default: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<ContentBlock, ContentBlock, z.core.$ZodTypeInternals<ContentBlock, ContentBlock>>>>>;
|
|
66
|
+
even: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<ContentBlock, ContentBlock, z.core.$ZodTypeInternals<ContentBlock, ContentBlock>>>>>;
|
|
67
|
+
first: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<ContentBlock, ContentBlock, z.core.$ZodTypeInternals<ContentBlock, ContentBlock>>>>>;
|
|
68
|
+
}, z.core.$strip>>;
|
|
64
69
|
breakType: z.ZodOptional<z.ZodEnum<{
|
|
65
70
|
nextPage: "nextPage";
|
|
66
71
|
continuous: "continuous";
|
|
67
72
|
evenPage: "evenPage";
|
|
68
73
|
oddPage: "oddPage";
|
|
69
74
|
}>>;
|
|
70
|
-
headers: z.ZodOptional<z.ZodObject<{
|
|
71
|
-
default: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<ContentBlock, ContentBlock, z.core.$ZodTypeInternals<ContentBlock, ContentBlock>>>>>;
|
|
72
|
-
even: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<ContentBlock, ContentBlock, z.core.$ZodTypeInternals<ContentBlock, ContentBlock>>>>>;
|
|
73
|
-
first: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<ContentBlock, ContentBlock, z.core.$ZodTypeInternals<ContentBlock, ContentBlock>>>>>;
|
|
74
|
-
}, z.core.$strip>>;
|
|
75
75
|
footers: z.ZodOptional<z.ZodObject<{
|
|
76
76
|
default: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<ContentBlock, ContentBlock, z.core.$ZodTypeInternals<ContentBlock, ContentBlock>>>>>;
|
|
77
77
|
even: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<ContentBlock, ContentBlock, z.core.$ZodTypeInternals<ContentBlock, ContentBlock>>>>>;
|
|
@@ -142,6 +142,7 @@ declare const SlideDescriptorSchema: z.ZodObject<{
|
|
|
142
142
|
}, z.core.$strict>;
|
|
143
143
|
type SlideDescriptor = z.infer<typeof SlideDescriptorSchema>;
|
|
144
144
|
declare const SheetDescriptorSchema: z.ZodObject<{
|
|
145
|
+
name: z.ZodString;
|
|
145
146
|
source: z.ZodOptional<z.ZodObject<{
|
|
146
147
|
format: z.ZodEnum<{
|
|
147
148
|
docx: "docx";
|
|
@@ -162,7 +163,6 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
162
163
|
}>;
|
|
163
164
|
xml: z.ZodString;
|
|
164
165
|
}, z.core.$strict>>;
|
|
165
|
-
name: z.ZodString;
|
|
166
166
|
origin: z.ZodOptional<z.ZodEnum<{
|
|
167
167
|
chart: "chart";
|
|
168
168
|
diagram: "diagram";
|
|
@@ -190,6 +190,16 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
190
190
|
at: z.ZodString;
|
|
191
191
|
}, z.core.$strip>>;
|
|
192
192
|
}, z.core.$strip>>;
|
|
193
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
194
|
+
index: z.ZodNumber;
|
|
195
|
+
heightPt: z.ZodOptional<z.ZodNumber>;
|
|
196
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
197
|
+
}, z.core.$strip>>;
|
|
198
|
+
columns: z.ZodArray<z.ZodObject<{
|
|
199
|
+
index: z.ZodNumber;
|
|
200
|
+
widthPt: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
202
|
+
}, z.core.$strip>>;
|
|
193
203
|
printSettings: z.ZodObject<{
|
|
194
204
|
pageSize: z.ZodObject<{
|
|
195
205
|
widthPt: z.ZodNumber;
|
|
@@ -600,16 +610,6 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
600
610
|
heightPt: z.ZodNumber;
|
|
601
611
|
}, z.core.$strip>>>;
|
|
602
612
|
}, z.core.$strip>>;
|
|
603
|
-
columns: z.ZodArray<z.ZodObject<{
|
|
604
|
-
index: z.ZodNumber;
|
|
605
|
-
widthPt: z.ZodOptional<z.ZodNumber>;
|
|
606
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
607
|
-
}, z.core.$strip>>;
|
|
608
|
-
rows: z.ZodArray<z.ZodObject<{
|
|
609
|
-
index: z.ZodNumber;
|
|
610
|
-
heightPt: z.ZodOptional<z.ZodNumber>;
|
|
611
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
612
|
-
}, z.core.$strip>>;
|
|
613
613
|
dataValidations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
614
614
|
ranges: z.ZodArray<z.ZodObject<{
|
|
615
615
|
startRow: z.ZodNumber;
|
|
@@ -1094,8 +1094,8 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
1094
1094
|
value: z.ZodObject<{
|
|
1095
1095
|
type: z.ZodEnum<{
|
|
1096
1096
|
formula: "formula";
|
|
1097
|
-
percent: "percent";
|
|
1098
1097
|
num: "num";
|
|
1098
|
+
percent: "percent";
|
|
1099
1099
|
max: "max";
|
|
1100
1100
|
min: "min";
|
|
1101
1101
|
percentile: "percentile";
|
|
@@ -1141,8 +1141,8 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
1141
1141
|
min: z.ZodObject<{
|
|
1142
1142
|
type: z.ZodEnum<{
|
|
1143
1143
|
formula: "formula";
|
|
1144
|
-
percent: "percent";
|
|
1145
1144
|
num: "num";
|
|
1145
|
+
percent: "percent";
|
|
1146
1146
|
max: "max";
|
|
1147
1147
|
min: "min";
|
|
1148
1148
|
percentile: "percentile";
|
|
@@ -1152,8 +1152,8 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
1152
1152
|
max: z.ZodObject<{
|
|
1153
1153
|
type: z.ZodEnum<{
|
|
1154
1154
|
formula: "formula";
|
|
1155
|
-
percent: "percent";
|
|
1156
1155
|
num: "num";
|
|
1156
|
+
percent: "percent";
|
|
1157
1157
|
max: "max";
|
|
1158
1158
|
min: "min";
|
|
1159
1159
|
percentile: "percentile";
|
|
@@ -1200,8 +1200,8 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
1200
1200
|
thresholds: z.ZodArray<z.ZodObject<{
|
|
1201
1201
|
type: z.ZodEnum<{
|
|
1202
1202
|
formula: "formula";
|
|
1203
|
-
percent: "percent";
|
|
1204
1203
|
num: "num";
|
|
1204
|
+
percent: "percent";
|
|
1205
1205
|
max: "max";
|
|
1206
1206
|
min: "min";
|
|
1207
1207
|
percentile: "percentile";
|
|
@@ -1299,6 +1299,23 @@ declare const DrawPageDescriptorSchema: z.ZodObject<{
|
|
|
1299
1299
|
}, z.core.$strict>;
|
|
1300
1300
|
type DrawPageDescriptor = z.infer<typeof DrawPageDescriptorSchema>;
|
|
1301
1301
|
declare const ShapeDescriptorSchema: z.ZodObject<{
|
|
1302
|
+
frame: z.ZodObject<{
|
|
1303
|
+
xPt: z.ZodNumber;
|
|
1304
|
+
yPt: z.ZodNumber;
|
|
1305
|
+
widthPt: z.ZodNumber;
|
|
1306
|
+
heightPt: z.ZodNumber;
|
|
1307
|
+
}, z.core.$strip>;
|
|
1308
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1309
|
+
rotationDeg: z.ZodOptional<z.ZodNumber>;
|
|
1310
|
+
insetLeftPt: z.ZodNumber;
|
|
1311
|
+
insetTopPt: z.ZodNumber;
|
|
1312
|
+
insetRightPt: z.ZodNumber;
|
|
1313
|
+
insetBottomPt: z.ZodNumber;
|
|
1314
|
+
fontScale: z.ZodOptional<z.ZodNumber>;
|
|
1315
|
+
lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
|
|
1316
|
+
paintOrder: z.ZodOptional<z.ZodNumber>;
|
|
1317
|
+
readingOrder: z.ZodOptional<z.ZodNumber>;
|
|
1318
|
+
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1302
1319
|
source: z.ZodOptional<z.ZodObject<{
|
|
1303
1320
|
format: z.ZodEnum<{
|
|
1304
1321
|
docx: "docx";
|
|
@@ -1319,23 +1336,6 @@ declare const ShapeDescriptorSchema: z.ZodObject<{
|
|
|
1319
1336
|
}>;
|
|
1320
1337
|
xml: z.ZodString;
|
|
1321
1338
|
}, z.core.$strict>>;
|
|
1322
|
-
name: z.ZodOptional<z.ZodString>;
|
|
1323
|
-
frame: z.ZodObject<{
|
|
1324
|
-
xPt: z.ZodNumber;
|
|
1325
|
-
yPt: z.ZodNumber;
|
|
1326
|
-
widthPt: z.ZodNumber;
|
|
1327
|
-
heightPt: z.ZodNumber;
|
|
1328
|
-
}, z.core.$strip>;
|
|
1329
|
-
rotationDeg: z.ZodOptional<z.ZodNumber>;
|
|
1330
|
-
insetLeftPt: z.ZodNumber;
|
|
1331
|
-
insetTopPt: z.ZodNumber;
|
|
1332
|
-
insetRightPt: z.ZodNumber;
|
|
1333
|
-
insetBottomPt: z.ZodNumber;
|
|
1334
|
-
fontScale: z.ZodOptional<z.ZodNumber>;
|
|
1335
|
-
lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
|
|
1336
|
-
paintOrder: z.ZodOptional<z.ZodNumber>;
|
|
1337
|
-
readingOrder: z.ZodOptional<z.ZodNumber>;
|
|
1338
|
-
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1339
1339
|
frames: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1340
1340
|
pageIndex: z.ZodNumber;
|
|
1341
1341
|
xPt: z.ZodNumber;
|
|
@@ -1483,12 +1483,12 @@ declare const HeadingParagraphSchema: z.ZodObject<{
|
|
|
1483
1483
|
descriptor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1484
1484
|
kind: z.ZodLiteral<"contentControl">;
|
|
1485
1485
|
controlType: z.ZodEnum<{
|
|
1486
|
+
date: "date";
|
|
1486
1487
|
richText: "richText";
|
|
1487
1488
|
plainText: "plainText";
|
|
1488
1489
|
checkbox: "checkbox";
|
|
1489
1490
|
dropDown: "dropDown";
|
|
1490
1491
|
comboBox: "comboBox";
|
|
1491
|
-
date: "date";
|
|
1492
1492
|
picture: "picture";
|
|
1493
1493
|
repeatingSection: "repeatingSection";
|
|
1494
1494
|
button: "button";
|
|
@@ -1908,12 +1908,12 @@ declare const ListParagraphSchema: z.ZodObject<{
|
|
|
1908
1908
|
descriptor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1909
1909
|
kind: z.ZodLiteral<"contentControl">;
|
|
1910
1910
|
controlType: z.ZodEnum<{
|
|
1911
|
+
date: "date";
|
|
1911
1912
|
richText: "richText";
|
|
1912
1913
|
plainText: "plainText";
|
|
1913
1914
|
checkbox: "checkbox";
|
|
1914
1915
|
dropDown: "dropDown";
|
|
1915
1916
|
comboBox: "comboBox";
|
|
1916
|
-
date: "date";
|
|
1917
1917
|
picture: "picture";
|
|
1918
1918
|
repeatingSection: "repeatingSection";
|
|
1919
1919
|
button: "button";
|
package/dist/package-node.d.cts
CHANGED
|
@@ -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-
|
|
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-ChN_eQFL.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 };
|
package/dist/package-node.d.ts
CHANGED
|
@@ -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-
|
|
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-1GqgqcZC.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 };
|
package/dist/package.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as MathMlNode } from "./mathml-Czqc1mdZ.cjs";
|
|
2
|
-
import { p as MathExpression } from "./math-
|
|
3
|
-
import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-
|
|
2
|
+
import { p as MathExpression } from "./math-DdIQCljT.cjs";
|
|
3
|
+
import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-ChN_eQFL.cjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/package.d.ts
|
|
6
6
|
declare const TreeEmbeddedFontSchema: z.ZodObject<{
|
|
@@ -112,9 +112,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
112
112
|
symbol: z.ZodString;
|
|
113
113
|
name: z.ZodOptional<z.ZodString>;
|
|
114
114
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
115
|
+
time: "time";
|
|
115
116
|
length: "length";
|
|
116
117
|
mass: "mass";
|
|
117
|
-
time: "time";
|
|
118
118
|
electricCurrent: "electricCurrent";
|
|
119
119
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
120
120
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -267,9 +267,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
267
267
|
symbol: z.ZodString;
|
|
268
268
|
name: z.ZodOptional<z.ZodString>;
|
|
269
269
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
270
|
+
time: "time";
|
|
270
271
|
length: "length";
|
|
271
272
|
mass: "mass";
|
|
272
|
-
time: "time";
|
|
273
273
|
electricCurrent: "electricCurrent";
|
|
274
274
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
275
275
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -427,9 +427,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
427
427
|
symbol: z.ZodString;
|
|
428
428
|
name: z.ZodOptional<z.ZodString>;
|
|
429
429
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
430
|
+
time: "time";
|
|
430
431
|
length: "length";
|
|
431
432
|
mass: "mass";
|
|
432
|
-
time: "time";
|
|
433
433
|
electricCurrent: "electricCurrent";
|
|
434
434
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
435
435
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -582,9 +582,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
582
582
|
symbol: z.ZodString;
|
|
583
583
|
name: z.ZodOptional<z.ZodString>;
|
|
584
584
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
585
|
+
time: "time";
|
|
585
586
|
length: "length";
|
|
586
587
|
mass: "mass";
|
|
587
|
-
time: "time";
|
|
588
588
|
electricCurrent: "electricCurrent";
|
|
589
589
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
590
590
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -796,9 +796,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
796
796
|
symbol: z.ZodString;
|
|
797
797
|
name: z.ZodOptional<z.ZodString>;
|
|
798
798
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
799
|
+
time: "time";
|
|
799
800
|
length: "length";
|
|
800
801
|
mass: "mass";
|
|
801
|
-
time: "time";
|
|
802
802
|
electricCurrent: "electricCurrent";
|
|
803
803
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
804
804
|
amountOfSubstance: "amountOfSubstance";
|
package/dist/package.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as MathMlNode } from "./mathml-Czqc1mdZ.js";
|
|
2
|
-
import { p as MathExpression } from "./math-
|
|
3
|
-
import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-
|
|
2
|
+
import { p as MathExpression } from "./math-DdIQCljT.js";
|
|
3
|
+
import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-1GqgqcZC.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/package.d.ts
|
|
6
6
|
declare const TreeEmbeddedFontSchema: z.ZodObject<{
|
|
@@ -112,9 +112,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
112
112
|
symbol: z.ZodString;
|
|
113
113
|
name: z.ZodOptional<z.ZodString>;
|
|
114
114
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
115
|
+
time: "time";
|
|
115
116
|
length: "length";
|
|
116
117
|
mass: "mass";
|
|
117
|
-
time: "time";
|
|
118
118
|
electricCurrent: "electricCurrent";
|
|
119
119
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
120
120
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -267,9 +267,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
267
267
|
symbol: z.ZodString;
|
|
268
268
|
name: z.ZodOptional<z.ZodString>;
|
|
269
269
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
270
|
+
time: "time";
|
|
270
271
|
length: "length";
|
|
271
272
|
mass: "mass";
|
|
272
|
-
time: "time";
|
|
273
273
|
electricCurrent: "electricCurrent";
|
|
274
274
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
275
275
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -427,9 +427,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
427
427
|
symbol: z.ZodString;
|
|
428
428
|
name: z.ZodOptional<z.ZodString>;
|
|
429
429
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
430
|
+
time: "time";
|
|
430
431
|
length: "length";
|
|
431
432
|
mass: "mass";
|
|
432
|
-
time: "time";
|
|
433
433
|
electricCurrent: "electricCurrent";
|
|
434
434
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
435
435
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -582,9 +582,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
582
582
|
symbol: z.ZodString;
|
|
583
583
|
name: z.ZodOptional<z.ZodString>;
|
|
584
584
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
585
|
+
time: "time";
|
|
585
586
|
length: "length";
|
|
586
587
|
mass: "mass";
|
|
587
|
-
time: "time";
|
|
588
588
|
electricCurrent: "electricCurrent";
|
|
589
589
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
590
590
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -796,9 +796,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
796
796
|
symbol: z.ZodString;
|
|
797
797
|
name: z.ZodOptional<z.ZodString>;
|
|
798
798
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
799
|
+
time: "time";
|
|
799
800
|
length: "length";
|
|
800
801
|
mass: "mass";
|
|
801
|
-
time: "time";
|
|
802
802
|
electricCurrent: "electricCurrent";
|
|
803
803
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
804
804
|
amountOfSubstance: "amountOfSubstance";
|
package/dist/schema-io.cjs
CHANGED
|
@@ -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.16.
|
|
10
|
+
return `https://cdn.jsdelivr.net/npm/document-schema.js@7.16.2/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) {
|
|
@@ -105,7 +105,7 @@ function documentFromJson(value) {
|
|
|
105
105
|
if (parts.stem === "document-package") throw new DocumentPackageRenamedError(value.$schema);
|
|
106
106
|
const kind = kindForFileStem(parts.stem);
|
|
107
107
|
if (kind === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
|
|
108
|
-
if (majorVersionOf(parts.version) !== majorVersionOf("7.16.
|
|
108
|
+
if (majorVersionOf(parts.version) !== majorVersionOf("7.16.2")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.16.2");
|
|
109
109
|
switch (kind) {
|
|
110
110
|
case "DocumentTree": return {
|
|
111
111
|
kind,
|
package/dist/schema-io.d.cts
CHANGED
package/dist/schema-io.d.ts
CHANGED
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.16.
|
|
9
|
+
return `https://cdn.jsdelivr.net/npm/document-schema.js@7.16.2/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) {
|
|
@@ -104,7 +104,7 @@ function documentFromJson(value) {
|
|
|
104
104
|
if (parts.stem === "document-package") throw new DocumentPackageRenamedError(value.$schema);
|
|
105
105
|
const kind = kindForFileStem(parts.stem);
|
|
106
106
|
if (kind === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
|
|
107
|
-
if (majorVersionOf(parts.version) !== majorVersionOf("7.16.
|
|
107
|
+
if (majorVersionOf(parts.version) !== majorVersionOf("7.16.2")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.16.2");
|
|
108
108
|
switch (kind) {
|
|
109
109
|
case "DocumentTree": return {
|
|
110
110
|
kind,
|
package/dist/table-grid.cjs
CHANGED
|
@@ -16,18 +16,27 @@ function tableGridColumnCount(table) {
|
|
|
16
16
|
for (const row of table.rows) count = Math.max(count, row.cells.length);
|
|
17
17
|
return count;
|
|
18
18
|
}
|
|
19
|
-
function coveringAnchor(
|
|
20
|
-
|
|
19
|
+
function coveringAnchor(columnAnchors, rowIndex) {
|
|
20
|
+
if (columnAnchors === void 0) return;
|
|
21
|
+
let first = columnAnchors[0];
|
|
22
|
+
while (first !== void 0 && first.rowEnd <= rowIndex) {
|
|
23
|
+
columnAnchors.shift();
|
|
24
|
+
first = columnAnchors[0];
|
|
25
|
+
}
|
|
26
|
+
return first;
|
|
21
27
|
}
|
|
22
28
|
/**
|
|
23
29
|
* Classify every entry of every row as an anchor or as covered, in row-major order, one inner array per table row.
|
|
24
30
|
*
|
|
25
31
|
* 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.
|
|
32
|
+
*
|
|
33
|
+
* The work is linear in the table's entries plus the grid positions the anchors' spans cover, not quadratic in the entries: a position asks only about the anchors reaching its own column and row.
|
|
26
34
|
*/
|
|
27
35
|
function walkTableGrid(table) {
|
|
28
|
-
const
|
|
36
|
+
const anchorsByColumn = /* @__PURE__ */ new Map();
|
|
37
|
+
const gridWidth = widestRowLength(table);
|
|
29
38
|
return table.rows.map((row, rowIndex) => row.cells.map((cell, columnIndex) => {
|
|
30
|
-
const anchor = coveringAnchor(
|
|
39
|
+
const anchor = coveringAnchor(anchorsByColumn.get(columnIndex), rowIndex);
|
|
31
40
|
if (anchor !== void 0) return {
|
|
32
41
|
rowIndex,
|
|
33
42
|
columnIndex,
|
|
@@ -35,12 +44,17 @@ function walkTableGrid(table) {
|
|
|
35
44
|
anchorRowIndex: anchor.row,
|
|
36
45
|
anchorColumnIndex: anchor.column
|
|
37
46
|
};
|
|
38
|
-
|
|
47
|
+
const footprint = {
|
|
39
48
|
row: rowIndex,
|
|
40
49
|
column: columnIndex,
|
|
41
50
|
rowEnd: rowIndex + tableCellRowSpan(cell),
|
|
42
51
|
columnEnd: columnIndex + tableCellColumnSpan(cell)
|
|
43
|
-
}
|
|
52
|
+
};
|
|
53
|
+
for (let column = columnIndex; column < Math.min(footprint.columnEnd, gridWidth); column++) {
|
|
54
|
+
const columnAnchors = anchorsByColumn.get(column);
|
|
55
|
+
if (columnAnchors === void 0) anchorsByColumn.set(column, [footprint]);
|
|
56
|
+
else columnAnchors.push(footprint);
|
|
57
|
+
}
|
|
44
58
|
return {
|
|
45
59
|
rowIndex,
|
|
46
60
|
columnIndex,
|
package/dist/table-grid.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as TextDirection } from "./style-D06NwxAJ.cjs";
|
|
2
|
-
import { A as ContentTableCell, P as ContentTableRow, k as ContentTable } from "./content-
|
|
2
|
+
import { A as ContentTableCell, P as ContentTableRow, k as ContentTable } from "./content-jSzkMuZE.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;
|
|
@@ -31,6 +31,8 @@ type TableGridPosition = TableGridAnchor | TableGridCovered;
|
|
|
31
31
|
* Classify every entry of every row as an anchor or as covered, in row-major order, one inner array per table row.
|
|
32
32
|
*
|
|
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
|
+
*
|
|
35
|
+
* The work is linear in the table's entries plus the grid positions the anchors' spans cover, not quadratic in the entries: a position asks only about the anchors reaching its own column and row.
|
|
34
36
|
*/
|
|
35
37
|
declare function walkTableGrid(table: ContentTable): TableGridPosition[][];
|
|
36
38
|
/**
|
package/dist/table-grid.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as TextDirection } from "./style-D06NwxAJ.js";
|
|
2
|
-
import { A as ContentTableCell, P as ContentTableRow, k as ContentTable } from "./content-
|
|
2
|
+
import { A as ContentTableCell, P as ContentTableRow, k as ContentTable } from "./content-t8l-stjQ.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;
|
|
@@ -31,6 +31,8 @@ type TableGridPosition = TableGridAnchor | TableGridCovered;
|
|
|
31
31
|
* Classify every entry of every row as an anchor or as covered, in row-major order, one inner array per table row.
|
|
32
32
|
*
|
|
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
|
+
*
|
|
35
|
+
* The work is linear in the table's entries plus the grid positions the anchors' spans cover, not quadratic in the entries: a position asks only about the anchors reaching its own column and row.
|
|
34
36
|
*/
|
|
35
37
|
declare function walkTableGrid(table: ContentTable): TableGridPosition[][];
|
|
36
38
|
/**
|
package/dist/table-grid.js
CHANGED
|
@@ -15,18 +15,27 @@ function tableGridColumnCount(table) {
|
|
|
15
15
|
for (const row of table.rows) count = Math.max(count, row.cells.length);
|
|
16
16
|
return count;
|
|
17
17
|
}
|
|
18
|
-
function coveringAnchor(
|
|
19
|
-
|
|
18
|
+
function coveringAnchor(columnAnchors, rowIndex) {
|
|
19
|
+
if (columnAnchors === void 0) return;
|
|
20
|
+
let first = columnAnchors[0];
|
|
21
|
+
while (first !== void 0 && first.rowEnd <= rowIndex) {
|
|
22
|
+
columnAnchors.shift();
|
|
23
|
+
first = columnAnchors[0];
|
|
24
|
+
}
|
|
25
|
+
return first;
|
|
20
26
|
}
|
|
21
27
|
/**
|
|
22
28
|
* Classify every entry of every row as an anchor or as covered, in row-major order, one inner array per table row.
|
|
23
29
|
*
|
|
24
30
|
* 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.
|
|
31
|
+
*
|
|
32
|
+
* The work is linear in the table's entries plus the grid positions the anchors' spans cover, not quadratic in the entries: a position asks only about the anchors reaching its own column and row.
|
|
25
33
|
*/
|
|
26
34
|
function walkTableGrid(table) {
|
|
27
|
-
const
|
|
35
|
+
const anchorsByColumn = /* @__PURE__ */ new Map();
|
|
36
|
+
const gridWidth = widestRowLength(table);
|
|
28
37
|
return table.rows.map((row, rowIndex) => row.cells.map((cell, columnIndex) => {
|
|
29
|
-
const anchor = coveringAnchor(
|
|
38
|
+
const anchor = coveringAnchor(anchorsByColumn.get(columnIndex), rowIndex);
|
|
30
39
|
if (anchor !== void 0) return {
|
|
31
40
|
rowIndex,
|
|
32
41
|
columnIndex,
|
|
@@ -34,12 +43,17 @@ function walkTableGrid(table) {
|
|
|
34
43
|
anchorRowIndex: anchor.row,
|
|
35
44
|
anchorColumnIndex: anchor.column
|
|
36
45
|
};
|
|
37
|
-
|
|
46
|
+
const footprint = {
|
|
38
47
|
row: rowIndex,
|
|
39
48
|
column: columnIndex,
|
|
40
49
|
rowEnd: rowIndex + tableCellRowSpan(cell),
|
|
41
50
|
columnEnd: columnIndex + tableCellColumnSpan(cell)
|
|
42
|
-
}
|
|
51
|
+
};
|
|
52
|
+
for (let column = columnIndex; column < Math.min(footprint.columnEnd, gridWidth); column++) {
|
|
53
|
+
const columnAnchors = anchorsByColumn.get(column);
|
|
54
|
+
if (columnAnchors === void 0) anchorsByColumn.set(column, [footprint]);
|
|
55
|
+
else columnAnchors.push(footprint);
|
|
56
|
+
}
|
|
43
57
|
return {
|
|
44
58
|
rowIndex,
|
|
45
59
|
columnIndex,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "document-content-model",
|
|
3
|
-
"version": "7.16.
|
|
3
|
+
"version": "7.16.2",
|
|
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": {
|