@openpresentation/opf 0.33.0 → 0.34.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 (93) hide show
  1. package/README.md +3 -3
  2. package/dist/browser.js +20 -19
  3. package/dist/catalog-refs-CoIrOdAw.d.ts +937 -0
  4. package/dist/{catalog-schemas-CQTM-G8p.d.ts → catalog-schemas-FjLRPtjB.d.ts} +1 -1
  5. package/dist/{chart-data-oIZQlFGi.d.ts → chart-data-B_k-WTex.d.ts} +7 -4
  6. package/dist/{chunk-XIOC6N5P.js → chunk-244OPLAV.js} +1 -1
  7. package/dist/{chunk-S5QRGMUQ.js → chunk-2HX4BGAS.js} +6 -6
  8. package/dist/{chunk-Y557TYML.js → chunk-36DLVJGW.js} +19 -16
  9. package/dist/{chunk-VKEYV3ZK.js → chunk-3THGTDL2.js} +2 -2
  10. package/dist/{chunk-ABWEUXLV.js → chunk-42JBXJKW.js} +117 -21
  11. package/dist/chunk-BLCDUM7B.js +7 -0
  12. package/dist/{chunk-OPVJLL7H.js → chunk-CJVKOJ6B.js} +11841 -8687
  13. package/dist/{chunk-BI4ERFAA.js → chunk-DQ7QYOUV.js} +48 -13
  14. package/dist/{chunk-KVHNDHVS.js → chunk-F6BXO4AI.js} +1 -1
  15. package/dist/{chunk-UK3J6FSU.js → chunk-FAXO3SUE.js} +858 -268
  16. package/dist/{chunk-XANW7MB7.js → chunk-FIQMAIZV.js} +4 -4
  17. package/dist/{chunk-PJSPHHRK.js → chunk-FK5XG742.js} +3 -16
  18. package/dist/{chunk-R6C6BQOG.js → chunk-HHVQ2SDT.js} +1 -1
  19. package/dist/{chunk-DAS75LGR.js → chunk-HUGVYHZ2.js} +4 -4
  20. package/dist/{chunk-QF5RSRXU.js → chunk-LCT5ZV3Q.js} +750 -199
  21. package/dist/chunk-NLJFNCZ4.js +1560 -0
  22. package/dist/{chunk-VSBZC2PR.js → chunk-QGJVOPLG.js} +3 -3
  23. package/dist/{chunk-E7WQHMCL.js → chunk-QGTJF7HV.js} +16 -14
  24. package/dist/{chunk-VMBLNCX2.js → chunk-RUV7CCE6.js} +117 -30
  25. package/dist/{chunk-YS333HLA.js → chunk-U7TYSPYM.js} +2 -2
  26. package/dist/chunk-UJZN2ZH6.js +1 -0
  27. package/dist/{chunk-IJXKVM4W.js → chunk-VDZXNNZF.js} +1 -1
  28. package/dist/{chunk-YYT6N7AI.js → chunk-WCPDN7AY.js} +1 -1
  29. package/dist/{chunk-QD6DPS7X.js → chunk-WMFT5R7I.js} +2 -2
  30. package/dist/{chunk-INIMUBSE.js → chunk-XJUMFH33.js} +1 -1
  31. package/dist/{composition-zMiIgzip.d.ts → composition-CvtvgBDE.d.ts} +1360 -1531
  32. package/dist/composition.d.ts +3 -3
  33. package/dist/composition.js +2 -1
  34. package/dist/{conversion-mNth9XKm.d.ts → conversion-B_5AKTYQ.d.ts} +25 -7
  35. package/dist/conversion-CMBGOTAC.js +25 -0
  36. package/dist/convert.d.ts +4 -4
  37. package/dist/convert.js +15 -11
  38. package/dist/data.d.ts +2 -2
  39. package/dist/data.js +3 -2
  40. package/dist/{deck-report-BSlRiR0_.d.ts → deck-report-BVlQZ42f.d.ts} +3 -3
  41. package/dist/deck.d.ts +6 -6
  42. package/dist/deck.js +12 -11
  43. package/dist/diagram-engine-eager.js +5 -1
  44. package/dist/diagram-engine-lazy.js +13 -0
  45. package/dist/diagram-plantuml-XRZ6VAOL.js +3 -0
  46. package/dist/diff.js +5 -4
  47. package/dist/docs.js +64 -52
  48. package/dist/examples.js +4070 -1083
  49. package/dist/font-policy.js +1 -1
  50. package/dist/format.js +2 -2
  51. package/dist/ids.js +5 -4
  52. package/dist/index.d.ts +18 -16
  53. package/dist/index.js +35 -24
  54. package/dist/markdown.d.ts +2 -2
  55. package/dist/markdown.js +9 -8
  56. package/dist/node-engine.d.ts +43 -11
  57. package/dist/node-engine.js +45 -26
  58. package/dist/{pagination-CYzNMazO.d.ts → pagination-CZQQYk7L.d.ts} +4 -3
  59. package/dist/pagination.d.ts +4 -4
  60. package/dist/pagination.js +5 -4
  61. package/dist/patch.js +4 -3
  62. package/dist/precompiled.js +2 -2
  63. package/dist/{presentation-CXhfpB_z.d.ts → presentation-s9262acV.d.ts} +357 -230
  64. package/dist/repo-readme.js +1 -1
  65. package/dist/schema-engine-ajv.js +1 -1
  66. package/dist/schema-engine-precompiled.js +2 -2
  67. package/dist/schema.d.ts +3 -3
  68. package/dist/schema.js +4 -3
  69. package/dist/schemas.d.ts +16 -0
  70. package/dist/schemas.js +1 -1
  71. package/dist/shape-engine-eager.js +2 -2
  72. package/dist/shape-engine-lazy.js +1 -1
  73. package/dist/{shape-engine-module-BK7JNEUV.js → shape-engine-module-N74FCHGY.js} +2 -2
  74. package/dist/shape-geometry.js +1 -1
  75. package/dist/source.d.ts +10 -5
  76. package/dist/source.js +11 -10
  77. package/dist/spec/reference/engine-vocabularies.json +135 -0
  78. package/dist/spec/reference/font-policy.json +3 -16
  79. package/dist/spec/reference/preset-geometry.json +3 -3
  80. package/dist/spec/schemas/icon-set.schema.json +1 -1
  81. package/dist/spec/schemas/layout.schema.json +71 -25
  82. package/dist/spec/schemas/opf.schema.json +540 -168
  83. package/dist/spec/schemas/theme.schema.json +11 -5
  84. package/dist/types.d.ts +81 -73
  85. package/dist/{validation-types-COwTel3H.d.ts → validation-types-CYbsUuZ9.d.ts} +8 -5
  86. package/dist/validator.d.ts +34 -7
  87. package/dist/validator.js +4 -3
  88. package/dist/yaml.d.ts +2 -2
  89. package/dist/yaml.js +8 -7
  90. package/package.json +6 -6
  91. package/dist/catalog-refs-B_0_vZg0.d.ts +0 -134
  92. package/dist/chunk-ZXOIGUHX.js +0 -1
  93. package/dist/conversion-POHRAMSN.js +0 -24
