@openpresentation/opf 0.11.0 → 0.11.2

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 (240) hide show
  1. package/dist/{catalogs-atkOF4Vy.d.ts → catalogs-DJ-B5ZyD.d.ts} +78 -8
  2. package/dist/catalogs.d.ts +2 -2
  3. package/dist/catalogs.js +1 -1
  4. package/dist/{chunk-6FU2KICU.js → chunk-7LF37SG3.js} +7084 -5106
  5. package/dist/{chunk-FTWNWFIV.js → chunk-BVLWFMDX.js} +348 -36
  6. package/dist/{chunk-CHKJ4QHQ.js → chunk-DJRZMGKY.js} +113 -32
  7. package/dist/{chunk-EQHZ3ZO4.js → chunk-K7IWYODS.js} +3 -3
  8. package/dist/chunk-KZ6BT5UG.js +3591 -0
  9. package/dist/{chunk-GN52EE3P.js → chunk-LTSDDBNW.js} +425 -40
  10. package/dist/{chunk-RS5GZ5RW.js → chunk-SDETQV7Y.js} +161 -0
  11. package/dist/{chunk-FWA5XB45.js → chunk-SMYEM3HV.js} +45 -25
  12. package/dist/{composition-Tv9Wm3Oh.d.ts → composition-DzLwY-Mi.d.ts} +200 -4
  13. package/dist/composition.d.ts +1 -1
  14. package/dist/composition.js +1 -1
  15. package/dist/docs.js +50 -20
  16. package/dist/examples.d.ts +1 -1
  17. package/dist/examples.js +11 -11
  18. package/dist/font-policy.d.ts +127 -0
  19. package/dist/font-policy.js +1 -0
  20. package/dist/index.d.ts +129 -10
  21. package/dist/index.js +280 -12
  22. package/dist/lint.d.ts +3 -3
  23. package/dist/lint.js +5 -5
  24. package/dist/pagination.d.ts +5 -1
  25. package/dist/pagination.js +5 -5
  26. package/dist/{presentation-Ct42Mitb.d.ts → presentation-bceTClm8.d.ts} +246 -22
  27. package/dist/repo-readme.js +1 -1
  28. package/dist/{schemas-CiVmUT2p.d.ts → schemas-X_NniU4A.d.ts} +2 -0
  29. package/dist/schemas.d.ts +1 -1
  30. package/dist/schemas.js +1 -1
  31. package/dist/spec/catalogs/audiences/academic.json +24 -0
  32. package/dist/spec/catalogs/audiences/all-hands.json +3 -1
  33. package/dist/spec/catalogs/audiences/board.json +3 -1
  34. package/dist/spec/catalogs/audiences/customer.json +25 -0
  35. package/dist/spec/catalogs/audiences/executive.json +24 -0
  36. package/dist/spec/catalogs/audiences/general-public.json +25 -0
  37. package/dist/spec/catalogs/audiences/index.json +73 -1
  38. package/dist/spec/catalogs/audiences/internal-team.json +25 -0
  39. package/dist/spec/catalogs/audiences/investor.json +25 -0
  40. package/dist/spec/catalogs/audiences/marketing.json +25 -0
  41. package/dist/spec/catalogs/audiences/media.json +24 -0
  42. package/dist/spec/catalogs/audiences/partner.json +25 -0
  43. package/dist/spec/catalogs/audiences/regulatory.json +25 -0
  44. package/dist/spec/catalogs/audiences/sales.json +25 -0
  45. package/dist/spec/catalogs/audiences/technical.json +25 -0
  46. package/dist/spec/catalogs/chart-types/100pct-bullet-bar-2x.json +5 -0
  47. package/dist/spec/catalogs/chart-types/100pct-bullet-bar-3x.json +5 -0
  48. package/dist/spec/catalogs/chart-types/100pct-bullet-bar.json +5 -0
  49. package/dist/spec/catalogs/chart-types/100pct-bullet-column-2x.json +5 -0
  50. package/dist/spec/catalogs/chart-types/100pct-bullet-column-3x.json +5 -0
  51. package/dist/spec/catalogs/chart-types/100pct-bullet-column.json +5 -0
  52. package/dist/spec/catalogs/chart-types/100pct-progress-bar.json +10 -0
  53. package/dist/spec/catalogs/chart-types/100pct-stacked-area-2x.json +10 -0
  54. package/dist/spec/catalogs/chart-types/100pct-stacked-area-3x.json +6 -1
  55. package/dist/spec/catalogs/chart-types/100pct-stacked-bar-2x.json +10 -0
  56. package/dist/spec/catalogs/chart-types/100pct-stacked-bar-3x.json +6 -1
  57. package/dist/spec/catalogs/chart-types/100pct-stacked-column-2x.json +10 -0
  58. package/dist/spec/catalogs/chart-types/100pct-stacked-column-3x.json +6 -1
  59. package/dist/spec/catalogs/chart-types/area.json +5 -0
  60. package/dist/spec/catalogs/chart-types/australia.json +10 -0
  61. package/dist/spec/catalogs/chart-types/bar.json +5 -0
  62. package/dist/spec/catalogs/chart-types/box-and-whisker-2x.json +10 -0
  63. package/dist/spec/catalogs/chart-types/box-and-whisker-3x.json +10 -0
  64. package/dist/spec/catalogs/chart-types/box-and-whisker.json +5 -0
  65. package/dist/spec/catalogs/chart-types/bullet-bar-2x.json +5 -0
  66. package/dist/spec/catalogs/chart-types/bullet-bar-3x.json +5 -0
  67. package/dist/spec/catalogs/chart-types/bullet-bar.json +5 -0
  68. package/dist/spec/catalogs/chart-types/bullet-column-2x.json +5 -0
  69. package/dist/spec/catalogs/chart-types/bullet-column-3x.json +5 -0
  70. package/dist/spec/catalogs/chart-types/bullet-column.json +5 -0
  71. package/dist/spec/catalogs/chart-types/canada.json +10 -0
  72. package/dist/spec/catalogs/chart-types/clustered-bar-2x.json +10 -0
  73. package/dist/spec/catalogs/chart-types/clustered-column.json +10 -0
  74. package/dist/spec/catalogs/chart-types/column.json +5 -0
  75. package/dist/spec/catalogs/chart-types/dot-plot-2x.json +5 -0
  76. package/dist/spec/catalogs/chart-types/dot-plot-3x.json +5 -0
  77. package/dist/spec/catalogs/chart-types/dot-plot-4x.json +5 -0
  78. package/dist/spec/catalogs/chart-types/dot-plot-5x.json +5 -0
  79. package/dist/spec/catalogs/chart-types/dot-plot-6x.json +5 -0
  80. package/dist/spec/catalogs/chart-types/dot-plot.json +5 -0
  81. package/dist/spec/catalogs/chart-types/doughnut.json +5 -0
  82. package/dist/spec/catalogs/chart-types/dumbbell.json +5 -0
  83. package/dist/spec/catalogs/chart-types/filled-radar.json +5 -0
  84. package/dist/spec/catalogs/chart-types/funnel.json +5 -0
  85. package/dist/spec/catalogs/chart-types/histogram.json +5 -0
  86. package/dist/spec/catalogs/chart-types/index.json +333 -233
  87. package/dist/spec/catalogs/chart-types/line-2x.json +10 -0
  88. package/dist/spec/catalogs/chart-types/line-3x.json +10 -0
  89. package/dist/spec/catalogs/chart-types/line-with-high-low-and-markers.json +5 -0
  90. package/dist/spec/catalogs/chart-types/line-with-high-low.json +5 -0
  91. package/dist/spec/catalogs/chart-types/line-with-markers-2x.json +10 -0
  92. package/dist/spec/catalogs/chart-types/line-with-markers-3x.json +10 -0
  93. package/dist/spec/catalogs/chart-types/line-with-markers.json +5 -0
  94. package/dist/spec/catalogs/chart-types/line.json +5 -0
  95. package/dist/spec/catalogs/chart-types/pareto.json +9 -14
  96. package/dist/spec/catalogs/chart-types/pie.json +5 -0
  97. package/dist/spec/catalogs/chart-types/radar-with-markers.json +5 -0
  98. package/dist/spec/catalogs/chart-types/radar.json +5 -0
  99. package/dist/spec/catalogs/chart-types/scatter.json +5 -0
  100. package/dist/spec/catalogs/chart-types/sparkline-2x.json +5 -0
  101. package/dist/spec/catalogs/chart-types/sparkline-3x.json +5 -0
  102. package/dist/spec/catalogs/chart-types/sparkline-4x.json +5 -0
  103. package/dist/spec/catalogs/chart-types/sparkline-5x.json +5 -0
  104. package/dist/spec/catalogs/chart-types/sparkline-6x.json +5 -0
  105. package/dist/spec/catalogs/chart-types/sparkline.json +5 -0
  106. package/dist/spec/catalogs/chart-types/stacked-area-2x.json +10 -0
  107. package/dist/spec/catalogs/chart-types/stacked-area-3x.json +6 -1
  108. package/dist/spec/catalogs/chart-types/stacked-bar-2x.json +10 -0
  109. package/dist/spec/catalogs/chart-types/stacked-bar-3x.json +6 -1
  110. package/dist/spec/catalogs/chart-types/stacked-column-2x.json +10 -0
  111. package/dist/spec/catalogs/chart-types/stacked-column-3x.json +6 -1
  112. package/dist/spec/catalogs/chart-types/stacked-line-2x.json +10 -0
  113. package/dist/spec/catalogs/chart-types/stacked-line-3x.json +6 -1
  114. package/dist/spec/catalogs/chart-types/stacked-line-with-markers-2x.json +10 -0
  115. package/dist/spec/catalogs/chart-types/stacked-line-with-markers-3x.json +6 -1
  116. package/dist/spec/catalogs/chart-types/treemap-2x.json +10 -0
  117. package/dist/spec/catalogs/chart-types/treemap-3x.json +10 -0
  118. package/dist/spec/catalogs/chart-types/treemap.json +5 -0
  119. package/dist/spec/catalogs/chart-types/united-kingdom.json +10 -0
  120. package/dist/spec/catalogs/chart-types/united-states.json +10 -0
  121. package/dist/spec/catalogs/chart-types/waterfall.json +5 -0
  122. package/dist/spec/catalogs/chart-types/world.json +6 -1
  123. package/dist/spec/catalogs/font-schemes/consolas.json +3 -0
  124. package/dist/spec/catalogs/font-schemes/courier-new.json +3 -0
  125. package/dist/spec/catalogs/languages/afrikaans.json +3 -0
  126. package/dist/spec/catalogs/languages/albanian.json +3 -0
  127. package/dist/spec/catalogs/languages/amharic.json +3 -0
  128. package/dist/spec/catalogs/languages/arabic.json +3 -0
  129. package/dist/spec/catalogs/languages/armenian.json +3 -0
  130. package/dist/spec/catalogs/languages/aymara.json +3 -0
  131. package/dist/spec/catalogs/languages/azerbaijani.json +3 -0
  132. package/dist/spec/catalogs/languages/bengali.json +3 -0
  133. package/dist/spec/catalogs/languages/berber-latin.json +3 -0
  134. package/dist/spec/catalogs/languages/bosnian-latin.json +3 -0
  135. package/dist/spec/catalogs/languages/bulgarian.json +3 -0
  136. package/dist/spec/catalogs/languages/catalan.json +3 -0
  137. package/dist/spec/catalogs/languages/cebuano.json +3 -0
  138. package/dist/spec/catalogs/languages/chinese-simplified.json +3 -0
  139. package/dist/spec/catalogs/languages/chinese-traditional.json +3 -0
  140. package/dist/spec/catalogs/languages/chittagonian.json +3 -0
  141. package/dist/spec/catalogs/languages/croatian.json +3 -0
  142. package/dist/spec/catalogs/languages/czech.json +3 -0
  143. package/dist/spec/catalogs/languages/danish.json +3 -0
  144. package/dist/spec/catalogs/languages/dutch.json +3 -0
  145. package/dist/spec/catalogs/languages/english-au.json +3 -0
  146. package/dist/spec/catalogs/languages/english-ca.json +3 -0
  147. package/dist/spec/catalogs/languages/english-gb.json +3 -0
  148. package/dist/spec/catalogs/languages/english-in.json +3 -0
  149. package/dist/spec/catalogs/languages/english-us.json +3 -0
  150. package/dist/spec/catalogs/languages/english.json +3 -0
  151. package/dist/spec/catalogs/languages/estonian.json +3 -0
  152. package/dist/spec/catalogs/languages/filipino.json +3 -0
  153. package/dist/spec/catalogs/languages/finnish.json +3 -0
  154. package/dist/spec/catalogs/languages/french.json +3 -0
  155. package/dist/spec/catalogs/languages/fulfulde.json +3 -0
  156. package/dist/spec/catalogs/languages/galician.json +3 -0
  157. package/dist/spec/catalogs/languages/georgian.json +3 -0
  158. package/dist/spec/catalogs/languages/german.json +3 -0
  159. package/dist/spec/catalogs/languages/greek.json +3 -0
  160. package/dist/spec/catalogs/languages/gujarati.json +3 -0
  161. package/dist/spec/catalogs/languages/hausa.json +3 -0
  162. package/dist/spec/catalogs/languages/hebrew.json +3 -0
  163. package/dist/spec/catalogs/languages/hindi.json +3 -0
  164. package/dist/spec/catalogs/languages/hungarian.json +3 -0
  165. package/dist/spec/catalogs/languages/igbo.json +3 -0
  166. package/dist/spec/catalogs/languages/indonesian.json +3 -0
  167. package/dist/spec/catalogs/languages/italian.json +3 -0
  168. package/dist/spec/catalogs/languages/japanese.json +3 -0
  169. package/dist/spec/catalogs/languages/kannada.json +3 -0
  170. package/dist/spec/catalogs/languages/kazakh.json +3 -0
  171. package/dist/spec/catalogs/languages/khmer.json +3 -0
  172. package/dist/spec/catalogs/languages/kinyarwanda.json +3 -0
  173. package/dist/spec/catalogs/languages/korean.json +3 -0
  174. package/dist/spec/catalogs/languages/kurmanji.json +3 -0
  175. package/dist/spec/catalogs/languages/latvian.json +3 -0
  176. package/dist/spec/catalogs/languages/lithuanian.json +3 -0
  177. package/dist/spec/catalogs/languages/macedonian.json +3 -0
  178. package/dist/spec/catalogs/languages/malagasy.json +3 -0
  179. package/dist/spec/catalogs/languages/malay.json +3 -0
  180. package/dist/spec/catalogs/languages/malayalam.json +3 -0
  181. package/dist/spec/catalogs/languages/maori.json +3 -0
  182. package/dist/spec/catalogs/languages/marathi.json +3 -0
  183. package/dist/spec/catalogs/languages/mongolian.json +3 -0
  184. package/dist/spec/catalogs/languages/nepali.json +3 -0
  185. package/dist/spec/catalogs/languages/norwegian.json +3 -0
  186. package/dist/spec/catalogs/languages/odia.json +3 -0
  187. package/dist/spec/catalogs/languages/oromo.json +3 -0
  188. package/dist/spec/catalogs/languages/pashto.json +3 -0
  189. package/dist/spec/catalogs/languages/persian.json +3 -0
  190. package/dist/spec/catalogs/languages/polish.json +3 -0
  191. package/dist/spec/catalogs/languages/portuguese.json +3 -0
  192. package/dist/spec/catalogs/languages/punjabi-gurmukhi.json +3 -0
  193. package/dist/spec/catalogs/languages/punjabi-shahmukhi.json +3 -0
  194. package/dist/spec/catalogs/languages/romanian.json +3 -0
  195. package/dist/spec/catalogs/languages/russian.json +3 -0
  196. package/dist/spec/catalogs/languages/serbian-cyrillic.json +3 -0
  197. package/dist/spec/catalogs/languages/serbian-latin.json +3 -0
  198. package/dist/spec/catalogs/languages/shona.json +3 -0
  199. package/dist/spec/catalogs/languages/slovak.json +3 -0
  200. package/dist/spec/catalogs/languages/slovenian.json +3 -0
  201. package/dist/spec/catalogs/languages/somali.json +3 -0
  202. package/dist/spec/catalogs/languages/spanish.json +3 -0
  203. package/dist/spec/catalogs/languages/swahili.json +3 -0
  204. package/dist/spec/catalogs/languages/swedish.json +3 -0
  205. package/dist/spec/catalogs/languages/tagalog.json +3 -0
  206. package/dist/spec/catalogs/languages/tajik.json +3 -0
  207. package/dist/spec/catalogs/languages/tamil.json +3 -0
  208. package/dist/spec/catalogs/languages/telugu.json +3 -0
  209. package/dist/spec/catalogs/languages/thai.json +3 -0
  210. package/dist/spec/catalogs/languages/turkish.json +3 -0
  211. package/dist/spec/catalogs/languages/ukrainian.json +3 -0
  212. package/dist/spec/catalogs/languages/urdu.json +3 -0
  213. package/dist/spec/catalogs/languages/uzbek-latin.json +3 -0
  214. package/dist/spec/catalogs/languages/vietnamese-quoc-ngu.json +3 -0
  215. package/dist/spec/catalogs/languages/xhosa.json +3 -0
  216. package/dist/spec/catalogs/languages/yoruba.json +3 -0
  217. package/dist/spec/catalogs/languages/zulu.json +3 -0
  218. package/dist/spec/catalogs/narratives/change-story.json +64 -0
  219. package/dist/spec/catalogs/narratives/data-story.json +66 -0
  220. package/dist/spec/catalogs/narratives/heros-journey.json +64 -0
  221. package/dist/spec/catalogs/narratives/index.json +81 -0
  222. package/dist/spec/catalogs/narratives/pyramid-principle.json +48 -0
  223. package/dist/spec/catalogs/narratives/situation-complication-resolution.json +56 -0
  224. package/dist/spec/catalogs/narratives/sparkline.json +56 -0
  225. package/dist/spec/catalogs/narratives/star-method.json +56 -0
  226. package/dist/spec/catalogs/narratives/vision-roadmap.json +65 -0
  227. package/dist/spec/catalogs/narratives/what-so-what-now-what.json +48 -0
  228. package/dist/spec/reference/engine-defaults.json +2 -2
  229. package/dist/spec/reference/font-policy.json +3510 -0
  230. package/dist/spec/reference/font-policy.schema.json +338 -0
  231. package/dist/spec/schemas/chart-type.schema.json +51 -11
  232. package/dist/spec/schemas/font-scheme.schema.json +91 -1
  233. package/dist/spec/schemas/language.schema.json +10 -5
  234. package/dist/spec/schemas/opf.schema.json +158 -20
  235. package/dist/spec-files.d.ts +1 -1
  236. package/dist/spec-files.js +1 -1
  237. package/dist/types.d.ts +3 -3
  238. package/dist/validator.d.ts +3 -3
  239. package/dist/validator.js +4 -4
  240. package/package.json +6 -2
