@openpresentation/opf 0.11.4 → 0.12.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 (74) hide show
  1. package/README.md +16 -0
  2. package/dist/audit.d.ts +156 -0
  3. package/dist/audit.js +7 -0
  4. package/dist/{catalogs-CUClB3nl.d.ts → catalogs-BnI7JKcn.d.ts} +3 -3
  5. package/dist/catalogs.d.ts +2 -2
  6. package/dist/catalogs.js +2 -1
  7. package/dist/{chunk-KJKASEPE.js → chunk-4LAM3N6S.js} +753 -42
  8. package/dist/chunk-6LZK2IZB.js +1690 -0
  9. package/dist/{chunk-NSVVQ52O.js → chunk-AUM5MXBR.js} +8 -6
  10. package/dist/{chunk-AEUSVEUY.js → chunk-E34DJ5LL.js} +50 -14
  11. package/dist/chunk-FYLJVF7X.js +18448 -0
  12. package/dist/{chunk-HJL64ETN.js → chunk-GJKJL4YY.js} +14 -0
  13. package/dist/{chunk-3H2U7FDR.js → chunk-HOBSL7AJ.js} +1867 -247
  14. package/dist/chunk-JKVKYVWL.js +1332 -0
  15. package/dist/{chunk-3OJN7QAW.js → chunk-MWPMJE6P.js} +18 -4
  16. package/dist/chunk-RUC7L5DJ.js +261 -0
  17. package/dist/chunk-S5W34SIJ.js +1 -0
  18. package/dist/chunk-V2537ENL.js +198 -0
  19. package/dist/{chunk-RXNFDGPC.js → chunk-WXSPETQ6.js} +311 -40
  20. package/dist/{composition-Dl-d9FRj.d.ts → composition-DWbCiMwF.d.ts} +559 -10
  21. package/dist/composition.d.ts +1 -1
  22. package/dist/composition.js +2 -1
  23. package/dist/convert.d.ts +261 -0
  24. package/dist/convert.js +1107 -0
  25. package/dist/diff.d.ts +145 -0
  26. package/dist/diff.js +604 -0
  27. package/dist/docs.js +72 -18
  28. package/dist/examples.d.ts +1 -1
  29. package/dist/examples.js +112 -112
  30. package/dist/font-policy.d.ts +15 -0
  31. package/dist/font-policy.js +1 -1
  32. package/dist/format.d.ts +20 -0
  33. package/dist/format.js +83 -0
  34. package/dist/index.d.ts +173 -24
  35. package/dist/index.js +926 -262
  36. package/dist/lint.d.ts +4 -4
  37. package/dist/lint.js +6 -5
  38. package/dist/markdown.d.ts +74 -0
  39. package/dist/markdown.js +1941 -0
  40. package/dist/pagination.d.ts +1 -1
  41. package/dist/pagination.js +6 -5
  42. package/dist/patch.d.ts +99 -0
  43. package/dist/patch.js +6 -0
  44. package/dist/{presentation-j5PVrqfV.d.ts → presentation-DcF-MZcz.d.ts} +452 -17
  45. package/dist/repo-readme.js +1 -1
  46. package/dist/{schemas-X_NniU4A.d.ts → schemas-BSjlG8-R.d.ts} +28 -0
  47. package/dist/schemas.d.ts +1 -1
  48. package/dist/schemas.js +1 -1
  49. package/dist/spec/catalogs/audiences/customers.json +5 -1
  50. package/dist/spec/catalogs/audiences/executives.json +5 -1
  51. package/dist/spec/catalogs/audiences/index.json +20 -8
  52. package/dist/spec/catalogs/audiences/investors.json +5 -1
  53. package/dist/spec/catalogs/audiences/marketing-team.json +5 -1
  54. package/dist/spec/catalogs/audiences/regulators.json +5 -1
  55. package/dist/spec/catalogs/audiences/sales-team.json +5 -1
  56. package/dist/spec/catalogs/manifest.json +2 -2
  57. package/dist/spec/reference/engine-defaults.json +1 -1
  58. package/dist/spec/reference/font-policy.json +311 -40
  59. package/dist/spec/reference/font-policy.schema.json +40 -0
  60. package/dist/spec/reference/symbol-font-encodings.json +18354 -0
  61. package/dist/spec/reference/symbol-font-encodings.schema.json +156 -0
  62. package/dist/spec/schemas/audience.schema.json +7 -7
  63. package/dist/spec/schemas/narrative.schema.json +1 -1
  64. package/dist/spec/schemas/opf.schema.json +597 -28
  65. package/dist/spec-files.d.ts +1 -1
  66. package/dist/spec-files.js +1 -1
  67. package/dist/symbol-font-encodings.d.ts +128 -0
  68. package/dist/symbol-font-encodings.js +1 -0
  69. package/dist/types.d.ts +4 -4
  70. package/dist/validator-DfG9yxba.d.ts +172 -0
  71. package/dist/validator.d.ts +4 -36
  72. package/dist/validator.js +5 -4
  73. package/package.json +32 -3
  74. package/dist/chunk-FDCWQHWO.js +0 -1366
