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