@@ -41,6 +41,36 @@ declare function tableGrid(value: unknown, path?: string): TableGrid;
41
41
  /** Row boundaries that preserve every vertical merge, used by pagination. */
42
42
  declare function tableRowBoundaries(value: unknown): number[];
43
43
 
44
+ /**
45
+ * Deterministic header/footer field formatting. Nothing here consults a clock,
46
+ * the host locale or the host time zone: dates are calendar dates supplied by the
47
+ * document or the host, and month/weekday names are fixed English names.
48
+ */
49
+ /** A live field inside displayed furniture text, as half-open UTF-16 offsets into the part's `text`. */
50
+ interface FurnitureField {
51
+ type: 'slideNumber' | 'date';
52
+ start: number;
53
+ end: number;
54
+ /** Resolved date pattern for a current (`date: true`) date. */
55
+ format?: string;
56
+ }
57
+ /** PowerPoint's first Insert > Date and Time choice for en-US (`datetime1`). */
58
+ declare const DEFAULT_FURNITURE_DATE_FORMAT = "M/d/yyyy";
59
+ declare const DEFAULT_SLIDE_NUMBER_FORMAT = "{current}";
60
+ /** Format an ISO calendar date with an LDML-style pattern. Returns an error message when either input is unsupported. */
61
+ declare function formatFurnitureDate(iso: string, pattern: string): {
62
+ text: string;
63
+ } | {
64
+ error: string;
65
+ };
66
+ /** Resolve a slide-number template. `{current}` becomes a live field; `{total}` is fixed text. */
67
+ declare function formatSlideNumber(format: string, current: number, total: number | undefined): {
68
+ text: string;
69
+ fields: FurnitureField[];
70
+ } | {
71
+ error: string;
72
+ };
73
+
44
74
  /** Normalize a literal hex color to uppercase #RRGGBB. */