@@ -278,25 +278,12 @@ type Asset = (string | {
278
278
  format?: string;
279
279
  });
280
280
  /**
281
- * A single named variable. A hex string is shorthand for { "type": "color", "value": value }.
281
+ * A single named variable: a hex string (shorthand for a color variable) or an object whose 'type' is color, text, number, date, image, url or list. 'value' is the current value and is optional: a variable with no value is unfilled, which a template allows and a normal deck does not. 'example' only illustrates the slot (fill forms, template previews) and never reaches output.
282
282
  *
283
283
  * This interface was referenced by `Presentation`'s JSON-Schema
284
284
  * via the `definition` "Variable".
285
285
  */
286
- type Variable = (HexColor | {
287
- /**
288
- * Variable kind. Only 'color' is defined today; other kinds may be added when content surfaces exist to consume them.
289
- */
290
- type: "color";
291
- /**
292
- * Hex color shorthand accepted by selected string fields.
293
- */
294
- value: string;
295
- /**
296
- * Optional prose describing what the variable is for, surfaced by pickers and agents.
297
- */
298
- description?: string;
299
- });
286
+ type Variable = (HexColor | ColorVariable | TextVariable | NumberVariable | DateVariable | ImageVariable | UrlVariable | ListVariable);
300
287
  /**
301
288
  * A contiguous run of text. Strings cover unformatted spans; object form adds character formatting.
302
289
  *
@@ -348,6 +335,14 @@ type TextRun = (string | {
348
335
  * Whether the run is rendered as subscript.
349
336
  */
350
337
  subscript?: boolean;
338
+ /**
339
+ * One or more ids from the top-level references list that this run cites. Engines draw a superscript marker ('1', or '1,2' for several ids) directly after the run and list '<n> <reference text>' in the slide's footnote area; markers are numbered per deck in order of first use, and the same id keeps its number. An id missing from references is a validation error (cite-unknown-reference). Supported in text, bullets and list item runs.
340
+ */
341
+ cite?: (string | [string, ...(string)[]]);
342
+ /**
343
+ * An inline note for this run, without a references entry. Engines draw a superscript marker after the run and list the note in the slide's footnote area; every footnote takes a new number in the deck's marker sequence. Supported in text, bullets and list item runs.
344
+ */
345
+ footnote?: (string | [TextRun, ...(TextRun)[]]);
351
346
  [k: string]: unknown;
352
347
  });
353
348
  /**
@@ -369,6 +364,10 @@ type ListItem = (string | TextRun[] | {
369
364
  * Zero-based nesting level for the list item.
370
365
  */
371
366
  level?: number;
367
+ /**
368
+ * Restart the list's numbering at this number for this item (counted at its level); the entries after it continue from it. Only meaningful when the payload has `numbering`. Paginated continuation pages use it to keep the numbers of the whole list.
369
+ */
370
+ start?: number;
372
371
  });
373
372
  /**
374
373
  * A flat bullet item. Strings cover the common case, TextRun[] supports inline rich text without an object wrapper, and object form adds nesting depth without list-item descriptions.
@@ -385,7 +384,18 @@ type BulletItem = (string | TextRun[] | {
385
384
  * Zero-based nesting level for the bullet.
386
385
  */
387
386
  level?: number;
387
+ /**
388
+ * Restart the list's numbering at this number for this bullet (counted at its level); the entries after it continue from it. Only meaningful when the payload has `numbering`. Paginated continuation pages use it to keep the numbers of the whole list.
389
+ */
390
+ start?: number;
388
391
  });
392
+ /**
393
+ * A list number style: 1, 2, 3; I, II, III; i, ii, iii; A, B, C; a, b, c. Alphabetic numbering past 26 repeats the letter as PowerPoint does (aa, bb, cc). Roman numerals stop at 3999; larger values are drawn in arabic with a numbering-adapted diagnostic.
394
+ *
395
+ * This interface was referenced by `Presentation`'s JSON-Schema
396
+ * via the `definition` "NumberingStyle".
397
+ */
398
+ type NumberingStyle = ("arabic" | "roman-upper" | "roman-lower" | "alpha-upper" | "alpha-lower");
389
399
  /**
390
400
  * A cell in inline chart data.
391
401
  *
@@ -440,6 +450,10 @@ type ContentPayload = {
440
450
  * Text-style bullet payload. Presence of this field infers type 'text'.
441
451
  */
442
452
  bullets?: BulletItem[];
