document-model.js 4.2.0 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -4
- package/dist/canonicalise.cjs +20 -0
- package/dist/canonicalise.d.cts +5 -0
- package/dist/canonicalise.d.ts +5 -0
- package/dist/canonicalise.js +18 -0
- package/dist/codec.d.cts +1 -1
- package/dist/codec.d.ts +1 -1
- package/dist/{construct-CdQuI9f5.d.cts → construct-ETSlnMle.d.cts} +3 -3
- package/dist/{construct-CdQuI9f5.d.ts → construct-ETSlnMle.d.ts} +3 -3
- package/dist/construct.d.cts +1 -1
- package/dist/construct.d.ts +1 -1
- package/dist/{content-CIwPb_yh.d.ts → content-32bPQ3aj.d.ts} +1 -1
- package/dist/{content-BmqzegMG.d.cts → content-CFXL4jMV.d.cts} +1 -1
- package/dist/content.d.cts +1 -1
- package/dist/content.d.ts +1 -1
- package/dist/decompose.cjs +186 -0
- package/dist/decompose.d.cts +18 -0
- package/dist/decompose.d.ts +18 -0
- package/dist/decompose.js +177 -0
- package/dist/definitions.d.cts +1 -1
- package/dist/definitions.d.ts +1 -1
- package/dist/factor-styles.cjs +435 -0
- package/dist/factor-styles.d.cts +9 -0
- package/dist/factor-styles.d.ts +9 -0
- package/dist/factor-styles.js +432 -0
- package/dist/flatten.cjs +154 -0
- package/dist/flatten.d.cts +6 -0
- package/dist/flatten.d.ts +6 -0
- package/dist/flatten.js +153 -0
- package/dist/index.cjs +8 -0
- package/dist/index.d.cts +8 -5
- package/dist/index.d.ts +8 -5
- package/dist/index.js +4 -1
- package/dist/{package-node-C7RiYhyk.d.ts → package-node-0EHr6E1z.d.ts} +3 -3
- package/dist/{package-node-a9CyRaD3.d.cts → package-node-D3XGBWfs.d.cts} +3 -3
- package/dist/package-node.d.cts +1 -1
- package/dist/package-node.d.ts +1 -1
- package/dist/package.d.cts +1 -1
- package/dist/package.d.ts +1 -1
- 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/package.json +3 -3
- package/schemas/content-document.schema.json +3 -3
- package/schemas/document-package.schema.json +3 -3
package/dist/flatten.js
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { ContentFormulaSchema } from "./content.js";
|
|
2
|
+
import { applyParagraphStyleProperties, applyRunStyleProperties, resolveStyleChain } from "./definitions.js";
|
|
3
|
+
//#region src/flatten.ts
|
|
4
|
+
function chainWithRef(chain, group) {
|
|
5
|
+
return group.style === void 0 ? chain : [...chain, group.style];
|
|
6
|
+
}
|
|
7
|
+
function entryOf(styles, chain) {
|
|
8
|
+
if (chain.length === 0) return void 0;
|
|
9
|
+
if (styles === void 0) throw new Error("flattenPackage: a group carries a style ref but the package has no styles table");
|
|
10
|
+
return resolveStyleChain(styles, chain);
|
|
11
|
+
}
|
|
12
|
+
function applyEntry(entry, paragraph) {
|
|
13
|
+
const withParagraph = applyParagraphStyleProperties(entry.paragraph, paragraph);
|
|
14
|
+
const runProperties = entry.run;
|
|
15
|
+
if (runProperties === void 0) return withParagraph;
|
|
16
|
+
return {
|
|
17
|
+
...withParagraph,
|
|
18
|
+
runs: withParagraph.runs.map((run) => applyRunStyleProperties(runProperties, run))
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function flattenPackage(pkg) {
|
|
22
|
+
const styles = pkg.styles;
|
|
23
|
+
const envelope = {
|
|
24
|
+
metadata: pkg.metadata,
|
|
25
|
+
...pkg.symbolTable !== void 0 ? { symbolTable: pkg.symbolTable } : {}
|
|
26
|
+
};
|
|
27
|
+
switch (pkg.kind) {
|
|
28
|
+
case "wordprocessing": return {
|
|
29
|
+
kind: "wordprocessing",
|
|
30
|
+
...envelope,
|
|
31
|
+
sections: pkg.children.map((group) => ({
|
|
32
|
+
...untag(group.node),
|
|
33
|
+
blocks: flattenSectionChildren(styles, chainWithRef([], group), group.children)
|
|
34
|
+
}))
|
|
35
|
+
};
|
|
36
|
+
case "presentation": return {
|
|
37
|
+
kind: "presentation",
|
|
38
|
+
...envelope,
|
|
39
|
+
slides: pkg.children.map((group) => {
|
|
40
|
+
const chain = chainWithRef([], group);
|
|
41
|
+
return {
|
|
42
|
+
...untag(group.node),
|
|
43
|
+
shapes: group.children.map((shape) => flattenShape(styles, chain, shape))
|
|
44
|
+
};
|
|
45
|
+
})
|
|
46
|
+
};
|
|
47
|
+
case "spreadsheet": return {
|
|
48
|
+
kind: "spreadsheet",
|
|
49
|
+
...envelope,
|
|
50
|
+
sheets: pkg.children.map((group) => {
|
|
51
|
+
if (group.style !== void 0) throw new Error("flattenPackage: a sheet group carries a style ref but a sheet holds no block flow to resolve it onto");
|
|
52
|
+
const images = [];
|
|
53
|
+
const embedded = [];
|
|
54
|
+
for (const child of group.children) if ("kind" in child) images.push(child);
|
|
55
|
+
else embedded.push(child);
|
|
56
|
+
return {
|
|
57
|
+
...untag(group.node),
|
|
58
|
+
images,
|
|
59
|
+
...embedded.length > 0 ? { embeddedObjects: embedded } : {}
|
|
60
|
+
};
|
|
61
|
+
})
|
|
62
|
+
};
|
|
63
|
+
case "drawing": return {
|
|
64
|
+
kind: "drawing",
|
|
65
|
+
...envelope,
|
|
66
|
+
pages: pkg.children.map((group) => {
|
|
67
|
+
const chain = chainWithRef([], group);
|
|
68
|
+
const shapes = [];
|
|
69
|
+
const vectors = [];
|
|
70
|
+
for (const child of group.children) if ("node" in child) shapes.push(flattenShape(styles, chain, child));
|
|
71
|
+
else vectors.push(child);
|
|
72
|
+
return {
|
|
73
|
+
...untag(group.node),
|
|
74
|
+
shapes,
|
|
75
|
+
vectors
|
|
76
|
+
};
|
|
77
|
+
})
|
|
78
|
+
};
|
|
79
|
+
case "formula": {
|
|
80
|
+
const first = pkg.children[0];
|
|
81
|
+
if (pkg.children.length !== 1 || first === void 0 || !ContentFormulaSchema.safeParse(first).success) throw new Error("flattenPackage: a formula package takes exactly one ContentFormula node");
|
|
82
|
+
return {
|
|
83
|
+
kind: "formula",
|
|
84
|
+
...envelope,
|
|
85
|
+
formula: first
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function untag(descriptor) {
|
|
91
|
+
const copy = { ...descriptor };
|
|
92
|
+
delete copy.kind;
|
|
93
|
+
return copy;
|
|
94
|
+
}
|
|
95
|
+
function flattenShape(styles, chain, group) {
|
|
96
|
+
return {
|
|
97
|
+
...group.node,
|
|
98
|
+
blocks: flattenListChildren(styles, chainWithRef(chain, group), group.children)
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function flattenSectionChildren(styles, chain, children) {
|
|
102
|
+
const blocks = [];
|
|
103
|
+
for (const child of children) if (isHeadingGroup(child)) {
|
|
104
|
+
const own = chainWithRef(chain, child);
|
|
105
|
+
blocks.push(resolveAnchor(styles, own, child.node), ...flattenSectionChildren(styles, own, child.children));
|
|
106
|
+
} else if (isListGroup(child)) {
|
|
107
|
+
const own = chainWithRef(chain, child);
|
|
108
|
+
blocks.push(resolveAnchor(styles, own, child.node), ...flattenListChildren(styles, own, child.children));
|
|
109
|
+
} else if (isConstructGroup(child)) {
|
|
110
|
+
const own = chainWithRef(chain, child);
|
|
111
|
+
blocks.push({
|
|
112
|
+
kind: "constructStart",
|
|
113
|
+
descriptor: child.node
|
|
114
|
+
}, ...flattenSectionChildren(styles, own, child.children), { kind: "constructEnd" });
|
|
115
|
+
} else if (child.kind === "paragraph") {
|
|
116
|
+
const entry = entryOf(styles, chain);
|
|
117
|
+
blocks.push(entry === void 0 ? child : applyEntry(entry, child));
|
|
118
|
+
} else blocks.push(child);
|
|
119
|
+
return blocks;
|
|
120
|
+
}
|
|
121
|
+
function flattenListChildren(styles, chain, children) {
|
|
122
|
+
const blocks = [];
|
|
123
|
+
for (const child of children) if (isListGroup(child)) {
|
|
124
|
+
const own = chainWithRef(chain, child);
|
|
125
|
+
blocks.push(resolveAnchor(styles, own, child.node), ...flattenListChildren(styles, own, child.children));
|
|
126
|
+
} else if (isConstructGroup(child)) {
|
|
127
|
+
const own = chainWithRef(chain, child);
|
|
128
|
+
blocks.push({
|
|
129
|
+
kind: "constructStart",
|
|
130
|
+
descriptor: child.node
|
|
131
|
+
}, ...flattenListChildren(styles, own, child.children), { kind: "constructEnd" });
|
|
132
|
+
} else if (child.kind === "paragraph") {
|
|
133
|
+
const entry = entryOf(styles, chain);
|
|
134
|
+
blocks.push(entry === void 0 ? child : applyEntry(entry, child));
|
|
135
|
+
} else blocks.push(child);
|
|
136
|
+
return blocks;
|
|
137
|
+
}
|
|
138
|
+
function isHeadingGroup(child) {
|
|
139
|
+
return "node" in child && "children" in child && child.node.kind === "paragraph" && child.node.headingLevel !== void 0;
|
|
140
|
+
}
|
|
141
|
+
function isListGroup(child) {
|
|
142
|
+
return "node" in child && "children" in child && child.node.kind === "paragraph" && child.node.list !== void 0;
|
|
143
|
+
}
|
|
144
|
+
function isConstructGroup(child) {
|
|
145
|
+
return "node" in child && "children" in child && child.node.kind !== "paragraph";
|
|
146
|
+
}
|
|
147
|
+
function resolveAnchor(styles, chain, anchor) {
|
|
148
|
+
const entry = entryOf(styles, chain);
|
|
149
|
+
if (entry === void 0) return anchor;
|
|
150
|
+
return applyEntry(entry, anchor);
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
export { flattenPackage };
|
package/dist/index.cjs
CHANGED
|
@@ -14,6 +14,9 @@ const require_package_node = require("./package-node.cjs");
|
|
|
14
14
|
const require_package = require("./package.cjs");
|
|
15
15
|
const require_schema_io = require("./schema-io.cjs");
|
|
16
16
|
const require_content_json_schema_defs = require("./content-json-schema-defs.cjs");
|
|
17
|
+
const require_decompose = require("./decompose.cjs");
|
|
18
|
+
const require_flatten = require("./flatten.cjs");
|
|
19
|
+
const require_factor_styles = require("./factor-styles.cjs");
|
|
17
20
|
require("./font-port.cjs");
|
|
18
21
|
require("./text-layout.cjs");
|
|
19
22
|
require("./math-layout.cjs");
|
|
@@ -26,6 +29,7 @@ exports.CONTENT_DEFS = require_content_json_schema_defs.CONTENT_DEFS;
|
|
|
26
29
|
exports.CONTENT_DOCUMENT_URI = require_content_json_schema_defs.CONTENT_DOCUMENT_URI;
|
|
27
30
|
exports.ColorSchema = require_color.ColorSchema;
|
|
28
31
|
exports.ConstructDescriptorSchema = require_construct.ConstructDescriptorSchema;
|
|
32
|
+
exports.ConstructMarkerImbalanceError = require_decompose.ConstructMarkerImbalanceError;
|
|
29
33
|
exports.ContentBlockSchema = require_content.ContentBlockSchema;
|
|
30
34
|
exports.ContentBorderSchema = require_content.ContentBorderSchema;
|
|
31
35
|
exports.ContentCellBordersSchema = require_content.ContentCellBordersSchema;
|
|
@@ -146,6 +150,7 @@ exports.SymbolTableSchema = require_math.SymbolTableSchema;
|
|
|
146
150
|
exports.UnrecognizedDocumentSchemaError = require_schema_io.UnrecognizedDocumentSchemaError;
|
|
147
151
|
exports.applyParagraphStyleProperties = require_definitions.applyParagraphStyleProperties;
|
|
148
152
|
exports.applyRunStyleProperties = require_definitions.applyRunStyleProperties;
|
|
153
|
+
exports.assemblePackage = require_factor_styles.assemblePackage;
|
|
149
154
|
exports.cellReference = require_a1.cellReference;
|
|
150
155
|
exports.clampHeadingLevel = require_content.clampHeadingLevel;
|
|
151
156
|
exports.colorToRgbHex = require_color.colorToRgbHex;
|
|
@@ -153,10 +158,13 @@ exports.columnIndexToLetters = require_a1.columnIndexToLetters;
|
|
|
153
158
|
exports.columnLettersToIndex = require_a1.columnLettersToIndex;
|
|
154
159
|
exports.contentDocumentSharedFields = require_content.contentDocumentSharedFields;
|
|
155
160
|
exports.contentDocumentWithSchema = require_schema_io.contentDocumentWithSchema;
|
|
161
|
+
exports.decompose = require_decompose.decompose;
|
|
156
162
|
exports.documentFromJson = require_schema_io.documentFromJson;
|
|
157
163
|
exports.documentPackageWithSchema = require_schema_io.documentPackageWithSchema;
|
|
158
164
|
exports.documentSchemaKindOf = require_schema_io.documentSchemaKindOf;
|
|
165
|
+
exports.factorStyles = require_factor_styles.factorStyles;
|
|
159
166
|
exports.findConstructMarkerImbalance = require_content.findConstructMarkerImbalance;
|
|
167
|
+
exports.flattenPackage = require_flatten.flattenPackage;
|
|
160
168
|
exports.isContentBlock = require_content.isContentBlock;
|
|
161
169
|
exports.isContentConstructEnd = require_content.isContentConstructEnd;
|
|
162
170
|
exports.isContentConstructStart = require_content.isContentConstructStart;
|
package/dist/index.d.cts
CHANGED
|
@@ -3,17 +3,20 @@ import { _ as isMathMlNode, a as MathMlComment, c as MathMlDeclarationSchema, d
|
|
|
3
3
|
import { A as MathUncertaintySchema, C as MathSum, D as MathSymbolEntry, E as MathSymSchema, F as SI_BASE_DIMENSIONS, I as SiBaseDimension, L as SymbolTable, M as MathUnitSchema, N as MathUnparsed, O as MathSymbolEntrySchema, P as MathUnparsedSchema, R as SymbolTableSchema, S as MathQtySchema, T as MathSym, _ as MathProd, a as MathApp, b as MathProvenanceSchema, c as MathExpressionSchema, d as MathNormalisationContext, f as MathNormalisationContextSchema, g as MathPresentationSchema, h as MathPresentation, i as ExactRationalSchema, j as MathUnit, k as MathUncertainty, l as MathMatrix, m as MathNumSchema, n as DimensionVectorSchema, o as MathAppSchema, p as MathNum, r as ExactRational, s as MathExpression, t as DimensionVector, u as MathMatrixSchema, v as MathProdSchema, w as MathSumSchema, x as MathQty, y as MathProvenance, z as isMathExpression } from "./math-B7gZJeND.cjs";
|
|
4
4
|
import { a as rgbHexToColor, i as colorToRgbHex, n as Color, r as ColorSchema, t as COLOR_BLACK } from "./color-AELCDH_b.cjs";
|
|
5
5
|
import { a as Margins, c as PAGE_SIZE_LETTER, d as Point, f as SLIDE_SIZE_STANDARD, i as LayoutFrameSchema, l as PageSize, n as BoxSchema, o as MarginsSchema, p as SLIDE_SIZE_WIDESCREEN, r as LayoutFrame, s as PAGE_SIZE_A4, t as Box, u as PageSizeSchema } from "./geometry-CvcjSwnA.cjs";
|
|
6
|
-
import { $ as ContentSheetPrintRangeSchema, A as ContentPageBreakSchema, At as isContentConstructEnd, B as ContentSectionSchema, C as ContentFormula, Ct as DecimalString, D as ContentListMembership, Dt as contentDocumentSharedFields, E as ContentImageBlockSchema, Et as clampHeadingLevel, F as ContentPathSegment, G as ContentSheetCellComment, H as ContentShapeSchema, I as ContentPathSegmentSchema, J as ContentSheetColumn, K as ContentSheetCellCommentSchema, L as ContentRun, M as ContentParagraphSchema, N as ContentPathPoint, O as ContentListMembershipSchema, Ot as findConstructMarkerImbalance, P as ContentPathPointSchema, Q as ContentSheetPrintRange, R as ContentRunSchema, S as ContentEmbeddedObjectSchema, St as ContentVectorSchema, T as ContentImageBlock, Tt as FusedNode, U as ContentSheet, V as ContentShape, W as ContentSheetCell, X as ContentSheetImage, Y as ContentSheetColumnSchema, Z as ContentSheetImageSchema, _ as ContentDrawPageSchema, _t as ContentTableCellSchema, a as ContentBorderSchema, at as ContentSheetRowSchema, b as ContentEmbeddedObjectBlockSchema, bt as ContentTableSchema, c as ContentCellValue, ct as ContentSlideSchema, d as ContentConstructEndSchema, dt as ContentStrokeStyle, et as ContentSheetPrintSettings, f as ContentConstructStart, ft as ContentStrokeStyleSchema, g as ContentDrawPage, gt as ContentTableCell, h as ContentDocumentSchema, ht as ContentTable, i as ContentBorder, it as ContentSheetRow, j as ContentParagraph, jt as isContentConstructStart, k as ContentPageBreak, kt as isContentBlock, l as ContentCellValueSchema, lt as ContentStroke, m as ContentDocument, mt as ContentSubpathSchema, n as ContentBlock, nt as ContentSheetRepeatRange, o as ContentCellBorders, ot as ContentSheetSchema, p as ContentConstructStartSchema, pt as ContentSubpath, q as ContentSheetCellSchema, r as ContentBlockSchema, rt as ContentSheetRepeatRangeSchema, s as ContentCellBordersSchema, st as ContentSlide, t as ConstructMarkerImbalance, tt as ContentSheetPrintSettingsSchema, u as ContentConstructEnd, ut as ContentStrokeSchema, v as ContentEmbeddedObject, vt as ContentTableRow, w as ContentFormulaSchema, wt as DecimalStringSchema, x as ContentEmbeddedObjectKind, xt as ContentVector, y as ContentEmbeddedObjectBlock, yt as ContentTableRowSchema, z as ContentSection } from "./content-
|
|
6
|
+
import { $ as ContentSheetPrintRangeSchema, A as ContentPageBreakSchema, At as isContentConstructEnd, B as ContentSectionSchema, C as ContentFormula, Ct as DecimalString, D as ContentListMembership, Dt as contentDocumentSharedFields, E as ContentImageBlockSchema, Et as clampHeadingLevel, F as ContentPathSegment, G as ContentSheetCellComment, H as ContentShapeSchema, I as ContentPathSegmentSchema, J as ContentSheetColumn, K as ContentSheetCellCommentSchema, L as ContentRun, M as ContentParagraphSchema, N as ContentPathPoint, O as ContentListMembershipSchema, Ot as findConstructMarkerImbalance, P as ContentPathPointSchema, Q as ContentSheetPrintRange, R as ContentRunSchema, S as ContentEmbeddedObjectSchema, St as ContentVectorSchema, T as ContentImageBlock, Tt as FusedNode, U as ContentSheet, V as ContentShape, W as ContentSheetCell, X as ContentSheetImage, Y as ContentSheetColumnSchema, Z as ContentSheetImageSchema, _ as ContentDrawPageSchema, _t as ContentTableCellSchema, a as ContentBorderSchema, at as ContentSheetRowSchema, b as ContentEmbeddedObjectBlockSchema, bt as ContentTableSchema, c as ContentCellValue, ct as ContentSlideSchema, d as ContentConstructEndSchema, dt as ContentStrokeStyle, et as ContentSheetPrintSettings, f as ContentConstructStart, ft as ContentStrokeStyleSchema, g as ContentDrawPage, gt as ContentTableCell, h as ContentDocumentSchema, ht as ContentTable, i as ContentBorder, it as ContentSheetRow, j as ContentParagraph, jt as isContentConstructStart, k as ContentPageBreak, kt as isContentBlock, l as ContentCellValueSchema, lt as ContentStroke, m as ContentDocument, mt as ContentSubpathSchema, n as ContentBlock, nt as ContentSheetRepeatRange, o as ContentCellBorders, ot as ContentSheetSchema, p as ContentConstructStartSchema, pt as ContentSubpath, q as ContentSheetCellSchema, r as ContentBlockSchema, rt as ContentSheetRepeatRangeSchema, s as ContentCellBordersSchema, st as ContentSlide, t as ConstructMarkerImbalance, tt as ContentSheetPrintSettingsSchema, u as ContentConstructEnd, ut as ContentStrokeSchema, v as ContentEmbeddedObject, vt as ContentTableRow, w as ContentFormulaSchema, wt as DecimalStringSchema, x as ContentEmbeddedObjectKind, xt as ContentVector, y as ContentEmbeddedObjectBlock, yt as ContentTableRowSchema, z as ContentSection } from "./content-CFXL4jMV.cjs";
|
|
7
7
|
import { ContentCodec } from "./codec.cjs";
|
|
8
|
-
import { C as ProvenanceChange, E as ProvenanceDescriptorSchema, S as LinkTargetSchema, T as ProvenanceDescriptor, _ as FieldDescriptor, a as ConstructDescriptor, b as LinkDescriptorSchema, c as ContentControlDescriptorSchema, d as ContentControlType, f as ContentControlTypeSchema, g as DivisionSourceSchema, h as DivisionSource, i as AnchorTypeSchema, l as ContentControlLock, m as DivisionDescriptorSchema, n as AnchorDescriptorSchema, o as ConstructDescriptorSchema, p as DivisionDescriptor, r as AnchorType, s as ContentControlDescriptor, t as AnchorDescriptor, u as ContentControlLockSchema, v as FieldDescriptorSchema, w as ProvenanceChangeSchema, x as LinkTarget, y as LinkDescriptor } from "./construct-
|
|
8
|
+
import { C as ProvenanceChange, E as ProvenanceDescriptorSchema, S as LinkTargetSchema, T as ProvenanceDescriptor, _ as FieldDescriptor, a as ConstructDescriptor, b as LinkDescriptorSchema, c as ContentControlDescriptorSchema, d as ContentControlType, f as ContentControlTypeSchema, g as DivisionSourceSchema, h as DivisionSource, i as AnchorTypeSchema, l as ContentControlLock, m as DivisionDescriptorSchema, n as AnchorDescriptorSchema, o as ConstructDescriptorSchema, p as DivisionDescriptor, r as AnchorType, s as ContentControlDescriptor, t as AnchorDescriptor, u as ContentControlLockSchema, v as FieldDescriptorSchema, w as ProvenanceChangeSchema, x as LinkTarget, y as LinkDescriptor } from "./construct-ETSlnMle.cjs";
|
|
9
9
|
import { CONTENT_DEFS, CONTENT_DOCUMENT_URI, EMBEDDED_OBJECT_KINDS, MAX_SAFE_INTEGER } from "./content-json-schema-defs.cjs";
|
|
10
|
+
import { $ as isSectionConstructGroupNode, A as ShapeChild, B as SheetGroupNode, C as SectionChild, D as SectionDescriptorSchema, E as SectionDescriptor, F as ShapeGroupNode, G as SlideGroupSchema, H as SlideDescriptor, I as ShapeGroupSchema, J as isListGroupNode, K as isDrawPageGroupNode, L as SheetChild, M as ShapeConstructGroupSchema, N as ShapeDescriptor, O as SectionGroupNode, P as ShapeDescriptorSchema, Q as isPackageNode, R as SheetDescriptor, S as PackageNodeSchema, T as SectionConstructGroupSchema, U as SlideDescriptorSchema, V as SheetGroupSchema, W as SlideGroupNode, X as isPackageGroup, Y as isPackageBlockLeaf, Z as isPackageLeaf, _ as PackageGroup, a as DrawPageGroupSchema, b as PackageLeafSchema, c as HeadingParagraph, d as ListGroupNode, et as isSectionGroupNode, f as ListGroupSchema, g as PackageBlockLeafSchema, h as PackageBlockLeaf, i as DrawPageGroupNode, it as isSlideGroupNode, j as ShapeConstructGroupNode, k as SectionGroupSchema, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isShapeGroupNode, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isSheetGroupNode, s as HeadingGroupSchema, t as DrawPageChild, tt as isShapeConstructGroupNode, u as ListChild, v as PackageGroupSchema, w as SectionConstructGroupNode, x as PackageNode, y as PackageLeaf, z as SheetDescriptorSchema } from "./package-node-D3XGBWfs.cjs";
|
|
11
|
+
import { ConstructMarkerImbalanceError, PackageChildren, decompose } from "./decompose.cjs";
|
|
10
12
|
import { DefinitionEntry, DefinitionEntrySchema, DefinitionsTable, DefinitionsTableSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StylesTable, StylesTableSchema, applyParagraphStyleProperties, applyRunStyleProperties, overlayStyleEntries, resolveStyleChain } from "./definitions.cjs";
|
|
13
|
+
import { DocumentPackage, DocumentPackageSchema } from "./package.cjs";
|
|
14
|
+
import { assemblePackage, factorStyles } from "./factor-styles.cjs";
|
|
15
|
+
import { flattenPackage } from "./flatten.cjs";
|
|
11
16
|
import { FontFace, FontRegistryOptions, FontSubstitution, ProvidedFont } from "./font-port.cjs";
|
|
12
17
|
import { Alignment, AlignmentSchema, DEFAULT_LAYOUT_FONT, LayoutFont, LayoutFontSchema } from "./style.cjs";
|
|
13
18
|
import { LayoutMetadata, LayoutMetadataSchema } from "./metadata.cjs";
|
|
14
|
-
import { $ as isSectionConstructGroupNode, A as ShapeChild, B as SheetGroupNode, C as SectionChild, D as SectionDescriptorSchema, E as SectionDescriptor, F as ShapeGroupNode, G as SlideGroupSchema, H as SlideDescriptor, I as ShapeGroupSchema, J as isListGroupNode, K as isDrawPageGroupNode, L as SheetChild, M as ShapeConstructGroupSchema, N as ShapeDescriptor, O as SectionGroupNode, P as ShapeDescriptorSchema, Q as isPackageNode, R as SheetDescriptor, S as PackageNodeSchema, T as SectionConstructGroupSchema, U as SlideDescriptorSchema, V as SheetGroupSchema, W as SlideGroupNode, X as isPackageGroup, Y as isPackageBlockLeaf, Z as isPackageLeaf, _ as PackageGroup, a as DrawPageGroupSchema, b as PackageLeafSchema, c as HeadingParagraph, d as ListGroupNode, et as isSectionGroupNode, f as ListGroupSchema, g as PackageBlockLeafSchema, h as PackageBlockLeaf, i as DrawPageGroupNode, it as isSlideGroupNode, j as ShapeConstructGroupNode, k as SectionGroupSchema, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isShapeGroupNode, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isSheetGroupNode, s as HeadingGroupSchema, t as DrawPageChild, tt as isShapeConstructGroupNode, u as ListChild, v as PackageGroupSchema, w as SectionConstructGroupNode, x as PackageNode, y as PackageLeaf, z as SheetDescriptorSchema } from "./package-node-a9CyRaD3.cjs";
|
|
15
|
-
import { DocumentPackage, DocumentPackageSchema } from "./package.cjs";
|
|
16
19
|
import { ContentDocumentJson, DocumentJsonResult, DocumentPackageJson, DocumentSchemaKind, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, schemaUriFor } from "./schema-io.cjs";
|
|
17
20
|
import { StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, WrapOptions, WrappedLine } from "./text-layout.cjs";
|
|
18
21
|
import { MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, PositionedFormula } from "./math-layout.cjs";
|
|
19
|
-
export { Alignment, AlignmentSchema, AnchorDescriptor, AnchorDescriptorSchema, AnchorType, AnchorTypeSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CellPosition, CellRange, Color, ColorSchema, ConstructDescriptor, ConstructDescriptorSchema, ConstructMarkerImbalance, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentCodec, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentControlDescriptor, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFormula, ContentFormulaSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DecimalString, DecimalStringSchema, DefinitionEntry, DefinitionEntrySchema, DefinitionsTable, DefinitionsTableSchema, DimensionVector, DimensionVectorSchema, DivisionDescriptor, DivisionDescriptorSchema, DivisionSource, DivisionSourceSchema, DocumentJsonResult, DocumentPackage, DocumentPackageJson, DocumentPackageSchema, DocumentSchemaKind, DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, EMBEDDED_OBJECT_KINDS, ExactRational, ExactRationalSchema, FieldDescriptor, FieldDescriptorSchema, FontFace, FontRegistryOptions, FontSubstitution, FusedNode, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, LayoutFont, LayoutFontSchema, LayoutFrame, LayoutFrameSchema, LayoutMetadata, LayoutMetadataSchema, LayoutSchemaDemotedError, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, MAX_SAFE_INTEGER, Margins, MarginsSchema, MathApp, MathAppSchema, MathAssembledGlyphs, MathBox, MathColor, MathExpression, MathExpressionSchema, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathMatrix, MathMatrixSchema, MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, MathNormalisationContext, MathNormalisationContextSchema, MathNum, MathNumSchema, MathPresentation, MathPresentationSchema, MathProd, MathProdSchema, MathProvenance, MathProvenanceSchema, MathQty, MathQtySchema, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, MathSum, MathSumSchema, MathSym, MathSymSchema, MathSymbolEntry, MathSymbolEntrySchema, MathUncertainty, MathUncertaintySchema, MathUnit, MathUnitSchema, MathUnparsed, MathUnparsedSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageBlockLeaf, PackageBlockLeafSchema, PackageGroup, PackageGroupSchema, PackageLeaf, PackageLeafSchema, PackageNode, PackageNodeSchema, PageSize, PageSizeSchema, Point, PositionedFormula, ProvenanceChange, ProvenanceChangeSchema, ProvenanceDescriptor, ProvenanceDescriptorSchema, ProvidedFont, SCHEMA_FILE_NAMES, SI_BASE_DIMENSIONS, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SchemaVersionMismatchError, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SiBaseDimension, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StyledFragment, StyledRun, StylesTable, StylesTableSchema, SymbolTable, SymbolTableSchema, TextMeasurer, UnderlineMetrics, UnrecognizedDocumentSchemaError, WrapOptions, WrappedLine, applyParagraphStyleProperties, applyRunStyleProperties, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentSharedFields, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, findConstructMarkerImbalance, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isMathExpression, isMathMlNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, overlayStyleEntries, parseCellReference, parseRangeReference, rangeReference, resolveStyleChain, rgbHexToColor, schemaUriFor };
|
|
22
|
+
export { Alignment, AlignmentSchema, AnchorDescriptor, AnchorDescriptorSchema, AnchorType, AnchorTypeSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CellPosition, CellRange, Color, ColorSchema, ConstructDescriptor, ConstructDescriptorSchema, ConstructMarkerImbalance, ConstructMarkerImbalanceError, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentCodec, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentControlDescriptor, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFormula, ContentFormulaSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DecimalString, DecimalStringSchema, DefinitionEntry, DefinitionEntrySchema, DefinitionsTable, DefinitionsTableSchema, DimensionVector, DimensionVectorSchema, DivisionDescriptor, DivisionDescriptorSchema, DivisionSource, DivisionSourceSchema, DocumentJsonResult, DocumentPackage, DocumentPackageJson, DocumentPackageSchema, DocumentSchemaKind, DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, EMBEDDED_OBJECT_KINDS, ExactRational, ExactRationalSchema, FieldDescriptor, FieldDescriptorSchema, FontFace, FontRegistryOptions, FontSubstitution, FusedNode, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, LayoutFont, LayoutFontSchema, LayoutFrame, LayoutFrameSchema, LayoutMetadata, LayoutMetadataSchema, LayoutSchemaDemotedError, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, MAX_SAFE_INTEGER, Margins, MarginsSchema, MathApp, MathAppSchema, MathAssembledGlyphs, MathBox, MathColor, MathExpression, MathExpressionSchema, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathMatrix, MathMatrixSchema, MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, MathNormalisationContext, MathNormalisationContextSchema, MathNum, MathNumSchema, MathPresentation, MathPresentationSchema, MathProd, MathProdSchema, MathProvenance, MathProvenanceSchema, MathQty, MathQtySchema, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, MathSum, MathSumSchema, MathSym, MathSymSchema, MathSymbolEntry, MathSymbolEntrySchema, MathUncertainty, MathUncertaintySchema, MathUnit, MathUnitSchema, MathUnparsed, MathUnparsedSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageBlockLeaf, PackageBlockLeafSchema, type PackageChildren, PackageGroup, PackageGroupSchema, PackageLeaf, PackageLeafSchema, PackageNode, PackageNodeSchema, PageSize, PageSizeSchema, Point, PositionedFormula, ProvenanceChange, ProvenanceChangeSchema, ProvenanceDescriptor, ProvenanceDescriptorSchema, ProvidedFont, SCHEMA_FILE_NAMES, SI_BASE_DIMENSIONS, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SchemaVersionMismatchError, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SiBaseDimension, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StyledFragment, StyledRun, StylesTable, StylesTableSchema, SymbolTable, SymbolTableSchema, TextMeasurer, UnderlineMetrics, UnrecognizedDocumentSchemaError, WrapOptions, WrappedLine, applyParagraphStyleProperties, applyRunStyleProperties, assemblePackage, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentSharedFields, contentDocumentWithSchema, decompose, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, factorStyles, findConstructMarkerImbalance, flattenPackage, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isMathExpression, isMathMlNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, overlayStyleEntries, parseCellReference, parseRangeReference, rangeReference, resolveStyleChain, rgbHexToColor, schemaUriFor };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,17 +3,20 @@ import { _ as isMathMlNode, a as MathMlComment, c as MathMlDeclarationSchema, d
|
|
|
3
3
|
import { A as MathUncertaintySchema, C as MathSum, D as MathSymbolEntry, E as MathSymSchema, F as SI_BASE_DIMENSIONS, I as SiBaseDimension, L as SymbolTable, M as MathUnitSchema, N as MathUnparsed, O as MathSymbolEntrySchema, P as MathUnparsedSchema, R as SymbolTableSchema, S as MathQtySchema, T as MathSym, _ as MathProd, a as MathApp, b as MathProvenanceSchema, c as MathExpressionSchema, d as MathNormalisationContext, f as MathNormalisationContextSchema, g as MathPresentationSchema, h as MathPresentation, i as ExactRationalSchema, j as MathUnit, k as MathUncertainty, l as MathMatrix, m as MathNumSchema, n as DimensionVectorSchema, o as MathAppSchema, p as MathNum, r as ExactRational, s as MathExpression, t as DimensionVector, u as MathMatrixSchema, v as MathProdSchema, w as MathSumSchema, x as MathQty, y as MathProvenance, z as isMathExpression } from "./math-B7gZJeND.js";
|
|
4
4
|
import { a as rgbHexToColor, i as colorToRgbHex, n as Color, r as ColorSchema, t as COLOR_BLACK } from "./color-AELCDH_b.js";
|
|
5
5
|
import { a as Margins, c as PAGE_SIZE_LETTER, d as Point, f as SLIDE_SIZE_STANDARD, i as LayoutFrameSchema, l as PageSize, n as BoxSchema, o as MarginsSchema, p as SLIDE_SIZE_WIDESCREEN, r as LayoutFrame, s as PAGE_SIZE_A4, t as Box, u as PageSizeSchema } from "./geometry-CvcjSwnA.js";
|
|
6
|
-
import { $ as ContentSheetPrintRangeSchema, A as ContentPageBreakSchema, At as isContentConstructEnd, B as ContentSectionSchema, C as ContentFormula, Ct as DecimalString, D as ContentListMembership, Dt as contentDocumentSharedFields, E as ContentImageBlockSchema, Et as clampHeadingLevel, F as ContentPathSegment, G as ContentSheetCellComment, H as ContentShapeSchema, I as ContentPathSegmentSchema, J as ContentSheetColumn, K as ContentSheetCellCommentSchema, L as ContentRun, M as ContentParagraphSchema, N as ContentPathPoint, O as ContentListMembershipSchema, Ot as findConstructMarkerImbalance, P as ContentPathPointSchema, Q as ContentSheetPrintRange, R as ContentRunSchema, S as ContentEmbeddedObjectSchema, St as ContentVectorSchema, T as ContentImageBlock, Tt as FusedNode, U as ContentSheet, V as ContentShape, W as ContentSheetCell, X as ContentSheetImage, Y as ContentSheetColumnSchema, Z as ContentSheetImageSchema, _ as ContentDrawPageSchema, _t as ContentTableCellSchema, a as ContentBorderSchema, at as ContentSheetRowSchema, b as ContentEmbeddedObjectBlockSchema, bt as ContentTableSchema, c as ContentCellValue, ct as ContentSlideSchema, d as ContentConstructEndSchema, dt as ContentStrokeStyle, et as ContentSheetPrintSettings, f as ContentConstructStart, ft as ContentStrokeStyleSchema, g as ContentDrawPage, gt as ContentTableCell, h as ContentDocumentSchema, ht as ContentTable, i as ContentBorder, it as ContentSheetRow, j as ContentParagraph, jt as isContentConstructStart, k as ContentPageBreak, kt as isContentBlock, l as ContentCellValueSchema, lt as ContentStroke, m as ContentDocument, mt as ContentSubpathSchema, n as ContentBlock, nt as ContentSheetRepeatRange, o as ContentCellBorders, ot as ContentSheetSchema, p as ContentConstructStartSchema, pt as ContentSubpath, q as ContentSheetCellSchema, r as ContentBlockSchema, rt as ContentSheetRepeatRangeSchema, s as ContentCellBordersSchema, st as ContentSlide, t as ConstructMarkerImbalance, tt as ContentSheetPrintSettingsSchema, u as ContentConstructEnd, ut as ContentStrokeSchema, v as ContentEmbeddedObject, vt as ContentTableRow, w as ContentFormulaSchema, wt as DecimalStringSchema, x as ContentEmbeddedObjectKind, xt as ContentVector, y as ContentEmbeddedObjectBlock, yt as ContentTableRowSchema, z as ContentSection } from "./content-
|
|
6
|
+
import { $ as ContentSheetPrintRangeSchema, A as ContentPageBreakSchema, At as isContentConstructEnd, B as ContentSectionSchema, C as ContentFormula, Ct as DecimalString, D as ContentListMembership, Dt as contentDocumentSharedFields, E as ContentImageBlockSchema, Et as clampHeadingLevel, F as ContentPathSegment, G as ContentSheetCellComment, H as ContentShapeSchema, I as ContentPathSegmentSchema, J as ContentSheetColumn, K as ContentSheetCellCommentSchema, L as ContentRun, M as ContentParagraphSchema, N as ContentPathPoint, O as ContentListMembershipSchema, Ot as findConstructMarkerImbalance, P as ContentPathPointSchema, Q as ContentSheetPrintRange, R as ContentRunSchema, S as ContentEmbeddedObjectSchema, St as ContentVectorSchema, T as ContentImageBlock, Tt as FusedNode, U as ContentSheet, V as ContentShape, W as ContentSheetCell, X as ContentSheetImage, Y as ContentSheetColumnSchema, Z as ContentSheetImageSchema, _ as ContentDrawPageSchema, _t as ContentTableCellSchema, a as ContentBorderSchema, at as ContentSheetRowSchema, b as ContentEmbeddedObjectBlockSchema, bt as ContentTableSchema, c as ContentCellValue, ct as ContentSlideSchema, d as ContentConstructEndSchema, dt as ContentStrokeStyle, et as ContentSheetPrintSettings, f as ContentConstructStart, ft as ContentStrokeStyleSchema, g as ContentDrawPage, gt as ContentTableCell, h as ContentDocumentSchema, ht as ContentTable, i as ContentBorder, it as ContentSheetRow, j as ContentParagraph, jt as isContentConstructStart, k as ContentPageBreak, kt as isContentBlock, l as ContentCellValueSchema, lt as ContentStroke, m as ContentDocument, mt as ContentSubpathSchema, n as ContentBlock, nt as ContentSheetRepeatRange, o as ContentCellBorders, ot as ContentSheetSchema, p as ContentConstructStartSchema, pt as ContentSubpath, q as ContentSheetCellSchema, r as ContentBlockSchema, rt as ContentSheetRepeatRangeSchema, s as ContentCellBordersSchema, st as ContentSlide, t as ConstructMarkerImbalance, tt as ContentSheetPrintSettingsSchema, u as ContentConstructEnd, ut as ContentStrokeSchema, v as ContentEmbeddedObject, vt as ContentTableRow, w as ContentFormulaSchema, wt as DecimalStringSchema, x as ContentEmbeddedObjectKind, xt as ContentVector, y as ContentEmbeddedObjectBlock, yt as ContentTableRowSchema, z as ContentSection } from "./content-32bPQ3aj.js";
|
|
7
7
|
import { ContentCodec } from "./codec.js";
|
|
8
|
-
import { C as ProvenanceChange, E as ProvenanceDescriptorSchema, S as LinkTargetSchema, T as ProvenanceDescriptor, _ as FieldDescriptor, a as ConstructDescriptor, b as LinkDescriptorSchema, c as ContentControlDescriptorSchema, d as ContentControlType, f as ContentControlTypeSchema, g as DivisionSourceSchema, h as DivisionSource, i as AnchorTypeSchema, l as ContentControlLock, m as DivisionDescriptorSchema, n as AnchorDescriptorSchema, o as ConstructDescriptorSchema, p as DivisionDescriptor, r as AnchorType, s as ContentControlDescriptor, t as AnchorDescriptor, u as ContentControlLockSchema, v as FieldDescriptorSchema, w as ProvenanceChangeSchema, x as LinkTarget, y as LinkDescriptor } from "./construct-
|
|
8
|
+
import { C as ProvenanceChange, E as ProvenanceDescriptorSchema, S as LinkTargetSchema, T as ProvenanceDescriptor, _ as FieldDescriptor, a as ConstructDescriptor, b as LinkDescriptorSchema, c as ContentControlDescriptorSchema, d as ContentControlType, f as ContentControlTypeSchema, g as DivisionSourceSchema, h as DivisionSource, i as AnchorTypeSchema, l as ContentControlLock, m as DivisionDescriptorSchema, n as AnchorDescriptorSchema, o as ConstructDescriptorSchema, p as DivisionDescriptor, r as AnchorType, s as ContentControlDescriptor, t as AnchorDescriptor, u as ContentControlLockSchema, v as FieldDescriptorSchema, w as ProvenanceChangeSchema, x as LinkTarget, y as LinkDescriptor } from "./construct-ETSlnMle.js";
|
|
9
9
|
import { CONTENT_DEFS, CONTENT_DOCUMENT_URI, EMBEDDED_OBJECT_KINDS, MAX_SAFE_INTEGER } from "./content-json-schema-defs.js";
|
|
10
|
+
import { $ as isSectionConstructGroupNode, A as ShapeChild, B as SheetGroupNode, C as SectionChild, D as SectionDescriptorSchema, E as SectionDescriptor, F as ShapeGroupNode, G as SlideGroupSchema, H as SlideDescriptor, I as ShapeGroupSchema, J as isListGroupNode, K as isDrawPageGroupNode, L as SheetChild, M as ShapeConstructGroupSchema, N as ShapeDescriptor, O as SectionGroupNode, P as ShapeDescriptorSchema, Q as isPackageNode, R as SheetDescriptor, S as PackageNodeSchema, T as SectionConstructGroupSchema, U as SlideDescriptorSchema, V as SheetGroupSchema, W as SlideGroupNode, X as isPackageGroup, Y as isPackageBlockLeaf, Z as isPackageLeaf, _ as PackageGroup, a as DrawPageGroupSchema, b as PackageLeafSchema, c as HeadingParagraph, d as ListGroupNode, et as isSectionGroupNode, f as ListGroupSchema, g as PackageBlockLeafSchema, h as PackageBlockLeaf, i as DrawPageGroupNode, it as isSlideGroupNode, j as ShapeConstructGroupNode, k as SectionGroupSchema, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isShapeGroupNode, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isSheetGroupNode, s as HeadingGroupSchema, t as DrawPageChild, tt as isShapeConstructGroupNode, u as ListChild, v as PackageGroupSchema, w as SectionConstructGroupNode, x as PackageNode, y as PackageLeaf, z as SheetDescriptorSchema } from "./package-node-0EHr6E1z.js";
|
|
11
|
+
import { ConstructMarkerImbalanceError, PackageChildren, decompose } from "./decompose.js";
|
|
10
12
|
import { DefinitionEntry, DefinitionEntrySchema, DefinitionsTable, DefinitionsTableSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StylesTable, StylesTableSchema, applyParagraphStyleProperties, applyRunStyleProperties, overlayStyleEntries, resolveStyleChain } from "./definitions.js";
|
|
13
|
+
import { DocumentPackage, DocumentPackageSchema } from "./package.js";
|
|
14
|
+
import { assemblePackage, factorStyles } from "./factor-styles.js";
|
|
15
|
+
import { flattenPackage } from "./flatten.js";
|
|
11
16
|
import { FontFace, FontRegistryOptions, FontSubstitution, ProvidedFont } from "./font-port.js";
|
|
12
17
|
import { Alignment, AlignmentSchema, DEFAULT_LAYOUT_FONT, LayoutFont, LayoutFontSchema } from "./style.js";
|
|
13
18
|
import { LayoutMetadata, LayoutMetadataSchema } from "./metadata.js";
|
|
14
|
-
import { $ as isSectionConstructGroupNode, A as ShapeChild, B as SheetGroupNode, C as SectionChild, D as SectionDescriptorSchema, E as SectionDescriptor, F as ShapeGroupNode, G as SlideGroupSchema, H as SlideDescriptor, I as ShapeGroupSchema, J as isListGroupNode, K as isDrawPageGroupNode, L as SheetChild, M as ShapeConstructGroupSchema, N as ShapeDescriptor, O as SectionGroupNode, P as ShapeDescriptorSchema, Q as isPackageNode, R as SheetDescriptor, S as PackageNodeSchema, T as SectionConstructGroupSchema, U as SlideDescriptorSchema, V as SheetGroupSchema, W as SlideGroupNode, X as isPackageGroup, Y as isPackageBlockLeaf, Z as isPackageLeaf, _ as PackageGroup, a as DrawPageGroupSchema, b as PackageLeafSchema, c as HeadingParagraph, d as ListGroupNode, et as isSectionGroupNode, f as ListGroupSchema, g as PackageBlockLeafSchema, h as PackageBlockLeaf, i as DrawPageGroupNode, it as isSlideGroupNode, j as ShapeConstructGroupNode, k as SectionGroupSchema, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isShapeGroupNode, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isSheetGroupNode, s as HeadingGroupSchema, t as DrawPageChild, tt as isShapeConstructGroupNode, u as ListChild, v as PackageGroupSchema, w as SectionConstructGroupNode, x as PackageNode, y as PackageLeaf, z as SheetDescriptorSchema } from "./package-node-C7RiYhyk.js";
|
|
15
|
-
import { DocumentPackage, DocumentPackageSchema } from "./package.js";
|
|
16
19
|
import { ContentDocumentJson, DocumentJsonResult, DocumentPackageJson, DocumentSchemaKind, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, schemaUriFor } from "./schema-io.js";
|
|
17
20
|
import { StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, WrapOptions, WrappedLine } from "./text-layout.js";
|
|
18
21
|
import { MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, PositionedFormula } from "./math-layout.js";
|
|
19
|
-
export { Alignment, AlignmentSchema, AnchorDescriptor, AnchorDescriptorSchema, AnchorType, AnchorTypeSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CellPosition, CellRange, Color, ColorSchema, ConstructDescriptor, ConstructDescriptorSchema, ConstructMarkerImbalance, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentCodec, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentControlDescriptor, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFormula, ContentFormulaSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DecimalString, DecimalStringSchema, DefinitionEntry, DefinitionEntrySchema, DefinitionsTable, DefinitionsTableSchema, DimensionVector, DimensionVectorSchema, DivisionDescriptor, DivisionDescriptorSchema, DivisionSource, DivisionSourceSchema, DocumentJsonResult, DocumentPackage, DocumentPackageJson, DocumentPackageSchema, DocumentSchemaKind, DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, EMBEDDED_OBJECT_KINDS, ExactRational, ExactRationalSchema, FieldDescriptor, FieldDescriptorSchema, FontFace, FontRegistryOptions, FontSubstitution, FusedNode, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, LayoutFont, LayoutFontSchema, LayoutFrame, LayoutFrameSchema, LayoutMetadata, LayoutMetadataSchema, LayoutSchemaDemotedError, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, MAX_SAFE_INTEGER, Margins, MarginsSchema, MathApp, MathAppSchema, MathAssembledGlyphs, MathBox, MathColor, MathExpression, MathExpressionSchema, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathMatrix, MathMatrixSchema, MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, MathNormalisationContext, MathNormalisationContextSchema, MathNum, MathNumSchema, MathPresentation, MathPresentationSchema, MathProd, MathProdSchema, MathProvenance, MathProvenanceSchema, MathQty, MathQtySchema, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, MathSum, MathSumSchema, MathSym, MathSymSchema, MathSymbolEntry, MathSymbolEntrySchema, MathUncertainty, MathUncertaintySchema, MathUnit, MathUnitSchema, MathUnparsed, MathUnparsedSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageBlockLeaf, PackageBlockLeafSchema, PackageGroup, PackageGroupSchema, PackageLeaf, PackageLeafSchema, PackageNode, PackageNodeSchema, PageSize, PageSizeSchema, Point, PositionedFormula, ProvenanceChange, ProvenanceChangeSchema, ProvenanceDescriptor, ProvenanceDescriptorSchema, ProvidedFont, SCHEMA_FILE_NAMES, SI_BASE_DIMENSIONS, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SchemaVersionMismatchError, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SiBaseDimension, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StyledFragment, StyledRun, StylesTable, StylesTableSchema, SymbolTable, SymbolTableSchema, TextMeasurer, UnderlineMetrics, UnrecognizedDocumentSchemaError, WrapOptions, WrappedLine, applyParagraphStyleProperties, applyRunStyleProperties, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentSharedFields, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, findConstructMarkerImbalance, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isMathExpression, isMathMlNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, overlayStyleEntries, parseCellReference, parseRangeReference, rangeReference, resolveStyleChain, rgbHexToColor, schemaUriFor };
|
|
22
|
+
export { Alignment, AlignmentSchema, AnchorDescriptor, AnchorDescriptorSchema, AnchorType, AnchorTypeSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CellPosition, CellRange, Color, ColorSchema, ConstructDescriptor, ConstructDescriptorSchema, ConstructMarkerImbalance, ConstructMarkerImbalanceError, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentCodec, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentControlDescriptor, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFormula, ContentFormulaSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DecimalString, DecimalStringSchema, DefinitionEntry, DefinitionEntrySchema, DefinitionsTable, DefinitionsTableSchema, DimensionVector, DimensionVectorSchema, DivisionDescriptor, DivisionDescriptorSchema, DivisionSource, DivisionSourceSchema, DocumentJsonResult, DocumentPackage, DocumentPackageJson, DocumentPackageSchema, DocumentSchemaKind, DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, EMBEDDED_OBJECT_KINDS, ExactRational, ExactRationalSchema, FieldDescriptor, FieldDescriptorSchema, FontFace, FontRegistryOptions, FontSubstitution, FusedNode, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, LayoutFont, LayoutFontSchema, LayoutFrame, LayoutFrameSchema, LayoutMetadata, LayoutMetadataSchema, LayoutSchemaDemotedError, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, MAX_SAFE_INTEGER, Margins, MarginsSchema, MathApp, MathAppSchema, MathAssembledGlyphs, MathBox, MathColor, MathExpression, MathExpressionSchema, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathMatrix, MathMatrixSchema, MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, MathNormalisationContext, MathNormalisationContextSchema, MathNum, MathNumSchema, MathPresentation, MathPresentationSchema, MathProd, MathProdSchema, MathProvenance, MathProvenanceSchema, MathQty, MathQtySchema, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, MathSum, MathSumSchema, MathSym, MathSymSchema, MathSymbolEntry, MathSymbolEntrySchema, MathUncertainty, MathUncertaintySchema, MathUnit, MathUnitSchema, MathUnparsed, MathUnparsedSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageBlockLeaf, PackageBlockLeafSchema, type PackageChildren, PackageGroup, PackageGroupSchema, PackageLeaf, PackageLeafSchema, PackageNode, PackageNodeSchema, PageSize, PageSizeSchema, Point, PositionedFormula, ProvenanceChange, ProvenanceChangeSchema, ProvenanceDescriptor, ProvenanceDescriptorSchema, ProvidedFont, SCHEMA_FILE_NAMES, SI_BASE_DIMENSIONS, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SchemaVersionMismatchError, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SiBaseDimension, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StyledFragment, StyledRun, StylesTable, StylesTableSchema, SymbolTable, SymbolTableSchema, TextMeasurer, UnderlineMetrics, UnrecognizedDocumentSchemaError, WrapOptions, WrappedLine, applyParagraphStyleProperties, applyRunStyleProperties, assemblePackage, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentSharedFields, contentDocumentWithSchema, decompose, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, factorStyles, findConstructMarkerImbalance, flattenPackage, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isMathExpression, isMathMlNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, overlayStyleEntries, parseCellReference, parseRangeReference, rangeReference, resolveStyleChain, rgbHexToColor, schemaUriFor };
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,10 @@ import { DrawPageDescriptorSchema, DrawPageGroupSchema, HeadingGroupSchema, Head
|
|
|
13
13
|
import { DocumentPackageSchema } from "./package.js";
|
|
14
14
|
import { LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, schemaUriFor } from "./schema-io.js";
|
|
15
15
|
import { CONTENT_DEFS, CONTENT_DOCUMENT_URI, EMBEDDED_OBJECT_KINDS, MAX_SAFE_INTEGER } from "./content-json-schema-defs.js";
|
|
16
|
+
import { ConstructMarkerImbalanceError, decompose } from "./decompose.js";
|
|
17
|
+
import { flattenPackage } from "./flatten.js";
|
|
18
|
+
import { assemblePackage, factorStyles } from "./factor-styles.js";
|
|
16
19
|
import "./font-port.js";
|
|
17
20
|
import "./text-layout.js";
|
|
18
21
|
import "./math-layout.js";
|
|
19
|
-
export { AlignmentSchema, AnchorDescriptorSchema, AnchorTypeSchema, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, ColorSchema, ConstructDescriptorSchema, ContentBlockSchema, ContentBorderSchema, ContentCellBordersSchema, ContentCellValueSchema, ContentConstructEndSchema, ContentConstructStartSchema, ContentControlDescriptorSchema, ContentControlLockSchema, ContentControlTypeSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectSchema, ContentFormulaSchema, ContentImageBlockSchema, ContentListMembershipSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentStrokeStyleSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DecimalStringSchema, DefinitionEntrySchema, DefinitionsTableSchema, DimensionVectorSchema, DivisionDescriptorSchema, DivisionSourceSchema, DocumentPackageSchema, DrawPageDescriptorSchema, DrawPageGroupSchema, EMBEDDED_OBJECT_KINDS, ExactRationalSchema, FieldDescriptorSchema, HeadingGroupSchema, HeadingParagraphSchema, LayoutFontSchema, LayoutFrameSchema, LayoutMetadataSchema, LayoutSchemaDemotedError, LinkDescriptorSchema, LinkTargetSchema, ListGroupSchema, ListParagraphSchema, MAX_SAFE_INTEGER, MarginsSchema, MathAppSchema, MathExpressionSchema, MathMatrixSchema, MathMlAttributeSchema, MathMlCdataSchema, MathMlCommentSchema, MathMlDeclarationSchema, MathMlElementSchema, MathMlNodeSchema, MathMlPiSchema, MathMlTextSchema, MathNormalisationContextSchema, MathNumSchema, MathPresentationSchema, MathProdSchema, MathProvenanceSchema, MathQtySchema, MathSumSchema, MathSymSchema, MathSymbolEntrySchema, MathUncertaintySchema, MathUnitSchema, MathUnparsedSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageBlockLeafSchema, PackageGroupSchema, PackageLeafSchema, PackageNodeSchema, PageSizeSchema, ProvenanceChangeSchema, ProvenanceDescriptorSchema, SCHEMA_FILE_NAMES, SI_BASE_DIMENSIONS, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SchemaVersionMismatchError, SectionConstructGroupSchema, SectionDescriptorSchema, SectionGroupSchema, ShapeConstructGroupSchema, ShapeDescriptorSchema, ShapeGroupSchema, SheetDescriptorSchema, SheetGroupSchema, SlideDescriptorSchema, SlideGroupSchema, StyleEntrySchema, StyleParagraphPropertiesSchema, StyleRunPropertiesSchema, StylesTableSchema, SymbolTableSchema, UnrecognizedDocumentSchemaError, applyParagraphStyleProperties, applyRunStyleProperties, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentSharedFields, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, findConstructMarkerImbalance, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isMathExpression, isMathMlNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, overlayStyleEntries, parseCellReference, parseRangeReference, rangeReference, resolveStyleChain, rgbHexToColor, schemaUriFor };
|
|
22
|
+
export { AlignmentSchema, AnchorDescriptorSchema, AnchorTypeSchema, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, ColorSchema, ConstructDescriptorSchema, ConstructMarkerImbalanceError, ContentBlockSchema, ContentBorderSchema, ContentCellBordersSchema, ContentCellValueSchema, ContentConstructEndSchema, ContentConstructStartSchema, ContentControlDescriptorSchema, ContentControlLockSchema, ContentControlTypeSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectSchema, ContentFormulaSchema, ContentImageBlockSchema, ContentListMembershipSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentStrokeStyleSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DecimalStringSchema, DefinitionEntrySchema, DefinitionsTableSchema, DimensionVectorSchema, DivisionDescriptorSchema, DivisionSourceSchema, DocumentPackageSchema, DrawPageDescriptorSchema, DrawPageGroupSchema, EMBEDDED_OBJECT_KINDS, ExactRationalSchema, FieldDescriptorSchema, HeadingGroupSchema, HeadingParagraphSchema, LayoutFontSchema, LayoutFrameSchema, LayoutMetadataSchema, LayoutSchemaDemotedError, LinkDescriptorSchema, LinkTargetSchema, ListGroupSchema, ListParagraphSchema, MAX_SAFE_INTEGER, MarginsSchema, MathAppSchema, MathExpressionSchema, MathMatrixSchema, MathMlAttributeSchema, MathMlCdataSchema, MathMlCommentSchema, MathMlDeclarationSchema, MathMlElementSchema, MathMlNodeSchema, MathMlPiSchema, MathMlTextSchema, MathNormalisationContextSchema, MathNumSchema, MathPresentationSchema, MathProdSchema, MathProvenanceSchema, MathQtySchema, MathSumSchema, MathSymSchema, MathSymbolEntrySchema, MathUncertaintySchema, MathUnitSchema, MathUnparsedSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageBlockLeafSchema, PackageGroupSchema, PackageLeafSchema, PackageNodeSchema, PageSizeSchema, ProvenanceChangeSchema, ProvenanceDescriptorSchema, SCHEMA_FILE_NAMES, SI_BASE_DIMENSIONS, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SchemaVersionMismatchError, SectionConstructGroupSchema, SectionDescriptorSchema, SectionGroupSchema, ShapeConstructGroupSchema, ShapeDescriptorSchema, ShapeGroupSchema, SheetDescriptorSchema, SheetGroupSchema, SlideDescriptorSchema, SlideGroupSchema, StyleEntrySchema, StyleParagraphPropertiesSchema, StyleRunPropertiesSchema, StylesTableSchema, SymbolTableSchema, UnrecognizedDocumentSchemaError, applyParagraphStyleProperties, applyRunStyleProperties, assemblePackage, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentSharedFields, contentDocumentWithSchema, decompose, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, factorStyles, findConstructMarkerImbalance, flattenPackage, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isMathExpression, isMathMlNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, overlayStyleEntries, parseCellReference, parseRangeReference, rangeReference, resolveStyleChain, rgbHexToColor, schemaUriFor };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ContentFormula, X as ContentSheetImage, f as ContentConstructStart, n as ContentBlock, u as ContentConstructEnd, v as ContentEmbeddedObject, xt as ContentVector } from "./content-
|
|
2
|
-
import { a as ConstructDescriptor } from "./construct-
|
|
1
|
+
import { C as ContentFormula, X as ContentSheetImage, f as ContentConstructStart, n as ContentBlock, u as ContentConstructEnd, v as ContentEmbeddedObject, xt as ContentVector } from "./content-32bPQ3aj.js";
|
|
2
|
+
import { a as ConstructDescriptor } from "./construct-ETSlnMle.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/package-node.d.ts
|
|
5
5
|
declare const SectionDescriptorSchema: z.ZodObject<{
|
|
@@ -246,7 +246,6 @@ declare const DrawPageDescriptorSchema: z.ZodObject<{
|
|
|
246
246
|
}, z.core.$strict>;
|
|
247
247
|
type DrawPageDescriptor = z.infer<typeof DrawPageDescriptorSchema>;
|
|
248
248
|
declare const ShapeDescriptorSchema: z.ZodObject<{
|
|
249
|
-
name: z.ZodOptional<z.ZodString>;
|
|
250
249
|
sourcePath: z.ZodOptional<z.ZodString>;
|
|
251
250
|
frames: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
252
251
|
pageIndex: z.ZodNumber;
|
|
@@ -255,6 +254,7 @@ declare const ShapeDescriptorSchema: z.ZodObject<{
|
|
|
255
254
|
widthPt: z.ZodNumber;
|
|
256
255
|
heightPt: z.ZodNumber;
|
|
257
256
|
}, z.core.$strip>>>;
|
|
257
|
+
name: z.ZodOptional<z.ZodString>;
|
|
258
258
|
frame: z.ZodObject<{
|
|
259
259
|
xPt: z.ZodNumber;
|
|
260
260
|
yPt: z.ZodNumber;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ContentFormula, X as ContentSheetImage, f as ContentConstructStart, n as ContentBlock, u as ContentConstructEnd, v as ContentEmbeddedObject, xt as ContentVector } from "./content-
|
|
2
|
-
import { a as ConstructDescriptor } from "./construct-
|
|
1
|
+
import { C as ContentFormula, X as ContentSheetImage, f as ContentConstructStart, n as ContentBlock, u as ContentConstructEnd, v as ContentEmbeddedObject, xt as ContentVector } from "./content-CFXL4jMV.cjs";
|
|
2
|
+
import { a as ConstructDescriptor } from "./construct-ETSlnMle.cjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/package-node.d.ts
|
|
5
5
|
declare const SectionDescriptorSchema: z.ZodObject<{
|
|
@@ -246,7 +246,6 @@ declare const DrawPageDescriptorSchema: z.ZodObject<{
|
|
|
246
246
|
}, z.core.$strict>;
|
|
247
247
|
type DrawPageDescriptor = z.infer<typeof DrawPageDescriptorSchema>;
|
|
248
248
|
declare const ShapeDescriptorSchema: z.ZodObject<{
|
|
249
|
-
name: z.ZodOptional<z.ZodString>;
|
|
250
249
|
sourcePath: z.ZodOptional<z.ZodString>;
|
|
251
250
|
frames: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
252
251
|
pageIndex: z.ZodNumber;
|
|
@@ -255,6 +254,7 @@ declare const ShapeDescriptorSchema: z.ZodObject<{
|
|
|
255
254
|
widthPt: z.ZodNumber;
|
|
256
255
|
heightPt: z.ZodNumber;
|
|
257
256
|
}, z.core.$strip>>>;
|
|
257
|
+
name: z.ZodOptional<z.ZodString>;
|
|
258
258
|
frame: z.ZodObject<{
|
|
259
259
|
xPt: z.ZodNumber;
|
|
260
260
|
yPt: z.ZodNumber;
|
package/dist/package-node.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as isSectionConstructGroupNode, A as ShapeChild, B as SheetGroupNode, C as SectionChild, D as SectionDescriptorSchema, E as SectionDescriptor, F as ShapeGroupNode, G as SlideGroupSchema, H as SlideDescriptor, I as ShapeGroupSchema, J as isListGroupNode, K as isDrawPageGroupNode, L as SheetChild, M as ShapeConstructGroupSchema, N as ShapeDescriptor, O as SectionGroupNode, P as ShapeDescriptorSchema, Q as isPackageNode, R as SheetDescriptor, S as PackageNodeSchema, T as SectionConstructGroupSchema, U as SlideDescriptorSchema, V as SheetGroupSchema, W as SlideGroupNode, X as isPackageGroup, Y as isPackageBlockLeaf, Z as isPackageLeaf, _ as PackageGroup, a as DrawPageGroupSchema, b as PackageLeafSchema, c as HeadingParagraph, d as ListGroupNode, et as isSectionGroupNode, f as ListGroupSchema, g as PackageBlockLeafSchema, h as PackageBlockLeaf, i as DrawPageGroupNode, it as isSlideGroupNode, j as ShapeConstructGroupNode, k as SectionGroupSchema, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isShapeGroupNode, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isSheetGroupNode, s as HeadingGroupSchema, t as DrawPageChild, tt as isShapeConstructGroupNode, u as ListChild, v as PackageGroupSchema, w as SectionConstructGroupNode, x as PackageNode, y as PackageLeaf, z as SheetDescriptorSchema } from "./package-node-
|
|
1
|
+
import { $ as isSectionConstructGroupNode, A as ShapeChild, B as SheetGroupNode, C as SectionChild, D as SectionDescriptorSchema, E as SectionDescriptor, F as ShapeGroupNode, G as SlideGroupSchema, H as SlideDescriptor, I as ShapeGroupSchema, J as isListGroupNode, K as isDrawPageGroupNode, L as SheetChild, M as ShapeConstructGroupSchema, N as ShapeDescriptor, O as SectionGroupNode, P as ShapeDescriptorSchema, Q as isPackageNode, R as SheetDescriptor, S as PackageNodeSchema, T as SectionConstructGroupSchema, U as SlideDescriptorSchema, V as SheetGroupSchema, W as SlideGroupNode, X as isPackageGroup, Y as isPackageBlockLeaf, Z as isPackageLeaf, _ as PackageGroup, a as DrawPageGroupSchema, b as PackageLeafSchema, c as HeadingParagraph, d as ListGroupNode, et as isSectionGroupNode, f as ListGroupSchema, g as PackageBlockLeafSchema, h as PackageBlockLeaf, i as DrawPageGroupNode, it as isSlideGroupNode, j as ShapeConstructGroupNode, k as SectionGroupSchema, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isShapeGroupNode, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isSheetGroupNode, s as HeadingGroupSchema, t as DrawPageChild, tt as isShapeConstructGroupNode, u as ListChild, v as PackageGroupSchema, w as SectionConstructGroupNode, x as PackageNode, y as PackageLeaf, z as SheetDescriptorSchema } from "./package-node-D3XGBWfs.cjs";
|
|
2
2
|
export { DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, PackageBlockLeaf, PackageBlockLeafSchema, PackageGroup, PackageGroupSchema, PackageLeaf, PackageLeafSchema, PackageNode, PackageNodeSchema, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode };
|
package/dist/package-node.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as isSectionConstructGroupNode, A as ShapeChild, B as SheetGroupNode, C as SectionChild, D as SectionDescriptorSchema, E as SectionDescriptor, F as ShapeGroupNode, G as SlideGroupSchema, H as SlideDescriptor, I as ShapeGroupSchema, J as isListGroupNode, K as isDrawPageGroupNode, L as SheetChild, M as ShapeConstructGroupSchema, N as ShapeDescriptor, O as SectionGroupNode, P as ShapeDescriptorSchema, Q as isPackageNode, R as SheetDescriptor, S as PackageNodeSchema, T as SectionConstructGroupSchema, U as SlideDescriptorSchema, V as SheetGroupSchema, W as SlideGroupNode, X as isPackageGroup, Y as isPackageBlockLeaf, Z as isPackageLeaf, _ as PackageGroup, a as DrawPageGroupSchema, b as PackageLeafSchema, c as HeadingParagraph, d as ListGroupNode, et as isSectionGroupNode, f as ListGroupSchema, g as PackageBlockLeafSchema, h as PackageBlockLeaf, i as DrawPageGroupNode, it as isSlideGroupNode, j as ShapeConstructGroupNode, k as SectionGroupSchema, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isShapeGroupNode, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isSheetGroupNode, s as HeadingGroupSchema, t as DrawPageChild, tt as isShapeConstructGroupNode, u as ListChild, v as PackageGroupSchema, w as SectionConstructGroupNode, x as PackageNode, y as PackageLeaf, z as SheetDescriptorSchema } from "./package-node-
|
|
1
|
+
import { $ as isSectionConstructGroupNode, A as ShapeChild, B as SheetGroupNode, C as SectionChild, D as SectionDescriptorSchema, E as SectionDescriptor, F as ShapeGroupNode, G as SlideGroupSchema, H as SlideDescriptor, I as ShapeGroupSchema, J as isListGroupNode, K as isDrawPageGroupNode, L as SheetChild, M as ShapeConstructGroupSchema, N as ShapeDescriptor, O as SectionGroupNode, P as ShapeDescriptorSchema, Q as isPackageNode, R as SheetDescriptor, S as PackageNodeSchema, T as SectionConstructGroupSchema, U as SlideDescriptorSchema, V as SheetGroupSchema, W as SlideGroupNode, X as isPackageGroup, Y as isPackageBlockLeaf, Z as isPackageLeaf, _ as PackageGroup, a as DrawPageGroupSchema, b as PackageLeafSchema, c as HeadingParagraph, d as ListGroupNode, et as isSectionGroupNode, f as ListGroupSchema, g as PackageBlockLeafSchema, h as PackageBlockLeaf, i as DrawPageGroupNode, it as isSlideGroupNode, j as ShapeConstructGroupNode, k as SectionGroupSchema, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isShapeGroupNode, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isSheetGroupNode, s as HeadingGroupSchema, t as DrawPageChild, tt as isShapeConstructGroupNode, u as ListChild, v as PackageGroupSchema, w as SectionConstructGroupNode, x as PackageNode, y as PackageLeaf, z as SheetDescriptorSchema } from "./package-node-0EHr6E1z.js";
|
|
2
2
|
export { DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, PackageBlockLeaf, PackageBlockLeafSchema, PackageGroup, PackageGroupSchema, PackageLeaf, PackageLeafSchema, PackageNode, PackageNodeSchema, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode };
|
package/dist/package.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as MathMlNode } from "./mathml-B1oTCtzc.cjs";
|
|
2
2
|
import { s as MathExpression } from "./math-B7gZJeND.cjs";
|
|
3
|
-
import { B as SheetGroupNode, O as SectionGroupNode, W as SlideGroupNode, i as DrawPageGroupNode } from "./package-node-
|
|
3
|
+
import { B as SheetGroupNode, O as SectionGroupNode, W as SlideGroupNode, i as DrawPageGroupNode } from "./package-node-D3XGBWfs.cjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/package.d.ts
|
|
6
6
|
declare const DocumentPackageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
package/dist/package.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as MathMlNode } from "./mathml-B1oTCtzc.js";
|
|
2
2
|
import { s as MathExpression } from "./math-B7gZJeND.js";
|
|
3
|
-
import { B as SheetGroupNode, O as SectionGroupNode, W as SlideGroupNode, i as DrawPageGroupNode } from "./package-node-
|
|
3
|
+
import { B as SheetGroupNode, O as SectionGroupNode, W as SlideGroupNode, i as DrawPageGroupNode } from "./package-node-0EHr6E1z.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/package.d.ts
|
|
6
6
|
declare const DocumentPackageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
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@4.
|
|
10
|
+
return `https://cdn.jsdelivr.net/npm/document-schema.js@4.3.1/schemas/${SCHEMA_FILE_NAMES[kind]}`;
|
|
11
11
|
}
|
|
12
12
|
const SCHEMA_URI_PATTERN = /^https:\/\/cdn\.jsdelivr\.net\/npm\/document-schema\.js@([^/]+)\/schemas\/(document-package|content-document|layout-document)\.schema\.json$/;
|
|
13
13
|
function parseSchemaUri(uri) {
|
|
@@ -93,7 +93,7 @@ function documentFromJson(value) {
|
|
|
93
93
|
if (parts.stem === "layout-document") throw new LayoutSchemaDemotedError(value.$schema);
|
|
94
94
|
const kind = kindForFileStem(parts.stem);
|
|
95
95
|
if (kind === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
|
|
96
|
-
if (majorVersionOf(parts.version) !== majorVersionOf("4.
|
|
96
|
+
if (majorVersionOf(parts.version) !== majorVersionOf("4.3.1")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "4.3.1");
|
|
97
97
|
switch (kind) {
|
|
98
98
|
case "DocumentPackage": return {
|
|
99
99
|
kind,
|
package/dist/schema-io.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as ContentDocument } from "./content-
|
|
1
|
+
import { m as ContentDocument } from "./content-CFXL4jMV.cjs";
|
|
2
2
|
import { DocumentPackage } from "./package.cjs";
|
|
3
3
|
//#region src/schema-io.d.ts
|
|
4
4
|
type DocumentSchemaKind = 'DocumentPackage' | 'ContentDocument';
|
package/dist/schema-io.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as ContentDocument } from "./content-
|
|
1
|
+
import { m as ContentDocument } from "./content-32bPQ3aj.js";
|
|
2
2
|
import { DocumentPackage } from "./package.js";
|
|
3
3
|
//#region src/schema-io.d.ts
|
|
4
4
|
type DocumentSchemaKind = 'DocumentPackage' | '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@4.
|
|
9
|
+
return `https://cdn.jsdelivr.net/npm/document-schema.js@4.3.1/schemas/${SCHEMA_FILE_NAMES[kind]}`;
|
|
10
10
|
}
|
|
11
11
|
const SCHEMA_URI_PATTERN = /^https:\/\/cdn\.jsdelivr\.net\/npm\/document-schema\.js@([^/]+)\/schemas\/(document-package|content-document|layout-document)\.schema\.json$/;
|
|
12
12
|
function parseSchemaUri(uri) {
|
|
@@ -92,7 +92,7 @@ function documentFromJson(value) {
|
|
|
92
92
|
if (parts.stem === "layout-document") throw new LayoutSchemaDemotedError(value.$schema);
|
|
93
93
|
const kind = kindForFileStem(parts.stem);
|
|
94
94
|
if (kind === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
|
|
95
|
-
if (majorVersionOf(parts.version) !== majorVersionOf("4.
|
|
95
|
+
if (majorVersionOf(parts.version) !== majorVersionOf("4.3.1")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "4.3.1");
|
|
96
96
|
switch (kind) {
|
|
97
97
|
case "DocumentPackage": return {
|
|
98
98
|
kind,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "document-model.js",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"description": "The canonical, format-agnostic content and document-package schemas shared by ooxml.js, odf.js, documents.js, pdf-codec, and markdown-codec
|
|
3
|
+
"version": "4.3.1",
|
|
4
|
+
"description": "The canonical, format-agnostic content and document-package 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": {
|
|
7
7
|
"type": "git",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
67
|
-
"@cloudflare/vitest-pool-workers": "^0.
|
|
67
|
+
"@cloudflare/vitest-pool-workers": "^0.21.2",
|
|
68
68
|
"@commitlint/cli": "^21.2.1",
|
|
69
69
|
"@commitlint/config-conventional": "^21.2.0",
|
|
70
70
|
"@eslint/js": "^10.0.1",
|
|
@@ -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@4.
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/document-schema.js@4.3.1/schemas/content-document.schema.json",
|
|
4
4
|
"oneOf": [
|
|
5
5
|
{
|
|
6
6
|
"type": "object",
|
|
@@ -2857,7 +2857,7 @@
|
|
|
2857
2857
|
]
|
|
2858
2858
|
},
|
|
2859
2859
|
"document": {
|
|
2860
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@4.
|
|
2860
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@4.3.1/schemas/content-document.schema.json"
|
|
2861
2861
|
},
|
|
2862
2862
|
"frame": {
|
|
2863
2863
|
"$ref": "#/$defs/Box"
|
|
@@ -4132,7 +4132,7 @@
|
|
|
4132
4132
|
]
|
|
4133
4133
|
},
|
|
4134
4134
|
"document": {
|
|
4135
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@4.
|
|
4135
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@4.3.1/schemas/content-document.schema.json"
|
|
4136
4136
|
},
|
|
4137
4137
|
"frame": {
|
|
4138
4138
|
"$ref": "#/$defs/Box"
|
|
@@ -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@4.
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/document-schema.js@4.3.1/schemas/document-package.schema.json",
|
|
4
4
|
"oneOf": [
|
|
5
5
|
{
|
|
6
6
|
"type": "object",
|
|
@@ -1066,7 +1066,7 @@
|
|
|
1066
1066
|
]
|
|
1067
1067
|
},
|
|
1068
1068
|
"document": {
|
|
1069
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@4.
|
|
1069
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@4.3.1/schemas/content-document.schema.json"
|
|
1070
1070
|
},
|
|
1071
1071
|
"frame": {
|
|
1072
1072
|
"$ref": "#/$defs/Box"
|
|
@@ -2341,7 +2341,7 @@
|
|
|
2341
2341
|
]
|
|
2342
2342
|
},
|
|
2343
2343
|
"document": {
|
|
2344
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@4.
|
|
2344
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@4.3.1/schemas/content-document.schema.json"
|
|
2345
2345
|
},
|
|
2346
2346
|
"frame": {
|
|
2347
2347
|
"$ref": "#/$defs/Box"
|