document-content-model 7.14.1 → 7.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/a1.d.cts +1 -1
  2. package/dist/a1.d.ts +1 -1
  3. package/dist/codec.d.cts +1 -1
  4. package/dist/codec.d.ts +1 -1
  5. package/dist/{color-AELCDH_b.d.cts → color-CS3HtBwD.d.cts} +1 -1
  6. package/dist/{color-AELCDH_b.d.ts → color-CS3HtBwD.d.ts} +1 -1
  7. package/dist/color.d.cts +1 -1
  8. package/dist/color.d.ts +1 -1
  9. package/dist/{content-Cj_IC0ge.d.ts → content-BMrK9SrW.d.ts} +139 -128
  10. package/dist/{content-DZDor2Ct.d.cts → content-Dg9cb8mF.d.cts} +139 -128
  11. package/dist/content-json-schema-defs.cjs +15 -6
  12. package/dist/content-json-schema-defs.js +15 -6
  13. package/dist/content.cjs +10 -2
  14. package/dist/content.d.cts +2 -2
  15. package/dist/content.d.ts +2 -2
  16. package/dist/content.js +10 -3
  17. package/dist/decompose.cjs +13 -7
  18. package/dist/decompose.d.cts +2 -2
  19. package/dist/decompose.d.ts +2 -2
  20. package/dist/decompose.js +13 -7
  21. package/dist/definitions.d.cts +4 -4
  22. package/dist/definitions.d.ts +4 -4
  23. package/dist/factor-styles.d.cts +1 -1
  24. package/dist/factor-styles.d.ts +1 -1
  25. package/dist/flatten.d.cts +1 -1
  26. package/dist/flatten.d.ts +1 -1
  27. package/dist/index.cjs +1 -0
  28. package/dist/index.d.cts +5 -5
  29. package/dist/index.d.ts +5 -5
  30. package/dist/index.js +2 -2
  31. package/dist/math-layout.d.cts +1 -1
  32. package/dist/math-layout.d.ts +1 -1
  33. package/dist/{package-node-SBZNVEGu.d.ts → package-node-gA3Kpgl2.d.ts} +39 -39
  34. package/dist/{package-node-DBtKtaqn.d.cts → package-node-wxNXHAov.d.cts} +39 -39
  35. package/dist/package-node.d.cts +1 -1
  36. package/dist/package-node.d.ts +1 -1
  37. package/dist/package.d.cts +7 -7
  38. package/dist/package.d.ts +7 -7
  39. package/dist/schema-io.cjs +2 -2
  40. package/dist/schema-io.d.cts +1 -1
  41. package/dist/schema-io.d.ts +1 -1
  42. package/dist/schema-io.js +2 -2
  43. package/dist/{style-D06NwxAJ.d.cts → style-BGMcYrD2.d.cts} +1 -1
  44. package/dist/{style-D06NwxAJ.d.ts → style-BGMcYrD2.d.ts} +1 -1
  45. package/dist/style.d.cts +1 -1
  46. package/dist/style.d.ts +1 -1
  47. package/dist/table-grid.cjs +3 -3
  48. package/dist/table-grid.d.cts +4 -4
  49. package/dist/table-grid.d.ts +4 -4
  50. package/dist/table-grid.js +3 -3
  51. package/dist/text-layout.d.cts +8 -8
  52. package/dist/text-layout.d.ts +8 -8
  53. package/package.json +1 -1
  54. package/schemas/content-document.schema.json +35 -20
  55. package/schemas/document-tree.schema.json +22 -7
@@ -1,17 +1,17 @@
1
- import { n as Color } from "./color-AELCDH_b.cjs";
2
- import { i as LayoutFont } from "./style-D06NwxAJ.cjs";
1
+ import { n as Color } from "./color-CS3HtBwD.cjs";
2
+ import { i as LayoutFont } from "./style-BGMcYrD2.cjs";
3
3
  //#region src/text-layout.d.ts
4
4
  interface UnderlineMetrics {
5
5
  readonly offsetPt: number;
6
6
  readonly thicknessPt: number;
7
7
  }
8
8
  interface TextMeasurer {
9
- widthOfTextAtSize(text: string, font: LayoutFont, sizePt: number): number;
10
- lineHeightAtSize(font: LayoutFont, sizePt: number): number;
11
- ascenderAtSize(font: LayoutFont, sizePt: number): number;
12
- descenderAtSize(font: LayoutFont, sizePt: number): number;
13
- underlineAtSize(font: LayoutFont, sizePt: number): UnderlineMetrics;
14
- horizontalScaleFor(font: LayoutFont): number;
9
+ widthOfTextAtSize(text: string, font: Readonly<LayoutFont>, sizePt: number): number;
10
+ lineHeightAtSize(font: Readonly<LayoutFont>, sizePt: number): number;
11
+ ascenderAtSize(font: Readonly<LayoutFont>, sizePt: number): number;
12
+ descenderAtSize(font: Readonly<LayoutFont>, sizePt: number): number;
13
+ underlineAtSize(font: Readonly<LayoutFont>, sizePt: number): UnderlineMetrics;
14
+ horizontalScaleFor(font: Readonly<LayoutFont>): number;
15
15
  }