453
+ /**
454
+ * Number the payload's `items` or `bullets` instead of bulleting them. A style name (arabic, roman-upper, roman-lower, alpha-upper, alpha-lower) or a Numbering object applies to every list level; an array gives one entry per level (index = level, the last entry repeats for deeper levels). Counting follows PowerPoint: consecutive entries of one level count up from its start, and an entry of a shallower level restarts the deeper levels. Absent = bullets. Valid only with `items` or `bullets`. Native PowerPoint export writes a:buAutoNum with the matching scheme and startAt; the preview draws the same numbers at the same marker geometry.
455
+ */
456
+ numbering?: (NumberingStyle | Numbering | [(NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)]);
443
457
  /**
444
458
  * Reusable or inline resource. A string is shorthand for { "src": value }. Source strings accept 'asset:<id>' references, HTTPS URLs, data URIs, relative paths resolved against the OPF file location, or local filesystem paths. Use object form when metadata such as alt text, title, mediaType, or format matters.
445
459
  */
@@ -531,6 +545,23 @@ type ContentPayload = {
531
545
  */
532
546
  events: [TimelineEvent, ...(TimelineEvent)[]];
533
547
  });
548
+ /**
549
+ * Caption for an image, chart, table or video payload, composed inside the block's region (below the media by default). Invalid on other payload kinds and on groups.
550
+ */
551
+ caption?: (string | TextRun[] | {
552
+ /**
553
+ * Caption text: a string or TextRun[] for inline rich text.
554
+ */
555
+ text: (string | TextRun[]);
556
+ /**
557
+ * Where the caption band sits inside the block's region: below the media (default) or above it. Core composition reserves the band and shrinks the media by its height.
558
+ */
559
+ position?: ("below" | "above");
560
+ /**
561
+ * Horizontal alignment of the caption text within the block. Defaults to left.
562
+ */
563
+ align?: ("left" | "center" | "right");
564
+ });
534
565
  /**
535
566
  * Ordered children of a group. Each child is a leaf or another group.
536
567
  *
@@ -587,7 +618,7 @@ interface Presentation {
587
618
  author?: (string | [string, ...(string)[]]);
588
619
  /**
589
620
  * Intended audiences for the presentation. Accepts either:
590
- * - A single string shorthand: free-form description ('Series B investors'), an audiences catalog id ('executives'), an HTTPS URL, or a 'pkg:' reference.
621
+ * - A single string shorthand: free-form description ('Series B investors'), an audiences catalog id ('executive'), an HTTPS URL, or a 'pkg:' reference.
591
622
  * - An array of string shorthands and/or inline Audience objects for custom audience metadata or catalog-backed overrides. Object form mirrors https://openpresentation.org/schema/opf-audience/v1 without '$schema'.
592
623
  *
593
624
  * Resolution order for catalog ids and references: inline catalogs.audiences.records[] → catalogs.audiences.source → default catalog at https://www.pptx.gallery/audiences.
@@ -631,6 +662,10 @@ interface Presentation {
631
662
  tags?: string[];
632
663
  design?: Design;
633
664
  variables?: Variables;
665
+ /**
666
+ * Marks this document as a template: an incomplete OPF file. A template declares variables (top-level 'variables') and references them from content, and may leave required variables unfilled; validation then reports the unfilled variables instead of failing, and previews and exports use each variable's 'example'. Filling a template (resolveVariables, or 'opf fill') returns a normal deck with this marker removed. Absent or false: a normal deck, where an unfilled required variable is an error. See docs/templates-and-variables.md.
667
+ */
668
+ template?: boolean;
634
669
  /**
635
670
  * Structured storyline describing the deck's arc and beats. Resolves to the 'id' of a 'narratives' catalog record.
636
671
  *
@@ -649,6 +684,10 @@ interface Presentation {
649
684
  * @minItems 1
650
685
  */
651
686
  slides: [Slide, ...(Slide)[]];
687
+ /**
688
+ * Sources that text runs cite with 'cite'. Ids are unique. A cited reference is listed in the footnote area of every slide that cites it, with a marker number assigned per deck in order of first use; a reference no run cites is a lint warning (opf/unused-reference). referencesSlide() turns the cited references into an ordinary list slide.
689
+ */
690
+ references?: Reference[];
652
691
  assets?: Assets;
653
692
  catalogs?: Catalogs;
654
693
  /**
@@ -2059,11 +2098,293 @@ interface HeaderFooterItem2 {
2059
2098
  [k: string]: unknown;
2060
2099
  }
2061
2100
  /**
2062
- * Optional named color variables for values the deck uses in more than one place or wants to name for intent (e.g. a risk red, a brand highlight). Content color fields reference entries as 'var:<id>' strings. Variables complement the color scheme: scheme slots and roles stay the primary vocabulary; variables cover deck-specific named colors that have no scheme slot.
2101
+ * Optional named variables: deck colors referenced as 'var:<id>' (the original use), and typed content variables (text, number, date, image, url, list) referenced inline as '{{<id>}}' or whole as 'var:<id>'. Variables are what makes a deck a fillable template when combined with 'template': true. Color variables complement the color scheme: scheme slots and roles stay the primary vocabulary; variables cover deck-specific named colors that have no scheme slot.
2063
2102
  */
