document-schema 7.11.0 → 7.11.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/a1.cjs +1 -1
- package/dist/a1.js +1 -1
- package/dist/codec.d.cts +1 -1
- package/dist/codec.d.ts +1 -1
- package/dist/color.cjs +3 -5
- package/dist/color.js +3 -5
- package/dist/{construct-GVdTKrE7.d.ts → construct-C9cYkjnd.d.ts} +3 -3
- package/dist/construct.d.ts +1 -1
- package/dist/{content-Ck4LdLBJ.d.ts → content-GHj_31uQ.d.ts} +3 -3
- package/dist/content-json-schema-defs.cjs +1 -3
- package/dist/content-json-schema-defs.js +1 -3
- package/dist/{content-JJrcHjkR.d.cts → content-zNNPbwYY.d.cts} +3 -3
- package/dist/content.cjs +1 -1
- package/dist/content.d.cts +1 -1
- package/dist/content.d.ts +1 -1
- package/dist/content.js +1 -1
- package/dist/decompose.d.cts +2 -2
- package/dist/decompose.d.ts +2 -2
- package/dist/definitions.d.cts +1 -1
- package/dist/definitions.d.ts +1 -1
- package/dist/factor-styles.cjs +17 -61
- package/dist/factor-styles.d.cts +1 -1
- package/dist/factor-styles.d.ts +1 -1
- package/dist/factor-styles.js +17 -61
- package/dist/flatten.d.cts +1 -1
- package/dist/flatten.d.ts +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/{package-node-BGyYUU-O.d.ts → package-node-CIZQ2_C1.d.ts} +8 -8
- package/dist/{package-node-CzUJ6jKN.d.cts → package-node-DaPwHzsg.d.cts} +7 -7
- package/dist/package-node.cjs +0 -1
- package/dist/package-node.d.cts +1 -1
- package/dist/package-node.d.ts +1 -1
- package/dist/package-node.js +0 -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 +2 -2
- package/schemas/content-document.schema.json +16 -16
- package/schemas/document-tree.schema.json +3 -3
package/dist/factor-styles.js
CHANGED
|
@@ -21,18 +21,9 @@ const RUN_STYLE_KEYS = [
|
|
|
21
21
|
"sizePt",
|
|
22
22
|
"color"
|
|
23
23
|
];
|
|
24
|
-
function isShapeGroupWrapper(wrapper) {
|
|
25
|
-
return !("kind" in wrapper.node);
|
|
26
|
-
}
|
|
27
24
|
function isAnchorGroupWrapper(wrapper) {
|
|
28
25
|
return "kind" in wrapper.node && wrapper.node.kind === "paragraph";
|
|
29
26
|
}
|
|
30
|
-
function isSlideGroupWrapper(wrapper) {
|
|
31
|
-
return "kind" in wrapper.node && wrapper.node.kind === "slide";
|
|
32
|
-
}
|
|
33
|
-
function isDrawPageGroupWrapper(wrapper) {
|
|
34
|
-
return "kind" in wrapper.node && wrapper.node.kind === "drawPage";
|
|
35
|
-
}
|
|
36
27
|
function isHeadingGroup(group) {
|
|
37
28
|
return group.node.headingLevel !== void 0;
|
|
38
29
|
}
|
|
@@ -81,21 +72,13 @@ function factorStyles(pkg) {
|
|
|
81
72
|
...pkg.fonts !== void 0 ? { fonts: pkg.fonts } : {},
|
|
82
73
|
...pkg.source !== void 0 ? { source: pkg.source } : {}
|
|
83
74
|
};
|
|
84
|
-
if (pkg.definitions === void 0 && pkg.fonts === void 0 && pkg.source === void 0) return reassembled;
|
|
85
75
|
return {
|
|
86
76
|
...reassembled,
|
|
87
77
|
...carried
|
|
88
78
|
};
|
|
89
79
|
}
|
|
90
80
|
function extentOf(wrapper) {
|
|
91
|
-
if (isShapeGroupWrapper(wrapper)) return flowExtent(wrapper.children);
|
|
92
81
|
if (isAnchorGroupWrapper(wrapper)) return [wrapper.node, ...flowExtent(wrapper.children)];
|
|
93
|
-
if (isSlideGroupWrapper(wrapper)) return wrapper.children.flatMap(extentOf);
|
|
94
|
-
if (isDrawPageGroupWrapper(wrapper)) {
|
|
95
|
-
const paragraphs = [];
|
|
96
|
-
for (const child of wrapper.children) if ("node" in child) paragraphs.push(...extentOf(child));
|
|
97
|
-
return paragraphs;
|
|
98
|
-
}
|
|
99
82
|
return flowExtent(wrapper.children);
|
|
100
83
|
}
|
|
101
84
|
function flowExtent(children) {
|
|
@@ -106,12 +89,12 @@ function flowExtent(children) {
|
|
|
106
89
|
}
|
|
107
90
|
function paragraphTuple(paragraph, keys) {
|
|
108
91
|
const tuple = {};
|
|
109
|
-
for (const key of keys)
|
|
92
|
+
for (const key of keys) tuple[key] = paragraph[key];
|
|
110
93
|
return tuple;
|
|
111
94
|
}
|
|
112
95
|
function runTuple(run, keys) {
|
|
113
96
|
const tuple = {};
|
|
114
|
-
for (const key of keys)
|
|
97
|
+
for (const key of keys) tuple[key] = run[key];
|
|
115
98
|
return tuple;
|
|
116
99
|
}
|
|
117
100
|
function commonParagraphKeys(extent, frozen) {
|
|
@@ -119,7 +102,6 @@ function commonParagraphKeys(extent, frozen) {
|
|
|
119
102
|
}
|
|
120
103
|
function commonRunKeys(extent, frozen) {
|
|
121
104
|
const runs = extent.flatMap((paragraph) => paragraph.runs);
|
|
122
|
-
if (runs.length === 0) return [];
|
|
123
105
|
return RUN_STYLE_KEYS.filter((key) => !frozen.has(key) && runs.every((run) => run[key] !== void 0));
|
|
124
106
|
}
|
|
125
107
|
function bestParagraphCandidate(extent, keys, factored) {
|
|
@@ -164,10 +146,10 @@ function bestGroup(groups) {
|
|
|
164
146
|
}
|
|
165
147
|
return best;
|
|
166
148
|
}
|
|
167
|
-
function plan(wrapper,
|
|
149
|
+
function plan(wrapper, branch, state, entries) {
|
|
168
150
|
const extent = extentOf(wrapper);
|
|
169
|
-
const paragraphCandidate =
|
|
170
|
-
const runCandidate =
|
|
151
|
+
const paragraphCandidate = bestParagraphCandidate(extent, commonParagraphKeys(extent, branch.frozenParagraphs), branch.factoredParagraphs);
|
|
152
|
+
const runCandidate = bestRunCandidate(extent, commonRunKeys(extent, branch.frozenRuns), branch.factoredRuns);
|
|
171
153
|
const nextFrozenParagraphs = new Set(branch.frozenParagraphs);
|
|
172
154
|
const nextFrozenRuns = new Set(branch.frozenRuns);
|
|
173
155
|
const nextFactoredParagraphs = new Set(branch.factoredParagraphs);
|
|
@@ -182,8 +164,7 @@ function plan(wrapper, visit, branch, state, entries) {
|
|
|
182
164
|
if (existing === void 0) entries.set(contentKey, {
|
|
183
165
|
content,
|
|
184
166
|
wrappers: [wrapper],
|
|
185
|
-
frequency: (paragraphCandidate?.positions.length ?? 0) + (runCandidate?.positions.length ?? 0)
|
|
186
|
-
firstVisit: visit.index
|
|
167
|
+
frequency: (paragraphCandidate?.positions.length ?? 0) + (runCandidate?.positions.length ?? 0)
|
|
187
168
|
});
|
|
188
169
|
else {
|
|
189
170
|
existing.wrappers.push(wrapper);
|
|
@@ -209,27 +190,15 @@ function plan(wrapper, visit, branch, state, entries) {
|
|
|
209
190
|
}
|
|
210
191
|
state.wrapperStrips.set(wrapper, strips);
|
|
211
192
|
}
|
|
212
|
-
visit.index += 1;
|
|
213
193
|
const next = {
|
|
214
194
|
frozenParagraphs: nextFrozenParagraphs,
|
|
215
195
|
frozenRuns: nextFrozenRuns,
|
|
216
196
|
factoredParagraphs: nextFactoredParagraphs,
|
|
217
197
|
factoredRuns: nextFactoredRuns
|
|
218
198
|
};
|
|
219
|
-
for (const child of childWrappers(wrapper)) plan(child,
|
|
199
|
+
for (const child of childWrappers(wrapper)) plan(child, next, state, entries);
|
|
220
200
|
}
|
|
221
201
|
function childWrappers(wrapper) {
|
|
222
|
-
if (isShapeGroupWrapper(wrapper) || isAnchorGroupWrapper(wrapper)) {
|
|
223
|
-
const wrappers = [];
|
|
224
|
-
for (const child of wrapper.children) if ("node" in child && "children" in child) wrappers.push(child);
|
|
225
|
-
return wrappers;
|
|
226
|
-
}
|
|
227
|
-
if (isSlideGroupWrapper(wrapper)) return [...wrapper.children];
|
|
228
|
-
if (isDrawPageGroupWrapper(wrapper)) {
|
|
229
|
-
const shapes = [];
|
|
230
|
-
for (const child of wrapper.children) if ("node" in child) shapes.push(child);
|
|
231
|
-
return shapes;
|
|
232
|
-
}
|
|
233
202
|
const wrappers = [];
|
|
234
203
|
for (const child of wrapper.children) if ("node" in child && "children" in child) wrappers.push(child);
|
|
235
204
|
return wrappers;
|
|
@@ -240,7 +209,6 @@ function mint(pkg) {
|
|
|
240
209
|
wrapperStrips: /* @__PURE__ */ new Map()
|
|
241
210
|
};
|
|
242
211
|
const entries = /* @__PURE__ */ new Map();
|
|
243
|
-
const visit = { index: 0 };
|
|
244
212
|
const rootBranch = {
|
|
245
213
|
frozenParagraphs: /* @__PURE__ */ new Set(),
|
|
246
214
|
frozenRuns: /* @__PURE__ */ new Set(),
|
|
@@ -249,15 +217,11 @@ function mint(pkg) {
|
|
|
249
217
|
};
|
|
250
218
|
switch (pkg.kind) {
|
|
251
219
|
case "wordprocessing":
|
|
252
|
-
for (const root of pkg.children) plan(root, visit, rootBranch, state, entries);
|
|
253
|
-
break;
|
|
254
220
|
case "presentation":
|
|
255
|
-
|
|
256
|
-
break;
|
|
257
|
-
case "drawing": for (const root of pkg.children) plan(root, visit, rootBranch, state, entries);
|
|
221
|
+
case "drawing": for (const root of pkg.children) plan(root, rootBranch, state, entries);
|
|
258
222
|
}
|
|
259
223
|
if (entries.size === 0) return pkg;
|
|
260
|
-
const ordered = [...entries.values()].sort((a, b) => b.frequency - a.frequency
|
|
224
|
+
const ordered = [...entries.values()].sort((a, b) => b.frequency - a.frequency);
|
|
261
225
|
const styles = {};
|
|
262
226
|
ordered.forEach((entry, index) => {
|
|
263
227
|
const id = `s${index + 1}`;
|
|
@@ -311,7 +275,7 @@ function rebuildSlideGroup(group, chain, state) {
|
|
|
311
275
|
const inner = innerChain(group, chain, state);
|
|
312
276
|
const children = group.children.map((shape) => rebuildShapeGroup(shape, inner, state));
|
|
313
277
|
const ref = state.wrapperRefs.get(group);
|
|
314
|
-
return
|
|
278
|
+
return children.every((child, index) => child === group.children[index]) ? group : {
|
|
315
279
|
node: group.node,
|
|
316
280
|
...ref !== void 0 ? { style: ref } : {},
|
|
317
281
|
children
|
|
@@ -321,7 +285,7 @@ function rebuildDrawPageGroup(group, chain, state) {
|
|
|
321
285
|
const inner = innerChain(group, chain, state);
|
|
322
286
|
const children = group.children.map((child) => "node" in child ? rebuildShapeGroup(child, inner, state) : child);
|
|
323
287
|
const ref = state.wrapperRefs.get(group);
|
|
324
|
-
return
|
|
288
|
+
return children.every((child, index) => child === group.children[index]) ? group : {
|
|
325
289
|
node: group.node,
|
|
326
290
|
...ref !== void 0 ? { style: ref } : {},
|
|
327
291
|
children
|
|
@@ -331,7 +295,7 @@ function rebuildSectionGroup(group, chain, state) {
|
|
|
331
295
|
const inner = innerChain(group, chain, state);
|
|
332
296
|
const children = group.children.map((child) => rebuildSectionChild(child, inner, state));
|
|
333
297
|
const ref = state.wrapperRefs.get(group);
|
|
334
|
-
return
|
|
298
|
+
return children.every((child, index) => child === group.children[index]) ? group : {
|
|
335
299
|
node: group.node,
|
|
336
300
|
...ref !== void 0 ? { style: ref } : {},
|
|
337
301
|
children
|
|
@@ -353,7 +317,7 @@ function rebuildShapeGroup(group, chain, state) {
|
|
|
353
317
|
const inner = innerChain(group, chain, state);
|
|
354
318
|
const children = group.children.map((child) => rebuildListChild(child, inner, state));
|
|
355
319
|
const ref = state.wrapperRefs.get(group);
|
|
356
|
-
return
|
|
320
|
+
return children.every((child, index) => child === group.children[index]) ? group : {
|
|
357
321
|
node: group.node,
|
|
358
322
|
...ref !== void 0 ? { style: ref } : {},
|
|
359
323
|
children
|
|
@@ -363,7 +327,7 @@ function rebuildSectionConstructGroup(group, chain, state) {
|
|
|
363
327
|
const inner = innerChain(group, chain, state);
|
|
364
328
|
const children = group.children.map((child) => rebuildSectionChild(child, inner, state));
|
|
365
329
|
const ref = state.wrapperRefs.get(group);
|
|
366
|
-
return
|
|
330
|
+
return children.every((child, index) => child === group.children[index]) ? group : {
|
|
367
331
|
node: group.node,
|
|
368
332
|
...ref !== void 0 ? { style: ref } : {},
|
|
369
333
|
children
|
|
@@ -373,7 +337,7 @@ function rebuildShapeConstructGroup(group, chain, state) {
|
|
|
373
337
|
const inner = innerChain(group, chain, state);
|
|
374
338
|
const children = group.children.map((child) => rebuildListChild(child, inner, state));
|
|
375
339
|
const ref = state.wrapperRefs.get(group);
|
|
376
|
-
return
|
|
340
|
+
return children.every((child, index) => child === group.children[index]) ? group : {
|
|
377
341
|
node: group.node,
|
|
378
342
|
...ref !== void 0 ? { style: ref } : {},
|
|
379
343
|
children
|
|
@@ -382,10 +346,9 @@ function rebuildShapeConstructGroup(group, chain, state) {
|
|
|
382
346
|
function rebuildHeadingGroup(group, chain, state, rebuildChild) {
|
|
383
347
|
const inner = innerChain(group, chain, state);
|
|
384
348
|
const anchor = rebuildParagraph(group.node, inner);
|
|
385
|
-
assertHeadingAnchor(anchor);
|
|
386
349
|
const children = group.children.map((child) => rebuildChild(child, inner, state));
|
|
387
350
|
const ref = state.wrapperRefs.get(group);
|
|
388
|
-
return
|
|
351
|
+
return anchor === group.node && children.every((child, index) => child === group.children[index]) ? group : {
|
|
389
352
|
node: anchor,
|
|
390
353
|
...ref !== void 0 ? { style: ref } : {},
|
|
391
354
|
children
|
|
@@ -394,21 +357,14 @@ function rebuildHeadingGroup(group, chain, state, rebuildChild) {
|
|
|
394
357
|
function rebuildListGroup(group, chain, state, rebuildChild) {
|
|
395
358
|
const inner = innerChain(group, chain, state);
|
|
396
359
|
const anchor = rebuildParagraph(group.node, inner);
|
|
397
|
-
assertListAnchor(anchor);
|
|
398
360
|
const children = group.children.map((child) => rebuildChild(child, inner, state));
|
|
399
361
|
const ref = state.wrapperRefs.get(group);
|
|
400
|
-
return
|
|
362
|
+
return anchor === group.node && children.every((child, index) => child === group.children[index]) ? group : {
|
|
401
363
|
node: anchor,
|
|
402
364
|
...ref !== void 0 ? { style: ref } : {},
|
|
403
365
|
children
|
|
404
366
|
};
|
|
405
367
|
}
|
|
406
|
-
function assertHeadingAnchor(paragraph) {
|
|
407
|
-
if (paragraph.headingLevel === void 0) throw new Error("factorStyles: stripping dropped a heading anchor's headingLevel");
|
|
408
|
-
}
|
|
409
|
-
function assertListAnchor(paragraph) {
|
|
410
|
-
if (paragraph.list === void 0) throw new Error("factorStyles: stripping dropped a list anchor's list membership");
|
|
411
|
-
}
|
|
412
368
|
function rebuildParagraph(paragraph, chain) {
|
|
413
369
|
const strips = paragraphStripsOf(chain, paragraph);
|
|
414
370
|
const base = strips === void 0 ? paragraph : stripParagraphKeys(paragraph, strips);
|
package/dist/flatten.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ContentDocument } from "./content-
|
|
1
|
+
import { C as ContentDocument } from "./content-zNNPbwYY.cjs";
|
|
2
2
|
import { DocumentTree } from "./package.cjs";
|
|
3
3
|
//#region src/flatten.d.ts
|
|
4
4
|
declare function flattenTree(pkg: DocumentTree): ContentDocument;
|
package/dist/flatten.d.ts
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -6,11 +6,11 @@ import { a as rgbHexToColor, i as colorToRgbHex, n as Color, r as ColorSchema, t
|
|
|
6
6
|
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";
|
|
7
7
|
import { i as SourceResidueSchema, n as SourceFormatSchema, r as SourceResidue, t as SourceFormat } from "./source-Bas5ol6f.cjs";
|
|
8
8
|
import { a as LayoutFontSchema, i as LayoutFont, n as AlignmentSchema, o as TextDirection, r as DEFAULT_LAYOUT_FONT, s as TextDirectionSchema, t as Alignment } from "./style-BGMcYrD2.cjs";
|
|
9
|
-
import { $ as ContentHatchStyleSchema, $t as ContentSheetRepeatRange, A as ContentEmbeddedObjectKind, An as RunConstructExtent, At as ContentSheetCellComment, B as ContentFloatPosition, Bn as isContentConstructEnd, Bt as ContentSheetConditionalFormatValueSchema, C as ContentDocument, Cn as ContentVectorSchema, Ct as ContentRunSchema, D as ContentEmbeddedObject, Dn as IMAGE_FORMATS, Dt as ContentShapeSchema, E as ContentDrawPageSchema, En as FusedNode, Et as ContentShape, F as ContentFloatAlignSchema, Fn as clampHeadingLevel, Ft as ContentSheetConditionalFormat, G as ContentFormulaSchema, Gt as ContentSheetImage, H as ContentFont, Hn as isRunConstructExtent, Ht as ContentSheetDataValidationSchema, I as ContentFloatAxis, In as contentDocumentSharedFields, It as ContentSheetConditionalFormatSchema, J as ContentGradientStyle, Jt as ContentSheetPrintRangeSchema, K as ContentGradientFill, Kt as ContentSheetImageSchema, L as ContentFloatAxisSchema, Ln as findConstructMarkerImbalance, Lt as ContentSheetConditionalFormatStyle, M as ContentFillPattern, Mn as RunConstructFault, Mt as ContentSheetCellSchema, N as ContentFillPatternSchema, Nn as SheetRuleOperator, Nt as ContentSheetColumn, O as ContentEmbeddedObjectBlock, On as ImageFormat, Ot as ContentSheet, P as ContentFloatAlign, Pn as SheetRuleOperatorSchema, Pt as ContentSheetColumnSchema, Q as ContentHatchStyle, Qt as ContentSheetRangeSchema, R as ContentFloatOrigin, Rn as findRunConstructFault, Rt as ContentSheetConditionalFormatStyleSchema, S as ContentDefinedNameSchema, Sn as ContentVector, St as ContentRun, T as ContentDrawPage, Tn as DecimalStringSchema, Tt as ContentSectionSchema, U as ContentFontSchema, Un as resolveCellFillColor, Ut as ContentSheetDataValidationType, V as ContentFloatPositionSchema, Vn as isContentConstructStart, Vt as ContentSheetDataValidation, W as ContentFormula, Wn as unrecognizedFillKind, Wt as ContentSheetDataValidationTypeSchema, X as ContentHatchFill, Xt as ContentSheetPrintSettingsSchema, Y as ContentGradientStyleSchema, Yt as ContentSheetPrintSettings, Z as ContentHatchFillSchema, Zt as ContentSheetRange, _ as ContentConstructEnd, _n as ContentTableRow, _t as ContentParagraphSchema, a as ContentBlock, an as ContentSlideSchema, at as ContentInterpretationSchema, b as ContentConstructStartSchema, bn as ContentTranscript, bt as ContentPathSegment, c as ContentBorderSchema, cn as ContentStrokeDashSchema, ct as ContentOrigin, d as ContentCellFill, dn as ContentStrokeStyleSchema, dt as ContentPageBreakSchema, en as ContentSheetRepeatRangeSchema, et as ContentImageBlock, f as ContentCellFillSchema, fn as ContentSubpath, ft as ContentPageFurniture, g as ContentCellValueSchema, gn as ContentTableCellSchema, gt as ContentParagraphBordersSchema, h as ContentCellValue, hn as ContentTableCell, ht as ContentParagraphBorders, i as ContentBitmapFillSchema, in as ContentSlide, it as ContentInterpretation, j as ContentEmbeddedObjectSchema, jn as RunConstructExtentSchema, jt as ContentSheetCellCommentSchema, k as ContentEmbeddedObjectBlockSchema, kn as RUN_FONT_PROPERTY_SHAPE, kt as ContentSheetCell, l as ContentCellBorders, ln as ContentStrokeSchema, lt as ContentOriginSchema, m as ContentCellPatternTypeSchema, mn as ContentTable, mt as ContentParagraph, n as ConstructMarkerImbalance, nn as ContentSheetRowSchema, nt as ContentImageOriginal, o as ContentBlockSchema, on as ContentStroke, ot as ContentListMembership, p as ContentCellPatternType, pn as ContentSubpathSchema, pt as ContentPageFurnitureSchema, q as ContentGradientFillSchema, qt as ContentSheetPrintRange, r as ContentBitmapFill, rn as ContentSheetSchema, rt as ContentImageOriginalSchema, s as ContentBorder, sn as ContentStrokeDash, st as ContentListMembershipSchema, t as CONTENT_ANNOTATION_FIELDS, tn as ContentSheetRow, tt as ContentImageBlockSchema, u as ContentCellBordersSchema, un as ContentStrokeStyle, ut as ContentPageBreak, v as ContentConstructEndSchema, vn as ContentTableRowSchema, vt as ContentPathPoint, w as ContentDocumentSchema, wn as DecimalString, wt as ContentSection, x as ContentDefinedName, xn as ContentTranscriptSchema, xt as ContentPathSegmentSchema, y as ContentConstructStart, yn as ContentTableSchema, yt as ContentPathPointSchema, z as ContentFloatOriginSchema, zn as isContentBlock, zt as ContentSheetConditionalFormatValue } from "./content-
|
|
9
|
+
import { $ as ContentHatchStyleSchema, $t as ContentSheetRepeatRange, A as ContentEmbeddedObjectKind, An as RunConstructExtent, At as ContentSheetCellComment, B as ContentFloatPosition, Bn as isContentConstructEnd, Bt as ContentSheetConditionalFormatValueSchema, C as ContentDocument, Cn as ContentVectorSchema, Ct as ContentRunSchema, D as ContentEmbeddedObject, Dn as IMAGE_FORMATS, Dt as ContentShapeSchema, E as ContentDrawPageSchema, En as FusedNode, Et as ContentShape, F as ContentFloatAlignSchema, Fn as clampHeadingLevel, Ft as ContentSheetConditionalFormat, G as ContentFormulaSchema, Gt as ContentSheetImage, H as ContentFont, Hn as isRunConstructExtent, Ht as ContentSheetDataValidationSchema, I as ContentFloatAxis, In as contentDocumentSharedFields, It as ContentSheetConditionalFormatSchema, J as ContentGradientStyle, Jt as ContentSheetPrintRangeSchema, K as ContentGradientFill, Kt as ContentSheetImageSchema, L as ContentFloatAxisSchema, Ln as findConstructMarkerImbalance, Lt as ContentSheetConditionalFormatStyle, M as ContentFillPattern, Mn as RunConstructFault, Mt as ContentSheetCellSchema, N as ContentFillPatternSchema, Nn as SheetRuleOperator, Nt as ContentSheetColumn, O as ContentEmbeddedObjectBlock, On as ImageFormat, Ot as ContentSheet, P as ContentFloatAlign, Pn as SheetRuleOperatorSchema, Pt as ContentSheetColumnSchema, Q as ContentHatchStyle, Qt as ContentSheetRangeSchema, R as ContentFloatOrigin, Rn as findRunConstructFault, Rt as ContentSheetConditionalFormatStyleSchema, S as ContentDefinedNameSchema, Sn as ContentVector, St as ContentRun, T as ContentDrawPage, Tn as DecimalStringSchema, Tt as ContentSectionSchema, U as ContentFontSchema, Un as resolveCellFillColor, Ut as ContentSheetDataValidationType, V as ContentFloatPositionSchema, Vn as isContentConstructStart, Vt as ContentSheetDataValidation, W as ContentFormula, Wn as unrecognizedFillKind, Wt as ContentSheetDataValidationTypeSchema, X as ContentHatchFill, Xt as ContentSheetPrintSettingsSchema, Y as ContentGradientStyleSchema, Yt as ContentSheetPrintSettings, Z as ContentHatchFillSchema, Zt as ContentSheetRange, _ as ContentConstructEnd, _n as ContentTableRow, _t as ContentParagraphSchema, a as ContentBlock, an as ContentSlideSchema, at as ContentInterpretationSchema, b as ContentConstructStartSchema, bn as ContentTranscript, bt as ContentPathSegment, c as ContentBorderSchema, cn as ContentStrokeDashSchema, ct as ContentOrigin, d as ContentCellFill, dn as ContentStrokeStyleSchema, dt as ContentPageBreakSchema, en as ContentSheetRepeatRangeSchema, et as ContentImageBlock, f as ContentCellFillSchema, fn as ContentSubpath, ft as ContentPageFurniture, g as ContentCellValueSchema, gn as ContentTableCellSchema, gt as ContentParagraphBordersSchema, h as ContentCellValue, hn as ContentTableCell, ht as ContentParagraphBorders, i as ContentBitmapFillSchema, in as ContentSlide, it as ContentInterpretation, j as ContentEmbeddedObjectSchema, jn as RunConstructExtentSchema, jt as ContentSheetCellCommentSchema, k as ContentEmbeddedObjectBlockSchema, kn as RUN_FONT_PROPERTY_SHAPE, kt as ContentSheetCell, l as ContentCellBorders, ln as ContentStrokeSchema, lt as ContentOriginSchema, m as ContentCellPatternTypeSchema, mn as ContentTable, mt as ContentParagraph, n as ConstructMarkerImbalance, nn as ContentSheetRowSchema, nt as ContentImageOriginal, o as ContentBlockSchema, on as ContentStroke, ot as ContentListMembership, p as ContentCellPatternType, pn as ContentSubpathSchema, pt as ContentPageFurnitureSchema, q as ContentGradientFillSchema, qt as ContentSheetPrintRange, r as ContentBitmapFill, rn as ContentSheetSchema, rt as ContentImageOriginalSchema, s as ContentBorder, sn as ContentStrokeDash, st as ContentListMembershipSchema, t as CONTENT_ANNOTATION_FIELDS, tn as ContentSheetRow, tt as ContentImageBlockSchema, u as ContentCellBordersSchema, un as ContentStrokeStyle, ut as ContentPageBreak, v as ContentConstructEndSchema, vn as ContentTableRowSchema, vt as ContentPathPoint, w as ContentDocumentSchema, wn as DecimalString, wt as ContentSection, x as ContentDefinedName, xn as ContentTranscriptSchema, xt as ContentPathSegmentSchema, y as ContentConstructStart, yn as ContentTableSchema, yt as ContentPathPointSchema, z as ContentFloatOriginSchema, zn as isContentBlock, zt as ContentSheetConditionalFormatValue } from "./content-zNNPbwYY.cjs";
|
|
10
10
|
import { ContentCodec } from "./codec.cjs";
|
|
11
11
|
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-C9cYkjnd.cjs";
|
|
12
12
|
import { CONTENT_DEFS, CONTENT_DOCUMENT_URI, EMBEDDED_OBJECT_KINDS, MAX_SAFE_INTEGER } from "./content-json-schema-defs.cjs";
|
|
13
|
-
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-
|
|
13
|
+
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-DaPwHzsg.cjs";
|
|
14
14
|
import { ConstructMarkerImbalanceError, TreeChildren, decompose } from "./decompose.cjs";
|
|
15
15
|
import { DefinitionEntry, DefinitionEntrySchema, DefinitionsTable, DefinitionsTableSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StylesTable, StylesTableSchema, applyParagraphStyleProperties, applyRunStyleProperties, overlayStyleEntries, resolveStyleChain } from "./definitions.cjs";
|
|
16
16
|
import { DocumentTree, DocumentTreeSchema, TreeEmbeddedFont, TreeEmbeddedFontSchema } from "./package.cjs";
|
package/dist/index.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ import { a as rgbHexToColor, i as colorToRgbHex, n as Color, r as ColorSchema, t
|
|
|
6
6
|
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";
|
|
7
7
|
import { i as SourceResidueSchema, n as SourceFormatSchema, r as SourceResidue, t as SourceFormat } from "./source-Bas5ol6f.js";
|
|
8
8
|
import { a as LayoutFontSchema, i as LayoutFont, n as AlignmentSchema, o as TextDirection, r as DEFAULT_LAYOUT_FONT, s as TextDirectionSchema, t as Alignment } from "./style-BGMcYrD2.js";
|
|
9
|
-
import { $ as ContentHatchStyleSchema, $t as ContentSheetRepeatRange, A as ContentEmbeddedObjectKind, An as RunConstructExtent, At as ContentSheetCellComment, B as ContentFloatPosition, Bn as isContentConstructEnd, Bt as ContentSheetConditionalFormatValueSchema, C as ContentDocument, Cn as ContentVectorSchema, Ct as ContentRunSchema, D as ContentEmbeddedObject, Dn as IMAGE_FORMATS, Dt as ContentShapeSchema, E as ContentDrawPageSchema, En as FusedNode, Et as ContentShape, F as ContentFloatAlignSchema, Fn as clampHeadingLevel, Ft as ContentSheetConditionalFormat, G as ContentFormulaSchema, Gt as ContentSheetImage, H as ContentFont, Hn as isRunConstructExtent, Ht as ContentSheetDataValidationSchema, I as ContentFloatAxis, In as contentDocumentSharedFields, It as ContentSheetConditionalFormatSchema, J as ContentGradientStyle, Jt as ContentSheetPrintRangeSchema, K as ContentGradientFill, Kt as ContentSheetImageSchema, L as ContentFloatAxisSchema, Ln as findConstructMarkerImbalance, Lt as ContentSheetConditionalFormatStyle, M as ContentFillPattern, Mn as RunConstructFault, Mt as ContentSheetCellSchema, N as ContentFillPatternSchema, Nn as SheetRuleOperator, Nt as ContentSheetColumn, O as ContentEmbeddedObjectBlock, On as ImageFormat, Ot as ContentSheet, P as ContentFloatAlign, Pn as SheetRuleOperatorSchema, Pt as ContentSheetColumnSchema, Q as ContentHatchStyle, Qt as ContentSheetRangeSchema, R as ContentFloatOrigin, Rn as findRunConstructFault, Rt as ContentSheetConditionalFormatStyleSchema, S as ContentDefinedNameSchema, Sn as ContentVector, St as ContentRun, T as ContentDrawPage, Tn as DecimalStringSchema, Tt as ContentSectionSchema, U as ContentFontSchema, Un as resolveCellFillColor, Ut as ContentSheetDataValidationType, V as ContentFloatPositionSchema, Vn as isContentConstructStart, Vt as ContentSheetDataValidation, W as ContentFormula, Wn as unrecognizedFillKind, Wt as ContentSheetDataValidationTypeSchema, X as ContentHatchFill, Xt as ContentSheetPrintSettingsSchema, Y as ContentGradientStyleSchema, Yt as ContentSheetPrintSettings, Z as ContentHatchFillSchema, Zt as ContentSheetRange, _ as ContentConstructEnd, _n as ContentTableRow, _t as ContentParagraphSchema, a as ContentBlock, an as ContentSlideSchema, at as ContentInterpretationSchema, b as ContentConstructStartSchema, bn as ContentTranscript, bt as ContentPathSegment, c as ContentBorderSchema, cn as ContentStrokeDashSchema, ct as ContentOrigin, d as ContentCellFill, dn as ContentStrokeStyleSchema, dt as ContentPageBreakSchema, en as ContentSheetRepeatRangeSchema, et as ContentImageBlock, f as ContentCellFillSchema, fn as ContentSubpath, ft as ContentPageFurniture, g as ContentCellValueSchema, gn as ContentTableCellSchema, gt as ContentParagraphBordersSchema, h as ContentCellValue, hn as ContentTableCell, ht as ContentParagraphBorders, i as ContentBitmapFillSchema, in as ContentSlide, it as ContentInterpretation, j as ContentEmbeddedObjectSchema, jn as RunConstructExtentSchema, jt as ContentSheetCellCommentSchema, k as ContentEmbeddedObjectBlockSchema, kn as RUN_FONT_PROPERTY_SHAPE, kt as ContentSheetCell, l as ContentCellBorders, ln as ContentStrokeSchema, lt as ContentOriginSchema, m as ContentCellPatternTypeSchema, mn as ContentTable, mt as ContentParagraph, n as ConstructMarkerImbalance, nn as ContentSheetRowSchema, nt as ContentImageOriginal, o as ContentBlockSchema, on as ContentStroke, ot as ContentListMembership, p as ContentCellPatternType, pn as ContentSubpathSchema, pt as ContentPageFurnitureSchema, q as ContentGradientFillSchema, qt as ContentSheetPrintRange, r as ContentBitmapFill, rn as ContentSheetSchema, rt as ContentImageOriginalSchema, s as ContentBorder, sn as ContentStrokeDash, st as ContentListMembershipSchema, t as CONTENT_ANNOTATION_FIELDS, tn as ContentSheetRow, tt as ContentImageBlockSchema, u as ContentCellBordersSchema, un as ContentStrokeStyle, ut as ContentPageBreak, v as ContentConstructEndSchema, vn as ContentTableRowSchema, vt as ContentPathPoint, w as ContentDocumentSchema, wn as DecimalString, wt as ContentSection, x as ContentDefinedName, xn as ContentTranscriptSchema, xt as ContentPathSegmentSchema, y as ContentConstructStart, yn as ContentTableSchema, yt as ContentPathPointSchema, z as ContentFloatOriginSchema, zn as isContentBlock, zt as ContentSheetConditionalFormatValue } from "./content-
|
|
9
|
+
import { $ as ContentHatchStyleSchema, $t as ContentSheetRepeatRange, A as ContentEmbeddedObjectKind, An as RunConstructExtent, At as ContentSheetCellComment, B as ContentFloatPosition, Bn as isContentConstructEnd, Bt as ContentSheetConditionalFormatValueSchema, C as ContentDocument, Cn as ContentVectorSchema, Ct as ContentRunSchema, D as ContentEmbeddedObject, Dn as IMAGE_FORMATS, Dt as ContentShapeSchema, E as ContentDrawPageSchema, En as FusedNode, Et as ContentShape, F as ContentFloatAlignSchema, Fn as clampHeadingLevel, Ft as ContentSheetConditionalFormat, G as ContentFormulaSchema, Gt as ContentSheetImage, H as ContentFont, Hn as isRunConstructExtent, Ht as ContentSheetDataValidationSchema, I as ContentFloatAxis, In as contentDocumentSharedFields, It as ContentSheetConditionalFormatSchema, J as ContentGradientStyle, Jt as ContentSheetPrintRangeSchema, K as ContentGradientFill, Kt as ContentSheetImageSchema, L as ContentFloatAxisSchema, Ln as findConstructMarkerImbalance, Lt as ContentSheetConditionalFormatStyle, M as ContentFillPattern, Mn as RunConstructFault, Mt as ContentSheetCellSchema, N as ContentFillPatternSchema, Nn as SheetRuleOperator, Nt as ContentSheetColumn, O as ContentEmbeddedObjectBlock, On as ImageFormat, Ot as ContentSheet, P as ContentFloatAlign, Pn as SheetRuleOperatorSchema, Pt as ContentSheetColumnSchema, Q as ContentHatchStyle, Qt as ContentSheetRangeSchema, R as ContentFloatOrigin, Rn as findRunConstructFault, Rt as ContentSheetConditionalFormatStyleSchema, S as ContentDefinedNameSchema, Sn as ContentVector, St as ContentRun, T as ContentDrawPage, Tn as DecimalStringSchema, Tt as ContentSectionSchema, U as ContentFontSchema, Un as resolveCellFillColor, Ut as ContentSheetDataValidationType, V as ContentFloatPositionSchema, Vn as isContentConstructStart, Vt as ContentSheetDataValidation, W as ContentFormula, Wn as unrecognizedFillKind, Wt as ContentSheetDataValidationTypeSchema, X as ContentHatchFill, Xt as ContentSheetPrintSettingsSchema, Y as ContentGradientStyleSchema, Yt as ContentSheetPrintSettings, Z as ContentHatchFillSchema, Zt as ContentSheetRange, _ as ContentConstructEnd, _n as ContentTableRow, _t as ContentParagraphSchema, a as ContentBlock, an as ContentSlideSchema, at as ContentInterpretationSchema, b as ContentConstructStartSchema, bn as ContentTranscript, bt as ContentPathSegment, c as ContentBorderSchema, cn as ContentStrokeDashSchema, ct as ContentOrigin, d as ContentCellFill, dn as ContentStrokeStyleSchema, dt as ContentPageBreakSchema, en as ContentSheetRepeatRangeSchema, et as ContentImageBlock, f as ContentCellFillSchema, fn as ContentSubpath, ft as ContentPageFurniture, g as ContentCellValueSchema, gn as ContentTableCellSchema, gt as ContentParagraphBordersSchema, h as ContentCellValue, hn as ContentTableCell, ht as ContentParagraphBorders, i as ContentBitmapFillSchema, in as ContentSlide, it as ContentInterpretation, j as ContentEmbeddedObjectSchema, jn as RunConstructExtentSchema, jt as ContentSheetCellCommentSchema, k as ContentEmbeddedObjectBlockSchema, kn as RUN_FONT_PROPERTY_SHAPE, kt as ContentSheetCell, l as ContentCellBorders, ln as ContentStrokeSchema, lt as ContentOriginSchema, m as ContentCellPatternTypeSchema, mn as ContentTable, mt as ContentParagraph, n as ConstructMarkerImbalance, nn as ContentSheetRowSchema, nt as ContentImageOriginal, o as ContentBlockSchema, on as ContentStroke, ot as ContentListMembership, p as ContentCellPatternType, pn as ContentSubpathSchema, pt as ContentPageFurnitureSchema, q as ContentGradientFillSchema, qt as ContentSheetPrintRange, r as ContentBitmapFill, rn as ContentSheetSchema, rt as ContentImageOriginalSchema, s as ContentBorder, sn as ContentStrokeDash, st as ContentListMembershipSchema, t as CONTENT_ANNOTATION_FIELDS, tn as ContentSheetRow, tt as ContentImageBlockSchema, u as ContentCellBordersSchema, un as ContentStrokeStyle, ut as ContentPageBreak, v as ContentConstructEndSchema, vn as ContentTableRowSchema, vt as ContentPathPoint, w as ContentDocumentSchema, wn as DecimalString, wt as ContentSection, x as ContentDefinedName, xn as ContentTranscriptSchema, xt as ContentPathSegmentSchema, y as ContentConstructStart, yn as ContentTableSchema, yt as ContentPathPointSchema, z as ContentFloatOriginSchema, zn as isContentBlock, zt as ContentSheetConditionalFormatValue } from "./content-GHj_31uQ.js";
|
|
10
10
|
import { ContentCodec } from "./codec.js";
|
|
11
|
-
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-
|
|
11
|
+
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-C9cYkjnd.js";
|
|
12
12
|
import { CONTENT_DEFS, CONTENT_DOCUMENT_URI, EMBEDDED_OBJECT_KINDS, MAX_SAFE_INTEGER } from "./content-json-schema-defs.js";
|
|
13
|
-
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-
|
|
13
|
+
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-CIZQ2_C1.js";
|
|
14
14
|
import { ConstructMarkerImbalanceError, TreeChildren, decompose } from "./decompose.js";
|
|
15
15
|
import { DefinitionEntry, DefinitionEntrySchema, DefinitionsTable, DefinitionsTableSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StylesTable, StylesTableSchema, applyParagraphStyleProperties, applyRunStyleProperties, overlayStyleEntries, resolveStyleChain } from "./definitions.js";
|
|
16
16
|
import { DocumentTree, DocumentTreeSchema, TreeEmbeddedFont, TreeEmbeddedFontSchema } from "./package.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as ContentEmbeddedObject, Gt as ContentSheetImage, Sn as ContentVector, W as ContentFormula, _ as ContentConstructEnd, a as ContentBlock, y as ContentConstructStart } from "./content-
|
|
2
|
-
import { a as ConstructDescriptor } from "./construct-
|
|
1
|
+
import { D as ContentEmbeddedObject, Gt as ContentSheetImage, Sn as ContentVector, W as ContentFormula, _ as ContentConstructEnd, a as ContentBlock, y as ContentConstructStart } from "./content-GHj_31uQ.js";
|
|
2
|
+
import { a as ConstructDescriptor } from "./construct-C9cYkjnd.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/package-node.d.ts
|
|
5
5
|
declare const SectionDescriptorSchema: z.ZodObject<{
|
|
@@ -85,7 +85,6 @@ declare const SectionDescriptorSchema: z.ZodObject<{
|
|
|
85
85
|
}, z.core.$strict>;
|
|
86
86
|
type SectionDescriptor = z.infer<typeof SectionDescriptorSchema>;
|
|
87
87
|
declare const SlideDescriptorSchema: z.ZodObject<{
|
|
88
|
-
notes: z.ZodString;
|
|
89
88
|
source: z.ZodOptional<z.ZodObject<{
|
|
90
89
|
format: z.ZodEnum<{
|
|
91
90
|
docx: "docx";
|
|
@@ -106,6 +105,7 @@ declare const SlideDescriptorSchema: z.ZodObject<{
|
|
|
106
105
|
}>;
|
|
107
106
|
xml: z.ZodString;
|
|
108
107
|
}, z.core.$strict>>;
|
|
108
|
+
notes: z.ZodString;
|
|
109
109
|
origin: z.ZodOptional<z.ZodEnum<{
|
|
110
110
|
chart: "chart";
|
|
111
111
|
diagram: "diagram";
|
|
@@ -161,6 +161,7 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
161
161
|
}>;
|
|
162
162
|
xml: z.ZodString;
|
|
163
163
|
}, z.core.$strict>>;
|
|
164
|
+
name: z.ZodString;
|
|
164
165
|
origin: z.ZodOptional<z.ZodEnum<{
|
|
165
166
|
chart: "chart";
|
|
166
167
|
diagram: "diagram";
|
|
@@ -188,7 +189,6 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
188
189
|
at: z.ZodString;
|
|
189
190
|
}, z.core.$strip>>;
|
|
190
191
|
}, z.core.$strip>>;
|
|
191
|
-
name: z.ZodString;
|
|
192
192
|
printSettings: z.ZodObject<{
|
|
193
193
|
pageSize: z.ZodObject<{
|
|
194
194
|
widthPt: z.ZodNumber;
|
|
@@ -1298,7 +1298,6 @@ declare const DrawPageDescriptorSchema: z.ZodObject<{
|
|
|
1298
1298
|
}, z.core.$strict>;
|
|
1299
1299
|
type DrawPageDescriptor = z.infer<typeof DrawPageDescriptorSchema>;
|
|
1300
1300
|
declare const ShapeDescriptorSchema: z.ZodObject<{
|
|
1301
|
-
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1302
1301
|
source: z.ZodOptional<z.ZodObject<{
|
|
1303
1302
|
format: z.ZodEnum<{
|
|
1304
1303
|
docx: "docx";
|
|
@@ -1319,6 +1318,8 @@ declare const ShapeDescriptorSchema: z.ZodObject<{
|
|
|
1319
1318
|
}>;
|
|
1320
1319
|
xml: z.ZodString;
|
|
1321
1320
|
}, z.core.$strict>>;
|
|
1321
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1322
|
+
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1322
1323
|
frames: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1323
1324
|
pageIndex: z.ZodNumber;
|
|
1324
1325
|
xPt: z.ZodNumber;
|
|
@@ -1353,7 +1354,6 @@ declare const ShapeDescriptorSchema: z.ZodObject<{
|
|
|
1353
1354
|
at: z.ZodString;
|
|
1354
1355
|
}, z.core.$strip>>;
|
|
1355
1356
|
}, z.core.$strip>>;
|
|
1356
|
-
name: z.ZodOptional<z.ZodString>;
|
|
1357
1357
|
frame: z.ZodObject<{
|
|
1358
1358
|
xPt: z.ZodNumber;
|
|
1359
1359
|
yPt: z.ZodNumber;
|
|
@@ -1482,12 +1482,12 @@ declare const HeadingParagraphSchema: z.ZodObject<{
|
|
|
1482
1482
|
descriptor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1483
1483
|
kind: z.ZodLiteral<"contentControl">;
|
|
1484
1484
|
controlType: z.ZodEnum<{
|
|
1485
|
-
date: "date";
|
|
1486
1485
|
richText: "richText";
|
|
1487
1486
|
plainText: "plainText";
|
|
1488
1487
|
checkbox: "checkbox";
|
|
1489
1488
|
dropDown: "dropDown";
|
|
1490
1489
|
comboBox: "comboBox";
|
|
1490
|
+
date: "date";
|
|
1491
1491
|
picture: "picture";
|
|
1492
1492
|
repeatingSection: "repeatingSection";
|
|
1493
1493
|
button: "button";
|
|
@@ -1907,12 +1907,12 @@ declare const ListParagraphSchema: z.ZodObject<{
|
|
|
1907
1907
|
descriptor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1908
1908
|
kind: z.ZodLiteral<"contentControl">;
|
|
1909
1909
|
controlType: z.ZodEnum<{
|
|
1910
|
-
date: "date";
|
|
1911
1910
|
richText: "richText";
|
|
1912
1911
|
plainText: "plainText";
|
|
1913
1912
|
checkbox: "checkbox";
|
|
1914
1913
|
dropDown: "dropDown";
|
|
1915
1914
|
comboBox: "comboBox";
|
|
1915
|
+
date: "date";
|
|
1916
1916
|
picture: "picture";
|
|
1917
1917
|
repeatingSection: "repeatingSection";
|
|
1918
1918
|
button: "button";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as ContentEmbeddedObject, Gt as ContentSheetImage, Sn as ContentVector, W as ContentFormula, _ as ContentConstructEnd, a as ContentBlock, y as ContentConstructStart } from "./content-
|
|
1
|
+
import { D as ContentEmbeddedObject, Gt as ContentSheetImage, Sn as ContentVector, W as ContentFormula, _ as ContentConstructEnd, a as ContentBlock, y as ContentConstructStart } from "./content-zNNPbwYY.cjs";
|
|
2
2
|
import { a as ConstructDescriptor } from "./construct-C9cYkjnd.cjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/package-node.d.ts
|
|
@@ -85,7 +85,6 @@ declare const SectionDescriptorSchema: z.ZodObject<{
|
|
|
85
85
|
}, z.core.$strict>;
|
|
86
86
|
type SectionDescriptor = z.infer<typeof SectionDescriptorSchema>;
|
|
87
87
|
declare const SlideDescriptorSchema: z.ZodObject<{
|
|
88
|
-
notes: z.ZodString;
|
|
89
88
|
source: z.ZodOptional<z.ZodObject<{
|
|
90
89
|
format: z.ZodEnum<{
|
|
91
90
|
docx: "docx";
|
|
@@ -106,6 +105,7 @@ declare const SlideDescriptorSchema: z.ZodObject<{
|
|
|
106
105
|
}>;
|
|
107
106
|
xml: z.ZodString;
|
|
108
107
|
}, z.core.$strict>>;
|
|
108
|
+
notes: z.ZodString;
|
|
109
109
|
origin: z.ZodOptional<z.ZodEnum<{
|
|
110
110
|
chart: "chart";
|
|
111
111
|
diagram: "diagram";
|
|
@@ -161,6 +161,7 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
161
161
|
}>;
|
|
162
162
|
xml: z.ZodString;
|
|
163
163
|
}, z.core.$strict>>;
|
|
164
|
+
name: z.ZodString;
|
|
164
165
|
origin: z.ZodOptional<z.ZodEnum<{
|
|
165
166
|
chart: "chart";
|
|
166
167
|
diagram: "diagram";
|
|
@@ -188,7 +189,6 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
188
189
|
at: z.ZodString;
|
|
189
190
|
}, z.core.$strip>>;
|
|
190
191
|
}, z.core.$strip>>;
|
|
191
|
-
name: z.ZodString;
|
|
192
192
|
printSettings: z.ZodObject<{
|
|
193
193
|
pageSize: z.ZodObject<{
|
|
194
194
|
widthPt: z.ZodNumber;
|
|
@@ -1298,7 +1298,6 @@ declare const DrawPageDescriptorSchema: z.ZodObject<{
|
|
|
1298
1298
|
}, z.core.$strict>;
|
|
1299
1299
|
type DrawPageDescriptor = z.infer<typeof DrawPageDescriptorSchema>;
|
|
1300
1300
|
declare const ShapeDescriptorSchema: z.ZodObject<{
|
|
1301
|
-
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1302
1301
|
source: z.ZodOptional<z.ZodObject<{
|
|
1303
1302
|
format: z.ZodEnum<{
|
|
1304
1303
|
docx: "docx";
|
|
@@ -1319,6 +1318,8 @@ declare const ShapeDescriptorSchema: z.ZodObject<{
|
|
|
1319
1318
|
}>;
|
|
1320
1319
|
xml: z.ZodString;
|
|
1321
1320
|
}, z.core.$strict>>;
|
|
1321
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1322
|
+
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1322
1323
|
frames: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1323
1324
|
pageIndex: z.ZodNumber;
|
|
1324
1325
|
xPt: z.ZodNumber;
|
|
@@ -1353,7 +1354,6 @@ declare const ShapeDescriptorSchema: z.ZodObject<{
|
|
|
1353
1354
|
at: z.ZodString;
|
|
1354
1355
|
}, z.core.$strip>>;
|
|
1355
1356
|
}, z.core.$strip>>;
|
|
1356
|
-
name: z.ZodOptional<z.ZodString>;
|
|
1357
1357
|
frame: z.ZodObject<{
|
|
1358
1358
|
xPt: z.ZodNumber;
|
|
1359
1359
|
yPt: z.ZodNumber;
|
|
@@ -1482,12 +1482,12 @@ declare const HeadingParagraphSchema: z.ZodObject<{
|
|
|
1482
1482
|
descriptor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1483
1483
|
kind: z.ZodLiteral<"contentControl">;
|
|
1484
1484
|
controlType: z.ZodEnum<{
|
|
1485
|
-
date: "date";
|
|
1486
1485
|
richText: "richText";
|
|
1487
1486
|
plainText: "plainText";
|
|
1488
1487
|
checkbox: "checkbox";
|
|
1489
1488
|
dropDown: "dropDown";
|
|
1490
1489
|
comboBox: "comboBox";
|
|
1490
|
+
date: "date";
|
|
1491
1491
|
picture: "picture";
|
|
1492
1492
|
repeatingSection: "repeatingSection";
|
|
1493
1493
|
button: "button";
|
|
@@ -1907,12 +1907,12 @@ declare const ListParagraphSchema: z.ZodObject<{
|
|
|
1907
1907
|
descriptor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1908
1908
|
kind: z.ZodLiteral<"contentControl">;
|
|
1909
1909
|
controlType: z.ZodEnum<{
|
|
1910
|
-
date: "date";
|
|
1911
1910
|
richText: "richText";
|
|
1912
1911
|
plainText: "plainText";
|
|
1913
1912
|
checkbox: "checkbox";
|
|
1914
1913
|
dropDown: "dropDown";
|
|
1915
1914
|
comboBox: "comboBox";
|
|
1915
|
+
date: "date";
|
|
1916
1916
|
picture: "picture";
|
|
1917
1917
|
repeatingSection: "repeatingSection";
|
|
1918
1918
|
button: "button";
|
package/dist/package-node.cjs
CHANGED
|
@@ -20,7 +20,6 @@ function isRecord(value) {
|
|
|
20
20
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
21
21
|
}
|
|
22
22
|
function isGroupWrapper(value, isChild) {
|
|
23
|
-
if (!isRecord(value.node)) return false;
|
|
24
23
|
if (value.style !== void 0 && typeof value.style !== "string") return false;
|
|
25
24
|
if (!Object.keys(value).every((key) => key === "node" || key === "style" || key === "children")) return false;
|
|
26
25
|
return Array.isArray(value.children) && value.children.every(isChild);
|
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-DaPwHzsg.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-CIZQ2_C1.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-node.js
CHANGED
|
@@ -19,7 +19,6 @@ function isRecord(value) {
|
|
|
19
19
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
20
20
|
}
|
|
21
21
|
function isGroupWrapper(value, isChild) {
|
|
22
|
-
if (!isRecord(value.node)) return false;
|
|
23
22
|
if (value.style !== void 0 && typeof value.style !== "string") return false;
|
|
24
23
|
if (!Object.keys(value).every((key) => key === "node" || key === "style" || key === "children")) return false;
|
|
25
24
|
return Array.isArray(value.children) && value.children.every(isChild);
|
package/dist/package.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as MathMlNode } from "./mathml-Czqc1mdZ.cjs";
|
|
2
2
|
import { p as MathExpression } from "./math-BScHxedi.cjs";
|
|
3
|
-
import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-
|
|
3
|
+
import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-DaPwHzsg.cjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/package.d.ts
|
|
6
6
|
declare const TreeEmbeddedFontSchema: z.ZodObject<{
|
package/dist/package.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as MathMlNode } from "./mathml-Czqc1mdZ.js";
|
|
2
2
|
import { p as MathExpression } from "./math-BScHxedi.js";
|
|
3
|
-
import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-
|
|
3
|
+
import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-CIZQ2_C1.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/package.d.ts
|
|
6
6
|
declare const TreeEmbeddedFontSchema: 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@7.11.
|
|
10
|
+
return `https://cdn.jsdelivr.net/npm/document-schema.js@7.11.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) {
|
|
@@ -102,7 +102,7 @@ function documentFromJson(value) {
|
|
|
102
102
|
if (parts.stem === "document-package") throw new DocumentPackageRenamedError(value.$schema);
|
|
103
103
|
const kind = kindForFileStem(parts.stem);
|
|
104
104
|
if (kind === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
|
|
105
|
-
if (majorVersionOf(parts.version) !== majorVersionOf("7.11.
|
|
105
|
+
if (majorVersionOf(parts.version) !== majorVersionOf("7.11.2")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.11.2");
|
|
106
106
|
switch (kind) {
|
|
107
107
|
case "DocumentTree": return {
|
|
108
108
|
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.11.
|
|
9
|
+
return `https://cdn.jsdelivr.net/npm/document-schema.js@7.11.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) {
|
|
@@ -101,7 +101,7 @@ function documentFromJson(value) {
|
|
|
101
101
|
if (parts.stem === "document-package") throw new DocumentPackageRenamedError(value.$schema);
|
|
102
102
|
const kind = kindForFileStem(parts.stem);
|
|
103
103
|
if (kind === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
|
|
104
|
-
if (majorVersionOf(parts.version) !== majorVersionOf("7.11.
|
|
104
|
+
if (majorVersionOf(parts.version) !== majorVersionOf("7.11.2")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.11.2");
|
|
105
105
|
switch (kind) {
|
|
106
106
|
case "DocumentTree": return {
|
|
107
107
|
kind,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "document-schema",
|
|
3
|
-
"version": "7.11.
|
|
3
|
+
"version": "7.11.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": {
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"test:coverage": "turbo run _test:coverage",
|
|
99
99
|
"_test:coverage": "vitest run --project unit --coverage",
|
|
100
100
|
"test:mutation": "turbo run _test:mutation",
|
|
101
|
-
"_test:mutation": "stryker run stryker.config.
|
|
101
|
+
"_test:mutation": "stryker run stryker.config.ts",
|
|
102
102
|
"test:smoke": "turbo run _test:smoke",
|
|
103
103
|
"_test:smoke": "vitest run --project smoke",
|
|
104
104
|
"release": "semantic-release"
|