@@ -0,0 +1,937 @@
1
+ /** Normalize a literal hex color to uppercase #RRGGBB. */
2
+ declare function normalizeHexColor(value: unknown): string | undefined;
3
+ type ResolveColorRefRoles = Partial<Record<'primary' | 'secondary' | 'accent' | 'background' | 'surface' | 'surfaceAlt' | 'text' | 'textSecondary', string>>;
4
+ interface ResolveColorRefOptions {
5
+ /** Effective color scheme after design resolution (OOXML slots plus optional role hex overrides). */
6
+ colorScheme: Record<string, unknown>;
7
+ /** Optional resolved chrome colors (e.g. renderer `design.colors` with `textSecondary` mapped to `mutedText`). */
8
+ roles?: ResolveColorRefRoles;
9
+ /** Top-level presentation `variables` map. */
10
+ variables?: Record<string, unknown>;
11
+ /** Theme text color returned when a reference cannot be resolved. */
12
+ fallback: string;
13
+ }
14
+ /**
15
+ * SH-02: the lighter or darker form of a ColorRef, `{ color, lighten }` or `{ color, darken }` (opf.schema.json ColorTransform), as the
16
+ * DrawingML luminance transform PowerPoint's theme tints and shades use: `lighten` L is lumMod (1 - L) and lumOff L, `darken` D is
17
+ * lumMod (1 - D), both in thousandths of a percent. Undefined for anything else (a string ColorRef, or an object that is neither).
18
+ */
19
+ declare function colorTransform(reference: unknown): {
20
+ color: unknown;
21
+ lumMod: number;
22
+ lumOff: number;
23
+ } | undefined;
24
+ /** SH-02: `hex` (#RGB, #RRGGBB or #RRGGBBAA) with a ColorRef's lighter or darker transform applied; an alpha byte is kept. */
25
+ declare function applyColorTransform(hex: string, transform: {
26
+ lumMod: number;
27
+ lumOff: number;
28
+ }): string;
29
+ /** Resolve a ColorRef (or a TextRun.color string) to a literal hex color; the lighter or darker object form resolves its base and applies its transform. */
30
+ declare function resolveColorRef(reference: unknown, options: ResolveColorRefOptions): string;
31
+ /** WCAG relative luminance below which a slide background counts as dark (the point where white and black text contrast equally). */
32
+ declare const DARK_BACKGROUND_LUMINANCE = 0.179;
33
+ /** True when text on this color should be light: its relative luminance is under {@link DARK_BACKGROUND_LUMINANCE}. An unreadable color is not dark. */
34
+ declare function isDarkColor(color: unknown): boolean;
35
+ /**
36
+ * The slide background a color scheme implies when the design names no single-color background: the scheme's
37
+ * `background` role override, else its light1 slot, else white. Gradient and picture backgrounds use it too.
38
+ */
39
+ declare function defaultSlideBackground(colorScheme: Record<string, unknown>): string;
40
+ /** The four light and dark slots: the text roles (tx1, tx2) always map to one of them. */
41
+ type ColorBaseSlot = 'light1' | 'light2' | 'dark1' | 'dark2';
42
+ type ColorAccentSlot = 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6';
43
+ /** The slots a variant can use as the slide background: the four light and dark slots, or an accent (LH-01). */
44
+ type ColorVariantBackground = ColorBaseSlot | ColorAccentSlot;
45
+ /**
46
+ * A variant of the deck's single colour scheme: which slot is the background (and so which are the text and the alternate surface),
47
+ * and optionally the order of the accents. It is a mapping over the scheme's twelve slots, as PowerPoint's `clrMap` is, never a second
48
+ * scheme: nothing in it is a colour.
49
+ */
50
+ interface ColorVariant {
51
+ background: ColorVariantBackground;
52
+ /** A permutation of `accent1` to `accent6`: entry `i` is the scheme slot drawn as accent `i + 1`. Default: the scheme's own order. */
53
+ accents?: readonly ColorAccentSlot[];
54
+ }
55
+ /** The slots the roles bg1, tx1, bg2 and tx2 and the six accents point at (OOXML `clrMap`, with `lt1` named `light1` and so on). */
56
+ interface ColorMap {
57
+ bg1: ColorVariantBackground;
58
+ tx1: ColorBaseSlot;
59
+ bg2: ColorVariantBackground;
60
+ tx2: ColorBaseSlot;
61
+ accents: readonly ColorAccentSlot[];
62
+ }
63
+ /** A variant as authored: the background slot alone (`"dark1"`, the same as `{ "background": "dark1" }`), or the object form, which is needed only for an accent order. */
64
+ type ColorVariantInput = ColorVariantBackground | ColorVariant;
65
+ /** The variant an authored value stands for, always the normalized object form, or undefined for a value that is not a variant: a background slot string, or an object with a background slot and, when given, a permutation of the six accent slots. */
66
+ declare function normalizeColorVariant(value: unknown): ColorVariant | undefined;
67
+ /** True for a well formed variant in either form (see {@link normalizeColorVariant}). */
68
+ declare function isColorVariant(value: unknown): value is ColorVariantInput;
69
+ /**
70
+ * LH-01: the tone-relative values a layout record's `design.variant` can take besides a variant, resolved against the deck's own variant
71
+ * (its background slot and whether it is dark) by {@link layoutColorVariant}:
72
+ *
73
+ * - `surface`: the deck's secondary surface on its own side, light2 on a light deck and dark2 on a dark one (light1 or dark1 where the deck
74
+ * is already on light2 or dark2), so a statement stands off the deck without flipping its tone;
75
+ * - `brand`: the scheme's brand dark, dark2 (dark1 where the deck is already on dark2), the strong surface a closing slide takes on a light or
76
+ * a dark deck, with light text.
77
+ */
78
+ type LayoutVariantRole = 'surface' | 'brand';
79
+ /** The deck a layout's tone-relative variant is resolved against: its background slot (bg1 of its map) and whether its text is light. */
80
+ interface LayoutVariantDeck {
81
+ background: ColorVariantBackground;
82
+ dark: boolean;
83
+ }
84
+ /**
85
+ * LH-01: the variant a layout record names (`layout.design.variant`), normalized, or undefined: a variant as written, or a
86
+ * {@link LayoutVariantRole} resolved against `deck` (default: a light deck on light1). It ranks above the deck's design and the theme and
87
+ * below the slide's own design (docs/programs/layout-harvest/README.md, Decisions), so a section or a closing draws on its variant in any
88
+ * deck while an author can still set a slide's own.
89
+ */
90
+ declare function layoutColorVariant(layout: unknown, deck?: LayoutVariantDeck): ColorVariant | undefined;
91
+ /**
92
+ * LH-103: whether a background definition is fixed, so a gallery layout's variant never replaces it: a hex color (shorthand or a solid's
93
+ * color), a solid whose color is a `var:` variable, a gradient, a pattern or a picture (an image source string or `{ type: "image" }`).
94
+ * Scheme-based, and so open to a layout variant: no background, a theme slot (`"dark1"`, `{ type: "theme" }`) and a solid whose color
95
+ * is a scheme slot or role name (`accent1`, `primary`, `background`), which follow the scheme as the variant does. A `var:` reference
96
+ * counts as fixed whatever it holds, because the author named a color of the deck's own rather than a place in the scheme.
97
+ */
98
+ declare function isFixedBackground(definition: unknown): boolean;
99
+ /**
100
+ * LH-103: whether the deck and the theme draw a fixed background ({@link isFixedBackground}), which a layout's variant does not replace:
101
+ * the slide keeps that background and its text follows that background's tone or luminance, as on a slide with no layout variant. The
102
+ * drawn background is the deck's own, else the theme's unless a deck variant hides it (as colorChoice does). A deck `variant` beside its
103
+ * own fixed background only maps the text and the surfaces, so that background still wins over the layout.
104
+ */
105
+ declare function deckBackgroundIsFixed(deckDesign: unknown, themeBackground: unknown): boolean;
106
+ /**
107
+ * LH-01: whether a layout's variant decides the slide's background: the layout names one and the slide's own design sets neither a
108
+ * variant nor a background, so the layout hides a scheme-based background of the deck and the theme (the slide is the variant's bg1).
109
+ * LH-103: never over a fixed background of the deck or the theme ({@link deckBackgroundIsFixed}), which the slide keeps.
110
+ * LH-164: `surface` is a variant the slide's content asks for (a message-only slide's accent surface, messageSurface): it decides the
111
+ * background under the same conditions, over a layout that names no variant.
112
+ */
113
+ declare function layoutVariantApplies(slideDesign: unknown, layout: unknown, deckDesign?: unknown, themeBackground?: unknown, surface?: unknown): boolean;
114
+ /**
115
+ * The map a variant stands for: `light1` is the default map (bg1 = light1, tx1 = dark1, bg2 = light2, tx2 = dark2); `dark1` swaps
116
+ * light and dark; `light2` and `dark2` make that slot both the background and the alternate surface (bg2, as a slide with that theme
117
+ * background has always had it, which keeps the default theme's dark2 background unchanged), with the text of the family's side. No variant is `light1`.
118
+ *
119
+ * LH-01: an accent background is both bg1 and bg2, as light2 and dark2 are, with the text of the family whose tx1 reads better on that
120
+ * accent in `colorScheme` (light1 and light2 when light1 has the higher contrast, else dark1 and dark2), so the scheme's own slots carry
121
+ * the text and no colour is invented; tx2 maps to tx1's slot where the family's tx2 is under {@link ACCENT_SECONDARY_MIN_CONTRAST} on the
122
+ * accent. Without a scheme the accent counts as dark.
123
+ */
124
+ declare function colorMapFor(variant?: ColorVariantInput, colorScheme?: Record<string, unknown>): ColorMap;
125
+ /**
126
+ * The attributes of PowerPoint's `<p:clrMap>` for a map (`bg1="lt1" tx1="dk1" bg2="lt2" tx2="dk2" accent1="accent1" ...` and the two
127
+ * hyperlink slots unchanged), so the PPTX export writes the master map and a slide's `clrMapOvr` from the same data the preview reads.
128
+ */
129
+ declare function clrMapAttributes(map: ColorMap): Record<string, string>;
130
+ /**
131
+ * A scheme colour as the PPTX export writes it and the preview draws it: `slot` is the colour role or slot (`tx1`, `bg1`, `bg2`, `tx2`,
132
+ * `accent1` ...), `lumMod` and `lumOff` are DrawingML luminance transforms in thousandths of a percent (`lumMod 15000, lumOff 85000` is
133
+ * 15% of the slot's luminance plus 85%), `alpha` an opacity in the same unit, and `hex` is the colour the transforms give for the
134
+ * resolved scheme, so a preview that draws `hex` and a PPTX that writes `<a:schemeClr val={slot}>` with the transforms show the same colour.
135
+ */
136
+ interface SchemeColor {
137
+ slot: string;
138
+ hex: string;
139
+ lumMod?: number;
140
+ lumOff?: number;
141
+ alpha?: number;
142
+ }
143
+ /** The colour a `lumMod`/`lumOff` pair (thousandths of a percent) makes of `hex`: its HSL luminance times `lumMod`, plus `lumOff`. */
144
+ declare function applyLuminance(hex: string, lumMod?: number, lumOff?: number): string;
145
+ /** Shares of the text colour (tx1) mixed into the background (bg1) for the neutrals, PowerPoint's chart-style values. */
146
+ declare const NEUTRAL_SHARES: {
147
+ readonly border: 0.2;
148
+ readonly gridline: 0.15;
149
+ readonly axisLine: 0.25;
150
+ readonly chartText: 0.65;
151
+ readonly codeComment: 0.65;
152
+ };
153
+ /** LH-54: the share of the text colour (light1 on a dark slide) a dark card starts from, mixed into the background. */
154
+ declare const CARD_SURFACE_MIX = 0.07;
155
+ /** LH-54: the contrast a mixed dark card reaches against the background, stepping the mix up from {@link CARD_SURFACE_MIX} (Claude Design's #0B2A5C on #011842 is 1.25:1). */
156
+ declare const CARD_SURFACE_MIN_CONTRAST = 1.25;
157
+ /** Wave 8: the contrast the slide's text keeps on a mixed card (WCAG AA for body text); the mix towards the text stops before it falls under it. */
158
+ declare const CARD_TEXT_MIN_CONTRAST = 4.5;
159
+ /** LH-54: the share of the text colour mixed into a mixed dark card for its 1 px stroke (about 12% white over the card). */
160
+ declare const CARD_BORDER_MIX = 0.12;
161
+ /** LH-79: a dark variant's code panel is bg1 at this share of its HSL lightness (`lumMod`; Claude Design's #001030 on #011842). */
162
+ declare const CODE_PANEL_DARK_SHADE = 0.7;
163
+ /**
164
+ * The colours OPF draws that are neither text nor an accent, all derived from the scheme through the variant's map, so a dark variant
165
+ * gets light lines and a change of variant or background style in PowerPoint recolours them.
166
+ */
167
+ interface SchemeNeutrals {
168
+ /** Quiet structural rules, card borders and table borders: tx1 at {@link NEUTRAL_SHARES}.border over bg1. */
169
+ border: SchemeColor;
170
+ /** Chart gridlines: tx1 at 15%. */
171
+ gridline: SchemeColor;
172
+ /** Chart axis lines: tx1 at 25%. */
173
+ axisLine: SchemeColor;
174
+ /** Chart axis labels and legend text where the chart does not use the slide text colour: tx1 at 65%. */
175
+ chartText: SchemeColor;
176
+ /** Pie and treemap outlines, the video play icon and anything drawn on top of a mark: bg1. */
177
+ outline: SchemeColor;
178
+ /** The neutral metric trend (no good or bad news): tx2. */
179
+ trendNeutral: SchemeColor;
180
+ /**
181
+ * The code panel, a dark card on either variant (LH-79). On a light variant it is tx1, or tx2 when tx1 is near-black ({@link CODE_PANEL_NEAR_BLACK})
182
+ * and tx2 is dark enough to carry bg1 text at {@link CODE_PANEL_MIN_TEXT_CONTRAST}: a navy theme gets a navy panel, not a black one. On a dark
183
+ * variant it is bg1 shaded to {@link CODE_PANEL_DARK_SHADE} of its lightness, a surface just below the slide; where that cannot stand off a
184
+ * near-black background ({@link CODE_PANEL_MIN_STEP}), bg2 when it does, else bg1 lifted {@link CODE_PANEL_LIFT} towards tx1.
185
+ */
186
+ codePanel: SchemeColor;
187
+ /** Plain code text: bg1 or tx1, whichever reads better on the panel. */
188
+ codeText: SchemeColor;
189
+ /** Code comments and line numbers: the code text at 65% over the panel. */
190
+ codeComment: SchemeColor;
191
+ /**
192
+ * The fill of a card (a composed item's `frameBox`), LH-54: the `surface` role wherever it stands off the background, and on a dark slide
193
+ * where it does not (the dark2 variant, whose bg2 is the background itself) the background mixed towards tx1 from {@link CARD_SURFACE_MIX}
194
+ * until it reaches {@link CARD_SURFACE_MIN_CONTRAST}, so a dark card reads as a filled surface rather than a hairline outline. A mixed card is
195
+ * a literal colour (no single luminance transform of a slot reproduces it), as `surfaceAlt` is.
196
+ */
197
+ card: SchemeColor;
198
+ /** The 1 px stroke of a card: `border`, or on a mixed dark card that card mixed {@link CARD_BORDER_MIX} towards tx1 (a literal colour). */
199
+ cardBorder: SchemeColor;
200
+ }
201
+ interface ResolvedColorRoles {
202
+ /** Role override, else the first accent of the variant (accent1 by default). */
203
+ primary: string;
204
+ /** Role override, else the second accent of the variant (accent2 by default). */
205
+ secondary: string;
206
+ /** Role override, else the third accent of the variant (accent3 by default). */
207
+ accent: string;
208
+ /** The slide background: the resolved single-color background of the slide, else the variant's bg1 (light1 by default; see {@link defaultSlideBackground}). */
209
+ background: string;
210
+ /** Role override, else bg2 of the variant (light2 on a light slide, dark2 on a dark one). */
211
+ surface: string;
212
+ /** The alternate surface of banded table rows: {@link surfaceAltColor} of `surface` and `text`, always distinguishable from `surface`. */
213
+ surfaceAlt: string;
214
+ /** Default text: tx1 of the variant (light1 on a dark background). On a light background the `text` role override, else dark1. */
215
+ text: string;
216
+ /** Role override, else tx2 of the variant (light2 on a dark background and dark2 on a light one). */
217
+ textSecondary: string;
218
+ /** The color of a link run that sets no color of its own: the scheme's hyperlink slot (OOXML hlink), unless that has under 4.5:1 contrast against the slide background, then the slide `text` color. */
219
+ hyperlink: string;
220
+ /** Followed-hyperlink slot (OOXML folHlink). */
221
+ followedHyperlink: string;
222
+ /** Quiet structural rules/cards: `neutrals.border.hex`, tx1 mixed into bg1. Authored borders still resolve their own ColorRef. */
223
+ border: string;
224
+ /** Whether the slide background is dark; text, surface and textSecondary defaults follow it. */
225
+ dark: boolean;
226
+ /** The variant these roles were resolved with: the one given, else the one the background's luminance (or tone) implies. */
227
+ variant: ColorVariant;
228
+ /** The map behind the roles (bg1, tx1, bg2, tx2 and the accent order), for PPTX `clrMap` and `clrMapOvr` ({@link clrMapAttributes}). */
229
+ map: ColorMap;
230
+ /** The six accent colours in the variant's order (primary, secondary and accent are the first three unless overridden). */
231
+ accents: string[];
232
+ /** Every neutral derived from the scheme, with its slot and luminance transform for `schemeClr` export. */
233
+ neutrals: SchemeNeutrals;
234
+ }
235
+ interface ResolveColorRolesOptions {
236
+ /** The slide's resolved single-color background (solid, theme-slot or pattern background color). Omit for a gradient, picture or no background. */
237
+ background?: string | null;
238
+ /** The slide's variant (RR-96), as authored (`"dark1"` or the object form). It sets the map; without it the background's luminance (or `tone`) chooses light1 or dark1. */
239
+ variant?: ColorVariantInput;
240
+ /** `dark` or `light` for a picture or gradient background that names its tone: it chooses dark1 or light1 when there is no `variant`. */
241
+ tone?: 'dark' | 'light';
242
+ }
243
+ /**
244
+ * Resolve a color scheme's abstract roles for one slide: the single definition the opf-render preview, the
245
+ * PPTX export and the audit share, so the same deck draws the same colors in all three.
246
+ *
247
+ * RR-96: the roles come from the variant's map over the scheme's slots, as PowerPoint's roles do: background is bg1, text tx1,
248
+ * textSecondary tx2, surface bg2, and primary, secondary and accent the first three accents in the variant's order. Without
249
+ * `options.variant` the map is chosen from the slide: `options.tone` for a picture or gradient that names one, else the luminance of
250
+ * `options.background` ({@link isDarkColor}; dark1 when dark, light1 otherwise), which is the earlier behavior. Role overrides on the
251
+ * scheme (`primary`, `secondary`, `accent`, `background`, `surface`, `text`, `textSecondary`) win over the slots they default to; a
252
+ * `text` override applies only on a light background, so a dark slide always gets readable light text. `roles.neutrals` holds every
253
+ * line and quiet color derived from the same map, each with the slot and luminance transform the PPTX export writes.
254
+ * Values are uppercase #RRGGBB, or #RRGGBBAA where the scheme color carries an alpha byte.
255
+ */
256
+ declare function resolveColorRoles(colorScheme: Record<string, unknown>, options?: ResolveColorRolesOptions): ResolvedColorRoles;
257
+ /** LH-06: the contrast every text role drawn on the emphasis surface keeps against its fill (WCAG AA for body text). */
258
+ declare const EMPHASIS_TEXT_MIN_CONTRAST = 4.5;
259
+ /** LH-06: the contrast the emphasis surface keeps against the slide background, so it reads as a surface of its own (WCAG non-text contrast). */
260
+ declare const EMPHASIS_SURFACE_MIN_CONTRAST = 3;
261
+ /** LH-06: the one contrasting surface a slide may draw a block, a group, a foot band or a pill on, and the roles of what is drawn on it. */
262
+ interface EmphasisSurface {
263
+ /** The variant the surface is drawn in: its bg1 is the fill, its map gives the text (the slide's accent order is kept). */
264
+ variant: ColorVariant;
265
+ /** The surface fill, uppercase #RRGGBB: `roles.background`. */
266
+ fill: string;
267
+ /**
268
+ * The roles of the content on the surface: {@link resolveColorRoles} for `variant`, with every text role (text, textSecondary, primary,
269
+ * secondary, accent) under {@link EMPHASIS_TEXT_MIN_CONTRAST} on the fill replaced by `text`, so a metric value in the primary color on an
270
+ * accent card does not vanish into it. `dark` is whether the surface takes light text.
271
+ */
272
+ roles: ResolvedColorRoles;
273
+ }
274
+ /**
275
+ * LH-06: the emphasis surface of a slide whose roles are `slide`, from the slide's own scheme slots through the LH-01 variant machinery
276
+ * (no color is invented). A light slide takes the brand dark (dark2, as the `brand` layout variant), then dark1, then the accents in the
277
+ * slide's order; a dark slide takes its accents in order (Claude Design's accent card on a dark deck, with the text the accent's map
278
+ * gives: dark1 where it reads better), then light1. The first candidate whose text reaches {@link EMPHASIS_TEXT_MIN_CONTRAST} on its fill and
279
+ * whose fill reaches {@link EMPHASIS_SURFACE_MIN_CONTRAST} against the slide background is the surface; with none, the candidate with the most
280
+ * text contrast is (the last candidates are the opposite text family, so a scheme with readable text always has one).
281
+ */
282
+ declare function emphasisSurface(colorScheme: Record<string, unknown>, slide: Pick<ResolvedColorRoles, 'dark' | 'map' | 'background'>): EmphasisSurface;
283
+ /**
284
+ * The scheme color, bg1 or tx1 of the roles, that reads best on `fill`: for table header text, text on a mark and anything else that
285
+ * sits on a color the scheme does not name. Returned as a {@link SchemeColor} (slot `bg1` or `tx1`) so the export can write a theme color.
286
+ */
287
+ declare function readableSchemeColor(fill: string, roles: Pick<ResolvedColorRoles, 'neutrals' | 'text' | 'background'>): SchemeColor;
288
+ declare function colorContrast(foreground: string, background: string): number | undefined;
289
+ /** Keep an inherited text color at >=4.5:1; otherwise select black or white.
290
+ * Callers must preserve explicit text-color overrides before using this fallback.
291
+ * An unresolved/translucent fill preserves the preferred color, without a contrast claim.
292
+ */
293
+ declare function textColorForFill(fill: string, preferred: string): string;
294
+ /** Keep an inherited chart mark at >=3:1 against its opaque panel. Otherwise
295
+ * mix toward black or white in bounded 1/255 steps, choosing the first passing
296
+ * step (higher contrast breaks a tie). This retains a recognizable palette;
297
+ * it does not establish distinction between adjacent series or colorblind safety.
298
+ * Explicit mark overrides belong to the caller; unresolved alpha is preserved.
299
+ */
300
+ declare function chartColorForFill(fill: string, preferred: string): string;
301
+ /** Smallest CIE L* step kept between neighbouring series (a printed or greyscale chart tells them apart by lightness alone). */
302
+ declare const CHART_SERIES_MIN_LIGHTNESS_STEP = 11;
303
+ /** Smallest CIE76 colour difference kept between any two series that were at least that far apart before the surface adjustment. */
304
+ declare const CHART_SERIES_MIN_DIFFERENCE = 12;
305
+ /** Series are placed in tiers of this many: a colour is kept apart from the colours of its own and earlier tiers only (see {@link chartPaletteForFill}). */
306
+ declare const CHART_SERIES_TIER_SIZE = 6;
307
+ /** WI-5 (P18, D3) and LH-55: the contrast every series from the scheme reaches on a dark chart surface (see {@link ChartPaletteOptions.legible}). */
308
+ declare const CHART_DARK_SERIES_MIN_CONTRAST = 4.5;
309
+ /** LH-55: the CIE L* step kept between series 1 and 2 on a dark chart surface when both come from the scheme (the default blue pair was 9 apart). */
310
+ declare const CHART_LEAD_LIGHTNESS_STEP = 20;
311
+ interface ChartPaletteOptions {
312
+ /**
313
+ * The series that come from the deck scheme ({@link chartSchemeSeries}): on a dark `fill` each of them reaches {@link CHART_DARK_SERIES_MIN_CONTRAST}
314
+ * (4.5:1) rather than 3:1 (WI-5, P18, decision D3; LH-55 for every series), and series 2 keeps {@link CHART_LEAD_LIGHTNESS_STEP} from series 1
315
+ * when both are listed. An authored `chart.colors` entry and a host palette (omit the option) keep the 3:1 floor.
316
+ */
317
+ legible?: readonly boolean[];
318
+ /**
319
+ * LH-105: soften the series `legible` lists (the scheme's): each is mixed up to {@link CHART_SERIES_SOFT_MIX} of the way towards `fill`
320
+ * after the contrast placement, as far as it keeps its contrast floor and its lightness step from its neighbours ({@link softenChartPalette}).
321
+ * Ordinary data then reads in soft colours and the full-strength colour is left for emphasis (Few). An authored colour is never softened.
322
+ */
323
+ soften?: boolean;
324
+ }
325
+ /** Series colours for a chart drawn on `fill`: the palette in order, each colour adjusted for contrast
326
+ * (`chartColorForFill`) without letting the adjustment merge series.
327
+ *
328
+ * Lifting or darkening a colour for a dark or mid-tone surface moves every failing colour towards the same
329
+ * few lightness values, so two blues that differ on white can end up identical on a dark card. Colours that
330
+ * already have >= 3:1 contrast against `fill` are kept exactly. A colour the contrast adjustment would move is
331
+ * placed again on the lightness axis, keeping its hue and as much of its chroma as sRGB allows, subject to
332
+ * >= 3:1 contrast against `fill` and these separations from the other series (each capped at the separation
333
+ * that pair had in `palette`, so a pair the palette itself made close is not asked to be far apart):
334
+ *
335
+ * - a colour difference (CIE76) of at least {@link CHART_SERIES_MIN_DIFFERENCE} from every other series;
336
+ * - a lightness step of at least {@link CHART_SERIES_MIN_LIGHTNESS_STEP} (CIE L*) from the neighbouring
337
+ * series, which is what keeps neighbours apart on a greyscale print;
338
+ * - the same lightness step from the remaining series, as a weaker aim.
339
+ *
340
+ * Series are placed in order against the kept colours and the colours placed before them. The palette is read in tiers of
341
+ * {@link CHART_SERIES_TIER_SIZE} (series 1 to 6, 7 to 12, ...): a colour is separated from the colours of its own and earlier tiers only,
342
+ * so the later tiers (the tints of `chartSeriesPalette`) are placed around the first six without ever pulling them towards a lightness
343
+ * the tints already hold. A palette of six colours or fewer is one tier. The placement
344
+ * with the lowest cost wins: its distance (in L*) from the contrast-adjusted colour plus a penalty for
345
+ * every point it falls short of those separations, so a colour that is already clear of the others is
346
+ * simply the adjusted colour, a near miss is not worth a large change, and a collision is resolved at the
347
+ * nearest lightness that clears it. The result is deterministic and in series order. An unresolved or
348
+ * translucent fill or colour is passed through, like `chartColorForFill`.
349
+ *
350
+ * On a dark `fill` the series `options.legible` lists (the scheme's, {@link chartSchemeSeries}) take {@link CHART_DARK_SERIES_MIN_CONTRAST}
351
+ * (4.5:1) in place of 3:1 throughout: series 1 is lifted to it first (with {@link legible}, keeping its hue) and kept, the others are adjusted
352
+ * and placed against that floor, and series 2 keeps {@link CHART_LEAD_LIGHTNESS_STEP} (L*) from series 1 even where it already had the
353
+ * contrast (LH-55: the second default blue on navy was 3.0:1 and nine L* from the first).
354
+ *
355
+ * It depends only on the surface and the palette, so every chart on a surface gets the same series colours,
356
+ * and preview and export (which both call this function) draw the same ones.
357
+ */
358
+ declare function chartPaletteForFill(fill: string, palette: readonly string[], options?: ChartPaletteOptions): string[];
359
+ /** LH-161: the most a pie's last slice moves along the lightness axis to clear the first: further and it stops belonging to the palette. */
360
+ declare const CHART_SLICE_MAX_SHIFT = 20;
361
+ /** LH-161: the width of the surface-colored border that separates a pie's wrap pair when no color within {@link CHART_SLICE_MAX_SHIFT} does, in pixels at the 720-px reference. */
362
+ declare const CHART_SLICE_SEPARATOR_PX = 2;
363
+ /** LH-161: the slices of a pie or doughnut: their colors, and whether the chart separates every slice with a surface-colored border. */
364
+ interface ChartSlicePlan {
365
+ colors: string[];
366
+ bordered: boolean;
367
+ }
368
+ /**
369
+ * LH-161: the colors of a pie or doughnut of `count` slices, from `palette` (the colors a chart draws, {@link chartPaletteForFill} with
370
+ * its softening). A circle has one more neighbor pair than a row of series: the last slice sits beside the first. When the last slice
371
+ * (palette color `count - 1`, a color from the scheme: `options.legible`) is closer than {@link CHART_SERIES_MIN_LIGHTNESS_STEP} CIE L*
372
+ * to the first, it alone moves, along the lightness axis (its hue and as much chroma as sRGB allows kept) by at most
373
+ * {@link CHART_SLICE_MAX_SHIFT} L*, to the nearest lightness that keeps its contrast floor against `fill` and the step from both its
374
+ * neighbors (a color difference under {@link CHART_SERIES_MIN_DIFFERENCE} from any other slice costs more the further it falls). Where no
375
+ * such lightness exists the palette color stays and `bordered` is true: the engines draw a {@link CHART_SLICE_SEPARATOR_PX} border in
376
+ * the surface color on every slice of the chart, which separates the pair by shape (`opf/chart-color-only` accepts it). Every other color
377
+ * stays, so a pie of any count draws the palette except possibly its last slice. An authored color is never moved or bordered (the rule
378
+ * reports the pair an author chose), and fewer than three slices, or more than the palette holds (the colors repeat), change nothing.
379
+ */
380
+ declare function chartSlicePlan(fill: string, palette: readonly string[], count: number, options?: {
381
+ legible?: readonly boolean[];
382
+ }): ChartSlicePlan;
383
+ /** LH-105: the share of the backdrop mixed into an ordinary series colour from the scheme (Few: soft colours for ordinary data, strong for emphasis). */
384
+ declare const CHART_SERIES_SOFT_MIX = 0.25;
385
+ /** LH-105: a softened series colour and the DrawingML HSL transforms (thousandths of a percent) that make it of its full-strength colour. */
386
+ interface ChartSoftColor {
387
+ hex: string;
388
+ satMod: number;
389
+ lumMod?: number;
390
+ lumOff?: number;
391
+ }
392
+ /**
393
+ * LH-105: the colour DrawingML's HSL transforms make of `hex`: its saturation times `satMod`, its lightness times `lumMod` plus `lumOff`
394
+ * (thousandths of a percent, each clamped to 0 to 1), as PowerPoint applies `<a:satMod>`, `<a:lumMod>` and `<a:lumOff>` to a scheme colour.
395
+ */
396
+ declare function applyHslTransforms(hex: string, transforms: {
397
+ satMod?: number;
398
+ lumMod?: number;
399
+ lumOff?: number;
400
+ }): string;
401
+ /**
402
+ * LH-105: the soft series colours of a palette already placed for `fill` ({@link chartPaletteForFill}). Each series `legible` lists (the
403
+ * scheme's; an authored colour stays as written) has its HSL lightness moved {@link CHART_SERIES_SOFT_MIX} of the way towards the
404
+ * backdrop's (a DrawingML lumMod/lumOff pair on the colour, which keeps its hue and saturation), or less (in steps of 1%) when the full
405
+ * move would take it under its contrast floor against `fill` (`floor`: 3:1, or 4.5:1 for a scheme series on a dark fill) or closer in
406
+ * lightness to a neighbouring series than the placed palette had them, capped at {@link CHART_SERIES_MIN_LIGHTNESS_STEP} (series 1 and 2
407
+ * of a dark scheme chart: {@link CHART_LEAD_LIGHTNESS_STEP}, `lead`). The neighbours are the series before (already softened) and after
408
+ * (still placed). A colour no move keeps within those bounds stays at full strength. In series order and deterministic.
409
+ */
410
+ declare function softenChartPalette(fill: string, palette: readonly string[], options?: {
411
+ legible?: readonly boolean[];
412
+ floor?: (index: number) => number;
413
+ lead?: boolean;
414
+ }): string[];
415
+ /**
416
+ * LH-105: the transform of each softened series of `chartPaletteForFill(fill, palette, {...options, soften: true})`, or undefined for a series
417
+ * drawn at full strength: the PPTX export writes a softened scheme accent as `<a:schemeClr val="accentN"><a:lumMod/><a:lumOff/></a:schemeClr>`.
418
+ */
419
+ declare function chartSoftColors(fill: string, palette: readonly string[], options?: ChartPaletteOptions): (ChartSoftColor | undefined)[];
420
+ /**
421
+ * LH-105: the colour of a series' direct label (its name at the end of its line): the series colour at full strength, made legible as
422
+ * text on `backdrop` (4.5:1, WCAG 1.4.3) by moving its lightness only, so the label keeps the hue of its line.
423
+ */
424
+ declare function chartSeriesLabelColor(backdrop: string, color: string): string;
425
+ /** Share of white mixed into each accent to make the extended tints of {@link chartSeriesPalette} (series 7 to 12). */
426
+ declare const CHART_SERIES_TINT_MIX = 0.4;
427
+ /**
428
+ * The series colours of a chart before the per-surface adjustment: twelve opaque #RRGGBB colours in series order, taken from the deck's
429
+ * resolved colour scheme (`design.colorScheme` after the theme, the record and any inline overrides are applied).
430
+ *
431
+ * - 1 to 6: `accent1` to `accent6`. A slot the scheme leaves out takes the engine default scheme's slot.
432
+ * - 7 to 12: the same six accents mixed {@link CHART_SERIES_TINT_MIX} of the way towards white, in the same order (a tint of `accent1`
433
+ * is series 7), for charts with more than six series.
434
+ *
435
+ * Pass the result to {@link chartPaletteForFill} with the chart panel colour for the colours a chart draws and writes: contrast against
436
+ * the panel without letting two series merge. Series `i` takes colour `i`; a pie, doughnut, treemap or funnel takes colour `i` for
437
+ * category `i`. The colours depend on the scheme only, so the preview, the PPTX export and the colour-blind rule draw the same ones.
438
+ * The role overrides (`primary`, `secondary`, `accent`) do not change the list: series 1 to 3 are always `accent1` to `accent3`, the
439
+ * theme slots the PPTX export writes as `schemeClr accentN`.
440
+ *
441
+ * RR-89: `colors` is the chart's own `chart.colors` (positional ColorRefs). Entry `i` replaces palette colour `i`; an entry that cannot
442
+ * be resolved ({@link resolveChartColors}) keeps the scheme colour, and entries past the twelfth extend the list. `context` carries the
443
+ * deck's roles and `variables` for entries that name them.
444
+ */
445
+ declare function chartSeriesPalette(colorScheme?: Record<string, unknown>, colors?: unknown, context?: ChartColorContext): string[];
446
+ /**
447
+ * Which series of a chart come from the deck scheme rather than from an authored `chart.colors` entry, in series order: entry `i` is true
448
+ * when `colors[i]` is absent or cannot be resolved, so the series keeps the scheme colour of its position. These are the series
449
+ * {@link chartPaletteForFill} lifts to 4.5:1 on a dark surface (`options.legible`). The list covers the palette {@link chartSeriesPalette}
450
+ * returns for the same arguments (twelve entries, more when `colors` is longer).
451
+ */
452
+ declare function chartSchemeSeries(colors: unknown, colorScheme?: Record<string, unknown>, context?: ChartColorContext): boolean[];
453
+ /** What a `chart.colors` entry resolves against: the deck's role colours and `variables`, as for any ColorRef. */
454
+ interface ChartColorContext {
455
+ /** RR-96: the variant's accent order (`roles.map.accents`): series 1 to 6 take these slots in this order. Default: accent1 to accent6. */
456
+ accents?: readonly ColorAccentSlot[];
457
+ roles?: ResolveColorRefRoles;
458
+ variables?: Record<string, unknown>;
459
+ }
460
+ /**
461
+ * The opaque #RRGGBB colour of each `chart.colors` entry (a hex colour, a colour-scheme slot or role, or a `var:<id>` variable), in
462
+ * order; undefined for an entry that is not a string or cannot be resolved (an unknown variable, a name that is not a colour). Alpha is
463
+ * dropped. `colors` that is not an array resolves to an empty list.
464
+ */
465
+ declare function resolveChartColors(colors: unknown, colorScheme?: Record<string, unknown>, context?: ChartColorContext): (string | undefined)[];
466
+ /** Share of the text colour mixed into the surface to make the muted colour of a highlighted chart. */
467
+ declare const CHART_HIGHLIGHT_MUTED_MIX = 0.3;
468
+ /** Smallest contrast the muted colour keeps against the surface: recessive, but still a visible mark. */
469
+ declare const CHART_HIGHLIGHT_MUTED_MIN_CONTRAST = 1.6;
470
+ /** LH-105: the colour difference (CIE76) a context gray keeps from every focused colour. */
471
+ declare const CHART_CONTEXT_FOCUS_DIFFERENCE = 20;
472
+ /** LH-105: the contrast the context colour of a focused chart keeps against its backdrop (a mark is a graphical object, WCAG 1.4.11). */
473
+ declare const CHART_CONTEXT_MIN_CONTRAST = 3;
474
+ /**
475
+ * LH-105: the contrast the context colour keeps when every context mark carries its value or name as text (a small chart's value labels,
476
+ * the names at the line ends, the names on the slices): WCAG 1.4.11 does not ask 3:1 of a graphic whose information the text gives, so the
477
+ * context can be the light neutral Few draws, still clearly visible.
478
+ */
479
+ declare const CHART_CONTEXT_LABELED_MIN_CONTRAST = 1.6;
480
+ /**
481
+ * LH-105: the neutral of the marks a chart does not focus on (the title names other series or categories, chart-focus.ts): the backdrop
482
+ * mixed towards the text colour (tx1), from {@link CHART_HIGHLIGHT_MUTED_MIX} in 2% steps until it reaches
483
+ * {@link CHART_CONTEXT_MIN_CONTRAST} against the backdrop. A grey in the backdrop's own hue, quieter than the text, visible as a mark.
484
+ * The first of {@link chartContextColors}.
485
+ */
486
+ declare function chartContextColor(surface: string, text: string): string;
487
+ /**
488
+ * LH-105: the neutrals of `count` context series (or slices) of a focused chart, in the order the context series come: grays in the
489
+ * backdrop's hue, the backdrop mixed towards the text colour. The lightest step is the first mix (from {@link CHART_HIGHLIGHT_MUTED_MIX}, or from the backdrop when `labeled`, in
490
+ * 1% steps) that reaches the contrast floor against the backdrop ({@link CHART_CONTEXT_MIN_CONTRAST}, or
491
+ * {@link CHART_CONTEXT_LABELED_MIN_CONTRAST} when `labeled`: every context mark carries its text) and keeps a colour difference of
492
+ * {@link CHART_CONTEXT_FOCUS_DIFFERENCE} (CIE76) from each `avoid` colour (the focused colours: a gray stands apart from a coloured focus by
493
+ * its chroma); each further step is the next mix that stands {@link CHART_SERIES_MIN_LIGHTNESS_STEP} L* from the one before and keeps that
494
+ * difference from the `avoid` colours. The first context series takes the strongest step and the last the lightest,
495
+ * so neighbouring context series (stacked segments, slices) are told apart by lightness, as the focused series are by hue. When the mix
496
+ * runs out of room (a dark text colour close to the backdrop), the remaining series repeat the strongest step.
497
+ */
498
+ declare function chartContextColors(surface: string, text: string, count: number, options?: {
499
+ labeled?: boolean;
500
+ avoid?: readonly string[];
501
+ }): string[];
502
+ /**
503
+ * Whether each plotted series of a chart of option kind `kind` is drawn as a stroke: every series of a line chart (with or without
504
+ * markers, stacked or not) and the line series of a combo (`combo`, core resolveChartData). Columns, bars, areas and slices are filled.
505
+ * A stroke is a thin mark whose value is read from the line itself, so its context neutral keeps {@link CHART_CONTEXT_MIN_CONTRAST} even
506
+ * when every context mark carries its text ({@link chartFocusContextColors}).
507
+ */
508
+ declare function chartSeriesStrokes(kind: string | undefined, count: number, combo?: readonly {
509
+ role: string;
510
+ }[]): boolean[];
511
+ /**
512
+ * The context neutral of each context series of a focused chart, in the order of `context` (series indexes). The engines (the preview and the
513
+ * PPTX export) both read this one decision. A filled series keeps the light floor {@link CHART_CONTEXT_LABELED_MIN_CONTRAST} when
514
+ * `labeled` (its value or name is printed on or beside it); a series drawn as a stroke (`strokes`, {@link chartSeriesStrokes}) keeps
515
+ * {@link CHART_CONTEXT_MIN_CONTRAST} even then, because the line is the data and a 2-pixel line at 1.6:1 all but disappears. Each group
516
+ * takes its own steps of {@link chartContextColors}; a chart with one kind of mark gets exactly what {@link chartContextColors} gives.
517
+ */
518
+ declare function chartFocusContextColors(surface: string, text: string, context: readonly number[], options?: {
519
+ labeled?: boolean;
520
+ strokes?: readonly boolean[];
521
+ avoid?: readonly string[];
522
+ }): string[];
523
+ /**
524
+ * LH-107: the three colors of a waterfall by role (Claude Design and Few: the totals carry the story, the gains the accent, the losses
525
+ * stand back). `increase` is the series color at full strength (`accent`). `total` is the strong color: the scheme's `dark2` when it keeps
526
+ * 3:1 against the backdrop and a color difference of {@link CHART_CONTEXT_FOCUS_DIFFERENCE} (CIE76) from the accent, else the text
527
+ * color (made legible on the backdrop: the strong neutral on a dark slide). `decrease` is the first context neutral
528
+ * ({@link chartContextColors}), kept apart from the other two; `labeled` (every bar carries its signed value) lets it be the light gray.
529
+ */
530
+ declare function chartWaterfallColors(surface: string, accent: string, text: string, strong: string | undefined, options?: {
531
+ labeled?: boolean;
532
+ }): {
533
+ total: string;
534
+ increase: string;
535
+ decrease: string;
536
+ };
537
+ /**
538
+ * The two colours of a chart that highlights marks (`chart.highlight`), derived from the theme only: `accent` for the highlighted
539
+ * marks, `muted` for every other mark.
540
+ *
541
+ * - `accent` is the deck's primary colour, kept at >= 3:1 against the surface by `chartColorForFill` (a primary that already has
542
+ * that contrast is returned unchanged).
543
+ * - `muted` is the surface mixed {@link CHART_HIGHLIGHT_MUTED_MIX} of the way towards the text colour: a light grey on a light surface
544
+ * and a dim grey on a dark one, in the surface's own hue. When that falls below {@link CHART_HIGHLIGHT_MUTED_MIN_CONTRAST} against
545
+ * the surface (a surface and text that are close together) the mix moves towards the text colour until it holds.
546
+ *
547
+ * Pure arithmetic on opaque colours: the preview and the PPTX export both call it with the chart panel, the primary and the label
548
+ * colour, so they draw and write the same two colours. An unresolved colour is replaced by white (surface), the surface's own
549
+ * best contrast partner (text) or black (primary).
550
+ */
551
+ declare function chartHighlightColors(surface: string, primary: string, text: string): {
552
+ accent: string;
553
+ muted: string;
554
+ };
555
+ /** LH-03: smallest contrast every mark of an emphasised small chart keeps against its backdrop: a bar is a graphical object (WCAG 1.4.11, 3:1). */
556
+ declare const CHART_EMPHASIS_MIN_CONTRAST = 3;
557
+ /** LH-03: smallest CIE L* step between the emphasised mark and the other marks, so the emphasis is visible. */
558
+ declare const CHART_EMPHASIS_MIN_LIGHTNESS_STEP = 15;
559
+ /**
560
+ * LH-03, LH-95: the two colours of a small chart's emphasis, in the shape of a highlight: `accent` for the emphasised point, `muted` for
561
+ * every other point. The other points keep the series colour (`color`, already adjusted for the backdrop by `chartPaletteForFill`), and
562
+ * the emphasised point takes a stronger shade of it: the series colour mixed away from the backdrop (towards black on a light backdrop,
563
+ * towards white on a dark one) just far enough to stand {@link CHART_EMPHASIS_MIN_LIGHTNESS_STEP} L* from it. Moving away from the
564
+ * backdrop only raises the contrast, so the shade keeps the series colour's. A series colour too close to black (or white) for that
565
+ * step is shaded the other way instead, while the shade keeps {@link CHART_EMPHASIS_MIN_CONTRAST} against the backdrop.
566
+ *
567
+ * LH-105: `strong` is the series colour at full strength when `color` is its soft form ({@link softenChartPalette}). The emphasised point
568
+ * then takes the full-strength colour itself when that already stands the step from the soft one, and a shade of it otherwise, so the
569
+ * strong colour is kept for the emphasis.
570
+ *
571
+ * A faded tint of the other points (LH-03's first rule) needed room between the series colour and the backdrop, and emphasised only 36
572
+ * of the 84 gallery theme x scheme x variant charts; a stronger shade has room in all of them. Undefined only for an unresolved colour or
573
+ * when neither direction keeps both floors. The preview and the PPTX export call it with the same pair.
574
+ */
575
+ declare function chartEmphasisColors(surface: string, color: string, strong?: string): {
576
+ accent: string;
577
+ muted: string;
578
+ } | undefined;
579
+ /** Share of the text colour mixed into the surface for the `surfaceAlt` role. */
580
+ declare const SURFACE_ALT_MIX = 0.1;
581
+ /** Smallest contrast `surfaceAlt` keeps against `surface`, so a band is visible next to a plain row. */
582
+ declare const SURFACE_ALT_MIN_CONTRAST = 1.1;
583
+ /**
584
+ * The `surfaceAlt` colour role: the fill of the banded rows of a table whose other body rows take `surface`. It is the surface
585
+ * mixed {@link SURFACE_ALT_MIX} of the way towards the text colour (a slightly darker band on a light table, a slightly lighter one
586
+ * on a dark table), moved further until it differs from the surface by {@link SURFACE_ALT_MIN_CONTRAST}, while the text keeps
587
+ * 4.5:1 on it. When mixing towards the text cannot keep both (a surface and text that are close together), the band moves the
588
+ * other way, away from the text, which only raises the text contrast. Pure arithmetic on opaque colours, so the preview and
589
+ * the PPTX export, which both resolve the `surfaceAlt` ColorRef from their own `surface` and `text` roles, draw and write the
590
+ * same colour. An unresolved surface is white; an unresolved text colour is the surface's best contrast partner.
591
+ */
592
+ declare function surfaceAltColor(surface: string, text: string): string;
593
+ /** LH-113: share of the accent mixed into the table surface for a highlighted row. */
594
+ declare const TABLE_HIGHLIGHT_MIX = 0.15;
595
+ /**
596
+ * LH-113: the fill of a highlighted table row (`table.highlight`, or the rows the slide's texts name): the table surface mixed
597
+ * {@link TABLE_HIGHLIGHT_MIX} of the way towards the accent (a pale accent tint on a light table, a dark one on a dark table), mixed less
598
+ * when the cell text would fall under 4.5:1 on it (never less readable than on the surface itself). Pure arithmetic on opaque colors, so
599
+ * the preview and the PPTX export, which both pass their own `surface`, accent and text roles, draw and write the same color. An
600
+ * unresolved surface is white, an unresolved accent black, an unresolved text color the surface's best contrast partner.
601
+ */
602
+ declare function tableHighlightColor(surface: string, accent: string, text: string): string;
603
+
604
+ /** The viewBox every resolved icon is drawn in (its larger side is scaled to fit, centered). */
605
+ declare const ICON_VIEWBOX = 24;
606
+ /** An icon reference as written: a set's icon, a deck-local icon or an SVG source. */
607
+ type IconReference = {
608
+ kind: 'set';
609
+ set: string;
610
+ name: string;
611
+ } | {
612
+ kind: 'deck';
613
+ name: string;
614
+ } | {
615
+ kind: 'source';
616
+ src: string;
617
+ };
618
+ /** Parse an `icon` value; undefined when it is none of the three forms. */
619
+ declare function parseIconReference(value: unknown): IconReference | undefined;
620
+ /** One icon of a set record: its path data (drawn as the set's style) or its stroked and filled parts. */
621
+ type IconSetIcon = string | {
622
+ stroke?: string;
623
+ fill?: string;
624
+ };
625
+ /** An icon-set record (https://openpresentation.org/schema/opf-icon-set/v1), embedded or registered. */
626
+ interface IconSetRecord {
627
+ name: string;
628
+ license: string;
629
+ copyright: string;
630
+ viewBox: readonly [number, number, number, number];
631
+ style: 'stroke' | 'fill';
632
+ strokeWidth?: number;
633
+ strokeLinecap?: 'butt' | 'round' | 'square';
634
+ strokeLinejoin?: 'miter' | 'round' | 'bevel';
635
+ icons: Readonly<Record<string, IconSetIcon>>;
636
+ tags?: Readonly<Record<string, readonly string[]>>;
637
+ summary?: string;
638
+ version?: string;
639
+ package?: string;
640
+ homepage?: string;
641
+ licenseText?: string;
642
+ }
643
+ /**
644
+ * A registered catalog's set: its record, or a function that loads it (a module whose default export is the record also does).
645
+ * RR-63: ensureIcons calls a loader with the icons a document draws (`{ icons: [names] }`; a search asks for `{ tags: true }`), and a
646
+ * loader may resolve with only those: a record whose `names` lists every icon of the set and whose `icons` holds the ones asked for
647
+ * (the gallery's sets read one file per icon). A loader that ignores the request resolves with the whole record, as before. An icon
648
+ * asked for that `names` lists and `icons` lacks could not be read: `errors` may give the reason by name (`{ truck: "... answered 404." }`).
649
+ */
650
+ interface IconSetRequest {
651
+ icons?: readonly string[];
652
+ tags?: boolean;
653
+ }
654
+ type IconSetLoader = (request?: IconSetRequest) => Promise<unknown>;
655
+ /** A path command in absolute coordinates: every SVG command is normalized to these four. */
656
+ type IconCommand = ['M', number, number] | ['L', number, number] | ['C', number, number, number, number, number, number] | ['Z'];
657
+ /** One part of a monochrome icon: filled (nonzero, or even-odd), stroked at `stroke` viewBox units, or both, in the one ink. */
658
+ interface IconPart {
659
+ commands: IconCommand[];
660
+ fill?: true;
661
+ evenOdd?: true;
662
+ stroke?: number;
663
+ linecap?: 'butt' | 'round' | 'square';
664
+ linejoin?: 'miter' | 'round' | 'bevel';
665
+ }
666
+ /** A resolved icon: a monochrome glyph (`parts`, in a 0 0 24 24 viewBox) or a multicolor SVG `picture` with its own colors. */
667
+ interface ResolvedIcon {
668
+ /** The reference as written. */
669
+ reference: string;
670
+ kind: IconReference['kind'];
671
+ /** `set` for a set's icon (with `name`), the deck-local name, or the source. */
672
+ set?: string;
673
+ name: string;
674
+ parts?: IconPart[];
675
+ /** A multicolor SVG (sanitized: no script, external reference or raster), drawn contained in the icon's box, with its aspect. */
676
+ picture?: {
677
+ svg: string;
678
+ width: number;
679
+ height: number;
680
+ };
681
+ /** The set's license and copyright, for a set's icon. */
682
+ license?: string;
683
+ copyright?: string;
684
+ }
685
+ type IconResolution = {
686
+ ok: true;
687
+ icon: ResolvedIcon;
688
+ } | {
689
+ ok: false;
690
+ code: 'icon-unknown' | 'icon-invalid' | 'icon-unloaded';
691
+ message: string;
692
+ suggestions?: string[];
693
+ };
694
+ /**
695
+ * SVG path data as absolute M, L, C and Z commands (H and V become lines, S, Q and T cubic curves, arcs cubic curves of at most a
696
+ * quarter turn each). Throws a RangeError for path data that is not well formed.
697
+ */
698
+ declare function iconPathCommands(d: string): IconCommand[];
699
+ /** Path commands as SVG path data (what the preview draws). */
700
+ declare function iconPathData(commands: readonly IconCommand[]): string;
701
+ /** The commands placed in `box` (canvas pixels) from the 0 0 24 24 icon viewBox. */
702
+ declare function placeIconCommands(commands: readonly IconCommand[], box: {
703
+ x: number;
704
+ y: number;
705
+ width: number;
706
+ height: number;
707
+ }): IconCommand[];
708
+ /**
709
+ * An author's or an LLM's SVG as an icon. A script, an event handler, an external reference (`href`, `url()` or `@import` that is not
710
+ * a fragment) or a raster refuses it (`icon-invalid`): nothing is fetched or run. An SVG whose shapes (path, circle, ellipse, rect,
711
+ * line, polyline, polygon, in groups with transforms) are drawn in one paint (a color or `currentColor`, opacity 1) is a monochrome
712
+ * glyph: its shapes become path commands in the 0 0 24 24 viewBox (normalized from its own viewBox, or its width and height), drawn in
713
+ * the accent. Any other SVG (several colors, gradients, text, opacity) is a picture with its own colors.
714
+ */
715
+ declare function iconFromSvg(text: string): {
716
+ ok: true;
717
+ parts?: IconPart[];
718
+ picture?: ResolvedIcon['picture'];
719
+ } | {
720
+ ok: false;
721
+ message: string;
722
+ };
723
+ /** Every `icon` value of a document (or a slide), with its dotted path: list entries, metrics and groups at any depth. */
724
+ declare function documentIcons(input: unknown): {
725
+ path: string;
726
+ value: unknown;
727
+ }[];
728
+ /** Up to `limit` names nearest to `name`: names that contain it or that it contains first, then the fewest edits. */
729
+ declare function nearIconNames(name: string, names: Iterable<string>, limit?: number): string[];
730
+ interface IconOptions {
731
+ /** The catalogs the host registered: their `iconSets` (records or loaders) are where `<set>:<name>` resolves after the document's own. */
732
+ catalogs?: readonly unknown[];
733
+ }
734
+ /**
735
+ * Resolve one `icon` value. The order: a deck-local name in the document's `icons`; a set's icon in the sets the document embeds
736
+ * (`catalogs.<group>.iconSets`), then in the registered catalogs' sets (records, or the sets ensureIcons loaded); a source through
737
+ * the document's assets, as a data URI or the text ensureIcons read. `icon-unknown` (with near names) when the set or name is not
738
+ * found, `icon-invalid` for a value or an SVG that cannot be an icon, `icon-unloaded` for a registered set or a source that
739
+ * ensureIcons has not loaded yet (not a problem of the document).
740
+ */
741
+ declare function resolveIcon(document: unknown, value: unknown, options?: IconOptions): IconResolution;
742
+ /**
743
+ * What ensureIcons loads: the registered sets the document names that are not loaded yet, and the SVG files it has not read. An icon
744
+ * whose load failed is not pending (RR-63): it is settled, drawn as missing with its `opf/icon-unknown` finding.
745
+ */
746
+ declare function iconsPending(document: unknown, options?: IconOptions): {
747
+ sets: string[];
748
+ sources: string[];
749
+ };
750
+ /**
751
+ * Load what a document's icons need before the synchronous code reads them: each registered set it names that is a loader (the
752
+ * gallery's sets load on first use, so a deck that draws no icon never loads one), and, with `readSource`, each SVG file it names (an
753
+ * asset, a relative path or an HTTPS URL; core never fetches by itself). Resolves with the sets and sources it loaded. Cheap when
754
+ * nothing is pending. opf-pptx's `toPptx`, the renderer's browser fonts handle, core's Node file API, the CLI and the MCP call it.
755
+ *
756
+ * It never rejects for an icon (RR-63): an icon whose loader fails is settled with the reason, so the deck draws without it and its
757
+ * finding (`opf/icon-unknown`) names the icon and the reason; a later call does not ask again. `retry: true` asks again for the
758
+ * document's failed icons (a host's "try again" after it fixed the files or the connection).
759
+ */
760
+ declare function ensureIcons(document: unknown, options?: IconOptions & {
761
+ readSource?: (source: string) => Promise<string | Uint8Array | undefined>;
762
+ retry?: boolean;
763
+ }): Promise<{
764
+ sets: string[];
765
+ sources: string[];
766
+ }>;
767
+ /**
768
+ * Embed the set icons a document uses: each set's icons it names go under `catalogs.default.iconSets.<id>` (the set's license,
769
+ * copyright, viewBox and style, and only those icons), so the document draws them with no registered catalog. The group is the one
770
+ * the set's catalog is the source of: `default` when the document's default has that source or names none (it is then given the
771
+ * source), else `custom`. A registered set embeds once it is loaded (ensureIcons). Returns a copy, and the `<set>:<name>` added.
772
+ */
773
+ declare function embedIcons(document: unknown, options?: IconOptions): {
774
+ document: unknown;
775
+ added: string[];
776
+ };
777
+ /** The color of an icon's chip or glyph: the slide's primary with a DrawingML luminance transform, or a scheme slot. */
778
+ interface IconPaint {
779
+ hex: string;
780
+ role: 'primary' | 'bg1' | 'tx1';
781
+ lumMod?: number;
782
+ lumOff?: number;
783
+ }
784
+ /** LH-14: on a light slide the chip is the primary lightened to 20% of its luminance plus 80% (PowerPoint's "Lighter 80%"). */
785
+ declare const ICON_CHIP_TINT: {
786
+ readonly lumMod: 20000;
787
+ readonly lumOff: 80000;
788
+ };
789
+ /** The least contrast of an icon's glyph against its chip (WCAG 1.4.11, graphical objects). */
790
+ declare const ICON_MIN_CONTRAST = 3;
791
+ /**
792
+ * LH-14: the chip and glyph colors of an icon, as Claude Design draws an icon chip. On a light slide: a chip in a light tint of the
793
+ * primary (ICON_CHIP_TINT) with the glyph in the primary; on a dark one the inverse: a primary chip with the glyph in the scheme
794
+ * color that reads best on it (readableSchemeColor). A glyph under ICON_MIN_CONTRAST against its chip takes the text color instead.
795
+ * The export writes the primary as its theme accent with the same transform, so the icon recolors with the theme.
796
+ */
797
+ declare function iconColors(roles: Pick<ResolvedColorRoles, 'primary' | 'text' | 'background'>, dark: boolean): {
798
+ chip: IconPaint;
799
+ glyph: IconPaint;
800
+ };
801
+
802
+ /**
803
+ * OPF 0.15 content references and their one resolution rule (FA-20). Catalog-free: this module reads the document's
804
+ * own `catalogs` groups and the catalogs a host registers, never any bundled data, and it never fetches.
805
+ *
806
+ * A reference is a bare `id` or `name:id`. A bare id resolves in `catalogs.custom`, then in the records embedded
807
+ * under `catalogs.default`, then in the registered catalog for `default.source` (the first registered catalog when
808
+ * the document omits `default`; nothing when `default` is false). `name:id` resolves in `catalogs.<name>`, then in
809
+ * the registered catalog for its source. A reference written inside an embedded record resolves in that record's
810
+ * own group first.
811
+ */
812
+
813
+ /** The content kinds a catalog group holds, keyed by id. */
814
+ declare const catalogKinds: readonly ["layouts", "themes", "colorSchemes", "fontSchemes", "narratives", "audiences", "purposes", "tones"];
815
+ type CatalogKind = (typeof catalogKinds)[number];
816
+ /** A content reference: a bare id or `name:id`. */
817
+ declare const CATALOG_REFERENCE_PATTERN: RegExp;
818
+ /** A catalog group name. `default` and `custom` are reserved. */
819
+ declare const CATALOG_GROUP_PATTERN: RegExp;
820
+ /** Records of one kind, keyed by id. */
821
+ type CatalogRecordMap = Readonly<Record<string, Readonly<Record<string, unknown>>>>;
822
+ /** A catalog's records by kind, then by id: the shape of a document's `catalogs.<group>` without `source`. */
823
+ type CatalogRecords = {
824
+ readonly [K in CatalogKind]?: CatalogRecordMap;
825
+ };
826
+ /** A catalog a host registers. `source` is matched against `catalogs.<group>.source`. */
827
+ interface Catalog extends CatalogRecords {
828
+ /** The catalog's identity: an HTTPS URL or a `pkg:` reference. Never fetched. */
829
+ readonly source: string;
830
+ /**
831
+ * LH-14: the icon sets an `icon` names as `<set>:<name>`, by set id: each the set's record (opf-icon-set/v1 without `$schema`
832
+ * and `id`), or a function that loads it (`galleryIconSets()` of @openpresentation/gallery/icon-sets: `ensureIcons` calls it with
833
+ * `{ icons: [names] }`, the icons a deck draws, and the gallery reads only those; a search asks `{ tags: true }`). See icons.ts.
834
+ */
835
+ readonly iconSets?: Readonly<Record<string, Readonly<Record<string, unknown>> | IconSetLoader>>;
836
+ }
837
+ /** The one option every entry point that resolves references accepts. */
838
+ interface CatalogOptions {
839
+ /**
840
+ * Catalogs the host registered, matched by `source`. The first is the host default: bare ids use it when the
841
+ * document omits `catalogs.default`. Omitted or empty: only the records the document embeds resolve.
842
+ */
843
+ catalogs?: readonly Catalog[];
844
+ }
845
+ /** A reference that resolved. */
846
+ interface ResolvedReference {
847
+ kind: CatalogKind;
848
+ /** The reference as written. */
849
+ reference: string;
850
+ /** The record's key. */
851
+ id: string;
852
+ /** The group it resolved in: `custom`, `default` or a named group. */
853
+ group: string;
854
+ /** That group's source (the host default's source for an omitted `default`). */
855
+ source?: string;
856
+ /** `document` when the record is embedded, `host` when it came from a registered catalog. */
857
+ origin: 'document' | 'host';
858
+ record: Record<string, unknown>;
859
+ }
860
+ /**
861
+ * Where a resolved record came from, without the record itself: what an engine records as provenance
862
+ * (`resolveSlideContext().resolved.provenance`, `resolveDesignRecords().provenance`).
863
+ */
864
+ type RecordProvenance = Omit<ResolvedReference, 'record'>;
865
+ /** Reported when a reference resolves nowhere. Never thrown, except under `strictReferences`. */
866
+ interface UnresolvedReferenceDiagnostic {
867
+ code: 'unresolved-reference';
868
+ kind: CatalogKind;
869
+ /** The reference as written, such as `acme:hero`. */
870
+ reference: string;
871
+ /** Where it is written, dotted: `slides.3.layout`, `design.theme`, `catalogs.acme.themes.brand.colorScheme`. */
872
+ path: string;
873
+ /** The group the reference names: its prefix, or `default` for a bare id. */
874
+ group: string;
875
+ /** That group's source, when one is known. */
876
+ source?: string;
877
+ /** What the engine uses instead: automatic composition (layouts) or the engine default record. */
878
+ fallback: 'automatic' | 'engine-default';
879
+ message: string;
880
+ }
881
+ /** Thrown by `resolveSlideContext` and `paginate` under `strictReferences` when a reference resolves nowhere. */
882
+ /**
883
+ * Thrown by every entry point that takes the `catalogs` option when it is not an array of registered catalogs
884
+ * (`{ source: string, <kind>: { <id>: record } }` with known kinds). `code` is always `invalid-catalogs`.
885
+ */
886
+ declare class OPFCatalogsOptionError extends TypeError {
887
+ readonly code = "invalid-catalogs";
888
+ constructor(entry: string, detail: string);
889
+ }
890
+ declare class OPFUnresolvedReferenceError extends Error {
891
+ readonly diagnostics: UnresolvedReferenceDiagnostic[];
892
+ constructor(diagnostics: UnresolvedReferenceDiagnostic[]);
893
+ }
894
+ /** Split a reference into its group prefix and id; undefined for anything that is not a reference. */
895
+ declare function parseReference(reference: unknown): {
896
+ group?: string;
897
+ id: string;
898
+ } | undefined;
899
+ /**
900
+ * The source of group `name` as resolution uses it: the group's own `source`, or for an omitted (or source-less)
901
+ * `default` the first registered catalog's source. Undefined for `custom`, for `default: false` and for an
902
+ * undeclared named group.
903
+ */
904
+ declare function catalogGroupSource(document: unknown, name: string, options?: CatalogOptions): string | undefined;
905
+ /**
906
+ * Resolve one reference. `group` is the group of the record the reference is written in, which is searched first.
907
+ * Undefined when the reference is malformed, names an undeclared group or resolves nowhere.
908
+ */
909
+ declare function resolveReference(document: unknown, kind: CatalogKind, reference: unknown, options?: CatalogOptions & {
910
+ group?: string;
911
+ }): ResolvedReference | undefined;
912
+ /** The diagnostic for a reference that resolves nowhere, naming the reference and the source it was looked for in. */
913
+ declare function unresolvedReference(document: unknown, kind: CatalogKind, reference: string, path: string, options?: CatalogOptions): UnresolvedReferenceDiagnostic;
914
+ /** One place a document writes a content reference. */
915
+ interface CatalogReferenceSite {
916
+ kind: CatalogKind;
917
+ /** The reference as written. */
918
+ reference: string;
919
+ /** JSON Pointer segments of the string. */
920
+ path: readonly (string | number)[];
921
+ /** For a reference written inside an embedded record: that record's group, searched first. */
922
+ group?: string;
923
+ }
924
+ /**
925
+ * Every content reference a document writes, in document order: the root narrative, audience, purpose and tone, the
926
+ * deck and slide languages' font schemes, their designs, each slide's layout, and (with `records`) the references
927
+ * inside embedded records. Free-form audience and purpose text is not a reference and is not listed.
928
+ */
929
+ declare function catalogReferenceSites(document: unknown, options?: {
930
+ records?: boolean;
931
+ slides?: boolean;
932
+ }): CatalogReferenceSite[];
933
+ /** Records a picker can offer for `kind`: the document's embedded records, then those of the registered catalogs its groups name, with the reference to write for each. */
934
+ declare function catalogRecords(document: unknown, kind: CatalogKind, options?: CatalogOptions): ResolvedReference[];
935
+
936
+ export { CHART_SERIES_TINT_MIX as $, resolveReference as A, unresolvedReference as B, CARD_BORDER_MIX as G, CARD_SURFACE_MIN_CONTRAST as H, CARD_SURFACE_MIX as J, CARD_TEXT_MIN_CONTRAST as K, CHART_CONTEXT_FOCUS_DIFFERENCE as L, CHART_CONTEXT_LABELED_MIN_CONTRAST as M, CHART_CONTEXT_MIN_CONTRAST as N, OPFCatalogsOptionError as O, CHART_DARK_SERIES_MIN_CONTRAST as P, CHART_EMPHASIS_MIN_CONTRAST as Q, CHART_EMPHASIS_MIN_LIGHTNESS_STEP as S, CHART_HIGHLIGHT_MUTED_MIN_CONTRAST as T, CHART_HIGHLIGHT_MUTED_MIX as V, CHART_LEAD_LIGHTNESS_STEP as W, CHART_SERIES_MIN_DIFFERENCE as X, CHART_SERIES_MIN_LIGHTNESS_STEP as Y, CHART_SERIES_SOFT_MIX as Z, CHART_SERIES_TIER_SIZE as _, isFixedBackground as a$, CHART_SLICE_MAX_SHIFT as a0, CHART_SLICE_SEPARATOR_PX as a1, CODE_PANEL_DARK_SHADE as a2, chartContextColor as aA, chartContextColors as aB, chartEmphasisColors as aC, chartFocusContextColors as aD, chartHighlightColors as aE, chartPaletteForFill as aF, chartSchemeSeries as aG, chartSeriesLabelColor as aH, chartSeriesPalette as aI, chartSeriesStrokes as aJ, chartSlicePlan as aK, chartSoftColors as aL, chartWaterfallColors as aM, clrMapAttributes as aN, colorContrast as aO, colorMapFor as aP, colorTransform as aQ, deckBackgroundIsFixed as aR, defaultSlideBackground as aS, documentIcons as aT, emphasisSurface as aU, iconColors as aV, iconFromSvg as aW, iconPathCommands as aX, iconPathData as aY, isColorVariant as aZ, isDarkColor as a_, DARK_BACKGROUND_LUMINANCE as ab, EMPHASIS_SURFACE_MIN_CONTRAST as ac, EMPHASIS_TEXT_MIN_CONTRAST as ad, ICON_CHIP_TINT as af, ICON_MIN_CONTRAST as ag, ICON_VIEWBOX as ah, NEUTRAL_SHARES as an, SURFACE_ALT_MIN_CONTRAST as ar, SURFACE_ALT_MIX as as, TABLE_HIGHLIGHT_MIX as av, applyColorTransform as aw, applyHslTransforms as ax, applyLuminance as ay, chartColorForFill as az, layoutColorVariant as b0, layoutVariantApplies as b1, normalizeColorVariant as b2, normalizeHexColor as b3, placeIconCommands as b4, readableSchemeColor as b5, resolveChartColors as b6, resolveColorRef as b7, resolveColorRoles as b8, softenChartPalette as b9, surfaceAltColor as ba, tableHighlightColor as bb, textColorForFill as bc, CATALOG_GROUP_PATTERN as e, CATALOG_REFERENCE_PATTERN as f, OPFUnresolvedReferenceError as m, catalogGroupSource as p, catalogKinds as q, catalogRecords as r, catalogReferenceSites as s, embedIcons as t, ensureIcons as u, iconsPending as v, nearIconNames as w, parseIconReference as x, parseReference as y, resolveIcon as z };
937
+ export type { Catalog as C, ChartColorContext as D, IconPart as E, IconPaint as F, IconOptions as I, ResolvedColorRoles as R, UnresolvedReferenceDiagnostic as U, CatalogKind as a, ChartPaletteOptions as a3, ChartSlicePlan as a4, ChartSoftColor as a5, ColorAccentSlot as a6, ColorBaseSlot as a7, ColorMap as a8, ColorVariantBackground as a9, ColorVariantInput as aa, EmphasisSurface as ae, IconCommand as ai, IconSetIcon as aj, IconSetLoader as ak, LayoutVariantDeck as al, LayoutVariantRole as am, ResolveColorRefOptions as ao, ResolveColorRefRoles as ap, ResolveColorRolesOptions as aq, SchemeColor as at, SchemeNeutrals as au, ColorVariant as b, RecordProvenance as c, CatalogOptions as d, CatalogRecordMap as g, CatalogRecords as h, CatalogReferenceSite as i, IconReference as j, IconResolution as k, IconSetRecord as l, ResolvedIcon as n, ResolvedReference as o };