document-content-model 4.3.2 → 7.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/README.md +274 -95
  2. package/dist/border-weight.cjs +26 -0
  3. package/dist/border-weight.d.cts +12 -0
  4. package/dist/border-weight.d.ts +12 -0
  5. package/dist/border-weight.js +23 -0
  6. package/dist/codec.d.cts +1 -1
  7. package/dist/codec.d.ts +1 -1
  8. package/dist/{construct-ETSlnMle.d.cts → construct-GVdTKrE7.d.cts} +242 -2
  9. package/dist/{construct-ETSlnMle.d.ts → construct-GVdTKrE7.d.ts} +242 -2
  10. package/dist/construct.cjs +13 -6
  11. package/dist/construct.d.cts +1 -1
  12. package/dist/construct.d.ts +1 -1
  13. package/dist/construct.js +13 -6
  14. package/dist/content-BCOxY0Eb.d.ts +10273 -0
  15. package/dist/content-BzkhrS6P.d.cts +10273 -0
  16. package/dist/content-json-schema-defs.cjs +1056 -189
  17. package/dist/content-json-schema-defs.js +1056 -189
  18. package/dist/content.cjs +514 -36
  19. package/dist/content.d.cts +2 -2
  20. package/dist/content.d.ts +2 -2
  21. package/dist/content.js +488 -37
  22. package/dist/decompose.cjs +7 -17
  23. package/dist/decompose.d.cts +5 -5
  24. package/dist/decompose.d.ts +5 -5
  25. package/dist/decompose.js +7 -17
  26. package/dist/definitions.cjs +5 -1
  27. package/dist/definitions.d.cts +37 -1
  28. package/dist/definitions.d.ts +37 -1
  29. package/dist/definitions.js +5 -1
  30. package/dist/factor-styles.cjs +14 -8
  31. package/dist/factor-styles.d.cts +6 -6
  32. package/dist/factor-styles.d.ts +6 -6
  33. package/dist/factor-styles.js +15 -9
  34. package/dist/flatten.cjs +5 -5
  35. package/dist/flatten.d.cts +4 -4
  36. package/dist/flatten.d.ts +4 -4
  37. package/dist/flatten.js +5 -5
  38. package/dist/font-port.d.cts +2 -2
  39. package/dist/font-port.d.ts +2 -2
  40. package/dist/index.cjs +54 -14
  41. package/dist/index.d.cts +14 -12
  42. package/dist/index.d.ts +14 -12
  43. package/dist/index.js +12 -10
  44. package/dist/{math-BlG8Tjk-.d.cts → math-BScHxedi.d.cts} +97 -14
  45. package/dist/{math-BlG8Tjk-.d.ts → math-BScHxedi.d.ts} +97 -14
  46. package/dist/math-layout.d.cts +6 -6
  47. package/dist/math-layout.d.ts +6 -6
  48. package/dist/math.cjs +32 -6
  49. package/dist/math.d.cts +2 -2
  50. package/dist/math.d.ts +2 -2
  51. package/dist/math.js +29 -7
  52. package/dist/{mathml-B1oTCtzc.d.cts → mathml-Czqc1mdZ.d.cts} +3 -3
  53. package/dist/{mathml-B1oTCtzc.d.ts → mathml-Czqc1mdZ.d.ts} +3 -3
  54. package/dist/mathml.cjs +9 -2
  55. package/dist/mathml.d.cts +1 -1
  56. package/dist/mathml.d.ts +1 -1
  57. package/dist/mathml.js +9 -2
  58. package/dist/metadata.cjs +12 -1
  59. package/dist/metadata.d.cts +13 -0
  60. package/dist/metadata.d.ts +13 -0
  61. package/dist/metadata.js +12 -1
  62. package/dist/package-node-C4mh1hLY.d.ts +1989 -0
  63. package/dist/package-node-RQMDBzwd.d.cts +1989 -0
  64. package/dist/package-node.cjs +21 -21
  65. package/dist/package-node.d.cts +2 -2
  66. package/dist/package-node.d.ts +2 -2
  67. package/dist/package-node.js +14 -14
  68. package/dist/package.cjs +5 -3
  69. package/dist/package.d.cts +253 -8
  70. package/dist/package.d.ts +253 -8
  71. package/dist/package.js +5 -3
  72. package/dist/schema-io.cjs +21 -11
  73. package/dist/schema-io.d.cts +13 -9
  74. package/dist/schema-io.d.ts +13 -9
  75. package/dist/schema-io.js +21 -12
  76. package/dist/source-Bas5ol6f.d.cts +43 -0
  77. package/dist/source-Bas5ol6f.d.ts +43 -0
  78. package/dist/source.cjs +27 -0
  79. package/dist/source.d.cts +2 -0
  80. package/dist/source.d.ts +2 -0
  81. package/dist/source.js +25 -0
  82. package/dist/style-D06NwxAJ.d.cts +29 -0
  83. package/dist/style-D06NwxAJ.d.ts +29 -0
  84. package/dist/style.cjs +2 -0
  85. package/dist/style.d.cts +2 -24
  86. package/dist/style.d.ts +2 -24
  87. package/dist/style.js +2 -1
  88. package/dist/text-layout.d.cts +1 -1
  89. package/dist/text-layout.d.ts +1 -1
  90. package/package.json +28 -29
  91. package/schemas/content-document.schema.json +6623 -1694
  92. package/schemas/{document-package.schema.json → document-tree.schema.json} +1826 -143
  93. package/dist/content-BLwxI5ba.d.cts +0 -2481
  94. package/dist/content-BdzcBsxm.d.ts +0 -2481
  95. package/dist/package-node-C-ewnL0v.d.cts +0 -459
  96. package/dist/package-node-D3scv-Cl.d.ts +0 -459
@@ -1,6 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_math = require("./math.cjs");
3
+ const require_mathml = require("./mathml.cjs");
3
4
  const require_schema_io = require("./schema-io.cjs");
5
+ let zod = require("zod");
4
6
  //#region src/content-json-schema-defs.ts
5
7
  const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;