2064
2103
  interface Variables {
2065
2104
  [k: string]: Variable;
2066
2105
  }
2106
+ /**
2107
+ * A named color. Content color fields reference it as 'var:<id>'. Colors resolve at render time through the ordinary color-reference path, so a color variable keeps working as before.
2108
+ *
2109
+ * This interface was referenced by `Presentation`'s JSON-Schema
2110
+ * via the `definition` "ColorVariable".
2111
+ */
2112
+ interface ColorVariable {
2113
+ /**
2114
+ * Variable kind. One of color, text, number, date, image, url or list.
2115
+ */
2116
+ type: "color";
2117
+ /**
2118
+ * Hex color shorthand accepted by selected string fields.
2119
+ */
2120
+ value?: string;
2121
+ /**
2122
+ * Whether the variable must be filled. Defaults to true: a variable with no 'value' is unfilled, and an unfilled required variable is an error in a normal deck and expected in a template. Set false for an optional slot: an unfilled optional variable resolves to empty text (inline tokens) or the field that references it is omitted.
2123
+ */
2124
+ required?: boolean;
2125
+ /**
2126
+ * Optional short human label for forms and fill panels.
2127
+ */
2128
+ label?: string;
2129
+ /**
2130
+ * Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents.
2131
+ */
2132
+ description?: string;
2133
+ /**
2134
+ * Hex color shorthand accepted by selected string fields.
2135
+ */
2136
+ example?: string;
2137
+ }
2138
+ /**
2139
+ * Text content. Plain string or rich TextRun[]. Insert it inline as '{{<id>}}' inside any string (rich text is flattened to plain text there), or reference it whole as 'var:<id>' in a field that accepts string or TextRun[] (the rich runs are kept).
2140
+ *
2141
+ * This interface was referenced by `Presentation`'s JSON-Schema
2142
+ * via the `definition` "TextVariable".
2143
+ */
2144
+ interface TextVariable {
2145
+ /**
2146
+ * Variable kind. One of color, text, number, date, image, url or list.
2147
+ */
2148
+ type: "text";
2149
+ /**
2150
+ * Text this variable resolves to: a plain string, or TextRun[] for rich text.
2151
+ */
2152
+ value?: (string | TextRun[]);
2153
+ /**
2154
+ * Whether the variable must be filled. Defaults to true: a variable with no 'value' is unfilled, and an unfilled required variable is an error in a normal deck and expected in a template. Set false for an optional slot: an unfilled optional variable resolves to empty text (inline tokens) or the field that references it is omitted.
2155
+ */
2156
+ required?: boolean;
2157
+ /**
2158
+ * Optional short human label for forms and fill panels.
2159
+ */
2160
+ label?: string;
2161
+ /**
2162
+ * Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents.
2163
+ */
2164
+ description?: string;
2165
+ /**
2166
+ * Illustrative text shown in fill forms and used when a template is previewed with examples. Never written to output.
2167
+ */
2168
+ example?: (string | TextRun[]);
2169
+ }
2170
+ /**
2171
+ * A number. '{{<id>}}' inserts it as text using 'format'; 'var:<id>' as a whole field supplies the number itself (chart values, font sizes).
2172
+ *
2173
+ * This interface was referenced by `Presentation`'s JSON-Schema
2174
+ * via the `definition` "NumberVariable".
2175
+ */
2176
+ interface NumberVariable {
2177
+ /**
2178
+ * Variable kind. One of color, text, number, date, image, url or list.
2179
+ */
2180
+ type: "number";
2181
+ /**
2182
+ * Number this variable resolves to.
2183
+ */
2184
+ value?: number;
2185
+ /**
2186
+ * Whether the variable must be filled. Defaults to true: a variable with no 'value' is unfilled, and an unfilled required variable is an error in a normal deck and expected in a template. Set false for an optional slot: an unfilled optional variable resolves to empty text (inline tokens) or the field that references it is omitted.
2187
+ */
2188
+ required?: boolean;
2189
+ /**
2190
+ * Optional short human label for forms and fill panels.
2191
+ */
2192
+ label?: string;
2193
+ /**
2194
+ * Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents.
2195
+ */
2196
+ description?: string;
2197
+ /**
2198
+ * Illustrative number shown in fill forms and used when a template is previewed with examples. Never written to output.
2199
+ */
2200
+ example?: number;
2201
+ /**
2202
+ * Display pattern used by '{{<id>}}'. A literal prefix, a numeric part of '#', '0', ',' and '.', and a literal suffix. '0' pads digits, '#' is optional, ',' groups thousands, digits after '.' fix the decimals ('0' required, '#' optional), and a '%' in the suffix scales by 100. English separators only. Absent: the shortest decimal form.
2203
+ */
2204
+ format?: string;
2205
+ }
2206
+ /**
2207
+ * A calendar date as an ISO YYYY-MM-DD string. No time zone and no clock are involved. '{{<id>}}' inserts it formatted with 'format'.
2208
+ *
2209
+ * This interface was referenced by `Presentation`'s JSON-Schema
2210
+ * via the `definition` "DateVariable".
2211
+ */
2212
+ interface DateVariable {
2213
+ /**
2214
+ * Variable kind. One of color, text, number, date, image, url or list.
2215
+ */
2216
+ type: "date";
2217
+ /**
2218
+ * ISO calendar date (YYYY-MM-DD) this variable resolves to.
2219
+ */
2220
+ value?: string;
2221
+ /**
2222
+ * Whether the variable must be filled. Defaults to true: a variable with no 'value' is unfilled, and an unfilled required variable is an error in a normal deck and expected in a template. Set false for an optional slot: an unfilled optional variable resolves to empty text (inline tokens) or the field that references it is omitted.
2223
+ */
2224
+ required?: boolean;
2225
+ /**
2226
+ * Optional short human label for forms and fill panels.
2227
+ */
2228
+ label?: string;
2229
+ /**
2230
+ * Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents.
2231
+ */
2232
+ description?: string;
2233
+ /**
2234
+ * Illustrative ISO date shown in fill forms and used when a template is previewed with examples. Never written to output.
2235
+ */
2236
+ example?: string;
2237
+ /**
2238
+ * Date display pattern, the same LDML-style tokens as header/footer dateFormat: yyyy, yy, MMMM, MMM, MM, M, dd, d, EEEE, EEE and quoted literals. English names. Default 'MMMM d, yyyy'.
2239
+ */
2240
+ format?: string;
2241
+ }
2242
+ /**
2243
+ * An image source: any Asset (an 'asset:<id>' reference, HTTPS URL, data URI, relative or local path, or an object with src, alt and metadata). Reference it whole as 'var:<id>' in an image, asset or src field; '{{<id>}}' inserts the source string.
2244
+ *
2245
+ * This interface was referenced by `Presentation`'s JSON-Schema
2246
+ * via the `definition` "ImageVariable".
2247
+ */
2248
+ interface ImageVariable {
2249
+ /**
2250
+ * Variable kind. One of color, text, number, date, image, url or list.
2251
+ */
2252
+ type: "image";
2253
+ /**
2254
+ * Reusable or inline resource. A string is shorthand for { "src": value }. Source strings accept 'asset:<id>' references, HTTPS URLs, data URIs, relative paths resolved against the OPF file location, or local filesystem paths. Use object form when metadata such as alt text, title, mediaType, or format matters.
2255
+ */
2256
+ value?: (string | {
2257
+ /**
2258
+ * Resource source. Accepts an 'asset:<id>' reference, HTTPS URL, data URI, relative path resolved against the OPF file location, or local filesystem path.
2259
+ */
2260
+ src: string;
2261
+ /**
2262
+ * Alternative text for images and other visual assets.
2263
+ */
2264
+ alt?: string;
2265
+ /**
2266
+ * Human-readable asset title for editors and asset pickers.
2267
+ */
2268
+ title?: string;
2269
+ /**
2270
+ * Optional notes about the asset's contents, provenance, or intended use.
2271
+ */
2272
+ description?: string;
2273
+ /**
2274
+ * Optional MIME media type when it cannot be inferred from src.
2275
+ */
2276
+ mediaType?: string;
2277
+ /**
2278
+ * Optional authoring/parsing format hint. Useful when format is more convenient than a full MIME media type.
2279
+ */
2280
+ format?: string;
2281
+ });
2282
+ /**
2283
+ * Whether the variable must be filled. Defaults to true: a variable with no 'value' is unfilled, and an unfilled required variable is an error in a normal deck and expected in a template. Set false for an optional slot: an unfilled optional variable resolves to empty text (inline tokens) or the field that references it is omitted.
2284
+ */
2285
+ required?: boolean;
2286
+ /**
2287
+ * Optional short human label for forms and fill panels.
2288
+ */
2289
+ label?: string;
2290
+ /**
2291
+ * Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents.
2292
+ */
2293
+ description?: string;
2294
+ /**
2295
+ * Reusable or inline resource. A string is shorthand for { "src": value }. Source strings accept 'asset:<id>' references, HTTPS URLs, data URIs, relative paths resolved against the OPF file location, or local filesystem paths. Use object form when metadata such as alt text, title, mediaType, or format matters.
2296
+ */
2297
+ example?: (string | {
2298
+ /**
2299
+ * Resource source. Accepts an 'asset:<id>' reference, HTTPS URL, data URI, relative path resolved against the OPF file location, or local filesystem path.
2300
+ */
2301
+ src: string;
2302
+ /**
2303
+ * Alternative text for images and other visual assets.
2304
+ */
2305
+ alt?: string;
2306
+ /**
2307
+ * Human-readable asset title for editors and asset pickers.
2308
+ */
2309
+ title?: string;
2310
+ /**
2311
+ * Optional notes about the asset's contents, provenance, or intended use.
2312
+ */
2313
+ description?: string;
2314
+ /**
2315
+ * Optional MIME media type when it cannot be inferred from src.
2316
+ */
2317
+ mediaType?: string;
2318
+ /**
2319
+ * Optional authoring/parsing format hint. Useful when format is more convenient than a full MIME media type.
2320
+ */
2321
+ format?: string;
2322
+ });
2323
+ }
2324
+ /**
2325
+ * A link target (http, https, mailto or tel). Use it as '{{<id>}}' inside a link string or reference it whole as 'var:<id>' in a link field.
2326
+ *
2327
+ * This interface was referenced by `Presentation`'s JSON-Schema
2328
+ * via the `definition` "UrlVariable".
2329
+ */
2330
+ interface UrlVariable {
2331
+ /**
2332
+ * Variable kind. One of color, text, number, date, image, url or list.
2333
+ */
2334
+ type: "url";
2335
+ /**
2336
+ * Link target this variable resolves to.
2337
+ */
2338
+ value?: string;
2339
+ /**
2340
+ * Whether the variable must be filled. Defaults to true: a variable with no 'value' is unfilled, and an unfilled required variable is an error in a normal deck and expected in a template. Set false for an optional slot: an unfilled optional variable resolves to empty text (inline tokens) or the field that references it is omitted.
2341
+ */
2342
+ required?: boolean;
2343
+ /**
2344
+ * Optional short human label for forms and fill panels.
2345
+ */
2346
+ label?: string;
2347
+ /**
2348
+ * Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents.
2349
+ */
2350
+ description?: string;
2351
+ /**
2352
+ * Illustrative link shown in fill forms and used when a template is previewed with examples. Never written to output.
2353
+ */
2354
+ example?: string;
2355
+ }
2356
+ /**
2357
+ * A list of strings, for bullets and list items. A whole-string array element 'var:<id>' splices every entry into the array in place; a whole field 'var:<id>' becomes the array; '{{<id>}}' joins the entries with ', ' (or the separator after a pipe: '{{<id>|; }}').
2358
+ *
2359
+ * This interface was referenced by `Presentation`'s JSON-Schema
2360
+ * via the `definition` "ListVariable".
2361
+ */
2362
+ interface ListVariable {
2363
+ /**
2364
+ * Variable kind. One of color, text, number, date, image, url or list.
2365
+ */
2366
+ type: "list";
2367
+ /**
2368
+ * Entries this variable resolves to.
2369
+ */
2370
+ value?: string[];
2371
+ /**
2372
+ * Whether the variable must be filled. Defaults to true: a variable with no 'value' is unfilled, and an unfilled required variable is an error in a normal deck and expected in a template. Set false for an optional slot: an unfilled optional variable resolves to empty text (inline tokens) or the field that references it is omitted.
2373
+ */
2374
+ required?: boolean;
2375
+ /**
2376
+ * Optional short human label for forms and fill panels.
2377
+ */
2378
+ label?: string;
2379
+ /**
2380
+ * Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents.
2381
+ */
2382
+ description?: string;
2383
+ /**
2384
+ * Illustrative entries shown in fill forms and used when a template is previewed with examples. Never written to output.
2385
+ */
2386
+ example?: string[];
2387
+ }
2067
2388
  /**
2068
2389
  * Structured storyline used by AI to shape generated content. Mirrors the OPF Narrative Template record at https://openpresentation.org/schema/opf-narrative/v1 (sans '$schema'), so a library record and an inline narrative are interchangeable.
2069
2390
  *
@@ -2225,6 +2546,10 @@ interface Slide {
2225
2546
  * Full-slide text-style bullet payload. Presence of this field infers type 'text'.
2226
2547
  */
