@openpresentation/opf 0.32.1 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/browser.js +22 -21
- package/dist/catalog-refs-CoIrOdAw.d.ts +937 -0
- package/dist/{catalog-schemas-LdqOPebq.d.ts → catalog-schemas-FjLRPtjB.d.ts} +10 -4
- package/dist/{chart-data-oIZQlFGi.d.ts → chart-data-B_k-WTex.d.ts} +7 -4
- package/dist/{chunk-PB7ME64J.js → chunk-244OPLAV.js} +1 -1
- package/dist/{chunk-IT7FQKED.js → chunk-2HX4BGAS.js} +6 -6
- package/dist/{chunk-2E6CDYL2.js → chunk-36DLVJGW.js} +19 -16
- package/dist/{chunk-XQO2CT6Q.js → chunk-3THGTDL2.js} +2 -2
- package/dist/{chunk-CLRYHWQN.js → chunk-42JBXJKW.js} +187 -25
- package/dist/chunk-BLCDUM7B.js +7 -0
- package/dist/{chunk-NVAJASOD.js → chunk-CJVKOJ6B.js} +10195 -2036
- package/dist/{chunk-XFHXQCXL.js → chunk-DQ7QYOUV.js} +99 -13
- package/dist/{chunk-NEJ32O7X.js → chunk-F6BXO4AI.js} +1 -1
- package/dist/{chunk-OXLA4HXQ.js → chunk-FAXO3SUE.js} +1196 -313
- package/dist/{chunk-J63CIRIV.js → chunk-FIQMAIZV.js} +4 -4
- package/dist/{chunk-PJSPHHRK.js → chunk-FK5XG742.js} +3 -16
- package/dist/{chunk-HKUV7NEN.js → chunk-HHVQ2SDT.js} +1 -1
- package/dist/{chunk-SZFO3MAJ.js → chunk-HUGVYHZ2.js} +4 -4
- package/dist/{chunk-LEF4X4KI.js → chunk-LCT5ZV3Q.js} +2400 -222
- package/dist/chunk-NLJFNCZ4.js +1560 -0
- package/dist/{chunk-GM7WFPGG.js → chunk-PRXZD2II.js} +6 -1
- package/dist/{chunk-YFJIIIOL.js → chunk-QGJVOPLG.js} +3 -3
- package/dist/{chunk-F7DN33UL.js → chunk-QGTJF7HV.js} +16 -14
- package/dist/{chunk-ONVFUVQ5.js → chunk-RUV7CCE6.js} +136 -31
- package/dist/{chunk-SW676APJ.js → chunk-U7TYSPYM.js} +2 -2
- package/dist/chunk-UJZN2ZH6.js +1 -0
- package/dist/chunk-VDZXNNZF.js +221 -0
- package/dist/{chunk-UJSAR6GF.js → chunk-W4DYDRV2.js} +21 -0
- package/dist/chunk-WCPDN7AY.js +642 -0
- package/dist/{chunk-BBVW5ZC2.js → chunk-WMFT5R7I.js} +2 -2
- package/dist/{chunk-AQEAZDL2.js → chunk-XJUMFH33.js} +2 -1
- package/dist/{composition-Ds6WHyO7.d.ts → composition-CvtvgBDE.d.ts} +2783 -873
- package/dist/composition.d.ts +4 -3
- package/dist/composition.js +3 -2
- package/dist/{conversion-CdzrTxib.d.ts → conversion-B_5AKTYQ.d.ts} +39 -10
- package/dist/conversion-CMBGOTAC.js +25 -0
- package/dist/convert.d.ts +5 -4
- package/dist/convert.js +17 -13
- package/dist/data.d.ts +2 -2
- package/dist/data.js +4 -3
- package/dist/{deck-report-CKDNQ2t4.d.ts → deck-report-BVlQZ42f.d.ts} +3 -3
- package/dist/deck.d.ts +7 -6
- package/dist/deck.js +13 -12
- package/dist/diagram-engine-eager.js +6 -2
- package/dist/diagram-engine-lazy.js +14 -1
- package/dist/diagram-plantuml-XRZ6VAOL.js +3 -0
- package/dist/diff.js +6 -5
- package/dist/docs.js +88 -52
- package/dist/examples.js +28745 -18393
- package/dist/font-policy.js +2 -2
- package/dist/format.js +3 -3
- package/dist/ids.js +6 -5
- package/dist/index.d.ts +19 -16
- package/dist/index.js +37 -26
- package/dist/markdown.d.ts +3 -2
- package/dist/markdown.js +10 -9
- package/dist/node-engine.d.ts +44 -11
- package/dist/node-engine.js +47 -28
- package/dist/{pagination-DRZ_JNFY.d.ts → pagination-CZQQYk7L.d.ts} +22 -4
- package/dist/pagination.d.ts +5 -4
- package/dist/pagination.js +6 -5
- package/dist/patch.js +5 -4
- package/dist/precompiled.js +3 -3
- package/dist/{presentation-DnD7mfmf.d.ts → presentation-s9262acV.d.ts} +1172 -208
- package/dist/repo-readme.js +2 -2
- package/dist/schema-engine-ajv.js +2 -2
- package/dist/schema-engine-precompiled.js +3 -3
- package/dist/schema.d.ts +3 -3
- package/dist/schema.js +5 -4
- package/dist/schemas.d.ts +56 -4
- package/dist/schemas.js +2 -2
- package/dist/shape-catalog.d.ts +98 -0
- package/dist/shape-catalog.js +302 -0
- package/dist/shape-engine-eager.js +9 -0
- package/dist/shape-engine-lazy.js +12 -0
- package/dist/shape-engine-module-N74FCHGY.js +3 -0
- package/dist/shape-geometry.d.ts +126 -0
- package/dist/shape-geometry.js +2 -0
- package/dist/source.d.ts +10 -5
- package/dist/source.js +12 -11
- package/dist/spec/README.md +1 -1
- 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 +10699 -0
- package/dist/spec/reference/preset-geometry.schema.json +126 -0
- package/dist/spec/schemas/catalog-index.schema.json +1 -0
- package/dist/spec/schemas/chart-type.schema.json +4 -4
- package/dist/spec/schemas/icon-set.schema.json +75 -0
- package/dist/spec/schemas/layout.schema.json +82 -23
- package/dist/spec/schemas/opf.schema.json +1616 -296
- package/dist/spec/schemas/theme.schema.json +11 -5
- package/dist/spec-files.d.ts +1 -1
- package/dist/spec-files.js +2 -2
- package/dist/symbol-font-encodings.js +1 -1
- package/dist/types.d.ts +83 -71
- package/dist/{validation-types-DxyYPebs.d.ts → validation-types-CYbsUuZ9.d.ts} +8 -5
- package/dist/validator.d.ts +35 -7
- package/dist/validator.js +5 -4
- package/dist/yaml.d.ts +3 -2
- package/dist/yaml.js +9 -8
- package/package.json +22 -6
- package/dist/catalog-refs-kAefsZWT.d.ts +0 -129
- package/dist/chunk-DGS47ONG.js +0 -1
- package/dist/conversion-5FUDQPED.js +0 -24
|
@@ -1,16 +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
|
+
import { ShapePathFill, CustomPathInput } from './shape-geometry.js';
|
|
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[];
|
|
3
76
|
|
|
4
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. */
|
|
5
79
|
interface TableBorder {
|
|
6
|
-
color
|
|
7
|
-
width
|
|
80
|
+
color?: unknown;
|
|
81
|
+
width?: number;
|
|
8
82
|
dash?: 'solid' | 'dash' | 'dot';
|
|
9
83
|
}
|
|
10
84
|
interface TableCellStyle {
|
|
11
85
|
fill?: string;
|
|
12
86
|
color?: string;
|
|
13
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`). */
|
|
14
89
|
align?: 'left' | 'center' | 'right';
|
|
15
90
|
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
16
91
|
padding?: Partial<Record<'top' | 'right' | 'bottom' | 'left', number>>;
|
|
@@ -90,6 +165,8 @@ declare function chartTextSize(geometry: {
|
|
|
90
165
|
scale: number;
|
|
91
166
|
minFontSize?: number;
|
|
92
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;
|
|
93
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). */
|
|
94
171
|
declare const CHART_LABELED_ZERO_SHARE = 0.75;
|
|
95
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). */
|
|
@@ -166,7 +243,7 @@ interface ChartAxisGeometry {
|
|
|
166
243
|
language?: string;
|
|
167
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). */
|
|
168
245
|
labeled?: boolean;
|
|
169
|
-
/** LH-110: values the axis must hold besides the data (
|
|
246
|
+
/** LH-110: values the axis must hold besides the data (explicit reference lines). */
|
|
170
247
|
include?: readonly number[];
|
|
171
248
|
}
|
|
172
249
|
/**
|
|
@@ -186,6 +263,11 @@ interface ChartAxisGeometry {
|
|
|
186
263
|
* the usual chart (a plot of ten tick labels or more) all of them give the same ten intervals.
|
|
187
264
|
*/
|
|
188
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;
|
|
189
271
|
/** LH-33: a chart whose value axis {@link shareSiblingChartAxes} may share: the chart object and the axis composition gave it. */
|
|
190
272
|
interface SiblingChart {
|
|
191
273
|
value: unknown;
|
|
@@ -203,6 +285,11 @@ interface SiblingChart {
|
|
|
203
285
|
* (LH-93 gives each one plot height, chart-plot.ts).
|
|
204
286
|
*/
|
|
205
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;
|
|
206
293
|
|
|
207
294
|
/** LH-105: what the slide title names: series (indices among the plotted series) or categories (row indices). */
|
|
208
295
|
interface ChartLayerFocus {
|
|
@@ -269,7 +356,7 @@ interface ChartLayerRows {
|
|
|
269
356
|
left: number;
|
|
270
357
|
right: number;
|
|
271
358
|
}
|
|
272
|
-
type Box$
|
|
359
|
+
type Box$a = {
|
|
273
360
|
x: number;
|
|
274
361
|
y: number;
|
|
275
362
|
width: number;
|
|
@@ -284,7 +371,7 @@ type Box$4 = {
|
|
|
284
371
|
*/
|
|
285
372
|
declare function alignBarRows(data: Extract<ResolvedChartData, {
|
|
286
373
|
ok: true;
|
|
287
|
-
}>, box: Box$
|
|
374
|
+
}>, box: Box$a, rows: readonly Box$a[], centers: readonly number[], options: {
|
|
288
375
|
scale: number;
|
|
289
376
|
minFontSize?: number;
|
|
290
377
|
header?: number;
|
|
@@ -293,7 +380,7 @@ declare function alignBarRows(data: Extract<ResolvedChartData, {
|
|
|
293
380
|
measure: (text: string, size: number) => number;
|
|
294
381
|
}): ChartLayerRows | undefined;
|
|
295
382
|
|
|
296
|
-
interface Box$
|
|
383
|
+
interface Box$9 {
|
|
297
384
|
x: number;
|
|
298
385
|
y: number;
|
|
299
386
|
width: number;
|
|
@@ -301,7 +388,7 @@ interface Box$3 {
|
|
|
301
388
|
}
|
|
302
389
|
/** The geometry a chart's plot is laid out with. Lengths are slide pixels. */
|
|
303
390
|
interface ChartPlotGeometry {
|
|
304
|
-
box: Box$
|
|
391
|
+
box: Box$9;
|
|
305
392
|
/** `min(slide width, slide height) / 720`. */
|
|
306
393
|
scale: number;
|
|
307
394
|
minFontSize?: number;
|
|
@@ -311,7 +398,7 @@ interface ChartPlotGeometry {
|
|
|
311
398
|
language?: string;
|
|
312
399
|
}
|
|
313
400
|
/**
|
|
314
|
-
* 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
|
|
315
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
|
|
316
403
|
* category axis title and the category labels (one line, two, or turned: core reproduces the preview's choice), right of the value
|
|
317
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
|
|
@@ -320,12 +407,13 @@ interface ChartPlotGeometry {
|
|
|
320
407
|
*/
|
|
321
408
|
declare function chartPlotInset(chart: unknown, resolved: ResolvedChartData, composed: {
|
|
322
409
|
valueAxis?: ChartValueAxis;
|
|
410
|
+
secondaryValueAxis?: ChartValueAxis;
|
|
323
411
|
layer?: ChartLayer;
|
|
324
412
|
}, geometry: ChartPlotGeometry): ChartPlotInset | undefined;
|
|
325
413
|
/** LH-93: a chart of a shared set: its object, its box and what composition gave it. */
|
|
326
414
|
interface SiblingPlotChart {
|
|
327
415
|
value: unknown;
|
|
328
|
-
box: Box$
|
|
416
|
+
box: Box$9;
|
|
329
417
|
chart?: {
|
|
330
418
|
valueAxis?: ChartValueAxis;
|
|
331
419
|
layer?: ChartLayer;
|
|
@@ -333,14 +421,83 @@ interface SiblingPlotChart {
|
|
|
333
421
|
}
|
|
334
422
|
/**
|
|
335
423
|
* LH-93: the charts of each shared set (`shareSiblingChartAxes`) get one plot height. Every member's plot is laid out on its own
|
|
336
|
-
* (chartPlotInset); members whose boxes overlap vertically stand side by side and share
|
|
337
|
-
* the set takes the shortest such plot height, each member's plot ending at its row's
|
|
338
|
-
*
|
|
339
|
-
*
|
|
424
|
+
* (chartPlotInset, or horizontalBarPlot for a horizontal bar chart); members whose boxes overlap vertically stand side by side and share
|
|
425
|
+
* their plots' lowest top and highest bottom, and the set takes the shortest such plot height, each member's plot ending at its row's
|
|
426
|
+
* baseline (a horizontal bar chart's at its row's top: its categories read from the top). A set of horizontal bar charts, whose value axis
|
|
427
|
+
* runs across, also shares one plot width: members whose boxes overlap horizontally stand one above another and start their plots at the
|
|
428
|
+
* same x (the widest category gutter among them), and every member's plot takes the set's narrowest width, so one value is one bar length
|
|
429
|
+
* on every chart. The result is written to the member's layer as `plot`. A set with a member that has no inset (a chart without a
|
|
430
|
+
* usable axis, a chart with options of its own) is left as it was. `geometryFor` gives a member's scale, text floor, measure, direction
|
|
431
|
+
* and language; `document` resolves dataset references.
|
|
340
432
|
*/
|
|
341
433
|
declare function shareSiblingPlots(sets: readonly (readonly SiblingPlotChart[])[], geometryFor: (item: SiblingPlotChart) => Omit<ChartPlotGeometry, 'box'>, document?: unknown): void;
|
|
342
434
|
|
|
343
|
-
|
|
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 {
|
|
344
501
|
x: number;
|
|
345
502
|
y: number;
|
|
346
503
|
width: number;
|
|
@@ -365,8 +522,13 @@ interface ChartLayerWaterfall {
|
|
|
365
522
|
* "2024 profit"), and takes the total's role too.
|
|
366
523
|
*/
|
|
367
524
|
declare function waterfallRoles(values: readonly (number | null)[]): (WaterfallRole | null)[];
|
|
368
|
-
/**
|
|
369
|
-
|
|
525
|
+
/**
|
|
526
|
+
* LH-107: a waterfall bar's default label: a total as its value, a step signed (+9.3, −7.4 with U+2212), in the column's format. LH-153: with
|
|
527
|
+
* `group` (the column has no format and groups its thousands, `columnGroups`) a whole number of four digits or more is grouped by the language.
|
|
528
|
+
*/
|
|
529
|
+
declare function waterfallLabelText(value: number, format: string | undefined, role: WaterfallRole | null, group?: {
|
|
530
|
+
language?: string;
|
|
531
|
+
}, language?: string | undefined): string;
|
|
370
532
|
/**
|
|
371
533
|
* LH-107: the number format a native waterfall label shows a step with: the column's format (its first section; General without one)
|
|
372
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.
|
|
@@ -392,7 +554,7 @@ interface ChartValueListRow {
|
|
|
392
554
|
name: string;
|
|
393
555
|
value: string;
|
|
394
556
|
bold?: boolean;
|
|
395
|
-
box: Box$
|
|
557
|
+
box: Box$7;
|
|
396
558
|
}
|
|
397
559
|
/**
|
|
398
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
|
|
@@ -403,24 +565,24 @@ interface ChartValueListHole {
|
|
|
403
565
|
row: number;
|
|
404
566
|
value: {
|
|
405
567
|
text: string;
|
|
406
|
-
box: Box$
|
|
568
|
+
box: Box$7; /** The text size in slide pixels. */
|
|
407
569
|
size: number;
|
|
408
570
|
};
|
|
409
571
|
name?: {
|
|
410
572
|
text: string;
|
|
411
|
-
box: Box$
|
|
573
|
+
box: Box$7;
|
|
412
574
|
};
|
|
413
575
|
}
|
|
414
576
|
/** LH-108: the value list beside a pie or one-series doughnut. Boxes are slide pixels. */
|
|
415
577
|
interface ChartLayerValueList {
|
|
416
578
|
/** The square the pie (or doughnut) fills. */
|
|
417
|
-
pie: Box$
|
|
579
|
+
pie: Box$7;
|
|
418
580
|
/** LH-125: the focused slice's value in a doughnut's hole. */
|
|
419
581
|
hole?: ChartValueListHole;
|
|
420
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. */
|
|
421
583
|
header?: {
|
|
422
584
|
text: string;
|
|
423
|
-
box: Box$
|
|
585
|
+
box: Box$7;
|
|
424
586
|
};
|
|
425
587
|
rows: ChartValueListRow[];
|
|
426
588
|
/** The swatch side and the space after it. */
|
|
@@ -440,12 +602,31 @@ declare function chartValueList(chart: unknown, data: ResolvedChartData, geometr
|
|
|
440
602
|
focus?: ChartLayerFocus;
|
|
441
603
|
slices?: ChartLayerSlices;
|
|
442
604
|
}): ChartLayerValueList | undefined;
|
|
605
|
+
/** LH-182: a doughnut's square and its hole, in slide pixels. */
|
|
606
|
+
interface ChartLayerDoughnut {
|
|
607
|
+
/** The square the doughnut fills (its outer diameter): the preview draws it there and the PPTX export pins the plot area to it. */
|
|
608
|
+
pie: Box$7;
|
|
609
|
+
/** The hole, half the doughnut's radius (`c:holeSize` 50), which both engines fill with the surface the chart stands on. */
|
|
610
|
+
hole: {
|
|
611
|
+
cx: number;
|
|
612
|
+
cy: number;
|
|
613
|
+
r: number;
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
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
|
|
618
|
+
* be filled with the surface the chart stands on (`surface`): a deck watermark or a background motif behind the chart otherwise shows
|
|
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.
|
|
622
|
+
*/
|
|
623
|
+
declare function chartDoughnut(chart: unknown, data: ResolvedChartData, geometry: ChartLayerGeometry, layer: ChartLayer | undefined): ChartLayerDoughnut | undefined;
|
|
443
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. */
|
|
444
625
|
interface ChartStackName {
|
|
445
626
|
series: number;
|
|
446
627
|
name: string;
|
|
447
628
|
bold?: boolean;
|
|
448
|
-
box: Box$
|
|
629
|
+
box: Box$7;
|
|
449
630
|
}
|
|
450
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. */
|
|
451
632
|
interface ChartStackEnd {
|
|
@@ -453,7 +634,7 @@ interface ChartStackEnd {
|
|
|
453
634
|
row: number;
|
|
454
635
|
text: string;
|
|
455
636
|
align: 'left' | 'right';
|
|
456
|
-
box: Box$
|
|
637
|
+
box: Box$7;
|
|
457
638
|
}
|
|
458
639
|
/** LH-109: how a stacked column, bar or area chart labels itself. */
|
|
459
640
|
interface ChartLayerStack {
|
|
@@ -491,7 +672,7 @@ interface ChartLayerStack {
|
|
|
491
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
|
|
492
673
|
* moved more than a line from its segment fails, and the chart keeps its legend.
|
|
493
674
|
*/
|
|
494
|
-
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: {
|
|
495
676
|
left: number;
|
|
496
677
|
top: number;
|
|
497
678
|
right: number;
|
|
@@ -499,6 +680,13 @@ declare function placeStackNames(chart: unknown, data: ResolvedChartData, axis:
|
|
|
499
680
|
}, geometry: Omit<ChartPlotGeometry, 'box'> & {
|
|
500
681
|
bold?: (text: string, size: number) => number;
|
|
501
682
|
}, relaxed?: boolean, focus?: readonly number[], edge?: boolean): ChartStackName[] | undefined;
|
|
683
|
+
/**
|
|
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
|
|
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
|
|
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
|
|
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).
|
|
688
|
+
*/
|
|
689
|
+
declare function horizontalBarPlot(chart: unknown, data: ResolvedChartData, layer: ChartLayer | undefined, axis: ChartValueAxis, box: Box$7, geometry: Omit<ChartPlotGeometry, 'box'>): ChartPlotInset | undefined;
|
|
502
690
|
/**
|
|
503
691
|
* LH-109, LH-125: the stacked-chart layer and value axis, or undefined for another chart.
|
|
504
692
|
*
|
|
@@ -518,79 +706,138 @@ declare function chartStack(chart: unknown, data: ResolvedChartData, layer: Char
|
|
|
518
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
|
|
519
707
|
* gutter and value labels the preview leaves). Any other layer is returned with its `rows`.
|
|
520
708
|
*/
|
|
521
|
-
declare function restackForRows(chart: unknown, data: ResolvedChartData, layer: ChartLayer, rows: ChartLayerRows, box: Box$
|
|
522
|
-
|
|
523
|
-
interface ChartReferenceLine {
|
|
524
|
-
value: number;
|
|
525
|
-
text: string;
|
|
526
|
-
y: number;
|
|
527
|
-
x1: number;
|
|
528
|
-
x2: number;
|
|
529
|
-
label: Box$2;
|
|
530
|
-
}
|
|
531
|
-
/** LH-110: the shaded band of the period (category) the title names. Slide pixels. */
|
|
532
|
-
interface ChartReferenceBand {
|
|
533
|
-
row: number;
|
|
534
|
-
box: Box$2;
|
|
535
|
-
}
|
|
536
|
-
/** LH-110: the reference marks of a chart. */
|
|
537
|
-
interface ChartLayerReferences {
|
|
538
|
-
lines: ChartReferenceLine[];
|
|
539
|
-
bands: ChartReferenceBand[];
|
|
540
|
-
}
|
|
541
|
-
/**
|
|
542
|
-
* LH-110: what the slide title (and subtitle) `text` names for reference marks, or undefined: `lines`, the numbers it compares the data
|
|
543
|
-
* with (an English comparison right before the number, as `COMPARISON` lists) that no plotted value equals at the precision written, of
|
|
544
|
-
* 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
|
|
545
|
-
* category it names after a time preposition ("in 2023", "since March") on a line or area chart whose categories run in time. Column,
|
|
546
|
-
* line and area charts (not stacked) take lines; line and area charts take bands. English titles only; `highlight` keeps the chart as
|
|
547
|
-
* authored.
|
|
548
|
-
*/
|
|
549
|
-
declare function chartTitleReferences(chart: unknown, data: ResolvedChartData, options?: {
|
|
550
|
-
text?: string;
|
|
551
|
-
language?: string;
|
|
552
|
-
}): {
|
|
553
|
-
lines: {
|
|
554
|
-
value: number;
|
|
555
|
-
text: string;
|
|
556
|
-
}[];
|
|
557
|
-
rows: number[];
|
|
558
|
-
} | undefined;
|
|
559
|
-
/**
|
|
560
|
-
* 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
|
|
561
|
-
* 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
|
|
562
|
-
* width over the plot's height. The value axis must hold every line's value (composition widens it).
|
|
563
|
-
*/
|
|
564
|
-
declare function placeReferences(refs: {
|
|
565
|
-
lines: readonly {
|
|
566
|
-
value: number;
|
|
567
|
-
text: string;
|
|
568
|
-
}[];
|
|
569
|
-
rows: readonly number[];
|
|
570
|
-
}, data: ResolvedChartData, axis: ChartValueAxis, box: Box$2, plotInset: {
|
|
571
|
-
left: number;
|
|
572
|
-
top: number;
|
|
573
|
-
right: number;
|
|
574
|
-
bottom: number;
|
|
575
|
-
}, geometry: Omit<ChartPlotGeometry, 'box'> & {
|
|
576
|
-
bold?: (text: string, size: number) => number;
|
|
577
|
-
}): 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
|
+
|
|
578
711
|
/** A composed chart item, as composition hands it to {@link refreshChartMarks}. */
|
|
579
712
|
interface ComposedChartItem$1 {
|
|
580
713
|
value: unknown;
|
|
581
|
-
box: Box$
|
|
714
|
+
box: Box$7;
|
|
582
715
|
chart?: {
|
|
583
716
|
valueAxis?: ChartValueAxis;
|
|
717
|
+
secondaryValueAxis?: ChartValueAxis;
|
|
584
718
|
layer?: ChartLayer;
|
|
585
719
|
};
|
|
586
720
|
}
|
|
587
721
|
/**
|
|
588
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
|
|
589
|
-
* 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.
|
|
590
725
|
*/
|
|
591
726
|
declare function refreshChartMarks(items: readonly ComposedChartItem$1[], geometryFor: (item: ComposedChartItem$1) => Omit<ChartPlotGeometry, 'box'> & {
|
|
592
727
|
bold?: (text: string, size: number) => number;
|
|
593
|
-
}, document?: unknown):
|
|
728
|
+
}, document?: unknown): boolean;
|
|
729
|
+
|
|
730
|
+
/** Each bin of a binned histogram gets this many chart text sizes of plot width, so its rotated label reads beside its neighbors. */
|
|
731
|
+
declare const HISTOGRAM_LABEL_SLOT = 1.8;
|
|
732
|
+
/** A histogram never draws fewer bins than this because of its label slots (a very small chart keeps a readable shape). */
|
|
733
|
+
declare const HISTOGRAM_MIN_BINS = 5;
|
|
734
|
+
/** One bin of a histogram of a lone value column. */
|
|
735
|
+
interface HistogramBin {
|
|
736
|
+
low: number;
|
|
737
|
+
high: number;
|
|
738
|
+
count: number;
|
|
739
|
+
label: string;
|
|
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
|
+
};
|
|
749
|
+
/** LH-160: what composition decides for a histogram or Pareto chart. Absent keys keep the engines' defaults. */
|
|
750
|
+
interface ChartLayerHistogram {
|
|
751
|
+
/** The bin count of a lone value column (`cx:binCount`): Scott's count, or fewer when the labels would not fit. */
|
|
752
|
+
bins?: number;
|
|
753
|
+
/** The decimals of the bin edges in the labels and the category axis format (`0`, `0.0`, ...). */
|
|
754
|
+
decimals?: number;
|
|
755
|
+
/** False when the chart's data labels do not fit beside each other: neither engine draws them. */
|
|
756
|
+
valueLabels?: false;
|
|
757
|
+
/** RR-105: the value axis both engines draw (the preview's scale; the chartex `cx:valScaling` min, max and majorUnit). */
|
|
758
|
+
valueAxis?: ChartValueAxis;
|
|
759
|
+
/** RR-105: a Pareto chart's percentage axis step (0 to 100%), the preview's ticks and the chartex secondary axis `majorUnit`. */
|
|
760
|
+
percentUnit?: number;
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* Office's automatic histogram bins: Scott's normal reference rule gives the bin width 3.49 * sd * n^(-1/3) (sample standard deviation)
|
|
764
|
+
* over [min, max]; the exporter writes the same count as cx:binCount.
|
|
765
|
+
*/
|
|
766
|
+
declare function scottBinCount(values: readonly number[]): number;
|
|
767
|
+
/**
|
|
768
|
+
* The decimals a bin edge is written with: the fewest that put every rounded edge within a tenth of the bin width of the true one (a
|
|
769
|
+
* 6-wide bin reads whole numbers, a 3.7-wide one tenths, a 0.37-wide one hundredths). Without the `edges` the width alone gives the
|
|
770
|
+
* decimals that hold for any edges; with them, edges that already are whole numbers (bins of 1 to 9 over whole-number data) need none.
|
|
771
|
+
*/
|
|
772
|
+
declare function histogramEdgeDecimals(width: number, edges?: readonly number[]): number;
|
|
773
|
+
/**
|
|
774
|
+
* RR-105: an edge written with `decimals` decimals as PowerPoint writes it under the format `0.0...`: the number's decimal value (15
|
|
775
|
+
* significant digits, so 1.2 + 1.85 is 3.05 and not 3.0499999999999998) rounded half away from zero. `toFixed` rounds the binary value
|
|
776
|
+
* and wrote 3.0 where PowerPoint shows 3.1 (v0.33 PowerPoint qualification).
|
|
777
|
+
*/
|
|
778
|
+
declare function histogramEdgeText(value: number, decimals: number): string;
|
|
779
|
+
/** The Excel number format of edges written with `decimals` decimals (the category axis format PowerPoint applies to its bin labels). */
|
|
780
|
+
declare const histogramEdgeFormat: (decimals: number) => string;
|
|
781
|
+
/**
|
|
782
|
+
* Equal-width bins from the minimum, closed on the right like PowerPoint's ("[min, e1]", then "(e1, e2]"): each value falls in the last bin
|
|
783
|
+
* whose upper edge it does not exceed. `count` is Scott's count unless given. Labels carry `decimals` decimals when given, else six
|
|
784
|
+
* significant digits, and more when two bins would read alike.
|
|
785
|
+
*/
|
|
786
|
+
declare function histogramBins(values: readonly (number | null)[], options?: {
|
|
787
|
+
count?: number;
|
|
788
|
+
decimals?: number;
|
|
789
|
+
}): HistogramBin[];
|
|
790
|
+
/**
|
|
791
|
+
* LH-160: the layer of a histogram or Pareto chart, or undefined for any other chart or one that needs nothing decided. `chart` is the
|
|
792
|
+
* drawn chart (core `chartDrawPlan`'s type). The plot is estimated from the chart box the way the preview lays it out: the padding, the
|
|
793
|
+
* widest value tick, the half text size at the end, and a Pareto chart's percentage axis.
|
|
794
|
+
*/
|
|
795
|
+
declare function chartHistogram(chart: unknown, data: ResolvedChartData, geometry: ChartLayerGeometry): ChartLayerHistogram | undefined;
|
|
796
|
+
|
|
797
|
+
interface ChartNumericAxes {
|
|
798
|
+
value: ChartValueAxis;
|
|
799
|
+
/** A scatter chart's horizontal numeric axis (PowerPoint calls it the category axis). */
|
|
800
|
+
category?: ChartValueAxis;
|
|
801
|
+
}
|
|
802
|
+
/** The same chart-text size, padding, legend and axis-title bands the preview reserves. */
|
|
803
|
+
declare function chartNumericAxes(chart: unknown, data: ResolvedChartData, geometry: ChartLayerGeometry, layer?: ChartLayer): ChartNumericAxes | undefined;
|
|
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;
|
|
594
841
|
|
|
595
842
|
/** A small chart has at most this many series (LH-03). */
|
|
596
843
|
declare const SMALL_CHART_MAX_SERIES = 2;
|
|
@@ -603,7 +850,7 @@ declare const SMALL_CHART_MAX_POINTS = 16;
|
|
|
603
850
|
declare const CHART_HEADER_MAX_LEGEND = 4;
|
|
604
851
|
/** LH-143: a legend wider than the header row wraps onto at most this many rows before the chart keeps its side legend. */
|
|
605
852
|
declare const CHART_HEADER_LEGEND_ROWS = 2;
|
|
606
|
-
interface Box$
|
|
853
|
+
interface Box$5 {
|
|
607
854
|
x: number;
|
|
608
855
|
y: number;
|
|
609
856
|
width: number;
|
|
@@ -625,18 +872,18 @@ interface ChartHeaderLegendEntry {
|
|
|
625
872
|
name: string;
|
|
626
873
|
/** `line`: a line key (with a marker on a line chart with markers and on a combo line series); otherwise a square swatch. */
|
|
627
874
|
key?: 'line';
|
|
628
|
-
box: Box$
|
|
875
|
+
box: Box$5;
|
|
629
876
|
}
|
|
630
877
|
/** LH-81: the header row above the plot. Boxes are slide pixels. */
|
|
631
878
|
interface ChartLayerHeader {
|
|
632
879
|
/** The caption and its box (one line, at the start of the first row); absent when the payload has its own caption. */
|
|
633
880
|
caption?: {
|
|
634
881
|
text: string;
|
|
635
|
-
box: Box$
|
|
882
|
+
box: Box$5;
|
|
636
883
|
};
|
|
637
884
|
/** The legend in the header row; absent for one series, for more than four, or when the entries do not fit one row. */
|
|
638
885
|
legend?: {
|
|
639
|
-
box: Box$
|
|
886
|
+
box: Box$5;
|
|
640
887
|
entries: ChartHeaderLegendEntry[];
|
|
641
888
|
};
|
|
642
889
|
/** The band the header takes from the top of the chart box: the padding and one or two rows. The plot is laid out below it. */
|
|
@@ -664,6 +911,8 @@ interface ChartPlotInset {
|
|
|
664
911
|
}
|
|
665
912
|
/** What composition decides for a chart beyond its value axis (LH-03, LH-81, LH-92, LH-93). */
|
|
666
913
|
interface ChartLayer {
|
|
914
|
+
/** RR-105: scatter X/Y and box-and-whisker axes, also written into native PPTX. */
|
|
915
|
+
numericAxes?: ChartNumericAxes;
|
|
667
916
|
small?: ChartLayerSmall;
|
|
668
917
|
header?: ChartLayerHeader;
|
|
669
918
|
/** LH-92: a doughnut of two or more rings names each ring on one of its slices. */
|
|
@@ -691,10 +940,16 @@ interface ChartLayer {
|
|
|
691
940
|
waterfall?: ChartLayerWaterfall;
|
|
692
941
|
/** LH-108: a pie or one-series doughnut lists its categories and values beside it (chart-marks.ts). */
|
|
693
942
|
valueList?: ChartLayerValueList;
|
|
943
|
+
/** LH-182: a doughnut's square and its hole, which both engines fill with the surface (chart-marks.ts). */
|
|
944
|
+
doughnut?: ChartLayerDoughnut;
|
|
694
945
|
/** LH-109: a stacked column or area chart's values inside its segments and series names beside its last column (chart-marks.ts). */
|
|
695
946
|
stack?: ChartLayerStack;
|
|
696
|
-
/**
|
|
947
|
+
/** Explicit numeric references and their independent authored strokes (chart-references.ts). */
|
|
697
948
|
references?: ChartLayerReferences;
|
|
949
|
+
/** LH-160: a histogram's bin count and edge decimals, and whether its data labels fit (chart-histogram.ts). */
|
|
950
|
+
histogram?: ChartLayerHistogram;
|
|
951
|
+
/** RR-105: a radar's legend placement and value axis (chart-radar.ts). */
|
|
952
|
+
radar?: ChartLayerRadar;
|
|
698
953
|
}
|
|
699
954
|
/** LH-105: one series name at the end of its line. Lengths are slide pixels. */
|
|
700
955
|
interface ChartEndLabel {
|
|
@@ -713,7 +968,7 @@ interface ChartEndLabel {
|
|
|
713
968
|
/** True for a series the title names (ChartLayer.focus): its label is bold. */
|
|
714
969
|
bold?: boolean;
|
|
715
970
|
/** The label's box: beside the point (after it, before it right to left), moved up or down only to keep clear of the other names. */
|
|
716
|
-
box: Box$
|
|
971
|
+
box: Box$5;
|
|
717
972
|
}
|
|
718
973
|
/** LH-105: the names at the line ends and the gutter the plot leaves for them at its end (slide pixels). */
|
|
719
974
|
interface ChartLayerEndLabels {
|
|
@@ -731,7 +986,7 @@ interface ChartLayerSlices {
|
|
|
731
986
|
}
|
|
732
987
|
/** The geometry and text a chart layer is decided with. Lengths are slide pixels. */
|
|
733
988
|
interface ChartLayerGeometry {
|
|
734
|
-
box: Box$
|
|
989
|
+
box: Box$5;
|
|
735
990
|
/** `min(slide width, slide height) / 720`. */
|
|
736
991
|
scale: number;
|
|
737
992
|
minFontSize?: number;
|
|
@@ -772,6 +1027,37 @@ declare function smallChart(chart: unknown, data: ResolvedChartData, geometry?:
|
|
|
772
1027
|
declare function chartHeader(chart: unknown, data: ResolvedChartData, geometry: ChartLayerGeometry, options?: {
|
|
773
1028
|
legend?: boolean;
|
|
774
1029
|
}): ChartLayerHeader | undefined;
|
|
1030
|
+
/**
|
|
1031
|
+
* LH-176: the gap between two categories' bars, as a percent of one bar's width (DrawingML `c:gapWidth`): 150 for clustered bars and
|
|
1032
|
+
* columns, 50 for stacked and 100% stacked ones. Their series overlap 0 (clustered: side by side) or 100 (stacked: on one another)
|
|
1033
|
+
* (`c:overlap`). The PPTX export writes these values and the preview draws its bars from {@link chartBarGeometry}, so both agree.
|
|
1034
|
+
*/
|
|
1035
|
+
declare const CHART_BAR_GAP_WIDTH: Readonly<{
|
|
1036
|
+
clustered: 150;
|
|
1037
|
+
stacked: 50;
|
|
1038
|
+
}>;
|
|
1039
|
+
/** The bars of one category band: each bar's width, the bars together, the offset of the first bar, and whether series sit side by side. */
|
|
1040
|
+
interface ChartBarGeometry {
|
|
1041
|
+
/** The width of one bar (a column's width, a horizontal bar's height). */
|
|
1042
|
+
width: number;
|
|
1043
|
+
/** The width of the category's bars together: the series' bars side by side, or one stacked bar. */
|
|
1044
|
+
group: number;
|
|
1045
|
+
/** From the band's start to its first bar: half the gap. */
|
|
1046
|
+
offset: number;
|
|
1047
|
+
clustered: boolean;
|
|
1048
|
+
}
|
|
1049
|
+
/**
|
|
1050
|
+
* LH-176: where the bars of one category sit in its `band` (the plot length over the category count), as PowerPoint lays out
|
|
1051
|
+
* {@link CHART_BAR_GAP_WIDTH}: a clustered band holds `seriesCount` bars side by side and a gap of 1.5 bar widths
|
|
1052
|
+
* (`width = band / (seriesCount + 1.5)`), a stacked band one bar and a gap of half its width (`width = band / 1.5`). The gap is split
|
|
1053
|
+
* evenly before and after the bars.
|
|
1054
|
+
*/
|
|
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;
|
|
775
1061
|
/**
|
|
776
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
|
|
777
1063
|
* (a small chart's value labels, a horizontal stacked bar chart's segment values). Both engines read this one answer.
|
|
@@ -803,13 +1089,21 @@ type DesignHintKey = typeof DESIGN_HINT_KEYS[number];
|
|
|
803
1089
|
declare const THEME_DESIGN_KEYS: readonly ["titleAlignment", "contentAlignment", "contentBox", "contentDirection", "imageFit", "listBullet", "listStyle"];
|
|
804
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. */
|
|
805
1091
|
type DesignHintSource = 'slide' | 'deck' | 'theme' | 'layout';
|
|
806
|
-
/**
|
|
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. */
|
|
807
1101
|
interface DesignHints {
|
|
808
|
-
titleAlignment?:
|
|
809
|
-
contentAlignment?:
|
|
1102
|
+
titleAlignment?: DesignAlignment;
|
|
1103
|
+
contentAlignment?: DesignAlignment;
|
|
810
1104
|
contentBox?: boolean;
|
|
811
1105
|
contentDirection?: 'horizontal' | 'vertical';
|
|
812
|
-
chartPrimary?: 'none' | 'top' | 'bottom' | '
|
|
1106
|
+
chartPrimary?: 'none' | 'top' | 'bottom' | 'start' | 'end';
|
|
813
1107
|
imageFit?: 'cover' | 'contain' | 'stretch' | 'auto';
|
|
814
1108
|
listBullet?: 'character' | 'image' | 'none';
|
|
815
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). */
|
|
@@ -851,6 +1145,295 @@ interface ResolveDesignHintsOptions {
|
|
|
851
1145
|
*/
|
|
852
1146
|
declare function resolveDesignHints(options?: ResolveDesignHintsOptions): ResolvedDesignHints;
|
|
853
1147
|
|
|
1148
|
+
/**
|
|
1149
|
+
* SH-09: the pyramid and matrix arrangements of a layout region (`arrangement: "pyramid" | "matrix"` on a layout record's region).
|
|
1150
|
+
*
|
|
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.
|
|
1168
|
+
*/
|
|
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;
|
|
1247
|
+
/**
|
|
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
|
+
|
|
854
1437
|
/**
|
|
855
1438
|
* OPF layout templates (`opf-layout/v2`, FA-33): a layout record is one ordered list of regions, nested for two
|
|
856
1439
|
* dimensions. `direction` says whether the record's `regions` are placed side by side (`row`) or stacked (`column`); an
|
|
@@ -862,7 +1445,7 @@ declare function resolveDesignHints(options?: ResolveDesignHintsOptions): Resolv
|
|
|
862
1445
|
* A record is a template when it has `regions`.
|
|
863
1446
|
*/
|
|
864
1447
|
/** The content kinds a region can accept: the body content kinds and `group` for a content group. */
|
|
865
|
-
declare const REGION_KINDS: readonly ["text", "list", "image", "video", "chart", "table", "code", "metric", "quote", "timeline", "diagram", "group"];
|
|
1448
|
+
declare const REGION_KINDS: readonly ["text", "list", "image", "video", "chart", "table", "code", "metric", "quote", "timeline", "diagram", "shape", "group"];
|
|
866
1449
|
type RegionKind = typeof REGION_KINDS[number];
|
|
867
1450
|
/** Which content a region wants first (content binding, step 2). */
|
|
868
1451
|
declare const REGION_ROLES: readonly ["primary", "secondary", "media", "supporting"];
|
|
@@ -878,7 +1461,7 @@ declare const HEADING_AREAS: readonly ["title", "subtitle"];
|
|
|
878
1461
|
* Names a body region may not take: the heading words, `auto`, and the six promoted-region words, so `region=` in the
|
|
879
1462
|
* Markdown dialect stays unambiguous. `title` and `subtitle` name the heading regions.
|
|
880
1463
|
*/
|
|
881
|
-
declare const RESERVED_REGION_NAMES: readonly ["title", "subtitle", "tag", "auto", "
|
|
1464
|
+
declare const RESERVED_REGION_NAMES: readonly ["title", "subtitle", "tag", "auto", "start", "center", "end", "top", "middle", "bottom"];
|
|
882
1465
|
/** The compiled grid has at most this many rows and this many columns. */
|
|
883
1466
|
declare const MAX_TEMPLATE_TRACKS = 12;
|
|
884
1467
|
/** A list of regions (the record's, or a split's) holds at most this many entries. */
|
|
@@ -907,6 +1490,15 @@ interface LayoutRegion {
|
|
|
907
1490
|
* list draws its entries beside badges, numbered or not (an unnumbered one is counted as drawing only). Absent: the region's content draws as any other.
|
|
908
1491
|
*/
|
|
909
1492
|
sequence?: 'steps' | 'numbered';
|
|
1493
|
+
/**
|
|
1494
|
+
* SH-09: the region draws its lone list of one level as a diagram: `pyramid` (stacked levels, the first entry at the apex) or `matrix`
|
|
1495
|
+
* (four quadrants; another count draws a grid of cards), in PowerPoint's geometry or OPF's own (composition.ts). SH-18: `cycle` (the
|
|
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
|
|
1497
|
+
* boxes with arrows between them) or `vertical-flow` (a column of them). Absent: a list.
|
|
1498
|
+
*/
|
|
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';
|
|
910
1502
|
anchor: RegionAnchor;
|
|
911
1503
|
empty: 'collapse' | 'keep';
|
|
912
1504
|
}
|
|
@@ -1209,7 +1801,7 @@ interface ScriptFontSupplement {
|
|
|
1209
1801
|
interface ResolveScriptFontsOptions extends CatalogOptions {
|
|
1210
1802
|
/** Which language font default applies. Defaults to `powerpoint` (`language.fontScheme`, else the vocabulary default); `google-slides` prefers `language.googleFontScheme`. */
|
|
1211
1803
|
app?: ScriptFontApp;
|
|
1212
|
-
/**
|
|
1804
|
+
/** Resolve this slide's language and merge its design over the deck design before resolving the font scheme. */
|
|
1213
1805
|
slideIndex?: number;
|
|
1214
1806
|
/** Language to resolve instead of the document's `language` (a BCP-47 tag or a Language object). */
|
|
1215
1807
|
language?: unknown;
|
|
@@ -1312,13 +1904,13 @@ declare function unbindNoBreak(text: string): string;
|
|
|
1312
1904
|
* draw, compiled from spec/reference/engine-defaults.json and spec/reference/engine-vocabularies.json. None of
|
|
1313
1905
|
* this is catalog data: a document never references these records, and no catalog lookup reaches them.
|
|
1314
1906
|
*/
|
|
1315
|
-
type Rec = Readonly<Record<string, unknown>>;
|
|
1907
|
+
type Rec$1 = Readonly<Record<string, unknown>>;
|
|
1316
1908
|
/** The drawing fields of the theme engines use when a document names none, or its theme resolves nowhere. */
|
|
1317
|
-
declare const ENGINE_DEFAULT_THEME: Rec;
|
|
1909
|
+
declare const ENGINE_DEFAULT_THEME: Rec$1;
|
|
1318
1910
|
/** The twelve slots engines use when neither the design nor the theme names a resolvable colour scheme. */
|
|
1319
|
-
declare const ENGINE_DEFAULT_COLOR_SCHEME: Rec;
|
|
1911
|
+
declare const ENGINE_DEFAULT_COLOR_SCHEME: Rec$1;
|
|
1320
1912
|
/** The font pair engines use when neither the design nor the theme names a resolvable font scheme. */
|
|
1321
|
-
declare const ENGINE_DEFAULT_FONT_SCHEME: Rec;
|
|
1913
|
+
declare const ENGINE_DEFAULT_FONT_SCHEME: Rec$1;
|
|
1322
1914
|
/** Chart types in the order an engine offers them when it must pick one. */
|
|
1323
1915
|
declare const ENGINE_DEFAULT_CHART_TYPES: readonly string[];
|
|
1324
1916
|
/** Every `chart.type` value: an engine vocabulary, validated directly. */
|
|
@@ -1344,6 +1936,8 @@ interface LanguageVocabulary {
|
|
|
1344
1936
|
readonly direction: 'ltr' | 'rtl';
|
|
1345
1937
|
/** Curated OOXML culture tag (`ja-JP` for `ja`). */
|
|
1346
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>>;
|
|
1347
1941
|
/** Default script fonts (major/minor) per target application. */
|
|
1348
1942
|
readonly fonts: {
|
|
1349
1943
|
readonly powerpoint: {
|
|
@@ -1385,13 +1979,6 @@ declare function isolateNumbers(text: string): string;
|
|
|
1385
1979
|
*/
|
|
1386
1980
|
declare function numericText(text: string): boolean;
|
|
1387
1981
|
|
|
1388
|
-
/**
|
|
1389
|
-
* Numbered lists: the `numbering` field of `items` and `bullets` payloads.
|
|
1390
|
-
*
|
|
1391
|
-
* Pure helpers shared by composition (marker text and hanging indent), the validator, pagination and the
|
|
1392
|
-
* exporters, so the preview and the native PowerPoint export number every entry identically. Nothing here
|
|
1393
|
-
* measures text or reads a document beyond the items it is given.
|
|
1394
|
-
*/
|
|
1395
1982
|
/** The five number styles OPF supports; each maps to a native PowerPoint auto-number scheme. */
|
|
1396
1983
|
declare const NUMBERING_STYLES: readonly ["arabic", "roman-upper", "roman-lower", "alpha-upper", "alpha-lower"];
|
|
1397
1984
|
type NumberingStyleName = typeof NUMBERING_STYLES[number];
|
|
@@ -1443,7 +2030,7 @@ declare function formatListNumber(value: number, style?: NumberingStyleName, suf
|
|
|
1443
2030
|
* LH-07: the number of a list entry without its suffix (`4`, `iv`, `C`): the numeral a step badge draws, since the circle
|
|
1444
2031
|
* already sets it apart from the text.
|
|
1445
2032
|
*/
|
|
1446
|
-
declare function listNumberLabel(number: Pick<ListNumber, 'value' | 'style'
|
|
2033
|
+
declare function listNumberLabel(number: Pick<ListNumber, 'value' | 'style'>, language?: string): string;
|
|
1447
2034
|
/** The number of one list entry. */
|
|
1448
2035
|
interface ListNumber {
|
|
1449
2036
|
/** Position of the entry in the list. */
|
|
@@ -1578,9 +2165,12 @@ interface ComposedScrim {
|
|
|
1578
2165
|
color: string;
|
|
1579
2166
|
/** Opacity under the text, 0 to 1 in hundredths: the lowest at which the text reads at `target` over every possible pixel. */
|
|
1580
2167
|
opacity: number;
|
|
1581
|
-
/**
|
|
1582
|
-
|
|
1583
|
-
|
|
2168
|
+
/**
|
|
2169
|
+
* `gradient`: solid from `edge` to past the text, then fading out; `band`: solid across the text, fading out on both sides; `panel`
|
|
2170
|
+
* (LH-158): a solid column at `edge`, the full slide height, that the heading group sits on (SlideComposition.pictureText).
|
|
2171
|
+
*/
|
|
2172
|
+
form: 'gradient' | 'band' | 'panel';
|
|
2173
|
+
/** The slide edge a gradient or panel starts from (physical, so already mirrored in a right-to-left deck). Absent for a band. */
|
|
1584
2174
|
edge?: ScrimEdge;
|
|
1585
2175
|
/** The rectangle drawn: the full slide width (top, bottom and band) or height (left and right), clipped to the slide. */
|
|
1586
2176
|
box: ScrimBox;
|
|
@@ -1612,6 +2202,22 @@ interface PictureLuminance {
|
|
|
1612
2202
|
rows: number;
|
|
1613
2203
|
values: ArrayLike<number>;
|
|
1614
2204
|
high?: ArrayLike<number>;
|
|
2205
|
+
/**
|
|
2206
|
+
* LH-158: a host's per-cell weight of how busy the picture is (0 calm to 1 as busy as the full range of gray), for detail the darkest
|
|
2207
|
+
* and lightest pixel of a cell miss (texture, edges); text placed on the picture (SlideComposition.pictureText) avoids busy cells.
|
|
2208
|
+
*/
|
|
2209
|
+
busy?: PictureWeights;
|
|
2210
|
+
/**
|
|
2211
|
+
* LH-158: a host's per-cell weight of how much the picture's subject is there (0 background to 1 a face or the subject), from any
|
|
2212
|
+
* saliency or vision model; text placed on the picture avoids salient cells.
|
|
2213
|
+
*/
|
|
2214
|
+
salient?: PictureWeights;
|
|
2215
|
+
}
|
|
2216
|
+
/** LH-158: a grid of weights over the whole picture, `columns` × `rows` cells in row order, each 0 to 1; its own resolution, sampled by region. */
|
|
2217
|
+
interface PictureWeights {
|
|
2218
|
+
columns: number;
|
|
2219
|
+
rows: number;
|
|
2220
|
+
values: ArrayLike<number>;
|
|
1615
2221
|
}
|
|
1616
2222
|
/** The contrast a scrim keeps under text over a picture: 4.5:1, WCAG's normal-text minimum, for every size. */
|
|
1617
2223
|
declare const SCRIM_TARGET_CONTRAST = 4.5;
|
|
@@ -1650,6 +2256,16 @@ declare function sampledGrays(grid: PictureLuminance | undefined, region: {
|
|
|
1650
2256
|
right: number;
|
|
1651
2257
|
bottom: number;
|
|
1652
2258
|
}): [number, number] | undefined;
|
|
2259
|
+
/**
|
|
2260
|
+
* LH-158: the largest weight of a host's weight grid (`busy`, `salient`) over a region given as fractions (0 to 1) of the picture; 0
|
|
2261
|
+
* when the grid is absent, undefined when it is unusable (then it is ignored).
|
|
2262
|
+
*/
|
|
2263
|
+
declare function sampledWeight(grid: PictureWeights | undefined, region: {
|
|
2264
|
+
left: number;
|
|
2265
|
+
top: number;
|
|
2266
|
+
right: number;
|
|
2267
|
+
bottom: number;
|
|
2268
|
+
}): number | undefined;
|
|
1653
2269
|
/**
|
|
1654
2270
|
* The luminance grid of decoded pixels, for `ComposeSlideOptions.pictureLuminance`: `pixels` are 8-bit sRGB in row order with `channels`
|
|
1655
2271
|
* bytes each (3, or 4 with alpha, which is composited over white, the canvas the contrast rules assume). Each of `columns` × `rows` cells
|
|
@@ -1697,548 +2313,1234 @@ interface ScrimInput {
|
|
|
1697
2313
|
*/
|
|
1698
2314
|
declare function pictureScrims(input: ScrimInput): ComposedScrim[];
|
|
1699
2315
|
|
|
1700
|
-
/** Normalize a literal hex color to uppercase #RRGGBB. */
|
|
1701
|
-
declare function normalizeHexColor(value: unknown): string | undefined;
|
|
1702
|
-
type ResolveColorRefRoles = Partial<Record<'primary' | 'secondary' | 'accent' | 'background' | 'surface' | 'surfaceAlt' | 'text' | 'textSecondary', string>>;
|
|
1703
|
-
interface ResolveColorRefOptions {
|
|
1704
|
-
/** Effective color scheme after design resolution (OOXML slots plus optional role hex overrides). */
|
|
1705
|
-
colorScheme: Record<string, unknown>;
|
|
1706
|
-
/** Optional resolved chrome colors (e.g. renderer `design.colors` with `textSecondary` mapped to `mutedText`). */
|
|
1707
|
-
roles?: ResolveColorRefRoles;
|
|
1708
|
-
/** Top-level presentation `variables` map. */
|
|
1709
|
-
variables?: Record<string, unknown>;
|
|
1710
|
-
/** Theme text color returned when a reference cannot be resolved. */
|
|
1711
|
-
fallback: string;
|
|
1712
|
-
}
|
|
1713
|
-
/** Resolve a ColorRef or TextRun.color string to a literal hex color. */
|
|
1714
|
-
declare function resolveColorRef(reference: string, options: ResolveColorRefOptions): string;
|
|
1715
|
-
/** WCAG relative luminance below which a slide background counts as dark (the point where white and black text contrast equally). */
|
|
1716
|
-
declare const DARK_BACKGROUND_LUMINANCE = 0.179;
|
|
1717
|
-
/** True when text on this color should be light: its relative luminance is under {@link DARK_BACKGROUND_LUMINANCE}. An unreadable color is not dark. */
|
|
1718
|
-
declare function isDarkColor(color: unknown): boolean;
|
|
1719
|
-
/**
|
|
1720
|
-
* The slide background a color scheme implies when the design names no single-color background: the scheme's
|
|
1721
|
-
* `background` role override, else its light1 slot, else white. Gradient and picture backgrounds use it too.
|
|
1722
|
-
*/
|
|
1723
|
-
declare function defaultSlideBackground(colorScheme: Record<string, unknown>): string;
|
|
1724
|
-
/** The four light and dark slots: the text roles (tx1, tx2) always map to one of them. */
|
|
1725
|
-
type ColorBaseSlot = 'light1' | 'light2' | 'dark1' | 'dark2';
|
|
1726
|
-
type ColorAccentSlot = 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6';
|
|
1727
|
-
/** The slots a variant can use as the slide background: the four light and dark slots, or an accent (LH-01). */
|
|
1728
|
-
type ColorVariantBackground = ColorBaseSlot | ColorAccentSlot;
|
|
1729
|
-
/**
|
|
1730
|
-
* A variant of the deck's single colour scheme: which slot is the background (and so which are the text and the alternate surface),
|
|
1731
|
-
* 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
|
|
1732
|
-
* scheme: nothing in it is a colour.
|
|
1733
|
-
*/
|
|
1734
|
-
interface ColorVariant {
|
|
1735
|
-
background: ColorVariantBackground;
|
|
1736
|
-
/** A permutation of `accent1` to `accent6`: entry `i` is the scheme slot drawn as accent `i + 1`. Default: the scheme's own order. */
|
|
1737
|
-
accents?: readonly ColorAccentSlot[];
|
|
1738
|
-
}
|
|
1739
|
-
/** The slots the roles bg1, tx1, bg2 and tx2 and the six accents point at (OOXML `clrMap`, with `lt1` named `light1` and so on). */
|
|
1740
|
-
interface ColorMap {
|
|
1741
|
-
bg1: ColorVariantBackground;
|
|
1742
|
-
tx1: ColorBaseSlot;
|
|
1743
|
-
bg2: ColorVariantBackground;
|
|
1744
|
-
tx2: ColorBaseSlot;
|
|
1745
|
-
accents: readonly ColorAccentSlot[];
|
|
1746
|
-
}
|
|
1747
|
-
/** 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. */
|
|
1748
|
-
type ColorVariantInput = ColorVariantBackground | ColorVariant;
|
|
1749
|
-
/** 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. */
|
|
1750
|
-
declare function normalizeColorVariant(value: unknown): ColorVariant | undefined;
|
|
1751
|
-
/** True for a well formed variant in either form (see {@link normalizeColorVariant}). */
|
|
1752
|
-
declare function isColorVariant(value: unknown): value is ColorVariantInput;
|
|
1753
|
-
/**
|
|
1754
|
-
* LH-01: the tone-relative values a layout record's `design.variant` can take besides a variant, resolved against the deck's own variant
|
|
1755
|
-
* (its background slot and whether it is dark) by {@link layoutColorVariant}:
|
|
1756
|
-
*
|
|
1757
|
-
* - `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
|
|
1758
|
-
* is already on light2 or dark2), so a statement stands off the deck without flipping its tone;
|
|
1759
|
-
* - `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
|
|
1760
|
-
* a dark deck, with light text.
|
|
1761
|
-
*/
|
|
1762
|
-
type LayoutVariantRole = 'surface' | 'brand';
|
|
1763
|
-
/** The deck a layout's tone-relative variant is resolved against: its background slot (bg1 of its map) and whether its text is light. */
|
|
1764
|
-
interface LayoutVariantDeck {
|
|
1765
|
-
background: ColorVariantBackground;
|
|
1766
|
-
dark: boolean;
|
|
1767
|
-
}
|
|
1768
2316
|
/**
|
|
1769
|
-
* LH-
|
|
1770
|
-
*
|
|
1771
|
-
*
|
|
1772
|
-
*
|
|
2317
|
+
* LH-158: where a heading group goes on a picture background.
|
|
2318
|
+
*
|
|
2319
|
+
* Without computer vision core cannot know where a picture's subject is, but a host that measured the picture (`pictureLuminance`, a
|
|
2320
|
+
* luminance grid, optionally with a vision model's `busy` and `salient` weights) tells it how busy each part of the picture is and how
|
|
2321
|
+
* well the text color reads there. A cover's or section's heading group then has a few good places: the top, the middle or the bottom
|
|
2322
|
+
* of its area, aligned to the start side or centered, each scored on the cells under its text without a scrim; as fallbacks the
|
|
2323
|
+
* automatic scrim (LH-02) at the place that needs the least of it, or a solid panel in the slide's background color, a start-side column
|
|
2324
|
+
* about 40% of the slide wide with the picture bleeding on the rest (LH-23's hero). Core picks one and reports every candidate with its
|
|
2325
|
+
* score (`SlideComposition.pictureText`), so an editor or a host with its own vision can offer the others, and an author's
|
|
2326
|
+
* `textPlacement` on the background picks one outright.
|
|
1773
2327
|
*/
|
|
1774
|
-
|
|
1775
|
-
/**
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
2328
|
+
|
|
2329
|
+
/** Where in its area the heading group sits. */
|
|
2330
|
+
type PictureTextAnchor = 'top' | 'middle' | 'bottom';
|
|
2331
|
+
/** How the heading group is aligned: `start`, the layout's side alignment (left, mirrored in a right-to-left deck), or `center`. */
|
|
2332
|
+
type PictureTextAlignment = 'start' | 'center';
|
|
2333
|
+
/** A placement of the heading group on a picture background: an anchor and an alignment, or `panel`. */
|
|
2334
|
+
type PictureTextPlacement = `${PictureTextAnchor}-${PictureTextAlignment}` | 'panel';
|
|
2335
|
+
/** Every placement, in the order an editor lists them. */
|
|
2336
|
+
declare const PICTURE_TEXT_PLACEMENTS: readonly PictureTextPlacement[];
|
|
2337
|
+
/**
|
|
2338
|
+
* The widest range of grays (0 to 255, through the author's overlay) a measured picture may show under the text of a placement for it to
|
|
2339
|
+
* read without a scrim (wave 6's calm band); a wider band is busy. A host's `busy` weight counts against CALM_PICTURE_SPREAD / 255.
|
|
1781
2340
|
*/
|
|
1782
|
-
declare
|
|
2341
|
+
declare const CALM_PICTURE_SPREAD = 48;
|
|
2342
|
+
/** A placement whose text covers a cell of at least this `salient` weight (a face, the subject) does not read. */
|
|
2343
|
+
declare const SALIENT_LIMIT = 0.5;
|
|
2344
|
+
/** The automatic scrim carries a placement that does not read while it needs at most this opacity; above it, the panel reads better. */
|
|
2345
|
+
declare const PANEL_SCRIM_LIMIT = 0.5;
|
|
2346
|
+
/** The shares of the slide width of the narrower columns a placement may set the group in (at the start side, or centered), padding included. */
|
|
2347
|
+
declare const PICTURE_TEXT_COLUMNS: readonly [0.6, 0.7];
|
|
2348
|
+
/** The panel's share of the slide width, and the wider share it takes when the heading group would be set smaller in the first. */
|
|
2349
|
+
declare const PICTURE_PANEL_SHARES: readonly [0.4, 0.5];
|
|
2350
|
+
/** One candidate placement of the heading group on the picture, scored on the measured grid. */
|
|
2351
|
+
interface PictureTextCandidate {
|
|
2352
|
+
placement: PictureTextPlacement;
|
|
2353
|
+
anchor: PictureTextAnchor;
|
|
2354
|
+
alignment: PictureTextAlignment;
|
|
2355
|
+
/** The text on the picture (the union of the group's ink), or the panel, in canvas pixels. */
|
|
2356
|
+
box: ScrimBox;
|
|
2357
|
+
/**
|
|
2358
|
+
* The width the group is set in, canvas pixels: its area's, or a column of PICTURE_TEXT_COLUMNS of the slide (at the start side, or
|
|
2359
|
+
* centered) where that reads better and keeps every size, so a title wraps short of a bright corner; for the panel, its text column.
|
|
2360
|
+
*/
|
|
2361
|
+
measure: number;
|
|
2362
|
+
/** The darkest and lightest gray (0 to 255, sRGB) under the text, through the author's overlay. Absent for the panel. */
|
|
2363
|
+
grays?: [number, number];
|
|
2364
|
+
/** How far apart those grays are (0 to 255): the luminance spread, how busy the picture is there. */
|
|
2365
|
+
spread: number;
|
|
2366
|
+
/** The contrast the slide's text color reaches over the worst of those grays (over the slide background for the panel). */
|
|
2367
|
+
contrast: number;
|
|
2368
|
+
/** The host's largest `busy` weight under the text (0 when it gave none). */
|
|
2369
|
+
busy: number;
|
|
2370
|
+
/** The host's largest `salient` weight under the text, or under the panel (0 when it gave none). */
|
|
2371
|
+
salient: number;
|
|
2372
|
+
/** Reads on the bare picture: contrast at least 4.5:1, spread at most CALM_PICTURE_SPREAD, no busy or salient cell (the panel: no salient cell). */
|
|
2373
|
+
reads: boolean;
|
|
2374
|
+
/** The opacity the automatic scrim would need there (0 to 1); absent when the background has an `overlay` key or for the panel. */
|
|
2375
|
+
scrim?: number;
|
|
2376
|
+
/** Lower is better: busy-ness (spread / 255 or the busy weight) plus the salient weight plus the contrast shortfall below 4.5:1. */
|
|
2377
|
+
score: number;
|
|
2378
|
+
}
|
|
2379
|
+
/** LH-158: the placement of the heading group on a picture background (SlideComposition.pictureText). */
|
|
2380
|
+
interface PictureText {
|
|
2381
|
+
/** The placement drawn. */
|
|
2382
|
+
placement: PictureTextPlacement;
|
|
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;
|
|
2418
|
+
}[];
|
|
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
|
+
};
|
|
2426
|
+
}
|
|
1783
2427
|
/**
|
|
1784
|
-
*
|
|
1785
|
-
*
|
|
1786
|
-
* 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
|
|
1787
|
-
* own fixed background only maps the text and the surfaces, so that background still wins over the layout.
|
|
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.
|
|
1788
2430
|
*/
|
|
1789
|
-
declare function
|
|
2431
|
+
declare function scorePictureText(input: PictureTextInput): PictureTextCandidate[] | undefined;
|
|
1790
2432
|
/**
|
|
1791
|
-
*
|
|
1792
|
-
*
|
|
1793
|
-
*
|
|
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).
|
|
1794
2438
|
*/
|
|
1795
|
-
declare function
|
|
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;
|
|
2446
|
+
|
|
1796
2447
|
/**
|
|
1797
|
-
*
|
|
1798
|
-
* light and dark; `light2` and `dark2` make that slot both the background and the alternate surface (bg2, as a slide with that theme
|
|
1799
|
-
* 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`.
|
|
2448
|
+
* SH-19: OPF's own SmartArt layout definitions (ECMA-376 Part 1, §21.4 `dgm:layoutDef`) and OPF's interpreter of them.
|
|
1800
2449
|
*
|
|
1801
|
-
*
|
|
1802
|
-
*
|
|
1803
|
-
* the
|
|
1804
|
-
*
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
*
|
|
1809
|
-
*
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
*
|
|
1814
|
-
*
|
|
1815
|
-
*
|
|
1816
|
-
*
|
|
2450
|
+
* Where PowerPoint's built-in SmartArt layouts do not draw an arrangement (OPF's ring and loops of a cycle, its stepped pyramid, its four
|
|
2451
|
+
* quadrants and card grids, its wrapped and snaking chevrons and flows), the PPTX export writes OPF's own layout definition of the design,
|
|
2452
|
+
* so the design is live, editable SmartArt in PowerPoint. The definition is a table of explicit constraints (SH-19 spike, 2026-11-07,
|
|
2453
|
+
* COM): a `composite` root with one `if` branch per node count, each placing every node at `l`/`t`/`w`/`h` as shares of the frame, a hidden
|
|
2454
|
+
* full-frame child that fixes the drawing's bounds, axis-aligned arrows as `sp` shapes turned by `rot`, and other arrows as `conn`
|
|
2455
|
+
* connectors between two node centers. PowerPoint evaluates such a definition with no algorithm of its own: every node lands within
|
|
2456
|
+
* 0.0001 pt of its constraints at any frame size. OPF's interpreter (evaluateLayoutDefinition) evaluates the same subset as PowerPoint
|
|
2457
|
+
* does, and returns the nodes and arrows in the shape of a composed arrangement (layoutArrangement), so render and pptx need no second
|
|
2458
|
+
* geometry path: the export builds the definition from the composed design, evaluates it, and writes it only when the result is the design.
|
|
2459
|
+
*
|
|
2460
|
+
* PowerPoint's rules the interpreter reproduces (measured through COM, docs/smartart.md):
|
|
2461
|
+
* - `composite`: each child at its constraints (shares of the root's `w` and `h`, or absolute millimeters); when the children's bounds do not
|
|
2462
|
+
* reach the frame's edges the drawing is moved to the frame's center (OPF's definitions add a hidden full-frame child, so nothing moves);
|
|
2463
|
+
* - a shape turned by `rot` is the largest-area rectangle at that rotation inside its constraint box, centered in it (so a turn of 0, 90,
|
|
2464
|
+
* 180 or 270 degrees keeps the box);
|
|
2465
|
+
* - `conn` with `begPts`/`endPts` `ctr`: a connector shape on the line from the source node's center to the destination's, from `begPad`
|
|
2466
|
+
* after the source center to `endPad` before the destination's, `h` thick, turned to the line's angle;
|
|
2467
|
+
* - names of layout nodes and `forEach` elements are unique in the whole definition (PowerPoint rejects a definition that repeats one);
|
|
2468
|
+
* - `hideLastTrans="0"` keeps the last node's transition (a loop's closing arrow).
|
|
2469
|
+
*
|
|
2470
|
+
* Pure data and geometry: no Node built-ins, so it runs on the edge runtimes as the rest of core.
|
|
1817
2471
|
*/
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
}
|
|
1825
|
-
/**
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
2472
|
+
|
|
2473
|
+
interface Box$3 {
|
|
2474
|
+
x: number;
|
|
2475
|
+
y: number;
|
|
2476
|
+
width: number;
|
|
2477
|
+
height: number;
|
|
2478
|
+
}
|
|
2479
|
+
/** An algorithm (`dgm:alg`) and its parameters. */
|
|
2480
|
+
interface LayoutAlgorithm {
|
|
2481
|
+
type: 'composite' | 'tx' | 'sp' | 'conn' | 'snake';
|
|
2482
|
+
params?: Readonly<Record<string, string>>;
|
|
2483
|
+
}
|
|
2484
|
+
/** A shape (`dgm:shape`): its DrawingML preset, turn in degrees, adjustments (shares of 100000) and whether its geometry is hidden. */
|
|
2485
|
+
interface LayoutShapeType {
|
|
2486
|
+
type: string;
|
|
2487
|
+
rot?: number;
|
|
2488
|
+
hideGeom?: boolean;
|
|
2489
|
+
adj?: readonly number[];
|
|
2490
|
+
}
|
|
2491
|
+
/**
|
|
2492
|
+
* A constraint (`dgm:constr`): `for: 'ch'` with `forName` sets a child's value, otherwise the node's own; the value is `fact` times the
|
|
2493
|
+
* reference (`refType`: the root's `w` or `h`, or the font size), or `val` (millimeters for lengths, points for a font size).
|
|
2494
|
+
*/
|
|
2495
|
+
interface LayoutConstraint {
|
|
2496
|
+
type: 'l' | 't' | 'w' | 'h' | 'begPad' | 'endPad' | 'primFontSz' | 'lMarg' | 'rMarg' | 'tMarg' | 'bMarg';
|
|
2497
|
+
for?: 'ch';
|
|
2498
|
+
forName?: string;
|
|
2499
|
+
refType?: 'w' | 'h' | 'primFontSz';
|
|
2500
|
+
fact?: number;
|
|
2501
|
+
val?: number;
|
|
2502
|
+
op?: 'equ';
|
|
2503
|
+
}
|
|
2504
|
+
/** What a layout node presents (`dgm:presOf`): the point of its `forEach` (`desOrSelf` of a node, `self` of a transition), or nothing. */
|
|
2505
|
+
interface LayoutPresOf {
|
|
2506
|
+
axis: 'desOrSelf' | 'self';
|
|
2507
|
+
ptType?: 'node';
|
|
2508
|
+
}
|
|
2509
|
+
interface LayoutNodeDefinition {
|
|
2510
|
+
kind: 'layoutNode';
|
|
2511
|
+
name: string;
|
|
2512
|
+
styleLbl?: string;
|
|
2513
|
+
alg?: LayoutAlgorithm;
|
|
2514
|
+
shape?: LayoutShapeType;
|
|
2515
|
+
presOf?: LayoutPresOf;
|
|
2516
|
+
constraints?: readonly LayoutConstraint[];
|
|
2517
|
+
children?: readonly LayoutChild[];
|
|
2518
|
+
}
|
|
2519
|
+
/** `dgm:forEach` over the data model: the doc's child nodes (`ch`, from `st`, `cnt` of them), or the transition after a node (`followSib`). */
|
|
2520
|
+
interface LayoutForEach {
|
|
2521
|
+
kind: 'forEach';
|
|
2522
|
+
name: string;
|
|
2523
|
+
axis: 'ch' | 'followSib';
|
|
2524
|
+
ptType: 'node' | 'sibTrans';
|
|
2525
|
+
st?: number;
|
|
2526
|
+
cnt?: number;
|
|
2527
|
+
hideLastTrans?: boolean;
|
|
2528
|
+
children: readonly LayoutChild[];
|
|
2529
|
+
}
|
|
2530
|
+
/** One `dgm:if` (`when` the doc's child-node count equals `count`) or the `dgm:else` (no `when`): what it adds to the enclosing node. */
|
|
2531
|
+
interface LayoutBranch {
|
|
2532
|
+
name: string;
|
|
2533
|
+
count?: number;
|
|
2534
|
+
alg?: LayoutAlgorithm;
|
|
2535
|
+
shape?: LayoutShapeType;
|
|
2536
|
+
constraints?: readonly LayoutConstraint[];
|
|
2537
|
+
children?: readonly LayoutChild[];
|
|
2538
|
+
}
|
|
2539
|
+
interface LayoutChoose {
|
|
2540
|
+
kind: 'choose';
|
|
2541
|
+
name: string;
|
|
2542
|
+
branches: readonly LayoutBranch[];
|
|
2543
|
+
}
|
|
2544
|
+
type LayoutChild = LayoutNodeDefinition | LayoutForEach | LayoutChoose;
|
|
2545
|
+
/** A layout definition: its identity (what PowerPoint shows in Change Layout) and its root layout node. */
|
|
2546
|
+
interface LayoutDefinition {
|
|
2547
|
+
uniqueId: string;
|
|
2548
|
+
title: string;
|
|
2549
|
+
description: string;
|
|
2550
|
+
category: string;
|
|
2551
|
+
root: LayoutNodeDefinition;
|
|
2552
|
+
}
|
|
2553
|
+
/** The style labels OPF's definitions use for text-only nodes (no fill, no line): on the slide (`revTx`) and on a filled shape (`fgAcc1`). */
|
|
2554
|
+
declare const TEXT_ONLY_LABELS: readonly string[];
|
|
2555
|
+
/** Millimeters per canvas pixel (1/96 inch): a constraint's absolute lengths are in millimeters. */
|
|
2556
|
+
declare const MM_PER_PX: number;
|
|
2557
|
+
/** The text rectangle of a DrawingML preset at `box` with its first adjustment (of 100000), as PowerPoint sets a node's text in it. */
|
|
2558
|
+
declare function presetTextRect(preset: string, box: Box$3, adjust?: number): Box$3;
|
|
2559
|
+
/** The largest-area rectangle turned by `rotation` degrees that fits in `box`, centered in it (PowerPoint's rule for a turned shape). */
|
|
2560
|
+
declare function turnedShapeBox(box: Box$3, rotation: number): Box$3;
|
|
2561
|
+
/** One shape the definition draws, in drawing order: its layout node, what it presents, its preset, box and turn. */
|
|
2562
|
+
interface LayoutShape {
|
|
2563
|
+
name: string;
|
|
2564
|
+
styleLbl?: string;
|
|
2565
|
+
/** The data-model point it presents: an entry (`node`) or the transition after one (`sibTrans`), 0-based; absent for a shape of the layout. */
|
|
2566
|
+
presents?: {
|
|
2567
|
+
type: 'node' | 'sibTrans';
|
|
2568
|
+
index: number;
|
|
2569
|
+
};
|
|
2570
|
+
preset: string;
|
|
2571
|
+
/** Unturned box, canvas pixels. */
|
|
2572
|
+
box: Box$3;
|
|
2573
|
+
rotation: number;
|
|
2574
|
+
adjust: readonly number[];
|
|
2575
|
+
hidden: boolean;
|
|
2576
|
+
/** A text-only node (TEXT_ONLY_LABELS): its box is the entry's text rectangle. */
|
|
2577
|
+
textOnly: boolean;
|
|
2578
|
+
/** The text insets (left, top, right, bottom) as shares of the font size, and the font size in points, of a node that presents an entry. */
|
|
2579
|
+
margins?: [number, number, number, number];
|
|
2580
|
+
fontSize?: number;
|
|
2581
|
+
}
|
|
2582
|
+
/**
|
|
2583
|
+
* Evaluate a definition for a data model of `count` entries (each with its transition) in a frame (canvas pixels), as PowerPoint lays
|
|
2584
|
+
* it out: the shapes in drawing order. Throws on what OPF's definitions never use (another algorithm at the root, a child without a box,
|
|
2585
|
+
* a drawing that reaches outside its frame).
|
|
2586
|
+
*/
|
|
2587
|
+
declare function evaluateLayoutDefinition(definition: LayoutDefinition, frame: Box$3, count: number): LayoutShape[];
|
|
2588
|
+
/**
|
|
2589
|
+
* The interpreter's shapes as a composed arrangement's nodes and arrows (core ComposedArrangement): one node per entry (its shape, with
|
|
2590
|
+
* the shape's text rectangle, or a text-only node's box beside or over the shape before it), an arrow per transition shape, and a shape
|
|
2591
|
+
* of the layout before the first node as the background (a matrix's diamond). Hidden shapes are left out.
|
|
2592
|
+
*/
|
|
2593
|
+
declare function layoutArrangement(shapes: readonly LayoutShape[]): {
|
|
2594
|
+
nodes: ArrangementNode[];
|
|
2595
|
+
arrows: ArrangementArrow[];
|
|
2596
|
+
background?: Box$3;
|
|
1834
2597
|
};
|
|
1835
|
-
/**
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
/**
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
2598
|
+
/** One count's drawing in its frame (canvas pixels): composed nodes and arrows, and an optional background shape. */
|
|
2599
|
+
/**
|
|
2600
|
+
* One count's drawing in its frame (canvas pixels): composed nodes and arrows, an optional background shape, and (the composed count)
|
|
2601
|
+
* where each entry's first line starts below its text rectangle's top, as a share of the font size: those entries' text is anchored at
|
|
2602
|
+
* the top at that inset, as OPF's composition sets it (PowerPoint's centering of a block of lines differs from OPF's by up to a pixel).
|
|
2603
|
+
*/
|
|
2604
|
+
interface LayoutTable {
|
|
2605
|
+
nodes: readonly ArrangementNode[];
|
|
2606
|
+
arrows?: readonly ArrangementArrow[];
|
|
2607
|
+
background?: Box$3;
|
|
2608
|
+
textTops?: readonly (number | undefined)[];
|
|
2609
|
+
}
|
|
2610
|
+
/** How a definition paints and sets its text: style labels, the text insets as shares of the font size, the font size in points. */
|
|
2611
|
+
interface LayoutStyle {
|
|
2612
|
+
node: string;
|
|
2613
|
+
text: 'node' | 'slide';
|
|
2614
|
+
align?: 'start' | 'center';
|
|
2615
|
+
arrow?: string;
|
|
2616
|
+
margins: readonly [number, number, number, number];
|
|
2617
|
+
fontSize: number;
|
|
2618
|
+
}
|
|
2619
|
+
/**
|
|
2620
|
+
* A composite definition from one table per node count (1 to `max`; `table(k)` undefined leaves k to the `else` branch, a snake of
|
|
2621
|
+
* rounded rectangles). Returns the definition, or the reason a table cannot be one (an arrow neither axis-aligned nor on the line between
|
|
2622
|
+
* two node centers, two arrows after one node, a shape outside the frame). Layout node names carry the count (`n3_2`: node 2 of 3), as
|
|
2623
|
+
* PowerPoint needs every name unique.
|
|
2624
|
+
*/
|
|
2625
|
+
declare function compositeLayoutDefinition(identity: Omit<LayoutDefinition, 'root'>, frame: Box$3, max: number, table: (count: number) => LayoutTable | undefined, style: LayoutStyle): LayoutDefinition | {
|
|
2626
|
+
reason: string;
|
|
2627
|
+
};
|
|
2628
|
+
/** OPF's designs that have a layout definition of their own. */
|
|
2629
|
+
declare const OPF_LAYOUT_DESIGNS: readonly ["cycle-ring", "cycle-loop", "cycle-loop-3", "pyramid-steps", "matrix-quadrants", "card-grid", "chevron-rows", "flow-rows", "vertical-flow-columns"];
|
|
2630
|
+
type OpfLayoutDesign = typeof OPF_LAYOUT_DESIGNS[number];
|
|
2631
|
+
/** The inputs of one composed OPF design: its region, its gap and corner, its direction and (rows, columns, compact, `need`) its shape. */
|
|
2632
|
+
interface OpfLayoutRecipe {
|
|
2633
|
+
design: OpfLayoutDesign;
|
|
2634
|
+
area: Box$3;
|
|
2635
|
+
gap: number;
|
|
2636
|
+
radius?: number;
|
|
2637
|
+
rtl?: boolean;
|
|
2638
|
+
/** A card grid's columns, or a linear design's rows (columns of a vertical flow). */
|
|
2639
|
+
columns?: number;
|
|
2640
|
+
lines?: number;
|
|
2641
|
+
compact?: boolean;
|
|
2642
|
+
/** A linear design's text height (linearDesign `need`). */
|
|
2643
|
+
need?: number;
|
|
2644
|
+
}
|
|
2645
|
+
/** The most entries a definition's tables cover (ARRANGEMENT_MAX and ARRANGEMENT_CARDS_MAX). */
|
|
2646
|
+
declare const OPF_LAYOUT_MAX = 8;
|
|
2647
|
+
/** OPF's design of `recipe` for `count` entries, as composition draws it (undefined where the design cannot hold that many). */
|
|
2648
|
+
declare function opfLayoutGeometry(recipe: OpfLayoutRecipe, count: number): LayoutTable | undefined;
|
|
2649
|
+
/** The arrangement each of OPF's designs draws. */
|
|
2650
|
+
declare const OPF_LAYOUT_KIND: Readonly<Record<OpfLayoutDesign, Arrangement>>;
|
|
2651
|
+
/**
|
|
2652
|
+
* SH-19's safe domain for OPF's own layout definitions, from the PowerPoint COM sweep (docs/smartart.md): the instances for which PowerPoint
|
|
2653
|
+
* laid every node out within 0.1 pt of the composed design (it did for all 310 live instances), at OPF's size, and drew the SmartArt as it
|
|
2654
|
+
* draws OPF's native export of the same slide (SH-07's gate). An instance outside it is exported as native shapes with the reason.
|
|
2655
|
+
*/
|
|
2656
|
+
declare const SMART_ART_OPF_DOMAIN: Readonly<{
|
|
2657
|
+
/**
|
|
2658
|
+
* The entries per design that passed (a design or a count the sweep did not pass stays native shapes): OPF's ring and loops of a cycle,
|
|
2659
|
+
* its quadrants and the compact rows held their entries only at a text density above the limit below.
|
|
2660
|
+
*/
|
|
2661
|
+
count: Readonly<Partial<Record<OpfLayoutDesign, readonly [number, number]>>>;
|
|
2662
|
+
/** The most lines one entry may wrap to (every entry that passed had one or two). */
|
|
2663
|
+
lines: 2;
|
|
2664
|
+
/**
|
|
2665
|
+
* The most of the frame the entries' text may cover (each line's width times the size, over the frame's area): PowerPoint sets the lines
|
|
2666
|
+
* of a SmartArt up to a pixel from where it sets OPF's native lines, which a frame dense with text shows above SH-07's mean-difference
|
|
2667
|
+
* gate (every instance at 0.075 or less passed; above it some did not).
|
|
2668
|
+
*/
|
|
2669
|
+
ink: 0.075;
|
|
2670
|
+
}>;
|
|
2671
|
+
/** The facts of one composed OPF design the domain is checked on (ComposedArrangement.layout and .smartArt). */
|
|
2672
|
+
interface OpfSmartArtCandidate {
|
|
2673
|
+
design: OpfLayoutDesign;
|
|
2674
|
+
compact?: boolean;
|
|
2675
|
+
count: number;
|
|
2676
|
+
lines: readonly number[];
|
|
2677
|
+
/** Whether each entry's line breaks hold within SMART_ART_DOMAIN.slack of its width. */
|
|
2678
|
+
stable?: readonly boolean[];
|
|
2679
|
+
ink?: number;
|
|
2680
|
+
/** The widest line of any entry, canvas pixels (SMART_ART_DOMAIN.lineWidth applies to OPF's layouts too). */
|
|
2681
|
+
widest?: number;
|
|
2682
|
+
rtl: boolean;
|
|
2683
|
+
script?: 'cjk' | 'other';
|
|
2684
|
+
}
|
|
2685
|
+
/** Whether PowerPoint draws an OPF design's layout definition as the preview does: undefined when it does, else the reason. */
|
|
2686
|
+
declare function opfSmartArtUnavailable(candidate: OpfSmartArtCandidate): string | undefined;
|
|
2687
|
+
|
|
2688
|
+
/**
|
|
2689
|
+
* SH-17: the linear arrangements of a layout region (`arrangement: "chevrons" | "flow" | "vertical-flow"`), next to SH-09's pyramid and
|
|
2690
|
+
* matrix (arrangements.ts).
|
|
1926
2691
|
*
|
|
1927
|
-
*
|
|
1928
|
-
*
|
|
1929
|
-
* `
|
|
1930
|
-
*
|
|
1931
|
-
*
|
|
1932
|
-
*
|
|
1933
|
-
*
|
|
1934
|
-
*
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
/**
|
|
1948
|
-
* The roles of the content on the surface: {@link resolveColorRoles} for `variant`, with every text role (text, textSecondary, primary,
|
|
1949
|
-
* secondary, accent) under {@link EMPHASIS_TEXT_MIN_CONTRAST} on the fill replaced by `text`, so a metric value in the primary color on an
|
|
1950
|
-
* accent card does not vanish into it. `dark` is whether the surface takes light text.
|
|
1951
|
-
*/
|
|
1952
|
-
roles: ResolvedColorRoles;
|
|
1953
|
-
}
|
|
1954
|
-
/**
|
|
1955
|
-
* 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
|
|
1956
|
-
* (no color is invented). A light slide takes the brand dark (dark2, as the `brand` layout variant), then dark1, then the accents in the
|
|
1957
|
-
* 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
|
|
1958
|
-
* gives: dark1 where it reads better), then light1. The first candidate whose text reaches {@link EMPHASIS_TEXT_MIN_CONTRAST} on its fill and
|
|
1959
|
-
* whose fill reaches {@link EMPHASIS_SURFACE_MIN_CONTRAST} against the slide background is the surface; with none, the candidate with the most
|
|
1960
|
-
* text contrast is (the last candidates are the opposite text family, so a scheme with readable text always has one).
|
|
1961
|
-
*/
|
|
1962
|
-
declare function emphasisSurface(colorScheme: Record<string, unknown>, slide: Pick<ResolvedColorRoles, 'dark' | 'map' | 'background'>): EmphasisSurface;
|
|
1963
|
-
/**
|
|
1964
|
-
* 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
|
|
1965
|
-
* 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.
|
|
1966
|
-
*/
|
|
1967
|
-
declare function readableSchemeColor(fill: string, roles: Pick<ResolvedColorRoles, 'neutrals' | 'text' | 'background'>): SchemeColor;
|
|
1968
|
-
declare function colorContrast(foreground: string, background: string): number | undefined;
|
|
1969
|
-
/** Keep an inherited text color at >=4.5:1; otherwise select black or white.
|
|
1970
|
-
* Callers must preserve explicit text-color overrides before using this fallback.
|
|
1971
|
-
* An unresolved/translucent fill preserves the preferred color, without a contrast claim.
|
|
1972
|
-
*/
|
|
1973
|
-
declare function textColorForFill(fill: string, preferred: string): string;
|
|
1974
|
-
/** Keep an inherited chart mark at >=3:1 against its opaque panel. Otherwise
|
|
1975
|
-
* mix toward black or white in bounded 1/255 steps, choosing the first passing
|
|
1976
|
-
* step (higher contrast breaks a tie). This retains a recognizable palette;
|
|
1977
|
-
* it does not establish distinction between adjacent series or colorblind safety.
|
|
1978
|
-
* Explicit mark overrides belong to the caller; unresolved alpha is preserved.
|
|
1979
|
-
*/
|
|
1980
|
-
declare function chartColorForFill(fill: string, preferred: string): string;
|
|
1981
|
-
/** Smallest CIE L* step kept between neighbouring series (a printed or greyscale chart tells them apart by lightness alone). */
|
|
1982
|
-
declare const CHART_SERIES_MIN_LIGHTNESS_STEP = 11;
|
|
1983
|
-
/** Smallest CIE76 colour difference kept between any two series that were at least that far apart before the surface adjustment. */
|
|
1984
|
-
declare const CHART_SERIES_MIN_DIFFERENCE = 12;
|
|
1985
|
-
/** 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}). */
|
|
1986
|
-
declare const CHART_SERIES_TIER_SIZE = 6;
|
|
1987
|
-
/** WI-5 (P18, D3) and LH-55: the contrast every series from the scheme reaches on a dark chart surface (see {@link ChartPaletteOptions.legible}). */
|
|
1988
|
-
declare const CHART_DARK_SERIES_MIN_CONTRAST = 4.5;
|
|
1989
|
-
/** 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). */
|
|
1990
|
-
declare const CHART_LEAD_LIGHTNESS_STEP = 20;
|
|
1991
|
-
interface ChartPaletteOptions {
|
|
1992
|
-
/**
|
|
1993
|
-
* The series that come from the deck scheme ({@link chartSchemeSeries}): on a dark `fill` each of them reaches {@link CHART_DARK_SERIES_MIN_CONTRAST}
|
|
1994
|
-
* (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
|
|
1995
|
-
* when both are listed. An authored `chart.colors` entry and a host palette (omit the option) keep the 3:1 floor.
|
|
1996
|
-
*/
|
|
1997
|
-
legible?: readonly boolean[];
|
|
1998
|
-
/**
|
|
1999
|
-
* 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`
|
|
2000
|
-
* after the contrast placement, as far as it keeps its contrast floor and its lightness step from its neighbours ({@link softenChartPalette}).
|
|
2001
|
-
* Ordinary data then reads in soft colours and the full-strength colour is left for emphasis (Few). An authored colour is never softened.
|
|
2002
|
-
*/
|
|
2003
|
-
soften?: boolean;
|
|
2004
|
-
}
|
|
2005
|
-
/** Series colours for a chart drawn on `fill`: the palette in order, each colour adjusted for contrast
|
|
2006
|
-
* (`chartColorForFill`) without letting the adjustment merge series.
|
|
2692
|
+
* A lone list of one level in such a region is drawn as a process diagram: a row of chevrons, a row of boxes with arrows between them,
|
|
2693
|
+
* or a column of boxes with arrows between them. The first design is PowerPoint's own geometry for its Basic Chevron Process (`chevron1`),
|
|
2694
|
+
* Basic Process (`process1`) and Vertical Process (`process2`) SmartArt layouts, measured through COM (SH-17 sweep, 2026-11-06), so the
|
|
2695
|
+
* PPTX export can write the arrangement as live SmartArt that PowerPoint lays out exactly as the preview draws it. PowerPoint fits these
|
|
2696
|
+
* layouts with a binary search on one scale, so a node's size is not the closed form W / (0.9 n + 0.1) but the search's last fitting
|
|
2697
|
+
* step: a share of the frame that depends only on the node count (SMART_ART_SCALES, the same for every frame the sweep measured, to
|
|
2698
|
+
* 0.0001 pt).
|
|
2699
|
+
*
|
|
2700
|
+
* - chevrons (Basic Chevron Process): n chevrons of width w = s(n) W, height min(0.4 w, H), each 0.9 w after the last (the point of one
|
|
2701
|
+
* in the notch of the next), centered in the frame. The chevron is DrawingML's `chevron` at its default adjustment (its point 0.5 of
|
|
2702
|
+
* its height deep); PowerPoint sets the text in the chevron's own text rectangle (between the notch and the point) with a margin of
|
|
2703
|
+
* 0.315 em at the start and 0.105 em on the other sides. With one chevron in a frame less than 0.4 times as tall as wide, w is
|
|
2704
|
+
* 1023/1024 W and the height is the frame's.
|
|
2705
|
+
* - flow (Basic Process): n rounded rectangles of width w = s(n) W, height min(0.6 w, H), each 1.4 w after the last, centered, with a
|
|
2706
|
+
* right arrow between two (0.212 w long, 0.248 w tall, 0.1 w after the box before it, on the frame's middle). A box is DrawingML's
|
|
2707
|
+
* `roundRect` at adjustment 10000; its text is set in the rounded rectangle's own text rectangle with a margin of 0.3 em. One box in a
|
|
2708
|
+
* frame less than 0.6 times as tall as wide is 1023/1024 W wide and as tall as the frame.
|
|
2709
|
+
* - vertical-flow (Vertical Process): n rounded rectangles of height h = s(n) H, width min(1.8 h, W), each 1.5 h below the last,
|
|
2710
|
+
* centered, with a down arrow between two (a right arrow turned 90 degrees, 0.45 h wide and 0.375 h long, in the middle of the gap).
|
|
2711
|
+
* One box in a frame less than 1.8 times as wide as tall is 1023/1024 H tall and as wide as the frame.
|
|
2007
2712
|
*
|
|
2008
|
-
*
|
|
2009
|
-
* few lightness values, so two blues that differ on white can end up identical on a dark card. Colours that
|
|
2010
|
-
* already have >= 3:1 contrast against `fill` are kept exactly. A colour the contrast adjustment would move is
|
|
2011
|
-
* placed again on the lightness axis, keeping its hue and as much of its chroma as sRGB allows, subject to
|
|
2012
|
-
* >= 3:1 contrast against `fill` and these separations from the other series (each capped at the separation
|
|
2013
|
-
* that pair had in `palette`, so a pair the palette itself made close is not asked to be far apart):
|
|
2713
|
+
* Every arrow is DrawingML's `rightArrow` (stem 0.6 of its height, head at its default length), turned by `rotation` about its center.
|
|
2014
2714
|
*
|
|
2015
|
-
*
|
|
2016
|
-
*
|
|
2017
|
-
|
|
2018
|
-
|
|
2715
|
+
* Where PowerPoint's design does not hold the entries at the list's size, or the instance lies outside the SmartArt domain, OPF draws its
|
|
2716
|
+
* own design of the arrangement (chevronRow, flowRow, flowColumn), filling the region; a right-to-left deck mirrors both.
|
|
2717
|
+
*/
|
|
2718
|
+
|
|
2719
|
+
interface Box$2 {
|
|
2720
|
+
x: number;
|
|
2721
|
+
y: number;
|
|
2722
|
+
width: number;
|
|
2723
|
+
height: number;
|
|
2724
|
+
}
|
|
2725
|
+
/** SH-17's arrangements (arrangements.ts LINEAR_ARRANGEMENTS). */
|
|
2726
|
+
type LinearArrangement = typeof LINEAR_ARRANGEMENTS[number];
|
|
2727
|
+
declare const isLinearArrangement: (kind: string) => kind is LinearArrangement;
|
|
2728
|
+
/**
|
|
2729
|
+
* PowerPoint's scale for n nodes (index n - 1): a node's width over the frame's width (chevrons, flow) or its height over the frame's
|
|
2730
|
+
* height (vertical-flow), as PowerPoint's binary search leaves it (multiples of 1/8192). Measured for 1 to 10 nodes in 20 frames each.
|
|
2731
|
+
*/
|
|
2732
|
+
declare const SMART_ART_SCALES: Readonly<Record<LinearArrangement, readonly number[]>>;
|
|
2733
|
+
/** DrawingML's chevron default adjustment (the point's depth over the smaller side) and a process box's rounded corner. */
|
|
2734
|
+
declare const CHEVRON_ADJUST = 50000;
|
|
2735
|
+
declare const FLOW_ROUND_ADJUST = 10000;
|
|
2736
|
+
/** A rightArrow's stem (adj1) and head (adj2) adjustments, PowerPoint's for both process layouts. */
|
|
2737
|
+
declare const ARROW_ADJUST: readonly [number, number];
|
|
2738
|
+
/**
|
|
2739
|
+
* The text margins of a node (left, top, right, bottom), as shares of its font size: a chevron's 0.315 em at its start and 0.105 em
|
|
2740
|
+
* elsewhere, a process box's 0.3 em on every side.
|
|
2741
|
+
*/
|
|
2742
|
+
declare const LINEAR_TEXT_MARGINS: Readonly<Record<LinearArrangement, readonly [number, number, number, number]>>;
|
|
2743
|
+
/** The geometry of one linear arrangement: its nodes and the arrows between them. */
|
|
2744
|
+
interface LinearGeometry {
|
|
2745
|
+
nodes: ArrangementNode[];
|
|
2746
|
+
arrows: ArrangementArrow[];
|
|
2747
|
+
}
|
|
2748
|
+
/** PowerPoint's Basic Chevron Process of `count` chevrons in `frame` (mirrored, pointing left, when `rtl`). */
|
|
2749
|
+
declare function chevronNodes(frame: Box$2, count: number, rtl?: boolean): LinearGeometry;
|
|
2750
|
+
/** PowerPoint's Basic Process of `count` boxes in `frame`, with an arrow between two (mirrored when `rtl`). */
|
|
2751
|
+
declare function flowNodes(frame: Box$2, count: number, rtl?: boolean): LinearGeometry;
|
|
2752
|
+
/** PowerPoint's Vertical Process of `count` boxes in `frame`, with a down arrow between two. */
|
|
2753
|
+
declare function verticalFlowNodes(frame: Box$2, count: number): LinearGeometry;
|
|
2754
|
+
/** PowerPoint's geometry of a linear arrangement in its SmartArt frame. */
|
|
2755
|
+
declare function linearNodes(kind: LinearArrangement, frame: Box$2, count: number, rtl?: boolean): LinearGeometry;
|
|
2756
|
+
/** The most rows (chevrons, flow) or columns (vertical flow) OPF's own design wraps its entries into. */
|
|
2757
|
+
declare const OPF_LINES_MAX = 4;
|
|
2758
|
+
/** OPF's flows: an arrow is PowerPoint's (0.212 of a box's width long, 0.248 thick), in a room of 0.4 of a box's width between two. */
|
|
2759
|
+
declare const OPF_ARROW_LENGTH = 0.212;
|
|
2760
|
+
declare const OPF_ARROW_THICKNESS = 0.248;
|
|
2761
|
+
declare const OPF_ARROW_ROOM = 0.4;
|
|
2762
|
+
/** OPF's vertical flow: PowerPoint's proportions too, an arrow 0.375 of a box's height long and 0.45 wide, in a room of 0.5 of its height. */
|
|
2763
|
+
declare const OPF_COLUMN_ARROW_LENGTH = 0.375;
|
|
2764
|
+
declare const OPF_COLUMN_ARROW_THICKNESS = 0.45;
|
|
2765
|
+
declare const OPF_COLUMN_ROOM = 0.5;
|
|
2766
|
+
/** OPF's chevrons: a chevron's point at most 0.2 of its width deep (half its height, as PowerPoint's, when shorter), each 0.9 widths after the last. */
|
|
2767
|
+
declare const OPF_CHEVRON_DEPTH = 0.2;
|
|
2768
|
+
/**
|
|
2769
|
+
* OPF's own design of a linear arrangement in `area`, drawn where PowerPoint's does not hold the entries (or lies outside the SmartArt
|
|
2770
|
+
* domain), in the deck's paint and PowerPoint's proportions, so the two read as one family. The entries go into `lines` rows (chevrons,
|
|
2771
|
+
* flow) or columns (vertical flow), as evenly as possible; every line spans the area (a line of fewer entries widens them, a column of
|
|
2772
|
+
* fewer lengthens them), and the block is centered in the area.
|
|
2019
2773
|
*
|
|
2020
|
-
*
|
|
2021
|
-
*
|
|
2022
|
-
*
|
|
2023
|
-
*
|
|
2024
|
-
*
|
|
2025
|
-
*
|
|
2026
|
-
* simply the adjusted colour, a near miss is not worth a large change, and a collision is resolved at the
|
|
2027
|
-
* nearest lightness that clears it. The result is deterministic and in series order. An unresolved or
|
|
2028
|
-
* translucent fill or colour is passed through, like `chartColorForFill`.
|
|
2774
|
+
* - chevrons: each row a run of chevrons left to right, 0.9 widths apart, the point at most 0.2 of a width deep; a row breaks after a
|
|
2775
|
+
* chevron's point and the next row starts again at the left.
|
|
2776
|
+
* - flow: boxes 0.4 of a width apart with PowerPoint's arrow in each room; the rows snake: the second runs right to left under the first,
|
|
2777
|
+
* joined by a down arrow at the end where the first stops, and so on.
|
|
2778
|
+
* - vertical flow: boxes half a height apart with a down arrow in each room; the columns snake the same way (the second runs bottom to
|
|
2779
|
+
* top, joined by a right arrow at the bottom).
|
|
2029
2780
|
*
|
|
2030
|
-
*
|
|
2031
|
-
* (
|
|
2032
|
-
*
|
|
2033
|
-
* contrast (LH-55: the second default blue on navy was 3.0:1 and nine L* from the first).
|
|
2781
|
+
* `need` is the height the fullest node's text takes with its margins, once composition has sized the text in the tallest geometry
|
|
2782
|
+
* (`need` absent): each node is then that tall, or PowerPoint's proportion when that is taller, at most the room. A right-to-left deck
|
|
2783
|
+
* mirrors the design. Undefined when the area cannot hold it.
|
|
2034
2784
|
*
|
|
2035
|
-
*
|
|
2036
|
-
*
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2785
|
+
* `compact`: the design composition falls back to only when no proportioned one holds the entries at the list's size (so no list is left
|
|
2786
|
+
* as a list a design could hold): the rooms two gaps (a vertical flow's 1.25 gaps) with an arrow 0.6 of the room long, a
|
|
2787
|
+
* chevron's point at most 0.12 of its width deep and half a gap from the next notch, and no least height.
|
|
2788
|
+
*/
|
|
2789
|
+
declare function linearDesign(kind: LinearArrangement, area: Box$2, count: number, gap: number, rtl?: boolean, lines?: number, need?: number, compact?: boolean): LinearGeometry | undefined;
|
|
2790
|
+
/**
|
|
2791
|
+
* A node's text margins (left, top, right, bottom) as shares of its size, in PowerPoint's design or (`opf`) OPF's own: a chevron's larger
|
|
2792
|
+
* margin is at its start (the right when `rtl`).
|
|
2793
|
+
*/
|
|
2794
|
+
declare function linearMargins(kind: LinearArrangement, rtl: boolean, opf?: boolean): [number, number, number, number];
|
|
2795
|
+
|
|
2796
|
+
/** The 187 DrawingML preset names (ECMA-376 ST_ShapeType), without loading their geometry. */
|
|
2797
|
+
declare const SHAPE_PRESETS: readonly string[];
|
|
2798
|
+
/** Whether `name` is one of the 187 preset names. */
|
|
2799
|
+
declare const isPresetShape: (name: unknown) => name is string;
|
|
2800
|
+
/**
|
|
2801
|
+
* The four picture masks core draws without SH-01's preset geometry (FA-22's masks, the ECMA-376 formulas of rect, roundRect, ellipse
|
|
2802
|
+
* and hexagon), so a deck whose pictures use only these never loads the geometry in a browser. Every other preset, and every shape
|
|
2803
|
+
* block, needs the geometry: `ensureShapes` loads it where it is lazy.
|
|
2804
|
+
*/
|
|
2805
|
+
declare const BUILT_IN_MASKS: readonly string[];
|
|
2806
|
+
/**
|
|
2807
|
+
* SH-02: what a deck needs loaded before it composes in a browser or an edge runtime: `['shapes']` when it has a shape block or a
|
|
2808
|
+
* picture masked by a preset beyond the four built-in masks and the preset geometry is not loaded, else nothing. Node, Bun and Deno
|
|
2809
|
+
* load the geometry with core, so this is always empty there. With `diagrams` (SH-07: a PPTX export with `diagrams: "shapes"`, which fits
|
|
2810
|
+
* a diagram's node outlines to presets and reads their connection sites), a diagram needs the geometry too.
|
|
2811
|
+
*/
|
|
2812
|
+
declare function shapesPending(input: unknown, options?: {
|
|
2813
|
+
diagrams?: boolean;
|
|
2814
|
+
}): string[];
|
|
2815
|
+
/** SH-02: load the preset geometry when the deck needs it (shapesPending); returns what it loaded. Await it before composing in a browser. */
|
|
2816
|
+
declare function ensureShapes(input: unknown, options?: {
|
|
2817
|
+
diagrams?: boolean;
|
|
2818
|
+
}): Promise<string[]>;
|
|
2819
|
+
interface Box$1 {
|
|
2820
|
+
x: number;
|
|
2821
|
+
y: number;
|
|
2822
|
+
width: number;
|
|
2823
|
+
height: number;
|
|
2824
|
+
}
|
|
2825
|
+
type Rec = Record<string, any>;
|
|
2826
|
+
/** The theme shape styles (`style`), as PowerPoint's shape style gallery. */
|
|
2827
|
+
declare const SHAPE_STYLES: readonly ["none", "subtle", "moderate", "intense"];
|
|
2828
|
+
type ShapeStyleName = typeof SHAPE_STYLES[number];
|
|
2829
|
+
/** The style a shape takes when it names none: PowerPoint's default shape style, a solid accent fill with a darker line. */
|
|
2830
|
+
declare const DEFAULT_SHAPE_STYLE: ShapeStyleName;
|
|
2831
|
+
/** The six effect keys (SH-03 draws them). */
|
|
2832
|
+
declare const SHAPE_EFFECT_KEYS: readonly ["shadow", "innerShadow", "glow", "softEdge", "reflection", "blur"];
|
|
2833
|
+
/** Keys only a shape block takes (an image block also takes `shape`, `adjust`, `stroke`, `opacity` and `aspectRatio`). */
|
|
2834
|
+
declare const SHAPE_BLOCK_KEYS: readonly ["path", "fill", "style", "rotate", "flip", "anchor", "padding", "textDirection", "alt", "decorative", "hidden", "link", "shadow", "innerShadow", "glow", "softEdge", "reflection", "blur"];
|
|
2835
|
+
/** A line's default width on a shape: 1 point, PowerPoint's default line, in reference pixels. */
|
|
2836
|
+
declare const SHAPE_STROKE_WIDTH: number;
|
|
2837
|
+
/** A picture's line width when its stroke names none. */
|
|
2838
|
+
declare const PICTURE_STROKE_WIDTH = 2;
|
|
2839
|
+
/** PowerPoint's default text insets (0.1 inch left and right, 0.05 inch top and bottom), in reference pixels. */
|
|
2840
|
+
declare const SHAPE_PADDING: {
|
|
2841
|
+
readonly top: 4.8;
|
|
2842
|
+
readonly right: 9.6;
|
|
2843
|
+
readonly bottom: 4.8;
|
|
2844
|
+
readonly left: 9.6;
|
|
2845
|
+
};
|
|
2846
|
+
/** The default frame aspect (width / height) of a preset: 1 for the round and regular shapes, 2 for horizontal arrows and bands, 0.5 for vertical ones, 1.5 otherwise. */
|
|
2847
|
+
declare function presetAspect(preset: string | undefined): number;
|
|
2848
|
+
/** Whether a payload is a shape block: it names a preset with no `image`, or a custom `path`, and is no group. */
|
|
2849
|
+
declare function isShapeBlock(host: unknown): boolean;
|
|
2850
|
+
/** SVG path data (absolute commands, as SH-01 writes them) moved by dx, dy. Arc radii and flags stay; only points move. */
|
|
2851
|
+
declare function translatePathData(d: string, dx: number, dy: number): string;
|
|
2852
|
+
/** A frame mask or a shape's outline as one SVG path in slide coordinates: the preset's paths that take the fill, joined. */
|
|
2853
|
+
interface ShapeOutline {
|
|
2854
|
+
/** The DrawingML preset (an image mask always names one). */
|
|
2855
|
+
preset: string;
|
|
2856
|
+
/** DrawingML avLst guide values (1/100000 and 60000ths), for `a:prstGeom/a:avLst`. */
|
|
2857
|
+
adjust: Record<string, number>;
|
|
2858
|
+
/** The filled outline in slide coordinates. */
|
|
2859
|
+
path: string;
|
|
2860
|
+
}
|
|
2861
|
+
/**
|
|
2862
|
+
* An image frame's mask (FA-22, SH-02): `preset` (default rect) with the block's `adjust` (OPF units) at `box`, the DrawingML values
|
|
2863
|
+
* for export and the outline the preview clips to, from SH-01's preset geometry. An unknown preset is a rectangle.
|
|
2864
|
+
*/
|
|
2865
|
+
declare function presetMask(preset: unknown, box: Box$1, adjust?: Record<string, number>): ShapeOutline & {
|
|
2866
|
+
kind: string;
|
|
2867
|
+
};
|
|
2868
|
+
/** A validation issue of a shape or image block's `shape`/`adjust` (schema-check reports them). */
|
|
2869
|
+
interface ShapeIssue {
|
|
2870
|
+
path: string;
|
|
2871
|
+
code: 'shape-adjust-unknown' | 'shape-adjust-range' | 'shape-link-hidden';
|
|
2872
|
+
message: string;
|
|
2873
|
+
params: Record<string, unknown>;
|
|
2874
|
+
}
|
|
2875
|
+
/**
|
|
2876
|
+
* The findings of one block's preset and adjust values, and of a link on a hidden shape: an adjust name the preset does not have, a
|
|
2877
|
+
* value outside the preset's range (checked at the default square size; a range that depends on the size is checked there too), and
|
|
2878
|
+
* `link` with `hidden: true`. `at` builds a JSON Pointer under the block.
|
|
2879
|
+
*/
|
|
2880
|
+
declare function shapeIssues(host: unknown, at: (...keys: string[]) => string): ShapeIssue[];
|
|
2881
|
+
interface ComposedGradientStop {
|
|
2882
|
+
color: unknown;
|
|
2883
|
+
position: number;
|
|
2884
|
+
}
|
|
2885
|
+
interface ComposedGradient {
|
|
2886
|
+
type: 'linear' | 'radial' | 'rectangle' | 'shape';
|
|
2887
|
+
angle: number;
|
|
2888
|
+
stops: ComposedGradientStop[];
|
|
2889
|
+
}
|
|
2890
|
+
/** A resolved fill; ColorRefs stay as authored (engines resolve them). `opacity` multiplies the colors' own alpha. */
|
|
2891
|
+
type ComposedFill = {
|
|
2892
|
+
type: 'none';
|
|
2893
|
+
} | {
|
|
2894
|
+
type: 'solid';
|
|
2895
|
+
color: unknown;
|
|
2896
|
+
opacity?: number;
|
|
2897
|
+
} | {
|
|
2898
|
+
type: 'gradient';
|
|
2899
|
+
gradient: ComposedGradient;
|
|
2900
|
+
opacity?: number;
|
|
2901
|
+
} | {
|
|
2902
|
+
type: 'pattern';
|
|
2903
|
+
preset: string;
|
|
2904
|
+
foreground?: unknown;
|
|
2905
|
+
background?: unknown;
|
|
2906
|
+
opacity?: number;
|
|
2907
|
+
};
|
|
2908
|
+
interface ComposedArrowhead {
|
|
2909
|
+
type: 'triangle' | 'stealth' | 'diamond' | 'oval' | 'arrow';
|
|
2910
|
+
width: 'small' | 'medium' | 'large';
|
|
2911
|
+
length: 'small' | 'medium' | 'large';
|
|
2912
|
+
}
|
|
2913
|
+
interface ComposedStroke {
|
|
2914
|
+
/** ColorRef as authored; absent means the engine's neutral line color (a picture with no color). */
|
|
2915
|
+
color?: unknown;
|
|
2916
|
+
gradient?: ComposedGradient;
|
|
2917
|
+
/** Reference pixels, scaled to the canvas. */
|
|
2918
|
+
width: number;
|
|
2919
|
+
/** A DrawingML preset dash, or dash and gap lengths in stroke widths. */
|
|
2920
|
+
dash: string | number[];
|
|
2921
|
+
cap: 'flat' | 'round' | 'square';
|
|
2922
|
+
join: 'miter' | 'round' | 'bevel';
|
|
2923
|
+
miterLimit: number;
|
|
2924
|
+
compound: 'single' | 'double' | 'thickThin' | 'thinThick' | 'triple';
|
|
2925
|
+
align: 'center' | 'inside';
|
|
2926
|
+
start?: ComposedArrowhead;
|
|
2927
|
+
end?: ComposedArrowhead;
|
|
2928
|
+
sketch?: 'curved' | 'freehand' | 'scribble';
|
|
2929
|
+
/**
|
|
2930
|
+
* With `sketch`: the sketch both engines draw instead of the outline (shape-sketch.ts), with PowerPoint's seed (`sd`). One entry per
|
|
2931
|
+
* outline path (a shape's paths in order; a picture's mask), path data in slide pixels: `lines`, what the line strokes (null for a path
|
|
2932
|
+
* without a line), and `fills`, the sketched outline a stroked path's fill fills (null: the path itself).
|
|
2933
|
+
*/
|
|
2934
|
+
sketched?: {
|
|
2935
|
+
seed: number;
|
|
2936
|
+
lines: (string | null)[];
|
|
2937
|
+
fills: (string | null)[];
|
|
2938
|
+
};
|
|
2939
|
+
}
|
|
2940
|
+
/**
|
|
2941
|
+
* What a theme style draws, as PowerPoint's shape styles on the theme's accent1 (Format > Shape Styles):
|
|
2942
|
+
* - subtle: "Light 1 Fill, Colored Outline": accent1 at 80% lighter, a 1 pt accent1 line, dark text (p:style lnRef 2, fillRef 1).
|
|
2943
|
+
* - moderate (the default): "Colored Fill": accent1, a 1 pt accent1 line 50% darker, light text (lnRef 2 with shade, fillRef 1).
|
|
2944
|
+
* - intense: "Intense Effect": accent1 25% darker, no line, bold light text and the soft shadow (lnRef 0, fillRef 1, effectRef 2).
|
|
2945
|
+
* - none: nothing the author did not set; text in the slide's text color.
|
|
2946
|
+
* `ref` is the `p:style` an export writes (the idx of each reference and its color), so PowerPoint shows the style as applied.
|
|
2947
|
+
*/
|
|
2948
|
+
interface ShapeStyleLook {
|
|
2949
|
+
fill: unknown;
|
|
2950
|
+
stroke?: {
|
|
2951
|
+
color: unknown;
|
|
2952
|
+
width: number;
|
|
2953
|
+
};
|
|
2954
|
+
text: unknown;
|
|
2955
|
+
bold: boolean;
|
|
2956
|
+
shadow?: 'soft';
|
|
2957
|
+
ref?: {
|
|
2958
|
+
line: {
|
|
2959
|
+
idx: number;
|
|
2960
|
+
color: unknown;
|
|
2961
|
+
};
|
|
2962
|
+
fill: {
|
|
2963
|
+
idx: number;
|
|
2964
|
+
color: unknown;
|
|
2965
|
+
};
|
|
2966
|
+
effect: {
|
|
2967
|
+
idx: number;
|
|
2968
|
+
color: unknown;
|
|
2969
|
+
};
|
|
2970
|
+
font: {
|
|
2971
|
+
idx: 'minor';
|
|
2972
|
+
color: unknown;
|
|
2973
|
+
};
|
|
2974
|
+
};
|
|
2975
|
+
}
|
|
2976
|
+
declare function shapeStyleLook(style: ShapeStyleName): ShapeStyleLook;
|
|
2977
|
+
/** One evaluated path of a shape, in slide coordinates (before rotation and flip, which engines apply about the frame's center). */
|
|
2978
|
+
interface ComposedShapePath {
|
|
2979
|
+
d: string;
|
|
2980
|
+
fill: ShapePathFill;
|
|
2981
|
+
stroke: boolean;
|
|
2982
|
+
/** True when the path does not end with Z: arrowheads draw at its ends. */
|
|
2983
|
+
open: boolean;
|
|
2984
|
+
/** An open path's two ends in slide coordinates, each with the direction (degrees, clockwise from +x) a line leaves the path there. */
|
|
2985
|
+
ends?: {
|
|
2986
|
+
start: ShapeEnd;
|
|
2987
|
+
end: ShapeEnd;
|
|
2988
|
+
};
|
|
2989
|
+
/**
|
|
2990
|
+
* For a filled path of a shape whose `shapeGradient` is `outline`: one polygon in slide coordinates, star-shaped about the center of
|
|
2991
|
+
* `gradientBox`, whose copies scaled about that center are the gradient's contours (the path itself when it is star-shaped from the
|
|
2992
|
+
* center, otherwise its radial envelope: along each ray from the center the farthest point of the outline).
|
|
2993
|
+
*/
|
|
2994
|
+
gradientOutline?: [number, number][][];
|
|
2995
|
+
}
|
|
2996
|
+
/** One end of an open path: the point, and the outward direction of the line there in degrees (clockwise from the positive x axis). */
|
|
2997
|
+
interface ShapeEnd {
|
|
2998
|
+
x: number;
|
|
2999
|
+
y: number;
|
|
3000
|
+
angle: number;
|
|
3001
|
+
}
|
|
3002
|
+
/**
|
|
3003
|
+
* The drawing of a shape block (`ComposedItem.shape`, `field` shape). Paint order: the paths in order (each filled in its mode,
|
|
3004
|
+
* `lighten` and `darken` shading the fill, then stroked where `stroke` is set), then the effects (SH-03), then the text.
|
|
3005
|
+
*/
|
|
3006
|
+
interface ComposedShape {
|
|
3007
|
+
/** Allocated region (the cell). */
|
|
3008
|
+
region: Box$1;
|
|
3009
|
+
/** The frame: the largest box of the shape's aspect centered in the region (or the region itself for an aspect of 0). */
|
|
3010
|
+
box: Box$1;
|
|
3011
|
+
/** The DrawingML preset, absent for a custom path. */
|
|
3012
|
+
preset?: string;
|
|
3013
|
+
/** In a browser or edge runtime before `ensureShapes`: the preset geometry is still loading, so `paths` is empty (engines draw no outline). */
|
|
3014
|
+
loading?: true;
|
|
3015
|
+
/**
|
|
3016
|
+
* For a gradient fill: the box the gradient spans, the bounds of the shape's whole outline in slide coordinates (PowerPoint lays a
|
|
3017
|
+
* gradient across the geometry's bounds, which for most presets are the frame and for `arc`, `blockArc` and the like are smaller).
|
|
3018
|
+
*/
|
|
3019
|
+
gradientBox?: Box$1;
|
|
3020
|
+
/**
|
|
3021
|
+
* How a `shape` gradient fill is drawn, as PowerPoint draws it: `outline`, contours that are the outline scaled about the center of
|
|
3022
|
+
* `gradientBox` (each filled path's `gradientOutline`), or `circle`, PowerPoint's circle gradient (some presets and every custom path).
|
|
3023
|
+
*/
|
|
3024
|
+
shapeGradient?: 'outline' | 'circle';
|
|
3025
|
+
/** The custom outline as authored (`path`), absent for a preset. */
|
|
3026
|
+
custom?: CustomPathInput;
|
|
3027
|
+
/** The adjust values drawn (valid OPF values), and the same in DrawingML units for `a:avLst`. */
|
|
3028
|
+
adjust: Record<string, number>;
|
|
3029
|
+
avLst: Record<string, number>;
|
|
3030
|
+
paths: ComposedShapePath[];
|
|
3031
|
+
/** The preset's text rectangle in slide coordinates. */
|
|
3032
|
+
textRect: Box$1;
|
|
3033
|
+
/** Insets inside it (scaled reference pixels). */
|
|
3034
|
+
padding: {
|
|
3035
|
+
top: number;
|
|
3036
|
+
right: number;
|
|
3037
|
+
bottom: number;
|
|
3038
|
+
left: number;
|
|
3039
|
+
};
|
|
3040
|
+
/** The text rectangle less the insets: where the text is fitted (for vertical text, the box turned about its center). */
|
|
3041
|
+
textBox: Box$1;
|
|
3042
|
+
anchor: 'top' | 'middle' | 'bottom';
|
|
3043
|
+
/** Where the fitted text block is drawn: `textBox` narrowed to the text's height at the anchor (present when the shape has text). */
|
|
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';
|
|
3050
|
+
textDirection: 'horizontal' | 'vertical' | 'vertical270' | 'stacked';
|
|
3051
|
+
style: ShapeStyleName;
|
|
3052
|
+
/** The style's PowerPoint references (absent for style none). */
|
|
3053
|
+
styleRef?: ShapeStyleLook['ref'];
|
|
3054
|
+
fill: ComposedFill;
|
|
3055
|
+
stroke?: ComposedStroke;
|
|
3056
|
+
/** The color the text prefers (the style's), before `shapeTextColor` checks its contrast with the fill. */
|
|
3057
|
+
textColor: unknown;
|
|
3058
|
+
/** The ColorRef the text sits on: the fill's color (a gradient's middle stop, a pattern's background), absent on a transparent shape. */
|
|
3059
|
+
textBackdrop?: unknown;
|
|
3060
|
+
textBold: boolean;
|
|
3061
|
+
rotate?: number;
|
|
3062
|
+
flipH?: boolean;
|
|
3063
|
+
flipV?: boolean;
|
|
3064
|
+
alt?: string;
|
|
3065
|
+
decorative?: true;
|
|
3066
|
+
hidden?: true;
|
|
3067
|
+
link?: string;
|
|
3068
|
+
/** The effects to draw (the author's, and the soft shadow of the intense style): SH-03's drawEffects reads them. */
|
|
3069
|
+
effects?: Partial<Record<typeof SHAPE_EFFECT_KEYS[number], unknown>>;
|
|
3070
|
+
/** With `effects`: canvas pixels per reference pixel (min(width, height) / 720), the scale of the effects' lengths in both engines. */
|
|
3071
|
+
effectScale?: number;
|
|
3072
|
+
}
|
|
3073
|
+
/**
|
|
3074
|
+
* The geometry and look of a shape block in its `region` (the cell): the frame (the block's `aspectRatio`, else the preset's
|
|
3075
|
+
* aspect, as the largest centered box; `fill: true` in `options` takes the whole region), the evaluated paths, the text rectangle
|
|
3076
|
+
* and insets, and the effective fill, stroke, text color and effects. Text is fitted by composition in `textBox`.
|
|
3077
|
+
*/
|
|
3078
|
+
declare function composeShape(host: Rec, region: Box$1, options: {
|
|
3079
|
+
scale: number;
|
|
3080
|
+
aspect?: number;
|
|
3081
|
+
anchorY?: 'top' | 'middle' | 'bottom';
|
|
3082
|
+
}): ComposedShape;
|
|
3083
|
+
/**
|
|
3084
|
+
* LH-151 for shapes: the text color an engine draws on `backdrop` (the resolved fill under the text, #RRGGBB): the style's `preferred`
|
|
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
|
|
3086
|
+
* bg1, so the export writes a theme color) reads better.
|
|
3087
|
+
*/
|
|
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
|
+
};
|
|
2047
3302
|
}
|
|
3303
|
+
|
|
2048
3304
|
/**
|
|
2049
|
-
*
|
|
2050
|
-
*
|
|
3305
|
+
* Overlay shapes and connectors (shapes SH-04): a slide's `shapes` array, drawn over the composed slide in array order (later entries on
|
|
3306
|
+
* top), above the content and the furniture. Nothing here moves content: the overlay is placed against the slide's final composition.
|
|
3307
|
+
*
|
|
3308
|
+
* - An overlay shape has the shape block vocabulary of SH-02 and one placement: `x`, `y`, `width`, `height` (fractions of the slide; `x`
|
|
3309
|
+
* from the right edge in a right-to-left deck) or `at` (outside an edge of a composed block, or on its center). It composes through
|
|
3310
|
+
* SH-02's `composeShape`, and its text is fitted by composition as a shape block's is, so engines draw it with the shape block's code.
|
|
3311
|
+
* - A connector joins two ends (blocks or overlay shapes) at connection sites: a preset's own (SH-01's `connectionSites`, turned and flipped
|
|
3312
|
+
* with the shape) or a rectangle's four edge midpoints. Core routes it once as PowerPoint's connector presets (`straightConnector1`,
|
|
3313
|
+
* `bentConnector2`/`bentConnector3`, `curvedConnector2`/`curvedConnector3`) with their `a:xfrm` (box, rotation, flips) and `a:avLst`, and
|
|
3314
|
+
* evaluates the preset's own path through that transform, so the preview draws exactly the line PowerPoint draws from the export.
|
|
3315
|
+
*
|
|
3316
|
+
* The text fitter comes from composition (`composeOverlayShapes`' `item` callback), so this module imports composition's types only.
|
|
2051
3317
|
*/
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
}
|
|
2057
|
-
/**
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
3318
|
+
|
|
3319
|
+
interface Point {
|
|
3320
|
+
x: number;
|
|
3321
|
+
y: number;
|
|
3322
|
+
}
|
|
3323
|
+
/** The routes of a connector (`connector.route`). */
|
|
3324
|
+
declare const CONNECTOR_ROUTES: readonly ["straight", "elbow", "curved"];
|
|
3325
|
+
type ConnectorRoute = typeof CONNECTOR_ROUTES[number];
|
|
3326
|
+
/** The DrawingML connector presets core routes with: one segment, an elbow of two or three segments, a curve of one or two cubics. */
|
|
3327
|
+
type ConnectorPreset = 'straightConnector1' | 'bentConnector2' | 'bentConnector3' | 'curvedConnector2' | 'curvedConnector3';
|
|
3328
|
+
/** A connector's default line width, in reference pixels (1.5 pt). */
|
|
3329
|
+
declare const CONNECTOR_STROKE_WIDTH = 2;
|
|
3330
|
+
/** A connector's default line color: the slide's text color, which reads on the slide's background. */
|
|
3331
|
+
declare const CONNECTOR_STROKE_COLOR = "text";
|
|
3332
|
+
/**
|
|
3333
|
+
* How far an elbow or curved connector runs past a shape before it turns back, in reference pixels, when both ends face the same way (a U
|
|
3334
|
+
* route) or a site faces away from the other end.
|
|
3335
|
+
*/
|
|
3336
|
+
declare const CONNECTOR_STANDOFF = 24;
|
|
3337
|
+
/** An `at` shape's default shorter side: this share of the block's shorter side. */
|
|
3338
|
+
declare const OVERLAY_ANCHOR_SHARE = 0.15;
|
|
3339
|
+
/** The edges of `at`. */
|
|
3340
|
+
declare const OVERLAY_EDGES: readonly ["top", "bottom", "start", "end", "center"];
|
|
3341
|
+
type OverlayEdge = typeof OVERLAY_EDGES[number];
|
|
3342
|
+
/** Whether a `shapes` entry is a connector (it has `connector`); every other entry is an overlay shape. */
|
|
3343
|
+
declare const isOverlayConnector: (entry: unknown) => boolean;
|
|
3344
|
+
/**
|
|
3345
|
+
* The preset whose adjust values a connector's `adjust` names: `bentConnector3` for an elbow, `curvedConnector3` for a curve (their
|
|
3346
|
+
* `adj1`; the two-segment presets between perpendicular sites have none), `straightConnector1` (none) for a straight line.
|
|
3347
|
+
*/
|
|
3348
|
+
declare function connectorAdjustPreset(entry: unknown): 'straightConnector1' | 'bentConnector3' | 'curvedConnector3';
|
|
3349
|
+
/** Whether a slide has overlay shapes or connectors to compose. */
|
|
3350
|
+
declare const hasOverlayShapes: (slide: unknown) => boolean;
|
|
3351
|
+
/** A connection site in slide coordinates: the point and the direction (degrees clockwise from +x, y down) a connector leaves it. */
|
|
3352
|
+
interface ConnectionSite {
|
|
3353
|
+
x: number;
|
|
3354
|
+
y: number;
|
|
3355
|
+
angle: number;
|
|
3356
|
+
}
|
|
3357
|
+
/** The four sites of a rectangle (DrawingML's rect: 0 top, 1 left, 2 bottom, 3 right), for a block that is not a shape. */
|
|
3358
|
+
declare function rectSites(box: LayoutBox): ConnectionSite[];
|
|
2071
3359
|
/**
|
|
2072
|
-
*
|
|
2073
|
-
*
|
|
3360
|
+
* The connection sites of a composed shape (a shape block's `ComposedItem.shape` or an overlay shape's) in slide coordinates: the preset's
|
|
3361
|
+
* own (SH-01 `presetGeometry(...).connectionSites` at the frame's size with its adjust values) or a custom path's four edge midpoints, turned
|
|
3362
|
+
* and flipped with the shape. Undefined while the preset geometry is loading (a browser before `ensureShapes`).
|
|
2074
3363
|
*/
|
|
2075
|
-
declare function
|
|
3364
|
+
declare function shapeSites(shape: ComposedShape): ConnectionSite[] | undefined;
|
|
2076
3365
|
/**
|
|
2077
|
-
*
|
|
2078
|
-
*
|
|
3366
|
+
* A connector's frame as DrawingML writes it (`a:xfrm`): the unrotated `box` (`a:off`, `a:ext`), the rotation and the flips. The preset's
|
|
3367
|
+
* path is evaluated in a box of the frame's size and mapped through `frameToSlide`, flipped first and then rotated about the box's center.
|
|
2079
3368
|
*/
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
3369
|
+
interface ConnectorFrame {
|
|
3370
|
+
box: LayoutBox;
|
|
3371
|
+
rotate: 0 | 90 | 270;
|
|
3372
|
+
flipH: boolean;
|
|
3373
|
+
flipV: boolean;
|
|
3374
|
+
}
|
|
3375
|
+
/** A point of a frame's own coordinates (0,0 the frame's top-left corner before the flips and the rotation) in slide coordinates. */
|
|
3376
|
+
declare function frameToSlide(frame: ConnectorFrame, x: number, y: number): Point;
|
|
3377
|
+
/** A routed connector: its preset, frame, adjust values (OPF fractions and DrawingML integers) and its path in slide coordinates. */
|
|
3378
|
+
interface ConnectorRouteGeometry {
|
|
3379
|
+
preset: ConnectorPreset;
|
|
3380
|
+
frame: ConnectorFrame;
|
|
3381
|
+
/** OPF units (fractions of the frame's width), as `a:avLst` divides them: `{ adj1: 0.5 }`. */
|
|
3382
|
+
adjust: Record<string, number>;
|
|
3383
|
+
/** The same in DrawingML's integers (100000ths). */
|
|
3384
|
+
avLst: Record<string, number>;
|
|
3385
|
+
/** The route as SVG path data in slide coordinates (absolute M, L and C commands). */
|
|
3386
|
+
d: string;
|
|
3387
|
+
/** The route's two ends, each with the direction (degrees) a line leaves the path there, for arrowheads. */
|
|
3388
|
+
ends?: {
|
|
3389
|
+
start: ShapeEnd;
|
|
3390
|
+
end: ShapeEnd;
|
|
3391
|
+
};
|
|
3392
|
+
/** The route's length along its segments (curves along their elbow), and whether it leaves each site outward and enters the far one from outside. */
|
|
3393
|
+
length: number;
|
|
3394
|
+
proper: boolean;
|
|
3395
|
+
/** The bounds of the route (a U route reaches past its frame). */
|
|
3396
|
+
bounds: LayoutBox;
|
|
3397
|
+
}
|
|
2083
3398
|
/**
|
|
2084
|
-
* The
|
|
2085
|
-
*
|
|
2086
|
-
*
|
|
2087
|
-
* - 1 to 6: `accent1` to `accent6`. A slot the scheme leaves out takes the engine default scheme's slot.
|
|
2088
|
-
* - 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`
|
|
2089
|
-
* is series 7), for charts with more than six series.
|
|
3399
|
+
* The route of a connector from site `from` to site `to` (slide coordinates), as PowerPoint's preset for `route`. `scale` is canvas pixels
|
|
3400
|
+
* per reference pixel (min(width, height) / 720). Undefined while the preset geometry is loading.
|
|
2090
3401
|
*
|
|
2091
|
-
*
|
|
2092
|
-
*
|
|
2093
|
-
*
|
|
2094
|
-
*
|
|
2095
|
-
*
|
|
3402
|
+
* - straight: `straightConnector1` from one site to the other.
|
|
3403
|
+
* - elbow: between sites along the same axis `bentConnector3`, its middle segment halfway between the sites (`adj1` 0.5 of the frame) or,
|
|
3404
|
+
* when both face the same way, CONNECTOR_STANDOFF past the farther one (adj1 beyond 0 to 1, a U); between perpendicular sites
|
|
3405
|
+
* `bentConnector2`, an L through the corner. The sites' directions are taken to the nearest axis.
|
|
3406
|
+
* - curved: the same as `curvedConnector3` and `curvedConnector2`: the curve through the elbow's middle line, tangent to the sites' axes.
|
|
2096
3407
|
*
|
|
2097
|
-
*
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
*/
|
|
2101
|
-
declare function chartSeriesPalette(colorScheme?: Record<string, unknown>, colors?: unknown, context?: ChartColorContext): string[];
|
|
2102
|
-
/**
|
|
2103
|
-
* 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
|
|
2104
|
-
* when `colors[i]` is absent or cannot be resolved, so the series keeps the scheme colour of its position. These are the series
|
|
2105
|
-
* {@link chartPaletteForFill} lifts to 4.5:1 on a dark surface (`options.legible`). The list covers the palette {@link chartSeriesPalette}
|
|
2106
|
-
* returns for the same arguments (twelve entries, more when `colors` is longer).
|
|
2107
|
-
*/
|
|
2108
|
-
declare function chartSchemeSeries(colors: unknown, colorScheme?: Record<string, unknown>, context?: ChartColorContext): boolean[];
|
|
2109
|
-
/** What a `chart.colors` entry resolves against: the deck's role colours and `variables`, as for any ColorRef. */
|
|
2110
|
-
interface ChartColorContext {
|
|
2111
|
-
/** RR-96: the variant's accent order (`roles.map.accents`): series 1 to 6 take these slots in this order. Default: accent1 to accent6. */
|
|
2112
|
-
accents?: readonly ColorAccentSlot[];
|
|
2113
|
-
roles?: ResolveColorRefRoles;
|
|
2114
|
-
variables?: Record<string, unknown>;
|
|
2115
|
-
}
|
|
2116
|
-
/**
|
|
2117
|
-
* The opaque #RRGGBB colour of each `chart.colors` entry (a hex colour, a colour-scheme slot or role, or a `var:<id>` variable), in
|
|
2118
|
-
* 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
|
|
2119
|
-
* dropped. `colors` that is not an array resolves to an empty list.
|
|
2120
|
-
*/
|
|
2121
|
-
declare function resolveChartColors(colors: unknown, colorScheme?: Record<string, unknown>, context?: ChartColorContext): (string | undefined)[];
|
|
2122
|
-
/** Share of the text colour mixed into the surface to make the muted colour of a highlighted chart. */
|
|
2123
|
-
declare const CHART_HIGHLIGHT_MUTED_MIX = 0.3;
|
|
2124
|
-
/** Smallest contrast the muted colour keeps against the surface: recessive, but still a visible mark. */
|
|
2125
|
-
declare const CHART_HIGHLIGHT_MUTED_MIN_CONTRAST = 1.6;
|
|
2126
|
-
/** LH-105: the colour difference (CIE76) a context gray keeps from every focused colour. */
|
|
2127
|
-
declare const CHART_CONTEXT_FOCUS_DIFFERENCE = 20;
|
|
2128
|
-
/** 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). */
|
|
2129
|
-
declare const CHART_CONTEXT_MIN_CONTRAST = 3;
|
|
2130
|
-
/**
|
|
2131
|
-
* 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,
|
|
2132
|
-
* 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
|
|
2133
|
-
* context can be the light neutral Few draws, still clearly visible.
|
|
2134
|
-
*/
|
|
2135
|
-
declare const CHART_CONTEXT_LABELED_MIN_CONTRAST = 1.6;
|
|
2136
|
-
/**
|
|
2137
|
-
* 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
|
|
2138
|
-
* mixed towards the text colour (tx1), from {@link CHART_HIGHLIGHT_MUTED_MIX} in 2% steps until it reaches
|
|
2139
|
-
* {@link CHART_CONTEXT_MIN_CONTRAST} against the backdrop. A grey in the backdrop's own hue, quieter than the text, visible as a mark.
|
|
2140
|
-
* The first of {@link chartContextColors}.
|
|
2141
|
-
*/
|
|
2142
|
-
declare function chartContextColor(surface: string, text: string): string;
|
|
2143
|
-
/**
|
|
2144
|
-
* LH-105: the neutrals of `count` context series (or slices) of a focused chart, in the order the context series come: grays in the
|
|
2145
|
-
* 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
|
|
2146
|
-
* 1% steps) that reaches the contrast floor against the backdrop ({@link CHART_CONTEXT_MIN_CONTRAST}, or
|
|
2147
|
-
* {@link CHART_CONTEXT_LABELED_MIN_CONTRAST} when `labeled`: every context mark carries its text) and keeps a colour difference of
|
|
2148
|
-
* {@link CHART_CONTEXT_FOCUS_DIFFERENCE} (CIE76) from each `avoid` colour (the focused colours: a gray stands apart from a coloured focus by
|
|
2149
|
-
* 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
|
|
2150
|
-
* difference from the `avoid` colours. The first context series takes the strongest step and the last the lightest,
|
|
2151
|
-
* so neighbouring context series (stacked segments, slices) are told apart by lightness, as the focused series are by hue. When the mix
|
|
2152
|
-
* runs out of room (a dark text colour close to the backdrop), the remaining series repeat the strongest step.
|
|
2153
|
-
*/
|
|
2154
|
-
declare function chartContextColors(surface: string, text: string, count: number, options?: {
|
|
2155
|
-
labeled?: boolean;
|
|
2156
|
-
avoid?: readonly string[];
|
|
2157
|
-
}): string[];
|
|
3408
|
+
* `own` is the connector's authored `adjust` (OPF units): its `adj1` replaces the automatic middle of a three-segment route.
|
|
3409
|
+
*/
|
|
3410
|
+
declare function connectorRoute(route: ConnectorRoute, from: ConnectionSite, to: ConnectionSite, scale?: number, own?: Record<string, number>): ConnectorRouteGeometry | undefined;
|
|
2158
3411
|
/**
|
|
2159
|
-
*
|
|
2160
|
-
*
|
|
2161
|
-
*
|
|
2162
|
-
* color (made legible on the backdrop: the strong neutral on a dark slide). `decrease` is the first context neutral
|
|
2163
|
-
* ({@link chartContextColors}), kept apart from the other two; `labeled` (every bar carries its signed value) lets it be the light gray.
|
|
3412
|
+
* The sites a connector joins: `fromSite` and `toSite` where given and in range, else the pair whose route is best: sites that face each
|
|
3413
|
+
* other (opposite directions) with a proper route (leaving each site outward), then any proper route, then any; the shortest of those.
|
|
3414
|
+
* An elbow or curve considers only sites along an axis when the shape has some. `same` is true when both ends are one shape (no site joins itself).
|
|
2164
3415
|
*/
|
|
2165
|
-
declare function
|
|
2166
|
-
|
|
3416
|
+
declare function chooseConnectorSites(route: ConnectorRoute, fromSites: readonly ConnectionSite[], toSites: readonly ConnectionSite[], options?: {
|
|
3417
|
+
fromSite?: number;
|
|
3418
|
+
toSite?: number;
|
|
3419
|
+
scale?: number;
|
|
3420
|
+
same?: boolean;
|
|
2167
3421
|
}): {
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
};
|
|
2172
|
-
/** LH-110: how far the shaded band of a period the title names is mixed from the backdrop towards the text color. */
|
|
2173
|
-
declare const CHART_BAND_MIX = 0.06;
|
|
2174
|
-
/** 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. */
|
|
2175
|
-
declare function chartBandColor(surface: string, text: string): string;
|
|
3422
|
+
from: number;
|
|
3423
|
+
to: number;
|
|
3424
|
+
geometry: ConnectorRouteGeometry;
|
|
3425
|
+
} | undefined;
|
|
2176
3426
|
/**
|
|
2177
|
-
*
|
|
2178
|
-
*
|
|
2179
|
-
*
|
|
2180
|
-
* - `accent` is the deck's primary colour, kept at >= 3:1 against the surface by `chartColorForFill` (a primary that already has
|
|
2181
|
-
* that contrast is returned unchanged).
|
|
2182
|
-
* - `muted` is the surface mixed {@link CHART_HIGHLIGHT_MUTED_MIX} of the way towards the text colour: a light grey on a light surface
|
|
2183
|
-
* 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
|
|
2184
|
-
* the surface (a surface and text that are close together) the mix moves towards the text colour until it holds.
|
|
2185
|
-
*
|
|
2186
|
-
* Pure arithmetic on opaque colours: the preview and the PPTX export both call it with the chart panel, the primary and the label
|
|
2187
|
-
* colour, so they draw and write the same two colours. An unresolved colour is replaced by white (surface), the surface's own
|
|
2188
|
-
* best contrast partner (text) or black (primary).
|
|
3427
|
+
* An overlay shape (`SlideComposition.overlayShapes`, `kind` shape): a shape block item (`field` shape) whose `shape` is SH-02's
|
|
3428
|
+
* ComposedShape, so engines draw it with the shape block's drawing; `path` is `slides.N.shapes.I`.
|
|
2189
3429
|
*/
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
/**
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
3430
|
+
interface ComposedOverlayShape extends ComposedItem {
|
|
3431
|
+
kind: 'shape';
|
|
3432
|
+
field: 'shape';
|
|
3433
|
+
shape: ComposedShape;
|
|
3434
|
+
/** The entry's index in the slide's `shapes`. */
|
|
3435
|
+
index: number;
|
|
3436
|
+
id?: string;
|
|
3437
|
+
/** For a shape placed by `at`: the block it follows (its id, the composed path of what it attaches to) and the physical edge. */
|
|
3438
|
+
attachedTo?: {
|
|
3439
|
+
id: string;
|
|
3440
|
+
ref: string;
|
|
3441
|
+
edge: 'top' | 'bottom' | 'left' | 'right' | 'center';
|
|
3442
|
+
chartPoint?: Omit<ChartPointGeometry, 'ok'>;
|
|
3443
|
+
};
|
|
3444
|
+
/** `front` (the default): over the slide, after its content and furniture; `back`: behind it, after the background and watermark, before the content. */
|
|
3445
|
+
layer: OverlayLayer;
|
|
3446
|
+
}
|
|
3447
|
+
/** The layers of overlay shapes (`layer`). Connectors are always in front. */
|
|
3448
|
+
declare const OVERLAY_LAYERS: readonly ["front", "back"];
|
|
3449
|
+
type OverlayLayer = typeof OVERLAY_LAYERS[number];
|
|
3450
|
+
/** One end of a connector. */
|
|
3451
|
+
interface ConnectorEnd {
|
|
3452
|
+
/** The id the connector names. */
|
|
3453
|
+
id: string;
|
|
3454
|
+
/**
|
|
3455
|
+
* What the end attaches to: the composed item path of a block (`slides.0.blocks.1.shape`, the item the PPTX export writes as one native
|
|
3456
|
+
* shape), a group's path (`slides.0.blocks.2`), or an overlay shape's path (`slides.0.shapes.3`).
|
|
3457
|
+
*/
|
|
3458
|
+
ref: string;
|
|
3459
|
+
/** `block` (a composed item), `group` (a group's box) or `shape` (an overlay shape). */
|
|
3460
|
+
target: 'block' | 'group' | 'shape';
|
|
3461
|
+
/** The connection site index (DrawingML's cxn idx) and the site. */
|
|
3462
|
+
site: number;
|
|
3463
|
+
point: Point;
|
|
3464
|
+
angle: number;
|
|
3465
|
+
}
|
|
3466
|
+
/**
|
|
3467
|
+
* A connector (`SlideComposition.overlayShapes`, `kind` connector): its route as PowerPoint's connector preset in its `a:xfrm` frame,
|
|
3468
|
+
* and the same route evaluated in slide coordinates (`paths[0]`, an open path with its ends), which engines stroke with SH-02's stroke
|
|
3469
|
+
* drawing (dash, compound, sketch and arrowheads).
|
|
3470
|
+
*/
|
|
3471
|
+
interface ComposedConnector {
|
|
3472
|
+
kind: 'connector';
|
|
3473
|
+
/** `slides.N.shapes.I`. */
|
|
3474
|
+
path: string;
|
|
3475
|
+
index: number;
|
|
3476
|
+
id?: string;
|
|
3477
|
+
route: ConnectorRoute;
|
|
3478
|
+
preset: ConnectorPreset;
|
|
3479
|
+
/** The unrotated frame (`a:off`, `a:ext`); `rotate`, `flipH` and `flipV` place the preset's path in it, as DrawingML does. */
|
|
3480
|
+
box: LayoutBox;
|
|
3481
|
+
rotate?: 90 | 270;
|
|
3482
|
+
flipH?: true;
|
|
3483
|
+
flipV?: true;
|
|
3484
|
+
/** OPF adjust values (fractions of the frame's width) and the same as DrawingML's `a:avLst` integers. */
|
|
3485
|
+
adjust: Record<string, number>;
|
|
3486
|
+
avLst: Record<string, number>;
|
|
3487
|
+
/** The route in slide coordinates: one open path (fill none) with its ends, as a shape's paths. Empty while the geometry loads. */
|
|
3488
|
+
paths: ComposedShapePath[];
|
|
3489
|
+
/** The bounds of the route. */
|
|
3490
|
+
bounds: LayoutBox;
|
|
3491
|
+
from: ConnectorEnd;
|
|
3492
|
+
to: ConnectorEnd;
|
|
3493
|
+
stroke?: ComposedStroke;
|
|
3494
|
+
alt?: string;
|
|
3495
|
+
decorative?: true;
|
|
3496
|
+
hidden?: true;
|
|
3497
|
+
}
|
|
3498
|
+
/** An entry of `SlideComposition.overlayShapes`, in draw order. */
|
|
3499
|
+
type ComposedOverlayEntry = ComposedOverlayShape | ComposedConnector;
|
|
3500
|
+
/** Every block id of a slide with its dotted path (`slides.0.blocks.1.blocks.0`), in document order; the first of a repeated id wins. */
|
|
3501
|
+
declare function slideBlockIds(slide: unknown, slidePath: string): Map<string, string>;
|
|
3502
|
+
/** A validation issue of a slide's `shapes` (schema-check reports them); `code` absent means an opf/schema error. */
|
|
3503
|
+
interface OverlayIssue {
|
|
3504
|
+
path: string;
|
|
3505
|
+
message: string;
|
|
3506
|
+
code?: 'shape-anchor-missing' | 'connector-end-missing';
|
|
3507
|
+
params: Record<string, unknown>;
|
|
3508
|
+
}
|
|
3509
|
+
/**
|
|
3510
|
+
* The findings of a slide's `shapes`: an overlay shape with both placements or none (opf/schema), an `at` block that is not on the slide
|
|
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
|
|
3512
|
+
* the end's shape does not have (opf/schema). `slidePath` is the slide's JSON Pointer (`/slides/0`).
|
|
2213
3513
|
*/
|
|
2214
|
-
declare function
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
*
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
*
|
|
2236
|
-
*
|
|
2237
|
-
*
|
|
2238
|
-
*
|
|
2239
|
-
*
|
|
2240
|
-
|
|
2241
|
-
|
|
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[];
|
|
2242
3544
|
|
|
2243
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. */
|
|
2244
3546
|
interface QuoteMarks {
|
|
@@ -2568,7 +3870,8 @@ declare function patternRuns(preset: unknown): {
|
|
|
2568
3870
|
* Geometry is shared: renderers and exporters only draw what these functions return.
|
|
2569
3871
|
*/
|
|
2570
3872
|
type CaptionPosition = 'below' | 'above';
|
|
2571
|
-
|
|
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';
|
|
2572
3875
|
type RichText = string | readonly (string | RichTextRun)[];
|
|
2573
3876
|
interface CaptionObject {
|
|
2574
3877
|
text: RichText;
|
|
@@ -2678,8 +3981,10 @@ declare function collectCitations(presentation: unknown): DeckCitations;
|
|
|
2678
3981
|
*/
|
|
2679
3982
|
declare function slideCitations(slide: unknown, slideIndex: number, presentation?: unknown): SlideCitations | undefined;
|
|
2680
3983
|
/** Fits a string or TextRun[] into a box at a requested size (composeSlide supplies its placed fitter). */
|
|
2681
|
-
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;
|
|
2682
3985
|
interface AnnotationLayoutOptions {
|
|
3986
|
+
/** LH-138: a caption that reads "Name: detail" draws its name in bold (a picture's caption; see `splitCaptionName`). */
|
|
3987
|
+
nameDetail?: boolean;
|
|
2683
3988
|
scale: number;
|
|
2684
3989
|
minFontSize: number;
|
|
2685
3990
|
fit: AnnotationFitter;
|
|
@@ -2692,7 +3997,8 @@ interface ComposedCaption {
|
|
|
2692
3997
|
value: Caption;
|
|
2693
3998
|
text: RichText;
|
|
2694
3999
|
position: CaptionPosition;
|
|
2695
|
-
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';
|
|
2696
4002
|
/** The caption band. */
|
|
2697
4003
|
box: LayoutBox;
|
|
2698
4004
|
/** The media box after the band is reserved; `ComposedItem.box` equals it. */
|
|
@@ -2703,6 +4009,16 @@ interface ComposedCaption {
|
|
|
2703
4009
|
overflow: boolean;
|
|
2704
4010
|
diagnostics: LayoutDiagnostic[];
|
|
2705
4011
|
}
|
|
4012
|
+
/** LH-63: the longest first line, in characters, of a text that draws as a run-in heading over its body ("Option A: focused pilot"). */
|
|
4013
|
+
declare const RUN_IN_HEADING_CHARS = 40;
|
|
4014
|
+
/**
|
|
4015
|
+
* LH-63: a plain text whose first line is `RUN_IN_HEADING_CHARS` characters or fewer and ends where the author broke the line, with a body after it that is
|
|
4016
|
+
* longer than the line, draws that line as a bold run-in heading over its body ("Option A: focused pilot" over its two sentences); a line that ends a sentence
|
|
4017
|
+
* or opens a list entry is body text, not a heading. A text with no such line whose first line opens with a short label ("Recommendation: establish the
|
|
4018
|
+
* evidence ...") draws the label in bold, as a picture's caption does (`splitCaptionName`). The runs keep every character of the text, so the words,
|
|
4019
|
+
* line breaks and spaces are the author's; any other text is undefined (drawn as written), and runs the author formatted are never passed here.
|
|
4020
|
+
*/
|
|
4021
|
+
declare function runInHeading(text: string): RichText | undefined;
|
|
2706
4022
|
/** Reserve a caption band in `box` (the payload box) and return the band and the media box. */
|
|
2707
4023
|
declare function layoutCaption(value: unknown, box: LayoutBox, path: string, options: AnnotationLayoutOptions): ComposedCaption | undefined;
|
|
2708
4024
|
/** One listed note in a slide's footnote area. */
|
|
@@ -2764,8 +4080,34 @@ interface ReferencesSlideOptions {
|
|
|
2764
4080
|
*/
|
|
2765
4081
|
declare function referencesSlide(presentation: unknown, options?: ReferencesSlideOptions): Record<string, unknown>;
|
|
2766
4082
|
|
|
2767
|
-
/** The
|
|
2768
|
-
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"];
|
|
2769
4111
|
type DiagramSyntax = typeof DIAGRAM_SYNTAXES[number];
|
|
2770
4112
|
/** A diagram payload in its object form: the string shorthand is `{ source }`. */
|
|
2771
4113
|
interface DiagramPayload {
|
|
@@ -2783,11 +4125,32 @@ interface DiagramIssue {
|
|
|
2783
4125
|
}
|
|
2784
4126
|
/** The object form of a `diagram` value, or undefined when the value is neither a string nor an object with a string source. */
|
|
2785
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
|
+
};
|
|
2786
4145
|
/** The share of the readability floor the smallest secondary label of a diagram keeps (its node labels keep the whole floor). */
|
|
2787
4146
|
declare const DIAGRAM_SECONDARY_FLOOR = 0.75;
|
|
2788
|
-
/**
|
|
2789
|
-
|
|
2790
|
-
|
|
4147
|
+
/**
|
|
4148
|
+
* SH-07: the diagram types (pele's names, ComposedDiagram.type) the PPTX export writes as native shapes and connectors with
|
|
4149
|
+
* `diagrams: "shapes"`: each passed its comparison of PowerPoint's drawing with the preview (docs/diagrams.md#exports). Every other type
|
|
4150
|
+
* stays a picture there and reports the info finding `diagram-shapes-unavailable`.
|
|
4151
|
+
*/
|
|
4152
|
+
declare const DIAGRAM_SHAPE_FAMILIES: readonly string[];
|
|
4153
|
+
|
|
2791
4154
|
/**
|
|
2792
4155
|
* Whether a diagram value can be drawn: its diagram type (pele's name, such as `flowchart` or `sequence`) or the issue that stops
|
|
2793
4156
|
* it. Parsing only: no text is measured. Results are cached by source.
|
|
@@ -2853,11 +4216,21 @@ interface ComposedDiagram {
|
|
|
2853
4216
|
alt: string;
|
|
2854
4217
|
/** True when the diagram only fits below the readability floor: it is drawn smaller to stay inside its block. */
|
|
2855
4218
|
overflow?: boolean;
|
|
4219
|
+
/**
|
|
4220
|
+
* LH-185: set when the written direction did not hold the labels at the floor and the other main direction was tried. `turned` is
|
|
4221
|
+
* true when the drawing is in `to` (the labels fit there); false when neither did and the drawing stays as written, scaled.
|
|
4222
|
+
*/
|
|
4223
|
+
direction?: {
|
|
4224
|
+
from: string;
|
|
4225
|
+
to: string;
|
|
4226
|
+
turned: boolean;
|
|
4227
|
+
};
|
|
2856
4228
|
}
|
|
2857
4229
|
/**
|
|
2858
4230
|
* Lay a diagram out for an area: the largest base type size, from `nominal` down, at which the drawing fits, its base size stays at
|
|
2859
4231
|
* or above `floor` and its smallest label at or above DIAGRAM_SECONDARY_FLOOR of it. pele lays the diagram out for the width it has (a wide flowchart may turn to run down), so a
|
|
2860
|
-
* smaller size is a new layout, not a shrunken picture. When even the floor does not fit,
|
|
4232
|
+
* smaller size is a new layout, not a shrunken picture. When even the floor does not fit, a flowchart or state diagram is tried in the other main
|
|
4233
|
+
* direction (LH-185, `direction`); when neither holds the labels at the floor, the drawing as written at the floor is scaled
|
|
2861
4234
|
* down to fit and marked `overflow`. Throws the diagram's issue (checkDiagram) when the source cannot be drawn.
|
|
2862
4235
|
*/
|
|
2863
4236
|
declare function layoutDiagram(value: unknown, options: DiagramLayoutOptions): ComposedDiagram;
|
|
@@ -2921,11 +4294,14 @@ declare function diagramPalette(input: DiagramPaletteInput): DiagramPalette;
|
|
|
2921
4294
|
/**
|
|
2922
4295
|
* A composed diagram as a self-contained SVG document in `palette`: every CSS variable and color-mix resolved, styles moved to
|
|
2923
4296
|
* presentation attributes, classes and ARIA roles removed, sized `width` by `height` (the block's drawn size, in the units the
|
|
2924
|
-
* host draws in) over the drawing's own viewBox, with `alt` as its title. Labels stay text in the palette's fonts.
|
|
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.
|
|
2925
4299
|
*/
|
|
2926
4300
|
declare function paintDiagram(diagram: Pick<ComposedDiagram, 'svg' | 'width' | 'height' | 'alt'>, palette: DiagramPalette, size: {
|
|
2927
4301
|
width: number;
|
|
2928
4302
|
height: number;
|
|
4303
|
+
}, options?: {
|
|
4304
|
+
classes?: boolean;
|
|
2929
4305
|
}): string;
|
|
2930
4306
|
/**
|
|
2931
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
|
|
@@ -2939,138 +4315,47 @@ declare function paintDiagramGroup(diagram: Pick<ComposedDiagram, 'svg' | 'width
|
|
|
2939
4315
|
height: number;
|
|
2940
4316
|
}): string;
|
|
2941
4317
|
|
|
2942
|
-
/**
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
interface ChartOptionTarget {
|
|
2946
|
-
kind: ChartOptionKind;
|
|
2947
|
-
/** Stacked and 100% stacked columns, bars, lines and areas: their data labels have no outside-end position. */
|
|
2948
|
-
stacked?: boolean;
|
|
2949
|
-
}
|
|
2950
|
-
type ChartLegendPosition = 'none' | 'top' | 'bottom' | 'left' | 'right';
|
|
2951
|
-
type ChartLabelContent = 'category' | 'value' | 'percent';
|
|
2952
|
-
type ChartLabelPosition = 'center' | 'inside-end' | 'inside-base' | 'outside-end' | 'above' | 'below' | 'left' | 'right';
|
|
2953
|
-
interface ChartOptionDiagnostic {
|
|
2954
|
-
code: 'chart-option-adapted';
|
|
2955
|
-
/** 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`. */
|
|
2956
|
-
option: string;
|
|
2957
|
-
reason: 'unsupported-type' | 'unsupported-content' | 'unsupported-position';
|
|
4318
|
+
/** Why a DOT source cannot be drawn, with its 1-based position. */
|
|
4319
|
+
interface DotIssue {
|
|
4320
|
+
code: 'diagram-syntax' | 'diagram-unsupported' | 'diagram-limit';
|
|
2958
4321
|
message: string;
|
|
4322
|
+
line?: number;
|
|
4323
|
+
column?: number;
|
|
2959
4324
|
}
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
/** Combo charts only: the concrete position of the line series' labels (`position` is the column series' one). */
|
|
2966
|
-
linePosition?: ChartLabelPosition;
|
|
2967
|
-
separator: string;
|
|
2968
|
-
}
|
|
2969
|
-
/** FA-14: the series and category names `chart.highlight` keeps for a chart type (what the type cannot highlight is dropped, with a diagnostic). */
|
|
2970
|
-
interface ResolvedChartHighlight {
|
|
2971
|
-
/** Series (column) names whose marks take the accent colour. */
|
|
2972
|
-
series: string[];
|
|
2973
|
-
/** Category (row label) names whose marks take the accent colour. */
|
|
2974
|
-
categories: string[];
|
|
2975
|
-
}
|
|
2976
|
-
interface ResolvedChartOptions {
|
|
2977
|
-
/** True when the chart carries at least one option (after adaptation); false means every engine keeps today's output. */
|
|
2978
|
-
active: boolean;
|
|
2979
|
-
/** `secondary` titles the secondary value axis of a combo chart. */
|
|
2980
|
-
axisTitles: {
|
|
2981
|
-
category?: string;
|
|
2982
|
-
value?: string;
|
|
2983
|
-
secondary?: string;
|
|
2984
|
-
};
|
|
2985
|
-
/** Undefined = no legend option: each engine keeps its default (a right legend on multi-series, pie and doughnut charts). */
|
|
2986
|
-
legend?: ChartLegendPosition;
|
|
2987
|
-
dataLabels?: ResolvedChartDataLabels;
|
|
2988
|
-
/** True when `dataLabels: false` switches off the labels a construct draws by default (funnel values, treemap category names). */
|
|
2989
|
-
dataLabelsOff?: boolean;
|
|
2990
|
-
/**
|
|
2991
|
-
* FA-14: the names `chart.highlight` keeps; undefined when the chart has no highlight or its type can highlight nothing it names.
|
|
2992
|
-
* It does not make `active` true: a highlight changes the colours of marks, never the geometry or the reserved space.
|
|
2993
|
-
*/
|
|
2994
|
-
highlight?: ResolvedChartHighlight;
|
|
2995
|
-
diagnostics: ChartOptionDiagnostic[];
|
|
2996
|
-
}
|
|
2997
|
-
interface ChartOptionSupport {
|
|
2998
|
-
/** `secondary`: the construct can have a secondary value axis (a combo chart whose `secondaryAxis` names a line series). */
|
|
2999
|
-
axisTitles: {
|
|
3000
|
-
category: boolean;
|
|
3001
|
-
value: boolean;
|
|
3002
|
-
secondary: boolean;
|
|
3003
|
-
};
|
|
3004
|
-
legend: boolean;
|
|
3005
|
-
/** FA-14: what `chart.highlight` can name: series (a whole series' marks) and categories (one category's marks, or a pie slice). */
|
|
3006
|
-
highlight: {
|
|
3007
|
-
series: boolean;
|
|
3008
|
-
categories: boolean;
|
|
3009
|
-
};
|
|
3010
|
-
dataLabels: {
|
|
3011
|
-
supported: boolean;
|
|
3012
|
-
content: readonly ChartLabelContent[];
|
|
3013
|
-
/** Empty when labels have no position choice. A combo chart lists the column positions, then the line-only ones. */
|
|
3014
|
-
positions: readonly ChartLabelPosition[];
|
|
3015
|
-
/** The position `auto` resolves to; null with no positions. */
|
|
3016
|
-
defaultPosition: ChartLabelPosition | null;
|
|
3017
|
-
/** True for the constructs that label their marks by default (funnel, treemap): `dataLabels: false` removes those labels. */
|
|
3018
|
-
defaultOn: boolean;
|
|
3019
|
-
};
|
|
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;
|
|
3020
4330
|
}
|
|
3021
|
-
/**
|
|
3022
|
-
declare
|
|
3023
|
-
/** The option target for a catalog chart type id; undefined for an id outside the catalog. */
|
|
3024
|
-
declare function chartOptionTarget(typeId: unknown): ChartOptionTarget | undefined;
|
|
3025
|
-
declare const DEFAULT_CHART_LABEL_SEPARATOR = ", ";
|
|
3026
|
-
/**
|
|
3027
|
-
* Normalise a chart's `axisTitles`, `legend` and `dataLabels` against what its type can show. `target` is undefined for a chart type
|
|
3028
|
-
* outside the catalog: nothing is adapted then (the engines fall back to their legacy output for such charts anyway).
|
|
3029
|
-
*/
|
|
3030
|
-
declare function resolveChartOptions(chart: unknown, target?: ChartOptionTarget): ResolvedChartOptions;
|
|
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"];
|
|
3031
4333
|
/**
|
|
3032
|
-
*
|
|
3033
|
-
*
|
|
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.
|
|
3034
4336
|
*/
|
|
3035
|
-
declare
|
|
3036
|
-
language?: string;
|
|
3037
|
-
}): string;
|
|
3038
|
-
/** A share as PowerPoint's `0%` label. */
|
|
3039
|
-
declare function formatChartLabelPercent(share: number): string;
|
|
3040
|
-
/** The label text: the selected parts in the fixed order category, value, percent, joined by the separator. */
|
|
3041
|
-
declare function chartLabelText(parts: {
|
|
3042
|
-
category?: string;
|
|
3043
|
-
value?: string;
|
|
3044
|
-
percent?: string;
|
|
3045
|
-
}, content: readonly ChartLabelContent[], separator?: string): string;
|
|
3046
|
-
/** Which marks of a chart a highlight names, in the order of the resolved chart data. */
|
|
3047
|
-
interface ChartHighlightMarks {
|
|
3048
|
-
/** One flag per plotted series (the columns after the category and X columns): its marks are highlighted. */
|
|
3049
|
-
series: boolean[];
|
|
3050
|
-
/** One flag per data row: the marks of that category are highlighted. */
|
|
3051
|
-
categories: boolean[];
|
|
3052
|
-
}
|
|
4337
|
+
declare const DOT_SHAPES: Readonly<Record<string, string>>;
|
|
3053
4338
|
/**
|
|
3054
|
-
*
|
|
3055
|
-
*
|
|
3056
|
-
* 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
|
|
3057
|
-
* colour (`chartHighlightColors`). Category names match the row labels as text (a number label `2024` matches `"2024"`, an empty label
|
|
3058
|
-
* matches `""`), every row that carries the label. Returns undefined when there is no highlight or it names nothing the chart plots (a
|
|
3059
|
-
* name that matches no column or label is the `chart-highlight-unknown-name` validation error), so the engines then draw the chart as if
|
|
3060
|
-
* it had none.
|
|
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.
|
|
3061
4341
|
*/
|
|
3062
|
-
declare function
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
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
|
+
};
|
|
3067
4351
|
|
|
3068
4352
|
/** A whole number groups its thousands from this magnitude (four integer digits). */
|
|
3069
4353
|
declare const NUMBER_GROUPING_MIN = 1000;
|
|
3070
4354
|
/**
|
|
3071
|
-
* `value` in the General form (at most twelve significant digits) with its thousands grouped by the language's locale (
|
|
3072
|
-
* when the tag is missing or unknown; a locale that groups only from five digits, Spanish, leaves four digits as they are)
|
|
3073
|
-
*
|
|
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.
|
|
3074
4359
|
*/
|
|
3075
4360
|
declare function groupNumber(value: number, language?: string): string;
|
|
3076
4361
|
/**
|
|
@@ -3078,18 +4363,154 @@ declare function groupNumber(value: number, language?: string): string;
|
|
|
3078
4363
|
* series of fractions keeps the General form, which PowerPoint's own label format (`#,##0`, written for a series that groups) could not
|
|
3079
4364
|
* print as the preview does.
|
|
3080
4365
|
*/
|
|
3081
|
-
declare function groupsThousands(values: readonly (number | null | undefined)[]): boolean;
|
|
4366
|
+
declare function groupsThousands(values: readonly (number | null | undefined)[]): boolean;
|
|
4367
|
+
/**
|
|
4368
|
+
* True when a value axis groups the thousands of its tick labels: its own ticks (the minimum and every major unit up to the maximum) are
|
|
4369
|
+
* whole numbers and one reaches four digits (`groupsThousands`). Only an axis with no number format of its own and no share scale asks.
|
|
4370
|
+
*/
|
|
4371
|
+
declare function groupsAxisTicks(axis: {
|
|
4372
|
+
min: number;
|
|
4373
|
+
max: number;
|
|
4374
|
+
majorUnit: number;
|
|
4375
|
+
}): boolean;
|
|
4376
|
+
/** The number format code PowerPoint prints a grouping series' labels with, as `groupNumber` does (its separators follow the viewer's region). */
|
|
4377
|
+
declare const GROUPED_LABEL_CODE = "#,##0";
|
|
4378
|
+
/**
|
|
4379
|
+
* LH-153: whether a value axis the engines do not compose (a combo chart's axes, a scatter chart's, the chartex constructs': waterfall,
|
|
4380
|
+
* histogram, pareto, box and whisker) groups its tick labels, decided from its data alone so the preview and PowerPoint (which picks its own
|
|
4381
|
+
* ticks) agree: every value is a whole number, one reaches four digits (`groupsThousands`) and the values span at least `minRange` (default
|
|
4382
|
+
* 100: a nice scale of at most ten intervals then steps by 10 or more, so every tick is a whole number). A `zeroBased` axis (columns, bars,
|
|
4383
|
+
* a waterfall) includes zero in the span. A scatter chart's X axis passes 1000: a column of years (1990 to 2020, or 1900 to 2020) is a
|
|
4384
|
+
* four-digit whole number that must not read "1,990".
|
|
4385
|
+
*/
|
|
4386
|
+
declare function groupsDataRange(values: readonly (number | null | undefined)[], options?: {
|
|
4387
|
+
zeroBased?: boolean;
|
|
4388
|
+
minRange?: number;
|
|
4389
|
+
}): boolean;
|
|
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[];
|
|
3082
4488
|
/**
|
|
3083
|
-
*
|
|
3084
|
-
*
|
|
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.
|
|
3085
4491
|
*/
|
|
3086
|
-
declare function
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
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>>;
|
|
3093
4514
|
|
|
3094
4515
|
interface Box {
|
|
3095
4516
|
x: number;
|
|
@@ -3162,68 +4583,8 @@ declare function chartCategoriesInTime(labels: readonly unknown[], options?: {
|
|
|
3162
4583
|
/** LH-105: the month (1 to 12) a word or label names in English or the deck language (January, Jan, Sept, يناير), or undefined. */
|
|
3163
4584
|
declare function monthOf(text: unknown, language?: string): number | undefined;
|
|
3164
4585
|
|
|
3165
|
-
/** Why a chart is drawn as another construct (or with its data regrouped). */
|
|
3166
|
-
type ChartFallback = 'map-as-columns' | 'box-per-series' | 'nested-rings' | 'scatter-by-position';
|
|
3167
|
-
/** How the engines draw a chart: the construct and the data they plot. */
|
|
3168
|
-
interface ChartDrawPlan {
|
|
3169
|
-
/** The catalog chart type the engines draw: the authored one, or its fallback (`column` for a map, `doughnut` for a pie of several series). */
|
|
3170
|
-
type: string;
|
|
3171
|
-
kind: ChartOptionKind;
|
|
3172
|
-
/** Set when the chart is drawn other than as authored. */
|
|
3173
|
-
fallback?: ChartFallback;
|
|
3174
|
-
/** The resolved data as drawn: the category column, the X column of a scatter (when `hasX`), then the plotted series. */
|
|
3175
|
-
columns: string[];
|
|
3176
|
-
hasX: boolean;
|
|
3177
|
-
formats: (string | undefined)[];
|
|
3178
|
-
rows: DataCellValue[][];
|
|
3179
|
-
/** The index in the resolved columns of each drawn column (a dropped scatter X column shifts the series by one). */
|
|
3180
|
-
sources: number[];
|
|
3181
|
-
/** 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. */
|
|
3182
|
-
dropped: string[];
|
|
3183
|
-
}
|
|
3184
|
-
/**
|
|
3185
|
-
* 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
|
|
3186
|
-
* 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
|
|
3187
|
-
* common alias such as `USA` or `UK`. Cities and postal codes are not recognized.
|
|
3188
|
-
*/
|
|
3189
|
-
declare function isPlaceLabel(label: unknown, language?: string): boolean;
|
|
3190
|
-
/**
|
|
3191
|
-
* How the engines draw a resolved chart (`resolved` is its `resolveChartData` result; `options.language` the deck language, for place
|
|
3192
|
-
* names). The rules, each over the data alone:
|
|
3193
|
-
*
|
|
3194
|
-
* - **Map over categories that are not places** (`map-as-columns`): a `world` chart whose category labels are fewer than half places
|
|
3195
|
-
* ({@link isPlaceLabel}) is drawn as clustered columns, every series kept. A map needs places to plot; Q1 to Q4 would be empty tiles.
|
|
3196
|
-
* - **One value per box-and-whisker category** (`box-per-series`): when no category label repeats (two rows or more), each box would be a
|
|
3197
|
-
* single value. The rows are one group named after the category column, so each series is one box of its values across the categories.
|
|
3198
|
-
* - **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
|
|
3199
|
-
* series, the first series innermost (as PowerPoint orders the rings of a doughnut), every ring coloured by category.
|
|
3200
|
-
* - **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
|
|
3201
|
-
* series is plotted against the category position (1, 2, 3, ...), like a scatter of one value column.
|
|
3202
|
-
*
|
|
3203
|
-
* A construct that plots one series (treemap, histogram and Pareto with categories, waterfall, funnel, map, and pie) still draws only the
|
|
3204
|
-
* first; the others are listed in `dropped`.
|
|
3205
|
-
*/
|
|
3206
|
-
declare function chartDrawPlan(chart: unknown, resolved: Extract<ResolvedChartData, {
|
|
3207
|
-
ok: true;
|
|
3208
|
-
}>, options?: {
|
|
3209
|
-
language?: string;
|
|
3210
|
-
}): ChartDrawPlan;
|
|
3211
|
-
/**
|
|
3212
|
-
* The `chart-series-dropped` warning of a chart whose drawn construct leaves a resolved column out ({@link chartDrawPlan}'s `dropped`), at
|
|
3213
|
-
* the chart's `type` (`path` is the chart's JSON Pointer). Empty when every column is drawn.
|
|
3214
|
-
*/
|
|
3215
|
-
declare function chartDrawDiagnostics(chart: unknown, resolved: ResolvedChartData, path?: string, options?: {
|
|
3216
|
-
language?: string;
|
|
3217
|
-
}): DataDiagnostic[];
|
|
3218
|
-
/**
|
|
3219
|
-
* 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
|
|
3220
|
-
* `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
|
|
3221
|
-
* theme colour) when that does, else black or white ({@link textColorForFill}). The preview and the PPTX export both call it.
|
|
3222
|
-
*/
|
|
3223
|
-
declare function markLabelColor(fill: string, text: string, background?: string): string;
|
|
3224
|
-
|
|
3225
4586
|
/** Body content kinds accepted by template regions. */
|
|
3226
|
-
declare const LAYOUT_BODY_KINDS: readonly ["text", "list", "image", "video", "chart", "table", "code", "metric", "quote", "timeline", "diagram"];
|
|
4587
|
+
declare const LAYOUT_BODY_KINDS: readonly ["text", "list", "image", "video", "chart", "table", "code", "metric", "quote", "timeline", "diagram", "shape"];
|
|
3227
4588
|
type LayoutBodyKind = typeof LAYOUT_BODY_KINDS[number];
|
|
3228
4589
|
/** What a layout template holds, derived from its regions. */
|
|
3229
4590
|
interface LayoutContent {
|
|
@@ -3393,6 +4754,14 @@ declare const EYEBROW_TEXT_KIND = "text:eyebrow";
|
|
|
3393
4754
|
* full stop at its end. A single character ("A", "1") is a marker or a placeholder, not a name.
|
|
3394
4755
|
*/
|
|
3395
4756
|
declare function isLabelText(value: unknown): boolean;
|
|
4757
|
+
/** LH-171: a row label beside sibling rows is a short phrase of at most this many words and characters (isLabelText allows 3 and 32). */
|
|
4758
|
+
declare const ROW_LABEL_WORDS = 6;
|
|
4759
|
+
declare const ROW_LABEL_CHARS = 48;
|
|
4760
|
+
/**
|
|
4761
|
+
* LH-171: a list entry's label that may stand in a ruled row beside a sibling list drawn as rows: one line of 2 to ROW_LABEL_CHARS
|
|
4762
|
+
* characters and at most ROW_LABEL_WORDS words, with no full stop at its end ("Live in 8 weeks", "Proven at our scale").
|
|
4763
|
+
*/
|
|
4764
|
+
declare function rowLabel(value: unknown): boolean;
|
|
3396
4765
|
/**
|
|
3397
4766
|
* LH-50: a short label next to a longer text is that text's eyebrow: `label` reads as a label (isLabelText), and `text`, the paragraph right
|
|
3398
4767
|
* after it, is no label itself and at least PAIR_LENGTH_RATIO times as long. Claude Design draws such a label ("Signal", "Inputs") small,
|
|
@@ -3530,8 +4899,17 @@ interface LayoutDiagnostic {
|
|
|
3530
4899
|
/**
|
|
3531
4900
|
* OPF 0.19 adds the content-binding codes of template layouts: `region-unknown`, `region-kind` and `region-full` for an
|
|
3532
4901
|
* ignored `region` pin, and `layout-unplaced` for a block no region had room for (drawn anyway; `paginate` moves it).
|
|
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.
|
|
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
|
|
4904
|
+
* arrangement's designs cannot hold at the list's size (or of a shape it does not draw) as a list.
|
|
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).
|
|
3533
4911
|
*/
|
|
3534
|
-
code: "text-overflow" | "small-cell" | "unresolved-content" | "unsupported-image-treatment" | "numbering-adapted" | "region-unknown" | "region-kind" | "region-full" | "layout-unplaced" | "emphasis-ignored";
|
|
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";
|
|
3535
4913
|
path: string;
|
|
3536
4914
|
message: string;
|
|
3537
4915
|
/**
|
|
@@ -3553,7 +4931,9 @@ interface TextStyle {
|
|
|
3553
4931
|
italic?: boolean;
|
|
3554
4932
|
path?: string;
|
|
3555
4933
|
fontFace?: FontFaceSelection;
|
|
3556
|
-
/**
|
|
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. */
|
|
3557
4937
|
lang?: string;
|
|
3558
4938
|
/**
|
|
3559
4939
|
* LH-32: drawn in capitals (an eyebrow). The text stays as authored: it is measured and drawn upper-cased (`toUpperCase`), and
|
|
@@ -3682,6 +5062,7 @@ declare function placeTextLines(lines: readonly TextLineInk[], box: LayoutBox, a
|
|
|
3682
5062
|
/** RR-92: what composition computes for a chart item beyond its box. */
|
|
3683
5063
|
interface ComposedChart {
|
|
3684
5064
|
valueAxis?: ChartValueAxis;
|
|
5065
|
+
secondaryValueAxis?: ChartValueAxis;
|
|
3685
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). */
|
|
3686
5067
|
layer?: ChartLayer;
|
|
3687
5068
|
}
|
|
@@ -3704,6 +5085,11 @@ interface ComposedItem {
|
|
|
3704
5085
|
/** Optional visible card allocation; box and all accepted internals occupy its padded interior. */
|
|
3705
5086
|
frameBox?: LayoutBox;
|
|
3706
5087
|
text?: TextFit | RichTextFit | ListFit | CodeTextFit;
|
|
5088
|
+
/**
|
|
5089
|
+
* LH-63: the runs a plain `text` block draws when its first line is a run-in heading (`runInHeading`): the same characters as `value`, the heading
|
|
5090
|
+
* bold. Engines draw and export these runs (`text` is their rich fit); absent, the block draws `value`.
|
|
5091
|
+
*/
|
|
5092
|
+
runs?: RichText;
|
|
3707
5093
|
textStyle?: TextStyle;
|
|
3708
5094
|
/** Complete accepted quote internals; consumers must reuse these fits and styles. */
|
|
3709
5095
|
quoteLayout?: QuoteLayout;
|
|
@@ -3725,6 +5111,8 @@ interface ComposedItem {
|
|
|
3725
5111
|
caption?: ComposedCaption;
|
|
3726
5112
|
/** Picture geometry and treatments of an image item (`field` image); absent on every other item. */
|
|
3727
5113
|
image?: ComposedImage;
|
|
5114
|
+
/** SH-02: the drawing of a shape block (`field` shape, shape-block.ts ComposedShape); `text` is its text, fitted in `shape.textBox`. Absent on every other item. */
|
|
5115
|
+
shape?: ComposedShape;
|
|
3728
5116
|
/**
|
|
3729
5117
|
* RR-92: the value axis of a column, bar, line or area chart (`field` chart), computed from the chart box (`chartValueAxis`). The preview
|
|
3730
5118
|
* draws it and the PPTX export writes it as `c:min`, `c:max` and `c:majorUnit`, so both show the same axis. Absent for every other chart
|
|
@@ -3827,9 +5215,13 @@ interface ComposedEmphasis {
|
|
|
3827
5215
|
*/
|
|
3828
5216
|
interface ComposedSteps {
|
|
3829
5217
|
form: 'row' | 'column' | 'flow' | 'tiles';
|
|
3830
|
-
/**
|
|
5218
|
+
/**
|
|
5219
|
+
* The `sequence` region. `tiles` (LH-137's check-mark tiles, LH-165's icon cards, LH-162's text tiles): the list's region, or empty on a
|
|
5220
|
+
* slide without a layout. A tile is a chip (one card each, in the card surface); its badges are LH-137's check marks, LH-165's numerals
|
|
5221
|
+
* (`numeral`) or LH-162's accent dots (a badge with an empty label).
|
|
5222
|
+
*/
|
|
3831
5223
|
region: string;
|
|
3832
|
-
/** `row`: the region's first block; `column`, `flow` and `tiles`: the list's payload path. */
|
|
5224
|
+
/** `row`: the region's first block; `column`, `flow` and `tiles`: the list's payload path (LH-165's groups: the first group's; LH-162: the first paragraph's). */
|
|
3833
5225
|
path: string;
|
|
3834
5226
|
badges: ComposedStepBadge[];
|
|
3835
5227
|
connector?: {
|
|
@@ -3849,6 +5241,64 @@ interface ComposedSteps {
|
|
|
3849
5241
|
}[];
|
|
3850
5242
|
lineWidth: number;
|
|
3851
5243
|
}
|
|
5244
|
+
/**
|
|
5245
|
+
* SH-09: one pyramid or matrix of an `arrangement` region (layout record), in canvas pixels: a lone list of one level whose entries are
|
|
5246
|
+
* the nodes (arrangements.ts has the geometry, PowerPoint's Basic Pyramid and Basic Matrix). Each entry is a list column
|
|
5247
|
+
* (ComposedItem.listColumns) centered in its node's text rectangle at `fontSize`, the list's size or larger. Engines draw, under the
|
|
5248
|
+
* text: the matrix's `background` diamond, then every node (a matrix's empty quadrants too) filled in the primary color with a
|
|
5249
|
+
* `lineWidth` outline in the background color (arrangementPaint). `smartArt` holds what the PPTX export checks against the domain
|
|
5250
|
+
* PowerPoint was compared on (smartArtUnavailable): each entry's line count and whether its line breaks hold when its width changes by
|
|
5251
|
+
* SMART_ART_DOMAIN.slack.
|
|
5252
|
+
*/
|
|
5253
|
+
interface ComposedArrangement {
|
|
5254
|
+
kind: Arrangement;
|
|
5255
|
+
pyramidDirection?: 'up' | 'down';
|
|
5256
|
+
/**
|
|
5257
|
+
* `smartart`: PowerPoint's Basic Pyramid or Basic Matrix geometry (the PPTX export may write it as live SmartArt); `opf`: OPF's own design
|
|
5258
|
+
* of the arrangement (a stepped pyramid with the entries beside it, or four quadrants filling the region); `cards`: a matrix of other
|
|
5259
|
+
* than four entries, as a grid of cards. Only `smartart` has a `background` diamond (a matrix).
|
|
5260
|
+
*/
|
|
5261
|
+
design: 'smartart' | 'opf' | 'cards';
|
|
5262
|
+
/** OPF's design (`opf`): why PowerPoint's design was not drawn (its entries do not fit at the list's size, or the SmartArt domain's reason). */
|
|
5263
|
+
instead?: string;
|
|
5264
|
+
/** The entries' alignment in their text rectangles: centered on their nodes, or at the start edge (beside a level, in a card). */
|
|
5265
|
+
align: 'center' | 'start';
|
|
5266
|
+
/** The nodes' paint: the primary with a background-colored outline (arrangementPaint), or the card neutral with its border (a card grid). */
|
|
5267
|
+
paint: 'primary' | 'card';
|
|
5268
|
+
/** The entries' text color: the color that reads on the primary (`node`), or the slide's text color (`slide`: beside a level, on a card). */
|
|
5269
|
+
text: 'node' | 'slide';
|
|
5270
|
+
region: string;
|
|
5271
|
+
/** The list's payload path. */
|
|
5272
|
+
path: string;
|
|
5273
|
+
frame: LayoutBox;
|
|
5274
|
+
/** The matrix's diamond (its square). */
|
|
5275
|
+
background?: LayoutBox;
|
|
5276
|
+
/** The nodes in order (a matrix always has four); `path` is the entry's text path, absent for an empty quadrant. */
|
|
5277
|
+
nodes: (ArrangementNode & {
|
|
5278
|
+
path?: string;
|
|
5279
|
+
})[];
|
|
5280
|
+
/** SH-18: a cycle's arrows, the one after each node to the next (arrangements.ts cycleNodes, cycleRing), drawn after their node in the primary lightened (arrangementPaint's `arrow`); SH-17: a flow's, the one after each box (linear-arrangements.ts). */
|
|
5281
|
+
arrows?: ArrangementArrow[];
|
|
5282
|
+
fontSize: number;
|
|
5283
|
+
/** The text inset inside each node's text rectangle (ARRANGEMENT_TEXT_MARGIN of the size). */
|
|
5284
|
+
textMargin: number;
|
|
5285
|
+
/** SH-17: the text insets (left, top, right, bottom) where they differ by side (a chevron's start); absent: `textMargin` on every side. */
|
|
5286
|
+
margins?: [number, number, number, number];
|
|
5287
|
+
lineWidth: number;
|
|
5288
|
+
connectors?: NativeTreeConnector[];
|
|
5289
|
+
smartArt: {
|
|
5290
|
+
lines: number[];
|
|
5291
|
+
stable: boolean[];
|
|
5292
|
+
fill?: number;
|
|
5293
|
+
ink?: number;
|
|
5294
|
+
widest?: number;
|
|
5295
|
+
};
|
|
5296
|
+
/**
|
|
5297
|
+
* SH-19: OPF's own design (`opf`, `cards`): the inputs that draw it for any count (smart-art-layout.ts opfLayoutGeometry), from which the
|
|
5298
|
+
* PPTX export writes OPF's SmartArt layout definition of it.
|
|
5299
|
+
*/
|
|
5300
|
+
layout?: OpfLayoutRecipe;
|
|
5301
|
+
}
|
|
3852
5302
|
/**
|
|
3853
5303
|
* LH-07: one numbered circle of a sequence (`ComposedSteps.badges`); `path` is the step's block (`row`) or list entry (`column`).
|
|
3854
5304
|
* `list` names the list entry whose number the badge draws in place of its marker (its payload path, the entry's index and the
|
|
@@ -3880,12 +5330,89 @@ interface ComposedStepBadge {
|
|
|
3880
5330
|
/** LH-134: a numeral beside a ruled row: the line box of its text, drawn without a circle. */
|
|
3881
5331
|
numeral?: LayoutBox;
|
|
3882
5332
|
}
|
|
5333
|
+
/**
|
|
5334
|
+
* LH-14: one icon the slide draws (`SlideComposition.icons`), on a chip as Claude Design draws one: a circle of `radius` around
|
|
5335
|
+
* (`cx`, `cy`) in `colors.chip`, and the glyph in `box` (ICON_GLYPH of the chip's diameter, centered on it). A monochrome icon is
|
|
5336
|
+
* `parts`, path commands already placed in canvas pixels (each filled, stroked at `stroke` canvas pixels with its caps and joins, or
|
|
5337
|
+
* both) in `colors.glyph`; a multicolor SVG is `picture`, drawn contained in `box` with its own colors. `path` is the `icon` field's
|
|
5338
|
+
* path, `owner` the list entry, metric or group it marks. Paint order: after the cards and surfaces, before the text.
|
|
5339
|
+
*/
|
|
5340
|
+
interface ComposedIcon {
|
|
5341
|
+
path: string;
|
|
5342
|
+
owner: string;
|
|
5343
|
+
reference: string;
|
|
5344
|
+
chip: {
|
|
5345
|
+
cx: number;
|
|
5346
|
+
cy: number;
|
|
5347
|
+
radius: number;
|
|
5348
|
+
};
|
|
5349
|
+
box: LayoutBox;
|
|
5350
|
+
parts?: IconPart[];
|
|
5351
|
+
picture?: {
|
|
5352
|
+
svg: string;
|
|
5353
|
+
width: number;
|
|
5354
|
+
height: number;
|
|
5355
|
+
};
|
|
5356
|
+
colors: {
|
|
5357
|
+
chip: IconPaint;
|
|
5358
|
+
glyph: IconPaint;
|
|
5359
|
+
};
|
|
5360
|
+
}
|
|
5361
|
+
/**
|
|
5362
|
+
* LH-14: an icon's chip is this many times the size of the text it accompanies across (a list entry's size, the first paragraph of a
|
|
5363
|
+
* group, a metric's label role): STEP_BADGE, so an icon list keeps a step list's column. Its glyph is ICON_GLYPH of the chip.
|
|
5364
|
+
*/
|
|
5365
|
+
declare const ICON_CHIP = 1.75;
|
|
5366
|
+
declare const ICON_GLYPH = 0.55;
|
|
5367
|
+
/**
|
|
5368
|
+
* LH-14: the compact chip, one line of the text it accompanies (1.22 em), which never makes an entry, a metric's band or a group's band
|
|
5369
|
+
* taller than a line: what a slide draws when the full chips (the guarded rule `icon-chips`) would set a block smaller.
|
|
5370
|
+
*/
|
|
5371
|
+
declare const ICON_CHIP_COMPACT = 1.22;
|
|
5372
|
+
/** LH-14: the space between a chip of a metric or a group and the text under it, as a share of the chip's diameter. */
|
|
5373
|
+
declare const ICON_CHIP_GAP = 0.3;
|
|
5374
|
+
/** LH-14: the text size a metric's chip is sized for, in reference pixels (about its label's): a 42 px chip at 1280 x 720. */
|
|
5375
|
+
declare const METRIC_ICON_TEXT = 24;
|
|
3883
5376
|
/** LH-137: the check-mark tiles of a summary list: the fewest and most entries, and the longest entry in characters. */
|
|
3884
5377
|
declare const CHECK_TILE_MIN = 2;
|
|
3885
5378
|
declare const CHECK_TILE_MAX = 6;
|
|
3886
5379
|
declare const CHECK_TILE_MAX_CHARACTERS = 90;
|
|
3887
5380
|
/** LH-137: the most lines an entry may take in a tile of the grid before the tiles become one column of wide tiles. */
|
|
3888
5381
|
declare const CHECK_TILE_MAX_LINES = 2;
|
|
5382
|
+
/**
|
|
5383
|
+
* LH-165: icon cards. A list of ICON_CARD_MIN to ICON_CARD_MAX entries of one level, each with an icon, a label of at most
|
|
5384
|
+
* ICON_CARD_LABEL_CHARACTERS and ICON_CARD_LABEL_WORDS words and an optional description of at most ICON_CARD_DESCRIPTION_CHARACTERS.
|
|
5385
|
+
*/
|
|
5386
|
+
declare const ICON_CARD_MIN = 2;
|
|
5387
|
+
declare const ICON_CARD_MAX = 8;
|
|
5388
|
+
declare const ICON_CARD_LABEL_CHARACTERS = 48;
|
|
5389
|
+
declare const ICON_CARD_LABEL_WORDS = 7;
|
|
5390
|
+
declare const ICON_CARD_DESCRIPTION_CHARACTERS = 160;
|
|
5391
|
+
/** LH-165: a card's description is this share of its label's size (as a ruled row's, LH-08), never under the floor. */
|
|
5392
|
+
declare const ICON_CARD_DESCRIPTION = 0.82;
|
|
5393
|
+
/**
|
|
5394
|
+
* LH-165: the share of its card the tallest card's text may take as it grows (LONE_METRIC_TARGET, as a lone metric fills its card), or more
|
|
5395
|
+
* while the grid's text still covers at most LONE_TARGET of the body (LH-48's fill): the text fills its cards instead of floating in them, up
|
|
5396
|
+
* to COMPACT_GRID_DISPLAY.
|
|
5397
|
+
*/
|
|
5398
|
+
declare const ICON_CARD_FILL = 0.8;
|
|
5399
|
+
/**
|
|
5400
|
+
* LH-162: text tiles. TEXT_TILE_MIN to TEXT_TILE_MAX paragraphs at the root of an automatic slide, each of at most TEXT_TILE_CHARACTERS on one
|
|
5401
|
+
* line of source, set on at most TEXT_TILE_LINES lines in its tile, beside a dot in the accent TEXT_TILE_MARKER of the text size across.
|
|
5402
|
+
*/
|
|
5403
|
+
declare const TEXT_TILE_MIN = 4;
|
|
5404
|
+
declare const TEXT_TILE_MAX = 8;
|
|
5405
|
+
declare const TEXT_TILE_CHARACTERS = 90;
|
|
5406
|
+
declare const TEXT_TILE_LINES = 2;
|
|
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;
|
|
5411
|
+
/**
|
|
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
|
|
5413
|
+
* full but the last, which is at most one card short and never a lone card under full rows.
|
|
5414
|
+
*/
|
|
5415
|
+
declare function cardGridColumns(count: number): number[];
|
|
3889
5416
|
/**
|
|
3890
5417
|
* LH-137: a check mark inside a badge of `diameter` centered on (cx, cy): a solid polygon (a short and a long stroke, each about a seventh
|
|
3891
5418
|
* of the badge thick) in the inner 56% of the badge, the same points for the preview's path and the PPTX export's custom geometry.
|
|
@@ -3967,11 +5494,14 @@ interface ImageFocus {
|
|
|
3967
5494
|
x: number;
|
|
3968
5495
|
y: number;
|
|
3969
5496
|
}
|
|
3970
|
-
/**
|
|
5497
|
+
/**
|
|
5498
|
+
* A frame mask (SH-02: any of the 187 DrawingML presets). `path` is SH-01's evaluated preset outline at the frame, in reference pixels;
|
|
5499
|
+
* `kind` and `preset` are the preset name.
|
|
5500
|
+
*/
|
|
3971
5501
|
interface ImageShape {
|
|
3972
|
-
kind:
|
|
3973
|
-
preset:
|
|
3974
|
-
/** DrawingML avLst guide values (for example adj
|
|
5502
|
+
kind: string;
|
|
5503
|
+
preset: string;
|
|
5504
|
+
/** DrawingML avLst guide values the block set (for example adj), in 1/100000 units or 60000ths of a degree. */
|
|
3975
5505
|
adjust: Record<string, number>;
|
|
3976
5506
|
path: string;
|
|
3977
5507
|
}
|
|
@@ -4021,7 +5551,19 @@ interface ComposedPlacement {
|
|
|
4021
5551
|
* only, then the `border` on the shape outline, then the `overlay`. This is the paint order and the treatment code
|
|
4022
5552
|
* 0.14's slide image used.
|
|
4023
5553
|
*/
|
|
5554
|
+
interface ComposedImageCallout {
|
|
5555
|
+
path: string;
|
|
5556
|
+
text: string;
|
|
5557
|
+
box: LayoutBox;
|
|
5558
|
+
textBox: LayoutBox;
|
|
5559
|
+
textStyle: TextStyle;
|
|
5560
|
+
fit: TextFit | RichTextFit;
|
|
5561
|
+
}
|
|
4024
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;
|
|
4025
5567
|
/** Allocated region, equal to the item's box: the flow cell (after any card padding and caption band) or the placement band. */
|
|
4026
5568
|
region: LayoutBox;
|
|
4027
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). */
|
|
@@ -4033,12 +5575,9 @@ interface ComposedImage {
|
|
|
4033
5575
|
focus: ImageFocus;
|
|
4034
5576
|
/** Mask on the frame: a DrawingML preset with its guide values, and the same outline as an SVG path. */
|
|
4035
5577
|
shape: ImageShape;
|
|
4036
|
-
/**
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
width: number;
|
|
4040
|
-
};
|
|
4041
|
-
/** Picture opacity below 1; the border and overlay are not affected. */
|
|
5578
|
+
/** SH-02: the line along the shape outline (`stroke`, renamed from `border`); width in reference pixels, already scaled to the canvas. */
|
|
5579
|
+
stroke?: ComposedStroke;
|
|
5580
|
+
/** Picture opacity below 1; the stroke and overlay are not affected. */
|
|
4042
5581
|
opacity?: number;
|
|
4043
5582
|
/** Luminance-based recolor (Rec. 601 weights on sRGB values). */
|
|
4044
5583
|
recolor?: {
|
|
@@ -4090,6 +5629,8 @@ interface ComposedBackgroundImage {
|
|
|
4090
5629
|
scrims?: ComposedScrim[];
|
|
4091
5630
|
/** Present when core reads the picture's aspect ratio and the fit is not tile; otherwise call `fitImage` with the host's. */
|
|
4092
5631
|
picture?: ImageFitPlacement;
|
|
5632
|
+
/** LH-158: the background's `textPlacement`, when the author picked where a heading group goes on the picture (SlideComposition.pictureText). */
|
|
5633
|
+
textPlacement?: PictureTextPlacement;
|
|
4093
5634
|
}
|
|
4094
5635
|
/**
|
|
4095
5636
|
* The deck logo drawn on a cover or section slide, at the top-left of the free area and above the
|
|
@@ -4224,7 +5765,8 @@ interface SlideComposition {
|
|
|
4224
5765
|
* LH-49: the same when the layout left a chart's plot shorter than its minimum and the automatic grid draws it taller and reads as
|
|
4225
5766
|
* well (no block smaller unless the layout overflows): `chart` holds the shortest plot height (chartPlotBox) of the layout's
|
|
4226
5767
|
* composition and of this one, in reference pixels. LH-61: `kpis` when the layout stacked one or two metrics over a chart and this
|
|
4227
|
-
* composition sets them in a column beside it (kpiColumn), the chart's plot at least as tall.
|
|
5768
|
+
* composition sets them in a column beside it (kpiColumn), the chart's plot at least as tall. LH-165: `cards` when a layout's lone list with
|
|
5769
|
+
* icons draws its icon cards across the body under the heading (withCards), its text at least as large as in the layout.
|
|
4228
5770
|
*/
|
|
4229
5771
|
recomposed?: {
|
|
4230
5772
|
layoutSize: number;
|
|
@@ -4234,11 +5776,17 @@ interface SlideComposition {
|
|
|
4234
5776
|
plot: number;
|
|
4235
5777
|
};
|
|
4236
5778
|
kpis?: true;
|
|
5779
|
+
table?: true;
|
|
5780
|
+
cards?: true;
|
|
4237
5781
|
};
|
|
4238
5782
|
/** LH-06: the slide's emphasis surface (at most one), when a block or group asks for it or an automatic rule gives one. */
|
|
4239
5783
|
emphasis?: ComposedEmphasis;
|
|
4240
5784
|
/** LH-07: the step badges, connectors and flows of the slide's `sequence` regions, in reading order; absent when none draws. */
|
|
4241
5785
|
steps?: ComposedSteps[];
|
|
5786
|
+
/** LH-14: the icons the slide draws on chips (list entries, metrics, groups), in reading order; absent when none draws. */
|
|
5787
|
+
icons?: ComposedIcon[];
|
|
5788
|
+
/** SH-09: the pyramids and matrices of the slide's `arrangement` regions, in reading order; absent when none draws. */
|
|
5789
|
+
arrangements?: ComposedArrangement[];
|
|
4242
5790
|
/**
|
|
4243
5791
|
* LH-130: the short accent rule above the title that the layout's `title` region asks for (`rule: true`) on a slide with a title and
|
|
4244
5792
|
* no tag: `box` in canvas pixels (TITLE_RULE_SIZE), at the title's start edge (its alignment, mirrored for a right-to-left title),
|
|
@@ -4249,6 +5797,14 @@ interface SlideComposition {
|
|
|
4249
5797
|
path: string;
|
|
4250
5798
|
box: LayoutBox;
|
|
4251
5799
|
};
|
|
5800
|
+
/**
|
|
5801
|
+
* LH-158: where the heading group of a sized title area (a cover, a section) sits on a picture background, with every candidate
|
|
5802
|
+
* placement and its score on the host's measured grid (`pictureLuminance`), so an editor or host can offer the others. Present when
|
|
5803
|
+
* the picture was measured or the background names a `textPlacement`; absent otherwise (the group then sits as wave 6 put it).
|
|
5804
|
+
*/
|
|
5805
|
+
pictureText?: PictureText;
|
|
5806
|
+
/** LH-164: why the slide is drawn on the accent surface (ComposeSlideOptions.messageSurface), echoed so a host can show the reason; absent on a slide with the deck's own surface. */
|
|
5807
|
+
surface?: MessageSurface;
|
|
4252
5808
|
/**
|
|
4253
5809
|
* LH-80, LH-49: automatic composition gave the slide's one picture (`picture`) or one chart (`chart`) a full-height track of its own
|
|
4254
5810
|
* at `edge` (physical), `size` of the slide's width (left, right) or height (top, bottom); `path` is the block's. A picture's track
|
|
@@ -4260,8 +5816,23 @@ interface SlideComposition {
|
|
|
4260
5816
|
size: number;
|
|
4261
5817
|
path: string;
|
|
4262
5818
|
};
|
|
5819
|
+
/**
|
|
5820
|
+
* SH-04: the slide's overlay (`shapes`), in draw order over everything else: overlay shapes (`kind` shape, a shape block item with
|
|
5821
|
+
* `path` slides.N.shapes.I) and connectors (`kind` connector, PowerPoint's connector preset in its frame and the route in slide
|
|
5822
|
+
* coordinates). Placed on the final composition, so it never moves content. Absent on a slide without `shapes`.
|
|
5823
|
+
*/
|
|
5824
|
+
overlayShapes?: ComposedOverlayEntry[];
|
|
4263
5825
|
explanation?: CompositionExplanation;
|
|
4264
5826
|
}
|
|
5827
|
+
/**
|
|
5828
|
+
* LH-164: a slide whose whole body is one display message takes the layout's accent surface (messageSurface in message-surface.ts).
|
|
5829
|
+
* `kind` is the LH-09 rule that made the body one message: `statement-message` (a statement record's message) or `display-message` (a
|
|
5830
|
+
* lone short text grown to display size); `variant` is the color variant the slide is drawn on (an accent slot, the deck's accent order).
|
|
5831
|
+
*/
|
|
5832
|
+
interface MessageSurface {
|
|
5833
|
+
kind: 'statement-message' | 'display-message';
|
|
5834
|
+
variant: ColorVariant;
|
|
5835
|
+
}
|
|
4265
5836
|
interface ComposeSlideOptions {
|
|
4266
5837
|
/** Context for inherited furniture, generated organization names, social profiles, logos, layout hints, references and marker numbering. */
|
|
4267
5838
|
presentation?: {
|
|
@@ -4286,6 +5857,8 @@ interface ComposeSlideOptions {
|
|
|
4286
5857
|
catalogs?: unknown;
|
|
4287
5858
|
references?: unknown;
|
|
4288
5859
|
datasets?: unknown;
|
|
5860
|
+
icons?: unknown;
|
|
5861
|
+
assets?: unknown;
|
|
4289
5862
|
};
|
|
4290
5863
|
/**
|
|
4291
5864
|
* OPF 0.19: the resolved theme record's `design` (titleAlignment, contentAlignment, contentBox, contentDirection,
|
|
@@ -4297,6 +5870,18 @@ interface ComposeSlideOptions {
|
|
|
4297
5870
|
* `onDark` value (cover logo, `var:organization.logo.*` in zone images, picture bullets). Core never inspects colors.
|
|
4298
5871
|
*/
|
|
4299
5872
|
darkBackground?: boolean;
|
|
5873
|
+
/**
|
|
5874
|
+
* LH-164: the accent surface this slide was given because its whole body is one display message (resolveSlideContext's
|
|
5875
|
+
* `resolved.messageSurface`, which also drew `roles` and `darkBackground` for it). Composition draws nothing for it and reports it as
|
|
5876
|
+
* `SlideComposition.surface`, so an editor or host can say why the slide is not on the deck's plain surface.
|
|
5877
|
+
*/
|
|
5878
|
+
messageSurface?: MessageSurface;
|
|
5879
|
+
/**
|
|
5880
|
+
* LH-164: resolves a run color the author wrote (a hex, a role, a scheme slot, `var:`, or SH-02's lighter or darker `{ color, lighten|darken }`)
|
|
5881
|
+
* to the hex the engines draw, for the slide's roles and variables; `resolveSlideContext` passes it with `messageSurface`, so a color that does
|
|
5882
|
+
* not read on the surface can be drawn in one that does.
|
|
5883
|
+
*/
|
|
5884
|
+
resolveRunColor?: (reference: unknown) => string | undefined;
|
|
4300
5885
|
/**
|
|
4301
5886
|
* The resolved theme's `background`, the lowest level of the background chain (the slide's design.background, then
|
|
4302
5887
|
* the deck's, then this). Only an image background produces geometry (`SlideComposition.backgroundImage`).
|
|
@@ -4315,14 +5900,14 @@ interface ComposeSlideOptions {
|
|
|
4315
5900
|
fontFamilies?: Partial<FontFamilies>;
|
|
4316
5901
|
/**
|
|
4317
5902
|
* Deck base direction (RR-05). Defaults to the direction of the presentation language's script. In a right-to-left deck
|
|
4318
|
-
* 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
|
|
4319
5904
|
* header/footer zones swap sides, tables run right to left), lists put their markers at the right, and every text fit
|
|
4320
|
-
* 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.
|
|
4321
5906
|
*/
|
|
4322
5907
|
direction?: TextDirection;
|
|
4323
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. */
|
|
4324
|
-
contentAlignment?:
|
|
4325
|
-
titleAlignment?:
|
|
5909
|
+
contentAlignment?: DesignAlignment;
|
|
5910
|
+
titleAlignment?: DesignAlignment;
|
|
4326
5911
|
/** Unscaled reference pixels around provided vector outlines; defaults to 1 for body text and 2 for furniture. Explicit values apply to both. */
|
|
4327
5912
|
textRasterPadding?: number;
|
|
4328
5913
|
/** Deck-level body cards a host resolved itself, ranked like contentAlignment. A slide's explicit design.contentBox overrides this value. */
|
|
@@ -4367,6 +5952,8 @@ declare class OPFCompositionError extends Error {
|
|
|
4367
5952
|
readonly explanation?: CompositionExplanation;
|
|
4368
5953
|
constructor(diagnostics: LayoutDiagnostic[], explanation?: CompositionExplanation);
|
|
4369
5954
|
}
|
|
5955
|
+
/** SH-02: an image frame's mask: any of the 187 presets, with the block's adjust values (OPF units), from SH-01's geometry (shape-block.ts presetMask). */
|
|
5956
|
+
declare function imageShape(preset: string, box: LayoutBox, adjust?: Record<string, number>): ImageShape;
|
|
4370
5957
|
/**
|
|
4371
5958
|
* LH-84: how far down a portrait picture's crop is kept in view when the author gave no focus. A cover crop of a picture taller than
|
|
4372
5959
|
* wide into a wider frame trims the top and bottom; a centered crop trims the head of a portrait as much as the legs, so the focus
|
|
@@ -4379,7 +5966,6 @@ declare function defaultImageFocus(frame: LayoutBox, fit: ImageFit, aspect: numb
|
|
|
4379
5966
|
* Outline of a DrawingML preset in a box, following the ECMA-376 presetShapeDefinitions formulas:
|
|
4380
5967
|
* roundRect (adj; ss = min(w,h), radius = ss*adj/100000), ellipse, and hexagon (adj, vf).
|
|
4381
5968
|
*/
|
|
4382
|
-
declare function imageShape(kind: ImageShape['kind'], box: LayoutBox, cornerRadius?: number): ImageShape;
|
|
4383
5969
|
/**
|
|
4384
5970
|
* LH-104: `fit: "auto"` crops a picture only when the crop is small. A cover crop keeps coverKept of the picture along the dimension it
|
|
4385
5971
|
* crops; at 0.85 at most 7.5% goes off each edge, which a photo loses without losing its subject, while a 16:9 photo in a 2:1 band
|
|
@@ -4421,10 +6007,17 @@ declare function imageBackground(value: unknown): {
|
|
|
4421
6007
|
opacity?: number;
|
|
4422
6008
|
recolor?: unknown;
|
|
4423
6009
|
overlay?: unknown;
|
|
6010
|
+
textPlacement?: PictureTextPlacement;
|
|
4424
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;
|
|
4425
6018
|
interface FurniturePartBase {
|
|
4426
6019
|
kind: 'header' | 'footer';
|
|
4427
|
-
zone: '
|
|
6020
|
+
zone: 'start' | 'center' | 'end';
|
|
4428
6021
|
field: 'text' | 'image' | 'socials' | 'date';
|
|
4429
6022
|
/** Literal field or controlling flag, with the actual inherited/local path. */
|
|
4430
6023
|
path: string;
|
|
@@ -4559,7 +6152,8 @@ declare function measureText(text: string, fontSize: number): number;
|
|
|
4559
6152
|
/** The default estimate for a monospace face: 0.6 em per ASCII character, the proportional estimate for the rest. */
|
|
4560
6153
|
declare function measureMonospaceText(text: string, fontSize: number): number;
|
|
4561
6154
|
declare function wrapText(text: string, width: number, fontSize: number, measure?: MeasureTextWidth): string[];
|
|
4562
|
-
|
|
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;
|
|
4563
6157
|
/**
|
|
4564
6158
|
* PowerPoint stores a run size (`sz`) in hundredths of a point, and composition pixels are CSS pixels (96 per
|
|
4565
6159
|
* inch, so a point is 4/3 px). Every composed font size is therefore a whole multiple of 0.01 pt, which is
|
|
@@ -4577,7 +6171,8 @@ interface QuoteContent {
|
|
|
4577
6171
|
attribution?: string;
|
|
4578
6172
|
role?: string;
|
|
4579
6173
|
photo?: unknown;
|
|
4580
|
-
source?: string;
|
|
6174
|
+
source?: string; /** LH-132: how the photo is drawn; composeSlide decides when absent. */
|
|
6175
|
+
portrait?: 'avatar' | 'side';
|
|
4581
6176
|
}
|
|
4582
6177
|
/** Source and displayed-text ranges are half-open UTF-16 offsets. Added punctuation has no source range. */
|
|
4583
6178
|
interface QuoteTextSource {
|
|
@@ -4620,10 +6215,12 @@ interface QuotePhoto {
|
|
|
4620
6215
|
path: string;
|
|
4621
6216
|
/** Asset value (string or Asset object) that engines resolve like any other image; crop to cover the frame. */
|
|
4622
6217
|
value: unknown;
|
|
4623
|
-
/** Square frame, in reference pixels. */
|
|
6218
|
+
/** Square frame, in reference pixels (LH-132: a tall one for a portrait beside the quote). */
|
|
4624
6219
|
box: LayoutBox;
|
|
4625
|
-
/** Circle mask: the `ellipse` DrawingML preset and the same outline as an SVG path, as an image block's shape 'circle'. */
|
|
6220
|
+
/** Circle mask: the `ellipse` DrawingML preset and the same outline as an SVG path, as an image block's shape 'circle'. LH-132: a portrait beside the quote is a rounded rectangle (`roundRect`). */
|
|
4626
6221
|
shape: ImageShape;
|
|
6222
|
+
/** LH-132: the point a portrait beside the quote keeps in view as it crops to cover its frame (the upper third); absent, a centered crop. */
|
|
6223
|
+
focus?: ImageFocus;
|
|
4627
6224
|
}
|
|
4628
6225
|
interface QuoteLayout {
|
|
4629
6226
|
/** Measured vertical content envelope at the allocated width, including the photo. */
|
|
@@ -4638,9 +6235,26 @@ interface QuoteLayout {
|
|
|
4638
6235
|
* color by both engines. Absent for every other quote.
|
|
4639
6236
|
*/
|
|
4640
6237
|
rule?: LayoutBox;
|
|
6238
|
+
/**
|
|
6239
|
+
* LH-78: the decorative quotation mark at the start edge of the top of a quote on a card (`markQuote`), drawn in the deck's primary color (against the
|
|
6240
|
+
* card, as a metric's value is) by both engines, in the card's padding above the quote's text: it takes no room from the quote.
|
|
6241
|
+
*/
|
|
6242
|
+
mark?: QuoteMark;
|
|
4641
6243
|
diagnostics: QuoteLayoutDiagnostic[];
|
|
4642
6244
|
overflow: boolean;
|
|
4643
6245
|
}
|
|
6246
|
+
/** LH-78: a quote's decorative mark: one glyph, fitted like any quote part (its box, fit and style are the engines' to draw). */
|
|
6247
|
+
interface QuoteMark {
|
|
6248
|
+
/** `<quote path>.mark`: generated, with no source field. */
|
|
6249
|
+
path: string;
|
|
6250
|
+
text: string;
|
|
6251
|
+
box: LayoutBox;
|
|
6252
|
+
fit: TextFit;
|
|
6253
|
+
style: TextStyle;
|
|
6254
|
+
requestedStyle: TextStyle;
|
|
6255
|
+
/** The quote's own opening mark that is not drawn because this mark stands for it (the body text starts after it); absent when the body kept its own. */
|
|
6256
|
+
hidden?: string;
|
|
6257
|
+
}
|
|
4644
6258
|
interface QuoteLayoutOptions {
|
|
4645
6259
|
/** Canvas short edge divided by 720. Insets retain the current 18 reference-pixel contract. */
|
|
4646
6260
|
scale?: number;
|
|
@@ -4696,6 +6310,83 @@ declare const LONE_DISPLAY_SIZES: {
|
|
|
4696
6310
|
declare const LONE_FILL = 0.5;
|
|
4697
6311
|
declare const LONE_TARGET = 0.6;
|
|
4698
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;
|
|
4699
6390
|
/**
|
|
4700
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)
|
|
4701
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
|
|
@@ -4716,11 +6407,6 @@ declare const TITLE_RULE_SIZE: {
|
|
|
4716
6407
|
readonly width: 80;
|
|
4717
6408
|
readonly height: 5;
|
|
4718
6409
|
};
|
|
4719
|
-
/**
|
|
4720
|
-
* Wave 6 review: the widest range of grays (0 to 255, through the author's overlay) a measured picture may show under a heading group
|
|
4721
|
-
* that its layout anchors low over a picture background for it to stay low; a wider band is busy and the group is centered.
|
|
4722
|
-
*/
|
|
4723
|
-
declare const CALM_PICTURE_SPREAD = 48;
|
|
4724
6410
|
/**
|
|
4725
6411
|
* LH-78: how large a quote's body starts. Composition sets them; the default is the display size (QUOTE_NOMINAL_SIZE) with no line
|
|
4726
6412
|
* limit, as before.
|
|
@@ -4740,6 +6426,19 @@ interface QuoteBodyOptions extends QuoteLayoutOptions {
|
|
|
4740
6426
|
* Composition sets it for a short quote under or over data.
|
|
4741
6427
|
*/
|
|
4742
6428
|
pull?: boolean;
|
|
6429
|
+
/**
|
|
6430
|
+
* LH-132: `side` draws the photo as a tall picture at the start of the quote (QUOTE_PORTRAIT_SHARE of its width) with the text beside
|
|
6431
|
+
* it, centered against it, instead of the avatar beside the attribution. Composition sets it for a wide quote or the quote's `portrait`;
|
|
6432
|
+
* a box too small for the picture keeps the avatar.
|
|
6433
|
+
*/
|
|
6434
|
+
portrait?: 'side';
|
|
6435
|
+
/** LH-132: the share of the quote's width the portrait beside it takes (); QUOTE_PORTRAIT_SHARE when absent. */
|
|
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;
|
|
4743
6442
|
}
|
|
4744
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. */
|
|
4745
6444
|
declare const QUOTE_PULL_RULE: {
|
|
@@ -4756,6 +6455,31 @@ declare const QUOTE_PULL_LINES = 2;
|
|
|
4756
6455
|
* check overflow before accepting the parts. Line boxes are not shaped glyph or native raster bounds.
|
|
4757
6456
|
*/
|
|
4758
6457
|
declare function layoutQuote(value: string | QuoteContent, box: LayoutBox, options?: QuoteBodyOptions): QuoteLayout;
|
|
6458
|
+
/**
|
|
6459
|
+
* LH-78: a quote on a card draws a decorative quotation mark at the start edge of the card's top, in the primary color (QuoteLayout.mark), as
|
|
6460
|
+
* Claude Design draws one over each quote card: the language's opening mark (a low one, which sits at the baseline, is drawn as the high English
|
|
6461
|
+
* mark instead), bold, at most `QUOTE_MARK.sizes[0]` times the body's size. It is drawn in the card's own padding above the quote's text, its ink centered
|
|
6462
|
+
* between the card's top edge and the text's top (`card` is the card's box), at the largest of `QUOTE_MARK.sizes` whose ink fills at most
|
|
6463
|
+
* `QUOTE_MARK.fill` of that padding. Nothing moves and no size changes: the quote's text, footer and photo stay where they were. A card with
|
|
6464
|
+
* less padding than that, a quote that overflows, a pull line and a photo beside the quote draw no mark.
|
|
6465
|
+
*/
|
|
6466
|
+
declare const QUOTE_MARK: {
|
|
6467
|
+
readonly sizes: readonly [1.5, 1.25, 1];
|
|
6468
|
+
readonly ink: {
|
|
6469
|
+
readonly top: 0.22;
|
|
6470
|
+
readonly bottom: 0.58;
|
|
6471
|
+
};
|
|
6472
|
+
readonly fill: 0.7;
|
|
6473
|
+
};
|
|
6474
|
+
declare function markQuote(layout: QuoteLayout, card: LayoutBox, options?: {
|
|
6475
|
+
scale?: number;
|
|
6476
|
+
fontFamilies?: Partial<FontFamilies>;
|
|
6477
|
+
textMeasurement?: TextMeasurement;
|
|
6478
|
+
direction?: TextDirection;
|
|
6479
|
+
language?: string;
|
|
6480
|
+
path?: string;
|
|
6481
|
+
citationMarker?: (runPath: string) => string | undefined;
|
|
6482
|
+
}): QuoteLayout;
|
|
4759
6483
|
interface MetricContent {
|
|
4760
6484
|
value: string | number;
|
|
4761
6485
|
label?: string;
|
|
@@ -4868,6 +6592,11 @@ interface MetricLayoutOptions extends QuoteLayoutOptions {
|
|
|
4868
6592
|
max: number;
|
|
4869
6593
|
height?: number;
|
|
4870
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;
|
|
4871
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. */
|
|
4872
6601
|
band?: boolean;
|
|
4873
6602
|
/**
|
|
@@ -4946,6 +6675,68 @@ declare const TIER_MAX = 5;
|
|
|
4946
6675
|
/** LH-136: a set of pillars drawn as display words has at most PILLAR_MAX of them, each title a word of at most PILLAR_WORD_MAX characters. */
|
|
4947
6676
|
declare const PILLAR_MAX = 5;
|
|
4948
6677
|
declare const PILLAR_WORD_MAX = 14;
|
|
6678
|
+
/**
|
|
6679
|
+
* LH-132: how a person's picture is drawn (the image option and the quote field `portrait`): `avatar`, the small circle (a team's picture
|
|
6680
|
+
* over the name, a quote's beside the attribution); `side`, a tall picture beside the text; `top`, the picture across the top of the card.
|
|
6681
|
+
*/
|
|
6682
|
+
declare const PORTRAIT_MODES: readonly ["avatar", "side", "top"];
|
|
6683
|
+
type PortraitMode = typeof PORTRAIT_MODES[number];
|
|
6684
|
+
/**
|
|
6685
|
+
* LH-132: a team of 2 to PORTRAIT_TOP_MAX people draws each portrait across the top of its card at the card's width, in one row (Claude
|
|
6686
|
+
* Design n22); up to PORTRAIT_SIDE_MAX, beside the text at PORTRAIT_SIDE_SHARE of the card's inner width (n23); more keep the avatar.
|
|
6687
|
+
*/
|
|
6688
|
+
declare const PORTRAIT_TOP_MAX = 4;
|
|
6689
|
+
declare const PORTRAIT_SIDE_MAX = 6;
|
|
6690
|
+
declare const PORTRAIT_SIDE_SHARE = 0.4;
|
|
6691
|
+
/** LH-132 review: the shares of the card a side portrait tries, widest first, down to 30%, so a name fits its column on one line. */
|
|
6692
|
+
declare const PORTRAIT_SIDE_SHARES: readonly [0.4, 0.35, 0.3];
|
|
6693
|
+
/**
|
|
6694
|
+
* LH-132: a portrait's frame is at most this tall for its width (width / height: 4:5 across a card's top, 0.7 beside the text, Claude
|
|
6695
|
+
* Design's 146 x 200) and at least this wide (4:3): a frame flatter than that crops a face to a strip, so the person keeps the avatar.
|
|
6696
|
+
*/
|
|
6697
|
+
declare const PORTRAIT_TALLEST: {
|
|
6698
|
+
readonly top: 0.8;
|
|
6699
|
+
readonly side: 0.7;
|
|
6700
|
+
};
|
|
6701
|
+
declare const PORTRAIT_WIDEST: number;
|
|
6702
|
+
/** LH-187: a side portrait in a card that takes its whole cell may be this tall for its width (narrower than PORTRAIT_TALLEST.side), as Claude Design's n23. */
|
|
6703
|
+
declare const PORTRAIT_SIDE_FILL = 0.6;
|
|
6704
|
+
/**
|
|
6705
|
+
* LH-132, in reference pixels: the narrowest card a portrait is drawn across the top of, the narrowest portrait beside the text and the
|
|
6706
|
+
* narrowest text beside it, and the gap between a portrait and its text.
|
|
6707
|
+
*/
|
|
6708
|
+
declare const PORTRAIT_MIN: {
|
|
6709
|
+
readonly topCard: 160;
|
|
6710
|
+
readonly side: 72;
|
|
6711
|
+
readonly text: 150;
|
|
6712
|
+
};
|
|
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
|
+
};
|
|
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. */
|
|
6724
|
+
declare const PORTRAIT_TEXT_SIZE = 21;
|
|
6725
|
+
/**
|
|
6726
|
+
* LH-132 review: a portrait beside the text leaves the text a column; an automatic side portrait is drawn only where that column keeps every
|
|
6727
|
+
* name on one line and reads at least PORTRAIT_SIDE_CHARS characters a line at the size the team's text takes. Otherwise a top portrait is
|
|
6728
|
+
* tried, and the avatar kept.
|
|
6729
|
+
*/
|
|
6730
|
+
declare const PORTRAIT_SIDE_CHARS = 20;
|
|
6731
|
+
/**
|
|
6732
|
+
* LH-132: a quote with a photo draws it as a tall picture at the start of the quote (Claude Design n24) when the quote is at least
|
|
6733
|
+
* QUOTE_PORTRAIT_MIN_WIDTH wide: QUOTE_PORTRAIT_SHARE of its width, at most PORTRAIT_TALLEST.side tall for that width and never taller
|
|
6734
|
+
* than the quote, QUOTE_PORTRAIT_GAP from the text, which is centered against it. A narrower quote (three side by side) keeps the avatar.
|
|
6735
|
+
*/
|
|
6736
|
+
declare const QUOTE_PORTRAIT_SHARE = 0.26;
|
|
6737
|
+
declare const QUOTE_PORTRAIT_STEP = 0.02;
|
|
6738
|
+
declare const QUOTE_PORTRAIT_GAP = 40;
|
|
6739
|
+
declare const QUOTE_PORTRAIT_MIN_WIDTH = 640;
|
|
4949
6740
|
/**
|
|
4950
6741
|
* Measure every metric field before accepting geometry. Short single-line values and units can
|
|
4951
6742
|
* share a baseline; longer values or units stack. No locale formatting or rewritten source text is
|
|
@@ -4957,16 +6748,16 @@ declare const PILLAR_WORD_MAX = 14;
|
|
|
4957
6748
|
declare function layoutMetric(value: string | number | MetricContent, box: LayoutBox, options?: MetricLayoutOptions): MetricLayout;
|
|
4958
6749
|
/** Progress of a timeline event (FA-11). Engines draw it from the deck's colors; see `timelineMarkerShapes`. */
|
|
4959
6750
|
type TimelineStatus = 'done' | 'current' | 'planned';
|
|
4960
|
-
/**
|
|
4961
|
-
* LH-121: the word drawn under an event's label for its status (`statusWords`). English only: a deck in another language keeps the
|
|
4962
|
-
* status in its markers and connector, until the catalog carries localized words.
|
|
4963
|
-
*/
|
|
6751
|
+
/** English status vocabulary, kept for callers that explicitly draw English labels. */
|
|
4964
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;
|
|
4965
6755
|
interface TimelineEvent {
|
|
4966
6756
|
when?: string;
|
|
4967
6757
|
what: string;
|
|
4968
6758
|
description?: string;
|
|
4969
6759
|
status?: TimelineStatus;
|
|
6760
|
+
duration?: number;
|
|
4970
6761
|
}
|
|
4971
6762
|
interface TimelineContent {
|
|
4972
6763
|
name?: string;
|
|
@@ -5022,12 +6813,28 @@ interface TimelineLayout {
|
|
|
5022
6813
|
x: number;
|
|
5023
6814
|
y: number;
|
|
5024
6815
|
radius: number;
|
|
6816
|
+
duration?: number;
|
|
5025
6817
|
status?: TimelineStatus;
|
|
5026
6818
|
ring?: {
|
|
5027
6819
|
radius: number;
|
|
5028
6820
|
};
|
|
5029
6821
|
strokeWidth?: number;
|
|
5030
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
|
+
}[];
|
|
5031
6838
|
connector: {
|
|
5032
6839
|
x1: number;
|
|
5033
6840
|
y1: number;
|
|
@@ -5068,8 +6875,10 @@ interface TimelineLayoutOptions extends QuoteLayoutOptions {
|
|
|
5068
6875
|
* No part goes below `minFontSize`.
|
|
5069
6876
|
*/
|
|
5070
6877
|
sizeOffset?: number;
|
|
5071
|
-
/** 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). */
|
|
5072
6879
|
statusWords?: boolean;
|
|
6880
|
+
/** LH-16: measure the intrinsic height of proportional ranges rather than filling their allocated vertical rail. */
|
|
6881
|
+
intrinsic?: boolean;
|
|
5073
6882
|
}
|
|
5074
6883
|
/** Preserve event order and field boundaries while trying at most 100 readable arrangements. */
|
|
5075
6884
|
declare function layoutTimeline(value: readonly TimelineEvent[] | TimelineContent, box: LayoutBox, options?: TimelineLayoutOptions): TimelineLayout;
|
|
@@ -5153,7 +6962,12 @@ interface RichTextRun {
|
|
|
5153
6962
|
italic?: boolean;
|
|
5154
6963
|
underline?: boolean;
|
|
5155
6964
|
strikethrough?: boolean;
|
|
5156
|
-
color
|
|
6965
|
+
/** A ColorRef string, or SH-02's lighter or darker form ({ color, lighten } or { color, darken }). */
|
|
6966
|
+
color?: string | {
|
|
6967
|
+
color: unknown;
|
|
6968
|
+
lighten?: number;
|
|
6969
|
+
darken?: number;
|
|
6970
|
+
};
|
|
5157
6971
|
fontSize?: number;
|
|
5158
6972
|
fontFamily?: string;
|
|
5159
6973
|
link?: string;
|
|
@@ -5162,7 +6976,7 @@ interface RichTextRun {
|
|
|
5162
6976
|
/** Inline code: the run takes the design's code font (`RichTextOptions.codeFontFamily`) unless it names its own `fontFamily`. */
|
|
5163
6977
|
code?: boolean;
|
|
5164
6978
|
/** BCP-47 tag that overrides the deck language for this run; it reaches the fragment style as `style.lang`. */
|
|
5165
|
-
|
|
6979
|
+
language?: string;
|
|
5166
6980
|
/** RR-34: reference ids this run cites (a marker follows the run; the deck's `references` list resolves them). */
|
|
5167
6981
|
cite?: string | string[];
|
|
5168
6982
|
/** RR-34: an inline footnote for this run (a marker follows the run; the note is listed in the slide's footnote area). */
|
|
@@ -5219,6 +7033,14 @@ interface RichTextOptions {
|
|
|
5219
7033
|
* stranded word. Explicit line breaks stay; a size is never reduced to balance, and a heading that would need another line stays greedy.
|
|
5220
7034
|
*/
|
|
5221
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;
|
|
5222
7044
|
}
|
|
5223
7045
|
/** Fit mixed styles without flattening font metrics. Run fontSize is in points. */
|
|
5224
7046
|
declare function fitRichText(input: readonly (string | RichTextRun)[], box: LayoutBox, requestedSize?: number, minFontSize?: number, options?: RichTextOptions): RichTextFit;
|
|
@@ -5261,7 +7083,10 @@ interface ListEntryLayout {
|
|
|
5261
7083
|
anchor?: 'end';
|
|
5262
7084
|
none?: true;
|
|
5263
7085
|
};
|
|
5264
|
-
/**
|
|
7086
|
+
/**
|
|
7087
|
+
* LH-77: the entry of a heading list (`ListFitOptions.heading`): bold at LIST_HEADING_SCALE times the list size, with no marker. LH-173: a
|
|
7088
|
+
* label whose longest word is wider than its box there steps down to the size at which the word fits whole, never under the list size.
|
|
7089
|
+
*/
|
|
5265
7090
|
heading?: true;
|
|
5266
7091
|
/**
|
|
5267
7092
|
* LH-07: the entry's step badge (`ListFitOptions.badges`): a circle of `diameter` centered at (`cx`, `cy`) in the marker column,
|
|
@@ -5277,6 +7102,15 @@ interface ListEntryLayout {
|
|
|
5277
7102
|
fontSize: number;
|
|
5278
7103
|
numeral?: LayoutBox;
|
|
5279
7104
|
};
|
|
7105
|
+
/**
|
|
7106
|
+
* LH-14: the entry's icon chip (`ListFitOptions.icons`): a circle of `diameter` centered at (`cx`, `cy`) in the marker column, centered
|
|
7107
|
+
* on the first line's capitals, in place of the bullet. Composition draws the entry's `icon` in it (SlideComposition.icons).
|
|
7108
|
+
*/
|
|
7109
|
+
icon?: {
|
|
7110
|
+
cx: number;
|
|
7111
|
+
cy: number;
|
|
7112
|
+
diameter: number;
|
|
7113
|
+
};
|
|
5280
7114
|
/**
|
|
5281
7115
|
* LH-133: the entry's label is a term (a ruled row of a glossary, `ListFitOptions.pairs: "term"`): it draws in the accent, the tag's color
|
|
5282
7116
|
* on its backdrop (the text color where the primary reads under 4.5:1).
|
|
@@ -5356,6 +7190,8 @@ interface ListFitOptions extends RichTextOptions {
|
|
|
5356
7190
|
* 1.1 em and the widest marker plus 0.3 em, so wide markers never touch their text; unnumbered lists are unchanged.
|
|
5357
7191
|
*/
|
|
5358
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;
|
|
5359
7195
|
/** Picture bullet for every entry (effective `design.listBullet: "image"` with a resolved icon logo). */
|
|
5360
7196
|
bulletImage?: ListBulletImage;
|
|
5361
7197
|
/**
|
|
@@ -5378,6 +7214,19 @@ interface ListFitOptions extends RichTextOptions {
|
|
|
5378
7214
|
display?: boolean;
|
|
5379
7215
|
/** LH-136: the display word is at most this size in canvas pixels, so sibling pillars read at one word size (composition passes the smallest any of them fitted at). */
|
|
5380
7216
|
displayMax?: number;
|
|
7217
|
+
/**
|
|
7218
|
+
* LH-173: the label of a heading list (`heading`, not `display`) is at most this size in canvas pixels, so the labels of a row of steps or
|
|
7219
|
+
* columns read at one size when one of them stepped down to keep a word whole (composition passes the smallest any of them fitted at).
|
|
7220
|
+
*/
|
|
7221
|
+
headingMax?: number;
|
|
7222
|
+
/** LH-69: the display word's rule is short (LIST_DISPLAY_SCALE em, the display word's own em) at the start edge, as LH-130's title rule, not across the box. */
|
|
7223
|
+
displayRule?: 'short';
|
|
7224
|
+
/**
|
|
7225
|
+
* LH-169: the display heading is the figure of a metric row (`display`): its description, the figure's label, is set at this many times
|
|
7226
|
+
* the list size (the size the list drew its descriptions at) rather than at the list size, and the figure may step down to the list size
|
|
7227
|
+
* (not LIST_HEADING_SCALE of it) to stay on one line: bold, in the accent and over its rule, it still reads above its label.
|
|
7228
|
+
*/
|
|
7229
|
+
labelScale?: number;
|
|
5381
7230
|
/**
|
|
5382
7231
|
* LH-08: ruled rows (effective `design.listStyle: "rows"`): each first-level entry is a row, a hairline between two rows (`ListFit.rules`)
|
|
5383
7232
|
* and LIST_ROWS_GAP em between them; no bullet (numbers stay). When every entry has a description and sits at the first level, the labels
|
|
@@ -5392,6 +7241,15 @@ interface ListFitOptions extends RichTextOptions {
|
|
|
5392
7241
|
* `numbering` and entries of level 0; ignored otherwise.
|
|
5393
7242
|
*/
|
|
5394
7243
|
badges?: boolean;
|
|
7244
|
+
/**
|
|
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
|
|
7246
|
+
* bullet (`ListEntryLayout.icon`), centered on the entry's first line; every entry keeps that column, so the texts start at one edge.
|
|
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.
|
|
7249
|
+
*/
|
|
7250
|
+
icons?: boolean;
|
|
7251
|
+
/** LH-14: the chip's size in em of the list size: ICON_CHIP (the default) or ICON_CHIP_COMPACT. */
|
|
7252
|
+
iconScale?: number;
|
|
5395
7253
|
/**
|
|
5396
7254
|
* LH-133: the entries of a ruled list (`rows`) pair a question (`question`) or a term (`term`) with its answer or definition. A question's
|
|
5397
7255
|
* column is LIST_ROWS_LABEL_SHARE of the width, the question wrapping in it (at most LIST_QUESTION_LINES lines, else the answer goes under
|
|
@@ -5457,6 +7315,8 @@ declare function pairEntry(entry: unknown): 'question' | 'term' | 'label' | unde
|
|
|
5457
7315
|
/** LH-117: the share of a column's body cells that must read as numbers (numericText) for the column to align as numbers. */
|
|
5458
7316
|
declare const TABLE_NUMERIC_SHARE = 0.75;
|
|
5459
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;
|
|
5460
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. */
|
|
5461
7321
|
alignment?: 'left' | 'center' | 'right';
|
|
5462
7322
|
scale?: number;
|
|
@@ -5544,7 +7404,7 @@ interface LayoutAreasOptions extends Omit<ComposeSlideOptions, 'layout' | 'expla
|
|
|
5544
7404
|
bleed?: boolean;
|
|
5545
7405
|
/** Placed-image bands the slide layout reserves, as image blocks with these placements would. */
|
|
5546
7406
|
placements?: readonly {
|
|
5547
|
-
edge:
|
|
7407
|
+
edge: 'start' | 'end' | 'top' | 'bottom';
|
|
5548
7408
|
size?: number;
|
|
5549
7409
|
inset?: boolean;
|
|
5550
7410
|
}[];
|
|
@@ -5581,22 +7441,65 @@ declare const EMPHASIS_BAND_MAX_CHARACTERS = 60;
|
|
|
5581
7441
|
declare const EMPHASIS_PILL_MAX_CHARACTERS = 30;
|
|
5582
7442
|
/** LH-06 (widened): a last text of up to this many characters is a foot band when it follows two or more charts or tables (a takeaway). */
|
|
5583
7443
|
declare const EMPHASIS_TAKEAWAY_MAX_CHARACTERS = 120;
|
|
7444
|
+
/**
|
|
7445
|
+
* LH-170: a closing note (a `verdict` region's text, or the paragraph after a row of figures) is a foot band when it sets in at most this
|
|
7446
|
+
* many lines across the band at its size.
|
|
7447
|
+
*/
|
|
7448
|
+
declare const EMPHASIS_NOTE_LINES = 3;
|
|
7449
|
+
/**
|
|
7450
|
+
* LH-170 review: a closing note whose length is within this share of the median of the texts of its form above it, or that opens as they
|
|
7451
|
+
* do in its first NOTE_PEER_WORDS words, is one of them (a peer), and stays text.
|
|
7452
|
+
*/
|
|
7453
|
+
declare const NOTE_PEER_RATIO: readonly [0.6, 1.6];
|
|
7454
|
+
declare const NOTE_PEER_WORDS = 6;
|
|
7455
|
+
/** LH-169: a list of FIGURE_ROW_MIN to FIGURE_ROW_MAX entries that each lead with a figure of at most FIGURE_WORDS words is a metric row. */
|
|
7456
|
+
declare const FIGURE_ROW_MIN = 2;
|
|
7457
|
+
declare const FIGURE_ROW_MAX = 4;
|
|
7458
|
+
declare const FIGURE_WORDS = 4;
|
|
7459
|
+
/** LH-169: whether a list entry's text is a short figure: a number with its unit or comparison, FIGURE_WORDS words or fewer, on one line, not a sentence. */
|
|
7460
|
+
declare function figureText(value: unknown): boolean;
|
|
7461
|
+
/**
|
|
7462
|
+
* LH-169: whether a list payload is a row of figures: FIGURE_ROW_MIN to FIGURE_ROW_MAX first-level entries, every one a figure (figureText)
|
|
7463
|
+
* with a description (its label). A list where only some entries lead with a figure, or whose entries have no descriptions, is a list.
|
|
7464
|
+
*/
|
|
7465
|
+
declare function figureList(value: unknown): boolean;
|
|
5584
7466
|
/** LH-114: the longest quote (its text, without the marks) drawn as a pull line, in characters. */
|
|
5585
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;
|
|
5586
7470
|
/**
|
|
5587
|
-
*
|
|
5588
|
-
*
|
|
5589
|
-
*
|
|
5590
|
-
* removes a finding. Then the slide settles (settle): an under-filled body grows (LH-48), a template slide may be recomposed as the
|
|
5591
|
-
* automatic grid (LH-49 for a short plot, LH-83 at the floor), and an automatic slide may give its picture or chart a track (LH-80,
|
|
5592
|
-
* LH-49); each of those arrangements is guarded the same way and kept only when it reads as well as the guarded composition.
|
|
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.
|
|
5593
7474
|
*/
|
|
7475
|
+
declare function overlaysDrawBody(shapes: unknown): boolean;
|
|
5594
7476
|
declare function composeSlide(input: unknown, options?: ComposeSlideOptions): SlideComposition;
|
|
5595
7477
|
/**
|
|
5596
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
|
|
5597
7479
|
* contrast rules sample there and the automatic scrim (LH-02) covers it. Quote, metric and timeline items, and items without lines, keep their box.
|
|
5598
7480
|
*/
|
|
5599
7481
|
declare function textInkBox(item: ComposedItem, measurement: TextMeasurement | undefined): LayoutBox;
|
|
7482
|
+
/** LH-09: a message of at most this many words (messageWords) is short: it is drawn at display size. LH-69: a text of at most SHORT_TEXT_WORDS is a lone label. */
|
|
7483
|
+
declare const SHORT_MESSAGE_WORDS = 25;
|
|
7484
|
+
declare const SHORT_TEXT_WORDS = 4;
|
|
7485
|
+
/** LH-09: a short message grows up to this display size; LH-69: a lone short text up to the display title's (HEADING_DISPLAY_SIZES.title). */
|
|
7486
|
+
declare const MESSAGE_DISPLAY_SIZE = 56;
|
|
7487
|
+
/** LH-09: a message drawn at display size takes at most this many balanced lines. */
|
|
7488
|
+
declare const MESSAGE_DISPLAY_LINES = 4;
|
|
7489
|
+
declare function messageWords(value: unknown): number;
|
|
7490
|
+
/** LH-164: the one payload a slide's body holds (its field and the block or slide that carries it), or undefined for no body, several payloads or nested blocks. */
|
|
7491
|
+
declare function lonePayload(slide: Record<string, any>): {
|
|
7492
|
+
field: string;
|
|
7493
|
+
host: Record<string, any>;
|
|
7494
|
+
} | undefined;
|
|
7495
|
+
/**
|
|
7496
|
+
* LH-09: how a stacked record with one primary region (the statement) sets a slide with one block. `title`: the title is the statement
|
|
7497
|
+
* (a sentence over a paragraph, n27, n29), drawn at display size under LH-130's accent rule with the paragraph at its size below.
|
|
7498
|
+
* `body`: the block is the message (a metric, n28, or a text under a title of at most SHORT_TEXT_WORDS words that only labels it), so
|
|
7499
|
+
* the title is the running head at the top of the slide and the block fills the body as a lone block (statementTemplate). Undefined for
|
|
7500
|
+
* any other slide: no body (the headings are the message, LH-129), a quote, several blocks, a subtitle. With no title the block is the message.
|
|
7501
|
+
*/
|
|
7502
|
+
declare function statementMessage(slide: Record<string, any>, plan: LayoutTemplate, fill?: boolean): 'title' | 'body' | undefined;
|
|
5600
7503
|
/**
|
|
5601
7504
|
* LH-49: the smallest plot a chart draws in automatic composition: at least CHART_MIN_PLOT_PX reference pixels and CHART_MIN_PLOT_SHARE
|
|
5602
7505
|
* of the body's height tall, and at most CHART_MAX_PLOT_ASPECT times as wide as tall.
|
|
@@ -5604,6 +7507,13 @@ declare function textInkBox(item: ComposedItem, measurement: TextMeasurement | u
|
|
|
5604
7507
|
declare const CHART_MIN_PLOT_PX = 120;
|
|
5605
7508
|
declare const CHART_MIN_PLOT_SHARE = 0.22;
|
|
5606
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;
|
|
5607
7517
|
/**
|
|
5608
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
|
|
5609
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
|
|
@@ -5616,5 +7526,5 @@ declare function resolveCanvasDimensions(input: unknown): {
|
|
|
5616
7526
|
height: number;
|
|
5617
7527
|
};
|
|
5618
7528
|
|
|
5619
|
-
export { CHART_AXIS_MAX_OVERSHOOT as $, ASCII_QUOTE_MARKS as A, AUTO_LAYOUT as B, ENGINE_DEFAULT_CHART_TYPES as E, CALM_PICTURE_SPREAD as N, CAPTIONABLE_FIELDS as O, CAPTION_FONT_RATIO as P, CAPTION_MAX_RATIO as Q, SOCIAL_PLATFORMS as S, CARD_BORDER_MIX as U, CARD_FILL_SPACE as V, CARD_INSET as W, CARD_RADIUS as X, CARD_SURFACE_MIN_CONTRAST as Y, CARD_SURFACE_MIX as Z, CELL_CARD_INSET as _, CHART_BAND_MIX as a0, CHART_CONTEXT_FOCUS_DIFFERENCE as a1, CHART_CONTEXT_LABELED_MIN_CONTRAST as a2, CHART_CONTEXT_MIN_CONTRAST as a3, CHART_DARK_SERIES_MIN_CONTRAST as a4, CHART_EMPHASIS_MIN_CONTRAST as a5, CHART_EMPHASIS_MIN_LIGHTNESS_STEP as a6, CHART_HEADER_LEGEND_ROWS as a7, CHART_HEADER_MAX_LEGEND as a8, CHART_HIGHLIGHT_MUTED_MIN_CONTRAST as a9, CODE_NOMINAL_SIZE as aA, CODE_PANEL_BACKGROUND as aB, CODE_PANEL_DARK_SHADE as aC, CODE_PANEL_FOREGROUND as aD, CODE_SYNTAX_MIN_CONTRAST as aE, CHART_HIGHLIGHT_MUTED_MIX as aa, CHART_LABELED_ZERO_SHARE as ab, CHART_LEAD_LIGHTNESS_STEP as ac, CHART_MAX_INTERVALS as ad, CHART_MAX_PLOT_ASPECT as ae, CHART_MIN_PLOT_PX as af, CHART_MIN_PLOT_SHARE as ag, CHART_MIN_TICK_SPACING_PX as ah, CHART_SERIES_MIN_DIFFERENCE as ai, CHART_SERIES_MIN_LIGHTNESS_STEP as aj, CHART_SERIES_SOFT_MIX as ak, CHART_SERIES_TIER_SIZE as al, CHART_SERIES_TINT_MIX as am, CHART_SLICE_LABEL_MIN_RADIUS as an, CHART_TEXT_FLOOR_PX as ao, CHART_TEXT_PX as ap, CHART_VALUE_LIST_MAX_ROWS as aq, CHART_VALUE_LIST_SMALL_SLICE as ar, CHECK_TILE_MAX as as, CHECK_TILE_MAX_CHARACTERS as at, CHECK_TILE_MAX_LINES as au, CHECK_TILE_MIN as av, CITATION_MARKER_RAISE as aw, CITATION_MARKER_SCALE as ax, CODE_HIGHLIGHT_LANGUAGES as ay, CODE_HIGHLIGHT_MAX_LENGTH as az, CHART_TYPES as c, EMPHASIS_PILL_MAX_CHARACTERS as cA, EMPHASIS_PILL_SIZE as cB, EMPHASIS_SURFACE_MIN_CONTRAST as cC, EMPHASIS_TAKEAWAY_MAX_CHARACTERS as cD, EMPHASIS_TEXT_MIN_CONTRAST as cE, EYEBROW_GAP as cF, EYEBROW_LABEL_CHARS as cG, EYEBROW_LABEL_WORDS as cH, EYEBROW_MAX_SIZE as cI, EYEBROW_MIN_SIZE as cJ, EYEBROW_SHARE as cK, EYEBROW_TAG_SIZE as cL, EYEBROW_TEXT_KIND as cM, EYEBROW_TRACKING as cN, FEATURED_LABEL_MAX_CHARACTERS as cP, FEATURED_LABEL_MAX_WORDS as cQ, FEATURED_MARK_MAX_CHARACTERS as cR, FEATURED_MAX_CELLS as cS, FONT_SIZE_GRID_PER_PX as cT, FOOTNOTE_MAX_RATIO as cU, FURNITURE_GAP as cV, FURNITURE_IMAGE_SHARE as cW, FURNITURE_ZONE_GUTTER as cX, DARK_BACKGROUND_LUMINANCE as ca, DEFAULT_CHART_LABEL_SEPARATOR as cb, DEFAULT_FURNITURE_DATE_FORMAT as cc, DESIGN_HINT_KEYS as cd, DIAGRAM_BORDER_MIN_CONTRAST as ce, DIAGRAM_LINE_MIN_CONTRAST as cf, DIAGRAM_MAX_EDGES as cg, DIAGRAM_NOMINAL_SIZE as ch, DIAGRAM_SECONDARY_FLOOR as ci, DIAGRAM_SOURCE_LIMIT as cj, DIAGRAM_SURFACE_ALT_MIX as ck, DIAGRAM_SURFACE_MIX as cl, DIAGRAM_SYNTAXES as cm, EMPHASIS_BAND_MAX_CHARACTERS as cy, EMPHASIS_BAND_MAX_SHARE as cz, LIST_ROWS_GAP as dA, LIST_ROWS_LABEL_SHARE as dB, LIST_ROWS_SPREAD as dC, LIST_RULE_WIDTH as dD, LIST_WHOLE_ENTRIES as dE, LONE_DISPLAY_SIZES as dF, LONE_FILL as dG, LONE_METRIC_TARGET as dH, LONE_TARGET as dI, GROUPED_LABEL_CODE as da, HEADING_AREAS as dd, HEADING_DISPLAY_SIZES as de, JOINED_FIXED_MAX as dl, LAYOUT_BODY_KINDS as dn, LEAD_NOMINAL_SIZE as dp, LIST_ACCENT_RULE_WIDTH as dq, LIST_DISPLAY_GAP as dr, LIST_DISPLAY_RULE as ds, LIST_DISPLAY_SCALE as dt, LIST_HEADING_SCALE as du, LIST_MARKERS as dv, LIST_NOMINAL_SIZE as dw, LIST_NUMERAL_GAP as dx, LIST_NUMERAL_SCALE as dy, LIST_QUESTION_LINES as dz, PORTRAIT_FOCUS_Y as e$, MAX_COMPOSITION_DEPTH as e0, MAX_NUMBERING_LEVELS as e1, MAX_NUMBERING_VALUE as e2, MAX_REGION_BLOCKS as e3, MAX_REGION_DEPTH as e4, MAX_REGION_ENTRIES as e5, MAX_ROMAN_VALUE as e6, MAX_TEMPLATE_TRACKS as e7, METRIC_BAND_MIN_COLUMN as e8, METRIC_BAND_RATIO as e9, NEUTRAL_SHARES as eC, NUMBERING_STYLES as eD, NUMBERING_SUFFIXES as eE, NUMBER_GROUPING_MIN as eF, NUMERAL_TAKEAWAYS as eG, OPFCompositionError as eL, OPFLayoutTemplateError as eM, PAIR_ARROW_HEIGHT as eN, PAIR_ARROW_MARGIN as eO, PAIR_ARROW_WIDTH as eP, PAIR_FIGURE_KINDS as eQ, PAIR_GRID_ANSWER as eR, PAIR_GRID_MIN as eS, PAIR_GRID_QUESTION as eT, PAIR_LENGTH_RATIO as eU, PATTERN_PRESETS as eV, PATTERN_PRESET_ALIASES as eW, PATTERN_TILE_SIZE as eX, PICTURE_BULLET_SCALE as eY, PILLAR_MAX as eZ, PILLAR_WORD_MAX as e_, METRIC_BAND_VALUE_SHARE as ea, METRIC_DISPLAY_HEIGHT as eb, METRIC_DISPLAY_SIZES as ec, METRIC_DISPLAY_WIDTH as ed, METRIC_PILL_PAD_X as ee, METRIC_PILL_PAD_Y as ef, METRIC_PILL_RISE as eg, METRIC_ROLE_VALUE_SIZE as eh, METRIC_TILE_VALUE_SHARE as ei, METRIC_TREND_ARROW_GAP as ej, METRIC_TREND_ARROW_SIZE as ek, METRIC_TREND_MIN_CONTRAST as el, METRIC_TREND_SHAPES as em, METRIC_UNIT_GAP as en, METRIC_UNIT_SHARE as eo, METRIC_VALUE_MIN_CONTRAST as ep, MIN_MEASURE_CHARS as eq, MOVED_ROW_MAX as er, ENGINE_DEFAULT_COLOR_SCHEME as f, SURFACE_ALT_MIN_CONTRAST as f$, PROSE_NOMINAL_SIZE as f0, QUOTE_MARKS as f3, QUOTE_NOMINAL_SIZE as f4, QUOTE_PULL_LINES as f5, QUOTE_PULL_MAX_CHARACTERS as f6, QUOTE_PULL_PREFIX as f7, QUOTE_PULL_ROLE_SEPARATOR as f8, QUOTE_PULL_RULE as f9, SCRIM_FADE as fR, SCRIM_MARGIN as fS, SCRIM_TARGET_CONTRAST as fT, SMALL_CHART_MAX_POINTS as fU, SMALL_CHART_MAX_SERIES as fV, STEP_BADGE as fW, STEP_BADGE_GAP as fX, STEP_FLOW_CHARACTERS as fY, STEP_FLOW_MAX as fZ, STEP_FLOW_MIN as f_, QUOTE_SOURCE_SEPARATOR as fa, REGION_ANCHORS as fk, REGION_FLOWS as fl, REGION_KINDS as fm, REGION_ROLES as fn, RESERVED_REGION_NAMES as fo, ENGINE_DEFAULT_FONT_SCHEME as g, bindRegions as g$, SURFACE_ALT_MIX as g0, alignBarRows as gU, allocateRows as gV, annotationText as gW, applyHslTransforms as gX, applyLuminance as gY, autoImageFit as gZ, bindNoBreak as g_, TABLE_HIGHLIGHT_MIX as gf, TABLE_NOMINAL_SIZE as gg, TABLE_NUMERIC_SHARE as gh, TERM_WORDS as gi, THEME_DESIGN_KEYS as gj, TIER_MAX as gk, TIER_VALUE_SIZES as gl, TIMELINE_OUTLINE_MIN_CONTRAST as gm, TIMELINE_STATUSES as gn, TIMELINE_STATUS_WORDS as go, TIMELINE_TEXT_MIN_CONTRAST as gp, TITLE_RULE_SIZE as gq, ENGINE_DEFAULT_THEME as h, eyebrowCaps as h$, blockKind as h0, captionSettings as h1, chartBandColor as h2, chartCategoriesInTime as h3, chartColorForFill as h4, chartContextColor as h5, chartContextColors as h6, chartEmphasisColors as h7, chartEndLabels as h8, chartHeader as h9, chartWaterfall as hA, chartWaterfallColors as hB, checkDiagram as hC, checkMarkPoints as hD, citationMarkerText as hE, clrMapAttributes as hF, codeHighlightBands as hG, codeHighlightColors as hH, codeHighlightLines as hI, codeLineNumbers as hJ, codeLineRuns as hK, codeSyntaxPalette as hL, codeSyntaxPaletteForRoles as hM, codeSyntaxPaletteForScheme as hN, collectCitations as hO, colorContrast as hP, colorMapFor as hQ, composeLayoutAreas as hR, composeSlide as hS, coverKept as hT, deckBackgroundIsFixed as hU, defaultImageFocus as hV, defaultSlideBackground as hW, diagramPalette as hX, diagramPayload as hY, emphasisSurface as hZ, endLabelText as h_, chartHeaderCaption as ha, chartHighlightColors as hb, chartHighlightMarks as hc, chartIntervalsFor as hd, chartLabelText as he, chartLayer as hf, chartLayerDataLabels as hg, chartOptionSupport as hh, chartOptionTarget as hi, chartPaletteForFill as hj, chartPlotBox as hk, chartPlotInset as hl, chartRingLabels as hm, chartSchemeSeries as hn, chartSeriesLabelColor as ho, chartSeriesPalette as hp, chartSliceLabels as hq, chartSlideFocus as hr, chartSoftColors as hs, chartStack as ht, chartTextSize as hu, chartTitleFocus as hv, chartTitleReferences as hw, chartValueAxis as hx, chartValueAxisHidden as hy, chartValueList as hz, LANGUAGES as i, metricTrendColor as i$, eyebrowLabel as i0, eyebrowSize as i1, featuredCells as i2, fitImage as i3, fitList as i4, fitRichText as i5, fitText as i6, focusHits as i7, formatChartLabelNumber as i8, formatChartLabelPercent as i9, layoutContent as iA, layoutDiagram as iB, layoutEntries as iC, layoutFootnotes as iD, layoutFurniture as iE, layoutMetric as iF, layoutQuote as iG, layoutRegion as iH, layoutStructure as iI, layoutTable as iJ, layoutTemplate as iK, layoutTemplateIssues as iL, layoutTimeline as iM, layoutVariantApplies as iN, layoutWatermark as iO, lineMayStartAt as iP, listColumnBreaks as iQ, listGridShape as iR, listNumberLabel as iS, listNumbers as iT, luminanceGrid as iU, majorityKind as iV, maxIntervalsFor as iW, measureMonospaceText as iX, measureText as iY, measureTextOutline as iZ, metricPillFill as i_, formatFurnitureDate as ia, formatListNumber as ib, grayOfLuminance as ic, gridFlowShape as id, groupBinding as ie, groupNumber as ig, groupingNode as ih, groupsAxisTicks as ii, groupsThousands as ij, imageBackground as ik, imageShape as il, intrinsicImageAspect as im, intrinsicImageSize as io, isColorVariant as ip, isDarkColor as iq, isFixedBackground as ir, isLabelText as is, isLayoutTemplate as it, isTimeFieldTitle as iu, isWrappedInQuoteMarks as iv, isolateNumbers as iw, layoutCaption as ix, layoutCode as iy, layoutColorVariant as iz, LOGO_SHAPES as j, snapFontSizeDown as j$, metricTrendMark as j0, metricTrendPoints as j1, metricValueColor as j2, monthOf as j3, niceScale as j4, normalizeColorVariant as j5, normalizeHexColor as j6, numberRanges as j7, numberingAtLevel as j8, numberingStyleDraws as j9, resolveChartColors as jA, resolveChartOptions as jB, resolveCodeLanguage as jC, resolveColorRef as jD, resolveColorRoles as jE, resolveDesignHints as jF, resolveFontFamilies as jG, resolveLogo as jH, resolveNumbering as jI, resolvePatternPreset as jJ, resolveScriptFonts as jK, resolveSlideDirection as jL, resolveSocialProfile as jM, resolveTextStyle as jN, restackForRows as jO, rootNodes as jP, sampledGrays as jQ, scrimGeometry as jR, scrimOpacity as jS, scriptFontRole as jT, shareHeights as jU, shareSiblingChartAxes as jV, shareSiblingPlots as jW, sliceNumberedItems as jX, slideCitations as jY, slideFocusSources as jZ, smallChart as j_, numericText as ja, paintDiagram as jb, paintDiagramGroup as jc, pairEntry as jd, paragraphDirection as je, paragraphDirectionAt as jf, patternBitmap as jg, patternRuns as jh, physicalAlignment as ji, pictureScrims as jj, placeEndLabels as jk, placeReferences as jl, placeStackNames as jm, placeTextLines as jn, placedImageBlocks as jo, questionText as jp, quoteLanguage as jq, quoteMarksFor as jr, readableSchemeColor as js, referencesSlide as jt, refreshChartMarks as ju, refreshEndLabels as jv, regionAccepts as jw, regionRoleRank as jx, repeatedPairs as jy, resolveCanvasDimensions as jz, snapFontSizeUp as k0, softenChartPalette as k1, stackCategoryValues as k2, styledText as k3, surfaceAltColor as k4, tableGrid as k5, tableHighlightColor as k6, tableHighlightRows as k7, tableRowBoundaries as k8, tableSlideFocus as k9, textColorForFill as ka, textInkBox as kb, textLength as kc, textWidthMeasurer as kd, timelineMarkerShapes as ke, timelineTextColor as kf, tokenizeCode as kg, trackingWidth as kh, unbindNoBreak as ki, unwrapQuoteMarks as kj, visualReadingOrder as kk, walkCitationRuns as kl, waterfallLabelText as km, waterfallRoles as kn, waterfallSignedFormat as ko, waterfallSteps as kp, wrapText as kq, chartDrawDiagnostics as s, chartDrawPlan as t, diagramsPending as u, ensureDiagrams as v, isPlaceLabel as w, markLabelColor as x, normalizeLanguageFamily as y, AUTO_FIT_MIN_KEPT as z };
|
|
5620
|
-
export type { ComposeSlideOptions as C,
|
|
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 };
|