@openpresentation/opf 0.15.1 → 0.17.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 (86) hide show
  1. package/README.md +19 -1
  2. package/dist/{catalog-refs-BSfGELpt.d.ts → catalog-refs-C4K4y-vh.d.ts} +1 -1
  3. package/dist/{catalog-schemas-CinPh5WA.d.ts → catalog-schemas-g7RFQBdc.d.ts} +1 -1
  4. package/dist/catalog.d.ts +2 -2
  5. package/dist/catalog.js +3 -23224
  6. package/dist/{chart-data-BnNqgnC-.d.ts → chart-data-DTxdRRT1.d.ts} +1 -1
  7. package/dist/{chunk-3JG4YXWF.js → chunk-BIC3SWPK.js} +12 -5
  8. package/dist/{chunk-O744SXXA.js → chunk-CW7GEAV3.js} +350 -141
  9. package/dist/{chunk-374R35TJ.js → chunk-ESRYBYLY.js} +1 -1
  10. package/dist/chunk-IPW5BS3X.js +973 -0
  11. package/dist/{chunk-3RKB4RDJ.js → chunk-IS5H5JKH.js} +4 -2
  12. package/dist/{chunk-TWQJLI6E.js → chunk-M4UR3NPN.js} +2 -2
  13. package/dist/chunk-N4EVOFEA.js +58 -0
  14. package/dist/{chunk-QDI75P2M.js → chunk-NLNYNBTS.js} +217 -20
  15. package/dist/{chunk-U4J75TRG.js → chunk-O263APNI.js} +5 -2
  16. package/dist/{chunk-UBFJ2QHH.js → chunk-O2CX5NEH.js} +36 -14
  17. package/dist/{chunk-5FTUIDUH.js → chunk-O3CVNJTL.js} +1 -1
  18. package/dist/{chunk-VGAOJEY7.js → chunk-PPROJP2E.js} +1 -1
  19. package/dist/{chunk-2CJPC4HI.js → chunk-RA64UQKI.js} +203 -53
  20. package/dist/chunk-TCD2FB2K.js +319 -0
  21. package/dist/chunk-WCG3THTD.js +23712 -0
  22. package/dist/chunk-WWYWFVOI.js +793 -0
  23. package/dist/{chunk-ZPU46TFA.js → chunk-YT7FMQER.js} +1 -1
  24. package/dist/{composition-D2tghM82.d.ts → composition-BbZ_9C-c.d.ts} +238 -139
  25. package/dist/composition.d.ts +3 -3
  26. package/dist/composition.js +1 -1
  27. package/dist/conversion-SBpTOwdg.d.ts +444 -0
  28. package/dist/convert.d.ts +4 -4
  29. package/dist/convert.js +7 -7
  30. package/dist/data.d.ts +28 -11
  31. package/dist/data.js +2 -2
  32. package/dist/deck-report-Bx3naFlF.d.ts +40 -0
  33. package/dist/deck.d.ts +47 -0
  34. package/dist/deck.js +12 -0
  35. package/dist/diff.d.ts +1 -1
  36. package/dist/diff.js +5 -5
  37. package/dist/docs.js +33 -27
  38. package/dist/examples.d.ts +1 -1
  39. package/dist/examples.js +3229 -985
  40. package/dist/{finding-CT_f_vbD.d.ts → finding-CDQ_wH8j.d.ts} +1 -1
  41. package/dist/format.js +2 -2
  42. package/dist/index.d.ts +43 -12
  43. package/dist/index.js +15 -805
  44. package/dist/markdown.d.ts +7 -8
  45. package/dist/markdown.js +7 -7
  46. package/dist/node-engine.d.ts +94 -0
  47. package/dist/node-engine.js +21 -0
  48. package/dist/node.d.ts +60 -0
  49. package/dist/node.js +54 -0
  50. package/dist/{pagination-wedbe7eq.d.ts → pagination-BhX4M48Y.d.ts} +21 -7
  51. package/dist/pagination.d.ts +4 -4
  52. package/dist/pagination.js +4 -4
  53. package/dist/patch.d.ts +1 -1
  54. package/dist/patch.js +4 -4
  55. package/dist/{presentation-CDKQVkyI.d.ts → presentation-fb8CZmRq.d.ts} +28 -83
  56. package/dist/repo-readme.js +1 -1
  57. package/dist/schemas.d.ts +14 -0
  58. package/dist/schemas.js +1 -1
  59. package/dist/spec/catalogs/layouts/business-model-canvas.json +66 -1
  60. package/dist/spec/catalogs/layouts/capability-map.json +53 -3
  61. package/dist/spec/catalogs/layouts/chart-2x.json +32 -8
  62. package/dist/spec/catalogs/layouts/chart-3x-bottom-vertical-title-left.json +16 -10
  63. package/dist/spec/catalogs/layouts/chart-3x-left-title-center.json +16 -10
  64. package/dist/spec/catalogs/layouts/chart-3x-left.json +16 -10
  65. package/dist/spec/catalogs/layouts/chart-3x-right-title-center.json +16 -10
  66. package/dist/spec/catalogs/layouts/chart-3x-right.json +16 -10
  67. package/dist/spec/catalogs/layouts/chart-3x-top-vertical-title-left.json +16 -10
  68. package/dist/spec/catalogs/layouts/chart-3x.json +48 -12
  69. package/dist/spec/catalogs/layouts/dashboard.json +37 -5
  70. package/dist/spec/catalogs/layouts/image-2x.json +32 -8
  71. package/dist/spec/catalogs/layouts/image-3x.json +48 -12
  72. package/dist/spec/catalogs/layouts/index.json +1 -1
  73. package/dist/spec/catalogs/layouts/kpi-scorecard.json +48 -3
  74. package/dist/spec/catalogs/layouts/logic-tree.json +69 -0
  75. package/dist/spec/catalogs/layouts/market-size.json +26 -2
  76. package/dist/spec/catalogs/layouts/org-chart.json +53 -6
  77. package/dist/spec/catalogs/manifest.json +3 -3
  78. package/dist/spec/schemas/layout.schema.json +172 -5
  79. package/dist/spec/schemas/opf.schema.json +27 -43
  80. package/dist/types.d.ts +10 -32
  81. package/dist/{validation-types-BOcY9GTs.d.ts → validation-types-iZbXfES6.d.ts} +19 -8
  82. package/dist/validator.d.ts +8 -8
  83. package/dist/validator.js +3 -3
  84. package/dist/yaml.d.ts +6 -6
  85. package/dist/yaml.js +8 -321
  86. package/package.json +38 -1