2227
2548
  bullets?: BulletItem[];
2549
+ /**
2550
+ * Number the full-slide `items` or `bullets` instead of bulleting them. A style name (arabic, roman-upper, roman-lower, alpha-upper, alpha-lower) or a Numbering object applies to every list level; an array gives one entry per level (index = level, the last entry repeats for deeper levels). Counting follows PowerPoint: consecutive entries of one level count up from its start, and an entry of a shallower level restarts the deeper levels. Absent = bullets. Valid only with `items` or `bullets`. Native PowerPoint export writes a:buAutoNum with the matching scheme and startAt; the preview draws the same numbers at the same marker geometry.
2551
+ */
2552
+ numbering?: (NumberingStyle | Numbering | [(NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)]);
2228
2553
  /**
2229
2554
  * Reusable or inline resource. A string is shorthand for { "src": value }. Source strings accept 'asset:<id>' references, HTTPS URLs, data URIs, relative paths resolved against the OPF file location, or local filesystem paths. Use object form when metadata such as alt text, title, mediaType, or format matters.
2230
2555
  */
@@ -2316,6 +2641,23 @@ interface Slide {
2316
2641
  */
2317
2642
  events: [TimelineEvent, ...(TimelineEvent)[]];
2318
2643
  });
2644
+ /**
2645
+ * Caption for the slide's root image, chart, table or video payload. Valid only when the slide root holds exactly one of those payloads.
2646
+ */
2647
+ caption?: (string | TextRun[] | {
2648
+ /**
2649
+ * Caption text: a string or TextRun[] for inline rich text.
2650
+ */
2651
+ text: (string | TextRun[]);
2652
+ /**
2653
+ * Where the caption band sits inside the block's region: below the media (default) or above it. Core composition reserves the band and shrinks the media by its height.
2654
+ */
2655
+ position?: ("below" | "above");
2656
+ /**
2657
+ * Horizontal alignment of the caption text within the block. Defaults to left.
2658
+ */
2659
+ align?: ("left" | "center" | "right");
2660
+ });
2319
2661
  /**
2320
2662
  * Layout-agnostic content blocks rendered together as a composed payload when exact placement is unspecified. At slide root, multiple content payload kinds with no explicit type, blocks, or regions are accepted as shorthand for equivalent blocks.
2321
2663
  */
