@openpresentation/opf 0.33.0 → 0.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/browser.js +20 -19
- package/dist/catalog-refs-CoIrOdAw.d.ts +937 -0
- package/dist/{catalog-schemas-CQTM-G8p.d.ts → catalog-schemas-FjLRPtjB.d.ts} +1 -1
- package/dist/{chart-data-oIZQlFGi.d.ts → chart-data-B_k-WTex.d.ts} +7 -4
- package/dist/{chunk-XIOC6N5P.js → chunk-244OPLAV.js} +1 -1
- package/dist/{chunk-KVHNDHVS.js → chunk-2B6GLT2O.js} +1 -1
- package/dist/{chunk-VMBLNCX2.js → chunk-6PMXVP5G.js} +117 -30
- package/dist/{chunk-BI4ERFAA.js → chunk-AAWHOCXS.js} +48 -13
- package/dist/{chunk-QD6DPS7X.js → chunk-ABA2D6X5.js} +2 -2
- package/dist/{chunk-UK3J6FSU.js → chunk-AEHDXNZX.js} +862 -269
- package/dist/{chunk-DAS75LGR.js → chunk-AGYPRTEC.js} +4 -4
- package/dist/chunk-BLCDUM7B.js +7 -0
- package/dist/{chunk-OPVJLL7H.js → chunk-CJVKOJ6B.js} +11841 -8687
- package/dist/{chunk-Y557TYML.js → chunk-CQXBGZQP.js} +19 -16
- package/dist/{chunk-VKEYV3ZK.js → chunk-FCSYIBVR.js} +2 -2
- package/dist/{chunk-PJSPHHRK.js → chunk-FK5XG742.js} +3 -16
- package/dist/{chunk-R6C6BQOG.js → chunk-HHVQ2SDT.js} +1 -1
- package/dist/{chunk-ABWEUXLV.js → chunk-L3MCLD3X.js} +117 -21
- package/dist/{chunk-QF5RSRXU.js → chunk-LCT5ZV3Q.js} +750 -199
- package/dist/{chunk-E7WQHMCL.js → chunk-MAFJ5O2D.js} +16 -14
- package/dist/{chunk-XANW7MB7.js → chunk-MUILZGRY.js} +4 -4
- package/dist/chunk-NLJFNCZ4.js +1560 -0
- package/dist/{chunk-VSBZC2PR.js → chunk-SR6T4LKI.js} +3 -3
- package/dist/chunk-UJZN2ZH6.js +1 -0
- package/dist/{chunk-IJXKVM4W.js → chunk-VDZXNNZF.js} +1 -1
- package/dist/{chunk-YYT6N7AI.js → chunk-WCPDN7AY.js} +1 -1
- package/dist/{chunk-S5QRGMUQ.js → chunk-X72WPTST.js} +6 -6
- package/dist/{chunk-INIMUBSE.js → chunk-XJUMFH33.js} +1 -1
- package/dist/{chunk-YS333HLA.js → chunk-XLSWZSQS.js} +2 -2
- package/dist/{composition-zMiIgzip.d.ts → composition-CvtvgBDE.d.ts} +1360 -1531
- package/dist/composition.d.ts +3 -3
- package/dist/composition.js +2 -1
- package/dist/conversion-CSQ5EHD2.js +25 -0
- package/dist/{conversion-mNth9XKm.d.ts → conversion-CyNRlWGw.d.ts} +25 -7
- package/dist/convert.d.ts +4 -4
- package/dist/convert.js +15 -11
- package/dist/data.d.ts +2 -2
- package/dist/data.js +3 -2
- package/dist/{deck-report-BSlRiR0_.d.ts → deck-report-BVlQZ42f.d.ts} +3 -3
- package/dist/deck.d.ts +6 -6
- package/dist/deck.js +12 -11
- package/dist/diagram-engine-eager.js +5 -1
- package/dist/diagram-engine-lazy.js +13 -0
- package/dist/diagram-plantuml-XRZ6VAOL.js +3 -0
- package/dist/diff.js +5 -4
- package/dist/docs.js +65 -53
- package/dist/examples.js +4070 -1083
- package/dist/font-policy.js +1 -1
- package/dist/format.js +2 -2
- package/dist/ids.js +5 -4
- package/dist/index.d.ts +18 -16
- package/dist/index.js +35 -24
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.js +9 -8
- package/dist/node-engine.d.ts +43 -11
- package/dist/node-engine.js +45 -26
- package/dist/{pagination-CYzNMazO.d.ts → pagination-CZQQYk7L.d.ts} +4 -3
- package/dist/pagination.d.ts +4 -4
- package/dist/pagination.js +5 -4
- package/dist/patch.js +4 -3
- package/dist/precompiled.js +2 -2
- package/dist/{presentation-CXhfpB_z.d.ts → presentation-s9262acV.d.ts} +357 -230
- package/dist/repo-readme.js +1 -1
- package/dist/schema-engine-ajv.js +1 -1
- package/dist/schema-engine-precompiled.js +2 -2
- package/dist/schema.d.ts +3 -3
- package/dist/schema.js +4 -3
- package/dist/schemas.d.ts +16 -0
- package/dist/schemas.js +1 -1
- package/dist/shape-engine-eager.js +2 -2
- package/dist/shape-engine-lazy.js +1 -1
- package/dist/{shape-engine-module-BK7JNEUV.js → shape-engine-module-N74FCHGY.js} +2 -2
- package/dist/shape-geometry.js +1 -1
- package/dist/source.d.ts +10 -5
- package/dist/source.js +11 -10
- package/dist/spec/reference/engine-vocabularies.json +135 -0
- package/dist/spec/reference/font-policy.json +3 -16
- package/dist/spec/reference/preset-geometry.json +3 -3
- package/dist/spec/schemas/icon-set.schema.json +1 -1
- package/dist/spec/schemas/layout.schema.json +71 -25
- package/dist/spec/schemas/opf.schema.json +540 -168
- package/dist/spec/schemas/theme.schema.json +11 -5
- package/dist/types.d.ts +81 -73
- package/dist/{validation-types-COwTel3H.d.ts → validation-types-CYbsUuZ9.d.ts} +8 -5
- package/dist/validator.d.ts +34 -7
- package/dist/validator.js +4 -3
- package/dist/yaml.d.ts +2 -2
- package/dist/yaml.js +8 -7
- package/package.json +6 -6
- package/dist/catalog-refs-B_0_vZg0.d.ts +0 -134
- package/dist/chunk-ZXOIGUHX.js +0 -1
- package/dist/conversion-POHRAMSN.js +0 -24
|
@@ -1,17 +1,91 @@
|
|
|
1
|
-
import { R as ResolvedChartData, D as DataCellValue, e as DataDiagnostic } from './chart-data-
|
|
2
|
-
import {
|
|
1
|
+
import { R as ResolvedChartData, D as DataCellValue, e as DataDiagnostic } from './chart-data-B_k-WTex.js';
|
|
2
|
+
import { d as CatalogOptions, D as ChartColorContext, b as ColorVariant, E as IconPart, F as IconPaint } from './catalog-refs-CoIrOdAw.js';
|
|
3
3
|
import { ShapePathFill, CustomPathInput } from './shape-geometry.js';
|
|
4
4
|
|
|
5
|
+
interface Box$b {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
}
|
|
11
|
+
type NativeTreeKind = 'org-chart' | 'hierarchy';
|
|
12
|
+
interface NativeTreeNode {
|
|
13
|
+
index: number;
|
|
14
|
+
level: number;
|
|
15
|
+
parent?: number;
|
|
16
|
+
box: Box$b;
|
|
17
|
+
background?: Box$b;
|
|
18
|
+
}
|
|
19
|
+
interface NativeTreeConnector {
|
|
20
|
+
parent: number;
|
|
21
|
+
child: number;
|
|
22
|
+
box: Box$b;
|
|
23
|
+
points: readonly [number, number][];
|
|
24
|
+
}
|
|
25
|
+
interface NativeTreeGeometry {
|
|
26
|
+
ok: true;
|
|
27
|
+
nodes: NativeTreeNode[];
|
|
28
|
+
connectors: NativeTreeConnector[];
|
|
29
|
+
}
|
|
30
|
+
type NativeTreeGeometryResult = NativeTreeGeometry | {
|
|
31
|
+
ok: false;
|
|
32
|
+
reason: string;
|
|
33
|
+
index?: number;
|
|
34
|
+
};
|
|
35
|
+
/** SH21 geometry measured in PowerPoint, including paired Hierarchy cards and semantic connector paths; eligibility is separate. */
|
|
36
|
+
declare function nativeTreeGeometry(kind: NativeTreeKind, frame: Box$b, entries: readonly unknown[]): NativeTreeGeometryResult;
|
|
37
|
+
|
|
38
|
+
/** SH-21: list-entry levels are a single-root tree's zero-based parent depth. Preserve source order and never infer a missing parent. */
|
|
39
|
+
interface ArrangementTreeNode {
|
|
40
|
+
index: number;
|
|
41
|
+
level: number;
|
|
42
|
+
parent?: number;
|
|
43
|
+
children: number[];
|
|
44
|
+
}
|
|
45
|
+
type ArrangementTreeResult = {
|
|
46
|
+
ok: true;
|
|
47
|
+
nodes: ArrangementTreeNode[];
|
|
48
|
+
} | {
|
|
49
|
+
ok: false;
|
|
50
|
+
reason: string;
|
|
51
|
+
index?: number;
|
|
52
|
+
};
|
|
53
|
+
/** Build a semantic tree without changing any authored entry. A caller must retain/refuse an invalid source rather than reparent it. */
|
|
54
|
+
declare function arrangementTree(entries: readonly unknown[]): ArrangementTreeResult;
|
|
55
|
+
|
|
56
|
+
/** SH-21: Basic Venn's geometry, measured in 20 frame sizes for each of 1 to 7 entries.
|
|
57
|
+
* One to four entries put text inside their circles. Five to seven put labels around the circles; the labels are not the node outlines.
|
|
58
|
+
* All coordinates below are proportions of a fitted frame, independent of text or slide size. No entry count is clamped.
|
|
59
|
+
*/
|
|
60
|
+
interface VennBox {
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
width: number;
|
|
64
|
+
height: number;
|
|
65
|
+
}
|
|
66
|
+
interface VennNode {
|
|
67
|
+
index: number;
|
|
68
|
+
box: VennBox;
|
|
69
|
+
textBox: VennBox;
|
|
70
|
+
preset: 'ellipse';
|
|
71
|
+
adjust: 0;
|
|
72
|
+
beside?: true;
|
|
73
|
+
}
|
|
74
|
+
/** PowerPoint's Basic Venn nodes in any nonempty frame; counts outside the measured 1–7 domain are refused. */
|
|
75
|
+
declare function vennNodes(frame: VennBox, count: number): VennNode[];
|
|
76
|
+
|
|
5
77
|
/** Canonical table grid. No renderer, fonts, DOM or network dependencies. */
|
|
78
|
+
/** One cell border as engines read it. The document's `'none'` is a border of no width; an omitted color or width is the table rule's own. */
|
|
6
79
|
interface TableBorder {
|
|
7
|
-
color
|
|
8
|
-
width
|
|
80
|
+
color?: unknown;
|
|
81
|
+
width?: number;
|
|
9
82
|
dash?: 'solid' | 'dash' | 'dot';
|
|
10
83
|
}
|
|
11
84
|
interface TableCellStyle {
|
|
12
85
|
fill?: string;
|
|
13
86
|
color?: string;
|
|
14
87
|
bold?: boolean;
|
|
88
|
+
/** Logical, in the engine's words: `left` is the start edge (the document writes `start`) and `right` the end edge (`end`). */
|
|
15
89
|
align?: 'left' | 'center' | 'right';
|
|
16
90
|
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
17
91
|
padding?: Partial<Record<'top' | 'right' | 'bottom' | 'left', number>>;
|
|
@@ -91,6 +165,8 @@ declare function chartTextSize(geometry: {
|
|
|
91
165
|
scale: number;
|
|
92
166
|
minFontSize?: number;
|
|
93
167
|
}): number;
|
|
168
|
+
/** Rebuild bounded native-axis ticks without overflowing an otherwise finite axis span or tick product. */
|
|
169
|
+
declare function chartAxisScale(axis: ChartValueAxis | undefined): ChartScale | undefined;
|
|
94
170
|
/** LH-119: a labeled line with a hidden value axis drops zero when its minimum is at least this share of its maximum (5/6 otherwise). */
|
|
95
171
|
declare const CHART_LABELED_ZERO_SHARE = 0.75;
|
|
96
172
|
/** LH-59: an axis ends at most this fraction of the plotted range above the data maximum (1.25 x the maximum on a zero-based axis). */
|
|
@@ -167,7 +243,7 @@ interface ChartAxisGeometry {
|
|
|
167
243
|
language?: string;
|
|
168
244
|
/** LH-119: the chart is a line whose points carry their value labels and whose value axis is hidden (the small chart, LH-03). */
|
|
169
245
|
labeled?: boolean;
|
|
170
|
-
/** LH-110: values the axis must hold besides the data (
|
|
246
|
+
/** LH-110: values the axis must hold besides the data (explicit reference lines). */
|
|
171
247
|
include?: readonly number[];
|
|
172
248
|
}
|
|
173
249
|
/**
|
|
@@ -187,6 +263,11 @@ interface ChartAxisGeometry {
|
|
|
187
263
|
* the usual chart (a plot of ten tick labels or more) all of them give the same ten intervals.
|
|
188
264
|
*/
|
|
189
265
|
declare function chartValueAxis(chart: unknown, resolved: ResolvedChartData, geometry: ChartAxisGeometry): ChartValueAxis | undefined;
|
|
266
|
+
/** Shared scales for a combo. References affect only their own axis; both engines consume these exact bounds. */
|
|
267
|
+
declare function chartComboAxes(chart: unknown, resolved: ResolvedChartData, geometry: ChartAxisGeometry): {
|
|
268
|
+
value: ChartValueAxis;
|
|
269
|
+
secondary?: ChartValueAxis;
|
|
270
|
+
} | undefined;
|
|
190
271
|
/** LH-33: a chart whose value axis {@link shareSiblingChartAxes} may share: the chart object and the axis composition gave it. */
|
|
191
272
|
interface SiblingChart {
|
|
192
273
|
value: unknown;
|
|
@@ -204,6 +285,11 @@ interface SiblingChart {
|
|
|
204
285
|
* (LH-93 gives each one plot height, chart-plot.ts).
|
|
205
286
|
*/
|
|
206
287
|
declare function shareSiblingChartAxes<T extends SiblingChart>(charts: readonly T[], document?: unknown): T[][];
|
|
288
|
+
/** A value's stable fraction of a numeric axis; preview marks and data-point anchors share this arithmetic. */
|
|
289
|
+
declare function chartAxisFraction(value: number, axis: {
|
|
290
|
+
min: number;
|
|
291
|
+
max: number;
|
|
292
|
+
}, reverse?: boolean): number;
|
|
207
293
|
|
|
208
294
|
/** LH-105: what the slide title names: series (indices among the plotted series) or categories (row indices). */
|
|
209
295
|
interface ChartLayerFocus {
|
|
@@ -270,7 +356,7 @@ interface ChartLayerRows {
|
|
|
270
356
|
left: number;
|
|
271
357
|
right: number;
|
|
272
358
|
}
|
|
273
|
-
type Box$
|
|
359
|
+
type Box$a = {
|
|
274
360
|
x: number;
|
|
275
361
|
y: number;
|
|
276
362
|
width: number;
|
|
@@ -285,7 +371,7 @@ type Box$8 = {
|
|
|
285
371
|
*/
|
|
286
372
|
declare function alignBarRows(data: Extract<ResolvedChartData, {
|
|
287
373
|
ok: true;
|
|
288
|
-
}>, box: Box$
|
|
374
|
+
}>, box: Box$a, rows: readonly Box$a[], centers: readonly number[], options: {
|
|
289
375
|
scale: number;
|
|
290
376
|
minFontSize?: number;
|
|
291
377
|
header?: number;
|
|
@@ -294,7 +380,7 @@ declare function alignBarRows(data: Extract<ResolvedChartData, {
|
|
|
294
380
|
measure: (text: string, size: number) => number;
|
|
295
381
|
}): ChartLayerRows | undefined;
|
|
296
382
|
|
|
297
|
-
interface Box$
|
|
383
|
+
interface Box$9 {
|
|
298
384
|
x: number;
|
|
299
385
|
y: number;
|
|
300
386
|
width: number;
|
|
@@ -302,7 +388,7 @@ interface Box$7 {
|
|
|
302
388
|
}
|
|
303
389
|
/** The geometry a chart's plot is laid out with. Lengths are slide pixels. */
|
|
304
390
|
interface ChartPlotGeometry {
|
|
305
|
-
box: Box$
|
|
391
|
+
box: Box$9;
|
|
306
392
|
/** `min(slide width, slide height) / 720`. */
|
|
307
393
|
scale: number;
|
|
308
394
|
minFontSize?: number;
|
|
@@ -312,7 +398,7 @@ interface ChartPlotGeometry {
|
|
|
312
398
|
language?: string;
|
|
313
399
|
}
|
|
314
400
|
/**
|
|
315
|
-
* LH-93: the inner plot box of a column, line or
|
|
401
|
+
* LH-93: the inner plot box of a column, line, area or combo chart, and the active-option horizontal bar fallback for explicit references, laid
|
|
316
402
|
* out the way the preview lays it out (opf-render charts.js): below the header row (LH-81) or a top legend, above a bottom legend, the
|
|
317
403
|
* category axis title and the category labels (one line, two, or turned: core reproduces the preview's choice), right of the value
|
|
318
404
|
* axis title and the value tick labels (the composed axis's ticks in the first series' format; half a text size when a small chart drops
|
|
@@ -321,12 +407,13 @@ interface ChartPlotGeometry {
|
|
|
321
407
|
*/
|
|
322
408
|
declare function chartPlotInset(chart: unknown, resolved: ResolvedChartData, composed: {
|
|
323
409
|
valueAxis?: ChartValueAxis;
|
|
410
|
+
secondaryValueAxis?: ChartValueAxis;
|
|
324
411
|
layer?: ChartLayer;
|
|
325
412
|
}, geometry: ChartPlotGeometry): ChartPlotInset | undefined;
|
|
326
413
|
/** LH-93: a chart of a shared set: its object, its box and what composition gave it. */
|
|
327
414
|
interface SiblingPlotChart {
|
|
328
415
|
value: unknown;
|
|
329
|
-
box: Box$
|
|
416
|
+
box: Box$9;
|
|
330
417
|
chart?: {
|
|
331
418
|
valueAxis?: ChartValueAxis;
|
|
332
419
|
layer?: ChartLayer;
|
|
@@ -345,7 +432,72 @@ interface SiblingPlotChart {
|
|
|
345
432
|
*/
|
|
346
433
|
declare function shareSiblingPlots(sets: readonly (readonly SiblingPlotChart[])[], geometryFor: (item: SiblingPlotChart) => Omit<ChartPlotGeometry, 'box'>, document?: unknown): void;
|
|
347
434
|
|
|
348
|
-
|
|
435
|
+
/** The chart types with one numeric value axis for every series: the clustered category charts and combo. */
|
|
436
|
+
declare const CHART_REFERENCE_TYPES: ReadonlySet<string>;
|
|
437
|
+
|
|
438
|
+
interface ChartReference {
|
|
439
|
+
value: number;
|
|
440
|
+
axis: 'value' | 'secondary';
|
|
441
|
+
label?: string;
|
|
442
|
+
labelPosition: 'start' | 'end';
|
|
443
|
+
stroke: {
|
|
444
|
+
color?: unknown;
|
|
445
|
+
width: number;
|
|
446
|
+
dash: 'solid' | 'dash' | 'dot';
|
|
447
|
+
};
|
|
448
|
+
/** Original authored stroke, retained only while native paint is unchanged. */
|
|
449
|
+
authoredStroke?: unknown;
|
|
450
|
+
}
|
|
451
|
+
interface Box$8 {
|
|
452
|
+
x: number;
|
|
453
|
+
y: number;
|
|
454
|
+
width: number;
|
|
455
|
+
height: number;
|
|
456
|
+
}
|
|
457
|
+
interface ChartReferenceLine extends ChartReference {
|
|
458
|
+
index: number;
|
|
459
|
+
x1: number;
|
|
460
|
+
y1: number;
|
|
461
|
+
x2: number;
|
|
462
|
+
y2: number;
|
|
463
|
+
/** Slide pixels, without changing the authored reference-pixel width. */
|
|
464
|
+
strokeWidth: number;
|
|
465
|
+
native: boolean;
|
|
466
|
+
endpoint: number;
|
|
467
|
+
labelBox?: Box$8;
|
|
468
|
+
labelSide?: 'above' | 'below' | 'left' | 'right';
|
|
469
|
+
labelAlign?: 'left' | 'right' | 'center';
|
|
470
|
+
/** RR-105: the label could not avoid a mark at either end, so it stands on a plate of the chart's surface color. */
|
|
471
|
+
labelPlate?: boolean;
|
|
472
|
+
}
|
|
473
|
+
interface ChartReferenceDiagnostic {
|
|
474
|
+
index: number;
|
|
475
|
+
code: 'chart-reference-label-overflow' | 'chart-reference-label-collision';
|
|
476
|
+
message: string;
|
|
477
|
+
}
|
|
478
|
+
interface ChartLayerReferences {
|
|
479
|
+
lines: ChartReferenceLine[];
|
|
480
|
+
diagnostics: ChartReferenceDiagnostic[];
|
|
481
|
+
}
|
|
482
|
+
/** Read only explicit properties; never parse text, suppress duplicates or impose a line cap. */
|
|
483
|
+
declare function chartReferences(chart: unknown): ChartReference[];
|
|
484
|
+
/** The authored position (`referenceLines.<n>`) of each reference chartReferences keeps, in its order: an entry without a finite value is skipped. */
|
|
485
|
+
declare function chartReferenceSources(chart: unknown): number[];
|
|
486
|
+
/** The same category-center span for SVG and native helpers; bars and singleton categories use full-plot overlays. */
|
|
487
|
+
declare function placeReferences(refs: readonly ChartReference[], data: ResolvedChartData, axes: {
|
|
488
|
+
value: ChartValueAxis;
|
|
489
|
+
secondary?: ChartValueAxis;
|
|
490
|
+
}, box: Box$8, inset: {
|
|
491
|
+
left: number;
|
|
492
|
+
top: number;
|
|
493
|
+
right: number;
|
|
494
|
+
bottom: number;
|
|
495
|
+
}, geometry: Omit<ChartPlotGeometry, 'box'> & {
|
|
496
|
+
horizontal?: boolean;
|
|
497
|
+
chartType?: string;
|
|
498
|
+
}): ChartLayerReferences | undefined;
|
|
499
|
+
|
|
500
|
+
interface Box$7 {
|
|
349
501
|
x: number;
|
|
350
502
|
y: number;
|
|
351
503
|
width: number;
|
|
@@ -376,7 +528,7 @@ declare function waterfallRoles(values: readonly (number | null)[]): (WaterfallR
|
|
|
376
528
|
*/
|
|
377
529
|
declare function waterfallLabelText(value: number, format: string | undefined, role: WaterfallRole | null, group?: {
|
|
378
530
|
language?: string;
|
|
379
|
-
}): string;
|
|
531
|
+
}, language?: string | undefined): string;
|
|
380
532
|
/**
|
|
381
533
|
* LH-107: the number format a native waterfall label shows a step with: the column's format (its first section; General without one)
|
|
382
534
|
* after a `+` for a gain and a U+2212 minus for a loss, as `waterfallLabelText` prints it. A total keeps the column's own format.
|
|
@@ -402,7 +554,7 @@ interface ChartValueListRow {
|
|
|
402
554
|
name: string;
|
|
403
555
|
value: string;
|
|
404
556
|
bold?: boolean;
|
|
405
|
-
box: Box$
|
|
557
|
+
box: Box$7;
|
|
406
558
|
}
|
|
407
559
|
/**
|
|
408
560
|
* LH-125: a doughnut with one focused slice prints that slice's value in its hole, large and bold in the slice's color, with the slice's
|
|
@@ -413,24 +565,24 @@ interface ChartValueListHole {
|
|
|
413
565
|
row: number;
|
|
414
566
|
value: {
|
|
415
567
|
text: string;
|
|
416
|
-
box: Box$
|
|
568
|
+
box: Box$7; /** The text size in slide pixels. */
|
|
417
569
|
size: number;
|
|
418
570
|
};
|
|
419
571
|
name?: {
|
|
420
572
|
text: string;
|
|
421
|
-
box: Box$
|
|
573
|
+
box: Box$7;
|
|
422
574
|
};
|
|
423
575
|
}
|
|
424
576
|
/** LH-108: the value list beside a pie or one-series doughnut. Boxes are slide pixels. */
|
|
425
577
|
interface ChartLayerValueList {
|
|
426
578
|
/** The square the pie (or doughnut) fills. */
|
|
427
|
-
pie: Box$
|
|
579
|
+
pie: Box$7;
|
|
428
580
|
/** LH-125: the focused slice's value in a doughnut's hole. */
|
|
429
581
|
hole?: ChartValueListHole;
|
|
430
582
|
/** The values' unit above the value column (the value column's name or the value axis title), at the end of the list's first line. */
|
|
431
583
|
header?: {
|
|
432
584
|
text: string;
|
|
433
|
-
box: Box$
|
|
585
|
+
box: Box$7;
|
|
434
586
|
};
|
|
435
587
|
rows: ChartValueListRow[];
|
|
436
588
|
/** The swatch side and the space after it. */
|
|
@@ -453,7 +605,7 @@ declare function chartValueList(chart: unknown, data: ResolvedChartData, geometr
|
|
|
453
605
|
/** LH-182: a doughnut's square and its hole, in slide pixels. */
|
|
454
606
|
interface ChartLayerDoughnut {
|
|
455
607
|
/** The square the doughnut fills (its outer diameter): the preview draws it there and the PPTX export pins the plot area to it. */
|
|
456
|
-
pie: Box$
|
|
608
|
+
pie: Box$7;
|
|
457
609
|
/** The hole, half the doughnut's radius (`c:holeSize` 50), which both engines fill with the surface the chart stands on. */
|
|
458
610
|
hole: {
|
|
459
611
|
cx: number;
|
|
@@ -464,10 +616,9 @@ interface ChartLayerDoughnut {
|
|
|
464
616
|
/**
|
|
465
617
|
* LH-182: where a doughnut (the drawn type: a doughnut, or nested rings of a pie or doughnut of several series) is drawn, so its hole can
|
|
466
618
|
* be filled with the surface the chart stands on (`surface`): a deck watermark or a background motif behind the chart otherwise shows
|
|
467
|
-
* through the hole, and only in the hole. With a value list (LH-108) the doughnut fills the list's square.
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
-
* has no square (its hole stays open in both engines).
|
|
619
|
+
* through the hole, and only in the hole. With a value list (LH-108) the doughnut fills the list's square. Otherwise the square is the
|
|
620
|
+
* preview's: the box less its padding, header and category legend (at its explicit position, otherwise the end; none when the slices
|
|
621
|
+
* carry their names, LH-105), 90% of half the shorter side. Explicit inside-ring labels keep the same plot and a filled hole.
|
|
471
622
|
*/
|
|
472
623
|
declare function chartDoughnut(chart: unknown, data: ResolvedChartData, geometry: ChartLayerGeometry, layer: ChartLayer | undefined): ChartLayerDoughnut | undefined;
|
|
473
624
|
/** LH-109: one series name beside the last column or band (LH-125: above the first bar): its swatch and name in `box`, centered on its segment's middle when it can be. */
|
|
@@ -475,7 +626,7 @@ interface ChartStackName {
|
|
|
475
626
|
series: number;
|
|
476
627
|
name: string;
|
|
477
628
|
bold?: boolean;
|
|
478
|
-
box: Box$
|
|
629
|
+
box: Box$7;
|
|
479
630
|
}
|
|
480
631
|
/** LH-125: one end point of a stacked area drawn inside the band at the plot's edge: the value as the column's format prints it, `align`ed to that edge. */
|
|
481
632
|
interface ChartStackEnd {
|
|
@@ -483,7 +634,7 @@ interface ChartStackEnd {
|
|
|
483
634
|
row: number;
|
|
484
635
|
text: string;
|
|
485
636
|
align: 'left' | 'right';
|
|
486
|
-
box: Box$
|
|
637
|
+
box: Box$7;
|
|
487
638
|
}
|
|
488
639
|
/** LH-109: how a stacked column, bar or area chart labels itself. */
|
|
489
640
|
interface ChartLayerStack {
|
|
@@ -521,7 +672,7 @@ interface ChartLayerStack {
|
|
|
521
672
|
* closer than a text line, within the plot. `relaxed` places them however far they move (after a shared plot moved them); otherwise a name
|
|
522
673
|
* moved more than a line from its segment fails, and the chart keeps its legend.
|
|
523
674
|
*/
|
|
524
|
-
declare function placeStackNames(chart: unknown, data: ResolvedChartData, axis: ChartValueAxis, box: Box$
|
|
675
|
+
declare function placeStackNames(chart: unknown, data: ResolvedChartData, axis: ChartValueAxis, box: Box$7, plotInset: {
|
|
525
676
|
left: number;
|
|
526
677
|
top: number;
|
|
527
678
|
right: number;
|
|
@@ -533,10 +684,9 @@ declare function placeStackNames(chart: unknown, data: ResolvedChartData, axis:
|
|
|
533
684
|
* LH-93: the inner plot of a horizontal bar chart (clustered, stacked or 100% stacked) without chart options, as an inset from its chart
|
|
534
685
|
* box, laid out as the preview lays it out (horizontalStackPlot): a side legend only for two series or more without a header legend, and
|
|
535
686
|
* a small chart's value labels (LH-03, no value axis) keep the widest label's room beyond the longest bar. Undefined for a chart with
|
|
536
|
-
* options
|
|
537
|
-
* or a chart drawn on a table's rows (LH-115): those keep their own plot.
|
|
687
|
+
* options or a chart drawn on a table's rows (LH-115): those keep their own plot. Stacked marks are refitted after sharing (refreshChartMarks).
|
|
538
688
|
*/
|
|
539
|
-
declare function horizontalBarPlot(chart: unknown, data: ResolvedChartData, layer: ChartLayer | undefined, axis: ChartValueAxis, box: Box$
|
|
689
|
+
declare function horizontalBarPlot(chart: unknown, data: ResolvedChartData, layer: ChartLayer | undefined, axis: ChartValueAxis, box: Box$7, geometry: Omit<ChartPlotGeometry, 'box'>): ChartPlotInset | undefined;
|
|
540
690
|
/**
|
|
541
691
|
* LH-109, LH-125: the stacked-chart layer and value axis, or undefined for another chart.
|
|
542
692
|
*
|
|
@@ -556,79 +706,26 @@ declare function chartStack(chart: unknown, data: ResolvedChartData, layer: Char
|
|
|
556
706
|
* else the header it had), and the values that fit their segments are decided again against the aligned plot (the rows' span and the
|
|
557
707
|
* gutter and value labels the preview leaves). Any other layer is returned with its `rows`.
|
|
558
708
|
*/
|
|
559
|
-
declare function restackForRows(chart: unknown, data: ResolvedChartData, layer: ChartLayer, rows: ChartLayerRows, box: Box$
|
|
560
|
-
|
|
561
|
-
interface ChartReferenceLine {
|
|
562
|
-
value: number;
|
|
563
|
-
text: string;
|
|
564
|
-
y: number;
|
|
565
|
-
x1: number;
|
|
566
|
-
x2: number;
|
|
567
|
-
label: Box$6;
|
|
568
|
-
}
|
|
569
|
-
/** LH-110: the shaded band of the period (category) the title names. Slide pixels. */
|
|
570
|
-
interface ChartReferenceBand {
|
|
571
|
-
row: number;
|
|
572
|
-
box: Box$6;
|
|
573
|
-
}
|
|
574
|
-
/** LH-110: the reference marks of a chart. */
|
|
575
|
-
interface ChartLayerReferences {
|
|
576
|
-
lines: ChartReferenceLine[];
|
|
577
|
-
bands: ChartReferenceBand[];
|
|
578
|
-
}
|
|
579
|
-
/**
|
|
580
|
-
* LH-110: what the slide title (and subtitle) `text` names for reference marks, or undefined: `lines`, the numbers it compares the data
|
|
581
|
-
* with (an English comparison right before the number, as `COMPARISON` lists) that no plotted value equals at the precision written, of
|
|
582
|
-
* the value axis' kind (a percent only on a percent column) and within the data's range widened by its span on each side; `rows`, the one
|
|
583
|
-
* category it names after a time preposition ("in 2023", "since March") on a line or area chart whose categories run in time. Column,
|
|
584
|
-
* line and area charts (not stacked) take lines; line and area charts take bands. English titles only; `highlight` keeps the chart as
|
|
585
|
-
* authored.
|
|
586
|
-
*/
|
|
587
|
-
declare function chartTitleReferences(chart: unknown, data: ResolvedChartData, options?: {
|
|
588
|
-
text?: string;
|
|
589
|
-
language?: string;
|
|
590
|
-
}): {
|
|
591
|
-
lines: {
|
|
592
|
-
value: number;
|
|
593
|
-
text: string;
|
|
594
|
-
}[];
|
|
595
|
-
rows: number[];
|
|
596
|
-
} | undefined;
|
|
597
|
-
/**
|
|
598
|
-
* LH-110: the reference marks for a plot: each line across the plot at its value, its label bold at the plot's start (the right end right to
|
|
599
|
-
* left), under the line when the first point lies above it and the label fits under it, else over it; each band 60% of its category's
|
|
600
|
-
* width over the plot's height. The value axis must hold every line's value (composition widens it).
|
|
601
|
-
*/
|
|
602
|
-
declare function placeReferences(refs: {
|
|
603
|
-
lines: readonly {
|
|
604
|
-
value: number;
|
|
605
|
-
text: string;
|
|
606
|
-
}[];
|
|
607
|
-
rows: readonly number[];
|
|
608
|
-
}, data: ResolvedChartData, axis: ChartValueAxis, box: Box$6, plotInset: {
|
|
609
|
-
left: number;
|
|
610
|
-
top: number;
|
|
611
|
-
right: number;
|
|
612
|
-
bottom: number;
|
|
613
|
-
}, geometry: Omit<ChartPlotGeometry, 'box'> & {
|
|
614
|
-
bold?: (text: string, size: number) => number;
|
|
615
|
-
}): ChartLayerReferences | undefined;
|
|
709
|
+
declare function restackForRows(chart: unknown, data: ResolvedChartData, layer: ChartLayer, rows: ChartLayerRows, box: Box$7, axis: ChartValueAxis | undefined, geometry: Omit<ChartPlotGeometry, 'box'>): ChartLayer;
|
|
710
|
+
|
|
616
711
|
/** A composed chart item, as composition hands it to {@link refreshChartMarks}. */
|
|
617
712
|
interface ComposedChartItem$1 {
|
|
618
713
|
value: unknown;
|
|
619
|
-
box: Box$
|
|
714
|
+
box: Box$7;
|
|
620
715
|
chart?: {
|
|
621
716
|
valueAxis?: ChartValueAxis;
|
|
717
|
+
secondaryValueAxis?: ChartValueAxis;
|
|
622
718
|
layer?: ChartLayer;
|
|
623
719
|
};
|
|
624
720
|
}
|
|
625
721
|
/**
|
|
626
722
|
* LH-109, LH-110 with LH-93: after sibling charts share one plot height, the names beside a stacked chart's last column, an area's end
|
|
627
|
-
* values (LH-125) and the reference marks are placed again against the chart's new plot.
|
|
723
|
+
* values (LH-125) and the reference marks are placed again against the chart's new plot. Horizontal stacks refit their names and value
|
|
724
|
+
* labels. Returns true when a names-to-legend or hidden-to-visible-axis fallback changed the plot, requiring another sharing pass.
|
|
628
725
|
*/
|
|
629
726
|
declare function refreshChartMarks(items: readonly ComposedChartItem$1[], geometryFor: (item: ComposedChartItem$1) => Omit<ChartPlotGeometry, 'box'> & {
|
|
630
727
|
bold?: (text: string, size: number) => number;
|
|
631
|
-
}, document?: unknown):
|
|
728
|
+
}, document?: unknown): boolean;
|
|
632
729
|
|
|
633
730
|
/** Each bin of a binned histogram gets this many chart text sizes of plot width, so its rotated label reads beside its neighbors. */
|
|
634
731
|
declare const HISTOGRAM_LABEL_SLOT = 1.8;
|
|
@@ -641,6 +738,14 @@ interface HistogramBin {
|
|
|
641
738
|
count: number;
|
|
642
739
|
label: string;
|
|
643
740
|
}
|
|
741
|
+
/** Sorted signed Pareto bars and their positive-only cumulative share, shared by preview and native export. */
|
|
742
|
+
declare function paretoPlan<T extends {
|
|
743
|
+
value: number;
|
|
744
|
+
}>(input: readonly T[]): {
|
|
745
|
+
bars: T[];
|
|
746
|
+
total: number;
|
|
747
|
+
cumulative: number[];
|
|
748
|
+
};
|
|
644
749
|
/** LH-160: what composition decides for a histogram or Pareto chart. Absent keys keep the engines' defaults. */
|
|
645
750
|
interface ChartLayerHistogram {
|
|
646
751
|
/** The bin count of a lone value column (`cx:binCount`): Scott's count, or fewer when the labels would not fit. */
|
|
@@ -697,6 +802,43 @@ interface ChartNumericAxes {
|
|
|
697
802
|
/** The same chart-text size, padding, legend and axis-title bands the preview reserves. */
|
|
698
803
|
declare function chartNumericAxes(chart: unknown, data: ResolvedChartData, geometry: ChartLayerGeometry, layer?: ChartLayer): ChartNumericAxes | undefined;
|
|
699
804
|
|
|
805
|
+
interface Box$6 {
|
|
806
|
+
x: number;
|
|
807
|
+
y: number;
|
|
808
|
+
width: number;
|
|
809
|
+
height: number;
|
|
810
|
+
}
|
|
811
|
+
/** The geometry a radar is laid out in (chart-layer.ts ChartLayerGeometry). */
|
|
812
|
+
interface RadarGeometry {
|
|
813
|
+
box: Box$6;
|
|
814
|
+
scale: number;
|
|
815
|
+
minFontSize?: number;
|
|
816
|
+
measure: (text: string, size: number, weight: 400 | 700) => number;
|
|
817
|
+
}
|
|
818
|
+
/** RR-105: a radar's layout, read by both engines: where its legend stands and its value axis. */
|
|
819
|
+
interface ChartLayerRadar {
|
|
820
|
+
/** `bottom`: the legend is a row under the web; `right`: at the side (the default chart legend). */
|
|
821
|
+
legend: 'right' | 'bottom';
|
|
822
|
+
/**
|
|
823
|
+
* A bottom legend's band (slide pixels): its rows of entries centered across the box, `pad` above the box's bottom edge; the web and its
|
|
824
|
+
* labels are laid out in the box above it. The PPTX export writes it as the legend's manual layout.
|
|
825
|
+
*/
|
|
826
|
+
legendBox?: Box$6;
|
|
827
|
+
/** The value axis (ticks from `min` to `max` every `majorUnit`), which the PPTX export writes as the radar's c:valAx scaling. */
|
|
828
|
+
axis: {
|
|
829
|
+
min: number;
|
|
830
|
+
max: number;
|
|
831
|
+
majorUnit: number;
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
/** The legend moves under the web only when the web grows by at least this share, so a radar near the balance keeps its side legend. */
|
|
835
|
+
declare const RADAR_BOTTOM_LEGEND_GAIN = 1.1;
|
|
836
|
+
/**
|
|
837
|
+
* The layout of a radar chart (`radar`, `radar-with-markers`, `filled-radar`) in `geometry.box`, or undefined for any other chart. A chart
|
|
838
|
+
* with an authored `legend` keeps it: only the default legend of two or more series may move under the web.
|
|
839
|
+
*/
|
|
840
|
+
declare function chartRadarLayout(chart: unknown, data: ResolvedChartData, geometry: RadarGeometry): ChartLayerRadar | undefined;
|
|
841
|
+
|
|
700
842
|
/** A small chart has at most this many series (LH-03). */
|
|
701
843
|
declare const SMALL_CHART_MAX_SERIES = 2;
|
|
702
844
|
/**
|
|
@@ -802,10 +944,12 @@ interface ChartLayer {
|
|
|
802
944
|
doughnut?: ChartLayerDoughnut;
|
|
803
945
|
/** LH-109: a stacked column or area chart's values inside its segments and series names beside its last column (chart-marks.ts). */
|
|
804
946
|
stack?: ChartLayerStack;
|
|
805
|
-
/**
|
|
947
|
+
/** Explicit numeric references and their independent authored strokes (chart-references.ts). */
|
|
806
948
|
references?: ChartLayerReferences;
|
|
807
949
|
/** LH-160: a histogram's bin count and edge decimals, and whether its data labels fit (chart-histogram.ts). */
|
|
808
950
|
histogram?: ChartLayerHistogram;
|
|
951
|
+
/** RR-105: a radar's legend placement and value axis (chart-radar.ts). */
|
|
952
|
+
radar?: ChartLayerRadar;
|
|
809
953
|
}
|
|
810
954
|
/** LH-105: one series name at the end of its line. Lengths are slide pixels. */
|
|
811
955
|
interface ChartEndLabel {
|
|
@@ -909,6 +1053,11 @@ interface ChartBarGeometry {
|
|
|
909
1053
|
* evenly before and after the bars.
|
|
910
1054
|
*/
|
|
911
1055
|
declare function chartBarGeometry(band: number, seriesCount: number, grouping: string | undefined): ChartBarGeometry;
|
|
1056
|
+
/**
|
|
1057
|
+
* LH-176/SH-25: source series within one native bar cluster. A reversed vertical category axis also reverses the physical
|
|
1058
|
+
* left-to-right series slots; horizontal categories keep their top-to-bottom series order. Stacks occupy one slot in either direction.
|
|
1059
|
+
*/
|
|
1060
|
+
declare function chartBarSeriesOffset(bar: ChartBarGeometry, series: number, count: number, reversedColumn?: boolean): number;
|
|
912
1061
|
/**
|
|
913
1062
|
* LH-03, LH-142: true when the chart draws no value axis: no tick labels, gridlines or value axis line, because its labels carry the values
|
|
914
1063
|
* (a small chart's value labels, a horizontal stacked bar chart's segment values). Both engines read this one answer.
|
|
@@ -940,13 +1089,21 @@ type DesignHintKey = typeof DESIGN_HINT_KEYS[number];
|
|
|
940
1089
|
declare const THEME_DESIGN_KEYS: readonly ["titleAlignment", "contentAlignment", "contentBox", "contentDirection", "imageFit", "listBullet", "listStyle"];
|
|
941
1090
|
/** Where an effective design hint came from: the slide's own `design`, the deck's `design`, the resolved theme record, or the slide's layout record. */
|
|
942
1091
|
type DesignHintSource = 'slide' | 'deck' | 'theme' | 'layout';
|
|
943
|
-
/**
|
|
1092
|
+
/** A design alignment as a document writes it: logical, so `start` is the left edge of a left-to-right deck and the right edge of a right-to-left one. */
|
|
1093
|
+
type DesignAlignment = 'start' | 'center' | 'end';
|
|
1094
|
+
/**
|
|
1095
|
+
* The engine's word for a design alignment. Composed items keep `left` for the start edge and `right` for the end edge
|
|
1096
|
+
* (`physicalAlignment` resolves them against each paragraph's direction), so a consumer of `SlideComposition.design`
|
|
1097
|
+
* that needs an item alignment converts with this. Any other value is `undefined`.
|
|
1098
|
+
*/
|
|
1099
|
+
declare const itemAlignment: (value: unknown) => "left" | "center" | "right" | undefined;
|
|
1100
|
+
/** The effective value of every shared design key, in the document's words. A key nobody sets is absent, so the engine default applies. */
|
|
944
1101
|
interface DesignHints {
|
|
945
|
-
titleAlignment?:
|
|
946
|
-
contentAlignment?:
|
|
1102
|
+
titleAlignment?: DesignAlignment;
|
|
1103
|
+
contentAlignment?: DesignAlignment;
|
|
947
1104
|
contentBox?: boolean;
|
|
948
1105
|
contentDirection?: 'horizontal' | 'vertical';
|
|
949
|
-
chartPrimary?: 'none' | 'top' | 'bottom' | '
|
|
1106
|
+
chartPrimary?: 'none' | 'top' | 'bottom' | 'start' | 'end';
|
|
950
1107
|
imageFit?: 'cover' | 'contain' | 'stretch' | 'auto';
|
|
951
1108
|
listBullet?: 'character' | 'image' | 'none';
|
|
952
1109
|
/** LH-08: how list entries are arranged: stacked (`stack`) or as ruled rows (`rows`). Absent: automatic (rows for a list of short labels with descriptions). */
|
|
@@ -989,34 +1146,323 @@ interface ResolveDesignHintsOptions {
|
|
|
989
1146
|
declare function resolveDesignHints(options?: ResolveDesignHintsOptions): ResolvedDesignHints;
|
|
990
1147
|
|
|
991
1148
|
/**
|
|
992
|
-
*
|
|
993
|
-
* dimensions. `direction` says whether the record's `regions` are placed side by side (`row`) or stacked (`column`); an
|
|
994
|
-
* entry is a region (`name`, `size`, the content rules) or a split (`direction`, `regions`, `size`) that lays its own
|
|
995
|
-
* regions out the other way. The list is the reading order. This module parses and checks a record and compiles the tree
|
|
996
|
-
* into the grid the engine composes with (rows, columns, a cell grid of area names and the region rules); binding content
|
|
997
|
-
* to regions is `bindRegions` (bind-regions.ts) and the geometry is `composeSlide`.
|
|
1149
|
+
* SH-09: the pyramid and matrix arrangements of a layout region (`arrangement: "pyramid" | "matrix"` on a layout record's region).
|
|
998
1150
|
*
|
|
999
|
-
* A
|
|
1151
|
+
* A lone list of one level in such a region is drawn as a diagram: a pyramid of stacked levels (the first entry at the apex) or a
|
|
1152
|
+
* 2 x 2 matrix of quadrants in a square. The geometry is PowerPoint's own for its Basic Pyramid and Basic Matrix SmartArt layouts,
|
|
1153
|
+
* measured through COM (SH-09 spike, 2026-11-06), so the PPTX export can write the arrangement as live SmartArt that PowerPoint lays out
|
|
1154
|
+
* exactly as the preview draws it:
|
|
1155
|
+
*
|
|
1156
|
+
* - pyramid of n levels in a frame W x H: level i (1-based, top to bottom) is H/n tall and W·i/n wide, centered; its sides continue
|
|
1157
|
+
* one slope (each side steps in by W/(2n) from its bottom edge to its top edge), so the apex is a triangle and the others are
|
|
1158
|
+
* trapezoids. PowerPoint's text rectangle is the apex's whole box, and 0.65 of a lower level's width (centered, full height).
|
|
1159
|
+
* - matrix: a square of side min(W, H) centered in the frame, a diamond filling it, and four rounded squares (quadrants 1 to 4: top
|
|
1160
|
+
* left, top right, bottom left, bottom right) 0.39 of its side, 0.095 in from its edges and 0.03 apart. A matrix holds at most four
|
|
1161
|
+
* entries; a quadrant without one is still drawn, empty. A quadrant's text rectangle is its rounded rectangle's own (DrawingML
|
|
1162
|
+
* `roundRect` at its default adjustment).
|
|
1163
|
+
*
|
|
1164
|
+
* Text: one size for every node, the list's fitted size or larger, never smaller. PowerPoint insets each node's text by a share of its
|
|
1165
|
+
* font size (ARRANGEMENT_TEXT_MARGIN); lines are centered, the block in the middle of its rectangle.
|
|
1166
|
+
*
|
|
1167
|
+
* This module is pure geometry and paint: composeSlide places the text (SlideComposition.arrangements) and both engines draw from it.
|
|
1000
1168
|
*/
|
|
1001
|
-
/** The
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
declare const
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1169
|
+
/** The arrangements a region can ask for. */
|
|
1170
|
+
/** SH-17's linear arrangements (linear-arrangements.ts has their geometry). */
|
|
1171
|
+
declare const LINEAR_ARRANGEMENTS: readonly ["chevrons", "flow", "vertical-flow"];
|
|
1172
|
+
declare const ARRANGEMENTS: readonly ["pyramid", "matrix", "cycle", "org-chart", "hierarchy", "venn", "chevrons", "flow", "vertical-flow"];
|
|
1173
|
+
type Arrangement = typeof ARRANGEMENTS[number];
|
|
1174
|
+
/** The most entries each arrangement draws as its own shapes: a pyramid's levels, a matrix's quadrants (other counts draw cards). */
|
|
1175
|
+
declare const ARRANGEMENT_MAX: Readonly<Record<Arrangement, number>>;
|
|
1176
|
+
/** A matrix draws its quadrants for exactly this many entries; other counts draw a grid of cards (at most ARRANGEMENT_CARDS_MAX). */
|
|
1177
|
+
declare const MATRIX_ENTRIES = 4;
|
|
1178
|
+
declare const ARRANGEMENT_CARDS_MAX = 8;
|
|
1179
|
+
/** A card's text inset, as a share of the font size. */
|
|
1180
|
+
declare const CARD_TEXT_MARGIN = 0.6;
|
|
1181
|
+
/** PowerPoint's SmartArt layout each arrangement matches (the `loTypeId` of a live SmartArt export). */
|
|
1182
|
+
declare const SMART_ART_LAYOUTS: Readonly<Record<Arrangement, string>>;
|
|
1183
|
+
/** The name PowerPoint gives each layout, and what a finding calls one node of each arrangement. */
|
|
1184
|
+
declare const SMART_ART_NAMES: Readonly<Record<Arrangement, {
|
|
1185
|
+
layout: string;
|
|
1186
|
+
nodes: string;
|
|
1187
|
+
}>>;
|
|
1188
|
+
/** A node's text inset on every side, as a share of its font size (PowerPoint's: 0.1 em in a pyramid level or a cycle's circle, 0.3 em in a quadrant). */
|
|
1189
|
+
declare const ARRANGEMENT_TEXT_MARGIN: Readonly<Record<Arrangement, number>>;
|
|
1190
|
+
/** A lower pyramid level's text rectangle is this share of its width, centered (the apex's is its whole box). */
|
|
1191
|
+
declare const PYRAMID_TEXT_WIDTH = 0.65;
|
|
1192
|
+
/** Matrix proportions, as shares of the square's side: the quadrant's side, its inset from the square's edge and the gap between two. */
|
|
1193
|
+
declare const MATRIX_QUADRANT = 0.39;
|
|
1194
|
+
declare const MATRIX_INSET = 0.095;
|
|
1195
|
+
declare const MATRIX_GAP = 0.03;
|
|
1196
|
+
/** DrawingML `roundRect`'s default adjustment (16667 of 100000): the corner radius as a share of the smaller side. */
|
|
1197
|
+
declare const ROUND_RECT_ADJUST = 16667;
|
|
1198
|
+
/** The text of an arrangement may grow to this many times the list's fitted size, while every node still holds its entry. */
|
|
1199
|
+
declare const ARRANGEMENT_GROWTH = 1.5;
|
|
1200
|
+
/** The outline of every node, in points (PowerPoint's 1.5 pt line in the slide's background color). */
|
|
1201
|
+
declare const ARRANGEMENT_LINE_POINTS = 1.5;
|
|
1202
|
+
/** The matrix's diamond is the primary color lightened by this share (DrawingML lumMod 1 - L, lumOff L). */
|
|
1203
|
+
declare const MATRIX_BACKGROUND_LIGHTEN = 0.8;
|
|
1204
|
+
/** The widest pyramid frame, as a multiple of its height: a wider region centers a frame of this proportion. */
|
|
1205
|
+
declare const PYRAMID_MAX_ASPECT = 2.5;
|
|
1206
|
+
interface Box$4 {
|
|
1207
|
+
x: number;
|
|
1208
|
+
y: number;
|
|
1209
|
+
width: number;
|
|
1210
|
+
height: number;
|
|
1211
|
+
}
|
|
1212
|
+
/** One node of an arrangement: its shape's box, its DrawingML preset and adjustment, and the rectangle PowerPoint sets its text in. */
|
|
1213
|
+
interface ArrangementNode {
|
|
1214
|
+
/** 0-based: the pyramid's level from the top, the matrix's quadrant (top left, top right, bottom left, bottom right). */
|
|
1215
|
+
index: number;
|
|
1216
|
+
box: Box$4;
|
|
1217
|
+
/** DrawingML preset: `trapezoid` for a pyramid level (the apex too, as PowerPoint writes it), `roundRect` for a quadrant or a box, `ellipse` for a cycle's circle, `chevron` (SH-17). */
|
|
1218
|
+
preset: 'trapezoid' | 'roundRect' | 'ellipse' | 'chevron' | 'rect';
|
|
1219
|
+
/** SH21: Hierarchy's rounded rear card; the entry's main box is its foreground card. */
|
|
1220
|
+
background?: Box$4;
|
|
1221
|
+
/** The preset's `adj` (of 100000): a trapezoid's inset over its smaller side, a rounded rectangle's corner. */
|
|
1222
|
+
adjust: number;
|
|
1223
|
+
/** The outline as a polygon (a pyramid level), in the same units as `box`; absent for a rounded rectangle (`radius`). */
|
|
1224
|
+
points?: [number, number][];
|
|
1225
|
+
/** A rounded rectangle's corner radius. */
|
|
1226
|
+
radius?: number;
|
|
1227
|
+
/** The rectangle the node's text is set in (before the text margin): PowerPoint's in the SmartArt design. */
|
|
1228
|
+
textBox: Box$4;
|
|
1229
|
+
/** OPF's pyramid: the text sits beside its level, outside the shape, so the shape's outline does not bound it. */
|
|
1230
|
+
beside?: true;
|
|
1231
|
+
/** SH-17: the shape is mirrored (a chevron pointing left, in a right-to-left deck). */
|
|
1232
|
+
flip?: true;
|
|
1233
|
+
/** The downward pyramid mirrors only its trapezoid, never its text. */
|
|
1234
|
+
flipV?: true;
|
|
1235
|
+
}
|
|
1236
|
+
/** The frame a pyramid takes in `area`: all of it, or a centered frame PYRAMID_MAX_ASPECT times as wide as tall when the area is wider. */
|
|
1237
|
+
declare function pyramidFrame(area: Box$4): Box$4;
|
|
1238
|
+
/** The levels of a pyramid of `count` entries in `frame`, the apex first (PowerPoint's Basic Pyramid). */
|
|
1239
|
+
declare function pyramidNodes(frame: Box$4, count: number, direction?: 'up' | 'down'): ArrangementNode[];
|
|
1240
|
+
/** The square of a matrix in `frame` (its diamond's box). */
|
|
1241
|
+
declare function matrixSquare(frame: Box$4): Box$4;
|
|
1242
|
+
/** The four quadrants of a matrix in `frame` (PowerPoint's Basic Matrix), whatever the number of entries. */
|
|
1243
|
+
declare function matrixNodes(frame: Box$4): ArrangementNode[];
|
|
1244
|
+
/** OPF's pyramid, at its start: the share of the area's width the steps take, at most this many times its height. */
|
|
1245
|
+
declare const PYRAMID_STEPS_SHARE = 0.4;
|
|
1246
|
+
declare const PYRAMID_STEPS_ASPECT = 1.6;
|
|
1014
1247
|
/**
|
|
1015
|
-
*
|
|
1016
|
-
*
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1248
|
+
* OPF's own pyramid design, drawn where PowerPoint's does not hold the entries at the list's size: the levels as a stepped pyramid of
|
|
1249
|
+
* rounded bars at the start of `area` (level i of n is i/n of the steps' width, centered on one axis, `gap` apart), and each entry's
|
|
1250
|
+
* text beside its level, in one column across the rest of the area, vertically centered on its level.
|
|
1251
|
+
*/
|
|
1252
|
+
declare function pyramidSteps(area: Box$4, count: number, gap: number, radius: number, direction?: 'up' | 'down'): ArrangementNode[];
|
|
1253
|
+
/** OPF's own matrix design: four rounded quadrants filling `area` two by two, `gap` apart (rectangular where the area is). */
|
|
1254
|
+
declare function matrixQuadrants(area: Box$4, gap: number): ArrangementNode[];
|
|
1255
|
+
/**
|
|
1256
|
+
* The grid of cards a matrix of other than four entries draws: `columns` cards a row (core cardGridColumns), every row full but the
|
|
1257
|
+
* last, whose cards keep the others' width and are centered; the cards fill `area`, `gap` apart, with corner `radius`.
|
|
1258
|
+
*/
|
|
1259
|
+
declare function cardNodes(area: Box$4, count: number, columns: number, gap: number, radius: number): ArrangementNode[];
|
|
1260
|
+
/**
|
|
1261
|
+
* The width of a node's shape across a horizontal line `y` (a pyramid level narrows toward its top edge); a quadrant's full width,
|
|
1262
|
+
* less its rounded corners where `y` is within a radius of its top or bottom edge.
|
|
1263
|
+
*/
|
|
1264
|
+
declare function nodeWidthAt(node: ArrangementNode, y: number): number;
|
|
1265
|
+
/** A scheme color slot (as a PPTX theme names it) with the hex it resolves to on the slide and an optional luminance transform. */
|
|
1266
|
+
interface ArrangementColor {
|
|
1267
|
+
slot: 'accent1' | 'bg1' | 'tx1';
|
|
1268
|
+
hex: string;
|
|
1269
|
+
lumMod?: number;
|
|
1270
|
+
lumOff?: number;
|
|
1271
|
+
}
|
|
1272
|
+
/** What an arrangement is painted with: its nodes' fill and outline, their text, the matrix's diamond and a cycle's arrows. */
|
|
1273
|
+
interface ArrangementPaint {
|
|
1274
|
+
fill: ArrangementColor;
|
|
1275
|
+
line: ArrangementColor;
|
|
1276
|
+
text: ArrangementColor;
|
|
1277
|
+
background: ArrangementColor;
|
|
1278
|
+
arrow: ArrangementColor;
|
|
1279
|
+
}
|
|
1280
|
+
/**
|
|
1281
|
+
* The paint of an arrangement from the slide's resolved colors: the nodes in the primary color (`accent1`) outlined in the background
|
|
1282
|
+
* (`bg1`), their text in whichever of the background and the text color reads better on the primary, and the matrix's diamond the
|
|
1283
|
+
* primary lightened by MATRIX_BACKGROUND_LIGHTEN. `lighten(hex, lumMod, lumOff)` is DrawingML's luminance transform (core
|
|
1284
|
+
* applyColorTransform), so the preview and PowerPoint compute the same color.
|
|
1285
|
+
*/
|
|
1286
|
+
declare function arrangementPaint(primary: string, background: string, text: string, contrast: (a: string, b: string) => number | undefined, lighten: (hex: string, transform: {
|
|
1287
|
+
lumMod: number;
|
|
1288
|
+
lumOff: number;
|
|
1289
|
+
}) => string): ArrangementPaint;
|
|
1290
|
+
/** The proportion (width over height) of the frame a cycle of `count` entries takes in its region (PowerPoint's design). */
|
|
1291
|
+
declare function cycleAspect(count: number): number;
|
|
1292
|
+
/** PowerPoint's circle diameter for 1 to 8 entries, as a share of the frame's width (at cycleAspect). */
|
|
1293
|
+
declare const CYCLE_DIAMETER: readonly number[];
|
|
1294
|
+
/** PowerPoint's ring radius (the circles' centers) for 1 to 8 entries, as a share of the frame's width (at cycleAspect). */
|
|
1295
|
+
declare const CYCLE_RADIUS: readonly number[];
|
|
1296
|
+
/** A cycle arrow: its thickness as a share of the circle's diameter; its length and its start as shares of the gap between two circles. */
|
|
1297
|
+
declare const CYCLE_ARROW: Readonly<{
|
|
1298
|
+
thickness: 0.3375;
|
|
1299
|
+
length: 0.53;
|
|
1300
|
+
start: 0.22;
|
|
1301
|
+
}>;
|
|
1302
|
+
/** Two entries: each arrow's length and its center's distance from the line between the centers (shares of W), and its center's place along that line. */
|
|
1303
|
+
declare const CYCLE_TWO: Readonly<{
|
|
1304
|
+
length: 0.2491013;
|
|
1305
|
+
offset: 0.18876154;
|
|
1306
|
+
along: 0.48825813;
|
|
1307
|
+
}>;
|
|
1308
|
+
/** DrawingML `rightArrow`'s adjustments in a cycle: the shaft 60% of the arrow's thickness, the head half of its smaller side. */
|
|
1309
|
+
declare const CYCLE_ARROW_ADJUST: readonly [number, number];
|
|
1310
|
+
/** A cycle's arrows are the primary lightened by this share (DrawingML lumMod 1 - L, lumOff L). */
|
|
1311
|
+
declare const CYCLE_ARROW_LIGHTEN = 0.4;
|
|
1312
|
+
/** One arrow of a cycle, after the node `index`: its unrotated box, its clockwise rotation in degrees and its outline as drawn. */
|
|
1313
|
+
interface ArrangementArrow {
|
|
1314
|
+
index: number;
|
|
1315
|
+
box: Box$4;
|
|
1316
|
+
rotation: number;
|
|
1317
|
+
/** DrawingML `rightArrow`'s adj1 and adj2. */
|
|
1318
|
+
adjust: readonly [number, number];
|
|
1319
|
+
/** The outline (seven points), turned about the box's center, in the same units as `box`. */
|
|
1320
|
+
points: [number, number][];
|
|
1321
|
+
}
|
|
1322
|
+
/** DrawingML `rightArrow` in `box` with `adjust`, turned `rotation` degrees clockwise about its center. */
|
|
1323
|
+
declare function rightArrowPoints(box: Box$4, rotation: number, adjust?: readonly [number, number]): [number, number][];
|
|
1324
|
+
/** The frame a cycle of `count` entries takes in `area`: the largest of cycleAspect's proportion, centered. */
|
|
1325
|
+
declare function cycleFrame(area: Box$4, count: number): Box$4;
|
|
1326
|
+
/** PowerPoint's Basic Cycle of `count` entries (1 to 8) in `frame` (cycleFrame): the circles in entry order and the arrow after each. */
|
|
1327
|
+
declare function cycleNodes(frame: Box$4, count: number, rtl?: boolean): {
|
|
1328
|
+
nodes: ArrangementNode[];
|
|
1329
|
+
arrows: ArrangementArrow[];
|
|
1330
|
+
};
|
|
1331
|
+
/** The text inset of OPF's cycle nodes, as a share of the font size. */
|
|
1332
|
+
declare const CYCLE_RING_MARGIN = 0.2;
|
|
1333
|
+
/** OPF's cycle: a node at most this share of the area's width and of its height, and between these proportions (width over height). */
|
|
1334
|
+
declare const CYCLE_RING_NODE: Readonly<{
|
|
1335
|
+
width: 0.46;
|
|
1336
|
+
height: 0.42;
|
|
1337
|
+
maxAspect: 3;
|
|
1338
|
+
minAspect: 1.15;
|
|
1339
|
+
}>;
|
|
1340
|
+
/**
|
|
1341
|
+
* OPF's own cycle design, drawn where PowerPoint's circles do not hold the entries: rounded rectangles (DrawingML roundRect at its
|
|
1342
|
+
* default corner) on an ellipse that fills `area`, the first at the top and the rest clockwise (two entries: left and right; one: in the
|
|
1343
|
+
* middle; two in a tall area: one above the other), each as large as the area lets every node be while neighbors keep room for an arrow between them (2 `gap`), and an arrow
|
|
1344
|
+
* from each to the next on the line between their centers, in the middle of the room between them.
|
|
1345
|
+
*/
|
|
1346
|
+
declare function cycleRing(area: Box$4, count: number, gap: number, rtl?: boolean): {
|
|
1347
|
+
nodes: ArrangementNode[];
|
|
1348
|
+
arrows: ArrangementArrow[];
|
|
1349
|
+
};
|
|
1350
|
+
/**
|
|
1351
|
+
* OPF's second cycle design, a loop of `rows` rows (columns in an area taller than wide) with exactly one node on every place of its
|
|
1352
|
+
* edge, so no place is left empty: two rows hold ceil(n/2) nodes left to right on top and the rest right to left below; three rows hold a
|
|
1353
|
+
* node at each end of the middle row too, the rest shared between the top and the bottom. A row of fewer nodes widens them, so every row
|
|
1354
|
+
* spans the area; the rows are one height. Neighbors keep room for an arrow (2 `gap`), and an arrow goes from each node to the next
|
|
1355
|
+
* (cycleLinks). In a tall area the loop is turned a quarter clockwise. Composition keeps whichever of the ring and the loops holds the
|
|
1356
|
+
* entries larger.
|
|
1357
|
+
*/
|
|
1358
|
+
declare function cycleLoop(area: Box$4, count: number, gap: number, rtl?: boolean, rows?: number): {
|
|
1359
|
+
nodes: ArrangementNode[];
|
|
1360
|
+
arrows: ArrangementArrow[];
|
|
1361
|
+
} | undefined;
|
|
1362
|
+
/**
|
|
1363
|
+
* SH-09's safe domain for live SmartArt, from the PowerPoint COM sweep (docs/smartart.md): the instances of an arrangement for which
|
|
1364
|
+
* PowerPoint laid out every node within 0.1 pt of core's rectangle, at core's font size, with no visible difference in the shapes, and drew
|
|
1365
|
+
* the SmartArt as it draws OPF's native export of the same slide (SH-07's thresholds). An instance outside it is exported as native shapes
|
|
1366
|
+
* (`smartArt: "shapes"`) with the reason.
|
|
1367
|
+
*/
|
|
1368
|
+
declare const SMART_ART_DOMAIN: Readonly<{
|
|
1369
|
+
/** Entries: a pyramid of 1 to 5 levels (6 to 8 never fitted the list's role size in the compared frames), a matrix of 1 to 4 quadrants. */
|
|
1370
|
+
count: Readonly<Partial<Record<Arrangement, number>>>;
|
|
1371
|
+
/** The frame's width over its height, per arrangement: the range the 16:9, 4:3 and 1:1 slides gave, with a small margin. */
|
|
1372
|
+
aspect: Readonly<Partial<Record<Arrangement, {
|
|
1373
|
+
min: number;
|
|
1374
|
+
max: number;
|
|
1375
|
+
}>>>;
|
|
1376
|
+
/** The most lines one entry may wrap to in its node, and in all its entries (a line drawn by PowerPoint's wrap can sit up to 1 px from core's). */
|
|
1377
|
+
lines: 2;
|
|
1378
|
+
totalLines: 6;
|
|
1379
|
+
/**
|
|
1380
|
+
* The room a line break keeps: an entry's breaks must be the same when its text rectangle is this share narrower or wider (composeSlide
|
|
1381
|
+
* fits it at both), so PowerPoint, which measures its own fonts, breaks the same lines.
|
|
1382
|
+
*/
|
|
1383
|
+
slack: 0.04;
|
|
1384
|
+
/**
|
|
1385
|
+
* SH-19: the widest line an entry may have (canvas pixels). PowerPoint measures a line up to about 0.6% wider or narrower than OPF does,
|
|
1386
|
+
* and a centered line moves by half the difference, so a longer line can sit more than SH-07's 1.5 px text gate from OPF's native text
|
|
1387
|
+
* (the sweep: a 537 px line of a one-level pyramid sat 1.74 px off; every line of 440 px or less was within 1.5 px).
|
|
1388
|
+
*/
|
|
1389
|
+
lineWidth: 500;
|
|
1390
|
+
/**
|
|
1391
|
+
* SH-17: the most of a node's text rectangle (less its margins) an entry's lines may fill from top to bottom: a box PowerPoint finds
|
|
1392
|
+
* nearly full is grown or searched to another scale (the sweep found it at 0.969 of the height and above).
|
|
1393
|
+
*/
|
|
1394
|
+
fill: Readonly<Partial<Record<Arrangement, number>>>;
|
|
1395
|
+
/**
|
|
1396
|
+
* SH-17: the most of the frame the entries' text may cover (each line's width times the size, over the frame's area): PowerPoint sets
|
|
1397
|
+
* a SmartArt's lines up to a pixel from where it sets OPF's native text, which a frame dense with large text shows above SH-07's gate
|
|
1398
|
+
* (every instance above 0.082 that failed it did so for this).
|
|
1399
|
+
*/
|
|
1400
|
+
ink: Readonly<Partial<Record<Arrangement, number>>>;
|
|
1401
|
+
}>;
|
|
1402
|
+
/**
|
|
1403
|
+
* The writing of an arrangement's entries, as the domain reads it: right to left (Arabic, Hebrew and the other right-to-left scripts),
|
|
1404
|
+
* Chinese or Japanese (`cjk`), another script than Latin (`other`), or Latin (no `script`).
|
|
1405
|
+
*/
|
|
1406
|
+
declare function smartArtScript(texts: readonly string[]): {
|
|
1407
|
+
rtl: boolean;
|
|
1408
|
+
script?: 'cjk' | 'other';
|
|
1409
|
+
};
|
|
1410
|
+
/** The facts of one composed arrangement the domain is checked on (ComposedArrangement.smartArt, the frame and the text). */
|
|
1411
|
+
interface SmartArtCandidate {
|
|
1412
|
+
kind: Arrangement;
|
|
1413
|
+
pyramidDirection?: 'up' | 'down';
|
|
1414
|
+
count: number;
|
|
1415
|
+
frame: Box$4;
|
|
1416
|
+
/** Per entry: the lines it wraps to, and whether its breaks hold within SMART_ART_DOMAIN.slack of its width. */
|
|
1417
|
+
nodes: {
|
|
1418
|
+
lines: number;
|
|
1419
|
+
stable: boolean;
|
|
1420
|
+
}[];
|
|
1421
|
+
/** A right-to-left deck or entry. */
|
|
1422
|
+
rtl: boolean;
|
|
1423
|
+
/** Text in a script other than Latin (the comparison found Japanese text placed several pixels off in PowerPoint's SmartArt). */
|
|
1424
|
+
script?: 'cjk' | 'other';
|
|
1425
|
+
/** SH-17: the most any entry's lines fill of its text rectangle's height (less margins), and the text's share of the frame. */
|
|
1426
|
+
fill?: number;
|
|
1427
|
+
ink?: number;
|
|
1428
|
+
/** SH-19: the widest line of any entry, canvas pixels. */
|
|
1429
|
+
widest?: number;
|
|
1430
|
+
}
|
|
1431
|
+
/**
|
|
1432
|
+
* Whether PowerPoint lays an arrangement out as the preview draws it (SMART_ART_DOMAIN): `undefined` when it does, else the reason it
|
|
1433
|
+
* falls back to native shapes, for the export's `pptx/smartart-unavailable` finding.
|
|
1434
|
+
*/
|
|
1435
|
+
declare function smartArtUnavailable(candidate: SmartArtCandidate): string | undefined;
|
|
1436
|
+
|
|
1437
|
+
/**
|
|
1438
|
+
* OPF layout templates (`opf-layout/v2`, FA-33): a layout record is one ordered list of regions, nested for two
|
|
1439
|
+
* dimensions. `direction` says whether the record's `regions` are placed side by side (`row`) or stacked (`column`); an
|
|
1440
|
+
* entry is a region (`name`, `size`, the content rules) or a split (`direction`, `regions`, `size`) that lays its own
|
|
1441
|
+
* regions out the other way. The list is the reading order. This module parses and checks a record and compiles the tree
|
|
1442
|
+
* into the grid the engine composes with (rows, columns, a cell grid of area names and the region rules); binding content
|
|
1443
|
+
* to regions is `bindRegions` (bind-regions.ts) and the geometry is `composeSlide`.
|
|
1444
|
+
*
|
|
1445
|
+
* A record is a template when it has `regions`.
|
|
1446
|
+
*/
|
|
1447
|
+
/** The content kinds a region can accept: the body content kinds and `group` for a content group. */
|
|
1448
|
+
declare const REGION_KINDS: readonly ["text", "list", "image", "video", "chart", "table", "code", "metric", "quote", "timeline", "diagram", "shape", "group"];
|
|
1449
|
+
type RegionKind = typeof REGION_KINDS[number];
|
|
1450
|
+
/** Which content a region wants first (content binding, step 2). */
|
|
1451
|
+
declare const REGION_ROLES: readonly ["primary", "secondary", "media", "supporting"];
|
|
1452
|
+
type RegionRole = typeof REGION_ROLES[number];
|
|
1453
|
+
/** How several blocks share a region. */
|
|
1454
|
+
declare const REGION_FLOWS: readonly ["none", "grid", "column", "auto"];
|
|
1455
|
+
type RegionFlow = typeof REGION_FLOWS[number];
|
|
1456
|
+
declare const REGION_ANCHORS: readonly ["top", "middle", "bottom"];
|
|
1457
|
+
type RegionAnchor = typeof REGION_ANCHORS[number];
|
|
1458
|
+
/** The two heading regions. They hold the slide's headings, take a `size` and an `anchor` (the `title` also a `rule`), and have no content rules. */
|
|
1459
|
+
declare const HEADING_AREAS: readonly ["title", "subtitle"];
|
|
1460
|
+
/**
|
|
1461
|
+
* Names a body region may not take: the heading words, `auto`, and the six promoted-region words, so `region=` in the
|
|
1462
|
+
* Markdown dialect stays unambiguous. `title` and `subtitle` name the heading regions.
|
|
1463
|
+
*/
|
|
1464
|
+
declare const RESERVED_REGION_NAMES: readonly ["title", "subtitle", "tag", "auto", "start", "center", "end", "top", "middle", "bottom"];
|
|
1465
|
+
/** The compiled grid has at most this many rows and this many columns. */
|
|
1020
1466
|
declare const MAX_TEMPLATE_TRACKS = 12;
|
|
1021
1467
|
/** A list of regions (the record's, or a split's) holds at most this many entries. */
|
|
1022
1468
|
declare const MAX_REGION_ENTRIES = 12;
|
|
@@ -1050,7 +1496,9 @@ interface LayoutRegion {
|
|
|
1050
1496
|
* entries as the steps of a loop, nodes on a ring with an arrow to the next). SH-17: `chevrons` (a row of chevrons), `flow` (a row of
|
|
1051
1497
|
* boxes with arrows between them) or `vertical-flow` (a column of them). Absent: a list.
|
|
1052
1498
|
*/
|
|
1053
|
-
arrangement?:
|
|
1499
|
+
arrangement?: Arrangement;
|
|
1500
|
+
/** Narrow tip at the top (up, default) or bottom (down); authored entry order stays top to bottom. */
|
|
1501
|
+
pyramidDirection?: 'up' | 'down';
|
|
1054
1502
|
anchor: RegionAnchor;
|
|
1055
1503
|
empty: 'collapse' | 'keep';
|
|
1056
1504
|
}
|
|
@@ -1353,7 +1801,7 @@ interface ScriptFontSupplement {
|
|
|
1353
1801
|
interface ResolveScriptFontsOptions extends CatalogOptions {
|
|
1354
1802
|
/** Which language font default applies. Defaults to `powerpoint` (`language.fontScheme`, else the vocabulary default); `google-slides` prefers `language.googleFontScheme`. */
|
|
1355
1803
|
app?: ScriptFontApp;
|
|
1356
|
-
/**
|
|
1804
|
+
/** Resolve this slide's language and merge its design over the deck design before resolving the font scheme. */
|
|
1357
1805
|
slideIndex?: number;
|
|
1358
1806
|
/** Language to resolve instead of the document's `language` (a BCP-47 tag or a Language object). */
|
|
1359
1807
|
language?: unknown;
|
|
@@ -1488,6 +1936,8 @@ interface LanguageVocabulary {
|
|
|
1488
1936
|
readonly direction: 'ltr' | 'rtl';
|
|
1489
1937
|
/** Curated OOXML culture tag (`ja-JP` for `ja`). */
|
|
1490
1938
|
readonly ooxmlLang: string;
|
|
1939
|
+
/** Generated timeline labels; absent when this locale has no localized status vocabulary. */
|
|
1940
|
+
readonly timelineStatusWords?: Readonly<Record<'done' | 'current' | 'planned', string>>;
|
|
1491
1941
|
/** Default script fonts (major/minor) per target application. */
|
|
1492
1942
|
readonly fonts: {
|
|
1493
1943
|
readonly powerpoint: {
|
|
@@ -1529,13 +1979,6 @@ declare function isolateNumbers(text: string): string;
|
|
|
1529
1979
|
*/
|
|
1530
1980
|
declare function numericText(text: string): boolean;
|
|
1531
1981
|
|
|
1532
|
-
/**
|
|
1533
|
-
* Numbered lists: the `numbering` field of `items` and `bullets` payloads.
|
|
1534
|
-
*
|
|
1535
|
-
* Pure helpers shared by composition (marker text and hanging indent), the validator, pagination and the
|
|
1536
|
-
* exporters, so the preview and the native PowerPoint export number every entry identically. Nothing here
|
|
1537
|
-
* measures text or reads a document beyond the items it is given.
|
|
1538
|
-
*/
|
|
1539
1982
|
/** The five number styles OPF supports; each maps to a native PowerPoint auto-number scheme. */
|
|
1540
1983
|
declare const NUMBERING_STYLES: readonly ["arabic", "roman-upper", "roman-lower", "alpha-upper", "alpha-lower"];
|
|
1541
1984
|
type NumberingStyleName = typeof NUMBERING_STYLES[number];
|
|
@@ -1587,7 +2030,7 @@ declare function formatListNumber(value: number, style?: NumberingStyleName, suf
|
|
|
1587
2030
|
* LH-07: the number of a list entry without its suffix (`4`, `iv`, `C`): the numeral a step badge draws, since the circle
|
|
1588
2031
|
* already sets it apart from the text.
|
|
1589
2032
|
*/
|
|
1590
|
-
declare function listNumberLabel(number: Pick<ListNumber, 'value' | 'style'
|
|
2033
|
+
declare function listNumberLabel(number: Pick<ListNumber, 'value' | 'style'>, language?: string): string;
|
|
1591
2034
|
/** The number of one list entry. */
|
|
1592
2035
|
interface ListNumber {
|
|
1593
2036
|
/** Position of the entry in the list. */
|
|
@@ -1693,603 +2136,17 @@ interface ResolveLogoOptions {
|
|
|
1693
2136
|
*/
|
|
1694
2137
|
declare function resolveLogo(presentation: unknown, slide: unknown, options?: ResolveLogoOptions): ResolvedLogo | null;
|
|
1695
2138
|
|
|
1696
|
-
/** Normalize a literal hex color to uppercase #RRGGBB. */
|
|
1697
|
-
declare function normalizeHexColor(value: unknown): string | undefined;
|
|
1698
|
-
type ResolveColorRefRoles = Partial<Record<'primary' | 'secondary' | 'accent' | 'background' | 'surface' | 'surfaceAlt' | 'text' | 'textSecondary', string>>;
|
|
1699
|
-
interface ResolveColorRefOptions {
|
|
1700
|
-
/** Effective color scheme after design resolution (OOXML slots plus optional role hex overrides). */
|
|
1701
|
-
colorScheme: Record<string, unknown>;
|
|
1702
|
-
/** Optional resolved chrome colors (e.g. renderer `design.colors` with `textSecondary` mapped to `mutedText`). */
|
|
1703
|
-
roles?: ResolveColorRefRoles;
|
|
1704
|
-
/** Top-level presentation `variables` map. */
|
|
1705
|
-
variables?: Record<string, unknown>;
|
|
1706
|
-
/** Theme text color returned when a reference cannot be resolved. */
|
|
1707
|
-
fallback: string;
|
|
1708
|
-
}
|
|
1709
|
-
/**
|
|
1710
|
-
* SH-02: the lighter or darker form of a ColorRef, `{ color, lighten }` or `{ color, darken }` (opf.schema.json ColorTransform), as the
|
|
1711
|
-
* DrawingML luminance transform PowerPoint's theme tints and shades use: `lighten` L is lumMod (1 - L) and lumOff L, `darken` D is
|
|
1712
|
-
* lumMod (1 - D), both in thousandths of a percent. Undefined for anything else (a string ColorRef, or an object that is neither).
|
|
1713
|
-
*/
|
|
1714
|
-
declare function colorTransform(reference: unknown): {
|
|
1715
|
-
color: unknown;
|
|
1716
|
-
lumMod: number;
|
|
1717
|
-
lumOff: number;
|
|
1718
|
-
} | undefined;
|
|
1719
|
-
/** SH-02: `hex` (#RGB, #RRGGBB or #RRGGBBAA) with a ColorRef's lighter or darker transform applied; an alpha byte is kept. */
|
|
1720
|
-
declare function applyColorTransform(hex: string, transform: {
|
|
1721
|
-
lumMod: number;
|
|
1722
|
-
lumOff: number;
|
|
1723
|
-
}): string;
|
|
1724
|
-
/** 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. */
|
|
1725
|
-
declare function resolveColorRef(reference: unknown, options: ResolveColorRefOptions): string;
|
|
1726
|
-
/** WCAG relative luminance below which a slide background counts as dark (the point where white and black text contrast equally). */
|
|
1727
|
-
declare const DARK_BACKGROUND_LUMINANCE = 0.179;
|
|
1728
|
-
/** True when text on this color should be light: its relative luminance is under {@link DARK_BACKGROUND_LUMINANCE}. An unreadable color is not dark. */
|
|
1729
|
-
declare function isDarkColor(color: unknown): boolean;
|
|
1730
|
-
/**
|
|
1731
|
-
* The slide background a color scheme implies when the design names no single-color background: the scheme's
|
|
1732
|
-
* `background` role override, else its light1 slot, else white. Gradient and picture backgrounds use it too.
|
|
1733
|
-
*/
|
|
1734
|
-
declare function defaultSlideBackground(colorScheme: Record<string, unknown>): string;
|
|
1735
|
-
/** The four light and dark slots: the text roles (tx1, tx2) always map to one of them. */
|
|
1736
|
-
type ColorBaseSlot = 'light1' | 'light2' | 'dark1' | 'dark2';
|
|
1737
|
-
type ColorAccentSlot = 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6';
|
|
1738
|
-
/** The slots a variant can use as the slide background: the four light and dark slots, or an accent (LH-01). */
|
|
1739
|
-
type ColorVariantBackground = ColorBaseSlot | ColorAccentSlot;
|
|
1740
|
-
/**
|
|
1741
|
-
* A variant of the deck's single colour scheme: which slot is the background (and so which are the text and the alternate surface),
|
|
1742
|
-
* 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
|
|
1743
|
-
* scheme: nothing in it is a colour.
|
|
1744
|
-
*/
|
|
1745
|
-
interface ColorVariant {
|
|
1746
|
-
background: ColorVariantBackground;
|
|
1747
|
-
/** A permutation of `accent1` to `accent6`: entry `i` is the scheme slot drawn as accent `i + 1`. Default: the scheme's own order. */
|
|
1748
|
-
accents?: readonly ColorAccentSlot[];
|
|
1749
|
-
}
|
|
1750
|
-
/** The slots the roles bg1, tx1, bg2 and tx2 and the six accents point at (OOXML `clrMap`, with `lt1` named `light1` and so on). */
|
|
1751
|
-
interface ColorMap {
|
|
1752
|
-
bg1: ColorVariantBackground;
|
|
1753
|
-
tx1: ColorBaseSlot;
|
|
1754
|
-
bg2: ColorVariantBackground;
|
|
1755
|
-
tx2: ColorBaseSlot;
|
|
1756
|
-
accents: readonly ColorAccentSlot[];
|
|
1757
|
-
}
|
|
1758
|
-
/** 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. */
|
|
1759
|
-
type ColorVariantInput = ColorVariantBackground | ColorVariant;
|
|
1760
|
-
/** 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. */
|
|
1761
|
-
declare function normalizeColorVariant(value: unknown): ColorVariant | undefined;
|
|
1762
|
-
/** True for a well formed variant in either form (see {@link normalizeColorVariant}). */
|
|
1763
|
-
declare function isColorVariant(value: unknown): value is ColorVariantInput;
|
|
1764
|
-
/**
|
|
1765
|
-
* LH-01: the tone-relative values a layout record's `design.variant` can take besides a variant, resolved against the deck's own variant
|
|
1766
|
-
* (its background slot and whether it is dark) by {@link layoutColorVariant}:
|
|
1767
|
-
*
|
|
1768
|
-
* - `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
|
|
1769
|
-
* is already on light2 or dark2), so a statement stands off the deck without flipping its tone;
|
|
1770
|
-
* - `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
|
|
1771
|
-
* a dark deck, with light text.
|
|
1772
|
-
*/
|
|
1773
|
-
type LayoutVariantRole = 'surface' | 'brand';
|
|
1774
|
-
/** The deck a layout's tone-relative variant is resolved against: its background slot (bg1 of its map) and whether its text is light. */
|
|
1775
|
-
interface LayoutVariantDeck {
|
|
1776
|
-
background: ColorVariantBackground;
|
|
1777
|
-
dark: boolean;
|
|
1778
|
-
}
|
|
1779
|
-
/**
|
|
1780
|
-
* LH-01: the variant a layout record names (`layout.design.variant`), normalized, or undefined: a variant as written, or a
|
|
1781
|
-
* {@link LayoutVariantRole} resolved against `deck` (default: a light deck on light1). It ranks above the deck's design and the theme and
|
|
1782
|
-
* 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
|
|
1783
|
-
* deck while an author can still set a slide's own.
|
|
1784
|
-
*/
|
|
1785
|
-
declare function layoutColorVariant(layout: unknown, deck?: LayoutVariantDeck): ColorVariant | undefined;
|
|
1786
|
-
/**
|
|
1787
|
-
* 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
|
|
1788
|
-
* color), a solid whose color is a `var:` variable, a gradient, a pattern or a picture (an image source string or `{ type: "image" }`).
|
|
1789
|
-
* Scheme-based, and so open to a layout variant: no background, a theme slot (`"dark1"`, `{ type: "theme" }`) and a solid whose color
|
|
1790
|
-
* is a scheme slot or role name (`accent1`, `primary`, `background`), which follow the scheme as the variant does. A `var:` reference
|
|
1791
|
-
* counts as fixed whatever it holds, because the author named a color of the deck's own rather than a place in the scheme.
|
|
1792
|
-
*/
|
|
1793
|
-
declare function isFixedBackground(definition: unknown): boolean;
|
|
1794
|
-
/**
|
|
1795
|
-
* LH-103: whether the deck and the theme draw a fixed background ({@link isFixedBackground}), which a layout's variant does not replace:
|
|
1796
|
-
* the slide keeps that background and its text follows that background's tone or luminance, as on a slide with no layout variant. The
|
|
1797
|
-
* 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
|
|
1798
|
-
* own fixed background only maps the text and the surfaces, so that background still wins over the layout.
|
|
1799
|
-
*/
|
|
1800
|
-
declare function deckBackgroundIsFixed(deckDesign: unknown, themeBackground: unknown): boolean;
|
|
1801
|
-
/**
|
|
1802
|
-
* 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
|
|
1803
|
-
* 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).
|
|
1804
|
-
* LH-103: never over a fixed background of the deck or the theme ({@link deckBackgroundIsFixed}), which the slide keeps.
|
|
1805
|
-
* LH-164: `surface` is a variant the slide's content asks for (a message-only slide's accent surface, messageSurface): it decides the
|
|
1806
|
-
* background under the same conditions, over a layout that names no variant.
|
|
1807
|
-
*/
|
|
1808
|
-
declare function layoutVariantApplies(slideDesign: unknown, layout: unknown, deckDesign?: unknown, themeBackground?: unknown, surface?: unknown): boolean;
|
|
1809
2139
|
/**
|
|
1810
|
-
*
|
|
1811
|
-
* light and dark; `light2` and `dark2` make that slot both the background and the alternate surface (bg2, as a slide with that theme
|
|
1812
|
-
* 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`.
|
|
2140
|
+
* LH-02: the automatic scrim under text on a picture background.
|
|
1813
2141
|
*
|
|
1814
|
-
*
|
|
1815
|
-
*
|
|
1816
|
-
* the text
|
|
1817
|
-
*
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
*
|
|
1822
|
-
* hyperlink slots unchanged), so the PPTX export writes the master map and a slide's `clrMapOvr` from the same data the preview reads.
|
|
1823
|
-
*/
|
|
1824
|
-
declare function clrMapAttributes(map: ColorMap): Record<string, string>;
|
|
1825
|
-
/**
|
|
1826
|
-
* 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`,
|
|
1827
|
-
* `accent1` ...), `lumMod` and `lumOff` are DrawingML luminance transforms in thousandths of a percent (`lumMod 15000, lumOff 85000` is
|
|
1828
|
-
* 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
|
|
1829
|
-
* resolved scheme, so a preview that draws `hex` and a PPTX that writes `<a:schemeClr val={slot}>` with the transforms show the same colour.
|
|
1830
|
-
*/
|
|
1831
|
-
interface SchemeColor {
|
|
1832
|
-
slot: string;
|
|
1833
|
-
hex: string;
|
|
1834
|
-
lumMod?: number;
|
|
1835
|
-
lumOff?: number;
|
|
1836
|
-
alpha?: number;
|
|
1837
|
-
}
|
|
1838
|
-
/** The colour a `lumMod`/`lumOff` pair (thousandths of a percent) makes of `hex`: its HSL luminance times `lumMod`, plus `lumOff`. */
|
|
1839
|
-
declare function applyLuminance(hex: string, lumMod?: number, lumOff?: number): string;
|
|
1840
|
-
/** Shares of the text colour (tx1) mixed into the background (bg1) for the neutrals, PowerPoint's chart-style values. */
|
|
1841
|
-
declare const NEUTRAL_SHARES: {
|
|
1842
|
-
readonly border: 0.2;
|
|
1843
|
-
readonly gridline: 0.15;
|
|
1844
|
-
readonly axisLine: 0.25;
|
|
1845
|
-
readonly chartText: 0.65;
|
|
1846
|
-
readonly codeComment: 0.65;
|
|
1847
|
-
};
|
|
1848
|
-
/** LH-54: the share of the text colour (light1 on a dark slide) a dark card starts from, mixed into the background. */
|
|
1849
|
-
declare const CARD_SURFACE_MIX = 0.07;
|
|
1850
|
-
/** 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). */
|
|
1851
|
-
declare const CARD_SURFACE_MIN_CONTRAST = 1.25;
|
|
1852
|
-
/** 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. */
|
|
1853
|
-
declare const CARD_TEXT_MIN_CONTRAST = 4.5;
|
|
1854
|
-
/** 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). */
|
|
1855
|
-
declare const CARD_BORDER_MIX = 0.12;
|
|
1856
|
-
/** LH-79: a dark variant's code panel is bg1 at this share of its HSL lightness (`lumMod`; Claude Design's #001030 on #011842). */
|
|
1857
|
-
declare const CODE_PANEL_DARK_SHADE = 0.7;
|
|
1858
|
-
/**
|
|
1859
|
-
* 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
|
|
1860
|
-
* gets light lines and a change of variant or background style in PowerPoint recolours them.
|
|
1861
|
-
*/
|
|
1862
|
-
interface SchemeNeutrals {
|
|
1863
|
-
/** Quiet structural rules, card borders and table borders: tx1 at {@link NEUTRAL_SHARES}.border over bg1. */
|
|
1864
|
-
border: SchemeColor;
|
|
1865
|
-
/** Chart gridlines: tx1 at 15%. */
|
|
1866
|
-
gridline: SchemeColor;
|
|
1867
|
-
/** Chart axis lines: tx1 at 25%. */
|
|
1868
|
-
axisLine: SchemeColor;
|
|
1869
|
-
/** Chart axis labels and legend text where the chart does not use the slide text colour: tx1 at 65%. */
|
|
1870
|
-
chartText: SchemeColor;
|
|
1871
|
-
/** Pie and treemap outlines, the video play icon and anything drawn on top of a mark: bg1. */
|
|
1872
|
-
outline: SchemeColor;
|
|
1873
|
-
/** The neutral metric trend (no good or bad news): tx2. */
|
|
1874
|
-
trendNeutral: SchemeColor;
|
|
1875
|
-
/**
|
|
1876
|
-
* 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})
|
|
1877
|
-
* 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
|
|
1878
|
-
* 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
|
|
1879
|
-
* near-black background ({@link CODE_PANEL_MIN_STEP}), bg2 when it does, else bg1 lifted {@link CODE_PANEL_LIFT} towards tx1.
|
|
1880
|
-
*/
|
|
1881
|
-
codePanel: SchemeColor;
|
|
1882
|
-
/** Plain code text: bg1 or tx1, whichever reads better on the panel. */
|
|
1883
|
-
codeText: SchemeColor;
|
|
1884
|
-
/** Code comments and line numbers: the code text at 65% over the panel. */
|
|
1885
|
-
codeComment: SchemeColor;
|
|
1886
|
-
/**
|
|
1887
|
-
* 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
|
|
1888
|
-
* where it does not (the dark2 variant, whose bg2 is the background itself) the background mixed towards tx1 from {@link CARD_SURFACE_MIX}
|
|
1889
|
-
* 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
|
|
1890
|
-
* a literal colour (no single luminance transform of a slot reproduces it), as `surfaceAlt` is.
|
|
1891
|
-
*/
|
|
1892
|
-
card: SchemeColor;
|
|
1893
|
-
/** 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). */
|
|
1894
|
-
cardBorder: SchemeColor;
|
|
1895
|
-
}
|
|
1896
|
-
interface ResolvedColorRoles {
|
|
1897
|
-
/** Role override, else the first accent of the variant (accent1 by default). */
|
|
1898
|
-
primary: string;
|
|
1899
|
-
/** Role override, else the second accent of the variant (accent2 by default). */
|
|
1900
|
-
secondary: string;
|
|
1901
|
-
/** Role override, else the third accent of the variant (accent3 by default). */
|
|
1902
|
-
accent: string;
|
|
1903
|
-
/** The slide background: the resolved single-color background of the slide, else the variant's bg1 (light1 by default; see {@link defaultSlideBackground}). */
|
|
1904
|
-
background: string;
|
|
1905
|
-
/** Role override, else bg2 of the variant (light2 on a light slide, dark2 on a dark one). */
|
|
1906
|
-
surface: string;
|
|
1907
|
-
/** The alternate surface of banded table rows: {@link surfaceAltColor} of `surface` and `text`, always distinguishable from `surface`. */
|
|
1908
|
-
surfaceAlt: string;
|
|
1909
|
-
/** Default text: tx1 of the variant (light1 on a dark background). On a light background the `text` role override, else dark1. */
|
|
1910
|
-
text: string;
|
|
1911
|
-
/** Role override, else tx2 of the variant (light2 on a dark background and dark2 on a light one). */
|
|
1912
|
-
textSecondary: string;
|
|
1913
|
-
/** 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. */
|
|
1914
|
-
hyperlink: string;
|
|
1915
|
-
/** Followed-hyperlink slot (OOXML folHlink). */
|
|
1916
|
-
followedHyperlink: string;
|
|
1917
|
-
/** Quiet structural rules/cards: `neutrals.border.hex`, tx1 mixed into bg1. Authored borders still resolve their own ColorRef. */
|
|
1918
|
-
border: string;
|
|
1919
|
-
/** Whether the slide background is dark; text, surface and textSecondary defaults follow it. */
|
|
1920
|
-
dark: boolean;
|
|
1921
|
-
/** The variant these roles were resolved with: the one given, else the one the background's luminance (or tone) implies. */
|
|
1922
|
-
variant: ColorVariant;
|
|
1923
|
-
/** The map behind the roles (bg1, tx1, bg2, tx2 and the accent order), for PPTX `clrMap` and `clrMapOvr` ({@link clrMapAttributes}). */
|
|
1924
|
-
map: ColorMap;
|
|
1925
|
-
/** The six accent colours in the variant's order (primary, secondary and accent are the first three unless overridden). */
|
|
1926
|
-
accents: string[];
|
|
1927
|
-
/** Every neutral derived from the scheme, with its slot and luminance transform for `schemeClr` export. */
|
|
1928
|
-
neutrals: SchemeNeutrals;
|
|
1929
|
-
}
|
|
1930
|
-
interface ResolveColorRolesOptions {
|
|
1931
|
-
/** The slide's resolved single-color background (solid, theme-slot or pattern background color). Omit for a gradient, picture or no background. */
|
|
1932
|
-
background?: string | null;
|
|
1933
|
-
/** 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. */
|
|
1934
|
-
variant?: ColorVariantInput;
|
|
1935
|
-
/** `dark` or `light` for a picture or gradient background that names its tone: it chooses dark1 or light1 when there is no `variant`. */
|
|
1936
|
-
tone?: 'dark' | 'light';
|
|
1937
|
-
}
|
|
1938
|
-
/**
|
|
1939
|
-
* Resolve a color scheme's abstract roles for one slide: the single definition the opf-render preview, the
|
|
1940
|
-
* PPTX export and the audit share, so the same deck draws the same colors in all three.
|
|
1941
|
-
*
|
|
1942
|
-
* 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,
|
|
1943
|
-
* textSecondary tx2, surface bg2, and primary, secondary and accent the first three accents in the variant's order. Without
|
|
1944
|
-
* `options.variant` the map is chosen from the slide: `options.tone` for a picture or gradient that names one, else the luminance of
|
|
1945
|
-
* `options.background` ({@link isDarkColor}; dark1 when dark, light1 otherwise), which is the earlier behavior. Role overrides on the
|
|
1946
|
-
* scheme (`primary`, `secondary`, `accent`, `background`, `surface`, `text`, `textSecondary`) win over the slots they default to; a
|
|
1947
|
-
* `text` override applies only on a light background, so a dark slide always gets readable light text. `roles.neutrals` holds every
|
|
1948
|
-
* line and quiet color derived from the same map, each with the slot and luminance transform the PPTX export writes.
|
|
1949
|
-
* Values are uppercase #RRGGBB, or #RRGGBBAA where the scheme color carries an alpha byte.
|
|
1950
|
-
*/
|
|
1951
|
-
declare function resolveColorRoles(colorScheme: Record<string, unknown>, options?: ResolveColorRolesOptions): ResolvedColorRoles;
|
|
1952
|
-
/** LH-06: the contrast every text role drawn on the emphasis surface keeps against its fill (WCAG AA for body text). */
|
|
1953
|
-
declare const EMPHASIS_TEXT_MIN_CONTRAST = 4.5;
|
|
1954
|
-
/** 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). */
|
|
1955
|
-
declare const EMPHASIS_SURFACE_MIN_CONTRAST = 3;
|
|
1956
|
-
/** 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. */
|
|
1957
|
-
interface EmphasisSurface {
|
|
1958
|
-
/** The variant the surface is drawn in: its bg1 is the fill, its map gives the text (the slide's accent order is kept). */
|
|
1959
|
-
variant: ColorVariant;
|
|
1960
|
-
/** The surface fill, uppercase #RRGGBB: `roles.background`. */
|
|
1961
|
-
fill: string;
|
|
1962
|
-
/**
|
|
1963
|
-
* The roles of the content on the surface: {@link resolveColorRoles} for `variant`, with every text role (text, textSecondary, primary,
|
|
1964
|
-
* secondary, accent) under {@link EMPHASIS_TEXT_MIN_CONTRAST} on the fill replaced by `text`, so a metric value in the primary color on an
|
|
1965
|
-
* accent card does not vanish into it. `dark` is whether the surface takes light text.
|
|
1966
|
-
*/
|
|
1967
|
-
roles: ResolvedColorRoles;
|
|
1968
|
-
}
|
|
1969
|
-
/**
|
|
1970
|
-
* 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
|
|
1971
|
-
* (no color is invented). A light slide takes the brand dark (dark2, as the `brand` layout variant), then dark1, then the accents in the
|
|
1972
|
-
* 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
|
|
1973
|
-
* gives: dark1 where it reads better), then light1. The first candidate whose text reaches {@link EMPHASIS_TEXT_MIN_CONTRAST} on its fill and
|
|
1974
|
-
* whose fill reaches {@link EMPHASIS_SURFACE_MIN_CONTRAST} against the slide background is the surface; with none, the candidate with the most
|
|
1975
|
-
* text contrast is (the last candidates are the opposite text family, so a scheme with readable text always has one).
|
|
1976
|
-
*/
|
|
1977
|
-
declare function emphasisSurface(colorScheme: Record<string, unknown>, slide: Pick<ResolvedColorRoles, 'dark' | 'map' | 'background'>): EmphasisSurface;
|
|
1978
|
-
/**
|
|
1979
|
-
* 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
|
|
1980
|
-
* 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.
|
|
1981
|
-
*/
|
|
1982
|
-
declare function readableSchemeColor(fill: string, roles: Pick<ResolvedColorRoles, 'neutrals' | 'text' | 'background'>): SchemeColor;
|
|
1983
|
-
declare function colorContrast(foreground: string, background: string): number | undefined;
|
|
1984
|
-
/** Keep an inherited text color at >=4.5:1; otherwise select black or white.
|
|
1985
|
-
* Callers must preserve explicit text-color overrides before using this fallback.
|
|
1986
|
-
* An unresolved/translucent fill preserves the preferred color, without a contrast claim.
|
|
1987
|
-
*/
|
|
1988
|
-
declare function textColorForFill(fill: string, preferred: string): string;
|
|
1989
|
-
/** Keep an inherited chart mark at >=3:1 against its opaque panel. Otherwise
|
|
1990
|
-
* mix toward black or white in bounded 1/255 steps, choosing the first passing
|
|
1991
|
-
* step (higher contrast breaks a tie). This retains a recognizable palette;
|
|
1992
|
-
* it does not establish distinction between adjacent series or colorblind safety.
|
|
1993
|
-
* Explicit mark overrides belong to the caller; unresolved alpha is preserved.
|
|
1994
|
-
*/
|
|
1995
|
-
declare function chartColorForFill(fill: string, preferred: string): string;
|
|
1996
|
-
/** Smallest CIE L* step kept between neighbouring series (a printed or greyscale chart tells them apart by lightness alone). */
|
|
1997
|
-
declare const CHART_SERIES_MIN_LIGHTNESS_STEP = 11;
|
|
1998
|
-
/** Smallest CIE76 colour difference kept between any two series that were at least that far apart before the surface adjustment. */
|
|
1999
|
-
declare const CHART_SERIES_MIN_DIFFERENCE = 12;
|
|
2000
|
-
/** 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}). */
|
|
2001
|
-
declare const CHART_SERIES_TIER_SIZE = 6;
|
|
2002
|
-
/** WI-5 (P18, D3) and LH-55: the contrast every series from the scheme reaches on a dark chart surface (see {@link ChartPaletteOptions.legible}). */
|
|
2003
|
-
declare const CHART_DARK_SERIES_MIN_CONTRAST = 4.5;
|
|
2004
|
-
/** 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). */
|
|
2005
|
-
declare const CHART_LEAD_LIGHTNESS_STEP = 20;
|
|
2006
|
-
interface ChartPaletteOptions {
|
|
2007
|
-
/**
|
|
2008
|
-
* The series that come from the deck scheme ({@link chartSchemeSeries}): on a dark `fill` each of them reaches {@link CHART_DARK_SERIES_MIN_CONTRAST}
|
|
2009
|
-
* (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
|
|
2010
|
-
* when both are listed. An authored `chart.colors` entry and a host palette (omit the option) keep the 3:1 floor.
|
|
2011
|
-
*/
|
|
2012
|
-
legible?: readonly boolean[];
|
|
2013
|
-
/**
|
|
2014
|
-
* 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`
|
|
2015
|
-
* after the contrast placement, as far as it keeps its contrast floor and its lightness step from its neighbours ({@link softenChartPalette}).
|
|
2016
|
-
* Ordinary data then reads in soft colours and the full-strength colour is left for emphasis (Few). An authored colour is never softened.
|
|
2017
|
-
*/
|
|
2018
|
-
soften?: boolean;
|
|
2019
|
-
}
|
|
2020
|
-
/** Series colours for a chart drawn on `fill`: the palette in order, each colour adjusted for contrast
|
|
2021
|
-
* (`chartColorForFill`) without letting the adjustment merge series.
|
|
2022
|
-
*
|
|
2023
|
-
* Lifting or darkening a colour for a dark or mid-tone surface moves every failing colour towards the same
|
|
2024
|
-
* few lightness values, so two blues that differ on white can end up identical on a dark card. Colours that
|
|
2025
|
-
* already have >= 3:1 contrast against `fill` are kept exactly. A colour the contrast adjustment would move is
|
|
2026
|
-
* placed again on the lightness axis, keeping its hue and as much of its chroma as sRGB allows, subject to
|
|
2027
|
-
* >= 3:1 contrast against `fill` and these separations from the other series (each capped at the separation
|
|
2028
|
-
* that pair had in `palette`, so a pair the palette itself made close is not asked to be far apart):
|
|
2029
|
-
*
|
|
2030
|
-
* - a colour difference (CIE76) of at least {@link CHART_SERIES_MIN_DIFFERENCE} from every other series;
|
|
2031
|
-
* - a lightness step of at least {@link CHART_SERIES_MIN_LIGHTNESS_STEP} (CIE L*) from the neighbouring
|
|
2032
|
-
* series, which is what keeps neighbours apart on a greyscale print;
|
|
2033
|
-
* - the same lightness step from the remaining series, as a weaker aim.
|
|
2034
|
-
*
|
|
2035
|
-
* Series are placed in order against the kept colours and the colours placed before them. The palette is read in tiers of
|
|
2036
|
-
* {@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,
|
|
2037
|
-
* so the later tiers (the tints of `chartSeriesPalette`) are placed around the first six without ever pulling them towards a lightness
|
|
2038
|
-
* the tints already hold. A palette of six colours or fewer is one tier. The placement
|
|
2039
|
-
* with the lowest cost wins: its distance (in L*) from the contrast-adjusted colour plus a penalty for
|
|
2040
|
-
* every point it falls short of those separations, so a colour that is already clear of the others is
|
|
2041
|
-
* simply the adjusted colour, a near miss is not worth a large change, and a collision is resolved at the
|
|
2042
|
-
* nearest lightness that clears it. The result is deterministic and in series order. An unresolved or
|
|
2043
|
-
* translucent fill or colour is passed through, like `chartColorForFill`.
|
|
2044
|
-
*
|
|
2045
|
-
* On a dark `fill` the series `options.legible` lists (the scheme's, {@link chartSchemeSeries}) take {@link CHART_DARK_SERIES_MIN_CONTRAST}
|
|
2046
|
-
* (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
|
|
2047
|
-
* and placed against that floor, and series 2 keeps {@link CHART_LEAD_LIGHTNESS_STEP} (L*) from series 1 even where it already had the
|
|
2048
|
-
* contrast (LH-55: the second default blue on navy was 3.0:1 and nine L* from the first).
|
|
2049
|
-
*
|
|
2050
|
-
* It depends only on the surface and the palette, so every chart on a surface gets the same series colours,
|
|
2051
|
-
* and preview and export (which both call this function) draw the same ones.
|
|
2052
|
-
*/
|
|
2053
|
-
declare function chartPaletteForFill(fill: string, palette: readonly string[], options?: ChartPaletteOptions): string[];
|
|
2054
|
-
/** 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. */
|
|
2055
|
-
declare const CHART_SLICE_MAX_SHIFT = 20;
|
|
2056
|
-
/** 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. */
|
|
2057
|
-
declare const CHART_SLICE_SEPARATOR_PX = 2;
|
|
2058
|
-
/** LH-161: the slices of a pie or doughnut: their colors, and whether the chart separates every slice with a surface-colored border. */
|
|
2059
|
-
interface ChartSlicePlan {
|
|
2060
|
-
colors: string[];
|
|
2061
|
-
bordered: boolean;
|
|
2062
|
-
}
|
|
2063
|
-
/**
|
|
2064
|
-
* LH-161: the colors of a pie or doughnut of `count` slices, from `palette` (the colors a chart draws, {@link chartPaletteForFill} with
|
|
2065
|
-
* 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
|
|
2066
|
-
* (palette color `count - 1`, a color from the scheme: `options.legible`) is closer than {@link CHART_SERIES_MIN_LIGHTNESS_STEP} CIE L*
|
|
2067
|
-
* to the first, it alone moves, along the lightness axis (its hue and as much chroma as sRGB allows kept) by at most
|
|
2068
|
-
* {@link CHART_SLICE_MAX_SHIFT} L*, to the nearest lightness that keeps its contrast floor against `fill` and the step from both its
|
|
2069
|
-
* neighbors (a color difference under {@link CHART_SERIES_MIN_DIFFERENCE} from any other slice costs more the further it falls). Where no
|
|
2070
|
-
* such lightness exists the palette color stays and `bordered` is true: the engines draw a {@link CHART_SLICE_SEPARATOR_PX} border in
|
|
2071
|
-
* the surface color on every slice of the chart, which separates the pair by shape (`opf/chart-color-only` accepts it). Every other color
|
|
2072
|
-
* 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
|
|
2073
|
-
* reports the pair an author chose), and fewer than three slices, or more than the palette holds (the colors repeat), change nothing.
|
|
2074
|
-
*/
|
|
2075
|
-
declare function chartSlicePlan(fill: string, palette: readonly string[], count: number, options?: {
|
|
2076
|
-
legible?: readonly boolean[];
|
|
2077
|
-
}): ChartSlicePlan;
|
|
2078
|
-
/** 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). */
|
|
2079
|
-
declare const CHART_SERIES_SOFT_MIX = 0.25;
|
|
2080
|
-
/** LH-105: a softened series colour and the DrawingML HSL transforms (thousandths of a percent) that make it of its full-strength colour. */
|
|
2081
|
-
interface ChartSoftColor {
|
|
2082
|
-
hex: string;
|
|
2083
|
-
satMod: number;
|
|
2084
|
-
lumMod?: number;
|
|
2085
|
-
lumOff?: number;
|
|
2086
|
-
}
|
|
2087
|
-
/**
|
|
2088
|
-
* LH-105: the colour DrawingML's HSL transforms make of `hex`: its saturation times `satMod`, its lightness times `lumMod` plus `lumOff`
|
|
2089
|
-
* (thousandths of a percent, each clamped to 0 to 1), as PowerPoint applies `<a:satMod>`, `<a:lumMod>` and `<a:lumOff>` to a scheme colour.
|
|
2090
|
-
*/
|
|
2091
|
-
declare function applyHslTransforms(hex: string, transforms: {
|
|
2092
|
-
satMod?: number;
|
|
2093
|
-
lumMod?: number;
|
|
2094
|
-
lumOff?: number;
|
|
2095
|
-
}): string;
|
|
2096
|
-
/**
|
|
2097
|
-
* LH-105: the soft series colours of a palette already placed for `fill` ({@link chartPaletteForFill}). Each series `legible` lists (the
|
|
2098
|
-
* scheme's; an authored colour stays as written) has its HSL lightness moved {@link CHART_SERIES_SOFT_MIX} of the way towards the
|
|
2099
|
-
* 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
|
|
2100
|
-
* 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
|
|
2101
|
-
* lightness to a neighbouring series than the placed palette had them, capped at {@link CHART_SERIES_MIN_LIGHTNESS_STEP} (series 1 and 2
|
|
2102
|
-
* of a dark scheme chart: {@link CHART_LEAD_LIGHTNESS_STEP}, `lead`). The neighbours are the series before (already softened) and after
|
|
2103
|
-
* (still placed). A colour no move keeps within those bounds stays at full strength. In series order and deterministic.
|
|
2104
|
-
*/
|
|
2105
|
-
declare function softenChartPalette(fill: string, palette: readonly string[], options?: {
|
|
2106
|
-
legible?: readonly boolean[];
|
|
2107
|
-
floor?: (index: number) => number;
|
|
2108
|
-
lead?: boolean;
|
|
2109
|
-
}): string[];
|
|
2110
|
-
/**
|
|
2111
|
-
* LH-105: the transform of each softened series of `chartPaletteForFill(fill, palette, {...options, soften: true})`, or undefined for a series
|
|
2112
|
-
* drawn at full strength: the PPTX export writes a softened scheme accent as `<a:schemeClr val="accentN"><a:lumMod/><a:lumOff/></a:schemeClr>`.
|
|
2113
|
-
*/
|
|
2114
|
-
declare function chartSoftColors(fill: string, palette: readonly string[], options?: ChartPaletteOptions): (ChartSoftColor | undefined)[];
|
|
2115
|
-
/**
|
|
2116
|
-
* 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
|
|
2117
|
-
* text on `backdrop` (4.5:1, WCAG 1.4.3) by moving its lightness only, so the label keeps the hue of its line.
|
|
2118
|
-
*/
|
|
2119
|
-
declare function chartSeriesLabelColor(backdrop: string, color: string): string;
|
|
2120
|
-
/** Share of white mixed into each accent to make the extended tints of {@link chartSeriesPalette} (series 7 to 12). */
|
|
2121
|
-
declare const CHART_SERIES_TINT_MIX = 0.4;
|
|
2122
|
-
/**
|
|
2123
|
-
* The series colours of a chart before the per-surface adjustment: twelve opaque #RRGGBB colours in series order, taken from the deck's
|
|
2124
|
-
* resolved colour scheme (`design.colorScheme` after the theme, the record and any inline overrides are applied).
|
|
2125
|
-
*
|
|
2126
|
-
* - 1 to 6: `accent1` to `accent6`. A slot the scheme leaves out takes the engine default scheme's slot.
|
|
2127
|
-
* - 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`
|
|
2128
|
-
* is series 7), for charts with more than six series.
|
|
2129
|
-
*
|
|
2130
|
-
* Pass the result to {@link chartPaletteForFill} with the chart panel colour for the colours a chart draws and writes: contrast against
|
|
2131
|
-
* the panel without letting two series merge. Series `i` takes colour `i`; a pie, doughnut, treemap or funnel takes colour `i` for
|
|
2132
|
-
* category `i`. The colours depend on the scheme only, so the preview, the PPTX export and the colour-blind rule draw the same ones.
|
|
2133
|
-
* The role overrides (`primary`, `secondary`, `accent`) do not change the list: series 1 to 3 are always `accent1` to `accent3`, the
|
|
2134
|
-
* theme slots the PPTX export writes as `schemeClr accentN`.
|
|
2135
|
-
*
|
|
2136
|
-
* RR-89: `colors` is the chart's own `chart.colors` (positional ColorRefs). Entry `i` replaces palette colour `i`; an entry that cannot
|
|
2137
|
-
* be resolved ({@link resolveChartColors}) keeps the scheme colour, and entries past the twelfth extend the list. `context` carries the
|
|
2138
|
-
* deck's roles and `variables` for entries that name them.
|
|
2139
|
-
*/
|
|
2140
|
-
declare function chartSeriesPalette(colorScheme?: Record<string, unknown>, colors?: unknown, context?: ChartColorContext): string[];
|
|
2141
|
-
/**
|
|
2142
|
-
* 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
|
|
2143
|
-
* when `colors[i]` is absent or cannot be resolved, so the series keeps the scheme colour of its position. These are the series
|
|
2144
|
-
* {@link chartPaletteForFill} lifts to 4.5:1 on a dark surface (`options.legible`). The list covers the palette {@link chartSeriesPalette}
|
|
2145
|
-
* returns for the same arguments (twelve entries, more when `colors` is longer).
|
|
2146
|
-
*/
|
|
2147
|
-
declare function chartSchemeSeries(colors: unknown, colorScheme?: Record<string, unknown>, context?: ChartColorContext): boolean[];
|
|
2148
|
-
/** What a `chart.colors` entry resolves against: the deck's role colours and `variables`, as for any ColorRef. */
|
|
2149
|
-
interface ChartColorContext {
|
|
2150
|
-
/** RR-96: the variant's accent order (`roles.map.accents`): series 1 to 6 take these slots in this order. Default: accent1 to accent6. */
|
|
2151
|
-
accents?: readonly ColorAccentSlot[];
|
|
2152
|
-
roles?: ResolveColorRefRoles;
|
|
2153
|
-
variables?: Record<string, unknown>;
|
|
2154
|
-
}
|
|
2155
|
-
/**
|
|
2156
|
-
* The opaque #RRGGBB colour of each `chart.colors` entry (a hex colour, a colour-scheme slot or role, or a `var:<id>` variable), in
|
|
2157
|
-
* 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
|
|
2158
|
-
* dropped. `colors` that is not an array resolves to an empty list.
|
|
2159
|
-
*/
|
|
2160
|
-
declare function resolveChartColors(colors: unknown, colorScheme?: Record<string, unknown>, context?: ChartColorContext): (string | undefined)[];
|
|
2161
|
-
/** Share of the text colour mixed into the surface to make the muted colour of a highlighted chart. */
|
|
2162
|
-
declare const CHART_HIGHLIGHT_MUTED_MIX = 0.3;
|
|
2163
|
-
/** Smallest contrast the muted colour keeps against the surface: recessive, but still a visible mark. */
|
|
2164
|
-
declare const CHART_HIGHLIGHT_MUTED_MIN_CONTRAST = 1.6;
|
|
2165
|
-
/** LH-105: the colour difference (CIE76) a context gray keeps from every focused colour. */
|
|
2166
|
-
declare const CHART_CONTEXT_FOCUS_DIFFERENCE = 20;
|
|
2167
|
-
/** 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). */
|
|
2168
|
-
declare const CHART_CONTEXT_MIN_CONTRAST = 3;
|
|
2169
|
-
/**
|
|
2170
|
-
* 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,
|
|
2171
|
-
* 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
|
|
2172
|
-
* context can be the light neutral Few draws, still clearly visible.
|
|
2173
|
-
*/
|
|
2174
|
-
declare const CHART_CONTEXT_LABELED_MIN_CONTRAST = 1.6;
|
|
2175
|
-
/**
|
|
2176
|
-
* 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
|
|
2177
|
-
* mixed towards the text colour (tx1), from {@link CHART_HIGHLIGHT_MUTED_MIX} in 2% steps until it reaches
|
|
2178
|
-
* {@link CHART_CONTEXT_MIN_CONTRAST} against the backdrop. A grey in the backdrop's own hue, quieter than the text, visible as a mark.
|
|
2179
|
-
* The first of {@link chartContextColors}.
|
|
2180
|
-
*/
|
|
2181
|
-
declare function chartContextColor(surface: string, text: string): string;
|
|
2182
|
-
/**
|
|
2183
|
-
* LH-105: the neutrals of `count` context series (or slices) of a focused chart, in the order the context series come: grays in the
|
|
2184
|
-
* 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
|
|
2185
|
-
* 1% steps) that reaches the contrast floor against the backdrop ({@link CHART_CONTEXT_MIN_CONTRAST}, or
|
|
2186
|
-
* {@link CHART_CONTEXT_LABELED_MIN_CONTRAST} when `labeled`: every context mark carries its text) and keeps a colour difference of
|
|
2187
|
-
* {@link CHART_CONTEXT_FOCUS_DIFFERENCE} (CIE76) from each `avoid` colour (the focused colours: a gray stands apart from a coloured focus by
|
|
2188
|
-
* 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
|
|
2189
|
-
* difference from the `avoid` colours. The first context series takes the strongest step and the last the lightest,
|
|
2190
|
-
* so neighbouring context series (stacked segments, slices) are told apart by lightness, as the focused series are by hue. When the mix
|
|
2191
|
-
* runs out of room (a dark text colour close to the backdrop), the remaining series repeat the strongest step.
|
|
2192
|
-
*/
|
|
2193
|
-
declare function chartContextColors(surface: string, text: string, count: number, options?: {
|
|
2194
|
-
labeled?: boolean;
|
|
2195
|
-
avoid?: readonly string[];
|
|
2196
|
-
}): string[];
|
|
2197
|
-
/**
|
|
2198
|
-
* 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
|
|
2199
|
-
* stand back). `increase` is the series color at full strength (`accent`). `total` is the strong color: the scheme's `dark2` when it keeps
|
|
2200
|
-
* 3:1 against the backdrop and a color difference of {@link CHART_CONTEXT_FOCUS_DIFFERENCE} (CIE76) from the accent, else the text
|
|
2201
|
-
* color (made legible on the backdrop: the strong neutral on a dark slide). `decrease` is the first context neutral
|
|
2202
|
-
* ({@link chartContextColors}), kept apart from the other two; `labeled` (every bar carries its signed value) lets it be the light gray.
|
|
2203
|
-
*/
|
|
2204
|
-
declare function chartWaterfallColors(surface: string, accent: string, text: string, strong: string | undefined, options?: {
|
|
2205
|
-
labeled?: boolean;
|
|
2206
|
-
}): {
|
|
2207
|
-
total: string;
|
|
2208
|
-
increase: string;
|
|
2209
|
-
decrease: string;
|
|
2210
|
-
};
|
|
2211
|
-
/** LH-110: how far the shaded band of a period the title names is mixed from the backdrop towards the text color. */
|
|
2212
|
-
declare const CHART_BAND_MIX = 0.06;
|
|
2213
|
-
/** LH-110: the fill of a period band: the backdrop mixed {@link CHART_BAND_MIX} towards the text color, a faint neutral under the marks. */
|
|
2214
|
-
declare function chartBandColor(surface: string, text: string): string;
|
|
2215
|
-
/**
|
|
2216
|
-
* The two colours of a chart that highlights marks (`chart.highlight`), derived from the theme only: `accent` for the highlighted
|
|
2217
|
-
* marks, `muted` for every other mark.
|
|
2218
|
-
*
|
|
2219
|
-
* - `accent` is the deck's primary colour, kept at >= 3:1 against the surface by `chartColorForFill` (a primary that already has
|
|
2220
|
-
* that contrast is returned unchanged).
|
|
2221
|
-
* - `muted` is the surface mixed {@link CHART_HIGHLIGHT_MUTED_MIX} of the way towards the text colour: a light grey on a light surface
|
|
2222
|
-
* 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
|
|
2223
|
-
* the surface (a surface and text that are close together) the mix moves towards the text colour until it holds.
|
|
2224
|
-
*
|
|
2225
|
-
* Pure arithmetic on opaque colours: the preview and the PPTX export both call it with the chart panel, the primary and the label
|
|
2226
|
-
* colour, so they draw and write the same two colours. An unresolved colour is replaced by white (surface), the surface's own
|
|
2227
|
-
* best contrast partner (text) or black (primary).
|
|
2228
|
-
*/
|
|
2229
|
-
declare function chartHighlightColors(surface: string, primary: string, text: string): {
|
|
2230
|
-
accent: string;
|
|
2231
|
-
muted: string;
|
|
2232
|
-
};
|
|
2233
|
-
/** 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). */
|
|
2234
|
-
declare const CHART_EMPHASIS_MIN_CONTRAST = 3;
|
|
2235
|
-
/** LH-03: smallest CIE L* step between the emphasised mark and the other marks, so the emphasis is visible. */
|
|
2236
|
-
declare const CHART_EMPHASIS_MIN_LIGHTNESS_STEP = 15;
|
|
2237
|
-
/**
|
|
2238
|
-
* 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
|
|
2239
|
-
* every other point. The other points keep the series colour (`color`, already adjusted for the backdrop by `chartPaletteForFill`), and
|
|
2240
|
-
* the emphasised point takes a stronger shade of it: the series colour mixed away from the backdrop (towards black on a light backdrop,
|
|
2241
|
-
* towards white on a dark one) just far enough to stand {@link CHART_EMPHASIS_MIN_LIGHTNESS_STEP} L* from it. Moving away from the
|
|
2242
|
-
* backdrop only raises the contrast, so the shade keeps the series colour's. A series colour too close to black (or white) for that
|
|
2243
|
-
* step is shaded the other way instead, while the shade keeps {@link CHART_EMPHASIS_MIN_CONTRAST} against the backdrop.
|
|
2244
|
-
*
|
|
2245
|
-
* LH-105: `strong` is the series colour at full strength when `color` is its soft form ({@link softenChartPalette}). The emphasised point
|
|
2246
|
-
* 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
|
|
2247
|
-
* strong colour is kept for the emphasis.
|
|
2248
|
-
*
|
|
2249
|
-
* 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
|
|
2250
|
-
* 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
|
|
2251
|
-
* when neither direction keeps both floors. The preview and the PPTX export call it with the same pair.
|
|
2252
|
-
*/
|
|
2253
|
-
declare function chartEmphasisColors(surface: string, color: string, strong?: string): {
|
|
2254
|
-
accent: string;
|
|
2255
|
-
muted: string;
|
|
2256
|
-
} | undefined;
|
|
2257
|
-
/** Share of the text colour mixed into the surface for the `surfaceAlt` role. */
|
|
2258
|
-
declare const SURFACE_ALT_MIX = 0.1;
|
|
2259
|
-
/** Smallest contrast `surfaceAlt` keeps against `surface`, so a band is visible next to a plain row. */
|
|
2260
|
-
declare const SURFACE_ALT_MIN_CONTRAST = 1.1;
|
|
2261
|
-
/**
|
|
2262
|
-
* The `surfaceAlt` colour role: the fill of the banded rows of a table whose other body rows take `surface`. It is the surface
|
|
2263
|
-
* mixed {@link SURFACE_ALT_MIX} of the way towards the text colour (a slightly darker band on a light table, a slightly lighter one
|
|
2264
|
-
* on a dark table), moved further until it differs from the surface by {@link SURFACE_ALT_MIN_CONTRAST}, while the text keeps
|
|
2265
|
-
* 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
|
|
2266
|
-
* other way, away from the text, which only raises the text contrast. Pure arithmetic on opaque colours, so the preview and
|
|
2267
|
-
* the PPTX export, which both resolve the `surfaceAlt` ColorRef from their own `surface` and `text` roles, draw and write the
|
|
2268
|
-
* same colour. An unresolved surface is white; an unresolved text colour is the surface's best contrast partner.
|
|
2269
|
-
*/
|
|
2270
|
-
declare function surfaceAltColor(surface: string, text: string): string;
|
|
2271
|
-
/** LH-113: share of the accent mixed into the table surface for a highlighted row. */
|
|
2272
|
-
declare const TABLE_HIGHLIGHT_MIX = 0.15;
|
|
2273
|
-
/**
|
|
2274
|
-
* LH-113: the fill of a highlighted table row (`table.highlight`, or the rows the slide's texts name): the table surface mixed
|
|
2275
|
-
* {@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
|
|
2276
|
-
* 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
|
|
2277
|
-
* the preview and the PPTX export, which both pass their own `surface`, accent and text roles, draw and write the same color. An
|
|
2278
|
-
* unresolved surface is white, an unresolved accent black, an unresolved text color the surface's best contrast partner.
|
|
2279
|
-
*/
|
|
2280
|
-
declare function tableHighlightColor(surface: string, accent: string, text: string): string;
|
|
2281
|
-
|
|
2282
|
-
/**
|
|
2283
|
-
* LH-02: the automatic scrim under text on a picture background.
|
|
2284
|
-
*
|
|
2285
|
-
* Text drawn over a photograph reads only as well as the photograph allows. When a slide's text sits on a picture background
|
|
2286
|
-
* and the author set no overlay, core adds a scrim in the slide's background color behind the text: a gradient from the
|
|
2287
|
-
* slide edge the text is near (as Claude Design draws it: from the bottom under a lower title, from the side under a text
|
|
2288
|
-
* column) or, for text in the middle of the slide, a band across it that fades out above and below. Its opacity is the lowest
|
|
2289
|
-
* (in hundredths) at which every text color reaches its target contrast over every pixel the picture could have under the
|
|
2290
|
-
* text: the gray ramp from black to white (the bound `opf/text-on-image` uses), or the range of gray the host measured there
|
|
2291
|
-
* (`ComposeSlideOptions.pictureLuminance`). Both engines draw the composed scrim: the preview as an SVG linear gradient, the
|
|
2292
|
-
* PPTX export as one native rectangle with a gradient (or solid) fill whose stops carry alpha.
|
|
2142
|
+
* Text drawn over a photograph reads only as well as the photograph allows. When a slide's text sits on a picture background
|
|
2143
|
+
* and the author set no overlay, core adds a scrim in the slide's background color behind the text: a gradient from the
|
|
2144
|
+
* slide edge the text is near (as Claude Design draws it: from the bottom under a lower title, from the side under a text
|
|
2145
|
+
* column) or, for text in the middle of the slide, a band across it that fades out above and below. Its opacity is the lowest
|
|
2146
|
+
* (in hundredths) at which every text color reaches its target contrast over every pixel the picture could have under the
|
|
2147
|
+
* text: the gray ramp from black to white (the bound `opf/text-on-image` uses), or the range of gray the host measured there
|
|
2148
|
+
* (`ComposeSlideOptions.pictureLuminance`). Both engines draw the composed scrim: the preview as an SVG linear gradient, the
|
|
2149
|
+
* PPTX export as one native rectangle with a gradient (or solid) fill whose stops carry alpha.
|
|
2293
2150
|
*/
|
|
2294
2151
|
/** A rectangle in canvas pixels. */
|
|
2295
2152
|
interface ScrimBox {
|
|
@@ -2523,353 +2380,69 @@ interface PictureTextCandidate {
|
|
|
2523
2380
|
interface PictureText {
|
|
2524
2381
|
/** The placement drawn. */
|
|
2525
2382
|
placement: PictureTextPlacement;
|
|
2526
|
-
/** The anchor and alignment it was drawn at (for the panel, the layout's anchor inside the panel, start-aligned). */
|
|
2527
|
-
anchor: PictureTextAnchor;
|
|
2528
|
-
alignment: PictureTextAlignment;
|
|
2529
|
-
/** `measured`: chosen on the host's grid; `authored`: the background's `textPlacement`. */
|
|
2530
|
-
source: 'measured' | 'authored';
|
|
2531
|
-
/** The placement does not read on the bare picture and the automatic scrim carries it. */
|
|
2532
|
-
scrim?: true;
|
|
2533
|
-
/** The panel drawn under the group: the column (canvas pixels) and the slide edge it stands on. */
|
|
2534
|
-
panel?: {
|
|
2535
|
-
box: ScrimBox;
|
|
2536
|
-
edge: ScrimEdge;
|
|
2537
|
-
};
|
|
2538
|
-
/** Every candidate with its score, in PICTURE_TEXT_PLACEMENTS order; empty when the picture was not measured. */
|
|
2539
|
-
candidates: PictureTextCandidate[];
|
|
2540
|
-
}
|
|
2541
|
-
/** Inputs of the candidates' scores. */
|
|
2542
|
-
interface PictureTextInput {
|
|
2543
|
-
grid: PictureLuminance;
|
|
2544
|
-
/** The picture's rectangle on the slide (its fit placement), canvas pixels. */
|
|
2545
|
-
picture: ScrimBox;
|
|
2546
|
-
/** The slide's text color, opaque `#RRGGBB`. */
|
|
2547
|
-
text: string;
|
|
2548
|
-
/** The automatic scrim's color (the slide background), when the background has no `overlay` key; absent, no scrim is scored. */
|
|
2549
|
-
scrim?: string;
|
|
2550
|
-
/** The author's full-frame overlay (a literal color and its alpha), which every gray is seen through. */
|
|
2551
|
-
overlay?: {
|
|
2552
|
-
color: string;
|
|
2553
|
-
alpha: number;
|
|
2554
|
-
};
|
|
2555
|
-
/** The text of each anchor and alignment (union of ink boxes, canvas pixels). */
|
|
2556
|
-
places: readonly {
|
|
2557
|
-
anchor: PictureTextAnchor;
|
|
2558
|
-
alignment: PictureTextAlignment;
|
|
2559
|
-
measure: number;
|
|
2560
|
-
box: ScrimBox;
|
|
2561
|
-
}[];
|
|
2562
|
-
/** How far around the text the picture is read, canvas pixels (the margin the automatic scrim covers, SCRIM_MARGIN). */
|
|
2563
|
-
margin?: number;
|
|
2564
|
-
/** The panel and the width of its text column, when the slide can take one. */
|
|
2565
|
-
panel?: {
|
|
2566
|
-
box: ScrimBox;
|
|
2567
|
-
measure: number;
|
|
2568
|
-
};
|
|
2569
|
-
}
|
|
2570
|
-
/**
|
|
2571
|
-
* The candidates scored on the grid, one per placement, or undefined when the grid is unusable (then the slide composes as if it were
|
|
2572
|
-
* not measured). A placement given at several measures keeps the one that reads, else the one with the lower score, else the first.
|
|
2573
|
-
*/
|
|
2574
|
-
declare function scorePictureText(input: PictureTextInput): PictureTextCandidate[] | undefined;
|
|
2575
|
-
/**
|
|
2576
|
-
* The placement core draws, from scored candidates: the layout's own placement (`preferred`) when it reads; else the reading placement
|
|
2577
|
-
* with the lowest score, the layout's alignment first; else, when the background has no `overlay` key, the placement that needs the
|
|
2578
|
-
* least automatic scrim (plus its salient weight), unless that scrim is above PANEL_SCRIM_LIMIT and the panel reads, which then wins;
|
|
2579
|
-
* else (an overlay of the author's) the placement with the lowest score. Ties keep the order of `order` (the layout's anchor, then the
|
|
2580
|
-
* middle, then the others).
|
|
2581
|
-
*/
|
|
2582
|
-
declare function choosePictureText(candidates: readonly PictureTextCandidate[], preferred: {
|
|
2583
|
-
anchor: PictureTextAnchor;
|
|
2584
|
-
alignment: PictureTextAlignment;
|
|
2585
|
-
}, order: readonly PictureTextAnchor[]): {
|
|
2586
|
-
candidate: PictureTextCandidate;
|
|
2587
|
-
scrim: boolean;
|
|
2588
|
-
} | undefined;
|
|
2589
|
-
|
|
2590
|
-
/**
|
|
2591
|
-
* SH-09: the pyramid and matrix arrangements of a layout region (`arrangement: "pyramid" | "matrix"` on a layout record's region).
|
|
2592
|
-
*
|
|
2593
|
-
* A lone list of one level in such a region is drawn as a diagram: a pyramid of stacked levels (the first entry at the apex) or a
|
|
2594
|
-
* 2 x 2 matrix of quadrants in a square. The geometry is PowerPoint's own for its Basic Pyramid and Basic Matrix SmartArt layouts,
|
|
2595
|
-
* measured through COM (SH-09 spike, 2026-11-06), so the PPTX export can write the arrangement as live SmartArt that PowerPoint lays out
|
|
2596
|
-
* exactly as the preview draws it:
|
|
2597
|
-
*
|
|
2598
|
-
* - pyramid of n levels in a frame W x H: level i (1-based, top to bottom) is H/n tall and W·i/n wide, centered; its sides continue
|
|
2599
|
-
* one slope (each side steps in by W/(2n) from its bottom edge to its top edge), so the apex is a triangle and the others are
|
|
2600
|
-
* trapezoids. PowerPoint's text rectangle is the apex's whole box, and 0.65 of a lower level's width (centered, full height).
|
|
2601
|
-
* - matrix: a square of side min(W, H) centered in the frame, a diamond filling it, and four rounded squares (quadrants 1 to 4: top
|
|
2602
|
-
* left, top right, bottom left, bottom right) 0.39 of its side, 0.095 in from its edges and 0.03 apart. A matrix holds at most four
|
|
2603
|
-
* entries; a quadrant without one is still drawn, empty. A quadrant's text rectangle is its rounded rectangle's own (DrawingML
|
|
2604
|
-
* `roundRect` at its default adjustment).
|
|
2605
|
-
*
|
|
2606
|
-
* Text: one size for every node, the list's fitted size or larger, never smaller. PowerPoint insets each node's text by a share of its
|
|
2607
|
-
* font size (ARRANGEMENT_TEXT_MARGIN); lines are centered, the block in the middle of its rectangle.
|
|
2608
|
-
*
|
|
2609
|
-
* This module is pure geometry and paint: composeSlide places the text (SlideComposition.arrangements) and both engines draw from it.
|
|
2610
|
-
*/
|
|
2611
|
-
/** The arrangements a region can ask for. */
|
|
2612
|
-
/** SH-17's linear arrangements (linear-arrangements.ts has their geometry). */
|
|
2613
|
-
declare const LINEAR_ARRANGEMENTS: readonly ["chevrons", "flow", "vertical-flow"];
|
|
2614
|
-
declare const ARRANGEMENTS: readonly ["pyramid", "matrix", "cycle", "chevrons", "flow", "vertical-flow"];
|
|
2615
|
-
type Arrangement = typeof ARRANGEMENTS[number];
|
|
2616
|
-
/** The most entries each arrangement draws as its own shapes: a pyramid's levels, a matrix's quadrants (other counts draw cards). */
|
|
2617
|
-
declare const ARRANGEMENT_MAX: Readonly<Record<Arrangement, number>>;
|
|
2618
|
-
/** A matrix draws its quadrants for exactly this many entries; other counts draw a grid of cards (at most ARRANGEMENT_CARDS_MAX). */
|
|
2619
|
-
declare const MATRIX_ENTRIES = 4;
|
|
2620
|
-
declare const ARRANGEMENT_CARDS_MAX = 8;
|
|
2621
|
-
/** A card's text inset, as a share of the font size. */
|
|
2622
|
-
declare const CARD_TEXT_MARGIN = 0.6;
|
|
2623
|
-
/** PowerPoint's SmartArt layout each arrangement matches (the `loTypeId` of a live SmartArt export). */
|
|
2624
|
-
declare const SMART_ART_LAYOUTS: Readonly<Record<Arrangement, string>>;
|
|
2625
|
-
/** The name PowerPoint gives each layout, and what a finding calls one node of each arrangement. */
|
|
2626
|
-
declare const SMART_ART_NAMES: Readonly<Record<Arrangement, {
|
|
2627
|
-
layout: string;
|
|
2628
|
-
nodes: string;
|
|
2629
|
-
}>>;
|
|
2630
|
-
/** A node's text inset on every side, as a share of its font size (PowerPoint's: 0.1 em in a pyramid level or a cycle's circle, 0.3 em in a quadrant). */
|
|
2631
|
-
declare const ARRANGEMENT_TEXT_MARGIN: Readonly<Record<Arrangement, number>>;
|
|
2632
|
-
/** A lower pyramid level's text rectangle is this share of its width, centered (the apex's is its whole box). */
|
|
2633
|
-
declare const PYRAMID_TEXT_WIDTH = 0.65;
|
|
2634
|
-
/** Matrix proportions, as shares of the square's side: the quadrant's side, its inset from the square's edge and the gap between two. */
|
|
2635
|
-
declare const MATRIX_QUADRANT = 0.39;
|
|
2636
|
-
declare const MATRIX_INSET = 0.095;
|
|
2637
|
-
declare const MATRIX_GAP = 0.03;
|
|
2638
|
-
/** DrawingML `roundRect`'s default adjustment (16667 of 100000): the corner radius as a share of the smaller side. */
|
|
2639
|
-
declare const ROUND_RECT_ADJUST = 16667;
|
|
2640
|
-
/** The text of an arrangement may grow to this many times the list's fitted size, while every node still holds its entry. */
|
|
2641
|
-
declare const ARRANGEMENT_GROWTH = 1.5;
|
|
2642
|
-
/** The outline of every node, in points (PowerPoint's 1.5 pt line in the slide's background color). */
|
|
2643
|
-
declare const ARRANGEMENT_LINE_POINTS = 1.5;
|
|
2644
|
-
/** The matrix's diamond is the primary color lightened by this share (DrawingML lumMod 1 - L, lumOff L). */
|
|
2645
|
-
declare const MATRIX_BACKGROUND_LIGHTEN = 0.8;
|
|
2646
|
-
/** The widest pyramid frame, as a multiple of its height: a wider region centers a frame of this proportion. */
|
|
2647
|
-
declare const PYRAMID_MAX_ASPECT = 2.5;
|
|
2648
|
-
interface Box$4 {
|
|
2649
|
-
x: number;
|
|
2650
|
-
y: number;
|
|
2651
|
-
width: number;
|
|
2652
|
-
height: number;
|
|
2653
|
-
}
|
|
2654
|
-
/** One node of an arrangement: its shape's box, its DrawingML preset and adjustment, and the rectangle PowerPoint sets its text in. */
|
|
2655
|
-
interface ArrangementNode {
|
|
2656
|
-
/** 0-based: the pyramid's level from the top, the matrix's quadrant (top left, top right, bottom left, bottom right). */
|
|
2657
|
-
index: number;
|
|
2658
|
-
box: Box$4;
|
|
2659
|
-
/** DrawingML preset: `trapezoid` for a pyramid level (the apex too, as PowerPoint writes it), `roundRect` for a quadrant or a box, `ellipse` for a cycle's circle, `chevron` (SH-17). */
|
|
2660
|
-
preset: 'trapezoid' | 'roundRect' | 'ellipse' | 'chevron';
|
|
2661
|
-
/** The preset's `adj` (of 100000): a trapezoid's inset over its smaller side, a rounded rectangle's corner. */
|
|
2662
|
-
adjust: number;
|
|
2663
|
-
/** The outline as a polygon (a pyramid level), in the same units as `box`; absent for a rounded rectangle (`radius`). */
|
|
2664
|
-
points?: [number, number][];
|
|
2665
|
-
/** A rounded rectangle's corner radius. */
|
|
2666
|
-
radius?: number;
|
|
2667
|
-
/** The rectangle the node's text is set in (before the text margin): PowerPoint's in the SmartArt design. */
|
|
2668
|
-
textBox: Box$4;
|
|
2669
|
-
/** OPF's pyramid: the text sits beside its level, outside the shape, so the shape's outline does not bound it. */
|
|
2670
|
-
beside?: true;
|
|
2671
|
-
/** SH-17: the shape is mirrored (a chevron pointing left, in a right-to-left deck). */
|
|
2672
|
-
flip?: true;
|
|
2673
|
-
}
|
|
2674
|
-
/** The frame a pyramid takes in `area`: all of it, or a centered frame PYRAMID_MAX_ASPECT times as wide as tall when the area is wider. */
|
|
2675
|
-
declare function pyramidFrame(area: Box$4): Box$4;
|
|
2676
|
-
/** The levels of a pyramid of `count` entries in `frame`, the apex first (PowerPoint's Basic Pyramid). */
|
|
2677
|
-
declare function pyramidNodes(frame: Box$4, count: number): ArrangementNode[];
|
|
2678
|
-
/** The square of a matrix in `frame` (its diamond's box). */
|
|
2679
|
-
declare function matrixSquare(frame: Box$4): Box$4;
|
|
2680
|
-
/** The four quadrants of a matrix in `frame` (PowerPoint's Basic Matrix), whatever the number of entries. */
|
|
2681
|
-
declare function matrixNodes(frame: Box$4): ArrangementNode[];
|
|
2682
|
-
/** OPF's pyramid, at its start: the share of the area's width the steps take, at most this many times its height. */
|
|
2683
|
-
declare const PYRAMID_STEPS_SHARE = 0.4;
|
|
2684
|
-
declare const PYRAMID_STEPS_ASPECT = 1.6;
|
|
2685
|
-
/**
|
|
2686
|
-
* OPF's own pyramid design, drawn where PowerPoint's does not hold the entries at the list's size: the levels as a stepped pyramid of
|
|
2687
|
-
* rounded bars at the start of `area` (level i of n is i/n of the steps' width, centered on one axis, `gap` apart), and each entry's
|
|
2688
|
-
* text beside its level, in one column across the rest of the area, vertically centered on its level.
|
|
2689
|
-
*/
|
|
2690
|
-
declare function pyramidSteps(area: Box$4, count: number, gap: number, radius: number): ArrangementNode[];
|
|
2691
|
-
/** OPF's own matrix design: four rounded quadrants filling `area` two by two, `gap` apart (rectangular where the area is). */
|
|
2692
|
-
declare function matrixQuadrants(area: Box$4, gap: number): ArrangementNode[];
|
|
2693
|
-
/**
|
|
2694
|
-
* The grid of cards a matrix of other than four entries draws: `columns` cards a row (core cardGridColumns), every row full but the
|
|
2695
|
-
* last, whose cards keep the others' width and are centered; the cards fill `area`, `gap` apart, with corner `radius`.
|
|
2696
|
-
*/
|
|
2697
|
-
declare function cardNodes(area: Box$4, count: number, columns: number, gap: number, radius: number): ArrangementNode[];
|
|
2698
|
-
/**
|
|
2699
|
-
* The width of a node's shape across a horizontal line `y` (a pyramid level narrows toward its top edge); a quadrant's full width,
|
|
2700
|
-
* less its rounded corners where `y` is within a radius of its top or bottom edge.
|
|
2701
|
-
*/
|
|
2702
|
-
declare function nodeWidthAt(node: ArrangementNode, y: number): number;
|
|
2703
|
-
/** A scheme color slot (as a PPTX theme names it) with the hex it resolves to on the slide and an optional luminance transform. */
|
|
2704
|
-
interface ArrangementColor {
|
|
2705
|
-
slot: 'accent1' | 'bg1' | 'tx1';
|
|
2706
|
-
hex: string;
|
|
2707
|
-
lumMod?: number;
|
|
2708
|
-
lumOff?: number;
|
|
2709
|
-
}
|
|
2710
|
-
/** What an arrangement is painted with: its nodes' fill and outline, their text, the matrix's diamond and a cycle's arrows. */
|
|
2711
|
-
interface ArrangementPaint {
|
|
2712
|
-
fill: ArrangementColor;
|
|
2713
|
-
line: ArrangementColor;
|
|
2714
|
-
text: ArrangementColor;
|
|
2715
|
-
background: ArrangementColor;
|
|
2716
|
-
arrow: ArrangementColor;
|
|
2717
|
-
}
|
|
2718
|
-
/**
|
|
2719
|
-
* The paint of an arrangement from the slide's resolved colors: the nodes in the primary color (`accent1`) outlined in the background
|
|
2720
|
-
* (`bg1`), their text in whichever of the background and the text color reads better on the primary, and the matrix's diamond the
|
|
2721
|
-
* primary lightened by MATRIX_BACKGROUND_LIGHTEN. `lighten(hex, lumMod, lumOff)` is DrawingML's luminance transform (core
|
|
2722
|
-
* applyColorTransform), so the preview and PowerPoint compute the same color.
|
|
2723
|
-
*/
|
|
2724
|
-
declare function arrangementPaint(primary: string, background: string, text: string, contrast: (a: string, b: string) => number | undefined, lighten: (hex: string, transform: {
|
|
2725
|
-
lumMod: number;
|
|
2726
|
-
lumOff: number;
|
|
2727
|
-
}) => string): ArrangementPaint;
|
|
2728
|
-
/** The proportion (width over height) of the frame a cycle of `count` entries takes in its region (PowerPoint's design). */
|
|
2729
|
-
declare function cycleAspect(count: number): number;
|
|
2730
|
-
/** PowerPoint's circle diameter for 1 to 8 entries, as a share of the frame's width (at cycleAspect). */
|
|
2731
|
-
declare const CYCLE_DIAMETER: readonly number[];
|
|
2732
|
-
/** PowerPoint's ring radius (the circles' centers) for 1 to 8 entries, as a share of the frame's width (at cycleAspect). */
|
|
2733
|
-
declare const CYCLE_RADIUS: readonly number[];
|
|
2734
|
-
/** A cycle arrow: its thickness as a share of the circle's diameter; its length and its start as shares of the gap between two circles. */
|
|
2735
|
-
declare const CYCLE_ARROW: Readonly<{
|
|
2736
|
-
thickness: 0.3375;
|
|
2737
|
-
length: 0.53;
|
|
2738
|
-
start: 0.22;
|
|
2739
|
-
}>;
|
|
2740
|
-
/** Two entries: each arrow's length and its center's distance from the line between the centers (shares of W), and its center's place along that line. */
|
|
2741
|
-
declare const CYCLE_TWO: Readonly<{
|
|
2742
|
-
length: 0.2491013;
|
|
2743
|
-
offset: 0.18876154;
|
|
2744
|
-
along: 0.48825813;
|
|
2745
|
-
}>;
|
|
2746
|
-
/** DrawingML `rightArrow`'s adjustments in a cycle: the shaft 60% of the arrow's thickness, the head half of its smaller side. */
|
|
2747
|
-
declare const CYCLE_ARROW_ADJUST: readonly [number, number];
|
|
2748
|
-
/** A cycle's arrows are the primary lightened by this share (DrawingML lumMod 1 - L, lumOff L). */
|
|
2749
|
-
declare const CYCLE_ARROW_LIGHTEN = 0.4;
|
|
2750
|
-
/** One arrow of a cycle, after the node `index`: its unrotated box, its clockwise rotation in degrees and its outline as drawn. */
|
|
2751
|
-
interface ArrangementArrow {
|
|
2752
|
-
index: number;
|
|
2753
|
-
box: Box$4;
|
|
2754
|
-
rotation: number;
|
|
2755
|
-
/** DrawingML `rightArrow`'s adj1 and adj2. */
|
|
2756
|
-
adjust: readonly [number, number];
|
|
2757
|
-
/** The outline (seven points), turned about the box's center, in the same units as `box`. */
|
|
2758
|
-
points: [number, number][];
|
|
2759
|
-
}
|
|
2760
|
-
/** DrawingML `rightArrow` in `box` with `adjust`, turned `rotation` degrees clockwise about its center. */
|
|
2761
|
-
declare function rightArrowPoints(box: Box$4, rotation: number, adjust?: readonly [number, number]): [number, number][];
|
|
2762
|
-
/** The frame a cycle of `count` entries takes in `area`: the largest of cycleAspect's proportion, centered. */
|
|
2763
|
-
declare function cycleFrame(area: Box$4, count: number): Box$4;
|
|
2764
|
-
/** PowerPoint's Basic Cycle of `count` entries (1 to 8) in `frame` (cycleFrame): the circles in entry order and the arrow after each. */
|
|
2765
|
-
declare function cycleNodes(frame: Box$4, count: number, rtl?: boolean): {
|
|
2766
|
-
nodes: ArrangementNode[];
|
|
2767
|
-
arrows: ArrangementArrow[];
|
|
2768
|
-
};
|
|
2769
|
-
/** The text inset of OPF's cycle nodes, as a share of the font size. */
|
|
2770
|
-
declare const CYCLE_RING_MARGIN = 0.2;
|
|
2771
|
-
/** OPF's cycle: a node at most this share of the area's width and of its height, and between these proportions (width over height). */
|
|
2772
|
-
declare const CYCLE_RING_NODE: Readonly<{
|
|
2773
|
-
width: 0.46;
|
|
2774
|
-
height: 0.42;
|
|
2775
|
-
maxAspect: 3;
|
|
2776
|
-
minAspect: 1.15;
|
|
2777
|
-
}>;
|
|
2778
|
-
/**
|
|
2779
|
-
* OPF's own cycle design, drawn where PowerPoint's circles do not hold the entries: rounded rectangles (DrawingML roundRect at its
|
|
2780
|
-
* default corner) on an ellipse that fills `area`, the first at the top and the rest clockwise (two entries: left and right; one: in the
|
|
2781
|
-
* middle; two in a tall area: one above the other), each as large as the area lets every node be while neighbors keep room for an arrow between them (2 `gap`), and an arrow
|
|
2782
|
-
* from each to the next on the line between their centers, in the middle of the room between them.
|
|
2783
|
-
*/
|
|
2784
|
-
declare function cycleRing(area: Box$4, count: number, gap: number, rtl?: boolean): {
|
|
2785
|
-
nodes: ArrangementNode[];
|
|
2786
|
-
arrows: ArrangementArrow[];
|
|
2787
|
-
};
|
|
2788
|
-
/**
|
|
2789
|
-
* OPF's second cycle design, a loop of `rows` rows (columns in an area taller than wide) with exactly one node on every place of its
|
|
2790
|
-
* edge, so no place is left empty: two rows hold ceil(n/2) nodes left to right on top and the rest right to left below; three rows hold a
|
|
2791
|
-
* node at each end of the middle row too, the rest shared between the top and the bottom. A row of fewer nodes widens them, so every row
|
|
2792
|
-
* spans the area; the rows are one height. Neighbors keep room for an arrow (2 `gap`), and an arrow goes from each node to the next
|
|
2793
|
-
* (cycleLinks). In a tall area the loop is turned a quarter clockwise. Composition keeps whichever of the ring and the loops holds the
|
|
2794
|
-
* entries larger.
|
|
2795
|
-
*/
|
|
2796
|
-
declare function cycleLoop(area: Box$4, count: number, gap: number, rtl?: boolean, rows?: number): {
|
|
2797
|
-
nodes: ArrangementNode[];
|
|
2798
|
-
arrows: ArrangementArrow[];
|
|
2799
|
-
} | undefined;
|
|
2800
|
-
/**
|
|
2801
|
-
* SH-09's safe domain for live SmartArt, from the PowerPoint COM sweep (docs/smartart.md): the instances of an arrangement for which
|
|
2802
|
-
* PowerPoint laid out every node within 0.1 pt of core's rectangle, at core's font size, with no visible difference in the shapes, and drew
|
|
2803
|
-
* the SmartArt as it draws OPF's native export of the same slide (SH-07's thresholds). An instance outside it is exported as native shapes
|
|
2804
|
-
* (`smartArt: "shapes"`) with the reason.
|
|
2805
|
-
*/
|
|
2806
|
-
declare const SMART_ART_DOMAIN: Readonly<{
|
|
2807
|
-
/** Entries: a pyramid of 1 to 5 levels (6 to 8 never fitted the list's role size in the compared frames), a matrix of 1 to 4 quadrants. */
|
|
2808
|
-
count: Readonly<Record<Arrangement, number>>;
|
|
2809
|
-
/** The frame's width over its height, per arrangement: the range the 16:9, 4:3 and 1:1 slides gave, with a small margin. */
|
|
2810
|
-
aspect: Readonly<Record<Arrangement, {
|
|
2811
|
-
min: number;
|
|
2812
|
-
max: number;
|
|
2813
|
-
}>>;
|
|
2814
|
-
/** The most lines one entry may wrap to in its node, and in all its entries (a line drawn by PowerPoint's wrap can sit up to 1 px from core's). */
|
|
2815
|
-
lines: 2;
|
|
2816
|
-
totalLines: 6;
|
|
2817
|
-
/**
|
|
2818
|
-
* The room a line break keeps: an entry's breaks must be the same when its text rectangle is this share narrower or wider (composeSlide
|
|
2819
|
-
* fits it at both), so PowerPoint, which measures its own fonts, breaks the same lines.
|
|
2820
|
-
*/
|
|
2821
|
-
slack: 0.04;
|
|
2822
|
-
/**
|
|
2823
|
-
* SH-19: the widest line an entry may have (canvas pixels). PowerPoint measures a line up to about 0.6% wider or narrower than OPF does,
|
|
2824
|
-
* and a centered line moves by half the difference, so a longer line can sit more than SH-07's 1.5 px text gate from OPF's native text
|
|
2825
|
-
* (the sweep: a 537 px line of a one-level pyramid sat 1.74 px off; every line of 440 px or less was within 1.5 px).
|
|
2826
|
-
*/
|
|
2827
|
-
lineWidth: 500;
|
|
2828
|
-
/**
|
|
2829
|
-
* SH-17: the most of a node's text rectangle (less its margins) an entry's lines may fill from top to bottom: a box PowerPoint finds
|
|
2830
|
-
* nearly full is grown or searched to another scale (the sweep found it at 0.969 of the height and above).
|
|
2831
|
-
*/
|
|
2832
|
-
fill: Readonly<Partial<Record<Arrangement, number>>>;
|
|
2833
|
-
/**
|
|
2834
|
-
* SH-17: the most of the frame the entries' text may cover (each line's width times the size, over the frame's area): PowerPoint sets
|
|
2835
|
-
* a SmartArt's lines up to a pixel from where it sets OPF's native text, which a frame dense with large text shows above SH-07's gate
|
|
2836
|
-
* (every instance above 0.082 that failed it did so for this).
|
|
2837
|
-
*/
|
|
2838
|
-
ink: Readonly<Partial<Record<Arrangement, number>>>;
|
|
2839
|
-
}>;
|
|
2840
|
-
/**
|
|
2841
|
-
* The writing of an arrangement's entries, as the domain reads it: right to left (Arabic, Hebrew and the other right-to-left scripts),
|
|
2842
|
-
* Chinese or Japanese (`cjk`), another script than Latin (`other`), or Latin (no `script`).
|
|
2843
|
-
*/
|
|
2844
|
-
declare function smartArtScript(texts: readonly string[]): {
|
|
2845
|
-
rtl: boolean;
|
|
2846
|
-
script?: 'cjk' | 'other';
|
|
2847
|
-
};
|
|
2848
|
-
/** The facts of one composed arrangement the domain is checked on (ComposedArrangement.smartArt, the frame and the text). */
|
|
2849
|
-
interface SmartArtCandidate {
|
|
2850
|
-
kind: Arrangement;
|
|
2851
|
-
count: number;
|
|
2852
|
-
frame: Box$4;
|
|
2853
|
-
/** Per entry: the lines it wraps to, and whether its breaks hold within SMART_ART_DOMAIN.slack of its width. */
|
|
2854
|
-
nodes: {
|
|
2855
|
-
lines: number;
|
|
2856
|
-
stable: boolean;
|
|
2383
|
+
/** The anchor and alignment it was drawn at (for the panel, the layout's anchor inside the panel, start-aligned). */
|
|
2384
|
+
anchor: PictureTextAnchor;
|
|
2385
|
+
alignment: PictureTextAlignment;
|
|
2386
|
+
/** `measured`: chosen on the host's grid; `authored`: the background's `textPlacement`. */
|
|
2387
|
+
source: 'measured' | 'authored';
|
|
2388
|
+
/** The placement does not read on the bare picture and the automatic scrim carries it. */
|
|
2389
|
+
scrim?: true;
|
|
2390
|
+
/** The panel drawn under the group: the column (canvas pixels) and the slide edge it stands on. */
|
|
2391
|
+
panel?: {
|
|
2392
|
+
box: ScrimBox;
|
|
2393
|
+
edge: ScrimEdge;
|
|
2394
|
+
};
|
|
2395
|
+
/** Every candidate with its score, in PICTURE_TEXT_PLACEMENTS order; empty when the picture was not measured. */
|
|
2396
|
+
candidates: PictureTextCandidate[];
|
|
2397
|
+
}
|
|
2398
|
+
/** Inputs of the candidates' scores. */
|
|
2399
|
+
interface PictureTextInput {
|
|
2400
|
+
grid: PictureLuminance;
|
|
2401
|
+
/** The picture's rectangle on the slide (its fit placement), canvas pixels. */
|
|
2402
|
+
picture: ScrimBox;
|
|
2403
|
+
/** The slide's text color, opaque `#RRGGBB`. */
|
|
2404
|
+
text: string;
|
|
2405
|
+
/** The automatic scrim's color (the slide background), when the background has no `overlay` key; absent, no scrim is scored. */
|
|
2406
|
+
scrim?: string;
|
|
2407
|
+
/** The author's full-frame overlay (a literal color and its alpha), which every gray is seen through. */
|
|
2408
|
+
overlay?: {
|
|
2409
|
+
color: string;
|
|
2410
|
+
alpha: number;
|
|
2411
|
+
};
|
|
2412
|
+
/** The text of each anchor and alignment (union of ink boxes, canvas pixels). */
|
|
2413
|
+
places: readonly {
|
|
2414
|
+
anchor: PictureTextAnchor;
|
|
2415
|
+
alignment: PictureTextAlignment;
|
|
2416
|
+
measure: number;
|
|
2417
|
+
box: ScrimBox;
|
|
2857
2418
|
}[];
|
|
2858
|
-
/**
|
|
2859
|
-
|
|
2860
|
-
/**
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
/** SH-19: the widest line of any entry, canvas pixels. */
|
|
2866
|
-
widest?: number;
|
|
2419
|
+
/** How far around the text the picture is read, canvas pixels (the margin the automatic scrim covers, SCRIM_MARGIN). */
|
|
2420
|
+
margin?: number;
|
|
2421
|
+
/** The panel and the width of its text column, when the slide can take one. */
|
|
2422
|
+
panel?: {
|
|
2423
|
+
box: ScrimBox;
|
|
2424
|
+
measure: number;
|
|
2425
|
+
};
|
|
2867
2426
|
}
|
|
2868
2427
|
/**
|
|
2869
|
-
*
|
|
2870
|
-
*
|
|
2428
|
+
* The candidates scored on the grid, one per placement, or undefined when the grid is unusable (then the slide composes as if it were
|
|
2429
|
+
* not measured). A placement given at several measures keeps the one that reads, else the one with the lower score, else the first.
|
|
2871
2430
|
*/
|
|
2872
|
-
declare function
|
|
2431
|
+
declare function scorePictureText(input: PictureTextInput): PictureTextCandidate[] | undefined;
|
|
2432
|
+
/**
|
|
2433
|
+
* The placement core draws, from scored candidates: the layout's own placement (`preferred`) when it reads; else the reading placement
|
|
2434
|
+
* with the lowest score, the layout's alignment first; else, when the background has no `overlay` key, the placement that needs the
|
|
2435
|
+
* least automatic scrim (plus its salient weight), unless that scrim is above PANEL_SCRIM_LIMIT and the panel reads, which then wins;
|
|
2436
|
+
* else (an overlay of the author's) the placement with the lowest score. Ties keep the order of `order` (the layout's anchor, then the
|
|
2437
|
+
* middle, then the others).
|
|
2438
|
+
*/
|
|
2439
|
+
declare function choosePictureText(candidates: readonly PictureTextCandidate[], preferred: {
|
|
2440
|
+
anchor: PictureTextAnchor;
|
|
2441
|
+
alignment: PictureTextAlignment;
|
|
2442
|
+
}, order: readonly PictureTextAnchor[]): {
|
|
2443
|
+
candidate: PictureTextCandidate;
|
|
2444
|
+
scrim: boolean;
|
|
2445
|
+
} | undefined;
|
|
2873
2446
|
|
|
2874
2447
|
/**
|
|
2875
2448
|
* SH-19: OPF's own SmartArt layout definitions (ECMA-376 Part 1, §21.4 `dgm:layoutDef`) and OPF's interpreter of them.
|
|
@@ -3038,6 +2611,7 @@ interface LayoutTable {
|
|
|
3038
2611
|
interface LayoutStyle {
|
|
3039
2612
|
node: string;
|
|
3040
2613
|
text: 'node' | 'slide';
|
|
2614
|
+
align?: 'start' | 'center';
|
|
3041
2615
|
arrow?: string;
|
|
3042
2616
|
margins: readonly [number, number, number, number];
|
|
3043
2617
|
fontSize: number;
|
|
@@ -3468,6 +3042,11 @@ interface ComposedShape {
|
|
|
3468
3042
|
anchor: 'top' | 'middle' | 'bottom';
|
|
3469
3043
|
/** Where the fitted text block is drawn: `textBox` narrowed to the text's height at the anchor (present when the shape has text). */
|
|
3470
3044
|
textArea?: Box$1;
|
|
3045
|
+
/**
|
|
3046
|
+
* RR-105: `none` when the text is one unwrapped line wider than `textBox` (a word that would otherwise break inside it): it is centered
|
|
3047
|
+
* on the text rectangle and reaches past the insets up to the shape's edges (`textArea` is that width). PPTX writes a:bodyPr wrap="none".
|
|
3048
|
+
*/
|
|
3049
|
+
textWrap?: 'none';
|
|
3471
3050
|
textDirection: 'horizontal' | 'vertical' | 'vertical270' | 'stacked';
|
|
3472
3051
|
style: ShapeStyleName;
|
|
3473
3052
|
/** The style's PowerPoint references (absent for style none). */
|
|
@@ -3506,9 +3085,221 @@ declare function composeShape(host: Rec, region: Box$1, options: {
|
|
|
3506
3085
|
* color when it reads at 4.5:1 (or the contrast cannot be measured), else whichever of the slide's text and background colors (tx1 and
|
|
3507
3086
|
* bg1, so the export writes a theme color) reads better.
|
|
3508
3087
|
*/
|
|
3509
|
-
declare function shapeTextColor(backdrop: string, preferred: string, text: string, background: string): string;
|
|
3510
|
-
/** The text to fit for `stacked` text: each character on its own line, as PowerPoint's stacked (wordArtVert) text draws it. */
|
|
3511
|
-
declare function stackedText(value: unknown): unknown;
|
|
3088
|
+
declare function shapeTextColor(backdrop: string, preferred: string, text: string, background: string): string;
|
|
3089
|
+
/** The text to fit for `stacked` text: each character on its own line, as PowerPoint's stacked (wordArtVert) text draws it. */
|
|
3090
|
+
declare function stackedText(value: unknown): unknown;
|
|
3091
|
+
|
|
3092
|
+
/** The chart constructs the engines draw. Every catalog chart type id resolves to one (see `chartOptionTarget`). */
|
|
3093
|
+
/** `combo` (FA-15) draws clustered columns and line series in one plot, the lines optionally on a secondary value axis. */
|
|
3094
|
+
type ChartOptionKind = 'bar' | 'line' | 'area' | 'pie' | 'doughnut' | 'scatter' | 'radar' | 'treemap' | 'histogram' | 'pareto' | 'box' | 'waterfall' | 'funnel' | 'map' | 'combo';
|
|
3095
|
+
interface ChartOptionTarget {
|
|
3096
|
+
kind: ChartOptionKind;
|
|
3097
|
+
/** Stacked and 100% stacked columns, bars, lines and areas: their data labels have no outside-end position. */
|
|
3098
|
+
stacked?: boolean;
|
|
3099
|
+
}
|
|
3100
|
+
type ChartLegendPosition = 'none' | 'top' | 'bottom' | 'left' | 'right';
|
|
3101
|
+
type ChartLabelContent = 'category' | 'value' | 'percent';
|
|
3102
|
+
type ChartLabelPosition = 'center' | 'inside-end' | 'inside-base' | 'outside-end' | 'above' | 'below' | 'left' | 'right';
|
|
3103
|
+
interface ChartOptionDiagnostic {
|
|
3104
|
+
code: 'chart-option-adapted';
|
|
3105
|
+
/** The option that was adapted: `axisTitles.category`, `axisTitles.value`, `axisTitles.secondary`, `legend`, `dataLabels`, `dataLabels.content`, `dataLabels.position`, `dataLabels.separator`, `line`, `secondaryAxis`, `highlight.series` or `highlight.categories`. */
|
|
3106
|
+
option: string;
|
|
3107
|
+
reason: 'unsupported-type' | 'unsupported-content' | 'unsupported-position';
|
|
3108
|
+
message: string;
|
|
3109
|
+
}
|
|
3110
|
+
interface ResolvedChartDataLabels {
|
|
3111
|
+
/** Canonical order: category, value, percent. Never empty. */
|
|
3112
|
+
content: ChartLabelContent[];
|
|
3113
|
+
/** The concrete position, or null for a construct whose labels have no position choice (area, doughnut, radar, treemap). On a combo chart, the column series' position. */
|
|
3114
|
+
position: ChartLabelPosition | null;
|
|
3115
|
+
/** Combo charts only: the concrete position of the line series' labels (`position` is the column series' one). */
|
|
3116
|
+
linePosition?: ChartLabelPosition;
|
|
3117
|
+
separator: string;
|
|
3118
|
+
}
|
|
3119
|
+
/** FA-14: the series and category names `chart.highlight` keeps for a chart type (what the type cannot highlight is dropped, with a diagnostic). */
|
|
3120
|
+
interface ResolvedChartHighlight {
|
|
3121
|
+
/** Series (column) names whose marks take the accent colour. */
|
|
3122
|
+
series: string[];
|
|
3123
|
+
/** Category (row label) names whose marks take the accent colour. */
|
|
3124
|
+
categories: string[];
|
|
3125
|
+
}
|
|
3126
|
+
interface ResolvedChartOptions {
|
|
3127
|
+
/** True when the chart carries at least one option (after adaptation); false means every engine keeps today's output. */
|
|
3128
|
+
active: boolean;
|
|
3129
|
+
/** `secondary` titles the secondary value axis of a combo chart. */
|
|
3130
|
+
axisTitles: {
|
|
3131
|
+
category?: string;
|
|
3132
|
+
value?: string;
|
|
3133
|
+
secondary?: string;
|
|
3134
|
+
};
|
|
3135
|
+
/** Undefined = no legend option: each engine keeps its default (a right legend on multi-series, pie and doughnut charts). */
|
|
3136
|
+
legend?: ChartLegendPosition;
|
|
3137
|
+
dataLabels?: ResolvedChartDataLabels;
|
|
3138
|
+
/** True when `dataLabels: false` switches off the labels a construct draws by default (funnel values, treemap category names). */
|
|
3139
|
+
dataLabelsOff?: boolean;
|
|
3140
|
+
/**
|
|
3141
|
+
* FA-14: the names `chart.highlight` keeps; undefined when the chart has no highlight or its type can highlight nothing it names.
|
|
3142
|
+
* It does not make `active` true: a highlight changes the colours of marks, never the geometry or the reserved space.
|
|
3143
|
+
*/
|
|
3144
|
+
highlight?: ResolvedChartHighlight;
|
|
3145
|
+
diagnostics: ChartOptionDiagnostic[];
|
|
3146
|
+
}
|
|
3147
|
+
interface ChartOptionSupport {
|
|
3148
|
+
/** `secondary`: the construct can have a secondary value axis (a combo chart whose `secondaryAxis` names a line series). */
|
|
3149
|
+
axisTitles: {
|
|
3150
|
+
category: boolean;
|
|
3151
|
+
value: boolean;
|
|
3152
|
+
secondary: boolean;
|
|
3153
|
+
};
|
|
3154
|
+
legend: boolean;
|
|
3155
|
+
/** FA-14: what `chart.highlight` can name: series (a whole series' marks) and categories (one category's marks, or a pie slice). */
|
|
3156
|
+
highlight: {
|
|
3157
|
+
series: boolean;
|
|
3158
|
+
categories: boolean;
|
|
3159
|
+
};
|
|
3160
|
+
dataLabels: {
|
|
3161
|
+
supported: boolean;
|
|
3162
|
+
content: readonly ChartLabelContent[];
|
|
3163
|
+
/** Empty when labels have no position choice. A combo chart lists the column positions, then the line-only ones. */
|
|
3164
|
+
positions: readonly ChartLabelPosition[];
|
|
3165
|
+
/** The position `auto` resolves to; null with no positions. */
|
|
3166
|
+
defaultPosition: ChartLabelPosition | null;
|
|
3167
|
+
/** True for the constructs that label their marks by default (funnel, treemap): `dataLabels: false` removes those labels. */
|
|
3168
|
+
defaultOn: boolean;
|
|
3169
|
+
};
|
|
3170
|
+
}
|
|
3171
|
+
/** What a chart construct can show. The table the docs, the validator, the preview and the exporter all follow. */
|
|
3172
|
+
declare function chartOptionSupport(target: ChartOptionTarget): ChartOptionSupport;
|
|
3173
|
+
/** The option target for a catalog chart type id; undefined for an id outside the catalog. */
|
|
3174
|
+
declare function chartOptionTarget(typeId: unknown): ChartOptionTarget | undefined;
|
|
3175
|
+
declare const DEFAULT_CHART_LABEL_SEPARATOR = ", ";
|
|
3176
|
+
/**
|
|
3177
|
+
* Normalise a chart's `axisTitles`, `legend` and `dataLabels` against what its type can show. `target` is undefined for a chart type
|
|
3178
|
+
* outside the catalog: nothing is adapted then (the engines fall back to their legacy output for such charts anyway).
|
|
3179
|
+
*/
|
|
3180
|
+
declare function resolveChartOptions(chart: unknown, target?: ChartOptionTarget): ResolvedChartOptions;
|
|
3181
|
+
/**
|
|
3182
|
+
* A General-format number as a label: at most twelve significant digits, no exponent unless the value needs one. LH-141: with `group` (the
|
|
3183
|
+
* series' labels group their thousands, see `groupsThousands`) a whole number of four digits or more groups them by `language`.
|
|
3184
|
+
*/
|
|
3185
|
+
declare function formatChartLabelNumber(value: number, group?: {
|
|
3186
|
+
language?: string;
|
|
3187
|
+
}, language?: string | undefined): string;
|
|
3188
|
+
/** A share as PowerPoint's `0%` label, in the language's digits and percent sign (LH-106). */
|
|
3189
|
+
declare function formatChartLabelPercent(share: number, language?: string): string;
|
|
3190
|
+
/** The label text: the selected parts in the fixed order category, value, percent, joined by the separator. */
|
|
3191
|
+
declare function chartLabelText(parts: {
|
|
3192
|
+
category?: string;
|
|
3193
|
+
value?: string;
|
|
3194
|
+
percent?: string;
|
|
3195
|
+
}, content: readonly ChartLabelContent[], separator?: string): string;
|
|
3196
|
+
/** Which marks of a chart a highlight names, in the order of the resolved chart data. */
|
|
3197
|
+
interface ChartHighlightMarks {
|
|
3198
|
+
/** One flag per plotted series (the columns after the category and X columns): its marks are highlighted. */
|
|
3199
|
+
series: boolean[];
|
|
3200
|
+
/** One flag per data row: the marks of that category are highlighted. */
|
|
3201
|
+
categories: boolean[];
|
|
3202
|
+
}
|
|
3203
|
+
/**
|
|
3204
|
+
* FA-14: which series and categories of a chart are highlighted. `highlight` is `resolveChartOptions(...).highlight` and `data` the
|
|
3205
|
+
* chart's `resolveChartData` result (its `columns`, `hasX` and `rows`). A mark is highlighted when its series OR its category is
|
|
3206
|
+
* named: a column or bar of series s in row i takes the accent colour when `series[s] || categories[i]`; every other mark takes the muted
|
|
3207
|
+
* colour (`chartHighlightColors`). Category names match the row labels as text (a number label `2024` matches `"2024"`, an empty label
|
|
3208
|
+
* matches `""`), every row that carries the label. Returns undefined when there is no highlight or it names nothing the chart plots (a
|
|
3209
|
+
* name that matches no column or label is the `chart-highlight-unknown-name` validation error), so the engines then draw the chart as if
|
|
3210
|
+
* it had none.
|
|
3211
|
+
*/
|
|
3212
|
+
declare function chartHighlightMarks(highlight: ResolvedChartHighlight | undefined, data: {
|
|
3213
|
+
columns: readonly string[];
|
|
3214
|
+
hasX?: boolean;
|
|
3215
|
+
rows: readonly (readonly unknown[])[];
|
|
3216
|
+
}): ChartHighlightMarks | undefined;
|
|
3217
|
+
/**
|
|
3218
|
+
* LH-106 (vetoable): the language a chart's numbers are drawn in. A chartex chart (waterfall, histogram, pareto, box and whisker,
|
|
3219
|
+
* funnel, treemap) keeps Latin digits with the locale's Latin separators (`ar-SA` draws them as `ar-SA-u-nu-latn`): PowerPoint
|
|
3220
|
+
* 16.0.20527 draws chartex numbers with another decimal mark than its classic charts and puts a minus sign after Arabic-Indic digits,
|
|
3221
|
+
* so only Latin digits agree. Every other chart draws the language's digits. `chart` is the chart payload (its `type`) or a type id.
|
|
3222
|
+
*/
|
|
3223
|
+
declare function chartNumberLanguage(chart: unknown, language?: string): string | undefined;
|
|
3224
|
+
|
|
3225
|
+
/** Why a chart is drawn as another construct (or with its data regrouped). */
|
|
3226
|
+
type ChartFallback = 'map-as-columns' | 'pareto-as-columns' | 'box-per-series' | 'nested-rings' | 'scatter-by-position';
|
|
3227
|
+
/** How the engines draw a chart: the construct and the data they plot. */
|
|
3228
|
+
interface ChartDrawPlan {
|
|
3229
|
+
/** The catalog chart type the engines draw: the authored one, or its fallback (`column` for a map, `doughnut` for a pie of several series). */
|
|
3230
|
+
type: string;
|
|
3231
|
+
kind: ChartOptionKind;
|
|
3232
|
+
/** Set when the chart is drawn other than as authored. */
|
|
3233
|
+
fallback?: ChartFallback;
|
|
3234
|
+
/** The resolved data as drawn: the category column, the X column of a scatter (when `hasX`), then the plotted series. */
|
|
3235
|
+
columns: string[];
|
|
3236
|
+
hasX: boolean;
|
|
3237
|
+
formats: (string | undefined)[];
|
|
3238
|
+
rows: DataCellValue[][];
|
|
3239
|
+
/** The index in the resolved columns of each drawn column (a dropped scatter X column shifts the series by one). */
|
|
3240
|
+
sources: number[];
|
|
3241
|
+
/** The resolved columns the drawn construct does not plot: the series after the first of a one-series construct, a scatter X column with no number. */
|
|
3242
|
+
dropped: string[];
|
|
3243
|
+
}
|
|
3244
|
+
/**
|
|
3245
|
+
* True when a category label names a place a map chart can plot: a country or area by its CLDR name (in English or in `language`, the
|
|
3246
|
+
* deck's BCP 47 tag), an upper-case two-letter region code (`DE`), a US state, a Canadian province or territory, an Australian state, or a
|
|
3247
|
+
* common alias such as `USA` or `UK`. Cities and postal codes are not recognized.
|
|
3248
|
+
*/
|
|
3249
|
+
declare function isPlaceLabel(label: unknown, language?: string): boolean;
|
|
3250
|
+
/**
|
|
3251
|
+
* How the engines draw a resolved chart (`resolved` is its `resolveChartData` result; `options.language` the deck language, for place
|
|
3252
|
+
* names). The rules, each over the data alone:
|
|
3253
|
+
*
|
|
3254
|
+
* - **Map over categories that are not places** (`map-as-columns`): a `world` chart whose category labels are fewer than half places
|
|
3255
|
+
* ({@link isPlaceLabel}) is drawn as clustered columns, every series kept. A map needs places to plot; Q1 to Q4 would be empty tiles.
|
|
3256
|
+
* - **Several series on a Pareto chart** (`pareto-as-columns`, LH-175): a Pareto chart sorts one series and draws its cumulative share,
|
|
3257
|
+
* so two or more series that hold numbers (Current and Baseline by quarter) are drawn as clustered columns in data order, every series
|
|
3258
|
+
* kept, in the preview and in PowerPoint.
|
|
3259
|
+
* - **One value per box-and-whisker category** (`box-per-series`): when no category label repeats (two rows or more), each box would be a
|
|
3260
|
+
* single value. The rows are one group named after the category column, so each series is one box of its values across the categories.
|
|
3261
|
+
* - **Several series on a pie or doughnut** (`nested-rings`): two or more series that hold numbers are drawn as a doughnut of one ring per
|
|
3262
|
+
* series, the first series innermost (as PowerPoint orders the rings of a doughnut), every ring coloured by category.
|
|
3263
|
+
* - **Scatter whose X column holds no number** (`scatter-by-position`): the text column cannot be an X axis, so it is left out and every
|
|
3264
|
+
* series is plotted against the category position (1, 2, 3, ...), like a scatter of one value column.
|
|
3265
|
+
*
|
|
3266
|
+
* A construct that plots one series (treemap, histogram with categories, a Pareto chart of one numeric series, waterfall, funnel, map,
|
|
3267
|
+
* and pie) still draws only the first; the others are listed in `dropped`.
|
|
3268
|
+
*/
|
|
3269
|
+
declare function chartDrawPlan(chart: unknown, resolved: Extract<ResolvedChartData, {
|
|
3270
|
+
ok: true;
|
|
3271
|
+
}>, options?: {
|
|
3272
|
+
language?: string;
|
|
3273
|
+
}): ChartDrawPlan;
|
|
3274
|
+
/**
|
|
3275
|
+
* The multi-series Pareto type-adaptation warning, or the `chart-series-dropped` warning when a drawn construct leaves a resolved column out ({@link chartDrawPlan}'s `dropped`), at
|
|
3276
|
+
* the chart's `type` (`path` is the chart's JSON Pointer). Empty when no reported type adaptation or series loss applies.
|
|
3277
|
+
*/
|
|
3278
|
+
declare function chartDrawDiagnostics(chart: unknown, resolved: ResolvedChartData, path?: string, options?: {
|
|
3279
|
+
language?: string;
|
|
3280
|
+
}): DataDiagnostic[];
|
|
3281
|
+
/**
|
|
3282
|
+
* LH-56: the colour of a label drawn inside a mark (a treemap tile, a funnel bar, a map tile) of colour `fill`: the deck's full text colour
|
|
3283
|
+
* `text` when it reaches 4.5:1 on the fill, else the slide background `background` (the other role colour, so the PPTX export still writes a
|
|
3284
|
+
* theme colour) when that does, else black or white ({@link textColorForFill}). The preview and the PPTX export both call it.
|
|
3285
|
+
*/
|
|
3286
|
+
declare function markLabelColor(fill: string, text: string, background?: string): string;
|
|
3287
|
+
|
|
3288
|
+
interface ChartPointGeometry {
|
|
3289
|
+
ok: true;
|
|
3290
|
+
series: number;
|
|
3291
|
+
row: number;
|
|
3292
|
+
column: number;
|
|
3293
|
+
box: LayoutBox;
|
|
3294
|
+
position: {
|
|
3295
|
+
x: number;
|
|
3296
|
+
y: number;
|
|
3297
|
+
};
|
|
3298
|
+
normal: {
|
|
3299
|
+
x: number;
|
|
3300
|
+
y: number;
|
|
3301
|
+
};
|
|
3302
|
+
}
|
|
3512
3303
|
|
|
3513
3304
|
/**
|
|
3514
3305
|
* Overlay shapes and connectors (shapes SH-04): a slide's `shapes` array, drawn over the composed slide in array order (later entries on
|
|
@@ -3648,6 +3439,7 @@ interface ComposedOverlayShape extends ComposedItem {
|
|
|
3648
3439
|
id: string;
|
|
3649
3440
|
ref: string;
|
|
3650
3441
|
edge: 'top' | 'bottom' | 'left' | 'right' | 'center';
|
|
3442
|
+
chartPoint?: Omit<ChartPointGeometry, 'ok'>;
|
|
3651
3443
|
};
|
|
3652
3444
|
/** `front` (the default): over the slide, after its content and furniture; `back`: behind it, after the background and watermark, before the content. */
|
|
3653
3445
|
layer: OverlayLayer;
|
|
@@ -3719,7 +3511,36 @@ interface OverlayIssue {
|
|
|
3719
3511
|
* (opf/shape-anchor-missing), a connector end that names no block or overlay shape of the slide (opf/connector-end-missing) and a site index
|
|
3720
3512
|
* the end's shape does not have (opf/schema). `slidePath` is the slide's JSON Pointer (`/slides/0`).
|
|
3721
3513
|
*/
|
|
3722
|
-
declare function overlayIssues(slide: unknown, slidePath: string
|
|
3514
|
+
declare function overlayIssues(slide: unknown, slidePath: string, presentation?: unknown, canvas?: {
|
|
3515
|
+
width: number;
|
|
3516
|
+
height: number;
|
|
3517
|
+
rtl: boolean;
|
|
3518
|
+
}): OverlayIssue[];
|
|
3519
|
+
|
|
3520
|
+
type ScriptItemizationProfile = Partial<Pick<ScriptMeasurementProfile, 'script' | 'scriptRole' | 'bcp47'>>;
|
|
3521
|
+
interface ScriptTextRun {
|
|
3522
|
+
text: string;
|
|
3523
|
+
script: string;
|
|
3524
|
+
role: ScriptRole;
|
|
3525
|
+
}
|
|
3526
|
+
/** ISO 15924 script of one character: `Zyyy` common, `Zinh` inherited, `Zzzz` otherwise unknown. */
|
|
3527
|
+
declare function scriptOfCharacter(character: string): string;
|
|
3528
|
+
/**
|
|
3529
|
+
* Split text into font runs by Unicode script, following PowerPoint's
|
|
3530
|
+
* character-to-slot rules where they are known:
|
|
3531
|
+
* - Letters take their script's slot. Latin, Greek and Cyrillic share one run.
|
|
3532
|
+
* - East Asian common characters (CJK punctuation U+3000-303F, fullwidth forms
|
|
3533
|
+
* U+FF00-FFEF and similar) are East Asian, also at the start of a text; with
|
|
3534
|
+
* an East Asian language, curly quotes, dashes and the ellipsis are too.
|
|
3535
|
+
* - ASCII spaces, digits and punctuation use the latin slot next to East Asian
|
|
3536
|
+
* text, and stay in a complex-script run (as PowerPoint draws them with the
|
|
3537
|
+
* complex-script font inside Arabic, Hebrew, Indic or Thai text).
|
|
3538
|
+
* - Other common and inherited characters (combining marks, other punctuation)
|
|
3539
|
+
* join the preceding run, or the following run at the start of the text.
|
|
3540
|
+
* `profile` (for example core `resolveScriptFonts` output) supplies the
|
|
3541
|
+
* language, which disambiguates Han and the language-dependent characters.
|
|
3542
|
+
*/
|
|
3543
|
+
declare function itemizeScripts(text: unknown, profile?: ScriptItemizationProfile): ScriptTextRun[];
|
|
3723
3544
|
|
|
3724
3545
|
/** The quotation marks that wrap a quote body. Each is one UTF-16 code unit, so a quote's source offsets shift by exactly one. */
|
|
3725
3546
|
interface QuoteMarks {
|
|
@@ -4049,7 +3870,8 @@ declare function patternRuns(preset: unknown): {
|
|
|
4049
3870
|
* Geometry is shared: renderers and exporters only draw what these functions return.
|
|
4050
3871
|
*/
|
|
4051
3872
|
type CaptionPosition = 'below' | 'above';
|
|
4052
|
-
|
|
3873
|
+
/** A caption's alignment as a document writes it: logical, `start` is the edge its text starts on. */
|
|
3874
|
+
type CaptionAlignment = 'start' | 'center' | 'end';
|
|
4053
3875
|
type RichText = string | readonly (string | RichTextRun)[];
|
|
4054
3876
|
interface CaptionObject {
|
|
4055
3877
|
text: RichText;
|
|
@@ -4159,7 +3981,7 @@ declare function collectCitations(presentation: unknown): DeckCitations;
|
|
|
4159
3981
|
*/
|
|
4160
3982
|
declare function slideCitations(slide: unknown, slideIndex: number, presentation?: unknown): SlideCitations | undefined;
|
|
4161
3983
|
/** Fits a string or TextRun[] into a box at a requested size (composeSlide supplies its placed fitter). */
|
|
4162
|
-
type AnnotationFitter = (value: RichText, box: LayoutBox, requestedSize: number, minFontSize: number, path: string, alignment:
|
|
3984
|
+
type AnnotationFitter = (value: RichText, box: LayoutBox, requestedSize: number, minFontSize: number, path: string, alignment: 'left' | 'center' | 'right') => TextFit | RichTextFit;
|
|
4163
3985
|
interface AnnotationLayoutOptions {
|
|
4164
3986
|
/** LH-138: a caption that reads "Name: detail" draws its name in bold (a picture's caption; see `splitCaptionName`). */
|
|
4165
3987
|
nameDetail?: boolean;
|
|
@@ -4175,7 +3997,8 @@ interface ComposedCaption {
|
|
|
4175
3997
|
value: Caption;
|
|
4176
3998
|
text: RichText;
|
|
4177
3999
|
position: CaptionPosition;
|
|
4178
|
-
alignment
|
|
4000
|
+
/** The engine's alignment for the caption's `align`: `left` is the start edge and `right` the end edge (`physicalAlignment` resolves the direction). */
|
|
4001
|
+
alignment: 'left' | 'center' | 'right';
|
|
4179
4002
|
/** The caption band. */
|
|
4180
4003
|
box: LayoutBox;
|
|
4181
4004
|
/** The media box after the band is reserved; `ComposedItem.box` equals it. */
|
|
@@ -4257,8 +4080,34 @@ interface ReferencesSlideOptions {
|
|
|
4257
4080
|
*/
|
|
4258
4081
|
declare function referencesSlide(presentation: unknown, options?: ReferencesSlideOptions): Record<string, unknown>;
|
|
4259
4082
|
|
|
4260
|
-
/** The
|
|
4261
|
-
declare const
|
|
4083
|
+
/** The longest diagram source, in characters. */
|
|
4084
|
+
declare const DIAGRAM_SOURCE_LIMIT = 20000;
|
|
4085
|
+
/** The most edges, messages, relations or arrows in one diagram. */
|
|
4086
|
+
declare const DIAGRAM_MAX_EDGES = 500;
|
|
4087
|
+
|
|
4088
|
+
/** Why a PlantUML source cannot be drawn, with its 1-based position. */
|
|
4089
|
+
interface PlantumlIssue {
|
|
4090
|
+
code: 'diagram-syntax' | 'diagram-unsupported' | 'diagram-limit';
|
|
4091
|
+
message: string;
|
|
4092
|
+
line?: number;
|
|
4093
|
+
column?: number;
|
|
4094
|
+
}
|
|
4095
|
+
/** The PlantUML diagram types OPF draws (diagram.ts PLANTUML_DIAGRAMS names the pele family of each). */
|
|
4096
|
+
type PlantumlDiagram = 'sequence' | 'class' | 'state' | 'activity' | 'usecase' | 'component' | 'mindmap' | 'gantt';
|
|
4097
|
+
/** A PlantUML diagram as the pele source that draws it. */
|
|
4098
|
+
interface PlantumlTranslation {
|
|
4099
|
+
/** The PlantUML diagram type (a key of PLANTUML_DIAGRAMS). */
|
|
4100
|
+
diagram: PlantumlDiagram;
|
|
4101
|
+
/** Mermaid source pele draws. */
|
|
4102
|
+
mermaid: string;
|
|
4103
|
+
}
|
|
4104
|
+
|
|
4105
|
+
/**
|
|
4106
|
+
* The syntaxes a diagram's `source` can be written in: Mermaid; Graphviz DOT (SH-12), which OPF reads itself and pele lays out with its
|
|
4107
|
+
* layered layout as a flowchart (diagram-dot.ts); and PlantUML (SH-13), which OPF reads itself and pele draws as the Mermaid family of the
|
|
4108
|
+
* same kind (diagram-plantuml.ts).
|
|
4109
|
+
*/
|
|
4110
|
+
declare const DIAGRAM_SYNTAXES: readonly ["mermaid", "dot", "plantuml"];
|
|
4262
4111
|
type DiagramSyntax = typeof DIAGRAM_SYNTAXES[number];
|
|
4263
4112
|
/** A diagram payload in its object form: the string shorthand is `{ source }`. */
|
|
4264
4113
|
interface DiagramPayload {
|
|
@@ -4276,6 +4125,23 @@ interface DiagramIssue {
|
|
|
4276
4125
|
}
|
|
4277
4126
|
/** The object form of a `diagram` value, or undefined when the value is neither a string nor an object with a string source. */
|
|
4278
4127
|
declare function diagramPayload(value: unknown): DiagramPayload | undefined;
|
|
4128
|
+
/**
|
|
4129
|
+
* SH-13: the PlantUML diagram types OPF draws, and the pele family each is drawn as (diagram-plantuml.ts writes the source of that family).
|
|
4130
|
+
*/
|
|
4131
|
+
declare const PLANTUML_DIAGRAMS: Readonly<Record<string, string>>;
|
|
4132
|
+
/**
|
|
4133
|
+
* SH-13: a PlantUML source as the pele source that draws it, or the issue that stops it (with its line and column in the PlantUML source);
|
|
4134
|
+
* `diagram-unloaded` in a browser until ensureDiagrams has loaded the reader.
|
|
4135
|
+
*/
|
|
4136
|
+
declare function plantumlToMermaid(source: string, options: {
|
|
4137
|
+
maxEdges: number;
|
|
4138
|
+
}): {
|
|
4139
|
+
ok: true;
|
|
4140
|
+
translation: PlantumlTranslation;
|
|
4141
|
+
} | {
|
|
4142
|
+
ok: false;
|
|
4143
|
+
issue: PlantumlIssue | DiagramIssue;
|
|
4144
|
+
};
|
|
4279
4145
|
/** The share of the readability floor the smallest secondary label of a diagram keeps (its node labels keep the whole floor). */
|
|
4280
4146
|
declare const DIAGRAM_SECONDARY_FLOOR = 0.75;
|
|
4281
4147
|
/**
|
|
@@ -4284,9 +4150,7 @@ declare const DIAGRAM_SECONDARY_FLOOR = 0.75;
|
|
|
4284
4150
|
* stays a picture there and reports the info finding `diagram-shapes-unavailable`.
|
|
4285
4151
|
*/
|
|
4286
4152
|
declare const DIAGRAM_SHAPE_FAMILIES: readonly string[];
|
|
4287
|
-
|
|
4288
|
-
declare const DIAGRAM_SOURCE_LIMIT = 20000;
|
|
4289
|
-
declare const DIAGRAM_MAX_EDGES = 500;
|
|
4153
|
+
|
|
4290
4154
|
/**
|
|
4291
4155
|
* Whether a diagram value can be drawn: its diagram type (pele's name, such as `flowchart` or `sequence`) or the issue that stops
|
|
4292
4156
|
* it. Parsing only: no text is measured. Results are cached by source.
|
|
@@ -4379,390 +4243,119 @@ interface DiagramPalette {
|
|
|
4379
4243
|
/** Secondary text: axis labels, stereotypes, notes. */
|
|
4380
4244
|
muted: string;
|
|
4381
4245
|
/** Connectors and arrowheads. */
|
|
4382
|
-
line: string;
|
|
4383
|
-
/** Node fill, and the fill of the second level of nested groups. */
|
|
4384
|
-
surface: string;
|
|
4385
|
-
surfaceAlt: string;
|
|
4386
|
-
/** Node outlines. */
|
|
4387
|
-
border: string;
|
|
4388
|
-
/** The highlight color (the first accent). */
|
|
4389
|
-
accent: string;
|
|
4390
|
-
/** Data series, in the variant's accent order. */
|
|
4391
|
-
series: string[];
|
|
4392
|
-
/** Text on a light series fill and on a dark one. */
|
|
4393
|
-
textOnLight: string;
|
|
4394
|
-
textOnDark: string;
|
|
4395
|
-
/** What a diagram marks as critical (a gantt task). */
|
|
4396
|
-
critical: string;
|
|
4397
|
-
fontFamily: string;
|
|
4398
|
-
monoFamily: string;
|
|
4399
|
-
}
|
|
4400
|
-
interface DiagramPaletteInput {
|
|
4401
|
-
/** The opaque color under the diagram. */
|
|
4402
|
-
surface: string;
|
|
4403
|
-
/** The slide's text and muted text colors (resolved roles). */
|
|
4404
|
-
text: string;
|
|
4405
|
-
mutedText?: string;
|
|
4406
|
-
/** The deck color scheme and what its ColorRefs resolve against, as for a chart (chartSeriesPalette). */
|
|
4407
|
-
colorScheme?: Record<string, unknown>;
|
|
4408
|
-
context?: ChartColorContext;
|
|
4409
|
-
/** The scheme's darkest and lightest text colors (`dark1`, `light1`), for text on series fills. */
|
|
4410
|
-
dark?: string;
|
|
4411
|
-
light?: string;
|
|
4412
|
-
fonts: {
|
|
4413
|
-
body: string;
|
|
4414
|
-
code: string;
|
|
4415
|
-
};
|
|
4416
|
-
}
|
|
4417
|
-
/** Share of the accent in a node's fill, and in the fill of a nested group; enough to read as the accent's tint on any surface. */
|
|
4418
|
-
declare const DIAGRAM_SURFACE_MIX = 0.1;
|
|
4419
|
-
declare const DIAGRAM_SURFACE_ALT_MIX = 0.18;
|
|
4420
|
-
/** Smallest contrast a node outline keeps against the surface, and a connector line: visible structure, quieter than text. */
|
|
4421
|
-
declare const DIAGRAM_BORDER_MIN_CONTRAST = 1.8;
|
|
4422
|
-
declare const DIAGRAM_LINE_MIN_CONTRAST = 3;
|
|
4423
|
-
/**
|
|
4424
|
-
* The palette a diagram is painted in, from the slide's resolved design: nodes are tints of the variant's first accent over the
|
|
4425
|
-
* surface, outlines and connectors are mixed toward the accent and the text, data series are the chart series of the same slide
|
|
4426
|
-
* (chartSeriesPalette with chartPaletteForFill), and the text keeps 4.5:1 on every fill it is drawn on. A dark background or a
|
|
4427
|
-
* dark variant gives dark tints and light lines.
|
|
4428
|
-
*/
|
|
4429
|
-
declare function diagramPalette(input: DiagramPaletteInput): DiagramPalette;
|
|
4430
|
-
/**
|
|
4431
|
-
* A composed diagram as a self-contained SVG document in `palette`: every CSS variable and color-mix resolved, styles moved to
|
|
4432
|
-
* presentation attributes, classes and ARIA roles removed, sized `width` by `height` (the block's drawn size, in the units the
|
|
4433
|
-
* host draws in) over the drawing's own viewBox, with `alt` as its title. Labels stay text in the palette's fonts. With `classes`,
|
|
4434
|
-
* pele's classes stay on the elements (SH-07: the PPTX export tells nodes, edges and labels apart by them); the drawing is the same.
|
|
4435
|
-
*/
|
|
4436
|
-
declare function paintDiagram(diagram: Pick<ComposedDiagram, 'svg' | 'width' | 'height' | 'alt'>, palette: DiagramPalette, size: {
|
|
4437
|
-
width: number;
|
|
4438
|
-
height: number;
|
|
4439
|
-
}, options?: {
|
|
4440
|
-
classes?: boolean;
|
|
4441
|
-
}): string;
|
|
4442
|
-
/**
|
|
4443
|
-
* A composed diagram painted as an SVG group for a host's own SVG (a slide): the content of paintDiagram, translated to `box` and
|
|
4444
|
-
* scaled from diagram units to it. The group carries the font, size and fill the drawing inherits; it adds no title (the host labels
|
|
4445
|
-
* the picture).
|
|
4446
|
-
*/
|
|
4447
|
-
declare function paintDiagramGroup(diagram: Pick<ComposedDiagram, 'svg' | 'width' | 'height'>, palette: DiagramPalette, box: {
|
|
4448
|
-
x: number;
|
|
4449
|
-
y: number;
|
|
4450
|
-
width: number;
|
|
4451
|
-
height: number;
|
|
4452
|
-
}): string;
|
|
4453
|
-
|
|
4454
|
-
/** The viewBox every resolved icon is drawn in (its larger side is scaled to fit, centered). */
|
|
4455
|
-
declare const ICON_VIEWBOX = 24;
|
|
4456
|
-
/** An icon reference as written: a set's icon, a deck-local icon or an SVG source. */
|
|
4457
|
-
type IconReference = {
|
|
4458
|
-
kind: 'set';
|
|
4459
|
-
set: string;
|
|
4460
|
-
name: string;
|
|
4461
|
-
} | {
|
|
4462
|
-
kind: 'deck';
|
|
4463
|
-
name: string;
|
|
4464
|
-
} | {
|
|
4465
|
-
kind: 'source';
|
|
4466
|
-
src: string;
|
|
4467
|
-
};
|
|
4468
|
-
/** Parse an `icon` value; undefined when it is none of the three forms. */
|
|
4469
|
-
declare function parseIconReference(value: unknown): IconReference | undefined;
|
|
4470
|
-
/** One icon of a set record: its path data (drawn as the set's style) or its stroked and filled parts. */
|
|
4471
|
-
type IconSetIcon = string | {
|
|
4472
|
-
stroke?: string;
|
|
4473
|
-
fill?: string;
|
|
4474
|
-
};
|
|
4475
|
-
/** An icon-set record (https://openpresentation.org/schema/opf-icon-set/v1), embedded or registered. */
|
|
4476
|
-
interface IconSetRecord {
|
|
4477
|
-
name: string;
|
|
4478
|
-
license: string;
|
|
4479
|
-
copyright: string;
|
|
4480
|
-
viewBox: readonly [number, number, number, number];
|
|
4481
|
-
style: 'stroke' | 'fill';
|
|
4482
|
-
strokeWidth?: number;
|
|
4483
|
-
strokeLinecap?: 'butt' | 'round' | 'square';
|
|
4484
|
-
strokeLinejoin?: 'miter' | 'round' | 'bevel';
|
|
4485
|
-
icons: Readonly<Record<string, IconSetIcon>>;
|
|
4486
|
-
tags?: Readonly<Record<string, readonly string[]>>;
|
|
4487
|
-
summary?: string;
|
|
4488
|
-
version?: string;
|
|
4489
|
-
package?: string;
|
|
4490
|
-
homepage?: string;
|
|
4491
|
-
licenseText?: string;
|
|
4492
|
-
}
|
|
4493
|
-
/** A registered catalog's set: its record, or a function that loads it (a module whose default export is the record also does). */
|
|
4494
|
-
type IconSetLoader = () => Promise<unknown>;
|
|
4495
|
-
/** A path command in absolute coordinates: every SVG command is normalized to these four. */
|
|
4496
|
-
type IconCommand = ['M', number, number] | ['L', number, number] | ['C', number, number, number, number, number, number] | ['Z'];
|
|
4497
|
-
/** One part of a monochrome icon: filled (nonzero, or even-odd), stroked at `stroke` viewBox units, or both, in the one ink. */
|
|
4498
|
-
interface IconPart {
|
|
4499
|
-
commands: IconCommand[];
|
|
4500
|
-
fill?: true;
|
|
4501
|
-
evenOdd?: true;
|
|
4502
|
-
stroke?: number;
|
|
4503
|
-
linecap?: 'butt' | 'round' | 'square';
|
|
4504
|
-
linejoin?: 'miter' | 'round' | 'bevel';
|
|
4505
|
-
}
|
|
4506
|
-
/** A resolved icon: a monochrome glyph (`parts`, in a 0 0 24 24 viewBox) or a multicolor SVG `picture` with its own colors. */
|
|
4507
|
-
interface ResolvedIcon {
|
|
4508
|
-
/** The reference as written. */
|
|
4509
|
-
reference: string;
|
|
4510
|
-
kind: IconReference['kind'];
|
|
4511
|
-
/** `set` for a set's icon (with `name`), the deck-local name, or the source. */
|
|
4512
|
-
set?: string;
|
|
4513
|
-
name: string;
|
|
4514
|
-
parts?: IconPart[];
|
|
4515
|
-
/** A multicolor SVG (sanitized: no script, external reference or raster), drawn contained in the icon's box, with its aspect. */
|
|
4516
|
-
picture?: {
|
|
4517
|
-
svg: string;
|
|
4518
|
-
width: number;
|
|
4519
|
-
height: number;
|
|
4520
|
-
};
|
|
4521
|
-
/** The set's license and copyright, for a set's icon. */
|
|
4522
|
-
license?: string;
|
|
4523
|
-
copyright?: string;
|
|
4524
|
-
}
|
|
4525
|
-
type IconResolution = {
|
|
4526
|
-
ok: true;
|
|
4527
|
-
icon: ResolvedIcon;
|
|
4528
|
-
} | {
|
|
4529
|
-
ok: false;
|
|
4530
|
-
code: 'icon-unknown' | 'icon-invalid' | 'icon-unloaded';
|
|
4531
|
-
message: string;
|
|
4532
|
-
suggestions?: string[];
|
|
4533
|
-
};
|
|
4534
|
-
/**
|
|
4535
|
-
* 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
|
|
4536
|
-
* quarter turn each). Throws a RangeError for path data that is not well formed.
|
|
4537
|
-
*/
|
|
4538
|
-
declare function iconPathCommands(d: string): IconCommand[];
|
|
4539
|
-
/** Path commands as SVG path data (what the preview draws). */
|
|
4540
|
-
declare function iconPathData(commands: readonly IconCommand[]): string;
|
|
4541
|
-
/** The commands placed in `box` (canvas pixels) from the 0 0 24 24 icon viewBox. */
|
|
4542
|
-
declare function placeIconCommands(commands: readonly IconCommand[], box: {
|
|
4543
|
-
x: number;
|
|
4544
|
-
y: number;
|
|
4545
|
-
width: number;
|
|
4546
|
-
height: number;
|
|
4547
|
-
}): IconCommand[];
|
|
4548
|
-
/**
|
|
4549
|
-
* 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
|
|
4550
|
-
* a fragment) or a raster refuses it (`icon-invalid`): nothing is fetched or run. An SVG whose shapes (path, circle, ellipse, rect,
|
|
4551
|
-
* line, polyline, polygon, in groups with transforms) are drawn in one paint (a color or `currentColor`, opacity 1) is a monochrome
|
|
4552
|
-
* 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
|
|
4553
|
-
* the accent. Any other SVG (several colors, gradients, text, opacity) is a picture with its own colors.
|
|
4554
|
-
*/
|
|
4555
|
-
declare function iconFromSvg(text: string): {
|
|
4556
|
-
ok: true;
|
|
4557
|
-
parts?: IconPart[];
|
|
4558
|
-
picture?: ResolvedIcon['picture'];
|
|
4559
|
-
} | {
|
|
4560
|
-
ok: false;
|
|
4561
|
-
message: string;
|
|
4562
|
-
};
|
|
4563
|
-
/** Every `icon` value of a document (or a slide), with its dotted path: list entries, metrics and groups at any depth. */
|
|
4564
|
-
declare function documentIcons(input: unknown): {
|
|
4565
|
-
path: string;
|
|
4566
|
-
value: unknown;
|
|
4567
|
-
}[];
|
|
4568
|
-
/** Up to `limit` names nearest to `name`: names that contain it or that it contains first, then the fewest edits. */
|
|
4569
|
-
declare function nearIconNames(name: string, names: Iterable<string>, limit?: number): string[];
|
|
4570
|
-
interface IconOptions {
|
|
4571
|
-
/** The catalogs the host registered: their `iconSets` (records or loaders) are where `<set>:<name>` resolves after the document's own. */
|
|
4572
|
-
catalogs?: readonly unknown[];
|
|
4573
|
-
}
|
|
4574
|
-
/**
|
|
4575
|
-
* 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
|
|
4576
|
-
* (`catalogs.<group>.iconSets`), then in the registered catalogs' sets (records, or the sets ensureIcons loaded); a source through
|
|
4577
|
-
* 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
|
|
4578
|
-
* found, `icon-invalid` for a value or an SVG that cannot be an icon, `icon-unloaded` for a registered set or a source that
|
|
4579
|
-
* ensureIcons has not loaded yet (not a problem of the document).
|
|
4580
|
-
*/
|
|
4581
|
-
declare function resolveIcon(document: unknown, value: unknown, options?: IconOptions): IconResolution;
|
|
4582
|
-
/** What ensureIcons loads: the registered sets the document names that are not loaded yet, and the SVG files it has not read. */
|
|
4583
|
-
declare function iconsPending(document: unknown, options?: IconOptions): {
|
|
4584
|
-
sets: string[];
|
|
4585
|
-
sources: string[];
|
|
4586
|
-
};
|
|
4587
|
-
/**
|
|
4588
|
-
* Load what a document's icons need before the synchronous code reads them: each registered set it names that is a loader (the
|
|
4589
|
-
* 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
|
|
4590
|
-
* asset, a relative path or an HTTPS URL; core never fetches by itself). Resolves with the sets and sources it loaded. Cheap when
|
|
4591
|
-
* 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.
|
|
4592
|
-
*/
|
|
4593
|
-
declare function ensureIcons(document: unknown, options?: IconOptions & {
|
|
4594
|
-
readSource?: (source: string) => Promise<string | Uint8Array | undefined>;
|
|
4595
|
-
}): Promise<{
|
|
4596
|
-
sets: string[];
|
|
4597
|
-
sources: string[];
|
|
4598
|
-
}>;
|
|
4599
|
-
/**
|
|
4600
|
-
* Embed the set icons a document uses: each set's icons it names go under `catalogs.default.iconSets.<id>` (the set's license,
|
|
4601
|
-
* copyright, viewBox and style, and only those icons), so the document draws them with no registered catalog. The group is the one
|
|
4602
|
-
* 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
|
|
4603
|
-
* source), else `custom`. A registered set embeds once it is loaded (ensureIcons). Returns a copy, and the `<set>:<name>` added.
|
|
4604
|
-
*/
|
|
4605
|
-
declare function embedIcons(document: unknown, options?: IconOptions): {
|
|
4606
|
-
document: unknown;
|
|
4607
|
-
added: string[];
|
|
4608
|
-
};
|
|
4609
|
-
/** The color of an icon's chip or glyph: the slide's primary with a DrawingML luminance transform, or a scheme slot. */
|
|
4610
|
-
interface IconPaint {
|
|
4611
|
-
hex: string;
|
|
4612
|
-
role: 'primary' | 'bg1' | 'tx1';
|
|
4613
|
-
lumMod?: number;
|
|
4614
|
-
lumOff?: number;
|
|
4615
|
-
}
|
|
4616
|
-
/** LH-14: on a light slide the chip is the primary lightened to 20% of its luminance plus 80% (PowerPoint's "Lighter 80%"). */
|
|
4617
|
-
declare const ICON_CHIP_TINT: {
|
|
4618
|
-
readonly lumMod: 20000;
|
|
4619
|
-
readonly lumOff: 80000;
|
|
4620
|
-
};
|
|
4621
|
-
/** The least contrast of an icon's glyph against its chip (WCAG 1.4.11, graphical objects). */
|
|
4622
|
-
declare const ICON_MIN_CONTRAST = 3;
|
|
4623
|
-
/**
|
|
4624
|
-
* 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
|
|
4625
|
-
* 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
|
|
4626
|
-
* color that reads best on it (readableSchemeColor). A glyph under ICON_MIN_CONTRAST against its chip takes the text color instead.
|
|
4627
|
-
* The export writes the primary as its theme accent with the same transform, so the icon recolors with the theme.
|
|
4628
|
-
*/
|
|
4629
|
-
declare function iconColors(roles: Pick<ResolvedColorRoles, 'primary' | 'text' | 'background'>, dark: boolean): {
|
|
4630
|
-
chip: IconPaint;
|
|
4631
|
-
glyph: IconPaint;
|
|
4632
|
-
};
|
|
4633
|
-
|
|
4634
|
-
/** The chart constructs the engines draw. Every catalog chart type id resolves to one (see `chartOptionTarget`). */
|
|
4635
|
-
/** `combo` (FA-15) draws clustered columns and line series in one plot, the lines optionally on a secondary value axis. */
|
|
4636
|
-
type ChartOptionKind = 'bar' | 'line' | 'area' | 'pie' | 'doughnut' | 'scatter' | 'radar' | 'treemap' | 'histogram' | 'pareto' | 'box' | 'waterfall' | 'funnel' | 'map' | 'combo';
|
|
4637
|
-
interface ChartOptionTarget {
|
|
4638
|
-
kind: ChartOptionKind;
|
|
4639
|
-
/** Stacked and 100% stacked columns, bars, lines and areas: their data labels have no outside-end position. */
|
|
4640
|
-
stacked?: boolean;
|
|
4641
|
-
}
|
|
4642
|
-
type ChartLegendPosition = 'none' | 'top' | 'bottom' | 'left' | 'right';
|
|
4643
|
-
type ChartLabelContent = 'category' | 'value' | 'percent';
|
|
4644
|
-
type ChartLabelPosition = 'center' | 'inside-end' | 'inside-base' | 'outside-end' | 'above' | 'below' | 'left' | 'right';
|
|
4645
|
-
interface ChartOptionDiagnostic {
|
|
4646
|
-
code: 'chart-option-adapted';
|
|
4647
|
-
/** The option that was adapted: `axisTitles.category`, `axisTitles.value`, `axisTitles.secondary`, `legend`, `dataLabels`, `dataLabels.content`, `dataLabels.position`, `dataLabels.separator`, `line`, `secondaryAxis`, `highlight.series` or `highlight.categories`. */
|
|
4648
|
-
option: string;
|
|
4649
|
-
reason: 'unsupported-type' | 'unsupported-content' | 'unsupported-position';
|
|
4650
|
-
message: string;
|
|
4651
|
-
}
|
|
4652
|
-
interface ResolvedChartDataLabels {
|
|
4653
|
-
/** Canonical order: category, value, percent. Never empty. */
|
|
4654
|
-
content: ChartLabelContent[];
|
|
4655
|
-
/** The concrete position, or null for a construct whose labels have no position choice (area, doughnut, radar, treemap). On a combo chart, the column series' position. */
|
|
4656
|
-
position: ChartLabelPosition | null;
|
|
4657
|
-
/** Combo charts only: the concrete position of the line series' labels (`position` is the column series' one). */
|
|
4658
|
-
linePosition?: ChartLabelPosition;
|
|
4659
|
-
separator: string;
|
|
4660
|
-
}
|
|
4661
|
-
/** FA-14: the series and category names `chart.highlight` keeps for a chart type (what the type cannot highlight is dropped, with a diagnostic). */
|
|
4662
|
-
interface ResolvedChartHighlight {
|
|
4663
|
-
/** Series (column) names whose marks take the accent colour. */
|
|
4664
|
-
series: string[];
|
|
4665
|
-
/** Category (row label) names whose marks take the accent colour. */
|
|
4666
|
-
categories: string[];
|
|
4667
|
-
}
|
|
4668
|
-
interface ResolvedChartOptions {
|
|
4669
|
-
/** True when the chart carries at least one option (after adaptation); false means every engine keeps today's output. */
|
|
4670
|
-
active: boolean;
|
|
4671
|
-
/** `secondary` titles the secondary value axis of a combo chart. */
|
|
4672
|
-
axisTitles: {
|
|
4673
|
-
category?: string;
|
|
4674
|
-
value?: string;
|
|
4675
|
-
secondary?: string;
|
|
4676
|
-
};
|
|
4677
|
-
/** Undefined = no legend option: each engine keeps its default (a right legend on multi-series, pie and doughnut charts). */
|
|
4678
|
-
legend?: ChartLegendPosition;
|
|
4679
|
-
dataLabels?: ResolvedChartDataLabels;
|
|
4680
|
-
/** True when `dataLabels: false` switches off the labels a construct draws by default (funnel values, treemap category names). */
|
|
4681
|
-
dataLabelsOff?: boolean;
|
|
4682
|
-
/**
|
|
4683
|
-
* FA-14: the names `chart.highlight` keeps; undefined when the chart has no highlight or its type can highlight nothing it names.
|
|
4684
|
-
* It does not make `active` true: a highlight changes the colours of marks, never the geometry or the reserved space.
|
|
4685
|
-
*/
|
|
4686
|
-
highlight?: ResolvedChartHighlight;
|
|
4687
|
-
diagnostics: ChartOptionDiagnostic[];
|
|
4688
|
-
}
|
|
4689
|
-
interface ChartOptionSupport {
|
|
4690
|
-
/** `secondary`: the construct can have a secondary value axis (a combo chart whose `secondaryAxis` names a line series). */
|
|
4691
|
-
axisTitles: {
|
|
4692
|
-
category: boolean;
|
|
4693
|
-
value: boolean;
|
|
4694
|
-
secondary: boolean;
|
|
4695
|
-
};
|
|
4696
|
-
legend: boolean;
|
|
4697
|
-
/** FA-14: what `chart.highlight` can name: series (a whole series' marks) and categories (one category's marks, or a pie slice). */
|
|
4698
|
-
highlight: {
|
|
4699
|
-
series: boolean;
|
|
4700
|
-
categories: boolean;
|
|
4701
|
-
};
|
|
4702
|
-
dataLabels: {
|
|
4703
|
-
supported: boolean;
|
|
4704
|
-
content: readonly ChartLabelContent[];
|
|
4705
|
-
/** Empty when labels have no position choice. A combo chart lists the column positions, then the line-only ones. */
|
|
4706
|
-
positions: readonly ChartLabelPosition[];
|
|
4707
|
-
/** The position `auto` resolves to; null with no positions. */
|
|
4708
|
-
defaultPosition: ChartLabelPosition | null;
|
|
4709
|
-
/** True for the constructs that label their marks by default (funnel, treemap): `dataLabels: false` removes those labels. */
|
|
4710
|
-
defaultOn: boolean;
|
|
4246
|
+
line: string;
|
|
4247
|
+
/** Node fill, and the fill of the second level of nested groups. */
|
|
4248
|
+
surface: string;
|
|
4249
|
+
surfaceAlt: string;
|
|
4250
|
+
/** Node outlines. */
|
|
4251
|
+
border: string;
|
|
4252
|
+
/** The highlight color (the first accent). */
|
|
4253
|
+
accent: string;
|
|
4254
|
+
/** Data series, in the variant's accent order. */
|
|
4255
|
+
series: string[];
|
|
4256
|
+
/** Text on a light series fill and on a dark one. */
|
|
4257
|
+
textOnLight: string;
|
|
4258
|
+
textOnDark: string;
|
|
4259
|
+
/** What a diagram marks as critical (a gantt task). */
|
|
4260
|
+
critical: string;
|
|
4261
|
+
fontFamily: string;
|
|
4262
|
+
monoFamily: string;
|
|
4263
|
+
}
|
|
4264
|
+
interface DiagramPaletteInput {
|
|
4265
|
+
/** The opaque color under the diagram. */
|
|
4266
|
+
surface: string;
|
|
4267
|
+
/** The slide's text and muted text colors (resolved roles). */
|
|
4268
|
+
text: string;
|
|
4269
|
+
mutedText?: string;
|
|
4270
|
+
/** The deck color scheme and what its ColorRefs resolve against, as for a chart (chartSeriesPalette). */
|
|
4271
|
+
colorScheme?: Record<string, unknown>;
|
|
4272
|
+
context?: ChartColorContext;
|
|
4273
|
+
/** The scheme's darkest and lightest text colors (`dark1`, `light1`), for text on series fills. */
|
|
4274
|
+
dark?: string;
|
|
4275
|
+
light?: string;
|
|
4276
|
+
fonts: {
|
|
4277
|
+
body: string;
|
|
4278
|
+
code: string;
|
|
4711
4279
|
};
|
|
4712
4280
|
}
|
|
4713
|
-
/**
|
|
4714
|
-
declare
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
declare const
|
|
4281
|
+
/** Share of the accent in a node's fill, and in the fill of a nested group; enough to read as the accent's tint on any surface. */
|
|
4282
|
+
declare const DIAGRAM_SURFACE_MIX = 0.1;
|
|
4283
|
+
declare const DIAGRAM_SURFACE_ALT_MIX = 0.18;
|
|
4284
|
+
/** Smallest contrast a node outline keeps against the surface, and a connector line: visible structure, quieter than text. */
|
|
4285
|
+
declare const DIAGRAM_BORDER_MIN_CONTRAST = 1.8;
|
|
4286
|
+
declare const DIAGRAM_LINE_MIN_CONTRAST = 3;
|
|
4718
4287
|
/**
|
|
4719
|
-
*
|
|
4720
|
-
*
|
|
4288
|
+
* The palette a diagram is painted in, from the slide's resolved design: nodes are tints of the variant's first accent over the
|
|
4289
|
+
* surface, outlines and connectors are mixed toward the accent and the text, data series are the chart series of the same slide
|
|
4290
|
+
* (chartSeriesPalette with chartPaletteForFill), and the text keeps 4.5:1 on every fill it is drawn on. A dark background or a
|
|
4291
|
+
* dark variant gives dark tints and light lines.
|
|
4721
4292
|
*/
|
|
4722
|
-
declare function
|
|
4293
|
+
declare function diagramPalette(input: DiagramPaletteInput): DiagramPalette;
|
|
4723
4294
|
/**
|
|
4724
|
-
* A
|
|
4725
|
-
*
|
|
4295
|
+
* A composed diagram as a self-contained SVG document in `palette`: every CSS variable and color-mix resolved, styles moved to
|
|
4296
|
+
* presentation attributes, classes and ARIA roles removed, sized `width` by `height` (the block's drawn size, in the units the
|
|
4297
|
+
* host draws in) over the drawing's own viewBox, with `alt` as its title. Labels stay text in the palette's fonts. With `classes`,
|
|
4298
|
+
* pele's classes stay on the elements (SH-07: the PPTX export tells nodes, edges and labels apart by them); the drawing is the same.
|
|
4726
4299
|
*/
|
|
4727
|
-
declare function
|
|
4728
|
-
|
|
4300
|
+
declare function paintDiagram(diagram: Pick<ComposedDiagram, 'svg' | 'width' | 'height' | 'alt'>, palette: DiagramPalette, size: {
|
|
4301
|
+
width: number;
|
|
4302
|
+
height: number;
|
|
4303
|
+
}, options?: {
|
|
4304
|
+
classes?: boolean;
|
|
4729
4305
|
}): string;
|
|
4730
|
-
/**
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4306
|
+
/**
|
|
4307
|
+
* A composed diagram painted as an SVG group for a host's own SVG (a slide): the content of paintDiagram, translated to `box` and
|
|
4308
|
+
* scaled from diagram units to it. The group carries the font, size and fill the drawing inherits; it adds no title (the host labels
|
|
4309
|
+
* the picture).
|
|
4310
|
+
*/
|
|
4311
|
+
declare function paintDiagramGroup(diagram: Pick<ComposedDiagram, 'svg' | 'width' | 'height'>, palette: DiagramPalette, box: {
|
|
4312
|
+
x: number;
|
|
4313
|
+
y: number;
|
|
4314
|
+
width: number;
|
|
4315
|
+
height: number;
|
|
4316
|
+
}): string;
|
|
4317
|
+
|
|
4318
|
+
/** Why a DOT source cannot be drawn, with its 1-based position. */
|
|
4319
|
+
interface DotIssue {
|
|
4320
|
+
code: 'diagram-syntax' | 'diagram-unsupported' | 'diagram-limit';
|
|
4321
|
+
message: string;
|
|
4322
|
+
line?: number;
|
|
4323
|
+
column?: number;
|
|
4744
4324
|
}
|
|
4325
|
+
/** A DOT graph as pele flowchart source, with what the reader kept. */
|
|
4326
|
+
interface DotTranslation {
|
|
4327
|
+
/** Mermaid flowchart source pele lays out with its layered layout. */
|
|
4328
|
+
mermaid: string;
|
|
4329
|
+
directed: boolean;
|
|
4330
|
+
}
|
|
4331
|
+
/** The DOT layout engines: `dot` is the one OPF draws (pele's layered layout); the rest are refused. */
|
|
4332
|
+
declare const DOT_LAYOUT_ENGINES: readonly ["dot", "neato", "fdp", "sfdp", "circo", "twopi", "osage", "patchwork", "nop", "nop1", "nop2"];
|
|
4745
4333
|
/**
|
|
4746
|
-
*
|
|
4747
|
-
*
|
|
4748
|
-
* named: a column or bar of series s in row i takes the accent colour when `series[s] || categories[i]`; every other mark takes the muted
|
|
4749
|
-
* colour (`chartHighlightColors`). Category names match the row labels as text (a number label `2024` matches `"2024"`, an empty label
|
|
4750
|
-
* matches `""`), every row that carries the label. Returns undefined when there is no highlight or it names nothing the chart plots (a
|
|
4751
|
-
* name that matches no column or label is the `chart-highlight-unknown-name` validation error), so the engines then draw the chart as if
|
|
4752
|
-
* it had none.
|
|
4334
|
+
* DOT node shapes and the pele shape each is drawn as (pele's names; the PPTX export writes the DrawingML preset where pele's outline is
|
|
4335
|
+
* exactly one). DOT's default, the ellipse, is drawn as a stadium: a rounded box that holds its label as an ellipse does.
|
|
4753
4336
|
*/
|
|
4754
|
-
declare
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4337
|
+
declare const DOT_SHAPES: Readonly<Record<string, string>>;
|
|
4338
|
+
/**
|
|
4339
|
+
* A DOT source as the pele flowchart that draws it, or the issue that stops it (with its line and column in the DOT source). Results are
|
|
4340
|
+
* cached by source.
|
|
4341
|
+
*/
|
|
4342
|
+
declare function dotToMermaid(source: string, options: {
|
|
4343
|
+
maxEdges: number;
|
|
4344
|
+
}): {
|
|
4345
|
+
ok: true;
|
|
4346
|
+
translation: DotTranslation;
|
|
4347
|
+
} | {
|
|
4348
|
+
ok: false;
|
|
4349
|
+
issue: DotIssue;
|
|
4350
|
+
};
|
|
4759
4351
|
|
|
4760
4352
|
/** A whole number groups its thousands from this magnitude (four integer digits). */
|
|
4761
4353
|
declare const NUMBER_GROUPING_MIN = 1000;
|
|
4762
4354
|
/**
|
|
4763
|
-
* `value` in the General form (at most twelve significant digits) with its thousands grouped by the language's locale (
|
|
4764
|
-
* when the tag is missing or unknown; a locale that groups only from five digits, Spanish, leaves four digits as they are)
|
|
4765
|
-
*
|
|
4355
|
+
* `value` in the General form (at most twelve significant digits) with its thousands grouped by the language's locale (English
|
|
4356
|
+
* when the tag is missing or unknown; a locale that groups only from five digits, Spanish, leaves four digits as they are), in the
|
|
4357
|
+
* language's own digits (LH-106: `formatNumber`, from OPF's locale table, never the runtime's `Intl`). A number that is not finite
|
|
4358
|
+
* is its plain text.
|
|
4766
4359
|
*/
|
|
4767
4360
|
declare function groupNumber(value: number, language?: string): string;
|
|
4768
4361
|
/**
|
|
@@ -4795,6 +4388,130 @@ declare function groupsDataRange(values: readonly (number | null | undefined)[],
|
|
|
4795
4388
|
minRange?: number;
|
|
4796
4389
|
}): boolean;
|
|
4797
4390
|
|
|
4391
|
+
/** How one locale writes numbers. */
|
|
4392
|
+
interface NumberLocale {
|
|
4393
|
+
/** The numbering system (`latn`, `arab`, `arabext`, `deva`, `beng`, ...). */
|
|
4394
|
+
system: string;
|
|
4395
|
+
/** The ISO 15924 script of its digits (`Latn`, `Arab`, `Deva`, ...): the script whose font draws them. */
|
|
4396
|
+
script: string;
|
|
4397
|
+
/** The ten digits, zero first. */
|
|
4398
|
+
digits: string;
|
|
4399
|
+
decimal: string;
|
|
4400
|
+
group: string;
|
|
4401
|
+
/** The size of the group next to the decimal separator (3: 1,234) and of every group before it (2 in the Indian 12,34,567). */
|
|
4402
|
+
primaryGroup: number;
|
|
4403
|
+
secondaryGroup: number;
|
|
4404
|
+
/** Whole numbers group from this many digits: 4, or 5 in a locale that leaves four digits alone (Spanish 1000, 10.000). */
|
|
4405
|
+
groupsFrom: number;
|
|
4406
|
+
/** The percent sign, which follows the number as PowerPoint's `0%` prints it: `٪` with Persian digits, else `%` (Arabic-Indic too). */
|
|
4407
|
+
percent: string;
|
|
4408
|
+
}
|
|
4409
|
+
/** The numbering system a `-u-nu-` extension names, when the tag has one (`ar-SA-u-nu-latn` names `latn`), whether OPF draws it or not. */
|
|
4410
|
+
declare function numberingSystemExtension(tag: string): string | undefined;
|
|
4411
|
+
/** True when OPF draws the numbering system's digits (it is in the table: digits that are ten consecutive characters of one script). */
|
|
4412
|
+
declare function isSupportedNumberingSystem(system: string): boolean;
|
|
4413
|
+
/** The numbering systems OPF draws, sorted. */
|
|
4414
|
+
declare function supportedNumberingSystems(): string[];
|
|
4415
|
+
/**
|
|
4416
|
+
* LH-106 (vetoable): the numbering systems OPF draws other than Latin, each with the numeral shape PowerPoint draws a native chart's
|
|
4417
|
+
* number format in (the `[$-<code>]` prefix of an Excel format code): a system draws only where PowerPoint draws the same digits, so
|
|
4418
|
+
* the preview and the export agree. Arabic-Indic and Persian were verified in PowerPoint 16.0.20527 (2026-11-12); Devanagari and
|
|
4419
|
+
* Bengali follow Excel's documented numbering and await that check. Any other system (Thai, Myanmar, ...) is drawn in Latin digits.
|
|
4420
|
+
*/
|
|
4421
|
+
declare const NUMERAL_SHAPES: Readonly<Record<string, string>>;
|
|
4422
|
+
/**
|
|
4423
|
+
* The prefix a native chart's number format takes so PowerPoint draws its digits in the language's numbering system (`[$-2000000]`
|
|
4424
|
+
* in `ar-SA`), or '' with Latin digits.
|
|
4425
|
+
*/
|
|
4426
|
+
declare function numeralShapePrefix(language?: string): string;
|
|
4427
|
+
/**
|
|
4428
|
+
* `tag` without its extensions and private-use subtags (`ar-SA-u-nu-latn` is `ar-SA`): the plain language tag PowerPoint's `lang`
|
|
4429
|
+
* attribute and other consumers that know no extensions take. A tag without extensions is returned as written.
|
|
4430
|
+
*/
|
|
4431
|
+
declare function plainLanguageTag(tag: string): string;
|
|
4432
|
+
/**
|
|
4433
|
+
* How the language writes numbers. A missing or unknown tag writes them as English does (Latin digits, `.` and `,`); a
|
|
4434
|
+
* `-u-nu-` numbering system OPF draws replaces the locale's own, with Arabic separators for Arabic and Persian digits and the
|
|
4435
|
+
* locale's Latin ones otherwise.
|
|
4436
|
+
*/
|
|
4437
|
+
declare function numberLocale(language?: string): NumberLocale;
|
|
4438
|
+
/**
|
|
4439
|
+
* The language tag in effect on a slide: the slide's own `language` (LH-106), else the presentation's, else undefined. A tag
|
|
4440
|
+
* string or a Language object's `bcp47`, as written: numbers read only its language, script, region and `-u-nu-`.
|
|
4441
|
+
*/
|
|
4442
|
+
declare function languageInEffect(presentation: unknown, slideIndex?: number): string | undefined;
|
|
4443
|
+
/** The numbering system of the language in effect (`latn` for a missing or unknown tag). */
|
|
4444
|
+
declare function numberingSystemOf(language?: string): string;
|
|
4445
|
+
/** `text` with its ASCII digits drawn in the locale's digits. Nothing else changes. */
|
|
4446
|
+
declare function localizeDigits(text: string, language?: string | NumberLocale): string;
|
|
4447
|
+
/**
|
|
4448
|
+
* The text of a number in parts the caller already decided (ASCII digits, sign separate): the locale's digits, its decimal
|
|
4449
|
+
* separator and, with `group`, its group separators. The one place a generated number's digits and separators are chosen.
|
|
4450
|
+
*/
|
|
4451
|
+
declare function localizeNumberParts(parts: {
|
|
4452
|
+
negative?: boolean;
|
|
4453
|
+
integer: string;
|
|
4454
|
+
fraction?: string;
|
|
4455
|
+
group?: boolean;
|
|
4456
|
+
}, language?: string | NumberLocale): string;
|
|
4457
|
+
/**
|
|
4458
|
+
* A number in the General form (at most twelve significant digits, an exponent only where the value needs one), in the
|
|
4459
|
+
* language's digits and decimal separator, and with `group` its group separators (where four digits or more are a whole
|
|
4460
|
+
* number's: the callers decide when a number groups). A value that is not finite is its plain text.
|
|
4461
|
+
*/
|
|
4462
|
+
declare function formatNumber(value: number, language?: string | NumberLocale, options?: {
|
|
4463
|
+
group?: boolean;
|
|
4464
|
+
}): string;
|
|
4465
|
+
/**
|
|
4466
|
+
* A number JavaScript printed (`String(value)`: `-1234.5`, `1e+21`) in the language's digits and decimal separator, and with `group`
|
|
4467
|
+
* its group separators. An exponent form keeps its `e` and sign.
|
|
4468
|
+
*/
|
|
4469
|
+
declare function localizeNumberText(plain: string, language?: string | NumberLocale, options?: {
|
|
4470
|
+
group?: boolean;
|
|
4471
|
+
}): string;
|
|
4472
|
+
/** A percentage (`share` 0.5 is 50%) in the General form, in the language's digits, followed by its percent sign. */
|
|
4473
|
+
declare function formatPercentNumber(percent: number, language?: string | NumberLocale): string;
|
|
4474
|
+
/**
|
|
4475
|
+
* Latin text a number format pattern printed (`formatVariableNumber`: ASCII digits, `.` and `,` between them, `%` in its literal
|
|
4476
|
+
* parts) in the language's numbers: its digits, its decimal and group separators where the pattern has `.` and `,` (as Excel and
|
|
4477
|
+
* PowerPoint read a format code: `#,##0.00` is 1.000,00 in German; the pattern still decides whether a number groups, LH-141), and
|
|
4478
|
+
* its percent sign for `%`. The literal text is the author's and stays as written.
|
|
4479
|
+
*/
|
|
4480
|
+
declare function localizePatternNumber(parts: {
|
|
4481
|
+
negative: boolean;
|
|
4482
|
+
prefix: string;
|
|
4483
|
+
body: string;
|
|
4484
|
+
suffix: string;
|
|
4485
|
+
}, language?: string | NumberLocale): string;
|
|
4486
|
+
/** The scripts the digits of these languages are drawn in, other than Latin (the fonts a deck in them needs for its generated numbers). */
|
|
4487
|
+
declare function numeralScripts(languages: Iterable<string | undefined>): string[];
|
|
4488
|
+
/**
|
|
4489
|
+
* Reads a number drawn in any numbering system OPF draws back to ASCII digits (Arabic-Indic `١٢٣`, Persian `۱۲۳`, Devanagari
|
|
4490
|
+
* `१२३`, ...), with Arabic decimal and group separators as `.` and `,`. Other characters are kept.
|
|
4491
|
+
*/
|
|
4492
|
+
declare function asciiDigits(text: string): string;
|
|
4493
|
+
|
|
4494
|
+
/** The ICU and CLDR versions this table was read from. */
|
|
4495
|
+
declare const NUMBER_LOCALE_SOURCE: {
|
|
4496
|
+
readonly icu: "78.3";
|
|
4497
|
+
readonly cldr: "48.0";
|
|
4498
|
+
};
|
|
4499
|
+
/** The separators the table writes for a numbering system instead of CLDR's, as PowerPoint draws its numeral shape (see the generator). */
|
|
4500
|
+
declare const NUMBER_SEPARATOR_OVERRIDES: Readonly<Record<string, {
|
|
4501
|
+
readonly decimal: string;
|
|
4502
|
+
readonly group: string;
|
|
4503
|
+
}>>;
|
|
4504
|
+
/** Each numbering system with ten consecutive digits: the code point of its digit zero (its digits follow it) and the ISO 15924 script of its digits. */
|
|
4505
|
+
declare const NUMBERING_SYSTEMS: Readonly<Record<string, readonly [zero: number, script: string]>>;
|
|
4506
|
+
/**
|
|
4507
|
+
* The number data of each locale that differs from the one it falls back to (`language-Script-REGION`, `language-REGION`,
|
|
4508
|
+
* `language-Script`, `language`, then the root `''`): `system|decimal|group|grouping|minimum` with the default numbering system,
|
|
4509
|
+
* its decimal and group separators, the primary and secondary group sizes (`33` thousands, `32` the Indian lakh and crore) and how
|
|
4510
|
+
* many digits more than the primary group a number needs to group (1: 1,000; 2: 1000 but 10.000), then, for a locale whose own
|
|
4511
|
+
* digits are not Latin, `|decimal|group` with Latin digits.
|
|
4512
|
+
*/
|
|
4513
|
+
declare const NUMBER_LOCALES: Readonly<Record<string, string>>;
|
|
4514
|
+
|
|
4798
4515
|
interface Box {
|
|
4799
4516
|
x: number;
|
|
4800
4517
|
y: number;
|
|
@@ -4866,69 +4583,6 @@ declare function chartCategoriesInTime(labels: readonly unknown[], options?: {
|
|
|
4866
4583
|
/** LH-105: the month (1 to 12) a word or label names in English or the deck language (January, Jan, Sept, يناير), or undefined. */
|
|
4867
4584
|
declare function monthOf(text: unknown, language?: string): number | undefined;
|
|
4868
4585
|
|
|
4869
|
-
/** Why a chart is drawn as another construct (or with its data regrouped). */
|
|
4870
|
-
type ChartFallback = 'map-as-columns' | 'pareto-as-columns' | 'box-per-series' | 'nested-rings' | 'scatter-by-position';
|
|
4871
|
-
/** How the engines draw a chart: the construct and the data they plot. */
|
|
4872
|
-
interface ChartDrawPlan {
|
|
4873
|
-
/** The catalog chart type the engines draw: the authored one, or its fallback (`column` for a map, `doughnut` for a pie of several series). */
|
|
4874
|
-
type: string;
|
|
4875
|
-
kind: ChartOptionKind;
|
|
4876
|
-
/** Set when the chart is drawn other than as authored. */
|
|
4877
|
-
fallback?: ChartFallback;
|
|
4878
|
-
/** The resolved data as drawn: the category column, the X column of a scatter (when `hasX`), then the plotted series. */
|
|
4879
|
-
columns: string[];
|
|
4880
|
-
hasX: boolean;
|
|
4881
|
-
formats: (string | undefined)[];
|
|
4882
|
-
rows: DataCellValue[][];
|
|
4883
|
-
/** The index in the resolved columns of each drawn column (a dropped scatter X column shifts the series by one). */
|
|
4884
|
-
sources: number[];
|
|
4885
|
-
/** The resolved columns the drawn construct does not plot: the series after the first of a one-series construct, a scatter X column with no number. */
|
|
4886
|
-
dropped: string[];
|
|
4887
|
-
}
|
|
4888
|
-
/**
|
|
4889
|
-
* True when a category label names a place a map chart can plot: a country or area by its CLDR name (in English or in `language`, the
|
|
4890
|
-
* deck's BCP 47 tag), an upper-case two-letter region code (`DE`), a US state, a Canadian province or territory, an Australian state, or a
|
|
4891
|
-
* common alias such as `USA` or `UK`. Cities and postal codes are not recognized.
|
|
4892
|
-
*/
|
|
4893
|
-
declare function isPlaceLabel(label: unknown, language?: string): boolean;
|
|
4894
|
-
/**
|
|
4895
|
-
* How the engines draw a resolved chart (`resolved` is its `resolveChartData` result; `options.language` the deck language, for place
|
|
4896
|
-
* names). The rules, each over the data alone:
|
|
4897
|
-
*
|
|
4898
|
-
* - **Map over categories that are not places** (`map-as-columns`): a `world` chart whose category labels are fewer than half places
|
|
4899
|
-
* ({@link isPlaceLabel}) is drawn as clustered columns, every series kept. A map needs places to plot; Q1 to Q4 would be empty tiles.
|
|
4900
|
-
* - **Several series on a Pareto chart** (`pareto-as-columns`, LH-175): a Pareto chart sorts one series and draws its cumulative share,
|
|
4901
|
-
* so two or more series that hold numbers (Current and Baseline by quarter) are drawn as clustered columns in data order, every series
|
|
4902
|
-
* kept, in the preview and in PowerPoint.
|
|
4903
|
-
* - **One value per box-and-whisker category** (`box-per-series`): when no category label repeats (two rows or more), each box would be a
|
|
4904
|
-
* single value. The rows are one group named after the category column, so each series is one box of its values across the categories.
|
|
4905
|
-
* - **Several series on a pie or doughnut** (`nested-rings`): two or more series that hold numbers are drawn as a doughnut of one ring per
|
|
4906
|
-
* series, the first series innermost (as PowerPoint orders the rings of a doughnut), every ring coloured by category.
|
|
4907
|
-
* - **Scatter whose X column holds no number** (`scatter-by-position`): the text column cannot be an X axis, so it is left out and every
|
|
4908
|
-
* series is plotted against the category position (1, 2, 3, ...), like a scatter of one value column.
|
|
4909
|
-
*
|
|
4910
|
-
* A construct that plots one series (treemap, histogram with categories, a Pareto chart of one numeric series, waterfall, funnel, map,
|
|
4911
|
-
* and pie) still draws only the first; the others are listed in `dropped`.
|
|
4912
|
-
*/
|
|
4913
|
-
declare function chartDrawPlan(chart: unknown, resolved: Extract<ResolvedChartData, {
|
|
4914
|
-
ok: true;
|
|
4915
|
-
}>, options?: {
|
|
4916
|
-
language?: string;
|
|
4917
|
-
}): ChartDrawPlan;
|
|
4918
|
-
/**
|
|
4919
|
-
* The `chart-series-dropped` warning of a chart whose drawn construct leaves a resolved column out ({@link chartDrawPlan}'s `dropped`), at
|
|
4920
|
-
* the chart's `type` (`path` is the chart's JSON Pointer). Empty when every column is drawn.
|
|
4921
|
-
*/
|
|
4922
|
-
declare function chartDrawDiagnostics(chart: unknown, resolved: ResolvedChartData, path?: string, options?: {
|
|
4923
|
-
language?: string;
|
|
4924
|
-
}): DataDiagnostic[];
|
|
4925
|
-
/**
|
|
4926
|
-
* LH-56: the colour of a label drawn inside a mark (a treemap tile, a funnel bar, a map tile) of colour `fill`: the deck's full text colour
|
|
4927
|
-
* `text` when it reaches 4.5:1 on the fill, else the slide background `background` (the other role colour, so the PPTX export still writes a
|
|
4928
|
-
* theme colour) when that does, else black or white ({@link textColorForFill}). The preview and the PPTX export both call it.
|
|
4929
|
-
*/
|
|
4930
|
-
declare function markLabelColor(fill: string, text: string, background?: string): string;
|
|
4931
|
-
|
|
4932
4586
|
/** Body content kinds accepted by template regions. */
|
|
4933
4587
|
declare const LAYOUT_BODY_KINDS: readonly ["text", "list", "image", "video", "chart", "table", "code", "metric", "quote", "timeline", "diagram", "shape"];
|
|
4934
4588
|
type LayoutBodyKind = typeof LAYOUT_BODY_KINDS[number];
|
|
@@ -5248,8 +4902,14 @@ interface LayoutDiagnostic {
|
|
|
5248
4902
|
* LH-14: `icon-dropped` for an icon the slide has no room for without setting text smaller: the text stays, the chip is not drawn.
|
|
5249
4903
|
* SH-09: `arrangement-adapted` for a pyramid or matrix drawn another way: a matrix of other than four entries as cards, or a list the
|
|
5250
4904
|
* arrangement's designs cannot hold at the list's size (or of a shape it does not draw) as a list.
|
|
5251
|
-
|
|
5252
|
-
|
|
4905
|
+
* RR-105: two marks drawn without room that no size or arrangement changes, which are geometry, not overflow (a strict `overflow: "error"`
|
|
4906
|
+
* composition reports them and does not refuse the slide): `chart-label-collision` for an explicit reference label that meets another label
|
|
4907
|
+
* or a data line on both of its sides (drawn at its preferred place, its text and value kept), and `timeline-period-short` for a timeline
|
|
4908
|
+
* period shorter than its marker (LH-16's proportions are the author's).
|
|
4909
|
+
* `shape-off-slide` for an overlay shape or an image callout that lies wholly outside the slide, so nothing of it is drawn (advice, not an
|
|
4910
|
+
* overflow: a strict composition still composes it; a hidden shape is exempt, and a rotated one is judged by the circle through its corners).
|
|
4911
|
+
*/
|
|
4912
|
+
code: "shape-anchor-missing" | "text-overflow" | "small-cell" | "unresolved-content" | "unsupported-image-treatment" | "numbering-adapted" | "region-unknown" | "region-kind" | "region-full" | "layout-unplaced" | "emphasis-ignored" | "icon-dropped" | "arrangement-adapted" | "chart-label-collision" | "timeline-period-short" | "shape-off-slide";
|
|
5253
4913
|
path: string;
|
|
5254
4914
|
message: string;
|
|
5255
4915
|
/**
|
|
@@ -5271,7 +4931,9 @@ interface TextStyle {
|
|
|
5271
4931
|
italic?: boolean;
|
|
5272
4932
|
path?: string;
|
|
5273
4933
|
fontFace?: FontFaceSelection;
|
|
5274
|
-
/**
|
|
4934
|
+
/** Declared weight-named family before host substitution, retained for explicit bold overrides on rich runs. */
|
|
4935
|
+
sourceFontFamily?: string;
|
|
4936
|
+
/** BCP-47 tag of a run that overrides the deck language (`TextRun.language`); absent when the deck language applies. */
|
|
5275
4937
|
lang?: string;
|
|
5276
4938
|
/**
|
|
5277
4939
|
* LH-32: drawn in capitals (an eyebrow). The text stays as authored: it is measured and drawn upper-cased (`toUpperCase`), and
|
|
@@ -5400,6 +5062,7 @@ declare function placeTextLines(lines: readonly TextLineInk[], box: LayoutBox, a
|
|
|
5400
5062
|
/** RR-92: what composition computes for a chart item beyond its box. */
|
|
5401
5063
|
interface ComposedChart {
|
|
5402
5064
|
valueAxis?: ChartValueAxis;
|
|
5065
|
+
secondaryValueAxis?: ChartValueAxis;
|
|
5403
5066
|
/** LH-03, LH-81, LH-92, LH-93: the small-chart treatment, the header row, the ring names and a shared plot box (chart-layer.ts, chart-plot.ts). */
|
|
5404
5067
|
layer?: ChartLayer;
|
|
5405
5068
|
}
|
|
@@ -5589,6 +5252,7 @@ interface ComposedSteps {
|
|
|
5589
5252
|
*/
|
|
5590
5253
|
interface ComposedArrangement {
|
|
5591
5254
|
kind: Arrangement;
|
|
5255
|
+
pyramidDirection?: 'up' | 'down';
|
|
5592
5256
|
/**
|
|
5593
5257
|
* `smartart`: PowerPoint's Basic Pyramid or Basic Matrix geometry (the PPTX export may write it as live SmartArt); `opf`: OPF's own design
|
|
5594
5258
|
* of the arrangement (a stepped pyramid with the entries beside it, or four quadrants filling the region); `cards`: a matrix of other
|
|
@@ -5621,6 +5285,7 @@ interface ComposedArrangement {
|
|
|
5621
5285
|
/** SH-17: the text insets (left, top, right, bottom) where they differ by side (a chevron's start); absent: `textMargin` on every side. */
|
|
5622
5286
|
margins?: [number, number, number, number];
|
|
5623
5287
|
lineWidth: number;
|
|
5288
|
+
connectors?: NativeTreeConnector[];
|
|
5624
5289
|
smartArt: {
|
|
5625
5290
|
lines: number[];
|
|
5626
5291
|
stable: boolean[];
|
|
@@ -5740,6 +5405,9 @@ declare const TEXT_TILE_MAX = 8;
|
|
|
5740
5405
|
declare const TEXT_TILE_CHARACTERS = 90;
|
|
5741
5406
|
declare const TEXT_TILE_LINES = 2;
|
|
5742
5407
|
declare const TEXT_TILE_MARKER = 0.45;
|
|
5408
|
+
/** LH-69: a placed short text's tile sets it on at most PLACED_TILE_LINES lines, covering at most PLACED_TILE_SHARE of the card's inner height. */
|
|
5409
|
+
declare const PLACED_TILE_LINES = 3;
|
|
5410
|
+
declare const PLACED_TILE_SHARE = 0.6;
|
|
5743
5411
|
/**
|
|
5744
5412
|
* LH-165, LH-162: the column counts of the balanced grids of `count` equal cards: two to four cards a row, at most four rows, every row
|
|
5745
5413
|
* full but the last, which is at most one card short and never a lone card under full rows.
|
|
@@ -5883,7 +5551,19 @@ interface ComposedPlacement {
|
|
|
5883
5551
|
* only, then the `border` on the shape outline, then the `overlay`. This is the paint order and the treatment code
|
|
5884
5552
|
* 0.14's slide image used.
|
|
5885
5553
|
*/
|
|
5554
|
+
interface ComposedImageCallout {
|
|
5555
|
+
path: string;
|
|
5556
|
+
text: string;
|
|
5557
|
+
box: LayoutBox;
|
|
5558
|
+
textBox: LayoutBox;
|
|
5559
|
+
textStyle: TextStyle;
|
|
5560
|
+
fit: TextFit | RichTextFit;
|
|
5561
|
+
}
|
|
5886
5562
|
interface ComposedImage {
|
|
5563
|
+
/** LH-34: text over the visible frame; physical coordinates, independent of pixel masks and RTL. */
|
|
5564
|
+
callouts?: ComposedImageCallout[];
|
|
5565
|
+
/** Visible contained picture bounds when known, else its composed frame. */
|
|
5566
|
+
calloutFrame?: LayoutBox;
|
|
5887
5567
|
/** Allocated region, equal to the item's box: the flow cell (after any card padding and caption band) or the placement band. */
|
|
5888
5568
|
region: LayoutBox;
|
|
5889
5569
|
/** Picture frame inside the region: the band inside the slide padding for an inset placement, then the largest centered box with `aspectRatio` (a circle uses 1). */
|
|
@@ -6220,14 +5900,14 @@ interface ComposeSlideOptions {
|
|
|
6220
5900
|
fontFamilies?: Partial<FontFamilies>;
|
|
6221
5901
|
/**
|
|
6222
5902
|
* Deck base direction (RR-05). Defaults to the direction of the presentation language's script. In a right-to-left deck
|
|
6223
|
-
* composition mirrors the arrangement (the first column or `
|
|
5903
|
+
* composition mirrors the arrangement (the first column or `start` region is drawn at the right, slide images, logos and
|
|
6224
5904
|
* header/footer zones swap sides, tables run right to left), lists put their markers at the right, and every text fit
|
|
6225
|
-
* reports each paragraph's direction. Alignment stays logical: `
|
|
5905
|
+
* reports each paragraph's direction. Alignment stays logical: `start` is the edge the text starts at.
|
|
6226
5906
|
*/
|
|
6227
5907
|
direction?: TextDirection;
|
|
6228
5908
|
/** Deck-level alignment a host resolved itself. It ranks with `presentation.design`, above the layout record's design and below the slide's own design; hosts normally omit it because composition reads `presentation.design` and the layout. */
|
|
6229
|
-
contentAlignment?:
|
|
6230
|
-
titleAlignment?:
|
|
5909
|
+
contentAlignment?: DesignAlignment;
|
|
5910
|
+
titleAlignment?: DesignAlignment;
|
|
6231
5911
|
/** Unscaled reference pixels around provided vector outlines; defaults to 1 for body text and 2 for furniture. Explicit values apply to both. */
|
|
6232
5912
|
textRasterPadding?: number;
|
|
6233
5913
|
/** Deck-level body cards a host resolved itself, ranked like contentAlignment. A slide's explicit design.contentBox overrides this value. */
|
|
@@ -6329,9 +6009,15 @@ declare function imageBackground(value: unknown): {
|
|
|
6329
6009
|
overlay?: unknown;
|
|
6330
6010
|
textPlacement?: PictureTextPlacement;
|
|
6331
6011
|
} | undefined;
|
|
6012
|
+
/**
|
|
6013
|
+
* RR-105: the overlay of an image block as the engines draw it. Core places it on the drawn picture when it read the picture's aspect ratio
|
|
6014
|
+
* (ComposedImage.picture); a host that reads it itself (a picture core could not, from a file or a host imageResolver) passes `aspect`, and
|
|
6015
|
+
* the overlay moves onto the picture the host draws with `fitImage(image.box, image.fit, aspect, image.focus)`.
|
|
6016
|
+
*/
|
|
6017
|
+
declare function pictureOverlay(image: ComposedImage, aspect?: number): ComposedOverlay | undefined;
|
|
6332
6018
|
interface FurniturePartBase {
|
|
6333
6019
|
kind: 'header' | 'footer';
|
|
6334
|
-
zone: '
|
|
6020
|
+
zone: 'start' | 'center' | 'end';
|
|
6335
6021
|
field: 'text' | 'image' | 'socials' | 'date';
|
|
6336
6022
|
/** Literal field or controlling flag, with the actual inherited/local path. */
|
|
6337
6023
|
path: string;
|
|
@@ -6466,7 +6152,8 @@ declare function measureText(text: string, fontSize: number): number;
|
|
|
6466
6152
|
/** The default estimate for a monospace face: 0.6 em per ASCII character, the proportional estimate for the rest. */
|
|
6467
6153
|
declare function measureMonospaceText(text: string, fontSize: number): number;
|
|
6468
6154
|
declare function wrapText(text: string, width: number, fontSize: number, measure?: MeasureTextWidth): string[];
|
|
6469
|
-
|
|
6155
|
+
/** `displayFrom` (LH-189): the canvas size from which a line takes DISPLAY_LINE_PITCH (linePitch); by default every line takes BODY_LINE_PITCH. */
|
|
6156
|
+
declare function fitText(text: string, box: LayoutBox, requestedSize?: number, minFontSize?: number, measure?: MeasureTextWidth, direction?: TextDirection, balance?: boolean, displayFrom?: number): SourceTextFit;
|
|
6470
6157
|
/**
|
|
6471
6158
|
* PowerPoint stores a run size (`sz`) in hundredths of a point, and composition pixels are CSS pixels (96 per
|
|
6472
6159
|
* inch, so a point is 4/3 px). Every composed font size is therefore a whole multiple of 0.01 pt, which is
|
|
@@ -6623,6 +6310,83 @@ declare const LONE_DISPLAY_SIZES: {
|
|
|
6623
6310
|
declare const LONE_FILL = 0.5;
|
|
6624
6311
|
declare const LONE_TARGET = 0.6;
|
|
6625
6312
|
declare const LONE_METRIC_TARGET = 0.8;
|
|
6313
|
+
/**
|
|
6314
|
+
* LH-188: the ceilings, in reference pixels, of a one-message slide's message (oneMessageField) by its length in characters
|
|
6315
|
+
* (messageCharacters), as [up to so many characters, ceiling] from the shortest: a statement up to 16%, 11% and 7.5% of the 720 px short
|
|
6316
|
+
* edge, a quote's body up to 12%, 10% and 7.8%. They raise the growth's cap (MESSAGE_DISPLAY_SIZE, HEADING_DISPLAY_SIZES.title,
|
|
6317
|
+
* LONE_DISPLAY_SIZES.quote) and never lower it, so a message whose ceiling is under today's cap, or longer than the last row, keeps today's.
|
|
6318
|
+
* The message still grows only while it fits its box with no word broken, in balanced lines, within LONE_TARGET of the body.
|
|
6319
|
+
*/
|
|
6320
|
+
declare const MESSAGE_CEILINGS: {
|
|
6321
|
+
readonly statement: readonly [readonly [30, 115], readonly [60, 80], readonly [120, 54]];
|
|
6322
|
+
readonly quote: readonly [readonly [30, 86], readonly [60, 72], readonly [120, 56]];
|
|
6323
|
+
};
|
|
6324
|
+
/** LH-188: a lone metric whose value is a figure of at most `characters` characters grows to `size` (35% of the short edge) instead of LONE_DISPLAY_SIZES.value. */
|
|
6325
|
+
declare const FIGURE_CEILING: {
|
|
6326
|
+
readonly characters: 6;
|
|
6327
|
+
readonly size: 252;
|
|
6328
|
+
};
|
|
6329
|
+
/**
|
|
6330
|
+
* LH-188: the length of a message in characters, as its lines are measured: grapheme clusters (an accented letter, an emoji, an Arabic
|
|
6331
|
+
* letter with its marks, a Devanagari syllable are one), a run of white space as one, and a full-width character (WIDE_CHARACTER) as two,
|
|
6332
|
+
* since it is as wide as two average Latin characters (AVERAGE_CHARACTER_EM). Right-to-left text counts as any other.
|
|
6333
|
+
*/
|
|
6334
|
+
declare function messageCharacters(value: unknown): number;
|
|
6335
|
+
/** LH-188: the ceiling (reference pixels) of a one-message slide's statement or quote body of `value`, or undefined past the last row. */
|
|
6336
|
+
declare function messageCeiling(kind: keyof typeof MESSAGE_CEILINGS, value: unknown): number | undefined;
|
|
6337
|
+
/**
|
|
6338
|
+
* LH-188: what makes a slide a one-message slide, and which payload is its message: the body holds exactly one payload (a slide's own or one
|
|
6339
|
+
* block's), a text, a quote or a metric, with no subtitle, and the title is absent or only labels it (at most SHORT_TEXT_WORDS words, not
|
|
6340
|
+
* ending as a sentence: "Our goal", never "Why we moved the ledger."), as statementMessage reads a statement's title. A title over a
|
|
6341
|
+
* paragraph is a content slide, not a statement. Any layout qualifies (automatic, statement, quote, text, ...): the message is the slide's
|
|
6342
|
+
* lone block wherever the layout places it.
|
|
6343
|
+
*/
|
|
6344
|
+
declare function oneMessageField(slide: Record<string, any>): 'text' | 'quote' | 'metric' | undefined;
|
|
6345
|
+
/**
|
|
6346
|
+
* LH-189: display text. A display role (a title or subtitle, a text drawn as the slide's message, a quote's body, a metric's value) set at
|
|
6347
|
+
* DISPLAY_SIZE_FACTOR times the body role size (PROSE_NOMINAL_SIZE) or more takes a line pitch of DISPLAY_LINE_PITCH em instead of the
|
|
6348
|
+
* body's BODY_LINE_PITCH, and DISPLAY_TRACKING em of tracking where its script has case or it is a figure (displayTracks). Measurement, the
|
|
6349
|
+
* preview and the export read the same fit (its lineHeight) and style (its tracking). Other text (a tile's label, a grid's short texts, a
|
|
6350
|
+
* list) keeps the body pitch at any size, so a size at the threshold never becomes cheaper to fit than the size under it.
|
|
6351
|
+
*/
|
|
6352
|
+
declare const BODY_LINE_PITCH = 1.22;
|
|
6353
|
+
declare const DISPLAY_LINE_PITCH = 1;
|
|
6354
|
+
declare const DISPLAY_SIZE_FACTOR = 2;
|
|
6355
|
+
declare const DISPLAY_TRACKING = -0.015;
|
|
6356
|
+
/**
|
|
6357
|
+
* LH-189: the depth a display fit keeps under its last line: a display line box is one em, so the descenders of its last line reach about
|
|
6358
|
+
* the body pitch's extra 0.22 em below it, and whatever follows the text (a subtitle, an attribution, a metric's label) starts that much
|
|
6359
|
+
* lower. Zero for a body fit.
|
|
6360
|
+
*/
|
|
6361
|
+
declare function displayDepth(fit: {
|
|
6362
|
+
fontSize: number;
|
|
6363
|
+
lineHeight: number;
|
|
6364
|
+
}): number;
|
|
6365
|
+
/** LH-188: a stub is a last line shorter than this share of the fit's longest line. */
|
|
6366
|
+
declare const STUB_LINE_SHARE: number;
|
|
6367
|
+
/**
|
|
6368
|
+
* LH-188: whether a fit of two or more lines ends in a stub, a last line under STUB_LINE_SHARE of its longest. Balancing (WI-4) evens out
|
|
6369
|
+
* the lines of spaced text, but not text without word spaces (CJK, Thai) or a word too long to move; LH-188's growth refuses a step that
|
|
6370
|
+
* adds a line ending in one.
|
|
6371
|
+
*/
|
|
6372
|
+
declare function stubLine(fit: TextFit | RichTextFit): boolean;
|
|
6373
|
+
/** LH-189: the canvas size (px) from which text is display text on a canvas whose short edge is `scale` times 720. */
|
|
6374
|
+
declare function displayFrom(scale: number): number;
|
|
6375
|
+
/** LH-189: the line pitch, in em, of text at `fontSize` canvas px when display text starts at `from` canvas px (displayFrom). */
|
|
6376
|
+
declare function linePitch(fontSize: number, from?: number): number;
|
|
6377
|
+
/**
|
|
6378
|
+
* LH-189: whether display text takes the display pitch and tightens its tracking: it has a letter or a digit, and every character is a
|
|
6379
|
+
* letter of a script with case the deck's faces draw (Latin, Greek, Cyrillic), a combining mark, an ASCII digit, punctuation, a space or a
|
|
6380
|
+
* plain symbol of figures (TRACKED_SYMBOLS). Tracking would break the joining of a cursive script or the even rhythm of full-width text,
|
|
6381
|
+
* those scripts' tall marks or full-em glyphs need the body pitch between lines, and the characters script faces draw (Armenian, Arabic-Indic
|
|
6382
|
+
* and Myanmar digits, emoji, mathematical letters) are pinned to measured advances, which carry no tracking.
|
|
6383
|
+
*/
|
|
6384
|
+
declare function displayTracks(text: string): boolean;
|
|
6385
|
+
/**
|
|
6386
|
+
* LH-189: whether a label or an attribution is set in capitals as authored ("ANNUAL REVENUE", "JANE DOE, CEO"): at least two letters, all
|
|
6387
|
+
* of a script with case and none lower case. It takes the eyebrow's tracking (EYEBROW_TRACKING, LH-32).
|
|
6388
|
+
*/
|
|
6389
|
+
declare function capitalsLabel(text: string): boolean;
|
|
6626
6390
|
/**
|
|
6627
6391
|
* LH-129: the largest size, in reference pixels, a heading of a slide whose headings are its message (a cover, a section, a closing)
|
|
6628
6392
|
* grows to: the title to about Claude Design's 78 px display title, the subtitle two steps of the type scale above its role size. The
|
|
@@ -6670,6 +6434,11 @@ interface QuoteBodyOptions extends QuoteLayoutOptions {
|
|
|
6670
6434
|
portrait?: 'side';
|
|
6671
6435
|
/** LH-132: the share of the quote's width the portrait beside it takes (); QUOTE_PORTRAIT_SHARE when absent. */
|
|
6672
6436
|
portraitShare?: number;
|
|
6437
|
+
/**
|
|
6438
|
+
* LH-188: the quote is a one-message slide's message (oneMessageField): its body grows (`growth`) up to the length-keyed ceiling of
|
|
6439
|
+
* MESSAGE_CEILINGS.quote where that is above LONE_DISPLAY_SIZES.quote.
|
|
6440
|
+
*/
|
|
6441
|
+
message?: boolean;
|
|
6673
6442
|
}
|
|
6674
6443
|
/** LH-114: a pull line's accent rule (width and height) and its gaps under the rule and under the body, in reference pixels. */
|
|
6675
6444
|
declare const QUOTE_PULL_RULE: {
|
|
@@ -6823,6 +6592,11 @@ interface MetricLayoutOptions extends QuoteLayoutOptions {
|
|
|
6823
6592
|
max: number;
|
|
6824
6593
|
height?: number;
|
|
6825
6594
|
};
|
|
6595
|
+
/**
|
|
6596
|
+
* LH-188: the metric is a one-message slide's message (oneMessageField): a value of at most FIGURE_CEILING.characters characters
|
|
6597
|
+
* (messageCharacters) grows (`growth`) up to FIGURE_CEILING.size instead of LONE_DISPLAY_SIZES.value.
|
|
6598
|
+
*/
|
|
6599
|
+
message?: boolean;
|
|
6826
6600
|
/** LH-15: lay the metric out as a band (the value at the start, the other fields in a column beside it) when that fits; start-aligned. */
|
|
6827
6601
|
band?: boolean;
|
|
6828
6602
|
/**
|
|
@@ -6937,6 +6711,15 @@ declare const PORTRAIT_MIN: {
|
|
|
6937
6711
|
readonly text: 150;
|
|
6938
6712
|
};
|
|
6939
6713
|
declare const PORTRAIT_GAP = 16;
|
|
6714
|
+
/**
|
|
6715
|
+
* RR-105: a team's authored avatar, the small circle over the name: lineRatio times the name's line height, at least `least` reference
|
|
6716
|
+
* pixels and at most widthShare of the card's width.
|
|
6717
|
+
*/
|
|
6718
|
+
declare const TEAM_AVATAR: {
|
|
6719
|
+
readonly least: 56;
|
|
6720
|
+
readonly lineRatio: 2;
|
|
6721
|
+
readonly widthShare: 0.5;
|
|
6722
|
+
};
|
|
6940
6723
|
/** LH-132: a team's texts keep at least this size (reference px; Claude Design sets a name at 20) before a top portrait gives up its square. */
|
|
6941
6724
|
declare const PORTRAIT_TEXT_SIZE = 21;
|
|
6942
6725
|
/**
|
|
@@ -6965,16 +6748,16 @@ declare const QUOTE_PORTRAIT_MIN_WIDTH = 640;
|
|
|
6965
6748
|
declare function layoutMetric(value: string | number | MetricContent, box: LayoutBox, options?: MetricLayoutOptions): MetricLayout;
|
|
6966
6749
|
/** Progress of a timeline event (FA-11). Engines draw it from the deck's colors; see `timelineMarkerShapes`. */
|
|
6967
6750
|
type TimelineStatus = 'done' | 'current' | 'planned';
|
|
6968
|
-
/**
|
|
6969
|
-
* LH-121: the word drawn under an event's label for its status (`statusWords`). English only: a deck in another language keeps the
|
|
6970
|
-
* status in its markers and connector, until the catalog carries localized words.
|
|
6971
|
-
*/
|
|
6751
|
+
/** English status vocabulary, kept for callers that explicitly draw English labels. */
|
|
6972
6752
|
declare const TIMELINE_STATUS_WORDS: Readonly<Record<TimelineStatus, string>>;
|
|
6753
|
+
/** Localized generated labels, with regional variants sharing their language's vocabulary. Unknown translations keep status markers and progress. */
|
|
6754
|
+
declare function timelineStatusWordsFor(language?: string): Readonly<Record<TimelineStatus, string>> | undefined;
|
|
6973
6755
|
interface TimelineEvent {
|
|
6974
6756
|
when?: string;
|
|
6975
6757
|
what: string;
|
|
6976
6758
|
description?: string;
|
|
6977
6759
|
status?: TimelineStatus;
|
|
6760
|
+
duration?: number;
|
|
6978
6761
|
}
|
|
6979
6762
|
interface TimelineContent {
|
|
6980
6763
|
name?: string;
|
|
@@ -7030,12 +6813,28 @@ interface TimelineLayout {
|
|
|
7030
6813
|
x: number;
|
|
7031
6814
|
y: number;
|
|
7032
6815
|
radius: number;
|
|
6816
|
+
duration?: number;
|
|
7033
6817
|
status?: TimelineStatus;
|
|
7034
6818
|
ring?: {
|
|
7035
6819
|
radius: number;
|
|
7036
6820
|
};
|
|
7037
6821
|
strokeWidth?: number;
|
|
7038
6822
|
}[];
|
|
6823
|
+
/** LH-16: consecutive duration ranges, in reading order; their lengths preserve authored ratios in every arrangement. */
|
|
6824
|
+
ranges?: {
|
|
6825
|
+
path: string;
|
|
6826
|
+
eventIndex: number;
|
|
6827
|
+
box: LayoutBox;
|
|
6828
|
+
}[];
|
|
6829
|
+
/** Each proportional range links to its readable label/marker track; labels never inherit a short period's narrow cell. */
|
|
6830
|
+
rangeLinks?: {
|
|
6831
|
+
path: string;
|
|
6832
|
+
eventIndex: number;
|
|
6833
|
+
x1: number;
|
|
6834
|
+
y1: number;
|
|
6835
|
+
x2: number;
|
|
6836
|
+
y2: number;
|
|
6837
|
+
}[];
|
|
7039
6838
|
connector: {
|
|
7040
6839
|
x1: number;
|
|
7041
6840
|
y1: number;
|
|
@@ -7076,8 +6875,10 @@ interface TimelineLayoutOptions extends QuoteLayoutOptions {
|
|
|
7076
6875
|
* No part goes below `minFontSize`.
|
|
7077
6876
|
*/
|
|
7078
6877
|
sizeOffset?: number;
|
|
7079
|
-
/** LH-121: draw a status word under the label of each event with a status (
|
|
6878
|
+
/** LH-121: draw a status word under the label of each event with a status (where a localized vocabulary exists; see timelineStatusWordsFor). */
|
|
7080
6879
|
statusWords?: boolean;
|
|
6880
|
+
/** LH-16: measure the intrinsic height of proportional ranges rather than filling their allocated vertical rail. */
|
|
6881
|
+
intrinsic?: boolean;
|
|
7081
6882
|
}
|
|
7082
6883
|
/** Preserve event order and field boundaries while trying at most 100 readable arrangements. */
|
|
7083
6884
|
declare function layoutTimeline(value: readonly TimelineEvent[] | TimelineContent, box: LayoutBox, options?: TimelineLayoutOptions): TimelineLayout;
|
|
@@ -7175,7 +6976,7 @@ interface RichTextRun {
|
|
|
7175
6976
|
/** Inline code: the run takes the design's code font (`RichTextOptions.codeFontFamily`) unless it names its own `fontFamily`. */
|
|
7176
6977
|
code?: boolean;
|
|
7177
6978
|
/** BCP-47 tag that overrides the deck language for this run; it reaches the fragment style as `style.lang`. */
|
|
7178
|
-
|
|
6979
|
+
language?: string;
|
|
7179
6980
|
/** RR-34: reference ids this run cites (a marker follows the run; the deck's `references` list resolves them). */
|
|
7180
6981
|
cite?: string | string[];
|
|
7181
6982
|
/** RR-34: an inline footnote for this run (a marker follows the run; the note is listed in the slide's footnote area). */
|
|
@@ -7232,6 +7033,14 @@ interface RichTextOptions {
|
|
|
7232
7033
|
* stranded word. Explicit line breaks stay; a size is never reduced to balance, and a heading that would need another line stays greedy.
|
|
7233
7034
|
*/
|
|
7234
7035
|
balance?: boolean;
|
|
7036
|
+
/**
|
|
7037
|
+
* LH-189: the canvas size from which a fit is display text: where the text tracks (displayTracks) its runs take DISPLAY_TRACKING, in
|
|
7038
|
+
* their measurement and in the fragment styles the engines draw, and with `displayPitch` its lines take DISPLAY_LINE_PITCH (linePitch).
|
|
7039
|
+
* Absent, none is.
|
|
7040
|
+
*/
|
|
7041
|
+
displayFrom?: number;
|
|
7042
|
+
/** LH-189: with `displayFrom`, display lines take DISPLAY_LINE_PITCH; without it they keep BODY_LINE_PITCH and only track. */
|
|
7043
|
+
displayPitch?: boolean;
|
|
7235
7044
|
}
|
|
7236
7045
|
/** Fit mixed styles without flattening font metrics. Run fontSize is in points. */
|
|
7237
7046
|
declare function fitRichText(input: readonly (string | RichTextRun)[], box: LayoutBox, requestedSize?: number, minFontSize?: number, options?: RichTextOptions): RichTextFit;
|
|
@@ -7381,6 +7190,8 @@ interface ListFitOptions extends RichTextOptions {
|
|
|
7381
7190
|
* 1.1 em and the widest marker plus 0.3 em, so wide markers never touch their text; unnumbered lists are unchanged.
|
|
7382
7191
|
*/
|
|
7383
7192
|
numbering?: NumberingInput;
|
|
7193
|
+
/** LH-106: the language whose numbering system the numbers and badges are drawn in (composeSlide: the slide's, else the deck's). */
|
|
7194
|
+
language?: string;
|
|
7384
7195
|
/** Picture bullet for every entry (effective `design.listBullet: "image"` with a resolved icon logo). */
|
|
7385
7196
|
bulletImage?: ListBulletImage;
|
|
7386
7197
|
/**
|
|
@@ -7433,7 +7244,8 @@ interface ListFitOptions extends RichTextOptions {
|
|
|
7433
7244
|
/**
|
|
7434
7245
|
* LH-14: the entries that carry an `icon` draw it on a chip ICON_CHIP times the list size across in the marker column, in place of the
|
|
7435
7246
|
* bullet (`ListEntryLayout.icon`), centered on the entry's first line; every entry keeps that column, so the texts start at one edge.
|
|
7436
|
-
* Needs
|
|
7247
|
+
* Needs no numbering; ignored otherwise. Only first-level entries draw a chip (RR-105): a nested entry keeps its bullet under its
|
|
7248
|
+
* entry's text. A ruled list (`rows`) sets the chips at the start of its labels.
|
|
7437
7249
|
*/
|
|
7438
7250
|
icons?: boolean;
|
|
7439
7251
|
/** LH-14: the chip's size in em of the list size: ICON_CHIP (the default) or ICON_CHIP_COMPACT. */
|
|
@@ -7503,6 +7315,8 @@ declare function pairEntry(entry: unknown): 'question' | 'term' | 'label' | unde
|
|
|
7503
7315
|
/** LH-117: the share of a column's body cells that must read as numbers (numericText) for the column to align as numbers. */
|
|
7504
7316
|
declare const TABLE_NUMERIC_SHARE = 0.75;
|
|
7505
7317
|
interface TableLayoutOptions {
|
|
7318
|
+
/** LH-106: the language in effect (the slide's, else the deck's), whose numbering system a number cell is shown in. */
|
|
7319
|
+
language?: string;
|
|
7506
7320
|
/** Explicit resolved design alignment; absent, a column of numbers (LH-117) aligns at the end and every other at the start. A cell's style.align wins, then its header's. */
|
|
7507
7321
|
alignment?: 'left' | 'center' | 'right';
|
|
7508
7322
|
scale?: number;
|
|
@@ -7590,7 +7404,7 @@ interface LayoutAreasOptions extends Omit<ComposeSlideOptions, 'layout' | 'expla
|
|
|
7590
7404
|
bleed?: boolean;
|
|
7591
7405
|
/** Placed-image bands the slide layout reserves, as image blocks with these placements would. */
|
|
7592
7406
|
placements?: readonly {
|
|
7593
|
-
edge:
|
|
7407
|
+
edge: 'start' | 'end' | 'top' | 'bottom';
|
|
7594
7408
|
size?: number;
|
|
7595
7409
|
inset?: boolean;
|
|
7596
7410
|
}[];
|
|
@@ -7651,6 +7465,14 @@ declare function figureText(value: unknown): boolean;
|
|
|
7651
7465
|
declare function figureList(value: unknown): boolean;
|
|
7652
7466
|
/** LH-114: the longest quote (its text, without the marks) drawn as a pull line, in characters. */
|
|
7653
7467
|
declare const QUOTE_PULL_MAX_CHARACTERS = 140;
|
|
7468
|
+
/** SH-08: the share of the slide the front overlay shapes' bounds must cover to be the slide's body (overlaysDrawBody). */
|
|
7469
|
+
declare const OVERLAY_BODY_SHARE = 0.2;
|
|
7470
|
+
/**
|
|
7471
|
+
* SH-08: whether a slide's overlay shapes draw its body: the bounds of its front-layer shapes placed by fractions (connectors and shapes
|
|
7472
|
+
* anchored `at` a block left out) cover at least OVERLAY_BODY_SHARE of the slide. Such a slide (a SmartArt drawing imported as overlay
|
|
7473
|
+
* shapes) composes its headings as a content slide's, on top.
|
|
7474
|
+
*/
|
|
7475
|
+
declare function overlaysDrawBody(shapes: unknown): boolean;
|
|
7654
7476
|
declare function composeSlide(input: unknown, options?: ComposeSlideOptions): SlideComposition;
|
|
7655
7477
|
/**
|
|
7656
7478
|
* The part of a text item's box its lines cover (alignment respected), so a backdrop is judged under the ink, not the empty box: the
|
|
@@ -7685,6 +7507,13 @@ declare function statementMessage(slide: Record<string, any>, plan: LayoutTempla
|
|
|
7685
7507
|
declare const CHART_MIN_PLOT_PX = 120;
|
|
7686
7508
|
declare const CHART_MIN_PLOT_SHARE = 0.22;
|
|
7687
7509
|
declare const CHART_MAX_PLOT_ASPECT = 3;
|
|
7510
|
+
/**
|
|
7511
|
+
* P32, RR-105: in automatic composition the tallest a chart's box is, as height over width: 3/4 in a cell (4:3 landscape), 1 for a radar (its
|
|
7512
|
+
* web is round), 3/2 for the slide's only body (2:3 portrait: a lone chart fills a portrait body without bars twice as tall as wide).
|
|
7513
|
+
*/
|
|
7514
|
+
declare const CHART_MAX_HEIGHT_RATIO: number;
|
|
7515
|
+
declare const CHART_RADAR_MAX_HEIGHT_RATIO = 1;
|
|
7516
|
+
declare const CHART_LONE_MAX_HEIGHT_RATIO: number;
|
|
7688
7517
|
/**
|
|
7689
7518
|
* LH-49: the box a composed chart's plot is drawn in, as the engines lay it out: the chart box less the chart layer's header row, the
|
|
7690
7519
|
* chart's padding (10 reference px a side), a row of category labels and half a row above the plot (a whole one for a small chart's value
|
|
@@ -7697,5 +7526,5 @@ declare function resolveCanvasDimensions(input: unknown): {
|
|
|
7697
7526
|
height: number;
|
|
7698
7527
|
};
|
|
7699
7528
|
|
|
7700
|
-
export { ARROW_ADJUST as $, embedIcons as A, ensureDiagrams as B, ensureIcons as D, ENGINE_DEFAULT_CHART_TYPES as E, ensureShapes as G, iconsPending as H, isPlaceLabel as J, markLabelColor as K, nearIconNames as N, normalizeLanguageFamily as O, parseIconReference as P, resolveIcon as Q, SOCIAL_PLATFORMS as S, shapesPending as U, ARRANGEMENTS as V, ARRANGEMENT_CARDS_MAX as W, ARRANGEMENT_GROWTH as X, ARRANGEMENT_LINE_POINTS as Y, ARRANGEMENT_MAX as Z, ARRANGEMENT_TEXT_MARGIN as _, CHECK_TILE_MIN as a$, ASCII_QUOTE_MARKS as a0, AUTO_FIT_MIN_KEPT as a1, AUTO_LAYOUT as a2, CHART_EMPHASIS_MIN_LIGHTNESS_STEP as aA, CHART_HEADER_LEGEND_ROWS as aB, CHART_HEADER_MAX_LEGEND as aC, CHART_HIGHLIGHT_MUTED_MIN_CONTRAST as aD, CHART_HIGHLIGHT_MUTED_MIX as aE, CHART_LABELED_ZERO_SHARE as aF, CHART_LEAD_LIGHTNESS_STEP as aG, CHART_MAX_INTERVALS as aH, CHART_MAX_PLOT_ASPECT as aI, CHART_MIN_PLOT_PX as aJ, CHART_MIN_PLOT_SHARE as aK, CHART_MIN_TICK_SPACING_PX as aL, CHART_SERIES_MIN_DIFFERENCE as aM, CHART_SERIES_MIN_LIGHTNESS_STEP as aN, CHART_SERIES_SOFT_MIX as aO, CHART_SERIES_TIER_SIZE as aP, CHART_SERIES_TINT_MIX as aQ, CHART_SLICE_LABEL_MIN_RADIUS as aR, CHART_SLICE_MAX_SHIFT as aS, CHART_SLICE_SEPARATOR_PX as aT, CHART_TEXT_FLOOR_PX as aU, CHART_TEXT_PX as aV, CHART_VALUE_LIST_MAX_ROWS as aW, CHART_VALUE_LIST_SMALL_SLICE as aX, CHECK_TILE_MAX as aY, CHECK_TILE_MAX_CHARACTERS as aZ, CHECK_TILE_MAX_LINES as a_, BUILT_IN_MASKS as ab, CALM_PICTURE_SPREAD as af, CAPTIONABLE_FIELDS as ag, CAPTION_FONT_RATIO as ah, CAPTION_MAX_RATIO as ai, CARD_BORDER_MIX as aj, CARD_FILL_SPACE as ak, CARD_INSET as al, CARD_RADIUS as am, CARD_SURFACE_MIN_CONTRAST as an, CARD_SURFACE_MIX as ao, CARD_TEXT_MARGIN as ap, CARD_TEXT_MIN_CONTRAST as aq, CELL_CARD_INSET as ar, CHART_AXIS_MAX_OVERSHOOT as as, CHART_BAND_MIX as at, CHART_BAR_GAP_WIDTH as au, CHART_CONTEXT_FOCUS_DIFFERENCE as av, CHART_CONTEXT_LABELED_MIN_CONTRAST as aw, CHART_CONTEXT_MIN_CONTRAST as ax, CHART_DARK_SERIES_MIN_CONTRAST as ay, CHART_EMPHASIS_MIN_CONTRAST as az, CHEVRON_ADJUST as b0, CITATION_MARKER_RAISE as b1, CITATION_MARKER_SCALE as b2, CODE_HIGHLIGHT_LANGUAGES as b3, CODE_HIGHLIGHT_MAX_LENGTH as b4, CODE_NOMINAL_SIZE as b5, CODE_PANEL_BACKGROUND as b6, CODE_PANEL_DARK_SHADE as b7, CODE_PANEL_FOREGROUND as b8, CODE_SYNTAX_MIN_CONTRAST as b9, CONNECTOR_ROUTES as ba, CONNECTOR_STANDOFF as bb, CONNECTOR_STROKE_COLOR as bc, CONNECTOR_STROKE_WIDTH as bd, CYCLE_ARROW as be, CYCLE_ARROW_ADJUST as bf, CYCLE_ARROW_LIGHTEN as bg, CYCLE_DIAMETER as bh, CYCLE_RADIUS as bi, CYCLE_RING_MARGIN as bj, CYCLE_RING_NODE as bk, CYCLE_TWO as bl, CHART_TYPES as c, FIGURE_ROW_MIN as d$, EMPHASIS_BAND_MAX_CHARACTERS as dE, EMPHASIS_BAND_MAX_SHARE as dF, EMPHASIS_NOTE_LINES as dG, EMPHASIS_PILL_MAX_CHARACTERS as dH, EMPHASIS_PILL_SIZE as dI, EMPHASIS_SURFACE_MIN_CONTRAST as dJ, EMPHASIS_TAKEAWAY_MAX_CHARACTERS as dK, EMPHASIS_TEXT_MIN_CONTRAST as dL, EYEBROW_GAP as dM, EYEBROW_LABEL_CHARS as dN, EYEBROW_LABEL_WORDS as dO, EYEBROW_MAX_SIZE as dP, EYEBROW_MIN_SIZE as dQ, EYEBROW_SHARE as dR, EYEBROW_TAG_SIZE as dS, EYEBROW_TEXT_KIND as dT, EYEBROW_TRACKING as dU, FEATURED_LABEL_MAX_CHARACTERS as dW, FEATURED_LABEL_MAX_WORDS as dX, FEATURED_MARK_MAX_CHARACTERS as dY, FEATURED_MAX_CELLS as dZ, FIGURE_ROW_MAX as d_, DARK_BACKGROUND_LUMINANCE as dd, DEFAULT_CHART_LABEL_SEPARATOR as de, DEFAULT_FURNITURE_DATE_FORMAT as df, DEFAULT_SHAPE_STYLE as dg, DESIGN_HINT_KEYS as dh, DIAGRAM_BORDER_MIN_CONTRAST as di, DIAGRAM_LINE_MIN_CONTRAST as dj, DIAGRAM_MAX_EDGES as dk, DIAGRAM_NOMINAL_SIZE as dl, DIAGRAM_SECONDARY_FLOOR as dm, DIAGRAM_SHAPE_FAMILIES as dn, DIAGRAM_SOURCE_LIMIT as dp, DIAGRAM_SURFACE_ALT_MIX as dq, DIAGRAM_SURFACE_MIX as dr, DIAGRAM_SYNTAXES as ds, LIST_DISPLAY_SCALE as e$, FIGURE_WORDS as e0, FLOW_ROUND_ADJUST as e1, FONT_SIZE_GRID_PER_PX as e2, FOOTNOTE_MAX_RATIO as e3, FURNITURE_GAP as e4, FURNITURE_IMAGE_SHARE as e5, FURNITURE_ZONE_GUTTER as e6, ICON_CHIP as eA, ICON_CHIP_COMPACT as eB, ICON_CHIP_GAP as eC, ICON_CHIP_TINT as eD, ICON_GLYPH as eE, ICON_MIN_CONTRAST as eF, ICON_VIEWBOX as eG, JOINED_FIXED_MAX as eS, LAYOUT_BODY_KINDS as eU, LEAD_NOMINAL_SIZE as eV, LINEAR_ARRANGEMENTS as eW, LINEAR_TEXT_MARGINS as eX, LIST_ACCENT_RULE_WIDTH as eY, LIST_DISPLAY_GAP as eZ, LIST_DISPLAY_RULE as e_, GROUPED_LABEL_CODE as el, HEADING_AREAS as eo, HEADING_DISPLAY_SIZES as ep, HISTOGRAM_LABEL_SLOT as eq, HISTOGRAM_MIN_BINS as er, ICON_CARD_DESCRIPTION as et, ICON_CARD_DESCRIPTION_CHARACTERS as eu, ICON_CARD_FILL as ev, ICON_CARD_LABEL_CHARACTERS as ew, ICON_CARD_LABEL_WORDS as ex, ICON_CARD_MAX as ey, ICON_CARD_MIN as ez, ENGINE_DEFAULT_COLOR_SCHEME as f, MESSAGE_DISPLAY_SIZE as f$, LIST_HEADING_SCALE as f0, LIST_MARKERS as f1, LIST_NOMINAL_SIZE as f2, LIST_NUMERAL_GAP as f3, LIST_NUMERAL_SCALE as f4, LIST_QUESTION_LINES as f5, LIST_ROWS_GAP as f6, LIST_ROWS_LABEL_SHARE as f7, LIST_ROWS_SPREAD as f8, LIST_RULE_WIDTH as f9, MATRIX_BACKGROUND_LIGHTEN as fN, MATRIX_ENTRIES as fO, MATRIX_GAP as fP, MATRIX_INSET as fQ, MATRIX_QUADRANT as fR, MAX_COMPOSITION_DEPTH as fS, MAX_NUMBERING_LEVELS as fT, MAX_NUMBERING_VALUE as fU, MAX_REGION_BLOCKS as fV, MAX_REGION_DEPTH as fW, MAX_REGION_ENTRIES as fX, MAX_ROMAN_VALUE as fY, MAX_TEMPLATE_TRACKS as fZ, MESSAGE_DISPLAY_LINES as f_, LIST_WHOLE_ENTRIES as fa, LONE_DISPLAY_SIZES as fb, LONE_FILL as fc, LONE_METRIC_TARGET as fd, LONE_TARGET as fe, ENGINE_DEFAULT_FONT_SCHEME as g, METRIC_BAND_MIN_COLUMN as g0, METRIC_BAND_RATIO as g1, METRIC_BAND_VALUE_SHARE as g2, METRIC_DISPLAY_HEIGHT as g3, METRIC_DISPLAY_SIZES as g4, METRIC_DISPLAY_WIDTH as g5, METRIC_ICON_TEXT as g6, METRIC_PILL_PAD_X as g7, METRIC_PILL_PAD_Y as g8, METRIC_PILL_RISE as g9, NUMBERING_SUFFIXES as gA, NUMBER_GROUPING_MIN as gB, NUMERAL_TAKEAWAYS as gC, OPFCompositionError as gH, OPFLayoutTemplateError as gI, OPF_ARROW_LENGTH as gJ, OPF_ARROW_ROOM as gK, OPF_ARROW_THICKNESS as gL, OPF_CHEVRON_DEPTH as gM, OPF_COLUMN_ARROW_LENGTH as gN, OPF_COLUMN_ARROW_THICKNESS as gO, OPF_COLUMN_ROOM as gP, OPF_LAYOUT_DESIGNS as gQ, OPF_LAYOUT_KIND as gR, OPF_LAYOUT_MAX as gS, OPF_LINES_MAX as gT, OVERLAY_ANCHOR_SHARE as gU, OVERLAY_EDGES as gV, OVERLAY_LAYERS as gW, METRIC_ROLE_VALUE_SIZE as ga, METRIC_TILE_VALUE_SHARE as gb, METRIC_TREND_ARROW_GAP as gc, METRIC_TREND_ARROW_SIZE as gd, METRIC_TREND_MIN_CONTRAST as ge, METRIC_TREND_SHAPES as gf, METRIC_UNIT_GAP as gg, METRIC_UNIT_SHARE as gh, METRIC_VALUE_MIN_CONTRAST as gi, MIN_MEASURE_CHARS as gj, MM_PER_PX as gk, MOVED_ROW_MAX as gl, NEUTRAL_SHARES as gw, NOTE_PEER_RATIO as gx, NOTE_PEER_WORDS as gy, NUMBERING_STYLES as gz, ENGINE_DEFAULT_THEME as h, PAIR_ARROW_HEIGHT as h1, PAIR_ARROW_MARGIN as h2, PAIR_ARROW_WIDTH as h3, PAIR_FIGURE_KINDS as h4, PAIR_GRID_ANSWER as h5, PAIR_GRID_MIN as h6, PAIR_GRID_QUESTION as h7, PAIR_LENGTH_RATIO as h8, PANEL_SCRIM_LIMIT as h9, PYRAMID_STEPS_SHARE as hA, PYRAMID_TEXT_WIDTH as hB, QUOTE_MARK as hM, QUOTE_MARKS as hN, QUOTE_NOMINAL_SIZE as hO, QUOTE_PORTRAIT_GAP as hP, QUOTE_PORTRAIT_MIN_WIDTH as hQ, QUOTE_PORTRAIT_SHARE as hR, QUOTE_PORTRAIT_STEP as hS, QUOTE_PULL_LINES as hT, QUOTE_PULL_MAX_CHARACTERS as hU, QUOTE_PULL_PREFIX as hV, QUOTE_PULL_ROLE_SEPARATOR as hW, QUOTE_PULL_RULE as hX, QUOTE_SOURCE_SEPARATOR as hY, PATTERN_PRESETS as ha, PATTERN_PRESET_ALIASES as hb, PATTERN_TILE_SIZE as hc, PICTURE_BULLET_SCALE as hd, PICTURE_PANEL_SHARES as he, PICTURE_STROKE_WIDTH as hf, PICTURE_TEXT_COLUMNS as hg, PICTURE_TEXT_PLACEMENTS as hh, PILLAR_MAX as hi, PILLAR_WORD_MAX as hj, PORTRAIT_FOCUS_Y as hk, PORTRAIT_GAP as hl, PORTRAIT_MIN as hm, PORTRAIT_MODES as hn, PORTRAIT_SIDE_CHARS as ho, PORTRAIT_SIDE_FILL as hp, PORTRAIT_SIDE_MAX as hq, PORTRAIT_SIDE_SHARE as hr, PORTRAIT_SIDE_SHARES as hs, PORTRAIT_TALLEST as ht, PORTRAIT_TEXT_SIZE as hu, PORTRAIT_TOP_MAX as hv, PORTRAIT_WIDEST as hw, PROSE_NOMINAL_SIZE as hx, PYRAMID_MAX_ASPECT as hy, PYRAMID_STEPS_ASPECT as hz, SMART_ART_OPF_DOMAIN as i$, REGION_ANCHORS as i7, REGION_FLOWS as i8, REGION_KINDS as i9, SALIENT_LIMIT as iK, SCRIM_FADE as iL, SCRIM_MARGIN as iM, SCRIM_TARGET_CONTRAST as iN, SHAPE_BLOCK_KEYS as iO, SHAPE_EFFECT_KEYS as iP, SHAPE_PADDING as iQ, SHAPE_PRESETS as iR, SHAPE_STROKE_WIDTH as iS, SHAPE_STYLES as iT, SHORT_MESSAGE_WORDS as iU, SHORT_TEXT_WORDS as iV, SMALL_CHART_MAX_POINTS as iW, SMALL_CHART_MAX_SERIES as iX, SMART_ART_DOMAIN as iY, SMART_ART_LAYOUTS as iZ, SMART_ART_NAMES as i_, REGION_ROLES as ia, RESERVED_REGION_NAMES as ib, ROUND_RECT_ADJUST as ic, ROW_LABEL_CHARS as id, ROW_LABEL_WORDS as ie, RUN_IN_HEADING_CHARS as ig, SMART_ART_SCALES as j0, STEP_BADGE as j1, STEP_BADGE_GAP as j2, STEP_FLOW_CHARACTERS as j3, STEP_FLOW_MAX as j4, STEP_FLOW_MIN as j5, SURFACE_ALT_MIN_CONTRAST as j6, SURFACE_ALT_MIX as j7, THEME_DESIGN_KEYS as jA, TIER_MAX as jB, TIER_VALUE_SIZES as jC, TIMELINE_OUTLINE_MIN_CONTRAST as jD, TIMELINE_STATUSES as jE, TIMELINE_STATUS_WORDS as jF, TIMELINE_TEXT_MIN_CONTRAST as jG, TITLE_RULE_SIZE as jH, TABLE_HIGHLIGHT_MIX as jq, TABLE_NOMINAL_SIZE as jr, TABLE_NUMERIC_SHARE as js, TERM_WORDS as jt, TEXT_ONLY_LABELS as ju, TEXT_TILE_CHARACTERS as jv, TEXT_TILE_LINES as jw, TEXT_TILE_MARKER as jx, TEXT_TILE_MAX as jy, TEXT_TILE_MIN as jz, chartWaterfallColors as k$, alignBarRows as k9, chartHistogram as kA, chartIntervalsFor as kB, chartLabelText as kC, chartLayer as kD, chartLayerDataLabels as kE, chartNumericAxes as kF, chartOptionSupport as kG, chartOptionTarget as kH, chartPaletteForFill as kI, chartPlotBox as kJ, chartPlotInset as kK, chartRingLabels as kL, chartSchemeSeries as kM, chartSeriesLabelColor as kN, chartSeriesPalette as kO, chartSliceLabels as kP, chartSlicePlan as kQ, chartSlideFocus as kR, chartSoftColors as kS, chartStack as kT, chartTextSize as kU, chartTitleFocus as kV, chartTitleReferences as kW, chartValueAxis as kX, chartValueAxisHidden as kY, chartValueList as kZ, chartWaterfall as k_, allocateRows as ka, annotationText as kb, applyColorTransform as kc, applyHslTransforms as kd, applyLuminance as ke, arrangementPaint as kf, autoImageFit as kg, bindNoBreak as kh, bindRegions as ki, blockKind as kj, captionSettings as kk, cardGridColumns as kl, cardNodes as km, chartBandColor as kn, chartBarGeometry as ko, chartCategoriesInTime as kp, chartColorForFill as kq, chartContextColor as kr, chartContextColors as ks, chartDoughnut as kt, chartEmphasisColors as ku, chartEndLabels as kv, chartHeader as kw, chartHeaderCaption as kx, chartHighlightColors as ky, chartHighlightMarks as kz, LANGUAGES as l, groupsDataRange as l$, checkDiagram as l0, checkMarkPoints as l1, chevronNodes as l2, chooseConnectorSites as l3, choosePictureText as l4, citationMarkerText as l5, clrMapAttributes as l6, codeHighlightBands as l7, codeHighlightColors as l8, codeHighlightLines as l9, documentIcons as lA, emphasisSurface as lB, endLabelText as lC, evaluateLayoutDefinition as lD, eyebrowCaps as lE, eyebrowLabel as lF, eyebrowSize as lG, featuredCells as lH, figureList as lI, figureText as lJ, fitImage as lK, fitList as lL, fitRichText as lM, fitText as lN, flowNodes as lO, focusHits as lP, formatChartLabelNumber as lQ, formatChartLabelPercent as lR, formatFurnitureDate as lS, formatListNumber as lT, frameToSlide as lU, grayOfLuminance as lV, gridFlowShape as lW, groupBinding as lX, groupNumber as lY, groupingNode as lZ, groupsAxisTicks as l_, codeLineNumbers as la, codeLineRuns as lb, codeSyntaxPalette as lc, codeSyntaxPaletteForRoles as ld, codeSyntaxPaletteForScheme as le, collectCitations as lf, colorContrast as lg, colorMapFor as lh, colorTransform as li, composeLayoutAreas as lj, composeShape as lk, composeSlide as ll, compositeLayoutDefinition as lm, connectorAdjustPreset as ln, connectorRoute as lo, coverKept as lp, cycleAspect as lq, cycleFrame as lr, cycleLoop as ls, cycleNodes as lt, cycleRing as lu, deckBackgroundIsFixed as lv, defaultImageFocus as lw, defaultSlideBackground as lx, diagramPalette as ly, diagramPayload as lz, LOGO_SHAPES as m, measureText as m$, groupsThousands as m0, hasOverlayShapes as m1, histogramBins as m2, histogramEdgeDecimals as m3, histogramEdgeFormat as m4, histogramEdgeText as m5, horizontalBarPlot as m6, iconColors as m7, iconFromSvg as m8, iconPathCommands as m9, layoutMetric as mA, layoutQuote as mB, layoutRegion as mC, layoutStructure as mD, layoutTable as mE, layoutTemplate as mF, layoutTemplateIssues as mG, layoutTimeline as mH, layoutVariantApplies as mI, layoutWatermark as mJ, lineMayStartAt as mK, linearDesign as mL, linearMargins as mM, linearNodes as mN, listColumnBreaks as mO, listGridShape as mP, listNumberLabel as mQ, listNumbers as mR, lonePayload as mS, luminanceGrid as mT, majorityKind as mU, markQuote as mV, matrixNodes as mW, matrixQuadrants as mX, matrixSquare as mY, maxIntervalsFor as mZ, measureMonospaceText as m_, iconPathData as ma, imageBackground as mb, imageShape as mc, intrinsicImageAspect as md, intrinsicImageSize as me, isColorVariant as mf, isDarkColor as mg, isFixedBackground as mh, isLabelText as mi, isLayoutTemplate as mj, isLinearArrangement as mk, isOverlayConnector as ml, isPresetShape as mm, isShapeBlock as mn, isTimeFieldTitle as mo, isWrappedInQuoteMarks as mp, isolateNumbers as mq, layoutArrangement as mr, layoutCaption as ms, layoutCode as mt, layoutColorVariant as mu, layoutContent as mv, layoutDiagram as mw, layoutEntries as mx, layoutFootnotes as my, layoutFurniture as mz, resolveSlideDirection as n$, measureTextOutline as n0, messageWords as n1, metricPillFill as n2, metricTrendColor as n3, metricTrendMark as n4, metricTrendPoints as n5, metricValueColor as n6, monthOf as n7, niceScale as n8, nodeWidthAt as n9, presetTextRect as nA, pyramidFrame as nB, pyramidNodes as nC, pyramidSteps as nD, questionText as nE, quoteLanguage as nF, quoteMarksFor as nG, readableSchemeColor as nH, rectSites as nI, referencesSlide as nJ, refreshChartMarks as nK, refreshEndLabels as nL, regionAccepts as nM, regionRoleRank as nN, repeatedPairs as nO, resolveCanvasDimensions as nP, resolveChartColors as nQ, resolveChartOptions as nR, resolveCodeLanguage as nS, resolveColorRef as nT, resolveColorRoles as nU, resolveDesignHints as nV, resolveFontFamilies as nW, resolveLogo as nX, resolveNumbering as nY, resolvePatternPreset as nZ, resolveScriptFonts as n_, normalizeColorVariant as na, normalizeHexColor as nb, numberRanges as nc, numberingAtLevel as nd, numberingStyleDraws as ne, numericText as nf, opfLayoutGeometry as ng, opfSmartArtUnavailable as nh, overlayIssues as ni, paintDiagram as nj, paintDiagramGroup as nk, pairEntry as nl, paragraphDirection as nm, paragraphDirectionAt as nn, patternBitmap as no, patternRuns as np, physicalAlignment as nq, pictureScrims as nr, placeEndLabels as ns, placeIconCommands as nt, placeReferences as nu, placeStackNames as nv, placeTextLines as nw, placedImageBlocks as nx, presetAspect as ny, presetMask as nz, resolveSocialProfile as o0, resolveTextStyle as o1, restackForRows as o2, rightArrowPoints as o3, rootNodes as o4, rowLabel as o5, runInHeading as o6, sampledGrays as o7, sampledWeight as o8, scorePictureText as o9, tableGrid as oA, tableHighlightColor as oB, tableHighlightRows as oC, tableRowBoundaries as oD, tableSlideFocus as oE, textColorForFill as oF, textInkBox as oG, textLength as oH, textWidthMeasurer as oI, timelineMarkerShapes as oJ, timelineTextColor as oK, tokenizeCode as oL, trackingWidth as oM, translatePathData as oN, turnedShapeBox as oO, unbindNoBreak as oP, unwrapQuoteMarks as oQ, verticalFlowNodes as oR, visualReadingOrder as oS, walkCitationRuns as oT, waterfallLabelText as oU, waterfallRoles as oV, waterfallSignedFormat as oW, waterfallSteps as oX, wrapText as oY, scottBinCount as oa, scrimGeometry as ob, scrimOpacity as oc, scriptFontRole as od, shapeIssues as oe, shapeSites as of, shapeStyleLook as og, shapeTextColor as oh, shareHeights as oi, shareSiblingChartAxes as oj, shareSiblingPlots as ok, sliceNumberedItems as ol, slideBlockIds as om, slideCitations as on, slideFocusSources as oo, smallChart as op, smartArtScript as oq, smartArtUnavailable as or, snapFontSizeDown as os, snapFontSizeUp as ot, softenChartPalette as ou, stackCategoryValues as ov, stackedText as ow, statementMessage as ox, styledText as oy, surfaceAltColor as oz, chartDrawDiagnostics as x, chartDrawPlan as y, diagramsPending as z };
|
|
7701
|
-
export type { ComposeSlideOptions as C, Fonts as F,
|
|
7529
|
+
export { ARROW_ADJUST as $, isSupportedNumberingSystem as A, languageInEffect as B, localizeDigits as D, ENGINE_DEFAULT_CHART_TYPES as E, markLabelColor as G, normalizeLanguageFamily as H, numberLocale as I, numberingSystemExtension as J, numberingSystemOf as K, numeralScripts as O, plainLanguageTag as P, shapesPending as Q, SOCIAL_PLATFORMS as S, supportedNumberingSystems as U, ARRANGEMENTS as V, ARRANGEMENT_CARDS_MAX as W, ARRANGEMENT_GROWTH as X, ARRANGEMENT_LINE_POINTS as Y, ARRANGEMENT_MAX as Z, ARRANGEMENT_TEXT_MARGIN as _, CYCLE_ARROW as a$, ASCII_QUOTE_MARKS as a0, AUTO_FIT_MIN_KEPT as a1, AUTO_LAYOUT as a2, CHART_MIN_PLOT_PX as aA, CHART_MIN_PLOT_SHARE as aB, CHART_MIN_TICK_SPACING_PX as aC, CHART_RADAR_MAX_HEIGHT_RATIO as aD, CHART_REFERENCE_TYPES as aE, CHART_SLICE_LABEL_MIN_RADIUS as aF, CHART_TEXT_FLOOR_PX as aG, CHART_TEXT_PX as aH, CHART_VALUE_LIST_MAX_ROWS as aI, CHART_VALUE_LIST_SMALL_SLICE as aJ, CHECK_TILE_MAX as aK, CHECK_TILE_MAX_CHARACTERS as aL, CHECK_TILE_MAX_LINES as aM, CHECK_TILE_MIN as aN, CHEVRON_ADJUST as aO, CITATION_MARKER_RAISE as aP, CITATION_MARKER_SCALE as aQ, CODE_HIGHLIGHT_LANGUAGES as aR, CODE_HIGHLIGHT_MAX_LENGTH as aS, CODE_NOMINAL_SIZE as aT, CODE_PANEL_BACKGROUND as aU, CODE_PANEL_FOREGROUND as aV, CODE_SYNTAX_MIN_CONTRAST as aW, CONNECTOR_ROUTES as aX, CONNECTOR_STANDOFF as aY, CONNECTOR_STROKE_COLOR as aZ, CONNECTOR_STROKE_WIDTH as a_, BODY_LINE_PITCH as ad, BUILT_IN_MASKS as ae, CALM_PICTURE_SPREAD as ai, CAPTIONABLE_FIELDS as aj, CAPTION_FONT_RATIO as ak, CAPTION_MAX_RATIO as al, CARD_FILL_SPACE as am, CARD_INSET as an, CARD_RADIUS as ao, CARD_TEXT_MARGIN as ap, CELL_CARD_INSET as aq, CHART_AXIS_MAX_OVERSHOOT as ar, CHART_BAR_GAP_WIDTH as as, CHART_HEADER_LEGEND_ROWS as at, CHART_HEADER_MAX_LEGEND as au, CHART_LABELED_ZERO_SHARE as av, CHART_LONE_MAX_HEIGHT_RATIO as aw, CHART_MAX_HEIGHT_RATIO as ax, CHART_MAX_INTERVALS as ay, CHART_MAX_PLOT_ASPECT as az, CHART_TYPES as b, CYCLE_ARROW_ADJUST as b0, CYCLE_ARROW_LIGHTEN as b1, CYCLE_DIAMETER as b2, CYCLE_RADIUS as b3, CYCLE_RING_MARGIN as b4, CYCLE_RING_NODE as b5, CYCLE_TWO as b6, DIAGRAM_NOMINAL_SIZE as c$, DEFAULT_CHART_LABEL_SEPARATOR as cU, DEFAULT_FURNITURE_DATE_FORMAT as cV, DEFAULT_SHAPE_STYLE as cW, DESIGN_HINT_KEYS as cX, DIAGRAM_BORDER_MIN_CONTRAST as cY, DIAGRAM_LINE_MIN_CONTRAST as cZ, DIAGRAM_MAX_EDGES as c_, DIAGRAM_SECONDARY_FLOOR as d0, DIAGRAM_SHAPE_FAMILIES as d1, DIAGRAM_SOURCE_LIMIT as d2, DIAGRAM_SURFACE_ALT_MIX as d3, DIAGRAM_SURFACE_MIX as d4, DIAGRAM_SYNTAXES as d5, DISPLAY_LINE_PITCH as d6, DISPLAY_SIZE_FACTOR as d7, DISPLAY_TRACKING as d8, DOT_LAYOUT_ENGINES as d9, EYEBROW_MIN_SIZE as dA, EYEBROW_SHARE as dB, EYEBROW_TAG_SIZE as dC, EYEBROW_TEXT_KIND as dD, EYEBROW_TRACKING as dE, FEATURED_LABEL_MAX_CHARACTERS as dF, FEATURED_LABEL_MAX_WORDS as dG, FEATURED_MARK_MAX_CHARACTERS as dH, FEATURED_MAX_CELLS as dI, FIGURE_CEILING as dJ, FIGURE_ROW_MAX as dK, FIGURE_ROW_MIN as dL, FIGURE_WORDS as dM, FLOW_ROUND_ADJUST as dN, FONT_SIZE_GRID_PER_PX as dO, FOOTNOTE_MAX_RATIO as dP, FURNITURE_GAP as dQ, FURNITURE_IMAGE_SHARE as dR, FURNITURE_ZONE_GUTTER as dS, DOT_SHAPES as da, EMPHASIS_BAND_MAX_CHARACTERS as dq, EMPHASIS_BAND_MAX_SHARE as dr, EMPHASIS_NOTE_LINES as ds, EMPHASIS_PILL_MAX_CHARACTERS as dt, EMPHASIS_PILL_SIZE as du, EMPHASIS_TAKEAWAY_MAX_CHARACTERS as dv, EYEBROW_GAP as dw, EYEBROW_LABEL_CHARS as dx, EYEBROW_LABEL_WORDS as dy, EYEBROW_MAX_SIZE as dz, ENGINE_DEFAULT_COLOR_SCHEME as e, GROUPED_LABEL_CODE as e5, HEADING_AREAS as e8, HEADING_DISPLAY_SIZES as e9, LIST_ACCENT_RULE_WIDTH as eA, LIST_DISPLAY_GAP as eB, LIST_DISPLAY_RULE as eC, LIST_DISPLAY_SCALE as eD, LIST_HEADING_SCALE as eE, LIST_MARKERS as eF, LIST_NOMINAL_SIZE as eG, LIST_NUMERAL_GAP as eH, LIST_NUMERAL_SCALE as eI, LIST_QUESTION_LINES as eJ, LIST_ROWS_GAP as eK, LIST_ROWS_LABEL_SHARE as eL, LIST_ROWS_SPREAD as eM, LIST_RULE_WIDTH as eN, LIST_WHOLE_ENTRIES as eO, LONE_DISPLAY_SIZES as eP, LONE_FILL as eQ, LONE_METRIC_TARGET as eR, LONE_TARGET as eS, HISTOGRAM_LABEL_SLOT as ea, HISTOGRAM_MIN_BINS as eb, ICON_CARD_DESCRIPTION as ed, ICON_CARD_DESCRIPTION_CHARACTERS as ee, ICON_CARD_FILL as ef, ICON_CARD_LABEL_CHARACTERS as eg, ICON_CARD_LABEL_WORDS as eh, ICON_CARD_MAX as ei, ICON_CARD_MIN as ej, ICON_CHIP as ek, ICON_CHIP_COMPACT as el, ICON_CHIP_GAP as em, ICON_GLYPH as en, JOINED_FIXED_MAX as eu, LAYOUT_BODY_KINDS as ew, LEAD_NOMINAL_SIZE as ex, LINEAR_ARRANGEMENTS as ey, LINEAR_TEXT_MARGINS as ez, ENGINE_DEFAULT_FONT_SCHEME as f, MESSAGE_CEILINGS as fA, MESSAGE_DISPLAY_LINES as fB, MESSAGE_DISPLAY_SIZE as fC, METRIC_BAND_MIN_COLUMN as fD, METRIC_BAND_RATIO as fE, METRIC_BAND_VALUE_SHARE as fF, METRIC_DISPLAY_HEIGHT as fG, METRIC_DISPLAY_SIZES as fH, METRIC_DISPLAY_WIDTH as fI, METRIC_ICON_TEXT as fJ, METRIC_PILL_PAD_X as fK, METRIC_PILL_PAD_Y as fL, METRIC_PILL_RISE as fM, METRIC_ROLE_VALUE_SIZE as fN, METRIC_TILE_VALUE_SHARE as fO, METRIC_TREND_ARROW_GAP as fP, METRIC_TREND_ARROW_SIZE as fQ, METRIC_TREND_MIN_CONTRAST as fR, METRIC_TREND_SHAPES as fS, METRIC_UNIT_GAP as fT, METRIC_UNIT_SHARE as fU, METRIC_VALUE_MIN_CONTRAST as fV, MIN_MEASURE_CHARS as fW, MM_PER_PX as fX, MOVED_ROW_MAX as fY, MATRIX_BACKGROUND_LIGHTEN as fn, MATRIX_ENTRIES as fo, MATRIX_GAP as fp, MATRIX_INSET as fq, MATRIX_QUADRANT as fr, MAX_COMPOSITION_DEPTH as fs, MAX_NUMBERING_LEVELS as ft, MAX_NUMBERING_VALUE as fu, MAX_REGION_BLOCKS as fv, MAX_REGION_DEPTH as fw, MAX_REGION_ENTRIES as fx, MAX_ROMAN_VALUE as fy, MAX_TEMPLATE_TRACKS as fz, ENGINE_DEFAULT_THEME as g, PICTURE_PANEL_SHARES as g$, NOTE_PEER_RATIO as g7, NOTE_PEER_WORDS as g8, NUMBERING_STYLES as g9, OPF_LAYOUT_DESIGNS as gA, OPF_LAYOUT_KIND as gB, OPF_LAYOUT_MAX as gC, OPF_LINES_MAX as gD, OVERLAY_ANCHOR_SHARE as gE, OVERLAY_BODY_SHARE as gF, OVERLAY_EDGES as gG, OVERLAY_LAYERS as gH, PAIR_ARROW_HEIGHT as gO, PAIR_ARROW_MARGIN as gP, PAIR_ARROW_WIDTH as gQ, PAIR_FIGURE_KINDS as gR, PAIR_GRID_ANSWER as gS, PAIR_GRID_MIN as gT, PAIR_GRID_QUESTION as gU, PAIR_LENGTH_RATIO as gV, PANEL_SCRIM_LIMIT as gW, PATTERN_PRESETS as gX, PATTERN_PRESET_ALIASES as gY, PATTERN_TILE_SIZE as gZ, PICTURE_BULLET_SCALE as g_, NUMBERING_SUFFIXES as ga, NUMBERING_SYSTEMS as gb, NUMBER_GROUPING_MIN as gc, NUMBER_LOCALES as gd, NUMBER_LOCALE_SOURCE as ge, NUMBER_SEPARATOR_OVERRIDES as gf, NUMERAL_SHAPES as gg, NUMERAL_TAKEAWAYS as gh, OPFCompositionError as gr, OPFLayoutTemplateError as gs, OPF_ARROW_LENGTH as gt, OPF_ARROW_ROOM as gu, OPF_ARROW_THICKNESS as gv, OPF_CHEVRON_DEPTH as gw, OPF_COLUMN_ARROW_LENGTH as gx, OPF_COLUMN_ARROW_THICKNESS as gy, OPF_COLUMN_ROOM as gz, LANGUAGES as h, REGION_ANCHORS as h$, PICTURE_STROKE_WIDTH as h0, PICTURE_TEXT_COLUMNS as h1, PICTURE_TEXT_PLACEMENTS as h2, PILLAR_MAX as h3, PILLAR_WORD_MAX as h4, PLACED_TILE_LINES as h5, PLACED_TILE_SHARE as h6, PLANTUML_DIAGRAMS as h7, PORTRAIT_FOCUS_Y as h8, PORTRAIT_GAP as h9, QUOTE_MARK as hD, QUOTE_MARKS as hE, QUOTE_NOMINAL_SIZE as hF, QUOTE_PORTRAIT_GAP as hG, QUOTE_PORTRAIT_MIN_WIDTH as hH, QUOTE_PORTRAIT_SHARE as hI, QUOTE_PORTRAIT_STEP as hJ, QUOTE_PULL_LINES as hK, QUOTE_PULL_MAX_CHARACTERS as hL, QUOTE_PULL_PREFIX as hM, QUOTE_PULL_ROLE_SEPARATOR as hN, QUOTE_PULL_RULE as hO, QUOTE_SOURCE_SEPARATOR as hP, RADAR_BOTTOM_LEGEND_GAIN as h_, PORTRAIT_MIN as ha, PORTRAIT_MODES as hb, PORTRAIT_SIDE_CHARS as hc, PORTRAIT_SIDE_FILL as hd, PORTRAIT_SIDE_MAX as he, PORTRAIT_SIDE_SHARE as hf, PORTRAIT_SIDE_SHARES as hg, PORTRAIT_TALLEST as hh, PORTRAIT_TEXT_SIZE as hi, PORTRAIT_TOP_MAX as hj, PORTRAIT_WIDEST as hk, PROSE_NOMINAL_SIZE as hl, PYRAMID_MAX_ASPECT as hm, PYRAMID_STEPS_ASPECT as hn, PYRAMID_STEPS_SHARE as ho, PYRAMID_TEXT_WIDTH as hp, LOGO_SHAPES as i, REGION_FLOWS as i0, REGION_KINDS as i1, REGION_ROLES as i2, RESERVED_REGION_NAMES as i3, ROUND_RECT_ADJUST as i4, ROW_LABEL_CHARS as i5, ROW_LABEL_WORDS as i6, RUN_IN_HEADING_CHARS as i7, SCRIM_FADE as iA, SCRIM_MARGIN as iB, SCRIM_TARGET_CONTRAST as iC, SHAPE_BLOCK_KEYS as iD, SHAPE_EFFECT_KEYS as iE, SHAPE_PADDING as iF, SHAPE_PRESETS as iG, SHAPE_STROKE_WIDTH as iH, SHAPE_STYLES as iI, SHORT_MESSAGE_WORDS as iJ, SHORT_TEXT_WORDS as iK, SMALL_CHART_MAX_POINTS as iL, SMALL_CHART_MAX_SERIES as iM, SMART_ART_DOMAIN as iN, SMART_ART_LAYOUTS as iO, SMART_ART_NAMES as iP, SMART_ART_OPF_DOMAIN as iQ, SMART_ART_SCALES as iR, STEP_BADGE as iS, STEP_BADGE_GAP as iT, STEP_FLOW_CHARACTERS as iU, STEP_FLOW_MAX as iV, STEP_FLOW_MIN as iW, STUB_LINE_SHARE as iX, SALIENT_LIMIT as iz, alignBarRows as j$, TABLE_NOMINAL_SIZE as je, TABLE_NUMERIC_SHARE as jf, TEAM_AVATAR as jg, TERM_WORDS as jh, TEXT_ONLY_LABELS as ji, TEXT_TILE_CHARACTERS as jj, TEXT_TILE_LINES as jk, TEXT_TILE_MARKER as jl, TEXT_TILE_MAX as jm, TEXT_TILE_MIN as jn, THEME_DESIGN_KEYS as jo, TIER_MAX as jp, TIER_VALUE_SIZES as jq, TIMELINE_OUTLINE_MIN_CONTRAST as jr, TIMELINE_STATUSES as js, TIMELINE_STATUS_WORDS as jt, TIMELINE_TEXT_MIN_CONTRAST as ju, TITLE_RULE_SIZE as jv, composeShape as k$, allocateRows as k0, annotationText as k1, arrangementPaint as k2, arrangementTree as k3, autoImageFit as k4, bindNoBreak as k5, bindRegions as k6, blockKind as k7, capitalsLabel as k8, captionSettings as k9, chartReferences as kA, chartRingLabels as kB, chartSliceLabels as kC, chartSlideFocus as kD, chartStack as kE, chartTextSize as kF, chartTitleFocus as kG, chartValueAxis as kH, chartValueAxisHidden as kI, chartValueList as kJ, chartWaterfall as kK, checkDiagram as kL, checkMarkPoints as kM, chevronNodes as kN, chooseConnectorSites as kO, choosePictureText as kP, citationMarkerText as kQ, codeHighlightBands as kR, codeHighlightColors as kS, codeHighlightLines as kT, codeLineNumbers as kU, codeLineRuns as kV, codeSyntaxPalette as kW, codeSyntaxPaletteForRoles as kX, codeSyntaxPaletteForScheme as kY, collectCitations as kZ, composeLayoutAreas as k_, cardGridColumns as ka, cardNodes as kb, chartAxisFraction as kc, chartAxisScale as kd, chartBarGeometry as ke, chartBarSeriesOffset as kf, chartCategoriesInTime as kg, chartComboAxes as kh, chartDoughnut as ki, chartEndLabels as kj, chartHeader as kk, chartHeaderCaption as kl, chartHighlightMarks as km, chartHistogram as kn, chartIntervalsFor as ko, chartLabelText as kp, chartLayer as kq, chartLayerDataLabels as kr, chartNumberLanguage as ks, chartNumericAxes as kt, chartOptionSupport as ku, chartOptionTarget as kv, chartPlotBox as kw, chartPlotInset as kx, chartRadarLayout as ky, chartReferenceSources as kz, itemAlignment as l$, composeSlide as l0, compositeLayoutDefinition as l1, connectorAdjustPreset as l2, connectorRoute as l3, coverKept as l4, cycleAspect as l5, cycleFrame as l6, cycleLoop as l7, cycleNodes as l8, cycleRing as l9, grayOfLuminance as lA, gridFlowShape as lB, groupBinding as lC, groupNumber as lD, groupingNode as lE, groupsAxisTicks as lF, groupsDataRange as lG, groupsThousands as lH, hasOverlayShapes as lI, histogramBins as lJ, histogramEdgeDecimals as lK, histogramEdgeFormat as lL, histogramEdgeText as lM, horizontalBarPlot as lN, imageBackground as lO, imageShape as lP, intrinsicImageAspect as lQ, intrinsicImageSize as lR, isLabelText as lS, isLayoutTemplate as lT, isLinearArrangement as lU, isOverlayConnector as lV, isPresetShape as lW, isShapeBlock as lX, isTimeFieldTitle as lY, isWrappedInQuoteMarks as lZ, isolateNumbers as l_, defaultImageFocus as la, diagramPalette as lb, diagramPayload as lc, displayDepth as ld, displayFrom as le, displayTracks as lf, dotToMermaid as lg, endLabelText as lh, evaluateLayoutDefinition as li, eyebrowCaps as lj, eyebrowLabel as lk, eyebrowSize as ll, featuredCells as lm, figureList as ln, figureText as lo, fitImage as lp, fitList as lq, fitRichText as lr, fitText as ls, flowNodes as lt, focusHits as lu, formatChartLabelNumber as lv, formatChartLabelPercent as lw, formatFurnitureDate as lx, formatListNumber as ly, frameToSlide as lz, paintDiagram as m$, itemizeScripts as m0, layoutArrangement as m1, layoutCaption as m2, layoutCode as m3, layoutContent as m4, layoutDiagram as m5, layoutEntries as m6, layoutFootnotes as m7, layoutFurniture as m8, layoutMetric as m9, matrixSquare as mA, maxIntervalsFor as mB, measureMonospaceText as mC, measureText as mD, measureTextOutline as mE, messageCeiling as mF, messageCharacters as mG, messageWords as mH, metricPillFill as mI, metricTrendColor as mJ, metricTrendMark as mK, metricTrendPoints as mL, metricValueColor as mM, monthOf as mN, nativeTreeGeometry as mO, niceScale as mP, nodeWidthAt as mQ, numberRanges as mR, numberingAtLevel as mS, numberingStyleDraws as mT, numeralShapePrefix as mU, numericText as mV, oneMessageField as mW, opfLayoutGeometry as mX, opfSmartArtUnavailable as mY, overlayIssues as mZ, overlaysDrawBody as m_, layoutQuote as ma, layoutRegion as mb, layoutStructure as mc, layoutTable as md, layoutTemplate as me, layoutTemplateIssues as mf, layoutTimeline as mg, layoutWatermark as mh, lineMayStartAt as mi, linePitch as mj, linearDesign as mk, linearMargins as ml, linearNodes as mm, listColumnBreaks as mn, listGridShape as mo, listNumberLabel as mp, listNumbers as mq, localizeNumberParts as mr, localizeNumberText as ms, localizePatternNumber as mt, lonePayload as mu, luminanceGrid as mv, majorityKind as mw, markQuote as mx, matrixNodes as my, matrixQuadrants as mz, shareSiblingPlots as n$, paintDiagramGroup as n0, pairEntry as n1, paragraphDirection as n2, paragraphDirectionAt as n3, paretoPlan as n4, patternBitmap as n5, patternRuns as n6, physicalAlignment as n7, pictureOverlay as n8, pictureScrims as n9, resolveFontFamilies as nA, resolveLogo as nB, resolveNumbering as nC, resolvePatternPreset as nD, resolveScriptFonts as nE, resolveSlideDirection as nF, resolveSocialProfile as nG, resolveTextStyle as nH, restackForRows as nI, rightArrowPoints as nJ, rootNodes as nK, rowLabel as nL, runInHeading as nM, sampledGrays as nN, sampledWeight as nO, scorePictureText as nP, scottBinCount as nQ, scrimGeometry as nR, scrimOpacity as nS, scriptFontRole as nT, scriptOfCharacter as nU, shapeIssues as nV, shapeSites as nW, shapeStyleLook as nX, shapeTextColor as nY, shareHeights as nZ, shareSiblingChartAxes as n_, placeEndLabels as na, placeReferences as nb, placeStackNames as nc, placeTextLines as nd, placedImageBlocks as ne, plantumlToMermaid as nf, presetAspect as ng, presetMask as nh, presetTextRect as ni, pyramidFrame as nj, pyramidNodes as nk, pyramidSteps as nl, questionText as nm, quoteLanguage as nn, quoteMarksFor as no, rectSites as np, referencesSlide as nq, refreshChartMarks as nr, refreshEndLabels as ns, regionAccepts as nt, regionRoleRank as nu, repeatedPairs as nv, resolveCanvasDimensions as nw, resolveChartOptions as nx, resolveCodeLanguage as ny, resolveDesignHints as nz, sliceNumberedItems as o0, slideBlockIds as o1, slideCitations as o2, slideFocusSources as o3, smallChart as o4, smartArtScript as o5, smartArtUnavailable as o6, snapFontSizeDown as o7, snapFontSizeUp as o8, stackCategoryValues as o9, waterfallSignedFormat as oA, waterfallSteps as oB, wrapText as oC, stackedText as oa, statementMessage as ob, stubLine as oc, styledText as od, tableGrid as oe, tableHighlightRows as of, tableRowBoundaries as og, tableSlideFocus as oh, textInkBox as oi, textLength as oj, textWidthMeasurer as ok, timelineMarkerShapes as ol, timelineStatusWordsFor as om, timelineTextColor as on, tokenizeCode as oo, trackingWidth as op, translatePathData as oq, turnedShapeBox as or, unbindNoBreak as os, unwrapQuoteMarks as ot, vennNodes as ou, verticalFlowNodes as ov, visualReadingOrder as ow, walkCitationRuns as ox, waterfallLabelText as oy, waterfallRoles as oz, asciiDigits as r, chartDrawDiagnostics as s, chartDrawPlan as t, diagramsPending as u, ensureDiagrams as v, ensureShapes as w, formatNumber as x, formatPercentNumber as y, isPlaceLabel as z };
|
|
7530
|
+
export type { ComposeSlideOptions as C, Fonts as F, LayoutDiagnostic as L, MessageSurface as M, NumberLocale as N, ResolveLogoOptions as R, TextMeasurement as T, FontFamilies as a, AnnotatedRun as a3, AnnotationFitter as a4, AnnotationLayoutOptions as a5, Arrangement as a6, ArrangementArrow as a7, ArrangementColor as a8, ArrangementNode as a9, ArrangementPaint as aa, ArrangementTreeNode as ab, ArrangementTreeResult as ac, BackgroundImageFit as af, BindRegionsOptions as ag, BoundBlock as ah, CodeLayoutOptions as b$, Caption as b7, CaptionAlignment as b8, CaptionObject as b9, ChartNumericAxes as bA, ChartOptionDiagnostic as bB, ChartOptionKind as bC, ChartOptionSupport as bD, ChartOptionTarget as bE, ChartPlotGeometry as bF, ChartPlotInset as bG, ChartReference as bH, ChartReferenceDiagnostic as bI, ChartReferenceLine as bJ, ChartScale as bK, ChartSliceLabel as bL, ChartStackEnd as bM, ChartStackName as bN, ChartValueAxis as bO, ChartValueListHole as bP, ChartValueListRow as bQ, CitationMarker as bR, CitationNote as bS, CodeContent as bT, CodeHighlightBand as bU, CodeHighlightColors as bV, CodeHighlightEntry as bW, CodeHighlightIssue as bX, CodeHighlightLines as bY, CodeLayout as bZ, CodeLayoutDiagnostic as b_, CaptionPosition as ba, CaptionSettings as bb, ChartAxisGeometry as bc, ChartBarGeometry as bd, ChartEndLabel as be, ChartHeaderLegendEntry as bf, ChartHighlightMarks as bg, ChartLabelContent as bh, ChartLabelPosition as bi, ChartLayer as bj, ChartLayerDoughnut as bk, ChartLayerEndLabels as bl, ChartLayerFocus as bm, ChartLayerGeometry as bn, ChartLayerHeader as bo, ChartLayerHistogram as bp, ChartLayerRadar as bq, ChartLayerReferences as br, ChartLayerRing as bs, ChartLayerRows as bt, ChartLayerSlices as bu, ChartLayerSmall as bv, ChartLayerStack as bw, ChartLayerValueList as bx, ChartLayerWaterfall as by, ChartLegendPosition as bz, ChartDrawPlan as c, CodeLineSegment as c0, CodeLineSource as c1, CodeRun as c2, CodeSyntaxPalette as c3, CodeSyntaxPaletteOptions as c4, CodeSyntaxPaletteTheme as c5, CodeTextFit as c6, CodeTextPart as c7, CodeToken as c8, CodeTokenKind as c9, ComposedPlacement as cA, ComposedRegion as cB, ComposedScrim as cC, ComposedShape as cD, ComposedShapePath as cE, ComposedStepBadge as cF, ComposedSteps as cG, ComposedStroke as cH, Composition as cI, CompositionCandidate as cJ, CompositionDecision as cK, CompositionExplanation as cL, CompositionPenalties as cM, CompositionTrack as cN, ConnectionSite as cO, ConnectorEnd as cP, ConnectorFrame as cQ, ConnectorPreset as cR, ConnectorRoute as cS, ConnectorRouteGeometry as cT, ComposedArrangement as ca, ComposedArrowhead as cb, ComposedBackgroundImage as cc, ComposedCaption as cd, ComposedChart as ce, ComposedConnector as cf, ComposedDiagram as cg, ComposedDiagramItem as ch, ComposedEmphasis as ci, ComposedFill as cj, ComposedFlow as ck, ComposedFootnoteEntry as cl, ComposedFootnotes as cm, ComposedGradient as cn, ComposedGroup as co, ComposedHeadingArea as cp, ComposedIcon as cq, ComposedImage as cr, ComposedImageCallout as cs, ComposedItem as ct, ComposedLayoutArea as cu, ComposedListColumn as cv, ComposedLogo as cw, ComposedOverlay as cx, ComposedOverlayEntry as cy, ComposedOverlayShape as cz, ChartFallback as d, FurnitureLayout as d$, FeaturedCells as dT, FeaturedKind as dU, FlowShape as dV, FocusSource as dW, FontFaceSelection as dX, FootnoteLayoutOptions as dY, FurnitureField as dZ, FurnitureImagePart as d_, DeckCitations as db, DesignAlignment as dc, DesignHintKey as dd, DesignHintSource as de, DesignHints as df, DiagramIssue as dg, DiagramLayoutOptions as dh, DiagramMeasure as di, DiagramPalette as dj, DiagramPaletteInput as dk, DiagramPayload as dl, DiagramSyntax as dm, DotIssue as dn, DotTranslation as dp, LayoutConstraint as e$, FurniturePart as e0, FurniturePartBase as e1, FurnitureSocialLink as e2, FurnitureTextExtras as e3, FurnitureTextPart as e4, GroupedBinding as e6, GroupingNode as e7, LayoutAlgorithm as eT, LayoutArea as eU, LayoutAreasOptions as eV, LayoutBodyKind as eW, LayoutBox as eX, LayoutBranch as eY, LayoutChild as eZ, LayoutChoose as e_, HistogramBin as ec, ImageEdge as eo, ImageFit as ep, ImageFitOption as eq, ImageFitPlacement as er, ImageFocus as es, ImageShape as et, JoinedArrangement as ev, MetricLayoutDiagnostic as f$, LayoutContent as f0, LayoutDefinition as f1, LayoutEntry as f2, LayoutForEach as f3, LayoutNodeDefinition as f4, LayoutPresOf as f5, LayoutRegion as f6, LayoutShape as f7, LayoutShapeType as f8, LayoutStyle as f9, MetricContent as fZ, MetricLayout as f_, LayoutTable as fa, LayoutTemplate as fb, LayoutTemplateIssue as fc, LinearArrangement as fd, LinearGeometry as fe, ListBulletImage as ff, ListEntryLayout as fg, ListFit as fh, ListFitOptions as fi, ListNumber as fj, ListRule as fk, ListText as fl, ListValue as fm, MetricLayoutOptions as g0, MetricSentiment as g1, MetricTextPart as g2, MetricTextSource as g3, MetricTrend as g4, MetricTrendColorOptions as g5, MetricTrendMark as g6, OpfLayoutDesign as gI, OpfLayoutRecipe as gJ, OpfSmartArtCandidate as gK, OverlayEdge as gL, OverlayIssue as gM, OverlayLayer as gN, NativeTreeConnector as gi, NativeTreeGeometry as gj, NativeTreeGeometryResult as gk, NativeTreeKind as gl, NativeTreeNode as gm, Numbering as gn, NumberingInput as go, NumberingStyleName as gp, NumberingSuffix as gq, PlantumlIssue as hA, PlantumlTranslation as hB, PortraitMode as hC, QuoteBodyOptions as hQ, QuoteContent as hR, QuoteLayout as hS, QuoteLayoutDiagnostic as hT, QuoteLayoutOptions as hU, QuoteMark as hV, QuoteMarks as hW, QuotePhoto as hX, QuoteTextPart as hY, QuoteTextSource as hZ, PhysicalAlignment as hq, PictureLuminance as hr, PictureText as hs, PictureTextAlignment as ht, PictureTextAnchor as hu, PictureTextCandidate as hv, PictureTextInput as hw, PictureTextPlacement as hx, PictureWeights as hy, PlantumlDiagram as hz, ScriptFontSource as i$, ReadingBox as i8, Reference as i9, ScrimEdge as iY, ScriptFontApp as iZ, ScriptFontSlots as i_, ReferencesSlideOptions as ia, RegionAnchor as ib, RegionBinding as ic, RegionBindingDiagnostic as id, RegionBindingResult as ie, RegionFlow as ig, RegionKind as ih, RegionRole as ii, ResolveDesignHintsOptions as ij, ResolveScriptFontsOptions as ik, ResolvedChartDataLabels as il, ResolvedChartHighlight as im, ResolvedChartOptions as io, ResolvedDesignHints as ip, ResolvedNumbering as iq, ResolvedScriptFonts as ir, RichText as is, RichTextFit as it, RichTextFragment as iu, RichTextLine as iv, RichTextOptions as iw, RichTextRun as ix, RowDemand as iy, LanguageFamilyName as j, ScriptFontSupplement as j0, ScriptItemizationProfile as j1, ScriptMeasurementProfile as j2, ScriptRole as j3, ScriptTextRun as j4, ShapeEnd as j5, ShapeStyleLook as j6, ShapeStyleName as j7, SiblingPlotChart as j8, SlideCitations as j9, TableGridCell as jA, TableGridIssue as jB, TableLayout as jC, TableLayoutOptions as jD, TableRowLayout as jE, TextDirection as jF, TextFit as jG, TextLineInk as jH, TextLineSegment as jI, TextLineSource as jJ, TextPlacement as jK, TextPlacementLine as jL, TimelineContent as jM, TimelineEvent as jN, TimelineLayout as jO, TimelineLayoutDiagnostic as jP, TimelineLayoutOptions as jQ, TimelineMarkerShape as jR, TimelineStatus as jS, TimelineStatusColors as jT, TimelineTextPart as jU, VennBox as jV, VennNode as jW, WaterfallRole as jX, WaterfallStep as jY, WatermarkTextLayout as jZ, WatermarkTextOptions as j_, SlideComposition as ja, SmartArtCandidate as jb, SocialProfile as jc, SourceTextFit as jd, TableBorder as jw, TableCellLayout as jx, TableCellStyle as jy, TableGrid as jz, LanguageVocabulary as k, LogoShape as l, LogoVariant as m, MeasureTextWidth as n, ResolvedLogo as o, SocialPlatformVocabulary as p, TextStyle as q };
|