45
75
  declare function normalizeHexColor(value: unknown): string | undefined;
46
76
  type ResolveColorRefRoles = Partial<Record<'primary' | 'secondary' | 'accent' | 'background' | 'surface' | 'text' | 'textSecondary', string>>;
@@ -88,7 +118,7 @@ interface LayoutBox {
88
118
  height: number;
89
119
  }
90
120
  interface LayoutDiagnostic {
91
- code: "text-overflow" | "small-cell" | "unresolved-content";
121
+ code: "text-overflow" | "small-cell" | "unresolved-content" | "unsupported-image-treatment";
92
122
  path: string;
93
123
  message: string;
94
124
  }
@@ -110,6 +140,36 @@ interface FontFamilies {
110
140
  body: string;
111
141
  code: string;
112
142
  }
143
+ /** Shared last-resort font-scheme id when neither the slide, the deck nor the resolved theme names one.
144
+ * One default for every engine, so preview matches export (font-fidelity-everywhere owner decision). */
145
+ declare const DEFAULT_FONT_SCHEME = "aptos";
146
+ /** Reported when a font-scheme id matches no inline or bundled record. Every engine then uses the
147
+ * DEFAULT_FONT_SCHEME record as the base, with any sibling overrides on top. */
148
+ interface FontSchemeDiagnostic {
149
+ code: "unresolved-font-scheme";
150
+ /** Where the unresolved id is written: `slides.N.design.fontScheme`, `design.fontScheme`, or the
151
+ * `design.theme` reference whose record names it. */
152
+ path: string;
153
+ message: string;
154
+ /** The unresolved font-scheme id. */
155
+ id: string;
156
+ /** The font scheme used instead (DEFAULT_FONT_SCHEME). */
157
+ fallback: string;
158
+ }
159
+ interface ResolvedFontScheme {
160
+ scheme: Record<string, unknown>;
161
+ diagnostic?: FontSchemeDiagnostic;
162
+ }
163
+ /** Resolve a font-scheme reference the same way in every engine. A string id, or the `id` of an object
164
+ * reference, resolves through `lookup` (inline records, then bundled or host catalogs). An unresolved id
165
+ * returns a diagnostic, and the DEFAULT_FONT_SCHEME record becomes the base, so preview and export use
166
+ * the same families. An object without `id` is an inline scheme on the same base. Sibling fields on an
167
+ * object reference override the base per key. */
168
+ declare function resolveFontSchemeReference(reference: unknown, lookup: (id: string) => unknown, path?: string): ResolvedFontScheme;
169
+ /** Resolve role families from an already-merged font scheme (catalog record plus design overrides).
170
+ * A scheme that names no heading or body family gets the DEFAULT_FONT_SCHEME families (Aptos Display, Aptos).
171
+ * `code` comes from the scheme's `code` role, which catalog records such as consolas and courier-new
172
+ * carry; otherwise it is Roboto Mono. Heading and body families are never reused for code. */
113
173
  declare function resolveFontFamilies(input: unknown): FontFamilies;