@@ -2389,6 +2731,26 @@ interface Slide {
2389
2731
  [k: string]: unknown;
2390
2732
  };
2391
2733
  }
2734
+ /**
2735
+ * Numbering of one list level.
2736
+ *
2737
+ * This interface was referenced by `Presentation`'s JSON-Schema
2738
+ * via the `definition` "Numbering".
2739
+ */
2740
+ interface Numbering {
2741
+ /**
2742
+ * A list number style: 1, 2, 3; I, II, III; i, ii, iii; A, B, C; a, b, c. Alphabetic numbering past 26 repeats the letter as PowerPoint does (aa, bb, cc). Roman numerals stop at 3999; larger values are drawn in arabic with a numbering-adapted diagnostic.
2743
+ */
2744
+ style?: ("arabic" | "roman-upper" | "roman-lower" | "alpha-upper" | "alpha-lower");
2745
+ /**
2746
+ * First number counted at this level. Default 1. Native PowerPoint accepts 1 to 32767.
2747
+ */
2748
+ start?: number;
2749
+ /**
2750
+ * Text after the number: period (1.), paren (1)) or paren-both ((1)). Default period.
2751
+ */
2752
+ suffix?: ("period" | "paren" | "paren-both");
2753
+ }
2392
2754
  /**
2393
2755
  * Full-slide chart payload. Presence of this field infers type 'chart'.
2394
2756
  */