@@ -16,6 +16,68 @@
16
16
  },
17
17
  {
18
18
  "type": "text"
19
+ },
20
+ {
21
+ "type": "group",
22
+ "composition": {
23
+ "mode": "row"
24
+ },
25
+ "placeholders": [
26
+ {
27
+ "type": "group",
28
+ "composition": {
29
+ "mode": "column",
30
+ "weights": [
31
+ 1,
32
+ 2
33
+ ]
34
+ },
35
+ "placeholders": [
36
+ {
37
+ "type": "text"
38
+ },
39
+ {
40
+ "type": "list"
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "type": "group",
46
+ "composition": {
47
+ "mode": "column",
48
+ "weights": [
49
+ 1,
50
+ 2
51
+ ]
52
+ },
53
+ "placeholders": [
54
+ {
55
+ "type": "text"
56
+ },
57
+ {
58
+ "type": "list"
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "type": "group",
64
+ "composition": {
65
+ "mode": "column",
66
+ "weights": [
67
+ 1,
68
+ 2
69
+ ]
70
+ },
71
+ "placeholders": [
72
+ {
73
+ "type": "text"
74
+ },
75
+ {
76
+ "type": "list"
77
+ }
78
+ ]
79
+ }
80
+ ]
19
81
  }
20
82
  ],
21
83
  "tags": [
@@ -25,5 +87,12 @@
25
87
  ],
26
88
  "preview": {
27
89
  "vectorSrc": "https://www.pptx.gallery/layout-previews/logic-tree.svg"
90
+ },
91
+ "composition": {
92
+ "mode": "column",
93
+ "weights": [
94
+ 1,
95
+ 3
96
+ ]
28
97
  }
29
98
  }
@@ -3,7 +3,7 @@
3
3
  "id": "market-size",
4
4
  "name": "Market_Size",
5
5
  "summary": "Nested TAM / SAM / SOM visualization showing total market, addressable segment, and obtainable share.",
6
- "description": "Nested TAM / SAM / SOM visualization showing total market, addressable segment, and obtainable share.",
6
+ "description": "Nested TAM / SAM / SOM visualization beside the three numbers stacked: total market, addressable segment, and obtainable share.",
7
7
  "design": {
8
8
  "titleAlignment": "left",
9
9
  "contentAlignment": "left",
@@ -15,7 +15,24 @@
15
15
  "type": "title"
16
16
  },
17
17
  {
18
- "type": "text"
18
+ "type": "image"
19
+ },
20
+ {
21
+ "type": "group",
22
+ "composition": {
23
+ "mode": "column"
24
+ },
25
+ "placeholders": [
26
+ {
27
+ "type": "metric"
28
+ },
29
+ {
30
+ "type": "metric"
31
+ },
32
+ {
33
+ "type": "metric"
34
+ }
35
+ ]
19
36
  }
20
37
  ],
21
38
  "tags": [
@@ -25,5 +42,12 @@
25
42
  ],
26
43
  "preview": {
27
44
  "vectorSrc": "https://www.pptx.gallery/layout-previews/market-size.svg"
45
+ },
46
+ "composition": {
47
+ "mode": "row",
48
+ "weights": [
49
+ 3,
50
+ 2
51
+ ]
28
52
  }
29
53
  }