6
8
  const EMBEDDED_OBJECT_KINDS = [
@@ -8,9 +10,40 @@ const EMBEDDED_OBJECT_KINDS = [
8
10
  "wordprocessing",
9
11
  "presentation",
10
12
  "spreadsheet",
11
- "drawing"
13
+ "drawing",
14
+ "chart"
12
15
  ];
13
16
  const CONTENT_DOCUMENT_URI = require_schema_io.schemaUriFor("ContentDocument");
17
+ let cachedMathMlJsonSchemas;
18
+ function getMathMlJsonSchemas() {
19
+ if (cachedMathMlJsonSchemas === void 0) {
20
+ const registry = zod.z.registry();
21
+ registry.add(require_mathml.MathMlAttributeSchema, { id: "MathMlAttribute" });
22
+ registry.add(require_mathml.MathMlElementSchema, { id: "MathMlElement" });
23
+ registry.add(require_mathml.MathMlNodeSchema, { id: "MathMlNode" });
24
+ const { schemas } = zod.z.toJSONSchema(registry, { uri: (id) => `#/$defs/${id}` });
25
+ cachedMathMlJsonSchemas = schemas;
26
+ }
27
+ return cachedMathMlJsonSchemas;
28
+ }
29
+ function mathMlDef(id) {
30
+ const generated = getMathMlJsonSchemas()[id];
31
+ if (generated === void 0) throw new Error(`z.toJSONSchema() produced no schema for registered id "${id}"`);
32
+ const stripped = { ...generated };
33
+ delete stripped.$schema;
34
+ delete stripped.$id;
35
+ return stripped;
36
+ }
37
+ function cacheMathMlDef(id) {
38
+ const value = mathMlDef(id);
39
+ Object.defineProperty(CONTENT_DEFS, id, {
40
+ value,
41
+ enumerable: true,
42
+ configurable: true,
43
+ writable: false
44
+ });
45
+ return value;
46
+ }
14
47
  function mathBinderDef(kind) {
15
48
  return {
16
49
  type: "object",
@@ -120,6 +153,34 @@ const CONTENT_DEFS = {
120
153
  "justify"
121
154
  ]
122
155
  },
156
+ SourceResidue: {
157
+ type: "object",
158
+ properties: {
159
+ format: {
160
+ type: "string",
161
+ enum: [
162
+ "docx",
163
+ "pptx",
164
+ "xlsx",
165
+ "odt",
166
+ "ods",
167
+ "odp",
168
+ "odg",
169
+ "odm",
170
+ "odb",
171
+ "odf",
172
+ "markdown",
173
+ "pdf",
174
+ "epub",
175
+ "rtf",
176
+ "wpd"
177
+ ]
178
+ },
179
+ xml: { type: "string" }
180
+ },
181
+ required: ["format", "xml"],
182
+ additionalProperties: false
183
+ },
123
184
  ContentStrokeStyle: {
124
185
  type: "string",
125
186
  enum: [
@@ -143,6 +204,18 @@ const CONTENT_DEFS = {
143
204
  additionalProperties: false
144
205
  },
145
206
  ContentCellBorders: {
207
+ type: "object",
208
+ properties: {
209
+ left: { $ref: "#/$defs/ContentBorder" },
210
+ right: { $ref: "#/$defs/ContentBorder" },
211
+ top: { $ref: "#/$defs/ContentBorder" },
212
+ bottom: { $ref: "#/$defs/ContentBorder" },
213
+ diagonalUp: { $ref: "#/$defs/ContentBorder" },
214
+ diagonalDown: { $ref: "#/$defs/ContentBorder" }
215
+ },
216
+ additionalProperties: false
217
+ },
218
+ ContentParagraphBorders: {
146
219
  type: "object",
147
220
  properties: {
148
221
  left: { $ref: "#/$defs/ContentBorder" },
@@ -152,6 +225,88 @@ const CONTENT_DEFS = {
152
225
  },
153
226
  additionalProperties: false
154
227
  },
228
+ ContentCellPatternType: {
229
+ type: "string",
230
+ enum: [
231
+ "percent5",
232
+ "percent10",
233
+ "percent12",
234
+ "percent15",
235
+ "percent20",
236
+ "percent25",
237
+ "percent30",
238
+ "percent35",
239
+ "percent37",
240
+ "percent40",
241
+ "percent45",
242
+ "percent50",
243
+ "percent55",
244
+ "percent60",
245
+ "percent62",
246
+ "percent65",
247
+ "percent70",
248
+ "percent75",
249
+ "percent80",
250
+ "percent85",
251
+ "percent87",
252
+ "percent90",
253
+ "percent95",
254
+ "horizontalStripe",
255
+ "verticalStripe",
256
+ "diagonalStripe",
257
+ "reverseDiagonalStripe",
258
+ "horizontalCross",
259
+ "diagonalCross",
260
+ "thinHorizontalStripe",
261
+ "thinVerticalStripe",
262
+ "thinDiagonalStripe",
263
+ "thinReverseDiagonalStripe",
264
+ "thinHorizontalCross",
265
+ "thinDiagonalCross",
266
+ "mediumGray",
267
+ "darkGray",
268
+ "lightGray",
269
+ "darkHorizontal",
270
+ "darkVertical",
271
+ "darkDown",
272
+ "darkUp",
273
+ "darkGrid",
274
+ "darkTrellis",
275
+ "lightHorizontal",
276
+ "lightVertical",
277
+ "lightDown",
278
+ "lightUp",
279
+ "lightGrid",
280
+ "lightTrellis",
281
+ "gray125",
282
+ "gray0625"
283
+ ]
284
+ },
285
+ ContentCellFill: { oneOf: [{
286
+ type: "object",
287
+ properties: {
288
+ kind: {
289
+ type: "string",
290
+ const: "solid"
291
+ },
292
+ color: { $ref: "#/$defs/Color" }
293
+ },
294
+ required: ["kind", "color"],
295
+ additionalProperties: false
296
+ }, {
297
+ type: "object",
298
+ properties: {
299
+ kind: {
300
+ type: "string",
301
+ const: "pattern"
302
+ },
303
+ patternType: { $ref: "#/$defs/ContentCellPatternType" },
304
+ foregroundColor: { $ref: "#/$defs/Color" },
305
+ backgroundColor: { $ref: "#/$defs/Color" }
306
+ },
307
+ required: ["kind", "patternType"],
308
+ additionalProperties: false
309
+ }] },
155
310
  ContentListMembership: {
156
311
  type: "object",
157
312
  properties: {
@@ -160,6 +315,19 @@ const CONTENT_DEFS = {
160
315
  type: "integer",
161
316
  minimum: 0,
162
317
  maximum: MAX_SAFE_INTEGER
318
+ },
319
+ checked: { type: "boolean" },
320
+ itemId: { type: "string" },
321
+ format: {
322
+ type: "string",
323
+ enum: [
324
+ "bullet",
325
+ "decimal",
326
+ "lowerLetter",
327
+ "upperLetter",
328
+ "lowerRoman",
329
+ "upperRoman"
330
+ ]
163
331
  }
164
332
  },
165
333
  required: ["level"],
@@ -180,7 +348,16 @@ const CONTENT_DEFS = {
180
348
  },
181
349
  color: { $ref: "#/$defs/Color" },
182
350
  hyperlink: { type: "string" },
351
+ verticalAlign: {
352
+ type: "string",
353
+ enum: ["superscript", "subscript"]
354
+ },
355
+ direction: {
356
+ type: "string",
357
+ enum: ["ltr", "rtl"]
358
+ },
183
359
  sourcePath: { type: "string" },
360
+ source: { $ref: "#/$defs/SourceResidue" },
184
361
  frames: {
185
362
  type: "array",
186
363
  items: { $ref: "#/$defs/LayoutFrame" }
@@ -189,6 +366,28 @@ const CONTENT_DEFS = {
189
366
  required: ["text"],
190
367
  additionalProperties: false
191
368
  },
369
+ RunConstructExtent: {
370
+ type: "object",
371
+ properties: {
372
+ descriptor: { $ref: "#/$defs/ConstructDescriptor" },
373
+ startRun: {
374
+ type: "integer",
375
+ minimum: 0,
376
+ maximum: MAX_SAFE_INTEGER
377
+ },
378
+ endRun: {
379
+ type: "integer",
380
+ minimum: 0,
381
+ maximum: MAX_SAFE_INTEGER
382
+ }
383
+ },
384
+ required: [
385
+ "descriptor",
386
+ "startRun",
387
+ "endRun"
388
+ ],
389
+ additionalProperties: false
390
+ },
192
391
  ContentParagraph: {
193
392
  type: "object",
194
393
  properties: {
@@ -200,7 +399,13 @@ const CONTENT_DEFS = {
200
399
  type: "array",
201
400
  items: { $ref: "#/$defs/ContentRun" }
202
401
  },
402
+ constructs: {
403
+ type: "array",
404
+ items: { $ref: "#/$defs/RunConstructExtent" }
405
+ },
203
406
  styleId: { type: "string" },
407
+ codeLanguage: { type: "string" },
408
+ preformatted: { type: "boolean" },
204
409
  headingLevel: {
205
410
  type: "integer",
206
411
  exclusiveMinimum: 0,
@@ -215,8 +420,17 @@ const CONTENT_DEFS = {
215
420
  exclusiveMinimum: 0
216
421
  },
217
422
  indentLeftPt: { type: "number" },
423
+ indentRightPt: { type: "number" },
218
424
  indentFirstLinePt: { type: "number" },
425
+ direction: {
426
+ type: "string",
427
+ enum: ["ltr", "rtl"]
428
+ },
429
+ pageBreakBefore: { type: "boolean" },
430
+ pageBreakAfter: { type: "boolean" },
431
+ borders: { $ref: "#/$defs/ContentParagraphBorders" },
219
432
  sourcePath: { type: "string" },
433
+ source: { $ref: "#/$defs/SourceResidue" },
220
434
  frames: {
221
435
  type: "array",
222
436
  items: { $ref: "#/$defs/LayoutFrame" }
@@ -225,6 +439,62 @@ const CONTENT_DEFS = {
225
439
  required: ["kind", "runs"],
226
440
  additionalProperties: false
227
441
  },
442
+ ContentFloatOrigin: {
443
+ type: "string",
444
+ enum: [
445
+ "page",
446
+ "margin",
447
+ "leftMargin",
448
+ "rightMargin",
449
+ "topMargin",
450
+ "bottomMargin",
451
+ "insideMargin",
452
+ "outsideMargin",
453
+ "column",
454
+ "character",
455
+ "paragraph",
456
+ "line",
457
+ "frame"
458
+ ]
459
+ },
460
+ ContentFloatAlign: {
461
+ type: "string",
462
+ enum: [
463
+ "left",
464
+ "right",
465
+ "top",
466
+ "bottom",
467
+ "center",
468
+ "inside",
469
+ "outside"
470
+ ]
471
+ },
472
+ ContentFloatAxis: { anyOf: [{
473
+ type: "object",
474
+ properties: {
475
+ relativeTo: { $ref: "#/$defs/ContentFloatOrigin" },
476
+ offsetPt: { type: "number" }
477
+ },
478
+ required: ["relativeTo", "offsetPt"],
479
+ additionalProperties: false
480
+ }, {
481
+ type: "object",
482
+ properties: {
483
+ relativeTo: { $ref: "#/$defs/ContentFloatOrigin" },
484
+ align: { $ref: "#/$defs/ContentFloatAlign" }
485
+ },
486
+ required: ["relativeTo", "align"],
487
+ additionalProperties: false
488
+ }] },
489
+ ContentFloatPosition: {
490
+ type: "object",
491
+ properties: {
492
+ horizontal: { $ref: "#/$defs/ContentFloatAxis" },
493
+ vertical: { $ref: "#/$defs/ContentFloatAxis" }
494
+ },
495
+ required: ["horizontal", "vertical"],
496
+ additionalProperties: false
497
+ },
228
498
  ContentImageBlock: {
229
499
  type: "object",
230
500
  properties: {
@@ -234,7 +504,12 @@ const CONTENT_DEFS = {
234
504
  },
235
505
  format: {
236
506
  type: "string",
237
- enum: ["png", "jpeg"]
507
+ enum: [
508
+ "png",
509
+ "jpeg",
510
+ "svg",
511
+ "gif"
512
+ ]
238
513
  },
239
514
  base64: { type: "string" },
240
515
  widthPt: {
@@ -246,7 +521,9 @@ const CONTENT_DEFS = {
246
521
  exclusiveMinimum: 0
247
522
  },
248
523
  altText: { type: "string" },
524
+ floatPosition: { $ref: "#/$defs/ContentFloatPosition" },
249
525
  sourcePath: { type: "string" },
526
+ source: { $ref: "#/$defs/SourceResidue" },
250
527
  frames: {
251
528
  type: "array",
252
529
  items: { $ref: "#/$defs/LayoutFrame" }
@@ -269,6 +546,7 @@ const CONTENT_DEFS = {
269
546
  const: "pageBreak"
270
547
  },
271
548
  sourcePath: { type: "string" },
549
+ source: { $ref: "#/$defs/SourceResidue" },
272
550
  frames: {
273
551
  type: "array",
274
552
  items: { $ref: "#/$defs/LayoutFrame" }
@@ -294,9 +572,19 @@ const CONTENT_DEFS = {
294
572
  exclusiveMinimum: 0,
295
573
  maximum: MAX_SAFE_INTEGER
296
574
  },
297
- background: { $ref: "#/$defs/Color" },
575
+ background: { $ref: "#/$defs/ContentCellFill" },
298
576
  borders: { $ref: "#/$defs/ContentCellBorders" },
577
+ verticalAlign: {
578
+ type: "string",
579
+ enum: [
580
+ "top",
581
+ "center",
582
+ "bottom"
583
+ ]
584
+ },
585
+ formula: { type: "string" },
299
586
  sourcePath: { type: "string" },
587
+ source: { $ref: "#/$defs/SourceResidue" },
300
588
  frames: {
301
589
  type: "array",
302
590
  items: { $ref: "#/$defs/LayoutFrame" }
@@ -315,6 +603,10 @@ const CONTENT_DEFS = {
315
603
  heightPt: {
316
604
  type: "number",
317
605
  exclusiveMinimum: 0
606
+ },
607
+ direction: {
608
+ type: "string",
609
+ enum: ["ltr", "rtl"]
318
610
  }
319
611
  },
320
612
  required: ["cells"],
@@ -335,10 +627,11 @@ const CONTENT_DEFS = {
335
627
  type: "array",
336
628
  items: {
337
629
  type: "number",
338
- exclusiveMinimum: 0
630
+ minimum: 0
339
631
  }
340
632
  },
341
633
  sourcePath: { type: "string" },
634
+ source: { $ref: "#/$defs/SourceResidue" },
342
635
  frames: {
343
636
  type: "array",
344
637
  items: { $ref: "#/$defs/LayoutFrame" }
@@ -365,6 +658,7 @@ const CONTENT_DEFS = {
365
658
  document: { $ref: CONTENT_DOCUMENT_URI },
366
659
  frame: { $ref: "#/$defs/Box" },
367
660
  sourcePath: { type: "string" },
661
+ source: { $ref: "#/$defs/SourceResidue" },
368
662
  frames: {
369
663
  type: "array",
370
664
  items: { $ref: "#/$defs/LayoutFrame" }
@@ -420,7 +714,7 @@ const CONTENT_DEFS = {
420
714
  { $ref: "#/$defs/ContentConstructStart" },
421
715
  { $ref: "#/$defs/ContentConstructEnd" }
422
716
  ] },
423
- PackageBlockLeaf: { oneOf: [
717
+ TreeBlockLeaf: { oneOf: [
424
718
  { $ref: "#/$defs/ContentParagraph" },
425
719
  { $ref: "#/$defs/ContentTable" },
426
720
  { $ref: "#/$defs/ContentImageBlock" },
@@ -475,6 +769,18 @@ const CONTENT_DEFS = {
475
769
  properties: {
476
770
  pageSize: { $ref: "#/$defs/PageSize" },
477
771
  margins: { $ref: "#/$defs/Margins" },
772
+ breakType: {
773
+ type: "string",
774
+ enum: [
775
+ "nextPage",
776
+ "continuous",
777
+ "evenPage",
778
+ "oddPage"
779
+ ]
780
+ },
781
+ headers: { $ref: "#/$defs/ContentPageFurniture" },
782
+ footers: { $ref: "#/$defs/ContentPageFurniture" },
783
+ source: { $ref: "#/$defs/SourceResidue" },
478
784
  kind: {
479
785
  type: "string",
480
786
  const: "section"
@@ -487,11 +793,30 @@ const CONTENT_DEFS = {
487
793
  ],
488
794
  additionalProperties: false
489
795
  },
796
+ ContentPageFurniture: {
797
+ type: "object",
798
+ properties: {
799
+ default: {
800
+ type: "array",
801
+ items: { $ref: "#/$defs/ContentBlock" }
802
+ },
803
+ even: {
804
+ type: "array",
805
+ items: { $ref: "#/$defs/ContentBlock" }
806
+ },
807
+ first: {
808
+ type: "array",
809
+ items: { $ref: "#/$defs/ContentBlock" }
810
+ }
811
+ },
812
+ additionalProperties: false
813
+ },
490
814
  SlideDescriptor: {
491
815
  type: "object",
492
816
  properties: {
493
817
  size: { $ref: "#/$defs/PageSize" },
494
818
  notes: { type: "string" },
819
+ source: { $ref: "#/$defs/SourceResidue" },
495
820
  kind: {
496
821
  type: "string",
497
822
  const: "slide"
@@ -521,6 +846,15 @@ const CONTENT_DEFS = {
521
846
  items: { $ref: "#/$defs/ContentSheetRow" }
522
847
  },
523
848
  printSettings: { $ref: "#/$defs/ContentSheetPrintSettings" },
849
+ dataValidations: {
850
+ type: "array",
851
+ items: { $ref: "#/$defs/ContentSheetDataValidation" }
852
+ },
853
+ conditionalFormats: {
854
+ type: "array",
855
+ items: { $ref: "#/$defs/ContentSheetConditionalFormat" }
856
+ },
857
+ source: { $ref: "#/$defs/SourceResidue" },
524
858
  kind: {
525
859
  type: "string",
526
860
  const: "sheet"
@@ -540,6 +874,7 @@ const CONTENT_DEFS = {
540
874
  type: "object",
541
875
  properties: {
542
876
  size: { $ref: "#/$defs/PageSize" },
877
+ source: { $ref: "#/$defs/SourceResidue" },
543
878
  kind: {
544
879
  type: "string",
545
880
  const: "drawPage"
@@ -580,6 +915,7 @@ const CONTENT_DEFS = {
580
915
  },
581
916
  paintOrder: { type: "number" },
582
917
  sourcePath: { type: "string" },
918
+ source: { $ref: "#/$defs/SourceResidue" },
583
919
  frames: {
584
920
  type: "array",
585
921
  items: { $ref: "#/$defs/LayoutFrame" }
@@ -605,7 +941,13 @@ const CONTENT_DEFS = {
605
941
  type: "array",
606
942
  items: { $ref: "#/$defs/ContentRun" }
607
943
  },
944
+ constructs: {
945
+ type: "array",
946
+ items: { $ref: "#/$defs/RunConstructExtent" }
947
+ },
608
948
  styleId: { type: "string" },
949
+ codeLanguage: { type: "string" },
950
+ preformatted: { type: "boolean" },
609
951
  headingLevel: {
610
952
  type: "integer",
611
953
  exclusiveMinimum: 0,
@@ -620,8 +962,17 @@ const CONTENT_DEFS = {
620
962
  exclusiveMinimum: 0
621
963
  },
622
964
  indentLeftPt: { type: "number" },
965
+ indentRightPt: { type: "number" },
623
966
  indentFirstLinePt: { type: "number" },
967
+ direction: {
968
+ type: "string",
969
+ enum: ["ltr", "rtl"]
970
+ },
971
+ pageBreakBefore: { type: "boolean" },
972
+ pageBreakAfter: { type: "boolean" },
973
+ borders: { $ref: "#/$defs/ContentParagraphBorders" },
624
974
  sourcePath: { type: "string" },
975
+ source: { $ref: "#/$defs/SourceResidue" },
625
976
  frames: {
626
977
  type: "array",
627
978
  items: { $ref: "#/$defs/LayoutFrame" }
@@ -645,7 +996,13 @@ const CONTENT_DEFS = {
645
996
  type: "array",
646
997
  items: { $ref: "#/$defs/ContentRun" }
647
998
  },
999
+ constructs: {
1000
+ type: "array",
1001
+ items: { $ref: "#/$defs/RunConstructExtent" }
1002
+ },
648
1003
  styleId: { type: "string" },
1004
+ codeLanguage: { type: "string" },
1005
+ preformatted: { type: "boolean" },
649
1006
  headingLevel: {
650
1007
  type: "integer",
651
1008
  exclusiveMinimum: 0,
@@ -660,8 +1017,17 @@ const CONTENT_DEFS = {
660
1017
  exclusiveMinimum: 0
661
1018
  },
662
1019
  indentLeftPt: { type: "number" },
1020
+ indentRightPt: { type: "number" },
663
1021
  indentFirstLinePt: { type: "number" },
1022
+ direction: {
1023
+ type: "string",
1024
+ enum: ["ltr", "rtl"]
1025
+ },
1026
+ pageBreakBefore: { type: "boolean" },
1027
+ pageBreakAfter: { type: "boolean" },
1028
+ borders: { $ref: "#/$defs/ContentParagraphBorders" },
664
1029
  sourcePath: { type: "string" },
1030
+ source: { $ref: "#/$defs/SourceResidue" },
665
1031
  frames: {
666
1032
  type: "array",
667
1033
  items: { $ref: "#/$defs/LayoutFrame" }
@@ -690,6 +1056,7 @@ const CONTENT_DEFS = {
690
1056
  value: { $ref: "#/$defs/ContentCellValue" },
691
1057
  formula: { type: "string" },
692
1058
  displayText: { type: "string" },
1059
+ numberFormatCode: { type: "string" },
693
1060
  runs: {
694
1061
  type: "array",
695
1062
  items: { $ref: "#/$defs/ContentRun" }
@@ -704,7 +1071,7 @@ const CONTENT_DEFS = {
704
1071
  exclusiveMinimum: 0,
705
1072
  maximum: MAX_SAFE_INTEGER
706
1073
  },
707
- background: { $ref: "#/$defs/Color" },
1074
+ background: { $ref: "#/$defs/ContentCellFill" },
708
1075
  borders: { $ref: "#/$defs/ContentCellBorders" },
709
1076
  alignment: { $ref: "#/$defs/Alignment" },
710
1077
  verticalAlignment: {
@@ -717,6 +1084,7 @@ const CONTENT_DEFS = {
717
1084
  },
718
1085
  comment: { $ref: "#/$defs/ContentSheetCellComment" },
719
1086
  sourcePath: { type: "string" },
1087
+ source: { $ref: "#/$defs/SourceResidue" },
720
1088
  frames: {
721
1089
  type: "array",
722
1090
  items: { $ref: "#/$defs/LayoutFrame" }
@@ -1035,106 +1403,669 @@ const CONTENT_DEFS = {
1035
1403
  required: ["start", "end"],
1036
1404
  additionalProperties: false
1037
1405
  },
1038
- ContentSheetImage: {
1406
+ ContentSheetRange: {
1039
1407
  type: "object",
1040
1408
  properties: {
1041
- kind: {
1042
- type: "string",
1043
- const: "image"
1044
- },
1045
- format: {
1046
- type: "string",
1047
- enum: ["png", "jpeg"]
1048
- },
1049
- base64: { type: "string" },
1050
- widthPt: {
1051
- type: "number",
1052
- exclusiveMinimum: 0
1053
- },
1054
- heightPt: {
1055
- type: "number",
1056
- exclusiveMinimum: 0
1057
- },
1058
- altText: { type: "string" },
1059
- sourcePath: { type: "string" },
1060
- frames: {
1061
- type: "array",
1062
- items: { $ref: "#/$defs/LayoutFrame" }
1409
+ startRow: {
1410
+ type: "integer",
1411
+ minimum: 0,
1412
+ maximum: MAX_SAFE_INTEGER
1063
1413
  },
1064
- anchorRow: {
1414
+ startColumn: {
1065
1415
  type: "integer",
1066
1416
  minimum: 0,
1067
1417
  maximum: MAX_SAFE_INTEGER
1068
1418
  },
1069
- anchorColumn: {
1419
+ endRow: {
1070
1420
  type: "integer",
1071
1421
  minimum: 0,
1072
1422
  maximum: MAX_SAFE_INTEGER
1073
1423
  },
1074
- offsetXPt: { type: "number" },
1075
- offsetYPt: { type: "number" }
1424
+ endColumn: {
1425
+ type: "integer",
1426
+ minimum: 0,
1427
+ maximum: MAX_SAFE_INTEGER
1428
+ }
1076
1429
  },
1077
1430
  required: [
1078
- "kind",
1079
- "format",
1080
- "base64",
1081
- "widthPt",
1082
- "heightPt",
1083
- "anchorRow",
1084
- "anchorColumn",
1085
- "offsetXPt",
1086
- "offsetYPt"
1431
+ "startRow",
1432
+ "startColumn",
1433
+ "endRow",
1434
+ "endColumn"
1087
1435
  ],
1088
1436
  additionalProperties: false
1089
1437
  },
1090
- ContentStroke: {
1438
+ SheetRuleOperator: {
1439
+ type: "string",
1440
+ enum: [
1441
+ "between",
1442
+ "notBetween",
1443
+ "equal",
1444
+ "notEqual",
1445
+ "greaterThan",
1446
+ "greaterThanOrEqual",
1447
+ "lessThan",
1448
+ "lessThanOrEqual"
1449
+ ]
1450
+ },
1451
+ ContentSheetDataValidation: {
1091
1452
  type: "object",
1092
1453
  properties: {
1093
- color: { $ref: "#/$defs/Color" },
1094
- widthPt: {
1095
- type: "number",
1096
- exclusiveMinimum: 0
1454
+ ranges: {
1455
+ type: "array",
1456
+ items: { $ref: "#/$defs/ContentSheetRange" }
1097
1457
  },
1098
- style: { $ref: "#/$defs/ContentStrokeStyle" }
1458
+ type: {
1459
+ type: "string",
1460
+ enum: [
1461
+ "whole",
1462
+ "decimal",
1463
+ "list",
1464
+ "date",
1465
+ "time",
1466
+ "textLength",
1467
+ "custom"
1468
+ ]
1469
+ },
1470
+ operator: { $ref: "#/$defs/SheetRuleOperator" },
1471
+ formula1: { type: "string" },
1472
+ formula2: { type: "string" },
1473
+ allowBlank: { type: "boolean" },
1474
+ showInputMessage: { type: "boolean" },
1475
+ promptTitle: { type: "string" },
1476
+ prompt: { type: "string" },
1477
+ showErrorMessage: { type: "boolean" },
1478
+ errorStyle: {
1479
+ type: "string",
1480
+ enum: [
1481
+ "stop",
1482
+ "warning",
1483
+ "information"
1484
+ ]
1485
+ },
1486
+ errorTitle: { type: "string" },
1487
+ error: { type: "string" },
1488
+ source: { $ref: "#/$defs/SourceResidue" }
1099
1489
  },
1100
- required: ["color", "widthPt"],
1490
+ required: ["ranges", "type"],
1101
1491
  additionalProperties: false
1102
1492
  },
1103
- ContentPathPoint: {
1493
+ ContentSheetConditionalFormatStyle: {
1104
1494
  type: "object",
1105
1495
  properties: {
1106
- xPt: { type: "number" },
1107
- yPt: { type: "number" }
1496
+ textColor: { $ref: "#/$defs/Color" },
1497
+ background: { $ref: "#/$defs/Color" },
1498
+ source: { $ref: "#/$defs/SourceResidue" }
1108
1499
  },
1109
- required: ["xPt", "yPt"],
1110
1500
  additionalProperties: false
1111
1501
  },
1112
- ContentPathSegment: { oneOf: [{
1502
+ ContentSheetConditionalFormatValue: {
1113
1503
  type: "object",
1114
1504
  properties: {
1115
- kind: {
1505
+ type: {
1116
1506
  type: "string",
1117
- const: "line"
1507
+ enum: [
1508
+ "num",
1509
+ "percent",
1510
+ "max",
1511
+ "min",
1512
+ "formula",
1513
+ "percentile"
1514
+ ]
1118
1515
  },
1119
- to: { $ref: "#/$defs/ContentPathPoint" }
1516
+ value: { type: "string" }
1120
1517
  },
1121
- required: ["kind", "to"],
1518
+ required: ["type"],
1122
1519
  additionalProperties: false
1123
- }, {
1124
- type: "object",
1125
- properties: {
1126
- kind: {
1127
- type: "string",
1128
- const: "cubic"
1520
+ },
1521
+ ContentSheetConditionalFormat: { oneOf: [
1522
+ {
1523
+ type: "object",
1524
+ properties: {
1525
+ type: {
1526
+ type: "string",
1527
+ const: "cellIs"
1528
+ },
1529
+ ranges: {
1530
+ type: "array",
1531
+ items: { $ref: "#/$defs/ContentSheetRange" }
1532
+ },
1533
+ priority: {
1534
+ type: "integer",
1535
+ minimum: -MAX_SAFE_INTEGER,
1536
+ maximum: MAX_SAFE_INTEGER
1537
+ },
1538
+ stopIfTrue: { type: "boolean" },
1539
+ source: { $ref: "#/$defs/SourceResidue" },
1540
+ operator: { $ref: "#/$defs/SheetRuleOperator" },
1541
+ formula1: { type: "string" },
1542
+ formula2: { type: "string" },
1543
+ style: { $ref: "#/$defs/ContentSheetConditionalFormatStyle" }
1129
1544
  },
1130
- control1: { $ref: "#/$defs/ContentPathPoint" },
1131
- control2: { $ref: "#/$defs/ContentPathPoint" },
1132
- to: { $ref: "#/$defs/ContentPathPoint" }
1545
+ required: [
1546
+ "type",
1547
+ "ranges",
1548
+ "operator",
1549
+ "formula1"
1550
+ ],
1551
+ additionalProperties: false
1133
1552
  },
1134
- required: [
1135
- "kind",
1136
- "control1",
1137
- "control2",
1553
+ {
1554
+ type: "object",
1555
+ properties: {
1556
+ type: {
1557
+ type: "string",
1558
+ enum: [
1559
+ "containsText",
1560
+ "notContainsText",
1561
+ "beginsWith",
1562
+ "endsWith"
1563
+ ]
1564
+ },
1565
+ ranges: {
1566
+ type: "array",
1567
+ items: { $ref: "#/$defs/ContentSheetRange" }
1568
+ },
1569
+ priority: {
1570
+ type: "integer",
1571
+ minimum: -MAX_SAFE_INTEGER,
1572
+ maximum: MAX_SAFE_INTEGER
1573
+ },
1574
+ stopIfTrue: { type: "boolean" },
1575
+ source: { $ref: "#/$defs/SourceResidue" },
1576
+ text: { type: "string" },
1577
+ style: { $ref: "#/$defs/ContentSheetConditionalFormatStyle" }
1578
+ },
1579
+ required: [
1580
+ "type",
1581
+ "ranges",
1582
+ "text"
1583
+ ],
1584
+ additionalProperties: false
1585
+ },
1586
+ {
1587
+ type: "object",
1588
+ properties: {
1589
+ type: {
1590
+ type: "string",
1591
+ enum: [
1592
+ "containsBlanks",
1593
+ "notContainsBlanks",
1594
+ "containsErrors",
1595
+ "notContainsErrors",
1596
+ "uniqueValues",
1597
+ "duplicateValues"
1598
+ ]
1599
+ },
1600
+ ranges: {
1601
+ type: "array",
1602
+ items: { $ref: "#/$defs/ContentSheetRange" }
1603
+ },
1604
+ priority: {
1605
+ type: "integer",
1606
+ minimum: -MAX_SAFE_INTEGER,
1607
+ maximum: MAX_SAFE_INTEGER
1608
+ },
1609
+ stopIfTrue: { type: "boolean" },
1610
+ source: { $ref: "#/$defs/SourceResidue" },
1611
+ style: { $ref: "#/$defs/ContentSheetConditionalFormatStyle" }
1612
+ },
1613
+ required: ["type", "ranges"],
1614
+ additionalProperties: false
1615
+ },
1616
+ {
1617
+ type: "object",
1618
+ properties: {
1619
+ type: {
1620
+ type: "string",
1621
+ const: "top10"
1622
+ },
1623
+ ranges: {
1624
+ type: "array",
1625
+ items: { $ref: "#/$defs/ContentSheetRange" }
1626
+ },
1627
+ priority: {
1628
+ type: "integer",
1629
+ minimum: -MAX_SAFE_INTEGER,
1630
+ maximum: MAX_SAFE_INTEGER
1631
+ },
1632
+ stopIfTrue: { type: "boolean" },
1633
+ source: { $ref: "#/$defs/SourceResidue" },
1634
+ rank: {
1635
+ type: "number",
1636
+ exclusiveMinimum: 0
1637
+ },
1638
+ percent: { type: "boolean" },
1639
+ bottom: { type: "boolean" },
1640
+ style: { $ref: "#/$defs/ContentSheetConditionalFormatStyle" }
1641
+ },
1642
+ required: [
1643
+ "type",
1644
+ "ranges",
1645
+ "rank"
1646
+ ],
1647
+ additionalProperties: false
1648
+ },
1649
+ {
1650
+ type: "object",
1651
+ properties: {
1652
+ type: {
1653
+ type: "string",
1654
+ const: "aboveAverage"
1655
+ },
1656
+ ranges: {
1657
+ type: "array",
1658
+ items: { $ref: "#/$defs/ContentSheetRange" }
1659
+ },
1660
+ priority: {
1661
+ type: "integer",
1662
+ minimum: -MAX_SAFE_INTEGER,
1663
+ maximum: MAX_SAFE_INTEGER
1664
+ },
1665
+ stopIfTrue: { type: "boolean" },
1666
+ source: { $ref: "#/$defs/SourceResidue" },
1667
+ aboveAverage: { type: "boolean" },
1668
+ equalAverage: { type: "boolean" },
1669
+ stdDev: {
1670
+ type: "integer",
1671
+ exclusiveMinimum: 0,
1672
+ maximum: MAX_SAFE_INTEGER
1673
+ },
1674
+ style: { $ref: "#/$defs/ContentSheetConditionalFormatStyle" }
1675
+ },
1676
+ required: ["type", "ranges"],
1677
+ additionalProperties: false
1678
+ },
1679
+ {
1680
+ type: "object",
1681
+ properties: {
1682
+ type: {
1683
+ type: "string",
1684
+ const: "timePeriod"
1685
+ },
1686
+ ranges: {
1687
+ type: "array",
1688
+ items: { $ref: "#/$defs/ContentSheetRange" }
1689
+ },
1690
+ priority: {
1691
+ type: "integer",
1692
+ minimum: -MAX_SAFE_INTEGER,
1693
+ maximum: MAX_SAFE_INTEGER
1694
+ },
1695
+ stopIfTrue: { type: "boolean" },
1696
+ source: { $ref: "#/$defs/SourceResidue" },
1697
+ timePeriod: {
1698
+ type: "string",
1699
+ enum: [
1700
+ "yesterday",
1701
+ "today",
1702
+ "tomorrow",
1703
+ "last7Days",
1704
+ "thisMonth",
1705
+ "lastMonth",
1706
+ "nextMonth",
1707
+ "thisWeek",
1708
+ "lastWeek",
1709
+ "nextWeek",
1710
+ "thisYear",
1711
+ "lastYear",
1712
+ "nextYear"
1713
+ ]
1714
+ },
1715
+ style: { $ref: "#/$defs/ContentSheetConditionalFormatStyle" }
1716
+ },
1717
+ required: [
1718
+ "type",
1719
+ "ranges",
1720
+ "timePeriod"
1721
+ ],
1722
+ additionalProperties: false
1723
+ },
1724
+ {
1725
+ type: "object",
1726
+ properties: {
1727
+ type: {
1728
+ type: "string",
1729
+ const: "colorScale"
1730
+ },
1731
+ ranges: {
1732
+ type: "array",
1733
+ items: { $ref: "#/$defs/ContentSheetRange" }
1734
+ },
1735
+ priority: {
1736
+ type: "integer",
1737
+ minimum: -MAX_SAFE_INTEGER,
1738
+ maximum: MAX_SAFE_INTEGER
1739
+ },
1740
+ stopIfTrue: { type: "boolean" },
1741
+ source: { $ref: "#/$defs/SourceResidue" },
1742
+ stops: {
1743
+ minItems: 2,
1744
+ maxItems: 3,
1745
+ type: "array",
1746
+ items: {
1747
+ type: "object",
1748
+ properties: {
1749
+ value: { $ref: "#/$defs/ContentSheetConditionalFormatValue" },
1750
+ color: { $ref: "#/$defs/Color" }
1751
+ },
1752
+ required: ["value", "color"],
1753
+ additionalProperties: false
1754
+ }
1755
+ }
1756
+ },
1757
+ required: [
1758
+ "type",
1759
+ "ranges",
1760
+ "stops"
1761
+ ],
1762
+ additionalProperties: false
1763
+ },
1764
+ {
1765
+ type: "object",
1766
+ properties: {
1767
+ type: {
1768
+ type: "string",
1769
+ const: "dataBar"
1770
+ },
1771
+ ranges: {
1772
+ type: "array",
1773
+ items: { $ref: "#/$defs/ContentSheetRange" }
1774
+ },
1775
+ priority: {
1776
+ type: "integer",
1777
+ minimum: -MAX_SAFE_INTEGER,
1778
+ maximum: MAX_SAFE_INTEGER
1779
+ },
1780
+ stopIfTrue: { type: "boolean" },
1781
+ source: { $ref: "#/$defs/SourceResidue" },
1782
+ min: { $ref: "#/$defs/ContentSheetConditionalFormatValue" },
1783
+ max: { $ref: "#/$defs/ContentSheetConditionalFormatValue" },
1784
+ color: { $ref: "#/$defs/Color" },
1785
+ showValue: { type: "boolean" }
1786
+ },
1787
+ required: [
1788
+ "type",
1789
+ "ranges",
1790
+ "min",
1791
+ "max",
1792
+ "color"
1793
+ ],
1794
+ additionalProperties: false
1795
+ },
1796
+ {
1797
+ type: "object",
1798
+ properties: {
1799
+ type: {
1800
+ type: "string",
1801
+ const: "iconSet"
1802
+ },
1803
+ ranges: {
1804
+ type: "array",
1805
+ items: { $ref: "#/$defs/ContentSheetRange" }
1806
+ },
1807
+ priority: {
1808
+ type: "integer",
1809
+ minimum: -MAX_SAFE_INTEGER,
1810
+ maximum: MAX_SAFE_INTEGER
1811
+ },
1812
+ stopIfTrue: { type: "boolean" },
1813
+ source: { $ref: "#/$defs/SourceResidue" },
1814
+ iconSetType: { type: "string" },
1815
+ thresholds: {
1816
+ type: "array",
1817
+ items: { $ref: "#/$defs/ContentSheetConditionalFormatValue" }
1818
+ },
1819
+ reverse: { type: "boolean" },
1820
+ showValue: { type: "boolean" }
1821
+ },
1822
+ required: [
1823
+ "type",
1824
+ "ranges",
1825
+ "iconSetType",
1826
+ "thresholds"
1827
+ ],
1828
+ additionalProperties: false
1829
+ }
1830
+ ] },
1831
+ ContentSheetImage: {
1832
+ type: "object",
1833
+ properties: {
1834
+ kind: {
1835
+ type: "string",
1836
+ const: "image"
1837
+ },
1838
+ format: {
1839
+ type: "string",
1840
+ enum: [
1841
+ "png",
1842
+ "jpeg",
1843
+ "svg",
1844
+ "gif"
1845
+ ]
1846
+ },
1847
+ base64: { type: "string" },
1848
+ widthPt: {
1849
+ type: "number",
1850
+ exclusiveMinimum: 0
1851
+ },
1852
+ heightPt: {
1853
+ type: "number",
1854
+ exclusiveMinimum: 0
1855
+ },
1856
+ altText: { type: "string" },
1857
+ floatPosition: { $ref: "#/$defs/ContentFloatPosition" },
1858
+ sourcePath: { type: "string" },
1859
+ source: { $ref: "#/$defs/SourceResidue" },
1860
+ frames: {
1861
+ type: "array",
1862
+ items: { $ref: "#/$defs/LayoutFrame" }
1863
+ },
1864
+ anchorRow: {
1865
+ type: "integer",
1866
+ minimum: 0,
1867
+ maximum: MAX_SAFE_INTEGER
1868
+ },
1869
+ anchorColumn: {
1870
+ type: "integer",
1871
+ minimum: 0,
1872
+ maximum: MAX_SAFE_INTEGER
1873
+ },
1874
+ offsetXPt: { type: "number" },
1875
+ offsetYPt: { type: "number" }
1876
+ },
1877
+ required: [
1878
+ "kind",
1879
+ "format",
1880
+ "base64",
1881
+ "widthPt",
1882
+ "heightPt",
1883
+ "anchorRow",
1884
+ "anchorColumn",
1885
+ "offsetXPt",
1886
+ "offsetYPt"
1887
+ ],
1888
+ additionalProperties: false
1889
+ },
1890
+ ContentStrokeDash: {
1891
+ type: "object",
1892
+ properties: {
1893
+ dots1: {
1894
+ type: "integer",
1895
+ exclusiveMinimum: 0,
1896
+ maximum: MAX_SAFE_INTEGER
1897
+ },
1898
+ dots1LengthPt: {
1899
+ type: "number",
1900
+ exclusiveMinimum: 0
1901
+ },
1902
+ dots2: {
1903
+ type: "integer",
1904
+ exclusiveMinimum: 0,
1905
+ maximum: MAX_SAFE_INTEGER
1906
+ },
1907
+ dots2LengthPt: {
1908
+ type: "number",
1909
+ exclusiveMinimum: 0
1910
+ },
1911
+ distancePt: {
1912
+ type: "number",
1913
+ minimum: 0
1914
+ }
1915
+ },
1916
+ required: [
1917
+ "dots1",
1918
+ "dots1LengthPt",
1919
+ "distancePt"
1920
+ ],
1921
+ additionalProperties: false
1922
+ },
1923
+ ContentStroke: {
1924
+ type: "object",
1925
+ properties: {
1926
+ color: { $ref: "#/$defs/Color" },
1927
+ widthPt: {
1928
+ type: "number",
1929
+ exclusiveMinimum: 0
1930
+ },
1931
+ style: { $ref: "#/$defs/ContentStrokeStyle" },
1932
+ opacity: {
1933
+ type: "number",
1934
+ minimum: 0,
1935
+ maximum: 1
1936
+ },
1937
+ dashPattern: { $ref: "#/$defs/ContentStrokeDash" }
1938
+ },
1939
+ required: ["color", "widthPt"],
1940
+ additionalProperties: false
1941
+ },
1942
+ ContentGradientStyle: {
1943
+ type: "string",
1944
+ enum: [
1945
+ "linear",
1946
+ "axial",
1947
+ "radial",
1948
+ "ellipsoid",
1949
+ "square",
1950
+ "rectangular"
1951
+ ]
1952
+ },
1953
+ ContentGradientFill: {
1954
+ type: "object",
1955
+ properties: {
1956
+ kind: {
1957
+ type: "string",
1958
+ const: "gradient"
1959
+ },
1960
+ style: { $ref: "#/$defs/ContentGradientStyle" },
1961
+ startColor: { $ref: "#/$defs/Color" },
1962
+ endColor: { $ref: "#/$defs/Color" },
1963
+ angleDeg: { type: "number" }
1964
+ },
1965
+ required: [
1966
+ "kind",
1967
+ "style",
1968
+ "startColor",
1969
+ "endColor"
1970
+ ],
1971
+ additionalProperties: false
1972
+ },
1973
+ ContentHatchStyle: {
1974
+ type: "string",
1975
+ enum: [
1976
+ "single",
1977
+ "double",
1978
+ "triple"
1979
+ ]
1980
+ },
1981
+ ContentHatchFill: {
1982
+ type: "object",
1983
+ properties: {
1984
+ kind: {
1985
+ type: "string",
1986
+ const: "hatch"
1987
+ },
1988
+ style: { $ref: "#/$defs/ContentHatchStyle" },
1989
+ color: { $ref: "#/$defs/Color" },
1990
+ distancePt: {
1991
+ type: "number",
1992
+ minimum: 0
1993
+ },
1994
+ rotationDeg: { type: "number" }
1995
+ },
1996
+ required: [
1997
+ "kind",
1998
+ "style",
1999
+ "color",
2000
+ "distancePt"
2001
+ ],
2002
+ additionalProperties: false
2003
+ },
2004
+ ContentBitmapFill: {
2005
+ type: "object",
2006
+ properties: {
2007
+ kind: {
2008
+ type: "string",
2009
+ const: "bitmap"
2010
+ },
2011
+ format: {
2012
+ type: "string",
2013
+ enum: [
2014
+ "png",
2015
+ "jpeg",
2016
+ "svg",
2017
+ "gif"
2018
+ ]
2019
+ },
2020
+ base64: { type: "string" }
2021
+ },
2022
+ required: [
2023
+ "kind",
2024
+ "format",
2025
+ "base64"
2026
+ ],
2027
+ additionalProperties: false
2028
+ },
2029
+ ContentFillPattern: { oneOf: [
2030
+ { $ref: "#/$defs/ContentGradientFill" },
2031
+ { $ref: "#/$defs/ContentHatchFill" },
2032
+ { $ref: "#/$defs/ContentBitmapFill" }
2033
+ ] },
2034
+ ContentPathPoint: {
2035
+ type: "object",
2036
+ properties: {
2037
+ xPt: { type: "number" },
2038
+ yPt: { type: "number" }
2039
+ },
2040
+ required: ["xPt", "yPt"],
2041
+ additionalProperties: false
2042
+ },
2043
+ ContentPathSegment: { oneOf: [{
2044
+ type: "object",
2045
+ properties: {
2046
+ kind: {
2047
+ type: "string",
2048
+ const: "line"
2049
+ },
2050
+ to: { $ref: "#/$defs/ContentPathPoint" }
2051
+ },
2052
+ required: ["kind", "to"],
2053
+ additionalProperties: false
2054
+ }, {
2055
+ type: "object",
2056
+ properties: {
2057
+ kind: {
2058
+ type: "string",
2059
+ const: "cubic"
2060
+ },
2061
+ control1: { $ref: "#/$defs/ContentPathPoint" },
2062
+ control2: { $ref: "#/$defs/ContentPathPoint" },
2063
+ to: { $ref: "#/$defs/ContentPathPoint" }
2064
+ },
2065
+ required: [
2066
+ "kind",
2067
+ "control1",
2068
+ "control2",
1138
2069
  "to"
1139
2070
  ],
1140
2071
  additionalProperties: false
@@ -1167,9 +2098,16 @@ const CONTENT_DEFS = {
1167
2098
  frame: { $ref: "#/$defs/Box" },
1168
2099
  rotationDeg: { type: "number" },
1169
2100
  fill: { $ref: "#/$defs/Color" },
2101
+ fillPattern: { $ref: "#/$defs/ContentFillPattern" },
2102
+ fillOpacity: {
2103
+ type: "number",
2104
+ minimum: 0,
2105
+ maximum: 1
2106
+ },
1170
2107
  stroke: { $ref: "#/$defs/ContentStroke" },
1171
2108
  paintOrder: { type: "number" },
1172
2109
  sourcePath: { type: "string" },
2110
+ source: { $ref: "#/$defs/SourceResidue" },
1173
2111
  frames: {
1174
2112
  type: "array",
1175
2113
  items: { $ref: "#/$defs/LayoutFrame" }
@@ -1188,9 +2126,16 @@ const CONTENT_DEFS = {
1188
2126
  frame: { $ref: "#/$defs/Box" },
1189
2127
  rotationDeg: { type: "number" },
1190
2128
  fill: { $ref: "#/$defs/Color" },
2129
+ fillPattern: { $ref: "#/$defs/ContentFillPattern" },
2130
+ fillOpacity: {
2131
+ type: "number",
2132
+ minimum: 0,
2133
+ maximum: 1
2134
+ },
1191
2135
  stroke: { $ref: "#/$defs/ContentStroke" },
1192
2136
  paintOrder: { type: "number" },
1193
2137
  sourcePath: { type: "string" },
2138
+ source: { $ref: "#/$defs/SourceResidue" },
1194
2139
  frames: {
1195
2140
  type: "array",
1196
2141
  items: { $ref: "#/$defs/LayoutFrame" }
@@ -1211,6 +2156,7 @@ const CONTENT_DEFS = {
1211
2156
  stroke: { $ref: "#/$defs/ContentStroke" },
1212
2157
  paintOrder: { type: "number" },
1213
2158
  sourcePath: { type: "string" },
2159
+ source: { $ref: "#/$defs/SourceResidue" },
1214
2160
  frames: {
1215
2161
  type: "array",
1216
2162
  items: { $ref: "#/$defs/LayoutFrame" }
@@ -1238,6 +2184,12 @@ const CONTENT_DEFS = {
1238
2184
  items: { $ref: "#/$defs/ContentSubpath" }
1239
2185
  },
1240
2186
  fill: { $ref: "#/$defs/Color" },
2187
+ fillPattern: { $ref: "#/$defs/ContentFillPattern" },
2188
+ fillOpacity: {
2189
+ type: "number",
2190
+ minimum: 0,
2191
+ maximum: 1
2192
+ },
1241
2193
  fillRule: {
1242
2194
  type: "string",
1243
2195
  enum: ["nonzero", "evenodd"]
@@ -1245,6 +2197,7 @@ const CONTENT_DEFS = {
1245
2197
  stroke: { $ref: "#/$defs/ContentStroke" },
1246
2198
  paintOrder: { type: "number" },
1247
2199
  sourcePath: { type: "string" },
2200
+ source: { $ref: "#/$defs/SourceResidue" },
1248
2201
  frames: {
1249
2202
  type: "array",
1250
2203
  items: { $ref: "#/$defs/LayoutFrame" }
@@ -1278,7 +2231,8 @@ const CONTENT_DEFS = {
1278
2231
  maximum: MAX_SAFE_INTEGER
1279
2232
  },
1280
2233
  offsetXPt: { type: "number" },
1281
- offsetYPt: { type: "number" }
2234
+ offsetYPt: { type: "number" },
2235
+ source: { $ref: "#/$defs/SourceResidue" }
1282
2236
  },
1283
2237
  required: [
1284
2238
  "objectKind",
@@ -1298,7 +2252,7 @@ const CONTENT_DEFS = {
1298
2252
  { $ref: "#/$defs/HeadingGroup" },
1299
2253
  { $ref: "#/$defs/ListGroup" },
1300
2254
  { $ref: "#/$defs/SectionConstructGroup" },
1301
- { $ref: "#/$defs/PackageBlockLeaf" }
2255
+ { $ref: "#/$defs/TreeBlockLeaf" }
1302
2256
  ] }
1303
2257
  }
1304
2258
  },
@@ -1316,7 +2270,7 @@ const CONTENT_DEFS = {
1316
2270
  { $ref: "#/$defs/HeadingGroup" },
1317
2271
  { $ref: "#/$defs/ListGroup" },
1318
2272
  { $ref: "#/$defs/SectionConstructGroup" },
1319
- { $ref: "#/$defs/PackageBlockLeaf" }
2273
+ { $ref: "#/$defs/TreeBlockLeaf" }
1320
2274
  ] }
1321
2275
  }
1322
2276
  },
@@ -1333,7 +2287,7 @@ const CONTENT_DEFS = {
1333
2287
  items: { oneOf: [
1334
2288
  { $ref: "#/$defs/ListGroup" },
1335
2289
  { $ref: "#/$defs/ShapeConstructGroup" },
1336
- { $ref: "#/$defs/PackageBlockLeaf" }
2290
+ { $ref: "#/$defs/TreeBlockLeaf" }
1337
2291
  ] }
1338
2292
  }
1339
2293
  },
@@ -1363,7 +2317,7 @@ const CONTENT_DEFS = {
1363
2317
  items: { oneOf: [
1364
2318
  { $ref: "#/$defs/ListGroup" },
1365
2319
  { $ref: "#/$defs/ShapeConstructGroup" },
1366
- { $ref: "#/$defs/PackageBlockLeaf" }
2320
+ { $ref: "#/$defs/TreeBlockLeaf" }
1367
2321
  ] }
1368
2322
  }
1369
2323
  },
@@ -1407,7 +2361,7 @@ const CONTENT_DEFS = {
1407
2361
  { $ref: "#/$defs/HeadingGroup" },
1408
2362
  { $ref: "#/$defs/ListGroup" },
1409
2363
  { $ref: "#/$defs/SectionConstructGroup" },
1410
- { $ref: "#/$defs/PackageBlockLeaf" }
2364
+ { $ref: "#/$defs/TreeBlockLeaf" }
1411
2365
  ] }
1412
2366
  }
1413
2367
  },
@@ -1424,7 +2378,7 @@ const CONTENT_DEFS = {
1424
2378
  items: { oneOf: [
1425
2379
  { $ref: "#/$defs/ListGroup" },
1426
2380
  { $ref: "#/$defs/ShapeConstructGroup" },
1427
- { $ref: "#/$defs/PackageBlockLeaf" }
2381
+ { $ref: "#/$defs/TreeBlockLeaf" }
1428
2382
  ] }
1429
2383
  }
1430
2384
  },
@@ -1469,7 +2423,8 @@ const CONTENT_DEFS = {
1469
2423
  options: {
1470
2424
  type: "array",
1471
2425
  items: { type: "string" }
1472
- }
2426
+ },
2427
+ source: { $ref: "#/$defs/SourceResidue" }
1473
2428
  },
1474
2429
  required: ["kind", "controlType"],
1475
2430
  additionalProperties: false
@@ -1482,7 +2437,8 @@ const CONTENT_DEFS = {
1482
2437
  const: "field"
1483
2438
  },
1484
2439
  instruction: { type: "string" },
1485
- cachedResult: { type: "string" }
2440
+ cachedResult: { type: "string" },
2441
+ source: { $ref: "#/$defs/SourceResidue" }
1486
2442
  },
1487
2443
  required: ["kind", "instruction"],
1488
2444
  additionalProperties: false
@@ -1504,7 +2460,8 @@ const CONTENT_DEFS = {
1504
2460
  ]
1505
2461
  },
1506
2462
  name: { type: "string" },
1507
- definition: { type: "string" }
2463
+ definition: { type: "string" },
2464
+ source: { $ref: "#/$defs/SourceResidue" }
1508
2465
  },
1509
2466
  required: [
1510
2467
  "kind",
@@ -1544,7 +2501,8 @@ const CONTENT_DEFS = {
1544
2501
  const: "link"
1545
2502
  },
1546
2503
  target: { $ref: "#/$defs/LinkTarget" },
1547
- title: { type: "string" }
2504
+ title: { type: "string" },
2505
+ source: { $ref: "#/$defs/SourceResidue" }
1548
2506
  },
1549
2507
  required: ["kind", "target"],
1550
2508
  additionalProperties: false
@@ -1567,7 +2525,8 @@ const CONTENT_DEFS = {
1567
2525
  ]
1568
2526
  },
1569
2527
  author: { type: "string" },
1570
- dateIso: { type: "string" }
2528
+ dateIso: { type: "string" },
2529
+ source: { $ref: "#/$defs/SourceResidue" }
1571
2530
  },
1572
2531
  required: ["kind", "change"],
1573
2532
  additionalProperties: false
@@ -1595,7 +2554,8 @@ const CONTENT_DEFS = {
1595
2554
  maximum: MAX_SAFE_INTEGER
1596
2555
  },
1597
2556
  protected: { type: "boolean" },
1598
- source: { $ref: "#/$defs/DivisionSource" }
2557
+ linked: { $ref: "#/$defs/DivisionSource" },
2558
+ source: { $ref: "#/$defs/SourceResidue" }
1599
2559
  },
1600
2560
  required: ["kind"],
1601
2561
  additionalProperties: false
@@ -1620,7 +2580,9 @@ const CONTENT_DEFS = {
1620
2580
  exclusiveMinimum: 0
1621
2581
  },
1622
2582
  indentLeftPt: { type: "number" },
1623
- indentFirstLinePt: { type: "number" }
2583
+ indentFirstLinePt: { type: "number" },
2584
+ pageBreakBefore: { type: "boolean" },
2585
+ pageBreakAfter: { type: "boolean" }
1624
2586
  },
1625
2587
  additionalProperties: false
1626
2588
  },
@@ -1654,111 +2616,15 @@ const CONTENT_DEFS = {
1654
2616
  required: ["kind"],
1655
2617
  additionalProperties: {}
1656
2618
  },
1657
- MathMlAttribute: {
1658
- type: "object",
1659
- properties: {
1660
- name: { type: "string" },
1661
- value: { type: "string" }
1662
- },
1663
- required: ["name", "value"],
1664
- additionalProperties: false
2619
+ get MathMlAttribute() {
2620
+ return cacheMathMlDef("MathMlAttribute");
1665
2621
  },
1666
- MathMlElement: {
1667
- type: "object",
1668
- properties: {
1669
- type: {
1670
- type: "string",
1671
- const: "element"
1672
- },
1673
- tag: { type: "string" },
1674
- attributes: {
1675
- type: "array",
1676
- items: { $ref: "#/$defs/MathMlAttribute" }
1677
- },
1678
- children: {
1679
- type: "array",
1680
- items: { $ref: "#/$defs/MathMlNode" }
1681
- }
1682
- },
1683
- required: [
1684
- "type",
1685
- "tag",
1686
- "attributes",
1687
- "children"
1688
- ],
1689
- additionalProperties: false
2622
+ get MathMlElement() {
2623
+ return cacheMathMlDef("MathMlElement");
2624
+ },
2625
+ get MathMlNode() {
2626
+ return cacheMathMlDef("MathMlNode");
1690
2627
  },
1691
- MathMlNode: { oneOf: [
1692
- {
1693
- type: "object",
1694
- properties: {
1695
- type: {
1696
- type: "string",
1697
- const: "text"
1698
- },
1699
- value: { type: "string" }
1700
- },
1701
- required: ["type", "value"],
1702
- additionalProperties: false
1703
- },
1704
- {
1705
- type: "object",
1706
- properties: {
1707
- type: {
1708
- type: "string",
1709
- const: "cdata"
1710
- },
1711
- value: { type: "string" }
1712
- },
1713
- required: ["type", "value"],
1714
- additionalProperties: false
1715
- },
1716
- {
1717
- type: "object",
1718
- properties: {
1719
- type: {
1720
- type: "string",
1721
- const: "comment"
1722
- },
1723
- value: { type: "string" }
1724
- },
1725
- required: ["type", "value"],
1726
- additionalProperties: false
1727
- },
1728
- {
1729
- type: "object",
1730
- properties: {
1731
- type: {
1732
- type: "string",
1733
- const: "declaration"
1734
- },
1735
- attributes: {
1736
- type: "array",
1737
- items: { $ref: "#/$defs/MathMlAttribute" }
1738
- }
1739
- },
1740
- required: ["type", "attributes"],
1741
- additionalProperties: false
1742
- },
1743
- {
1744
- type: "object",
1745
- properties: {
1746
- type: {
1747
- type: "string",
1748
- const: "pi"
1749
- },
1750
- target: { type: "string" },
1751
- content: { type: "string" }
1752
- },
1753
- required: [
1754
- "type",
1755
- "target",
1756
- "content"
1757
- ],
1758
- additionalProperties: false
1759
- },
1760
- { $ref: "#/$defs/MathMlElement" }
1761
- ] },
1762
2628
  ContentFormula: {
1763
2629
  type: "object",
1764
2630
  properties: {
@@ -1769,7 +2635,8 @@ const CONTENT_DEFS = {
1769
2635
  starMath: { type: "string" },
1770
2636
  presentation: { $ref: "#/$defs/MathPresentation" },
1771
2637
  content: { $ref: "#/$defs/MathExpression" },
1772
- provenance: { $ref: "#/$defs/MathProvenance" }
2638
+ provenance: { $ref: "#/$defs/MathProvenance" },
2639
+ source: { $ref: "#/$defs/SourceResidue" }
1773
2640
  },
1774
2641
  required: ["mathml"],
1775
2642
  additionalProperties: false