@@ -2401,6 +2763,15 @@ interface Chart {
2401
2763
  * Chart data. Inline data uses a tabular columns/rows shape; renderers convert rows to chart series internally.
2402
2764
  */
2403
2765
  data: (ChartData | ChartDataSource);
2766
+ axisTitles?: ChartAxisTitles;
2767
+ /**
2768
+ * Optional legend position. 'none' hides the legend. Absent keeps today's behaviour exactly (a legend at the right of multi-series charts and of pie and doughnut charts, none for single-series charts). A named position shows the legend there even for a single-series chart. Of the Office 2016 constructs only box-and-whisker takes a legend; histogram, pareto, waterfall, funnel, treemap and map drop the option with a 'chart-option-adapted' diagnostic.
2769
+ */
2770
+ legend?: ("none" | "top" | "bottom" | "left" | "right");
2771
+ /**
2772
+ * Optional data labels. true shows value labels at each type's default position, false (or absent) shows none, which is today's behaviour. Use the object form for the label content, position and separator.
2773
+ */
2774
+ dataLabels?: (boolean | ChartDataLabels);
2404
2775
  }
2405
2776
  /**
2406
2777
  * Inline tabular data driving a chart. The first column usually supplies category/x-axis labels; subsequent columns are plotted measures unless a chart type or renderer maps them differently.
@@ -2446,6 +2817,41 @@ interface ChartDataSource {
2446
2817
  */
2447
2818
  columns?: string[];
2448
2819
  }