114
174
  interface TextMeasurement {
115
175
  measure: (text: string, fontSize: number, style: TextStyle) => number;
@@ -177,6 +237,69 @@ interface ComposedItem {
177
237
  timelineLayout?: TimelineLayout;
178
238
  /** Effective container settings, including inherited readability constraints. */
179
239
  composition: Composition;
240
+ /**
241
+ * Resolved horizontal text alignment for this item: titleAlignment for the
242
+ * title, contentAlignment for every other item (slide design, then host
243
+ * option, then left). Engines anchor native and preview text to this value.
244
+ */
245
+ alignment: 'left' | 'center' | 'right';
246
+ }
247
+ /**
248
+ * Slide-level image resolved from design.slideImage. It is active when the slide sets its own
249
+ * design.slideImage, or when the deck sets one and either the slide's layout record declares
250
+ * slideImage: true or the slide's root image is the same source.
251
+ * Content composes in the part of the slide the image does not occupy; 'background' leaves the whole slide.
252
+ */
253
+ interface ComposedSlideImage {
254
+ /** The design value that configured the image: 'design.slideImage' or 'slides.N.design.slideImage'. */
255
+ path: string;
256
+ /** Path of the drawn asset value: the design value, or the slide's root image payload it replaced. */
257
+ sourcePath: string;
258
+ /** Asset value (string or Asset object) that engines resolve like any other image. */
259
+ value: unknown;
260
+ position: 'background' | 'top' | 'bottom' | 'left' | 'right';
261
+ /** crop covers the frame (centered); fit shows the whole image centered inside it. */
262
+ fill: 'crop' | 'fit';
263
+ /** Band allocated to the image. */
264
+ region: LayoutBox;
265
+ /** Image frame inside the region. */
266
+ box: LayoutBox;
267
+ /** True when the slide's root image payload became this slide image instead of a content item. */
268
+ replacesContent: boolean;
269
+ /** Treatment alt text; engines fall back to the asset's own alt text. */
270
+ alt?: string;
271
+ /** Mask on the frame: a DrawingML preset with its guide values, and the same outline as an SVG path. */
272
+ shape: SlideImageShape;
273
+ /** Line centered on the shape outline; width in reference pixels (already scaled to the canvas). */
274
+ border?: {
275
+ color: unknown;
276
+ width: number;
277
+ };
278
+ /** Image opacity below 1; the border and overlay are not affected. */
279
+ opacity?: number;
280
+ /** Luminance-based recolor (Rec. 601 weights on sRGB values). */
281
+ recolor?: {
282
+ type: 'grayscale';
283
+ } | {
284
+ type: 'duotone';
285
+ dark: unknown;
286
+ light: unknown;
287
+ };
288
+ /** Scrim over the frame (same shape) or over an edge band of a rectangle frame. */
289
+ overlay?: {
290
+ color: unknown;
291
+ opacity: number;
292
+ box: LayoutBox;
293
+ shape: SlideImageShape;
294
+ };
295
+ }
296
+ /** A frame mask. path follows the ECMA-376 preset formula for preset/adjust exactly, in reference pixels. */
297
+ interface SlideImageShape {
298
+ kind: 'rectangle' | 'rounded' | 'circle' | 'hexagon';
299
+ preset: 'rect' | 'roundRect' | 'ellipse' | 'hexagon';
300
+ /** DrawingML avLst guide values (for example adj and vf), in 1/100000 units. */
301
+ adjust: Record<string, number>;
302
+ path: string;
180
303
  }
181
304
  interface ComposedGroup {
182
305
  path: string;
@@ -245,19 +368,39 @@ interface SlideComposition {
245
368
  composition: Composition;
246
369
  /** Repeated furniture is measured separately from body pagination leaves. */
247
370
  furniture?: FurnitureLayout;
371
+ /** Active slide-level image; absent when design.slideImage does not apply to this slide. */
372
+ slideImage?: ComposedSlideImage;
248
373
  explanation?: CompositionExplanation;
249
374
  }
250
375
  interface ComposeSlideOptions {
251
- /** Context for inherited furniture and generated organization names. */
376
+ /** Context for inherited furniture, generated organization names and social profiles. */
252
377
  presentation?: {
253
378
  design?: {
254
379
  header?: unknown;
255
380
  footer?: unknown;
381
+ slideImage?: unknown;
382
+ imageFill?: unknown;
256
383
  };
257
384
  organization?: unknown;
385
+ slides?: unknown;
386
+ catalogs?: unknown;
258
387
  };
388
+ /**
389
+ * Host-resolved social-platform records for generated `socials` furniture.
390
+ * Inline `presentation.catalogs.socialPlatforms.records` take precedence. Hosts
391
+ * normally pass the bundled catalog; without a matching record a handle renders
392
+ * as its raw value, as the Socials contract specifies.
393
+ */
394
+ socialPlatforms?: readonly SocialPlatformRecord[];
259
395
  /** One-based displayed number; source paths still use slideIndex. */
260
396
  slideNumber?: number;
397
+ /** Displayed slide count for `{total}` in slideNumberFormat. Defaults to `presentation.slides.length`. */
398
+ slideCount?: number;
399
+ /**
400
+ * Host-supplied current calendar date (ISO YYYY-MM-DD) for `date: true` furniture. Core never
401
+ * consults a clock; without this option a current date is reported as unresolved content.
402
+ */
403
+ date?: string;
261
404
  fonts?: Partial<FontFamilies>;
262
405
  /** Host-resolved alignment for shared content; slide design can override it. */
263
406
  contentAlignment?: 'left' | 'center' | 'right';
@@ -280,10 +423,15 @@ declare class OPFCompositionError extends Error {
280
423
  readonly explanation?: CompositionExplanation;
281
424
  constructor(diagnostics: LayoutDiagnostic[], explanation?: CompositionExplanation);
282
425
  }
426
+ /**
427
+ * Outline of a DrawingML preset in a box, following the ECMA-376 presetShapeDefinitions formulas:
428
+ * roundRect (adj; ss = min(w,h), radius = ss*adj/100000), ellipse, and hexagon (adj, vf).
429
+ */
430
+ declare function slideImageShape(kind: SlideImageShape['kind'], box: LayoutBox, cornerRadius?: number): SlideImageShape;
283
431
  interface FurniturePartBase {
284
432
  kind: 'header' | 'footer';
285
433
  zone: 'left' | 'center' | 'right';
286
- field: 'text' | 'image' | 'organization' | 'section' | 'slideNumber' | 'date';
434
+ field: 'text' | 'image' | 'organization' | 'socials' | 'section' | 'slideNumber' | 'date';
287
435
  /** Literal field or controlling flag, with the actual inherited/local path. */
288
436
  path: string;
289
437
  /** String/asset source, when different from a generated field's flag. */
@@ -299,7 +447,53 @@ interface FurnitureTextPart extends FurniturePartBase {
299
447
  requestedFontSize: number;
300
448
  minFontSize: number;
301
449
  fit: SourceTextFit;
450
+ /**
451
+ * Live values inside `text`: every `{current}` slide number, and a whole current
452
+ * (`date: true`) date. Hosts such as PPTX may emit them as native fields; all other
453
+ * text, including `{total}` and formatted fixed dates, is fixed.
454
+ */
455
+ fields?: FurnitureField[];
456
+ /**
457
+ * Generated `socials` only: one entry per explicit source line of `text`, in
458
+ * order. A part may carry both `fields` and `links`; hosts apply each link to
459
+ * its whole source line and each field range within it.
460
+ */
461
+ links?: FurnitureSocialLink[];
462
+ }
463
+ /** Optional generated metadata for one furniture text part (live fields and/or social links). */
464
+ interface FurnitureTextExtras {
465
+ fields?: FurnitureField[];
466
+ links?: FurnitureSocialLink[];
467
+ }
468
+ /** Social-platform catalog fields used to format a profile. */
469
+ interface SocialPlatformRecord {
470
+ id: string;
471
+ name?: string;
472
+ baseUrl?: string;
473
+ profileUrlPattern?: string;
474
+ companyUrlPattern?: string;
475
+ handlePrefix?: string;
476
+ }
477
+ interface SocialProfile {
478
+ /** Single-line display text: the profile URL without an `https://` scheme, or the raw value. */
479
+ text: string;
480
+ /** Full http(s) URL when the value is one or its platform record formats one. */
481
+ href?: string;
482
+ /** Whether a socialPlatforms record formatted a handle. */
483
+ resolved: boolean;
484
+ }
485
+ interface FurnitureSocialLink extends SocialProfile {
486
+ /** Socials key (platform id). */
487
+ platform: string;
488
+ /** Authored value path, such as `organization.socials.x`. */
489
+ sourcePath: string;
302
490
  }
491
+ /**
492
+ * Format one Socials value through its platform record, deterministically and
493
+ * without network access. `owner` selects companyUrlPattern for organizations.
494
+ * URLs pass through; unknown platforms and unformattable values stay raw.
495
+ */
496
+ declare function resolveSocialProfile(platform: string, value: string, records?: readonly SocialPlatformRecord[], owner?: 'organization' | 'speaker'): SocialProfile;
303
497
  interface FurnitureImagePart extends FurniturePartBase {
304
498
  type: 'image';
305
499
  image: unknown;
@@ -578,6 +772,8 @@ interface RichTextRun {
578
772
  subscript?: boolean;
579
773
  }
580
774
  interface RichTextFragment {
775
+ /** Tabs are source-preserving layout controls with a fixed advance, not glyph text. */
776
+ kind?: 'tab';
581
777
  text: string;
582
778
  runIndex: number;
583
779
  start: number;
@@ -688,4 +884,4 @@ declare function resolveCanvasDimensions(input: unknown): {
688
884
  height: number;
689
885
  };
690
886
 
691
- export { type TextFit as $, type ListValue as A, type MeasureTextWidth as B, type CodeContent as C, type MetricContent as D, type MetricLayout as E, type FontFamilies as F, type MetricLayoutDiagnostic as G, type MetricLayoutOptions as H, type MetricTextPart as I, type MetricTextSource as J, type QuoteLayout as K, type LayoutBox as L, MAX_COMPOSITION_DEPTH as M, type QuoteLayoutDiagnostic as N, OPFCompositionError as O, type QuoteLayoutOptions as P, type QuoteContent as Q, type QuoteTextPart as R, type QuoteTextSource as S, type ResolveColorRefOptions as T, type ResolveColorRefRoles as U, type RichTextFit as V, type RichTextFragment as W, type RichTextLine as X, type RichTextOptions as Y, type RichTextRun as Z, type SlideComposition as _, type CodeLayout as a, type TextLineInk as a0, type TextMeasurement as a1, type TextPlacement as a2, type TextPlacementLine as a3, type TextStyle as a4, type TimelineContent as a5, type TimelineEvent as a6, type TimelineLayout as a7, type TimelineLayoutDiagnostic as a8, type TimelineLayoutOptions as a9, type TableCellLayout as aA, type TableCellStyle as aB, type TableGrid as aC, type TableGridCell as aD, type TableGridIssue as aE, type TableLayout as aF, type TableLayoutOptions as aG, type TableRowLayout as aH, type TextLineSegment as aI, type TextLineSource as aJ, layoutTable as aK, tableGrid as aL, tableRowBoundaries as aM, type TimelineTextPart as aa, chartColorForFill as ab, colorContrast as ac, composeSlide as ad, fitList as ae, fitRichText as af, fitText as ag, layoutCode as ah, layoutFurniture as ai, layoutMetric as aj, layoutQuote as ak, layoutTimeline as al, measureText as am, measureTextOutline as an, normalizeHexColor as ao, placeTextLines as ap, resolveCanvasDimensions as aq, resolveColorRef as ar, resolveFontFamilies as as, resolveTextStyle as at, textColorForFill as au, textWidthMeasurer as av, wrapText as aw, type FontFaceSelection as ax, type SourceTextFit as ay, type TableBorder as az, type CodeLayoutDiagnostic as b, type CodeLayoutOptions as c, type CodeLineSegment as d, type CodeLineSource as e, type CodeTextFit as f, type CodeTextPart as g, type ComposeSlideOptions as h, type ComposedFlow as i, type ComposedGroup as j, type ComposedItem as k, type Composition as l, type CompositionCandidate as m, type CompositionDecision as n, type CompositionExplanation as o, type CompositionPenalties as p, type CompositionTrack as q, type FurnitureImagePart as r, type FurnitureLayout as s, type FurniturePart as t, type FurniturePartBase as u, type FurnitureTextPart as v, type LayoutDiagnostic as w, type ListEntryLayout as x, type ListFit as y, type ListText as z };
887
+ export { type QuoteTextSource as $, type FurnitureSocialLink as A, type FurnitureTextExtras as B, type ComposeSlideOptions as C, DEFAULT_FONT_SCHEME as D, type FurnitureTextPart as E, type FontSchemeDiagnostic as F, type LayoutBox as G, type ListEntryLayout as H, type ListFit as I, type ListText as J, type ListValue as K, type LayoutDiagnostic as L, MAX_COMPOSITION_DEPTH as M, type MeasureTextWidth as N, type MetricContent as O, type MetricLayout as P, type MetricLayoutDiagnostic as Q, type MetricLayoutOptions as R, type MetricTextPart as S, type TextMeasurement as T, type MetricTextSource as U, OPFCompositionError as V, type QuoteContent as W, type QuoteLayout as X, type QuoteLayoutDiagnostic as Y, type QuoteLayoutOptions as Z, type QuoteTextPart as _, type CodeContent as a, slideImageShape as a$, type ResolveColorRefOptions as a0, type ResolveColorRefRoles as a1, type ResolvedFontScheme as a2, type RichTextFit as a3, type RichTextFragment as a4, type RichTextLine as a5, type RichTextOptions as a6, type RichTextRun as a7, type SlideComposition as a8, type SlideImageShape as a9, measureText as aA, measureTextOutline as aB, normalizeHexColor as aC, placeTextLines as aD, resolveCanvasDimensions as aE, resolveColorRef as aF, resolveFontFamilies as aG, resolveFontSchemeReference as aH, resolveSocialProfile as aI, resolveTextStyle as aJ, textColorForFill as aK, textWidthMeasurer as aL, wrapText as aM, type FontFaceSelection as aN, type SourceTextFit as aO, type TableBorder as aP, type TableCellLayout as aQ, type TableCellStyle as aR, type TableGrid as aS, type TableGridCell as aT, type TableGridIssue as aU, type TableLayout as aV, type TableLayoutOptions as aW, type TableRowLayout as aX, type TextLineSegment as aY, type TextLineSource as aZ, layoutTable as a_, type SocialPlatformRecord as aa, type SocialProfile as ab, type TextFit as ac, type TextLineInk as ad, type TextPlacement as ae, type TextPlacementLine as af, type TextStyle as ag, type TimelineContent as ah, type TimelineEvent as ai, type TimelineLayout as aj, type TimelineLayoutDiagnostic as ak, type TimelineLayoutOptions as al, type TimelineTextPart as am, chartColorForFill as an, colorContrast as ao, composeSlide as ap, fitList as aq, fitRichText as ar, fitText as as, formatFurnitureDate as at, formatSlideNumber as au, layoutCode as av, layoutFurniture as aw, layoutMetric as ax, layoutQuote as ay, layoutTimeline as az, type CodeLayout as b, tableGrid as b0, tableRowBoundaries as b1, type CodeLayoutDiagnostic as c, type CodeLayoutOptions as d, type CodeLineSegment as e, type CodeLineSource as f, type CodeTextFit as g, type CodeTextPart as h, type ComposedFlow as i, type ComposedGroup as j, type ComposedItem as k, type ComposedSlideImage as l, type Composition as m, type CompositionCandidate as n, type CompositionDecision as o, type CompositionExplanation as p, type CompositionPenalties as q, type CompositionTrack as r, DEFAULT_FURNITURE_DATE_FORMAT as s, DEFAULT_SLIDE_NUMBER_FORMAT as t, type FontFamilies as u, type FurnitureField as v, type FurnitureImagePart as w, type FurnitureLayout as x, type FurniturePart as y, type FurniturePartBase as z };
@@ -1 +1 @@
1
- export { C as CodeContent, a as CodeLayout, b as CodeLayoutDiagnostic, c as CodeLayoutOptions, d as CodeLineSegment, e as CodeLineSource, f as CodeTextFit, g as CodeTextPart, h as ComposeSlideOptions, i as ComposedFlow, j as ComposedGroup, k as ComposedItem, l as Composition, m as CompositionCandidate, n as CompositionDecision, o as CompositionExplanation, p as CompositionPenalties, q as CompositionTrack, ax as FontFaceSelection, F as FontFamilies, r as FurnitureImagePart, s as FurnitureLayout, t as FurniturePart, u as FurniturePartBase, v as FurnitureTextPart, L as LayoutBox, w as LayoutDiagnostic, x as ListEntryLayout, y as ListFit, z as ListText, A as ListValue, M as MAX_COMPOSITION_DEPTH, B as MeasureTextWidth, D as MetricContent, E as MetricLayout, G as MetricLayoutDiagnostic, H as MetricLayoutOptions, I as MetricTextPart, J as MetricTextSource, O as OPFCompositionError, Q as QuoteContent, K as QuoteLayout, N as QuoteLayoutDiagnostic, P as QuoteLayoutOptions, R as QuoteTextPart, S as QuoteTextSource, V as RichTextFit, W as RichTextFragment, X as RichTextLine, Y as RichTextOptions, Z as RichTextRun, _ as SlideComposition, ay as SourceTextFit, az as TableBorder, aA as TableCellLayout, aB as TableCellStyle, aC as TableGrid, aD as TableGridCell, aE as TableGridIssue, aF as TableLayout, aG as TableLayoutOptions, aH as TableRowLayout, $ as TextFit, a0 as TextLineInk, aI as TextLineSegment, aJ as TextLineSource, a1 as TextMeasurement, a2 as TextPlacement, a3 as TextPlacementLine, a4 as TextStyle, a5 as TimelineContent, a6 as TimelineEvent, a7 as TimelineLayout, a8 as TimelineLayoutDiagnostic, a9 as TimelineLayoutOptions, aa as TimelineTextPart, ab as chartColorForFill, ac as colorContrast, ad as composeSlide, ae as fitList, af as fitRichText, ag as fitText, ah as layoutCode, ai as layoutFurniture, aj as layoutMetric, ak as layoutQuote, aK as layoutTable, al as layoutTimeline, am as measureText, an as measureTextOutline, ap as placeTextLines, aq as resolveCanvasDimensions, as as resolveFontFamilies, at as resolveTextStyle, aL as tableGrid, aM as tableRowBoundaries, au as textColorForFill, av as textWidthMeasurer, aw as wrapText } from './composition-Tv9Wm3Oh.js';
1
+ export { a as CodeContent, b as CodeLayout, c as CodeLayoutDiagnostic, d as CodeLayoutOptions, e as CodeLineSegment, f as CodeLineSource, g as CodeTextFit, h as CodeTextPart, C as ComposeSlideOptions, i as ComposedFlow, j as ComposedGroup, k as ComposedItem, l as ComposedSlideImage, m as Composition, n as CompositionCandidate, o as CompositionDecision, p as CompositionExplanation, q as CompositionPenalties, r as CompositionTrack, D as DEFAULT_FONT_SCHEME, s as DEFAULT_FURNITURE_DATE_FORMAT, t as DEFAULT_SLIDE_NUMBER_FORMAT, aN as FontFaceSelection, u as FontFamilies, F as FontSchemeDiagnostic, v as FurnitureField, w as FurnitureImagePart, x as FurnitureLayout, y as FurniturePart, z as FurniturePartBase, A as FurnitureSocialLink, B as FurnitureTextExtras, E as FurnitureTextPart, G as LayoutBox, L as LayoutDiagnostic, H as ListEntryLayout, I as ListFit, J as ListText, K as ListValue, M as MAX_COMPOSITION_DEPTH, N as MeasureTextWidth, O as MetricContent, P as MetricLayout, Q as MetricLayoutDiagnostic, R as MetricLayoutOptions, S as MetricTextPart, U as MetricTextSource, V as OPFCompositionError, W as QuoteContent, X as QuoteLayout, Y as QuoteLayoutDiagnostic, Z as QuoteLayoutOptions, _ as QuoteTextPart, $ as QuoteTextSource, a2 as ResolvedFontScheme, a3 as RichTextFit, a4 as RichTextFragment, a5 as RichTextLine, a6 as RichTextOptions, a7 as RichTextRun, a8 as SlideComposition, a9 as SlideImageShape, aa as SocialPlatformRecord, ab as SocialProfile, aO as SourceTextFit, aP as TableBorder, aQ as TableCellLayout, aR as TableCellStyle, aS as TableGrid, aT as TableGridCell, aU as TableGridIssue, aV as TableLayout, aW as TableLayoutOptions, aX as TableRowLayout, ac as TextFit, ad as TextLineInk, aY as TextLineSegment, aZ as TextLineSource, T as TextMeasurement, ae as TextPlacement, af as TextPlacementLine, ag as TextStyle, ah as TimelineContent, ai as TimelineEvent, aj as TimelineLayout, ak as TimelineLayoutDiagnostic, al as TimelineLayoutOptions, am as TimelineTextPart, an as chartColorForFill, ao as colorContrast, ap as composeSlide, aq as fitList, ar as fitRichText, as as fitText, at as formatFurnitureDate, au as formatSlideNumber, av as layoutCode, aw as layoutFurniture, ax as layoutMetric, ay as layoutQuote, a_ as layoutTable, az as layoutTimeline, aA as measureText, aB as measureTextOutline, aD as placeTextLines, aE as resolveCanvasDimensions, aG as resolveFontFamilies, aH as resolveFontSchemeReference, aI as resolveSocialProfile, aJ as resolveTextStyle, a$ as slideImageShape, b0 as tableGrid, b1 as tableRowBoundaries, aK as textColorForFill, aL as textWidthMeasurer, aM as wrapText } from './composition-DzLwY-Mi.js';
@@ -1 +1 @@
1
- export { MAX_COMPOSITION_DEPTH, OPFCompositionError, chartColorForFill, colorContrast, composeSlide, fitList, fitRichText, fitText, layoutCode, layoutFurniture, layoutMetric, layoutQuote, layoutTable, layoutTimeline, measureText, measureTextOutline, placeTextLines, resolveCanvasDimensions, resolveFontFamilies, resolveTextStyle, tableGrid, tableRowBoundaries, textColorForFill, textWidthMeasurer, wrapText } from './chunk-FTWNWFIV.js';
1
+ export { DEFAULT_FONT_SCHEME, DEFAULT_FURNITURE_DATE_FORMAT, DEFAULT_SLIDE_NUMBER_FORMAT, MAX_COMPOSITION_DEPTH, OPFCompositionError, chartColorForFill, colorContrast, composeSlide, fitList, fitRichText, fitText, formatFurnitureDate, formatSlideNumber, layoutCode, layoutFurniture, layoutMetric, layoutQuote, layoutTable, layoutTimeline, measureText, measureTextOutline, placeTextLines, resolveCanvasDimensions, resolveFontFamilies, resolveFontSchemeReference, resolveSocialProfile, resolveTextStyle, slideImageShape, tableGrid, tableRowBoundaries, textColorForFill, textWidthMeasurer, wrapText } from './chunk-BVLWFMDX.js';