16
16
  interface StyledRun {
17
17
  readonly text: string;
@@ -1,17 +1,17 @@
1
- import { n as Color } from "./color-AELCDH_b.js";
2
- import { i as LayoutFont } from "./style-D06NwxAJ.js";
1
+ import { n as Color } from "./color-CS3HtBwD.js";
2
+ import { i as LayoutFont } from "./style-BGMcYrD2.js";
3
3
  //#region src/text-layout.d.ts
4
4
  interface UnderlineMetrics {
5
5
  readonly offsetPt: number;
6
6
  readonly thicknessPt: number;
7
7
  }
8
8
  interface TextMeasurer {
9
- widthOfTextAtSize(text: string, font: LayoutFont, sizePt: number): number;
10
- lineHeightAtSize(font: LayoutFont, sizePt: number): number;
11
- ascenderAtSize(font: LayoutFont, sizePt: number): number;
12
- descenderAtSize(font: LayoutFont, sizePt: number): number;
13
- underlineAtSize(font: LayoutFont, sizePt: number): UnderlineMetrics;
14
- horizontalScaleFor(font: LayoutFont): number;
9
+ widthOfTextAtSize(text: string, font: Readonly<LayoutFont>, sizePt: number): number;
10
+ lineHeightAtSize(font: Readonly<LayoutFont>, sizePt: number): number;
11
+ ascenderAtSize(font: Readonly<LayoutFont>, sizePt: number): number;
12
+ descenderAtSize(font: Readonly<LayoutFont>, sizePt: number): number;
13
+ underlineAtSize(font: Readonly<LayoutFont>, sizePt: number): UnderlineMetrics;
14
+ horizontalScaleFor(font: Readonly<LayoutFont>): number;
15
15
  }
16
16
  interface StyledRun {
17
17
  readonly text: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-content-model",
3
- "version": "7.14.1",
3
+ "version": "7.15.1",
4
4
  "description": "The canonical, format-agnostic content and document-tree schemas shared by ooxml.js, odf.js, documents.js, pdf-codec, and markdown-codec, plus the structural transform between them — no format-specific or I/O behaviour.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/content-document.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/content-document.schema.json",
4
4
  "oneOf": [
5
5
  {
6
6
  "type": "object",
@@ -133,7 +133,7 @@
133
133
  "blocks": {
134
134
  "type": "array",
135
135
  "items": {
136
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/undefined#/$defs/schema2"
136
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/undefined#/$defs/schema2"
137
137
  }
138
138
  },
139
139
  "breakType": {
@@ -151,19 +151,19 @@
151
151
  "default": {
152
152
  "type": "array",
153
153
  "items": {
154
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/undefined#/$defs/schema2"
154
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/undefined#/$defs/schema2"
155
155
  }
156
156
  },
157
157
  "even": {
158
158
  "type": "array",
159
159
  "items": {
160
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/undefined#/$defs/schema2"
160
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/undefined#/$defs/schema2"
161
161
  }
162
162
  },
163
163
  "first": {
164
164
  "type": "array",
165
165
  "items": {
166
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/undefined#/$defs/schema2"
166
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/undefined#/$defs/schema2"
167
167
  }
168
168
  }
169
169
  },
@@ -175,19 +175,19 @@
175
175
  "default": {
176
176
  "type": "array",
177
177
  "items": {
178
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/undefined#/$defs/schema2"
178
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/undefined#/$defs/schema2"
179
179
  }
180
180
  },
181
181
  "even": {
182
182
  "type": "array",
183
183
  "items": {
184
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/undefined#/$defs/schema2"
184
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/undefined#/$defs/schema2"
185
185
  }
186
186
  },
187
187
  "first": {
188
188
  "type": "array",
189
189
  "items": {
190
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/undefined#/$defs/schema2"
190
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/undefined#/$defs/schema2"
191
191
  }
192
192
  }
193
193
  },
@@ -199,19 +199,19 @@
199
199
  "default": {
200
200
  "type": "array",
201
201
  "items": {
202
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/undefined#/$defs/schema2"
202
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/undefined#/$defs/schema2"
203
203
  }
204
204
  },
205
205
  "even": {
206
206
  "type": "array",
207
207
  "items": {
208
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/undefined#/$defs/schema2"
208
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/undefined#/$defs/schema2"
209
209
  }
210
210
  },
211
211
  "first": {
212
212
  "type": "array",
213
213
  "items": {
214
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/undefined#/$defs/schema2"
214
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/undefined#/$defs/schema2"
215
215
  }
216
216
  }
217
217
  },
@@ -638,7 +638,7 @@
638
638
  "blocks": {
639
639
  "type": "array",
640
640
  "items": {
641
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/undefined#/$defs/schema2"
641
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/undefined#/$defs/schema2"
642
642
  }
643
643
  }
644
644
  },
@@ -2659,7 +2659,7 @@
2659
2659
  ]