@@ -7,7 +7,7 @@
7
7
  "design": {
8
8
  "titleAlignment": "left",
9
9
  "contentAlignment": "left",
10
- "contentBox": false,
10
+ "contentBox": true,
11
11
  "contentDirection": "horizontal"
12
12
  },
13
13
  "placeholders": [
@@ -15,10 +15,57 @@
15
15
  "type": "title"
16
16
  },
17
17
  {
18
- "type": "chart"
18
+ "type": "text"
19
19
  },
20
20
  {
21
- "type": "chart"
21
+ "type": "group",
22
+ "composition": {
23
+ "mode": "row"
24
+ },
25
+ "placeholders": [
26
+ {
27
+ "type": "group",
28
+ "composition": {
29
+ "mode": "column"
30
+ },
31
+ "placeholders": [
32
+ {
33
+ "type": "text"
34
+ },
35
+ {
36
+ "type": "text"
37
+ }
38
+ ]
39
+ },
40
+ {
41
+ "type": "group",
42
+ "composition": {
43
+ "mode": "column"
44
+ },
45
+ "placeholders": [
46
+ {
47
+ "type": "text"
48
+ },
49
+ {
50
+ "type": "text"
51
+ }
52
+ ]
53
+ },
54
+ {
55
+ "type": "group",
56
+ "composition": {
57
+ "mode": "column"
58
+ },
59
+ "placeholders": [
60
+ {
61
+ "type": "text"
62
+ },
63
+ {
64
+ "type": "text"
65
+ }
66
+ ]
67
+ }
68
+ ]
22
69
  }
23
70
  ],
24
71
  "tags": [
@@ -30,10 +77,10 @@
30
77
  "vectorSrc": "https://www.pptx.gallery/layout-previews/org-chart.svg"
31
78
  },
32
79
  "composition": {
33
- "mode": "row",
80
+ "mode": "column",
34
81
  "weights": [
35
- 2,
36
- 1
82
+ 1,
83
+ 3
37
84
  ]
38
85
  }