2820
+ /**
2821
+ * Optional axis titles. Absent keeps today's untitled axes. Supported on the chart types that have a category/value (or X/Y) axis pair (column, bar, line, area, scatter, and the histogram, pareto, waterfall and box-and-whisker constructs; the funnel construct takes a category title only); a title on a type without that axis (pie, doughnut, radar, treemap, map) is dropped with a 'chart-option-adapted' diagnostic by renderers and exporters.
2822
+ */
2823
+ interface ChartAxisTitles {
2824
+ /**
2825
+ * Title of the category (X) axis.
2826
+ */
2827
+ category?: string;
2828
+ /**
2829
+ * Title of the value (Y) axis.
2830
+ */
2831
+ value?: string;
2832
+ }
2833
+ /**
2834
+ * Data label settings. A label shows the selected content parts in the fixed order category, value, percent, joined by the separator.
2835
+ *
2836
+ * This interface was referenced by `Presentation`'s JSON-Schema
2837
+ * via the `definition` "ChartDataLabels".
2838
+ */
2839
+ interface ChartDataLabels {
2840
+ /**
2841
+ * Which parts a label shows. Defaults to ['value']. 'percent' is the share of the total and exists only on pie and doughnut charts; 'category' shows the category name (the X value on a scatter chart). A part a chart type cannot show is dropped with a 'chart-option-adapted' diagnostic.
2842
+ *
2843
+ * @minItems 1
2844
+ */
2845
+ content?: [("value" | "percent" | "category"), ...(("value" | "percent" | "category"))[]];
2846
+ /**
2847
+ * Where a label sits relative to its mark. 'auto' (the default) is the type's default: outside-end for clustered columns and bars, pie slices and the histogram, pareto and waterfall constructs; center for stacked columns and bars; above for line and scatter points. Clustered columns and bars and the histogram, pareto and waterfall constructs take center, inside-end, inside-base and outside-end; stacked columns and bars take center, inside-end and inside-base; pie takes center, inside-end and outside-end; line and scatter points take above, below, left, right and center. Area, doughnut and radar charts and the funnel and treemap constructs take only 'auto' (the box-and-whisker and map constructs have no data labels). An unsupported position falls back to 'auto' with a 'chart-option-adapted' diagnostic.
2848
+ */
2849
+ position?: ("auto" | "center" | "inside-end" | "inside-base" | "outside-end" | "above" | "below" | "left" | "right");
2850
+ /**
2851
+ * Text between the parts of a label that shows more than one. Defaults to ', '.
2852
+ */
2853
+ separator?: string;
2854
+ }
2449
2855
  /**
2450
2856
  * Full-slide table payload. Presence of this field infers type 'table'.
2451
2857
  */
@@ -2650,6 +3056,15 @@ interface Chart1 {
2650
3056
  * Chart data. Inline data uses a tabular columns/rows shape; renderers convert rows to chart series internally.
2651
3057
  */
2652
3058
  data: (ChartData | ChartDataSource);
3059
+ axisTitles?: ChartAxisTitles;
3060
+ /**
3061
+ * Optional legend position. 'none' hides the legend. Absent keeps today's behaviour exactly (a legend at the right of multi-series charts and of pie and doughnut charts, none for single-series charts). A named position shows the legend there even for a single-series chart. Of the Office 2016 constructs only box-and-whisker takes a legend; histogram, pareto, waterfall, funnel, treemap and map drop the option with a 'chart-option-adapted' diagnostic.
3062
+ */
3063
+ legend?: ("none" | "top" | "bottom" | "left" | "right");
3064
+ /**
3065
+ * Optional data labels. true shows value labels at each type's default position, false (or absent) shows none, which is today's behaviour. Use the object form for the label content, position and separator.
3066
+ */
3067
+ dataLabels?: (boolean | ChartDataLabels);
2653
3068
  }
2654
3069
  /**
2655
3070
  * Table payload. Presence of this field infers type 'table'.
@@ -2915,6 +3330,26 @@ interface Composition1 {
2915
3330
  */
2916
3331
  overflow?: ("warn" | "error");
2917
3332
  }
3333
+ /**
3334
+ * A source that runs cite with 'cite'. Cited references are listed in the footnote area of the slides that cite them, numbered per deck in order of first use; referencesSlide() builds an ordinary list slide of them.
3335
+ *
3336
+ * This interface was referenced by `Presentation`'s JSON-Schema
3337
+ * via the `definition` "Reference".
3338
+ */
3339
+ interface Reference {
3340
+ /**
3341
+ * Identifier runs cite. Unique within the references list.
3342
+ */
3343
+ id: string;
3344
+ /**
3345
+ * The reference as it is listed: a string or TextRun[] for inline rich text.
3346
+ */
3347
+ text: (string | TextRun[]);
3348
+ /**
3349
+ * Optional link for the reference; a references slide links its entry to it.
3350
+ */
3351
+ url?: string;
3352
+ }
2918
3353
  /**
2919
3354
  * Optional reusable asset registry for images, data files, videos, documents, fonts, and other resources referenced elsewhere in the deck via 'asset:<id>' strings.
2920
3355
  */