2660
2660
  },
2661
2661
  "document": {
2662
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/content-document.schema.json"
2662
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/content-document.schema.json"
2663
2663
  },
2664
2664
  "frame": {
2665
2665
  "type": "object",
@@ -5021,7 +5021,7 @@
5021
5021
  "blocks": {
5022
5022
  "type": "array",
5023
5023
  "items": {
5024
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/undefined#/$defs/schema2"
5024
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/undefined#/$defs/schema2"
5025
5025
  }
5026
5026
  }
5027
5027
  },
@@ -7965,6 +7965,22 @@
7965
7965
  ],
7966
7966
  "additionalProperties": false
7967
7967
  },
7968
+ "ContentTableColumn": {
7969
+ "type": "object",
7970
+ "properties": {
7971
+ "widthPt": {
7972
+ "type": "number",
7973
+ "minimum": 0
7974
+ },
7975
+ "isHeader": {
7976
+ "type": "boolean"
7977
+ }
7978
+ },
7979
+ "required": [
7980
+ "widthPt"
7981
+ ],
7982
+ "additionalProperties": false
7983
+ },
7968
7984
  "ContentTable": {
7969
7985
  "type": "object",
7970
7986
  "properties": {
@@ -7978,11 +7994,10 @@
7978
7994
  "$ref": "#/$defs/ContentTableRow"
7979
7995
  }
7980
7996
  },
7981
- "columnWidthsPt": {
7997
+ "columns": {
7982
7998
  "type": "array",
7983
7999
  "items": {
7984
- "type": "number",
7985
- "minimum": 0
8000
+ "$ref": "#/$defs/ContentTableColumn"
7986
8001
  }
7987
8002
  },
7988
8003
  "sourcePath": {
@@ -8007,7 +8022,7 @@
8007
8022
  "required": [
8008
8023
  "kind",
8009
8024
  "rows",
8010
- "columnWidthsPt"
8025
+ "columns"
8011
8026
  ],
8012
8027
  "additionalProperties": false
8013
8028
  },
@@ -8030,7 +8045,7 @@
8030
8045
  ]
8031
8046
  },
8032
8047
  "document": {
8033
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/content-document.schema.json"
8048
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/content-document.schema.json"
8034
8049
  },
8035
8050
  "frame": {
8036
8051
  "$ref": "#/$defs/Box"
@@ -10356,7 +10371,7 @@
10356
10371
  ]
10357
10372
  },
10358
10373
  "document": {
10359
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/content-document.schema.json"
10374
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/content-document.schema.json"
10360
10375
  },
10361
10376
  "frame": {
10362
10377
  "$ref": "#/$defs/Box"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/document-tree.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/document-tree.schema.json",
4
4
  "oneOf": [
5
5
  {
6
6
  "type": "object",
@@ -1931,6 +1931,22 @@
1931
1931
  ],
1932
1932
  "additionalProperties": false
1933
1933
  },
1934
+ "ContentTableColumn": {
1935
+ "type": "object",
1936
+ "properties": {
1937
+ "widthPt": {
1938
+ "type": "number",
1939
+ "minimum": 0
1940
+ },
1941
+ "isHeader": {
1942
+ "type": "boolean"
1943
+ }
1944
+ },
1945
+ "required": [
1946
+ "widthPt"
1947
+ ],
1948
+ "additionalProperties": false
1949
+ },
1934
1950
  "ContentTable": {
1935
1951
  "type": "object",
1936
1952
  "properties": {
@@ -1944,11 +1960,10 @@
1944
1960
  "$ref": "#/$defs/ContentTableRow"
1945
1961
  }
1946
1962
  },
1947
- "columnWidthsPt": {
1963
+ "columns": {
1948
1964
  "type": "array",
1949
1965
  "items": {
1950
- "type": "number",
1951
- "minimum": 0
1966
+ "$ref": "#/$defs/ContentTableColumn"
1952
1967
  }
1953
1968
  },
1954
1969
  "sourcePath": {
@@ -1973,7 +1988,7 @@
1973
1988
  "required": [
1974
1989
  "kind",
1975
1990
  "rows",
1976
- "columnWidthsPt"
1991
+ "columns"
1977
1992
  ],
1978
1993
  "additionalProperties": false
1979
1994
  },
@@ -1996,7 +2011,7 @@
1996
2011
  ]
1997
2012
  },
1998
2013
  "document": {
1999
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/content-document.schema.json"
2014
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/content-document.schema.json"
2000
2015
  },
2001
2016
  "frame": {
2002
2017
  "$ref": "#/$defs/Box"
@@ -4322,7 +4337,7 @@
4322
4337
  ]
4323
4338
  },
4324
4339
  "document": {
4325
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.14.1/schemas/content-document.schema.json"
4340
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.15.1/schemas/content-document.schema.json"
4326
4341
  },
4327
4342
  "frame": {
4328
4343
  "$ref": "#/$defs/Box"