39
86
  }
@@ -4,7 +4,7 @@
4
4
  "publisher": "https://www.pptx.gallery",
5
5
  "source": {
6
6
  "repository": "https://github.com/Data-Advantage/pptx-gallery",
7
- "commit": "5645db8e4e9e09d0dd819c39538b1c783ee91aa1",
7
+ "commit": "cce9b8eec0b30c7d9f7a6aa004e8fe11782af245",
8
8
  "path": "public"
9
9
  },
10
10
  "kinds": {
@@ -56,10 +56,10 @@
56
56
  "layouts": {
57
57
  "mode": "mirror",
58
58
  "records": 278,
59
- "contentSha256": "f9121c466032011762d58ee27cd3e50f43a388cc75b841219f87b8001f7632a3",
59
+ "contentSha256": "877c1cd335cbbb8258a5b93e78e112d740906c33c9910586c8b12c63482b5adb",
60
60
  "gallery": {
61
61
  "records": 278,
62
- "contentSha256": "f9121c466032011762d58ee27cd3e50f43a388cc75b841219f87b8001f7632a3"
62
+ "contentSha256": "877c1cd335cbbb8258a5b93e78e112d740906c33c9910586c8b12c63482b5adb"
63
63
  }
64
64
  },
65
65
  "narratives": {
@@ -57,8 +57,8 @@
57
57
  },
58
58
  "placeholders": {
59
59
  "type": "array",
60
- "items": { "$ref": "#/$defs/Placeholder" },
61
- "description": "Ordered regions the layout exposes. This is the single source of truth for what the layout holds: the content kind, the number of body regions and whether it has a title, subtitle or tag are derived from it (layoutContent in @openpresentation/opf), never stored separately. The engine fills 'title', 'subtitle' and 'tag' placeholders from Slide.title, Slide.subtitle and Slide.tag. The other placeholders are content-kind regions that composition uses to size the body and that pickers use to match layouts. Slide content itself lives either in root payload fields or promoted region keys on Slide. Chrome (slide number, footer, date) is not included here; it is owned by Design.header / Design.footer."
60
+ "items": { "$ref": "#/$defs/PlaceholderEntry" },
61
+ "description": "Ordered regions the layout exposes. This is the single source of truth for what the layout holds: the content kind, the number of body regions and whether it has a title, subtitle or tag are derived from it (layoutContent in @openpresentation/opf, which counts the leaves of placeholder groups), never stored separately. The engine fills 'title', 'subtitle' and 'tag' placeholders from Slide.title, Slide.subtitle and Slide.tag. The other placeholders are content-kind regions that composition uses to size the body and that pickers use to match layouts. An entry may instead be a placeholder group ({ \"type\": \"group\", \"composition\", \"placeholders\" }) that arranges its own regions inside one cell of this record's composition, so a record can say 'two stacked panels beside a chart' once; groups nest at most three levels. Slide content stays flat: its body payloads fill the leaf regions in reading order (depth first, in array order). Slide content itself lives either in root payload fields, blocks or promoted region keys on Slide. Chrome (slide number, footer, date) is not included here; it is owned by Design.header / Design.footer."
62
62
  },
63
63
  "tags": {
64
64
  "type": "array",
@@ -116,6 +116,173 @@
116
116
  }
117
117
  },
118
118
  "$defs": {
119
+ "PlaceholderEntry": {
120
+ "description": "One entry of a layout's placeholders: a region (Placeholder) or, when its type is 'group', a placeholder group (PlaceholderGroup).",
121
+ "if": {
122
+ "type": "object",
123
+ "required": [
124
+ "type"
125
+ ],
126
+ "properties": {
127
+ "type": {
128
+ "const": "group"
129
+ }
130
+ }
131
+ },
132
+ "then": {
133
+ "$ref": "#/$defs/PlaceholderGroup"
134
+ },
135
+ "else": {
136
+ "$ref": "#/$defs/Placeholder"
137
+ }
138
+ },
139
+ "PlaceholderGroup": {
140
+ "type": "object",
141
+ "additionalProperties": false,
142
+ "required": [
143
+ "type",
144
+ "placeholders"
145
+ ],
146
+ "description": "A placeholder group: regions arranged by their own composition inside one cell of the record's composition, the way a content group (a block with blocks) arranges its children. Slide content fills the group's leaf regions in reading order, as part of one flat sequence for the whole record. A group holds body regions and groups only (no title, subtitle or tag, and no placement), and groups nest at most three levels inside a record: this is the first. Groups draw nothing of their own and have no slide path; design.chartPrimary is shorthand for a record whose root holds the chart and one group of the other content.",
147
+ "properties": {
148
+ "type": {
149
+ "const": "group",
150
+ "description": "Marks the entry as a placeholder group."
151
+ },
152
+ "composition": {
153
+ "$ref": "#/$defs/Composition",
154
+ "description": "How the group arranges its regions, with the semantics of a content group's composition: only minFontSize and overflow inherit from the enclosing composition; padding defaults to 0 and gap is a fraction of the group's short edge. Omitted, the group arranges its regions automatically."
155
+ },
156
+ "placeholders": {
157
+ "type": "array",
158
+ "minItems": 1,
159
+ "items": {
160
+ "$ref": "#/$defs/PlaceholderGroupEntry2"
161
+ },
162
+ "description": "The group's regions and nested groups, in reading order."
163
+ }
164
+ }
165
+ },
166
+ "PlaceholderGroupEntry2": {
167
+ "description": "An entry of a first-level group: a region (GroupedPlaceholder) or a second-level group (PlaceholderGroup2).",
168
+ "if": {
169
+ "type": "object",
170
+ "required": [
171
+ "type"
172
+ ],
173
+ "properties": {
174
+ "type": {
175
+ "const": "group"
176
+ }
177
+ }
178
+ },
179
+ "then": {
180
+ "$ref": "#/$defs/PlaceholderGroup2"
181
+ },
182
+ "else": {
183
+ "$ref": "#/$defs/GroupedPlaceholder"
184
+ }
185
+ },
186
+ "PlaceholderGroup2": {
187
+ "type": "object",
188
+ "additionalProperties": false,
189
+ "required": [
190
+ "type",
191
+ "placeholders"
192
+ ],
193
+ "description": "A placeholder group nested in another (the second level). Same fields as PlaceholderGroup.",
194
+ "properties": {
195
+ "type": {
196
+ "const": "group",
197
+ "description": "Marks the entry as a placeholder group."
198
+ },
199
+ "composition": {
200
+ "$ref": "#/$defs/Composition",
201
+ "description": "How the group arranges its regions; see PlaceholderGroup.composition."
202
+ },
203
+ "placeholders": {
204
+ "type": "array",
205
+ "minItems": 1,
206
+ "items": {
207
+ "$ref": "#/$defs/PlaceholderGroupEntry3"
208
+ },
209
+ "description": "The group's regions and nested groups, in reading order."
210
+ }
211
+ }
212
+ },
213
+ "PlaceholderGroupEntry3": {
214
+ "description": "An entry of a second-level group: a region (GroupedPlaceholder) or a third-level group (PlaceholderGroup3).",
215
+ "if": {
216
+ "type": "object",
217
+ "required": [
218
+ "type"
219
+ ],
220
+ "properties": {
221
+ "type": {
222
+ "const": "group"
223
+ }
224
+ }
225
+ },
226
+ "then": {
227
+ "$ref": "#/$defs/PlaceholderGroup3"
228
+ },
229
+ "else": {
230
+ "$ref": "#/$defs/GroupedPlaceholder"
231
+ }
232
+ },
233
+ "PlaceholderGroup3": {
234
+ "type": "object",
235
+ "additionalProperties": false,
236
+ "required": [
237
+ "type",
238
+ "placeholders"
239
+ ],
240
+ "description": "The innermost placeholder group (the third level): it holds regions only, never another group.",
241
+ "properties": {
242
+ "type": {
243
+ "const": "group",
244
+ "description": "Marks the entry as a placeholder group."
245
+ },
246
+ "composition": {
247
+ "$ref": "#/$defs/Composition",
248
+ "description": "How the group arranges its regions; see PlaceholderGroup.composition."
249
+ },
250
+ "placeholders": {
251
+ "type": "array",
252
+ "minItems": 1,
253
+ "items": {
254
+ "$ref": "#/$defs/GroupedPlaceholder"
255
+ },
256
+ "description": "The group's regions, in reading order."
257
+ }
258
+ }
259
+ },
260
+ "GroupedPlaceholder": {
261
+ "type": "object",
262
+ "additionalProperties": false,
263
+ "required": [
264
+ "type"
265
+ ],
266
+ "description": "A region inside a placeholder group: a body content kind only. Headings ('title', 'subtitle', 'tag') stay at the record's top level, and only a top-level image placeholder may carry a placement.",
267
+ "properties": {
268
+ "type": {
269
+ "type": "string",
270
+ "enum": [
271
+ "text",
272
+ "list",
273
+ "image",
274
+ "video",
275
+ "chart",
276
+ "table",
277
+ "code",
278
+ "metric",
279
+ "quote",
280
+ "timeline"
281
+ ],
282
+ "description": "The content kind of the region, from the one OPF content-kind vocabulary (see Placeholder.type)."
283
+ }
284
+ }
285
+ },
119
286
  "Placeholder": {
120
287
  "type": "object",
121
288
  "required": [
@@ -156,7 +323,7 @@
156
323
  },
157
324
  "placement": {
158
325
  "$ref": "#/$defs/ImagePlacement",
159
- "description": "Image placeholders only. Bleeds the slide's image for this region to one slide edge, as an image block's placement does: the n-th image placeholder places the slide's n-th top-level image (Slide.image or an image block in blocks) unless that block sets its own placement. The headings and the other content compose in the rest of the slide."
326
+ "description": "Image placeholders only. Bleeds the slide's image for this region to one slide edge, as an image block's placement does: the n-th image placeholder (counting the image regions of placeholder groups too, in reading order) places the slide's n-th top-level image (Slide.image or an image block in blocks) unless that block sets its own placement. Only a top-level image placeholder may carry a placement; a region inside a placeholder group cannot bleed to a slide edge. The headings and the other content compose in the rest of the slide."
160
327
  }
161
328
  }
162
329
  },
@@ -234,7 +401,7 @@
234
401
  "left",
235
402
  "right"
236
403
  ],
237
- "description": "Where the primary chart sits relative to the other body content. Composition applies it below the slide's and the deck's design.chartPrimary, with the semantics described there."
404
+ "description": "Where the primary chart sits relative to the other body content. Composition applies it below the slide's and the deck's design.chartPrimary, with the semantics described there. It is shorthand for a placeholder group: a record can state the same structure explicitly as a root row or column of the chart and one PlaceholderGroup of the other regions, weighted 3:2."
238
405
  },
239
406
  "imageFit": {
240
407
  "type": "string",
@@ -258,7 +425,7 @@
258
425
  "Composition": {
259
426
  "type": "object",
260
427
  "additionalProperties": false,
261
- "description": "Portable dynamic composition. Slide fields override the resolved layout. Nested groups arrange their children independently, inheriting only minFontSize and overflow. Explicit promoted regions retain their positions.",
428
+ "description": "Portable dynamic composition. Slide fields override the resolved layout. Nested groups (placeholder groups here, content groups in a slide) arrange their children independently, inheriting only minFontSize and overflow. Explicit promoted regions retain their positions.",
262
429
  "properties": {
263
430
  "mode": {
264
431
  "type": "string",