@openpresentation/opf 0.32.0 → 0.33.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 +20 -20
- package/dist/{catalog-refs-kAefsZWT.d.ts → catalog-refs-B_0_vZg0.d.ts} +5 -0
- package/dist/{catalog-schemas-LdqOPebq.d.ts → catalog-schemas-CQTM-G8p.d.ts} +10 -4
- package/dist/{chunk-CLRYHWQN.js → chunk-ABWEUXLV.js} +72 -6
- package/dist/{chunk-XFHXQCXL.js → chunk-BI4ERFAA.js} +52 -1
- package/dist/{chunk-56J345KE.js → chunk-DAS75LGR.js} +3 -3
- package/dist/{chunk-F7DN33UL.js → chunk-E7WQHMCL.js} +6 -6
- package/dist/chunk-IJXKVM4W.js +221 -0
- package/dist/{chunk-AQEAZDL2.js → chunk-INIMUBSE.js} +2 -1
- package/dist/{chunk-NEJ32O7X.js → chunk-KVHNDHVS.js} +1 -1
- package/dist/{chunk-NVAJASOD.js → chunk-OPVJLL7H.js} +6867 -1862
- package/dist/{chunk-GM7WFPGG.js → chunk-PRXZD2II.js} +6 -1
- package/dist/{chunk-BBVW5ZC2.js → chunk-QD6DPS7X.js} +2 -2
- package/dist/{chunk-LEF4X4KI.js → chunk-QF5RSRXU.js} +1797 -170
- package/dist/{chunk-HKUV7NEN.js → chunk-R6C6BQOG.js} +1 -1
- package/dist/{chunk-IT7FQKED.js → chunk-S5QRGMUQ.js} +6 -6
- package/dist/{chunk-OXLA4HXQ.js → chunk-UK3J6FSU.js} +346 -53
- package/dist/{chunk-XQO2CT6Q.js → chunk-VKEYV3ZK.js} +1 -1
- package/dist/{chunk-7U3TJBXE.js → chunk-VMBLNCX2.js} +31 -13
- package/dist/{chunk-YFJIIIOL.js → chunk-VSBZC2PR.js} +2 -2
- package/dist/{chunk-UJSAR6GF.js → chunk-W4DYDRV2.js} +21 -0
- package/dist/{chunk-J63CIRIV.js → chunk-XANW7MB7.js} +4 -4
- package/dist/{chunk-PB7ME64J.js → chunk-XIOC6N5P.js} +1 -1
- package/dist/{chunk-2E6CDYL2.js → chunk-Y557TYML.js} +5 -5
- package/dist/{chunk-SW676APJ.js → chunk-YS333HLA.js} +2 -2
- package/dist/chunk-YYT6N7AI.js +642 -0
- package/dist/chunk-ZXOIGUHX.js +1 -0
- package/dist/{composition-DRqNGHJV.d.ts → composition-zMiIgzip.d.ts} +2353 -272
- package/dist/composition.d.ts +3 -2
- package/dist/composition.js +2 -2
- package/dist/conversion-POHRAMSN.js +24 -0
- package/dist/{conversion-Cadul8Mu.d.ts → conversion-mNth9XKm.d.ts} +20 -9
- package/dist/convert.d.ts +3 -2
- package/dist/convert.js +9 -9
- package/dist/data.d.ts +1 -1
- package/dist/data.js +3 -3
- package/dist/{deck-report-BA3IPJAV.d.ts → deck-report-BSlRiR0_.d.ts} +3 -3
- package/dist/deck.d.ts +6 -5
- package/dist/deck.js +12 -12
- package/dist/diagram-engine-eager.js +1 -1
- package/dist/diagram-engine-lazy.js +1 -1
- package/dist/diff.js +5 -5
- package/dist/docs.js +48 -24
- package/dist/examples.js +7507 -142
- package/dist/font-policy.js +1 -1
- package/dist/format.js +3 -3
- package/dist/ids.js +5 -5
- package/dist/index.d.ts +13 -12
- package/dist/index.js +24 -24
- package/dist/markdown.d.ts +2 -1
- package/dist/markdown.js +9 -9
- package/dist/node-engine.d.ts +7 -6
- package/dist/node-engine.js +24 -24
- package/dist/{pagination-DwEkdJ6s.d.ts → pagination-CYzNMazO.d.ts} +20 -3
- package/dist/pagination.d.ts +4 -3
- package/dist/pagination.js +5 -5
- package/dist/patch.js +4 -4
- package/dist/precompiled.js +3 -3
- package/dist/{presentation-DnD7mfmf.d.ts → presentation-CXhfpB_z.d.ts} +876 -39
- 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 +2 -2
- package/dist/schema.js +4 -4
- package/dist/schemas.d.ts +40 -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-BK7JNEUV.js +3 -0
- package/dist/shape-geometry.d.ts +126 -0
- package/dist/shape-geometry.js +2 -0
- package/dist/source.js +11 -11
- package/dist/spec/README.md +1 -1
- 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 +14 -1
- package/dist/spec/schemas/opf.schema.json +1144 -196
- 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 +10 -6
- package/dist/{validation-types-vVah_PEv.d.ts → validation-types-COwTel3H.d.ts} +2 -2
- package/dist/validator.d.ts +5 -4
- package/dist/validator.js +4 -4
- package/dist/yaml.d.ts +2 -1
- package/dist/yaml.js +8 -8
- package/package.json +24 -8
- package/dist/chunk-DGS47ONG.js +0 -1
- package/dist/conversion-J3YPDS7C.js +0 -24
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { R as ResolvedChartData, D as DataCellValue, e as DataDiagnostic } from './chart-data-oIZQlFGi.js';
|
|
2
|
-
import { b as CatalogOptions } from './catalog-refs-
|
|
2
|
+
import { b as CatalogOptions } from './catalog-refs-B_0_vZg0.js';
|
|
3
|
+
import { ShapePathFill, CustomPathInput } from './shape-geometry.js';
|
|
3
4
|
|
|
4
5
|
/** Canonical table grid. No renderer, fonts, DOM or network dependencies. */
|
|
5
6
|
interface TableBorder {
|
|
@@ -269,7 +270,7 @@ interface ChartLayerRows {
|
|
|
269
270
|
left: number;
|
|
270
271
|
right: number;
|
|
271
272
|
}
|
|
272
|
-
type Box$
|
|
273
|
+
type Box$8 = {
|
|
273
274
|
x: number;
|
|
274
275
|
y: number;
|
|
275
276
|
width: number;
|
|
@@ -284,7 +285,7 @@ type Box$4 = {
|
|
|
284
285
|
*/
|
|
285
286
|
declare function alignBarRows(data: Extract<ResolvedChartData, {
|
|
286
287
|
ok: true;
|
|
287
|
-
}>, box: Box$
|
|
288
|
+
}>, box: Box$8, rows: readonly Box$8[], centers: readonly number[], options: {
|
|
288
289
|
scale: number;
|
|
289
290
|
minFontSize?: number;
|
|
290
291
|
header?: number;
|
|
@@ -293,7 +294,7 @@ declare function alignBarRows(data: Extract<ResolvedChartData, {
|
|
|
293
294
|
measure: (text: string, size: number) => number;
|
|
294
295
|
}): ChartLayerRows | undefined;
|
|
295
296
|
|
|
296
|
-
interface Box$
|
|
297
|
+
interface Box$7 {
|
|
297
298
|
x: number;
|
|
298
299
|
y: number;
|
|
299
300
|
width: number;
|
|
@@ -301,7 +302,7 @@ interface Box$3 {
|
|
|
301
302
|
}
|
|
302
303
|
/** The geometry a chart's plot is laid out with. Lengths are slide pixels. */
|
|
303
304
|
interface ChartPlotGeometry {
|
|
304
|
-
box: Box$
|
|
305
|
+
box: Box$7;
|
|
305
306
|
/** `min(slide width, slide height) / 720`. */
|
|
306
307
|
scale: number;
|
|
307
308
|
minFontSize?: number;
|
|
@@ -325,7 +326,7 @@ declare function chartPlotInset(chart: unknown, resolved: ResolvedChartData, com
|
|
|
325
326
|
/** LH-93: a chart of a shared set: its object, its box and what composition gave it. */
|
|
326
327
|
interface SiblingPlotChart {
|
|
327
328
|
value: unknown;
|
|
328
|
-
box: Box$
|
|
329
|
+
box: Box$7;
|
|
329
330
|
chart?: {
|
|
330
331
|
valueAxis?: ChartValueAxis;
|
|
331
332
|
layer?: ChartLayer;
|
|
@@ -333,14 +334,18 @@ interface SiblingPlotChart {
|
|
|
333
334
|
}
|
|
334
335
|
/**
|
|
335
336
|
* 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
|
-
*
|
|
337
|
+
* (chartPlotInset, or horizontalBarPlot for a horizontal bar chart); members whose boxes overlap vertically stand side by side and share
|
|
338
|
+
* 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
|
|
339
|
+
* 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
|
|
340
|
+
* runs across, also shares one plot width: members whose boxes overlap horizontally stand one above another and start their plots at the
|
|
341
|
+
* 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
|
|
342
|
+
* 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
|
|
343
|
+
* usable axis, a chart with options of its own) is left as it was. `geometryFor` gives a member's scale, text floor, measure, direction
|
|
344
|
+
* and language; `document` resolves dataset references.
|
|
340
345
|
*/
|
|
341
346
|
declare function shareSiblingPlots(sets: readonly (readonly SiblingPlotChart[])[], geometryFor: (item: SiblingPlotChart) => Omit<ChartPlotGeometry, 'box'>, document?: unknown): void;
|
|
342
347
|
|
|
343
|
-
interface Box$
|
|
348
|
+
interface Box$6 {
|
|
344
349
|
x: number;
|
|
345
350
|
y: number;
|
|
346
351
|
width: number;
|
|
@@ -365,8 +370,13 @@ interface ChartLayerWaterfall {
|
|
|
365
370
|
* "2024 profit"), and takes the total's role too.
|
|
366
371
|
*/
|
|
367
372
|
declare function waterfallRoles(values: readonly (number | null)[]): (WaterfallRole | null)[];
|
|
368
|
-
/**
|
|
369
|
-
|
|
373
|
+
/**
|
|
374
|
+
* 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
|
|
375
|
+
* `group` (the column has no format and groups its thousands, `columnGroups`) a whole number of four digits or more is grouped by the language.
|
|
376
|
+
*/
|
|
377
|
+
declare function waterfallLabelText(value: number, format: string | undefined, role: WaterfallRole | null, group?: {
|
|
378
|
+
language?: string;
|
|
379
|
+
}): string;
|
|
370
380
|
/**
|
|
371
381
|
* LH-107: the number format a native waterfall label shows a step with: the column's format (its first section; General without one)
|
|
372
382
|
* 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 +402,7 @@ interface ChartValueListRow {
|
|
|
392
402
|
name: string;
|
|
393
403
|
value: string;
|
|
394
404
|
bold?: boolean;
|
|
395
|
-
box: Box$
|
|
405
|
+
box: Box$6;
|
|
396
406
|
}
|
|
397
407
|
/**
|
|
398
408
|
* 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 +413,24 @@ interface ChartValueListHole {
|
|
|
403
413
|
row: number;
|
|
404
414
|
value: {
|
|
405
415
|
text: string;
|
|
406
|
-
box: Box$
|
|
416
|
+
box: Box$6; /** The text size in slide pixels. */
|
|
407
417
|
size: number;
|
|
408
418
|
};
|
|
409
419
|
name?: {
|
|
410
420
|
text: string;
|
|
411
|
-
box: Box$
|
|
421
|
+
box: Box$6;
|
|
412
422
|
};
|
|
413
423
|
}
|
|
414
424
|
/** LH-108: the value list beside a pie or one-series doughnut. Boxes are slide pixels. */
|
|
415
425
|
interface ChartLayerValueList {
|
|
416
426
|
/** The square the pie (or doughnut) fills. */
|
|
417
|
-
pie: Box$
|
|
427
|
+
pie: Box$6;
|
|
418
428
|
/** LH-125: the focused slice's value in a doughnut's hole. */
|
|
419
429
|
hole?: ChartValueListHole;
|
|
420
430
|
/** 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
431
|
header?: {
|
|
422
432
|
text: string;
|
|
423
|
-
box: Box$
|
|
433
|
+
box: Box$6;
|
|
424
434
|
};
|
|
425
435
|
rows: ChartValueListRow[];
|
|
426
436
|
/** The swatch side and the space after it. */
|
|
@@ -440,12 +450,32 @@ declare function chartValueList(chart: unknown, data: ResolvedChartData, geometr
|
|
|
440
450
|
focus?: ChartLayerFocus;
|
|
441
451
|
slices?: ChartLayerSlices;
|
|
442
452
|
}): ChartLayerValueList | undefined;
|
|
453
|
+
/** LH-182: a doughnut's square and its hole, in slide pixels. */
|
|
454
|
+
interface ChartLayerDoughnut {
|
|
455
|
+
/** The square the doughnut fills (its outer diameter): the preview draws it there and the PPTX export pins the plot area to it. */
|
|
456
|
+
pie: Box$6;
|
|
457
|
+
/** The hole, half the doughnut's radius (`c:holeSize` 50), which both engines fill with the surface the chart stands on. */
|
|
458
|
+
hole: {
|
|
459
|
+
cx: number;
|
|
460
|
+
cy: number;
|
|
461
|
+
r: number;
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* LH-182: where a doughnut (the drawn type: a doughnut, or nested rings of a pie or doughnut of several series) is drawn, so its hole can
|
|
466
|
+
* be filled with the surface the chart stands on (`surface`): a deck watermark or a background motif behind the chart otherwise shows
|
|
467
|
+
* through the hole, and only in the hole. With a value list (LH-108) the doughnut fills the list's square. Without one, and without chart
|
|
468
|
+
* options (`legend`, `axisTitles`, `dataLabels`, which carve the box themselves), the square is the preview's: the box less its padding
|
|
469
|
+
* and the category legend at the end (none when the slices carry their names, LH-105), 90% of half the shorter side. A chart with options
|
|
470
|
+
* has no square (its hole stays open in both engines).
|
|
471
|
+
*/
|
|
472
|
+
declare function chartDoughnut(chart: unknown, data: ResolvedChartData, geometry: ChartLayerGeometry, layer: ChartLayer | undefined): ChartLayerDoughnut | undefined;
|
|
443
473
|
/** 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
474
|
interface ChartStackName {
|
|
445
475
|
series: number;
|
|
446
476
|
name: string;
|
|
447
477
|
bold?: boolean;
|
|
448
|
-
box: Box$
|
|
478
|
+
box: Box$6;
|
|
449
479
|
}
|
|
450
480
|
/** 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
481
|
interface ChartStackEnd {
|
|
@@ -453,7 +483,7 @@ interface ChartStackEnd {
|
|
|
453
483
|
row: number;
|
|
454
484
|
text: string;
|
|
455
485
|
align: 'left' | 'right';
|
|
456
|
-
box: Box$
|
|
486
|
+
box: Box$6;
|
|
457
487
|
}
|
|
458
488
|
/** LH-109: how a stacked column, bar or area chart labels itself. */
|
|
459
489
|
interface ChartLayerStack {
|
|
@@ -491,7 +521,7 @@ interface ChartLayerStack {
|
|
|
491
521
|
* 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
522
|
* moved more than a line from its segment fails, and the chart keeps its legend.
|
|
493
523
|
*/
|
|
494
|
-
declare function placeStackNames(chart: unknown, data: ResolvedChartData, axis: ChartValueAxis, box: Box$
|
|
524
|
+
declare function placeStackNames(chart: unknown, data: ResolvedChartData, axis: ChartValueAxis, box: Box$6, plotInset: {
|
|
495
525
|
left: number;
|
|
496
526
|
top: number;
|
|
497
527
|
right: number;
|
|
@@ -499,6 +529,14 @@ declare function placeStackNames(chart: unknown, data: ResolvedChartData, axis:
|
|
|
499
529
|
}, geometry: Omit<ChartPlotGeometry, 'box'> & {
|
|
500
530
|
bold?: (text: string, size: number) => number;
|
|
501
531
|
}, relaxed?: boolean, focus?: readonly number[], edge?: boolean): ChartStackName[] | undefined;
|
|
532
|
+
/**
|
|
533
|
+
* LH-93: the inner plot of a horizontal bar chart (clustered, stacked or 100% stacked) without chart options, as an inset from its chart
|
|
534
|
+
* box, laid out as the preview lays it out (horizontalStackPlot): a side legend only for two series or more without a header legend, and
|
|
535
|
+
* a small chart's value labels (LH-03, no value axis) keep the widest label's room beyond the longest bar. Undefined for a chart with
|
|
536
|
+
* options, a stacked chart with its marks (LH-109, LH-125: values inside the segments and names above the plot are fitted to its own plot)
|
|
537
|
+
* or a chart drawn on a table's rows (LH-115): those keep their own plot.
|
|
538
|
+
*/
|
|
539
|
+
declare function horizontalBarPlot(chart: unknown, data: ResolvedChartData, layer: ChartLayer | undefined, axis: ChartValueAxis, box: Box$6, geometry: Omit<ChartPlotGeometry, 'box'>): ChartPlotInset | undefined;
|
|
502
540
|
/**
|
|
503
541
|
* LH-109, LH-125: the stacked-chart layer and value axis, or undefined for another chart.
|
|
504
542
|
*
|
|
@@ -518,7 +556,7 @@ declare function chartStack(chart: unknown, data: ResolvedChartData, layer: Char
|
|
|
518
556
|
* 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
557
|
* gutter and value labels the preview leaves). Any other layer is returned with its `rows`.
|
|
520
558
|
*/
|
|
521
|
-
declare function restackForRows(chart: unknown, data: ResolvedChartData, layer: ChartLayer, rows: ChartLayerRows, box: Box$
|
|
559
|
+
declare function restackForRows(chart: unknown, data: ResolvedChartData, layer: ChartLayer, rows: ChartLayerRows, box: Box$6, axis: ChartValueAxis | undefined, geometry: Omit<ChartPlotGeometry, 'box'>): ChartLayer;
|
|
522
560
|
/** LH-110: a dashed reference line at a value the title names, with its label (the number as the title writes it). Slide pixels. */
|
|
523
561
|
interface ChartReferenceLine {
|
|
524
562
|
value: number;
|
|
@@ -526,12 +564,12 @@ interface ChartReferenceLine {
|
|
|
526
564
|
y: number;
|
|
527
565
|
x1: number;
|
|
528
566
|
x2: number;
|
|
529
|
-
label: Box$
|
|
567
|
+
label: Box$6;
|
|
530
568
|
}
|
|
531
569
|
/** LH-110: the shaded band of the period (category) the title names. Slide pixels. */
|
|
532
570
|
interface ChartReferenceBand {
|
|
533
571
|
row: number;
|
|
534
|
-
box: Box$
|
|
572
|
+
box: Box$6;
|
|
535
573
|
}
|
|
536
574
|
/** LH-110: the reference marks of a chart. */
|
|
537
575
|
interface ChartLayerReferences {
|
|
@@ -567,7 +605,7 @@ declare function placeReferences(refs: {
|
|
|
567
605
|
text: string;
|
|
568
606
|
}[];
|
|
569
607
|
rows: readonly number[];
|
|
570
|
-
}, data: ResolvedChartData, axis: ChartValueAxis, box: Box$
|
|
608
|
+
}, data: ResolvedChartData, axis: ChartValueAxis, box: Box$6, plotInset: {
|
|
571
609
|
left: number;
|
|
572
610
|
top: number;
|
|
573
611
|
right: number;
|
|
@@ -578,7 +616,7 @@ declare function placeReferences(refs: {
|
|
|
578
616
|
/** A composed chart item, as composition hands it to {@link refreshChartMarks}. */
|
|
579
617
|
interface ComposedChartItem$1 {
|
|
580
618
|
value: unknown;
|
|
581
|
-
box: Box$
|
|
619
|
+
box: Box$6;
|
|
582
620
|
chart?: {
|
|
583
621
|
valueAxis?: ChartValueAxis;
|
|
584
622
|
layer?: ChartLayer;
|
|
@@ -592,6 +630,73 @@ declare function refreshChartMarks(items: readonly ComposedChartItem$1[], geomet
|
|
|
592
630
|
bold?: (text: string, size: number) => number;
|
|
593
631
|
}, document?: unknown): void;
|
|
594
632
|
|
|
633
|
+
/** Each bin of a binned histogram gets this many chart text sizes of plot width, so its rotated label reads beside its neighbors. */
|
|
634
|
+
declare const HISTOGRAM_LABEL_SLOT = 1.8;
|
|
635
|
+
/** A histogram never draws fewer bins than this because of its label slots (a very small chart keeps a readable shape). */
|
|
636
|
+
declare const HISTOGRAM_MIN_BINS = 5;
|
|
637
|
+
/** One bin of a histogram of a lone value column. */
|
|
638
|
+
interface HistogramBin {
|
|
639
|
+
low: number;
|
|
640
|
+
high: number;
|
|
641
|
+
count: number;
|
|
642
|
+
label: string;
|
|
643
|
+
}
|
|
644
|
+
/** LH-160: what composition decides for a histogram or Pareto chart. Absent keys keep the engines' defaults. */
|
|
645
|
+
interface ChartLayerHistogram {
|
|
646
|
+
/** The bin count of a lone value column (`cx:binCount`): Scott's count, or fewer when the labels would not fit. */
|
|
647
|
+
bins?: number;
|
|
648
|
+
/** The decimals of the bin edges in the labels and the category axis format (`0`, `0.0`, ...). */
|
|
649
|
+
decimals?: number;
|
|
650
|
+
/** False when the chart's data labels do not fit beside each other: neither engine draws them. */
|
|
651
|
+
valueLabels?: false;
|
|
652
|
+
/** RR-105: the value axis both engines draw (the preview's scale; the chartex `cx:valScaling` min, max and majorUnit). */
|
|
653
|
+
valueAxis?: ChartValueAxis;
|
|
654
|
+
/** RR-105: a Pareto chart's percentage axis step (0 to 100%), the preview's ticks and the chartex secondary axis `majorUnit`. */
|
|
655
|
+
percentUnit?: number;
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Office's automatic histogram bins: Scott's normal reference rule gives the bin width 3.49 * sd * n^(-1/3) (sample standard deviation)
|
|
659
|
+
* over [min, max]; the exporter writes the same count as cx:binCount.
|
|
660
|
+
*/
|
|
661
|
+
declare function scottBinCount(values: readonly number[]): number;
|
|
662
|
+
/**
|
|
663
|
+
* 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
|
|
664
|
+
* 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
|
|
665
|
+
* 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.
|
|
666
|
+
*/
|
|
667
|
+
declare function histogramEdgeDecimals(width: number, edges?: readonly number[]): number;
|
|
668
|
+
/**
|
|
669
|
+
* RR-105: an edge written with `decimals` decimals as PowerPoint writes it under the format `0.0...`: the number's decimal value (15
|
|
670
|
+
* significant digits, so 1.2 + 1.85 is 3.05 and not 3.0499999999999998) rounded half away from zero. `toFixed` rounds the binary value
|
|
671
|
+
* and wrote 3.0 where PowerPoint shows 3.1 (v0.33 PowerPoint qualification).
|
|
672
|
+
*/
|
|
673
|
+
declare function histogramEdgeText(value: number, decimals: number): string;
|
|
674
|
+
/** The Excel number format of edges written with `decimals` decimals (the category axis format PowerPoint applies to its bin labels). */
|
|
675
|
+
declare const histogramEdgeFormat: (decimals: number) => string;
|
|
676
|
+
/**
|
|
677
|
+
* 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
|
|
678
|
+
* whose upper edge it does not exceed. `count` is Scott's count unless given. Labels carry `decimals` decimals when given, else six
|
|
679
|
+
* significant digits, and more when two bins would read alike.
|
|
680
|
+
*/
|
|
681
|
+
declare function histogramBins(values: readonly (number | null)[], options?: {
|
|
682
|
+
count?: number;
|
|
683
|
+
decimals?: number;
|
|
684
|
+
}): HistogramBin[];
|
|
685
|
+
/**
|
|
686
|
+
* 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
|
|
687
|
+
* drawn chart (core `chartDrawPlan`'s type). The plot is estimated from the chart box the way the preview lays it out: the padding, the
|
|
688
|
+
* widest value tick, the half text size at the end, and a Pareto chart's percentage axis.
|
|
689
|
+
*/
|
|
690
|
+
declare function chartHistogram(chart: unknown, data: ResolvedChartData, geometry: ChartLayerGeometry): ChartLayerHistogram | undefined;
|
|
691
|
+
|
|
692
|
+
interface ChartNumericAxes {
|
|
693
|
+
value: ChartValueAxis;
|
|
694
|
+
/** A scatter chart's horizontal numeric axis (PowerPoint calls it the category axis). */
|
|
695
|
+
category?: ChartValueAxis;
|
|
696
|
+
}
|
|
697
|
+
/** The same chart-text size, padding, legend and axis-title bands the preview reserves. */
|
|
698
|
+
declare function chartNumericAxes(chart: unknown, data: ResolvedChartData, geometry: ChartLayerGeometry, layer?: ChartLayer): ChartNumericAxes | undefined;
|
|
699
|
+
|
|
595
700
|
/** A small chart has at most this many series (LH-03). */
|
|
596
701
|
declare const SMALL_CHART_MAX_SERIES = 2;
|
|
597
702
|
/**
|
|
@@ -603,7 +708,7 @@ declare const SMALL_CHART_MAX_POINTS = 16;
|
|
|
603
708
|
declare const CHART_HEADER_MAX_LEGEND = 4;
|
|
604
709
|
/** LH-143: a legend wider than the header row wraps onto at most this many rows before the chart keeps its side legend. */
|
|
605
710
|
declare const CHART_HEADER_LEGEND_ROWS = 2;
|
|
606
|
-
interface Box$
|
|
711
|
+
interface Box$5 {
|
|
607
712
|
x: number;
|
|
608
713
|
y: number;
|
|
609
714
|
width: number;
|
|
@@ -625,18 +730,18 @@ interface ChartHeaderLegendEntry {
|
|
|
625
730
|
name: string;
|
|
626
731
|
/** `line`: a line key (with a marker on a line chart with markers and on a combo line series); otherwise a square swatch. */
|
|
627
732
|
key?: 'line';
|
|
628
|
-
box: Box$
|
|
733
|
+
box: Box$5;
|
|
629
734
|
}
|
|
630
735
|
/** LH-81: the header row above the plot. Boxes are slide pixels. */
|
|
631
736
|
interface ChartLayerHeader {
|
|
632
737
|
/** The caption and its box (one line, at the start of the first row); absent when the payload has its own caption. */
|
|
633
738
|
caption?: {
|
|
634
739
|
text: string;
|
|
635
|
-
box: Box$
|
|
740
|
+
box: Box$5;
|
|
636
741
|
};
|
|
637
742
|
/** The legend in the header row; absent for one series, for more than four, or when the entries do not fit one row. */
|
|
638
743
|
legend?: {
|
|
639
|
-
box: Box$
|
|
744
|
+
box: Box$5;
|
|
640
745
|
entries: ChartHeaderLegendEntry[];
|
|
641
746
|
};
|
|
642
747
|
/** 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 +769,8 @@ interface ChartPlotInset {
|
|
|
664
769
|
}
|
|
665
770
|
/** What composition decides for a chart beyond its value axis (LH-03, LH-81, LH-92, LH-93). */
|
|
666
771
|
interface ChartLayer {
|
|
772
|
+
/** RR-105: scatter X/Y and box-and-whisker axes, also written into native PPTX. */
|
|
773
|
+
numericAxes?: ChartNumericAxes;
|
|
667
774
|
small?: ChartLayerSmall;
|
|
668
775
|
header?: ChartLayerHeader;
|
|
669
776
|
/** LH-92: a doughnut of two or more rings names each ring on one of its slices. */
|
|
@@ -691,10 +798,14 @@ interface ChartLayer {
|
|
|
691
798
|
waterfall?: ChartLayerWaterfall;
|
|
692
799
|
/** LH-108: a pie or one-series doughnut lists its categories and values beside it (chart-marks.ts). */
|
|
693
800
|
valueList?: ChartLayerValueList;
|
|
801
|
+
/** LH-182: a doughnut's square and its hole, which both engines fill with the surface (chart-marks.ts). */
|
|
802
|
+
doughnut?: ChartLayerDoughnut;
|
|
694
803
|
/** LH-109: a stacked column or area chart's values inside its segments and series names beside its last column (chart-marks.ts). */
|
|
695
804
|
stack?: ChartLayerStack;
|
|
696
805
|
/** LH-110: the reference line and the period band the slide title names (chart-marks.ts). */
|
|
697
806
|
references?: ChartLayerReferences;
|
|
807
|
+
/** LH-160: a histogram's bin count and edge decimals, and whether its data labels fit (chart-histogram.ts). */
|
|
808
|
+
histogram?: ChartLayerHistogram;
|
|
698
809
|
}
|
|
699
810
|
/** LH-105: one series name at the end of its line. Lengths are slide pixels. */
|
|
700
811
|
interface ChartEndLabel {
|
|
@@ -713,7 +824,7 @@ interface ChartEndLabel {
|
|
|
713
824
|
/** True for a series the title names (ChartLayer.focus): its label is bold. */
|
|
714
825
|
bold?: boolean;
|
|
715
826
|
/** 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$
|
|
827
|
+
box: Box$5;
|
|
717
828
|
}
|
|
718
829
|
/** LH-105: the names at the line ends and the gutter the plot leaves for them at its end (slide pixels). */
|
|
719
830
|
interface ChartLayerEndLabels {
|
|
@@ -731,7 +842,7 @@ interface ChartLayerSlices {
|
|
|
731
842
|
}
|
|
732
843
|
/** The geometry and text a chart layer is decided with. Lengths are slide pixels. */
|
|
733
844
|
interface ChartLayerGeometry {
|
|
734
|
-
box: Box$
|
|
845
|
+
box: Box$5;
|
|
735
846
|
/** `min(slide width, slide height) / 720`. */
|
|
736
847
|
scale: number;
|
|
737
848
|
minFontSize?: number;
|
|
@@ -772,6 +883,32 @@ declare function smallChart(chart: unknown, data: ResolvedChartData, geometry?:
|
|
|
772
883
|
declare function chartHeader(chart: unknown, data: ResolvedChartData, geometry: ChartLayerGeometry, options?: {
|
|
773
884
|
legend?: boolean;
|
|
774
885
|
}): ChartLayerHeader | undefined;
|
|
886
|
+
/**
|
|
887
|
+
* LH-176: the gap between two categories' bars, as a percent of one bar's width (DrawingML `c:gapWidth`): 150 for clustered bars and
|
|
888
|
+
* columns, 50 for stacked and 100% stacked ones. Their series overlap 0 (clustered: side by side) or 100 (stacked: on one another)
|
|
889
|
+
* (`c:overlap`). The PPTX export writes these values and the preview draws its bars from {@link chartBarGeometry}, so both agree.
|
|
890
|
+
*/
|
|
891
|
+
declare const CHART_BAR_GAP_WIDTH: Readonly<{
|
|
892
|
+
clustered: 150;
|
|
893
|
+
stacked: 50;
|
|
894
|
+
}>;
|
|
895
|
+
/** 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. */
|
|
896
|
+
interface ChartBarGeometry {
|
|
897
|
+
/** The width of one bar (a column's width, a horizontal bar's height). */
|
|
898
|
+
width: number;
|
|
899
|
+
/** The width of the category's bars together: the series' bars side by side, or one stacked bar. */
|
|
900
|
+
group: number;
|
|
901
|
+
/** From the band's start to its first bar: half the gap. */
|
|
902
|
+
offset: number;
|
|
903
|
+
clustered: boolean;
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* LH-176: where the bars of one category sit in its `band` (the plot length over the category count), as PowerPoint lays out
|
|
907
|
+
* {@link CHART_BAR_GAP_WIDTH}: a clustered band holds `seriesCount` bars side by side and a gap of 1.5 bar widths
|
|
908
|
+
* (`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
|
|
909
|
+
* evenly before and after the bars.
|
|
910
|
+
*/
|
|
911
|
+
declare function chartBarGeometry(band: number, seriesCount: number, grouping: string | undefined): ChartBarGeometry;
|
|
775
912
|
/**
|
|
776
913
|
* 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
914
|
* (a small chart's value labels, a horizontal stacked bar chart's segment values). Both engines read this one answer.
|
|
@@ -862,7 +999,7 @@ declare function resolveDesignHints(options?: ResolveDesignHintsOptions): Resolv
|
|
|
862
999
|
* A record is a template when it has `regions`.
|
|
863
1000
|
*/
|
|
864
1001
|
/** 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"];
|
|
1002
|
+
declare const REGION_KINDS: readonly ["text", "list", "image", "video", "chart", "table", "code", "metric", "quote", "timeline", "diagram", "shape", "group"];
|
|
866
1003
|
type RegionKind = typeof REGION_KINDS[number];
|
|
867
1004
|
/** Which content a region wants first (content binding, step 2). */
|
|
868
1005
|
declare const REGION_ROLES: readonly ["primary", "secondary", "media", "supporting"];
|
|
@@ -907,6 +1044,13 @@ interface LayoutRegion {
|
|
|
907
1044
|
* 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
1045
|
*/
|
|
909
1046
|
sequence?: 'steps' | 'numbered';
|
|
1047
|
+
/**
|
|
1048
|
+
* 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`
|
|
1049
|
+
* (four quadrants; another count draws a grid of cards), in PowerPoint's geometry or OPF's own (composition.ts). SH-18: `cycle` (the
|
|
1050
|
+
* entries as the steps of a loop, nodes on a ring with an arrow to the next). SH-17: `chevrons` (a row of chevrons), `flow` (a row of
|
|
1051
|
+
* boxes with arrows between them) or `vertical-flow` (a column of them). Absent: a list.
|
|
1052
|
+
*/
|
|
1053
|
+
arrangement?: 'pyramid' | 'matrix' | 'cycle' | 'chevrons' | 'flow' | 'vertical-flow';
|
|
910
1054
|
anchor: RegionAnchor;
|
|
911
1055
|
empty: 'collapse' | 'keep';
|
|
912
1056
|
}
|
|
@@ -1312,13 +1456,13 @@ declare function unbindNoBreak(text: string): string;
|
|
|
1312
1456
|
* draw, compiled from spec/reference/engine-defaults.json and spec/reference/engine-vocabularies.json. None of
|
|
1313
1457
|
* this is catalog data: a document never references these records, and no catalog lookup reaches them.
|
|
1314
1458
|
*/
|
|
1315
|
-
type Rec = Readonly<Record<string, unknown>>;
|
|
1459
|
+
type Rec$1 = Readonly<Record<string, unknown>>;
|
|
1316
1460
|
/** 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;
|
|
1461
|
+
declare const ENGINE_DEFAULT_THEME: Rec$1;
|
|
1318
1462
|
/** 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;
|
|
1463
|
+
declare const ENGINE_DEFAULT_COLOR_SCHEME: Rec$1;
|
|
1320
1464
|
/** 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;
|
|
1465
|
+
declare const ENGINE_DEFAULT_FONT_SCHEME: Rec$1;
|
|
1322
1466
|
/** Chart types in the order an engine offers them when it must pick one. */
|
|
1323
1467
|
declare const ENGINE_DEFAULT_CHART_TYPES: readonly string[];
|
|
1324
1468
|
/** Every `chart.type` value: an engine vocabulary, validated directly. */
|
|
@@ -1549,154 +1693,6 @@ interface ResolveLogoOptions {
|
|
|
1549
1693
|
*/
|
|
1550
1694
|
declare function resolveLogo(presentation: unknown, slide: unknown, options?: ResolveLogoOptions): ResolvedLogo | null;
|
|
1551
1695
|
|
|
1552
|
-
/**
|
|
1553
|
-
* LH-02: the automatic scrim under text on a picture background.
|
|
1554
|
-
*
|
|
1555
|
-
* Text drawn over a photograph reads only as well as the photograph allows. When a slide's text sits on a picture background
|
|
1556
|
-
* and the author set no overlay, core adds a scrim in the slide's background color behind the text: a gradient from the
|
|
1557
|
-
* slide edge the text is near (as Claude Design draws it: from the bottom under a lower title, from the side under a text
|
|
1558
|
-
* column) or, for text in the middle of the slide, a band across it that fades out above and below. Its opacity is the lowest
|
|
1559
|
-
* (in hundredths) at which every text color reaches its target contrast over every pixel the picture could have under the
|
|
1560
|
-
* text: the gray ramp from black to white (the bound `opf/text-on-image` uses), or the range of gray the host measured there
|
|
1561
|
-
* (`ComposeSlideOptions.pictureLuminance`). Both engines draw the composed scrim: the preview as an SVG linear gradient, the
|
|
1562
|
-
* PPTX export as one native rectangle with a gradient (or solid) fill whose stops carry alpha.
|
|
1563
|
-
*/
|
|
1564
|
-
/** A rectangle in canvas pixels. */
|
|
1565
|
-
interface ScrimBox {
|
|
1566
|
-
x: number;
|
|
1567
|
-
y: number;
|
|
1568
|
-
width: number;
|
|
1569
|
-
height: number;
|
|
1570
|
-
}
|
|
1571
|
-
/** A physical slide edge. */
|
|
1572
|
-
type ScrimEdge = 'left' | 'right' | 'top' | 'bottom';
|
|
1573
|
-
/** One automatic scrim of a picture background (SlideComposition.backgroundImage.scrims). */
|
|
1574
|
-
interface ComposedScrim {
|
|
1575
|
-
/** The key that controls it: the background's `overlay` (an overlay of the author's replaces the scrim, `false` turns it off). */
|
|
1576
|
-
path: string;
|
|
1577
|
-
/** Scrim color: the slide's background color (`roles.background`, bg1 of the slide's variant), opaque `#RRGGBB`. */
|
|
1578
|
-
color: string;
|
|
1579
|
-
/** Opacity under the text, 0 to 1 in hundredths: the lowest at which the text reads at `target` over every possible pixel. */
|
|
1580
|
-
opacity: number;
|
|
1581
|
-
/** `gradient`: solid from `edge` to past the text, then fading out; `band`: solid across the text, fading out on both sides. */
|
|
1582
|
-
form: 'gradient' | 'band';
|
|
1583
|
-
/** The slide edge a gradient starts from (physical, so already mirrored in a right-to-left deck). Absent for a band. */
|
|
1584
|
-
edge?: ScrimEdge;
|
|
1585
|
-
/** The rectangle drawn: the full slide width (top, bottom and band) or height (left and right), clipped to the slide. */
|
|
1586
|
-
box: ScrimBox;
|
|
1587
|
-
/** The axis the stops run along: `vertical` from the box's top edge, `horizontal` from its left edge. */
|
|
1588
|
-
axis: 'vertical' | 'horizontal';
|
|
1589
|
-
/** Opacity stops along the axis, positions 0 to 1 ascending: `opacity` over the solid part and an eased fade to 0 at each end that is not a slide edge. */
|
|
1590
|
-
stops: {
|
|
1591
|
-
position: number;
|
|
1592
|
-
opacity: number;
|
|
1593
|
-
}[];
|
|
1594
|
-
/** The region the scrim covers at full opacity: its group's text boxes plus a margin, clipped to the slide. */
|
|
1595
|
-
text: ScrimBox;
|
|
1596
|
-
/** The contrast the slide text color reaches over the worst pixel through the scrim. */
|
|
1597
|
-
contrast: number;
|
|
1598
|
-
/** The contrast the opacity was chosen for (4.5:1). */
|
|
1599
|
-
target: number;
|
|
1600
|
-
/** `worst-case`: any pixel from black to white; `sampled`: the gray range the host measured under the text (`grays`). */
|
|
1601
|
-
basis: 'worst-case' | 'sampled';
|
|
1602
|
-
/** The darkest and lightest gray (0 to 255, sRGB) of the picture under the text, when sampled. */
|
|
1603
|
-
grays?: [number, number];
|
|
1604
|
-
}
|
|
1605
|
-
/**
|
|
1606
|
-
* A luminance grid of a picture: `columns` × `rows` cells in row order over the whole picture, each a WCAG relative luminance (0 to 1).
|
|
1607
|
-
* `values` is each cell's darkest pixel (or its only value) and `high`, when present, its lightest, so a cell of fine black and white
|
|
1608
|
-
* detail keeps both (luminanceGrid writes both).
|
|
1609
|
-
*/
|
|
1610
|
-
interface PictureLuminance {
|
|
1611
|
-
columns: number;
|
|
1612
|
-
rows: number;
|
|
1613
|
-
values: ArrayLike<number>;
|
|
1614
|
-
high?: ArrayLike<number>;
|
|
1615
|
-
}
|
|
1616
|
-
/** The contrast a scrim keeps under text over a picture: 4.5:1, WCAG's normal-text minimum, for every size. */
|
|
1617
|
-
declare const SCRIM_TARGET_CONTRAST = 4.5;
|
|
1618
|
-
/** Margin around the text the scrim covers at full opacity, in reference pixels (a 720 px tall slide). */
|
|
1619
|
-
declare const SCRIM_MARGIN = 24;
|
|
1620
|
-
/** How far a scrim fades out past its solid part, as a share of the slide along the scrim's axis. */
|
|
1621
|
-
declare const SCRIM_FADE = 0.2;
|
|
1622
|
-
/** The sRGB gray (0 to 255) whose relative luminance is `value`. */
|
|
1623
|
-
declare function grayOfLuminance(value: number): number;
|
|
1624
|
-
/**
|
|
1625
|
-
* The lowest opacity, in hundredths, of `scrim` over every pixel in `pixels` at which each text color reaches its target; 1 when
|
|
1626
|
-
* a color cannot reach it even on the solid scrim (it then reads as on the plain slide). Each pixel is opaque `#RRGGBB`.
|
|
1627
|
-
*/
|
|
1628
|
-
declare function scrimOpacity(texts: readonly {
|
|
1629
|
-
color: string;
|
|
1630
|
-
target: number;
|
|
1631
|
-
}[], scrim: string, pixels: readonly string[]): {
|
|
1632
|
-
opacity: number;
|
|
1633
|
-
contrast: number;
|
|
1634
|
-
};
|
|
1635
|
-
/**
|
|
1636
|
-
* The form of a scrim over `text` (the union of the text boxes) on a `width` × `height` slide: a gradient from the bottom edge when the
|
|
1637
|
-
* text sits in the lower part of the slide, from the top when it sits in the upper part, from the side when it is a column at the
|
|
1638
|
-
* left or right, and from the bottom again when the text sits a little below the middle; else a band across the text. An edge
|
|
1639
|
-
* gradient is solid from its edge to `margin` past the text and fades out over a fifth of the slide. A band is solid over the text
|
|
1640
|
-
* and `halfLine` (about half a line) above and below it only, and fades out over one and a half times the text's height on each
|
|
1641
|
-
* side (at least a quarter of the slide), so it has no visible edge.
|
|
1642
|
-
*/
|
|
1643
|
-
declare function scrimGeometry(text: ScrimBox, width: number, height: number, margin: number, halfLine?: number): Pick<ComposedScrim, 'form' | 'edge' | 'box' | 'axis' | 'text'> & {
|
|
1644
|
-
solid: [number, number];
|
|
1645
|
-
};
|
|
1646
|
-
/** Min and max gray of a luminance grid over a region given as fractions (0 to 1) of the picture; undefined when the grid is unusable. */
|
|
1647
|
-
declare function sampledGrays(grid: PictureLuminance | undefined, region: {
|
|
1648
|
-
left: number;
|
|
1649
|
-
top: number;
|
|
1650
|
-
right: number;
|
|
1651
|
-
bottom: number;
|
|
1652
|
-
}): [number, number] | undefined;
|
|
1653
|
-
/**
|
|
1654
|
-
* The luminance grid of decoded pixels, for `ComposeSlideOptions.pictureLuminance`: `pixels` are 8-bit sRGB in row order with `channels`
|
|
1655
|
-
* bytes each (3, or 4 with alpha, which is composited over white, the canvas the contrast rules assume). Each of `columns` × `rows` cells
|
|
1656
|
-
* keeps its darkest and lightest pixel. One helper every host calls, so the preview and the export size the same scrim from the same picture.
|
|
1657
|
-
*/
|
|
1658
|
-
declare function luminanceGrid(pixels: ArrayLike<number>, width: number, height: number, options?: {
|
|
1659
|
-
channels?: number;
|
|
1660
|
-
columns?: number;
|
|
1661
|
-
rows?: number;
|
|
1662
|
-
}): PictureLuminance;
|
|
1663
|
-
/** Inputs of one picture background's scrims. */
|
|
1664
|
-
interface ScrimInput {
|
|
1665
|
-
/** The background's path (`slides.N.design.background`, `design.background` or `theme`). */
|
|
1666
|
-
path: string;
|
|
1667
|
-
width: number;
|
|
1668
|
-
height: number;
|
|
1669
|
-
/**
|
|
1670
|
-
* The boxes whose text is drawn straight on the picture (not on a card, panel or emphasis surface), in groups that each get a scrim
|
|
1671
|
-
* of their own: the body and headings, the header, the footer. Groups whose solid parts meet along the same axis share one scrim.
|
|
1672
|
-
*/
|
|
1673
|
-
groups: readonly (readonly ScrimBox[])[];
|
|
1674
|
-
/** The text colors drawn there with the contrast each must reach. */
|
|
1675
|
-
texts: readonly {
|
|
1676
|
-
color: string;
|
|
1677
|
-
target: number;
|
|
1678
|
-
}[];
|
|
1679
|
-
/** The scrim color (the slide's background color). */
|
|
1680
|
-
color: string;
|
|
1681
|
-
/** The canvas colors a translucent picture shows through to (the slide background, and white, which the contrast rules assume). */
|
|
1682
|
-
bases: readonly string[];
|
|
1683
|
-
/** Picture opacity below 1. */
|
|
1684
|
-
opacity?: number;
|
|
1685
|
-
/** The picture's whole rectangle on the slide (its fit placement), when known: sampling maps the text region into it. */
|
|
1686
|
-
picture?: ScrimBox;
|
|
1687
|
-
/** The host's luminance grid of the picture, when it measured one (and the picture is not recolored). */
|
|
1688
|
-
luminance?: PictureLuminance;
|
|
1689
|
-
/** Reference pixels per canvas pixel: min(width, height) / 720. */
|
|
1690
|
-
scale: number;
|
|
1691
|
-
/** The tallest line of the text, in canvas pixels: a band is solid half of it above and below the text. */
|
|
1692
|
-
line?: number;
|
|
1693
|
-
}
|
|
1694
|
-
/**
|
|
1695
|
-
* The automatic scrims of one picture background, in paint order: one per group of text (the body, the header, the footer), merged
|
|
1696
|
-
* where they meet, all at one opacity. Empty when no text sits on the picture or the picture needs none (opacity 0).
|
|
1697
|
-
*/
|
|
1698
|
-
declare function pictureScrims(input: ScrimInput): ComposedScrim[];
|
|
1699
|
-
|
|
1700
1696
|
/** Normalize a literal hex color to uppercase #RRGGBB. */
|
|
1701
1697
|
declare function normalizeHexColor(value: unknown): string | undefined;
|
|
1702
1698
|
type ResolveColorRefRoles = Partial<Record<'primary' | 'secondary' | 'accent' | 'background' | 'surface' | 'surfaceAlt' | 'text' | 'textSecondary', string>>;
|
|
@@ -1710,8 +1706,23 @@ interface ResolveColorRefOptions {
|
|
|
1710
1706
|
/** Theme text color returned when a reference cannot be resolved. */
|
|
1711
1707
|
fallback: string;
|
|
1712
1708
|
}
|
|
1713
|
-
/**
|
|
1714
|
-
|
|
1709
|
+
/**
|
|
1710
|
+
* SH-02: the lighter or darker form of a ColorRef, `{ color, lighten }` or `{ color, darken }` (opf.schema.json ColorTransform), as the
|
|
1711
|
+
* DrawingML luminance transform PowerPoint's theme tints and shades use: `lighten` L is lumMod (1 - L) and lumOff L, `darken` D is
|
|
1712
|
+
* lumMod (1 - D), both in thousandths of a percent. Undefined for anything else (a string ColorRef, or an object that is neither).
|
|
1713
|
+
*/
|
|
1714
|
+
declare function colorTransform(reference: unknown): {
|
|
1715
|
+
color: unknown;
|
|
1716
|
+
lumMod: number;
|
|
1717
|
+
lumOff: number;
|
|
1718
|
+
} | undefined;
|
|
1719
|
+
/** SH-02: `hex` (#RGB, #RRGGBB or #RRGGBBAA) with a ColorRef's lighter or darker transform applied; an alpha byte is kept. */
|
|
1720
|
+
declare function applyColorTransform(hex: string, transform: {
|
|
1721
|
+
lumMod: number;
|
|
1722
|
+
lumOff: number;
|
|
1723
|
+
}): string;
|
|
1724
|
+
/** Resolve a ColorRef (or a TextRun.color string) to a literal hex color; the lighter or darker object form resolves its base and applies its transform. */
|
|
1725
|
+
declare function resolveColorRef(reference: unknown, options: ResolveColorRefOptions): string;
|
|
1715
1726
|
/** WCAG relative luminance below which a slide background counts as dark (the point where white and black text contrast equally). */
|
|
1716
1727
|
declare const DARK_BACKGROUND_LUMINANCE = 0.179;
|
|
1717
1728
|
/** True when text on this color should be light: its relative luminance is under {@link DARK_BACKGROUND_LUMINANCE}. An unreadable color is not dark. */
|
|
@@ -1791,8 +1802,10 @@ declare function deckBackgroundIsFixed(deckDesign: unknown, themeBackground: unk
|
|
|
1791
1802
|
* LH-01: whether a layout's variant decides the slide's background: the layout names one and the slide's own design sets neither a
|
|
1792
1803
|
* variant nor a background, so the layout hides a scheme-based background of the deck and the theme (the slide is the variant's bg1).
|
|
1793
1804
|
* LH-103: never over a fixed background of the deck or the theme ({@link deckBackgroundIsFixed}), which the slide keeps.
|
|
1805
|
+
* LH-164: `surface` is a variant the slide's content asks for (a message-only slide's accent surface, messageSurface): it decides the
|
|
1806
|
+
* background under the same conditions, over a layout that names no variant.
|
|
1794
1807
|
*/
|
|
1795
|
-
declare function layoutVariantApplies(slideDesign: unknown, layout: unknown, deckDesign?: unknown, themeBackground?: unknown): boolean;
|
|
1808
|
+
declare function layoutVariantApplies(slideDesign: unknown, layout: unknown, deckDesign?: unknown, themeBackground?: unknown, surface?: unknown): boolean;
|
|
1796
1809
|
/**
|
|
1797
1810
|
* The map a variant stands for: `light1` is the default map (bg1 = light1, tx1 = dark1, bg2 = light2, tx2 = dark2); `dark1` swaps
|
|
1798
1811
|
* light and dark; `light2` and `dark2` make that slot both the background and the alternate surface (bg2, as a slide with that theme
|
|
@@ -1836,6 +1849,8 @@ declare const NEUTRAL_SHARES: {
|
|
|
1836
1849
|
declare const CARD_SURFACE_MIX = 0.07;
|
|
1837
1850
|
/** LH-54: the contrast a mixed dark card reaches against the background, stepping the mix up from {@link CARD_SURFACE_MIX} (Claude Design's #0B2A5C on #011842 is 1.25:1). */
|
|
1838
1851
|
declare const CARD_SURFACE_MIN_CONTRAST = 1.25;
|
|
1852
|
+
/** Wave 8: the contrast the slide's text keeps on a mixed card (WCAG AA for body text); the mix towards the text stops before it falls under it. */
|
|
1853
|
+
declare const CARD_TEXT_MIN_CONTRAST = 4.5;
|
|
1839
1854
|
/** LH-54: the share of the text colour mixed into a mixed dark card for its 1 px stroke (about 12% white over the card). */
|
|
1840
1855
|
declare const CARD_BORDER_MIX = 0.12;
|
|
1841
1856
|
/** LH-79: a dark variant's code panel is bg1 at this share of its HSL lightness (`lumMod`; Claude Design's #001030 on #011842). */
|
|
@@ -2036,6 +2051,30 @@ interface ChartPaletteOptions {
|
|
|
2036
2051
|
* and preview and export (which both call this function) draw the same ones.
|
|
2037
2052
|
*/
|
|
2038
2053
|
declare function chartPaletteForFill(fill: string, palette: readonly string[], options?: ChartPaletteOptions): string[];
|
|
2054
|
+
/** LH-161: the most a pie's last slice moves along the lightness axis to clear the first: further and it stops belonging to the palette. */
|
|
2055
|
+
declare const CHART_SLICE_MAX_SHIFT = 20;
|
|
2056
|
+
/** LH-161: the width of the surface-colored border that separates a pie's wrap pair when no color within {@link CHART_SLICE_MAX_SHIFT} does, in pixels at the 720-px reference. */
|
|
2057
|
+
declare const CHART_SLICE_SEPARATOR_PX = 2;
|
|
2058
|
+
/** LH-161: the slices of a pie or doughnut: their colors, and whether the chart separates every slice with a surface-colored border. */
|
|
2059
|
+
interface ChartSlicePlan {
|
|
2060
|
+
colors: string[];
|
|
2061
|
+
bordered: boolean;
|
|
2062
|
+
}
|
|
2063
|
+
/**
|
|
2064
|
+
* LH-161: the colors of a pie or doughnut of `count` slices, from `palette` (the colors a chart draws, {@link chartPaletteForFill} with
|
|
2065
|
+
* its softening). A circle has one more neighbor pair than a row of series: the last slice sits beside the first. When the last slice
|
|
2066
|
+
* (palette color `count - 1`, a color from the scheme: `options.legible`) is closer than {@link CHART_SERIES_MIN_LIGHTNESS_STEP} CIE L*
|
|
2067
|
+
* to the first, it alone moves, along the lightness axis (its hue and as much chroma as sRGB allows kept) by at most
|
|
2068
|
+
* {@link CHART_SLICE_MAX_SHIFT} L*, to the nearest lightness that keeps its contrast floor against `fill` and the step from both its
|
|
2069
|
+
* neighbors (a color difference under {@link CHART_SERIES_MIN_DIFFERENCE} from any other slice costs more the further it falls). Where no
|
|
2070
|
+
* such lightness exists the palette color stays and `bordered` is true: the engines draw a {@link CHART_SLICE_SEPARATOR_PX} border in
|
|
2071
|
+
* the surface color on every slice of the chart, which separates the pair by shape (`opf/chart-color-only` accepts it). Every other color
|
|
2072
|
+
* stays, so a pie of any count draws the palette except possibly its last slice. An authored color is never moved or bordered (the rule
|
|
2073
|
+
* reports the pair an author chose), and fewer than three slices, or more than the palette holds (the colors repeat), change nothing.
|
|
2074
|
+
*/
|
|
2075
|
+
declare function chartSlicePlan(fill: string, palette: readonly string[], count: number, options?: {
|
|
2076
|
+
legible?: readonly boolean[];
|
|
2077
|
+
}): ChartSlicePlan;
|
|
2039
2078
|
/** LH-105: the share of the backdrop mixed into an ordinary series colour from the scheme (Few: soft colours for ordinary data, strong for emphasis). */
|
|
2040
2079
|
declare const CHART_SERIES_SOFT_MIX = 0.25;
|
|
2041
2080
|
/** LH-105: a softened series colour and the DrawingML HSL transforms (thousandths of a percent) that make it of its full-strength colour. */
|
|
@@ -2187,58 +2226,1500 @@ declare function chartBandColor(surface: string, text: string): string;
|
|
|
2187
2226
|
* colour, so they draw and write the same two colours. An unresolved colour is replaced by white (surface), the surface's own
|
|
2188
2227
|
* best contrast partner (text) or black (primary).
|
|
2189
2228
|
*/
|
|
2190
|
-
declare function chartHighlightColors(surface: string, primary: string, text: string): {
|
|
2191
|
-
accent: string;
|
|
2192
|
-
muted: string;
|
|
2193
|
-
};
|
|
2194
|
-
/** LH-03: smallest contrast every mark of an emphasised small chart keeps against its backdrop: a bar is a graphical object (WCAG 1.4.11, 3:1). */
|
|
2195
|
-
declare const CHART_EMPHASIS_MIN_CONTRAST = 3;
|
|
2196
|
-
/** LH-03: smallest CIE L* step between the emphasised mark and the other marks, so the emphasis is visible. */
|
|
2197
|
-
declare const CHART_EMPHASIS_MIN_LIGHTNESS_STEP = 15;
|
|
2229
|
+
declare function chartHighlightColors(surface: string, primary: string, text: string): {
|
|
2230
|
+
accent: string;
|
|
2231
|
+
muted: string;
|
|
2232
|
+
};
|
|
2233
|
+
/** LH-03: smallest contrast every mark of an emphasised small chart keeps against its backdrop: a bar is a graphical object (WCAG 1.4.11, 3:1). */
|
|
2234
|
+
declare const CHART_EMPHASIS_MIN_CONTRAST = 3;
|
|
2235
|
+
/** LH-03: smallest CIE L* step between the emphasised mark and the other marks, so the emphasis is visible. */
|
|
2236
|
+
declare const CHART_EMPHASIS_MIN_LIGHTNESS_STEP = 15;
|
|
2237
|
+
/**
|
|
2238
|
+
* LH-03, LH-95: the two colours of a small chart's emphasis, in the shape of a highlight: `accent` for the emphasised point, `muted` for
|
|
2239
|
+
* every other point. The other points keep the series colour (`color`, already adjusted for the backdrop by `chartPaletteForFill`), and
|
|
2240
|
+
* the emphasised point takes a stronger shade of it: the series colour mixed away from the backdrop (towards black on a light backdrop,
|
|
2241
|
+
* towards white on a dark one) just far enough to stand {@link CHART_EMPHASIS_MIN_LIGHTNESS_STEP} L* from it. Moving away from the
|
|
2242
|
+
* backdrop only raises the contrast, so the shade keeps the series colour's. A series colour too close to black (or white) for that
|
|
2243
|
+
* step is shaded the other way instead, while the shade keeps {@link CHART_EMPHASIS_MIN_CONTRAST} against the backdrop.
|
|
2244
|
+
*
|
|
2245
|
+
* LH-105: `strong` is the series colour at full strength when `color` is its soft form ({@link softenChartPalette}). The emphasised point
|
|
2246
|
+
* then takes the full-strength colour itself when that already stands the step from the soft one, and a shade of it otherwise, so the
|
|
2247
|
+
* strong colour is kept for the emphasis.
|
|
2248
|
+
*
|
|
2249
|
+
* A faded tint of the other points (LH-03's first rule) needed room between the series colour and the backdrop, and emphasised only 36
|
|
2250
|
+
* of the 84 gallery theme x scheme x variant charts; a stronger shade has room in all of them. Undefined only for an unresolved colour or
|
|
2251
|
+
* when neither direction keeps both floors. The preview and the PPTX export call it with the same pair.
|
|
2252
|
+
*/
|
|
2253
|
+
declare function chartEmphasisColors(surface: string, color: string, strong?: string): {
|
|
2254
|
+
accent: string;
|
|
2255
|
+
muted: string;
|
|
2256
|
+
} | undefined;
|
|
2257
|
+
/** Share of the text colour mixed into the surface for the `surfaceAlt` role. */
|
|
2258
|
+
declare const SURFACE_ALT_MIX = 0.1;
|
|
2259
|
+
/** Smallest contrast `surfaceAlt` keeps against `surface`, so a band is visible next to a plain row. */
|
|
2260
|
+
declare const SURFACE_ALT_MIN_CONTRAST = 1.1;
|
|
2261
|
+
/**
|
|
2262
|
+
* The `surfaceAlt` colour role: the fill of the banded rows of a table whose other body rows take `surface`. It is the surface
|
|
2263
|
+
* mixed {@link SURFACE_ALT_MIX} of the way towards the text colour (a slightly darker band on a light table, a slightly lighter one
|
|
2264
|
+
* on a dark table), moved further until it differs from the surface by {@link SURFACE_ALT_MIN_CONTRAST}, while the text keeps
|
|
2265
|
+
* 4.5:1 on it. When mixing towards the text cannot keep both (a surface and text that are close together), the band moves the
|
|
2266
|
+
* other way, away from the text, which only raises the text contrast. Pure arithmetic on opaque colours, so the preview and
|
|
2267
|
+
* the PPTX export, which both resolve the `surfaceAlt` ColorRef from their own `surface` and `text` roles, draw and write the
|
|
2268
|
+
* same colour. An unresolved surface is white; an unresolved text colour is the surface's best contrast partner.
|
|
2269
|
+
*/
|
|
2270
|
+
declare function surfaceAltColor(surface: string, text: string): string;
|
|
2271
|
+
/** LH-113: share of the accent mixed into the table surface for a highlighted row. */
|
|
2272
|
+
declare const TABLE_HIGHLIGHT_MIX = 0.15;
|
|
2273
|
+
/**
|
|
2274
|
+
* LH-113: the fill of a highlighted table row (`table.highlight`, or the rows the slide's texts name): the table surface mixed
|
|
2275
|
+
* {@link TABLE_HIGHLIGHT_MIX} of the way towards the accent (a pale accent tint on a light table, a dark one on a dark table), mixed less
|
|
2276
|
+
* when the cell text would fall under 4.5:1 on it (never less readable than on the surface itself). Pure arithmetic on opaque colors, so
|
|
2277
|
+
* the preview and the PPTX export, which both pass their own `surface`, accent and text roles, draw and write the same color. An
|
|
2278
|
+
* unresolved surface is white, an unresolved accent black, an unresolved text color the surface's best contrast partner.
|
|
2279
|
+
*/
|
|
2280
|
+
declare function tableHighlightColor(surface: string, accent: string, text: string): string;
|
|
2281
|
+
|
|
2282
|
+
/**
|
|
2283
|
+
* LH-02: the automatic scrim under text on a picture background.
|
|
2284
|
+
*
|
|
2285
|
+
* Text drawn over a photograph reads only as well as the photograph allows. When a slide's text sits on a picture background
|
|
2286
|
+
* and the author set no overlay, core adds a scrim in the slide's background color behind the text: a gradient from the
|
|
2287
|
+
* slide edge the text is near (as Claude Design draws it: from the bottom under a lower title, from the side under a text
|
|
2288
|
+
* column) or, for text in the middle of the slide, a band across it that fades out above and below. Its opacity is the lowest
|
|
2289
|
+
* (in hundredths) at which every text color reaches its target contrast over every pixel the picture could have under the
|
|
2290
|
+
* text: the gray ramp from black to white (the bound `opf/text-on-image` uses), or the range of gray the host measured there
|
|
2291
|
+
* (`ComposeSlideOptions.pictureLuminance`). Both engines draw the composed scrim: the preview as an SVG linear gradient, the
|
|
2292
|
+
* PPTX export as one native rectangle with a gradient (or solid) fill whose stops carry alpha.
|
|
2293
|
+
*/
|
|
2294
|
+
/** A rectangle in canvas pixels. */
|
|
2295
|
+
interface ScrimBox {
|
|
2296
|
+
x: number;
|
|
2297
|
+
y: number;
|
|
2298
|
+
width: number;
|
|
2299
|
+
height: number;
|
|
2300
|
+
}
|
|
2301
|
+
/** A physical slide edge. */
|
|
2302
|
+
type ScrimEdge = 'left' | 'right' | 'top' | 'bottom';
|
|
2303
|
+
/** One automatic scrim of a picture background (SlideComposition.backgroundImage.scrims). */
|
|
2304
|
+
interface ComposedScrim {
|
|
2305
|
+
/** The key that controls it: the background's `overlay` (an overlay of the author's replaces the scrim, `false` turns it off). */
|
|
2306
|
+
path: string;
|
|
2307
|
+
/** Scrim color: the slide's background color (`roles.background`, bg1 of the slide's variant), opaque `#RRGGBB`. */
|
|
2308
|
+
color: string;
|
|
2309
|
+
/** Opacity under the text, 0 to 1 in hundredths: the lowest at which the text reads at `target` over every possible pixel. */
|
|
2310
|
+
opacity: number;
|
|
2311
|
+
/**
|
|
2312
|
+
* `gradient`: solid from `edge` to past the text, then fading out; `band`: solid across the text, fading out on both sides; `panel`
|
|
2313
|
+
* (LH-158): a solid column at `edge`, the full slide height, that the heading group sits on (SlideComposition.pictureText).
|
|
2314
|
+
*/
|
|
2315
|
+
form: 'gradient' | 'band' | 'panel';
|
|
2316
|
+
/** The slide edge a gradient or panel starts from (physical, so already mirrored in a right-to-left deck). Absent for a band. */
|
|
2317
|
+
edge?: ScrimEdge;
|
|
2318
|
+
/** The rectangle drawn: the full slide width (top, bottom and band) or height (left and right), clipped to the slide. */
|
|
2319
|
+
box: ScrimBox;
|
|
2320
|
+
/** The axis the stops run along: `vertical` from the box's top edge, `horizontal` from its left edge. */
|
|
2321
|
+
axis: 'vertical' | 'horizontal';
|
|
2322
|
+
/** Opacity stops along the axis, positions 0 to 1 ascending: `opacity` over the solid part and an eased fade to 0 at each end that is not a slide edge. */
|
|
2323
|
+
stops: {
|
|
2324
|
+
position: number;
|
|
2325
|
+
opacity: number;
|
|
2326
|
+
}[];
|
|
2327
|
+
/** The region the scrim covers at full opacity: its group's text boxes plus a margin, clipped to the slide. */
|
|
2328
|
+
text: ScrimBox;
|
|
2329
|
+
/** The contrast the slide text color reaches over the worst pixel through the scrim. */
|
|
2330
|
+
contrast: number;
|
|
2331
|
+
/** The contrast the opacity was chosen for (4.5:1). */
|
|
2332
|
+
target: number;
|
|
2333
|
+
/** `worst-case`: any pixel from black to white; `sampled`: the gray range the host measured under the text (`grays`). */
|
|
2334
|
+
basis: 'worst-case' | 'sampled';
|
|
2335
|
+
/** The darkest and lightest gray (0 to 255, sRGB) of the picture under the text, when sampled. */
|
|
2336
|
+
grays?: [number, number];
|
|
2337
|
+
}
|
|
2338
|
+
/**
|
|
2339
|
+
* A luminance grid of a picture: `columns` × `rows` cells in row order over the whole picture, each a WCAG relative luminance (0 to 1).
|
|
2340
|
+
* `values` is each cell's darkest pixel (or its only value) and `high`, when present, its lightest, so a cell of fine black and white
|
|
2341
|
+
* detail keeps both (luminanceGrid writes both).
|
|
2342
|
+
*/
|
|
2343
|
+
interface PictureLuminance {
|
|
2344
|
+
columns: number;
|
|
2345
|
+
rows: number;
|
|
2346
|
+
values: ArrayLike<number>;
|
|
2347
|
+
high?: ArrayLike<number>;
|
|
2348
|
+
/**
|
|
2349
|
+
* 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
|
|
2350
|
+
* and lightest pixel of a cell miss (texture, edges); text placed on the picture (SlideComposition.pictureText) avoids busy cells.
|
|
2351
|
+
*/
|
|
2352
|
+
busy?: PictureWeights;
|
|
2353
|
+
/**
|
|
2354
|
+
* 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
|
|
2355
|
+
* saliency or vision model; text placed on the picture avoids salient cells.
|
|
2356
|
+
*/
|
|
2357
|
+
salient?: PictureWeights;
|
|
2358
|
+
}
|
|
2359
|
+
/** 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. */
|
|
2360
|
+
interface PictureWeights {
|
|
2361
|
+
columns: number;
|
|
2362
|
+
rows: number;
|
|
2363
|
+
values: ArrayLike<number>;
|
|
2364
|
+
}
|
|
2365
|
+
/** The contrast a scrim keeps under text over a picture: 4.5:1, WCAG's normal-text minimum, for every size. */
|
|
2366
|
+
declare const SCRIM_TARGET_CONTRAST = 4.5;
|
|
2367
|
+
/** Margin around the text the scrim covers at full opacity, in reference pixels (a 720 px tall slide). */
|
|
2368
|
+
declare const SCRIM_MARGIN = 24;
|
|
2369
|
+
/** How far a scrim fades out past its solid part, as a share of the slide along the scrim's axis. */
|
|
2370
|
+
declare const SCRIM_FADE = 0.2;
|
|
2371
|
+
/** The sRGB gray (0 to 255) whose relative luminance is `value`. */
|
|
2372
|
+
declare function grayOfLuminance(value: number): number;
|
|
2373
|
+
/**
|
|
2374
|
+
* The lowest opacity, in hundredths, of `scrim` over every pixel in `pixels` at which each text color reaches its target; 1 when
|
|
2375
|
+
* a color cannot reach it even on the solid scrim (it then reads as on the plain slide). Each pixel is opaque `#RRGGBB`.
|
|
2376
|
+
*/
|
|
2377
|
+
declare function scrimOpacity(texts: readonly {
|
|
2378
|
+
color: string;
|
|
2379
|
+
target: number;
|
|
2380
|
+
}[], scrim: string, pixels: readonly string[]): {
|
|
2381
|
+
opacity: number;
|
|
2382
|
+
contrast: number;
|
|
2383
|
+
};
|
|
2384
|
+
/**
|
|
2385
|
+
* The form of a scrim over `text` (the union of the text boxes) on a `width` × `height` slide: a gradient from the bottom edge when the
|
|
2386
|
+
* text sits in the lower part of the slide, from the top when it sits in the upper part, from the side when it is a column at the
|
|
2387
|
+
* left or right, and from the bottom again when the text sits a little below the middle; else a band across the text. An edge
|
|
2388
|
+
* gradient is solid from its edge to `margin` past the text and fades out over a fifth of the slide. A band is solid over the text
|
|
2389
|
+
* and `halfLine` (about half a line) above and below it only, and fades out over one and a half times the text's height on each
|
|
2390
|
+
* side (at least a quarter of the slide), so it has no visible edge.
|
|
2391
|
+
*/
|
|
2392
|
+
declare function scrimGeometry(text: ScrimBox, width: number, height: number, margin: number, halfLine?: number): Pick<ComposedScrim, 'form' | 'edge' | 'box' | 'axis' | 'text'> & {
|
|
2393
|
+
solid: [number, number];
|
|
2394
|
+
};
|
|
2395
|
+
/** Min and max gray of a luminance grid over a region given as fractions (0 to 1) of the picture; undefined when the grid is unusable. */
|
|
2396
|
+
declare function sampledGrays(grid: PictureLuminance | undefined, region: {
|
|
2397
|
+
left: number;
|
|
2398
|
+
top: number;
|
|
2399
|
+
right: number;
|
|
2400
|
+
bottom: number;
|
|
2401
|
+
}): [number, number] | undefined;
|
|
2402
|
+
/**
|
|
2403
|
+
* 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
|
|
2404
|
+
* when the grid is absent, undefined when it is unusable (then it is ignored).
|
|
2405
|
+
*/
|
|
2406
|
+
declare function sampledWeight(grid: PictureWeights | undefined, region: {
|
|
2407
|
+
left: number;
|
|
2408
|
+
top: number;
|
|
2409
|
+
right: number;
|
|
2410
|
+
bottom: number;
|
|
2411
|
+
}): number | undefined;
|
|
2412
|
+
/**
|
|
2413
|
+
* The luminance grid of decoded pixels, for `ComposeSlideOptions.pictureLuminance`: `pixels` are 8-bit sRGB in row order with `channels`
|
|
2414
|
+
* bytes each (3, or 4 with alpha, which is composited over white, the canvas the contrast rules assume). Each of `columns` × `rows` cells
|
|
2415
|
+
* keeps its darkest and lightest pixel. One helper every host calls, so the preview and the export size the same scrim from the same picture.
|
|
2416
|
+
*/
|
|
2417
|
+
declare function luminanceGrid(pixels: ArrayLike<number>, width: number, height: number, options?: {
|
|
2418
|
+
channels?: number;
|
|
2419
|
+
columns?: number;
|
|
2420
|
+
rows?: number;
|
|
2421
|
+
}): PictureLuminance;
|
|
2422
|
+
/** Inputs of one picture background's scrims. */
|
|
2423
|
+
interface ScrimInput {
|
|
2424
|
+
/** The background's path (`slides.N.design.background`, `design.background` or `theme`). */
|
|
2425
|
+
path: string;
|
|
2426
|
+
width: number;
|
|
2427
|
+
height: number;
|
|
2428
|
+
/**
|
|
2429
|
+
* The boxes whose text is drawn straight on the picture (not on a card, panel or emphasis surface), in groups that each get a scrim
|
|
2430
|
+
* of their own: the body and headings, the header, the footer. Groups whose solid parts meet along the same axis share one scrim.
|
|
2431
|
+
*/
|
|
2432
|
+
groups: readonly (readonly ScrimBox[])[];
|
|
2433
|
+
/** The text colors drawn there with the contrast each must reach. */
|
|
2434
|
+
texts: readonly {
|
|
2435
|
+
color: string;
|
|
2436
|
+
target: number;
|
|
2437
|
+
}[];
|
|
2438
|
+
/** The scrim color (the slide's background color). */
|
|
2439
|
+
color: string;
|
|
2440
|
+
/** The canvas colors a translucent picture shows through to (the slide background, and white, which the contrast rules assume). */
|
|
2441
|
+
bases: readonly string[];
|
|
2442
|
+
/** Picture opacity below 1. */
|
|
2443
|
+
opacity?: number;
|
|
2444
|
+
/** The picture's whole rectangle on the slide (its fit placement), when known: sampling maps the text region into it. */
|
|
2445
|
+
picture?: ScrimBox;
|
|
2446
|
+
/** The host's luminance grid of the picture, when it measured one (and the picture is not recolored). */
|
|
2447
|
+
luminance?: PictureLuminance;
|
|
2448
|
+
/** Reference pixels per canvas pixel: min(width, height) / 720. */
|
|
2449
|
+
scale: number;
|
|
2450
|
+
/** The tallest line of the text, in canvas pixels: a band is solid half of it above and below the text. */
|
|
2451
|
+
line?: number;
|
|
2452
|
+
}
|
|
2453
|
+
/**
|
|
2454
|
+
* The automatic scrims of one picture background, in paint order: one per group of text (the body, the header, the footer), merged
|
|
2455
|
+
* where they meet, all at one opacity. Empty when no text sits on the picture or the picture needs none (opacity 0).
|
|
2456
|
+
*/
|
|
2457
|
+
declare function pictureScrims(input: ScrimInput): ComposedScrim[];
|
|
2458
|
+
|
|
2459
|
+
/**
|
|
2460
|
+
* LH-158: where a heading group goes on a picture background.
|
|
2461
|
+
*
|
|
2462
|
+
* Without computer vision core cannot know where a picture's subject is, but a host that measured the picture (`pictureLuminance`, a
|
|
2463
|
+
* luminance grid, optionally with a vision model's `busy` and `salient` weights) tells it how busy each part of the picture is and how
|
|
2464
|
+
* 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
|
|
2465
|
+
* of its area, aligned to the start side or centered, each scored on the cells under its text without a scrim; as fallbacks the
|
|
2466
|
+
* 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
|
|
2467
|
+
* 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
|
|
2468
|
+
* score (`SlideComposition.pictureText`), so an editor or a host with its own vision can offer the others, and an author's
|
|
2469
|
+
* `textPlacement` on the background picks one outright.
|
|
2470
|
+
*/
|
|
2471
|
+
|
|
2472
|
+
/** Where in its area the heading group sits. */
|
|
2473
|
+
type PictureTextAnchor = 'top' | 'middle' | 'bottom';
|
|
2474
|
+
/** How the heading group is aligned: `start`, the layout's side alignment (left, mirrored in a right-to-left deck), or `center`. */
|
|
2475
|
+
type PictureTextAlignment = 'start' | 'center';
|
|
2476
|
+
/** A placement of the heading group on a picture background: an anchor and an alignment, or `panel`. */
|
|
2477
|
+
type PictureTextPlacement = `${PictureTextAnchor}-${PictureTextAlignment}` | 'panel';
|
|
2478
|
+
/** Every placement, in the order an editor lists them. */
|
|
2479
|
+
declare const PICTURE_TEXT_PLACEMENTS: readonly PictureTextPlacement[];
|
|
2480
|
+
/**
|
|
2481
|
+
* 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
|
|
2482
|
+
* 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.
|
|
2483
|
+
*/
|
|
2484
|
+
declare const CALM_PICTURE_SPREAD = 48;
|
|
2485
|
+
/** A placement whose text covers a cell of at least this `salient` weight (a face, the subject) does not read. */
|
|
2486
|
+
declare const SALIENT_LIMIT = 0.5;
|
|
2487
|
+
/** The automatic scrim carries a placement that does not read while it needs at most this opacity; above it, the panel reads better. */
|
|
2488
|
+
declare const PANEL_SCRIM_LIMIT = 0.5;
|
|
2489
|
+
/** 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. */
|
|
2490
|
+
declare const PICTURE_TEXT_COLUMNS: readonly [0.6, 0.7];
|
|
2491
|
+
/** 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. */
|
|
2492
|
+
declare const PICTURE_PANEL_SHARES: readonly [0.4, 0.5];
|
|
2493
|
+
/** One candidate placement of the heading group on the picture, scored on the measured grid. */
|
|
2494
|
+
interface PictureTextCandidate {
|
|
2495
|
+
placement: PictureTextPlacement;
|
|
2496
|
+
anchor: PictureTextAnchor;
|
|
2497
|
+
alignment: PictureTextAlignment;
|
|
2498
|
+
/** The text on the picture (the union of the group's ink), or the panel, in canvas pixels. */
|
|
2499
|
+
box: ScrimBox;
|
|
2500
|
+
/**
|
|
2501
|
+
* 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
|
|
2502
|
+
* centered) where that reads better and keeps every size, so a title wraps short of a bright corner; for the panel, its text column.
|
|
2503
|
+
*/
|
|
2504
|
+
measure: number;
|
|
2505
|
+
/** The darkest and lightest gray (0 to 255, sRGB) under the text, through the author's overlay. Absent for the panel. */
|
|
2506
|
+
grays?: [number, number];
|
|
2507
|
+
/** How far apart those grays are (0 to 255): the luminance spread, how busy the picture is there. */
|
|
2508
|
+
spread: number;
|
|
2509
|
+
/** The contrast the slide's text color reaches over the worst of those grays (over the slide background for the panel). */
|
|
2510
|
+
contrast: number;
|
|
2511
|
+
/** The host's largest `busy` weight under the text (0 when it gave none). */
|
|
2512
|
+
busy: number;
|
|
2513
|
+
/** The host's largest `salient` weight under the text, or under the panel (0 when it gave none). */
|
|
2514
|
+
salient: number;
|
|
2515
|
+
/** 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). */
|
|
2516
|
+
reads: boolean;
|
|
2517
|
+
/** The opacity the automatic scrim would need there (0 to 1); absent when the background has an `overlay` key or for the panel. */
|
|
2518
|
+
scrim?: number;
|
|
2519
|
+
/** Lower is better: busy-ness (spread / 255 or the busy weight) plus the salient weight plus the contrast shortfall below 4.5:1. */
|
|
2520
|
+
score: number;
|
|
2521
|
+
}
|
|
2522
|
+
/** LH-158: the placement of the heading group on a picture background (SlideComposition.pictureText). */
|
|
2523
|
+
interface PictureText {
|
|
2524
|
+
/** The placement drawn. */
|
|
2525
|
+
placement: PictureTextPlacement;
|
|
2526
|
+
/** The anchor and alignment it was drawn at (for the panel, the layout's anchor inside the panel, start-aligned). */
|
|
2527
|
+
anchor: PictureTextAnchor;
|
|
2528
|
+
alignment: PictureTextAlignment;
|
|
2529
|
+
/** `measured`: chosen on the host's grid; `authored`: the background's `textPlacement`. */
|
|
2530
|
+
source: 'measured' | 'authored';
|
|
2531
|
+
/** The placement does not read on the bare picture and the automatic scrim carries it. */
|
|
2532
|
+
scrim?: true;
|
|
2533
|
+
/** The panel drawn under the group: the column (canvas pixels) and the slide edge it stands on. */
|
|
2534
|
+
panel?: {
|
|
2535
|
+
box: ScrimBox;
|
|
2536
|
+
edge: ScrimEdge;
|
|
2537
|
+
};
|
|
2538
|
+
/** Every candidate with its score, in PICTURE_TEXT_PLACEMENTS order; empty when the picture was not measured. */
|
|
2539
|
+
candidates: PictureTextCandidate[];
|
|
2540
|
+
}
|
|
2541
|
+
/** Inputs of the candidates' scores. */
|
|
2542
|
+
interface PictureTextInput {
|
|
2543
|
+
grid: PictureLuminance;
|
|
2544
|
+
/** The picture's rectangle on the slide (its fit placement), canvas pixels. */
|
|
2545
|
+
picture: ScrimBox;
|
|
2546
|
+
/** The slide's text color, opaque `#RRGGBB`. */
|
|
2547
|
+
text: string;
|
|
2548
|
+
/** The automatic scrim's color (the slide background), when the background has no `overlay` key; absent, no scrim is scored. */
|
|
2549
|
+
scrim?: string;
|
|
2550
|
+
/** The author's full-frame overlay (a literal color and its alpha), which every gray is seen through. */
|
|
2551
|
+
overlay?: {
|
|
2552
|
+
color: string;
|
|
2553
|
+
alpha: number;
|
|
2554
|
+
};
|
|
2555
|
+
/** The text of each anchor and alignment (union of ink boxes, canvas pixels). */
|
|
2556
|
+
places: readonly {
|
|
2557
|
+
anchor: PictureTextAnchor;
|
|
2558
|
+
alignment: PictureTextAlignment;
|
|
2559
|
+
measure: number;
|
|
2560
|
+
box: ScrimBox;
|
|
2561
|
+
}[];
|
|
2562
|
+
/** How far around the text the picture is read, canvas pixels (the margin the automatic scrim covers, SCRIM_MARGIN). */
|
|
2563
|
+
margin?: number;
|
|
2564
|
+
/** The panel and the width of its text column, when the slide can take one. */
|
|
2565
|
+
panel?: {
|
|
2566
|
+
box: ScrimBox;
|
|
2567
|
+
measure: number;
|
|
2568
|
+
};
|
|
2569
|
+
}
|
|
2570
|
+
/**
|
|
2571
|
+
* The candidates scored on the grid, one per placement, or undefined when the grid is unusable (then the slide composes as if it were
|
|
2572
|
+
* not measured). A placement given at several measures keeps the one that reads, else the one with the lower score, else the first.
|
|
2573
|
+
*/
|
|
2574
|
+
declare function scorePictureText(input: PictureTextInput): PictureTextCandidate[] | undefined;
|
|
2575
|
+
/**
|
|
2576
|
+
* The placement core draws, from scored candidates: the layout's own placement (`preferred`) when it reads; else the reading placement
|
|
2577
|
+
* with the lowest score, the layout's alignment first; else, when the background has no `overlay` key, the placement that needs the
|
|
2578
|
+
* least automatic scrim (plus its salient weight), unless that scrim is above PANEL_SCRIM_LIMIT and the panel reads, which then wins;
|
|
2579
|
+
* else (an overlay of the author's) the placement with the lowest score. Ties keep the order of `order` (the layout's anchor, then the
|
|
2580
|
+
* middle, then the others).
|
|
2581
|
+
*/
|
|
2582
|
+
declare function choosePictureText(candidates: readonly PictureTextCandidate[], preferred: {
|
|
2583
|
+
anchor: PictureTextAnchor;
|
|
2584
|
+
alignment: PictureTextAlignment;
|
|
2585
|
+
}, order: readonly PictureTextAnchor[]): {
|
|
2586
|
+
candidate: PictureTextCandidate;
|
|
2587
|
+
scrim: boolean;
|
|
2588
|
+
} | undefined;
|
|
2589
|
+
|
|
2590
|
+
/**
|
|
2591
|
+
* SH-09: the pyramid and matrix arrangements of a layout region (`arrangement: "pyramid" | "matrix"` on a layout record's region).
|
|
2592
|
+
*
|
|
2593
|
+
* A lone list of one level in such a region is drawn as a diagram: a pyramid of stacked levels (the first entry at the apex) or a
|
|
2594
|
+
* 2 x 2 matrix of quadrants in a square. The geometry is PowerPoint's own for its Basic Pyramid and Basic Matrix SmartArt layouts,
|
|
2595
|
+
* measured through COM (SH-09 spike, 2026-11-06), so the PPTX export can write the arrangement as live SmartArt that PowerPoint lays out
|
|
2596
|
+
* exactly as the preview draws it:
|
|
2597
|
+
*
|
|
2598
|
+
* - pyramid of n levels in a frame W x H: level i (1-based, top to bottom) is H/n tall and W·i/n wide, centered; its sides continue
|
|
2599
|
+
* one slope (each side steps in by W/(2n) from its bottom edge to its top edge), so the apex is a triangle and the others are
|
|
2600
|
+
* trapezoids. PowerPoint's text rectangle is the apex's whole box, and 0.65 of a lower level's width (centered, full height).
|
|
2601
|
+
* - matrix: a square of side min(W, H) centered in the frame, a diamond filling it, and four rounded squares (quadrants 1 to 4: top
|
|
2602
|
+
* left, top right, bottom left, bottom right) 0.39 of its side, 0.095 in from its edges and 0.03 apart. A matrix holds at most four
|
|
2603
|
+
* entries; a quadrant without one is still drawn, empty. A quadrant's text rectangle is its rounded rectangle's own (DrawingML
|
|
2604
|
+
* `roundRect` at its default adjustment).
|
|
2605
|
+
*
|
|
2606
|
+
* Text: one size for every node, the list's fitted size or larger, never smaller. PowerPoint insets each node's text by a share of its
|
|
2607
|
+
* font size (ARRANGEMENT_TEXT_MARGIN); lines are centered, the block in the middle of its rectangle.
|
|
2608
|
+
*
|
|
2609
|
+
* This module is pure geometry and paint: composeSlide places the text (SlideComposition.arrangements) and both engines draw from it.
|
|
2610
|
+
*/
|
|
2611
|
+
/** The arrangements a region can ask for. */
|
|
2612
|
+
/** SH-17's linear arrangements (linear-arrangements.ts has their geometry). */
|
|
2613
|
+
declare const LINEAR_ARRANGEMENTS: readonly ["chevrons", "flow", "vertical-flow"];
|
|
2614
|
+
declare const ARRANGEMENTS: readonly ["pyramid", "matrix", "cycle", "chevrons", "flow", "vertical-flow"];
|
|
2615
|
+
type Arrangement = typeof ARRANGEMENTS[number];
|
|
2616
|
+
/** The most entries each arrangement draws as its own shapes: a pyramid's levels, a matrix's quadrants (other counts draw cards). */
|
|
2617
|
+
declare const ARRANGEMENT_MAX: Readonly<Record<Arrangement, number>>;
|
|
2618
|
+
/** A matrix draws its quadrants for exactly this many entries; other counts draw a grid of cards (at most ARRANGEMENT_CARDS_MAX). */
|
|
2619
|
+
declare const MATRIX_ENTRIES = 4;
|
|
2620
|
+
declare const ARRANGEMENT_CARDS_MAX = 8;
|
|
2621
|
+
/** A card's text inset, as a share of the font size. */
|
|
2622
|
+
declare const CARD_TEXT_MARGIN = 0.6;
|
|
2623
|
+
/** PowerPoint's SmartArt layout each arrangement matches (the `loTypeId` of a live SmartArt export). */
|
|
2624
|
+
declare const SMART_ART_LAYOUTS: Readonly<Record<Arrangement, string>>;
|
|
2625
|
+
/** The name PowerPoint gives each layout, and what a finding calls one node of each arrangement. */
|
|
2626
|
+
declare const SMART_ART_NAMES: Readonly<Record<Arrangement, {
|
|
2627
|
+
layout: string;
|
|
2628
|
+
nodes: string;
|
|
2629
|
+
}>>;
|
|
2630
|
+
/** A node's text inset on every side, as a share of its font size (PowerPoint's: 0.1 em in a pyramid level or a cycle's circle, 0.3 em in a quadrant). */
|
|
2631
|
+
declare const ARRANGEMENT_TEXT_MARGIN: Readonly<Record<Arrangement, number>>;
|
|
2632
|
+
/** A lower pyramid level's text rectangle is this share of its width, centered (the apex's is its whole box). */
|
|
2633
|
+
declare const PYRAMID_TEXT_WIDTH = 0.65;
|
|
2634
|
+
/** Matrix proportions, as shares of the square's side: the quadrant's side, its inset from the square's edge and the gap between two. */
|
|
2635
|
+
declare const MATRIX_QUADRANT = 0.39;
|
|
2636
|
+
declare const MATRIX_INSET = 0.095;
|
|
2637
|
+
declare const MATRIX_GAP = 0.03;
|
|
2638
|
+
/** DrawingML `roundRect`'s default adjustment (16667 of 100000): the corner radius as a share of the smaller side. */
|
|
2639
|
+
declare const ROUND_RECT_ADJUST = 16667;
|
|
2640
|
+
/** The text of an arrangement may grow to this many times the list's fitted size, while every node still holds its entry. */
|
|
2641
|
+
declare const ARRANGEMENT_GROWTH = 1.5;
|
|
2642
|
+
/** The outline of every node, in points (PowerPoint's 1.5 pt line in the slide's background color). */
|
|
2643
|
+
declare const ARRANGEMENT_LINE_POINTS = 1.5;
|
|
2644
|
+
/** The matrix's diamond is the primary color lightened by this share (DrawingML lumMod 1 - L, lumOff L). */
|
|
2645
|
+
declare const MATRIX_BACKGROUND_LIGHTEN = 0.8;
|
|
2646
|
+
/** The widest pyramid frame, as a multiple of its height: a wider region centers a frame of this proportion. */
|
|
2647
|
+
declare const PYRAMID_MAX_ASPECT = 2.5;
|
|
2648
|
+
interface Box$4 {
|
|
2649
|
+
x: number;
|
|
2650
|
+
y: number;
|
|
2651
|
+
width: number;
|
|
2652
|
+
height: number;
|
|
2653
|
+
}
|
|
2654
|
+
/** One node of an arrangement: its shape's box, its DrawingML preset and adjustment, and the rectangle PowerPoint sets its text in. */
|
|
2655
|
+
interface ArrangementNode {
|
|
2656
|
+
/** 0-based: the pyramid's level from the top, the matrix's quadrant (top left, top right, bottom left, bottom right). */
|
|
2657
|
+
index: number;
|
|
2658
|
+
box: Box$4;
|
|
2659
|
+
/** DrawingML preset: `trapezoid` for a pyramid level (the apex too, as PowerPoint writes it), `roundRect` for a quadrant or a box, `ellipse` for a cycle's circle, `chevron` (SH-17). */
|
|
2660
|
+
preset: 'trapezoid' | 'roundRect' | 'ellipse' | 'chevron';
|
|
2661
|
+
/** The preset's `adj` (of 100000): a trapezoid's inset over its smaller side, a rounded rectangle's corner. */
|
|
2662
|
+
adjust: number;
|
|
2663
|
+
/** The outline as a polygon (a pyramid level), in the same units as `box`; absent for a rounded rectangle (`radius`). */
|
|
2664
|
+
points?: [number, number][];
|
|
2665
|
+
/** A rounded rectangle's corner radius. */
|
|
2666
|
+
radius?: number;
|
|
2667
|
+
/** The rectangle the node's text is set in (before the text margin): PowerPoint's in the SmartArt design. */
|
|
2668
|
+
textBox: Box$4;
|
|
2669
|
+
/** OPF's pyramid: the text sits beside its level, outside the shape, so the shape's outline does not bound it. */
|
|
2670
|
+
beside?: true;
|
|
2671
|
+
/** SH-17: the shape is mirrored (a chevron pointing left, in a right-to-left deck). */
|
|
2672
|
+
flip?: true;
|
|
2673
|
+
}
|
|
2674
|
+
/** The frame a pyramid takes in `area`: all of it, or a centered frame PYRAMID_MAX_ASPECT times as wide as tall when the area is wider. */
|
|
2675
|
+
declare function pyramidFrame(area: Box$4): Box$4;
|
|
2676
|
+
/** The levels of a pyramid of `count` entries in `frame`, the apex first (PowerPoint's Basic Pyramid). */
|
|
2677
|
+
declare function pyramidNodes(frame: Box$4, count: number): ArrangementNode[];
|
|
2678
|
+
/** The square of a matrix in `frame` (its diamond's box). */
|
|
2679
|
+
declare function matrixSquare(frame: Box$4): Box$4;
|
|
2680
|
+
/** The four quadrants of a matrix in `frame` (PowerPoint's Basic Matrix), whatever the number of entries. */
|
|
2681
|
+
declare function matrixNodes(frame: Box$4): ArrangementNode[];
|
|
2682
|
+
/** OPF's pyramid, at its start: the share of the area's width the steps take, at most this many times its height. */
|
|
2683
|
+
declare const PYRAMID_STEPS_SHARE = 0.4;
|
|
2684
|
+
declare const PYRAMID_STEPS_ASPECT = 1.6;
|
|
2685
|
+
/**
|
|
2686
|
+
* OPF's own pyramid design, drawn where PowerPoint's does not hold the entries at the list's size: the levels as a stepped pyramid of
|
|
2687
|
+
* rounded bars at the start of `area` (level i of n is i/n of the steps' width, centered on one axis, `gap` apart), and each entry's
|
|
2688
|
+
* text beside its level, in one column across the rest of the area, vertically centered on its level.
|
|
2689
|
+
*/
|
|
2690
|
+
declare function pyramidSteps(area: Box$4, count: number, gap: number, radius: number): ArrangementNode[];
|
|
2691
|
+
/** OPF's own matrix design: four rounded quadrants filling `area` two by two, `gap` apart (rectangular where the area is). */
|
|
2692
|
+
declare function matrixQuadrants(area: Box$4, gap: number): ArrangementNode[];
|
|
2693
|
+
/**
|
|
2694
|
+
* The grid of cards a matrix of other than four entries draws: `columns` cards a row (core cardGridColumns), every row full but the
|
|
2695
|
+
* last, whose cards keep the others' width and are centered; the cards fill `area`, `gap` apart, with corner `radius`.
|
|
2696
|
+
*/
|
|
2697
|
+
declare function cardNodes(area: Box$4, count: number, columns: number, gap: number, radius: number): ArrangementNode[];
|
|
2698
|
+
/**
|
|
2699
|
+
* The width of a node's shape across a horizontal line `y` (a pyramid level narrows toward its top edge); a quadrant's full width,
|
|
2700
|
+
* less its rounded corners where `y` is within a radius of its top or bottom edge.
|
|
2701
|
+
*/
|
|
2702
|
+
declare function nodeWidthAt(node: ArrangementNode, y: number): number;
|
|
2703
|
+
/** A scheme color slot (as a PPTX theme names it) with the hex it resolves to on the slide and an optional luminance transform. */
|
|
2704
|
+
interface ArrangementColor {
|
|
2705
|
+
slot: 'accent1' | 'bg1' | 'tx1';
|
|
2706
|
+
hex: string;
|
|
2707
|
+
lumMod?: number;
|
|
2708
|
+
lumOff?: number;
|
|
2709
|
+
}
|
|
2710
|
+
/** What an arrangement is painted with: its nodes' fill and outline, their text, the matrix's diamond and a cycle's arrows. */
|
|
2711
|
+
interface ArrangementPaint {
|
|
2712
|
+
fill: ArrangementColor;
|
|
2713
|
+
line: ArrangementColor;
|
|
2714
|
+
text: ArrangementColor;
|
|
2715
|
+
background: ArrangementColor;
|
|
2716
|
+
arrow: ArrangementColor;
|
|
2717
|
+
}
|
|
2718
|
+
/**
|
|
2719
|
+
* The paint of an arrangement from the slide's resolved colors: the nodes in the primary color (`accent1`) outlined in the background
|
|
2720
|
+
* (`bg1`), their text in whichever of the background and the text color reads better on the primary, and the matrix's diamond the
|
|
2721
|
+
* primary lightened by MATRIX_BACKGROUND_LIGHTEN. `lighten(hex, lumMod, lumOff)` is DrawingML's luminance transform (core
|
|
2722
|
+
* applyColorTransform), so the preview and PowerPoint compute the same color.
|
|
2723
|
+
*/
|
|
2724
|
+
declare function arrangementPaint(primary: string, background: string, text: string, contrast: (a: string, b: string) => number | undefined, lighten: (hex: string, transform: {
|
|
2725
|
+
lumMod: number;
|
|
2726
|
+
lumOff: number;
|
|
2727
|
+
}) => string): ArrangementPaint;
|
|
2728
|
+
/** The proportion (width over height) of the frame a cycle of `count` entries takes in its region (PowerPoint's design). */
|
|
2729
|
+
declare function cycleAspect(count: number): number;
|
|
2730
|
+
/** PowerPoint's circle diameter for 1 to 8 entries, as a share of the frame's width (at cycleAspect). */
|
|
2731
|
+
declare const CYCLE_DIAMETER: readonly number[];
|
|
2732
|
+
/** PowerPoint's ring radius (the circles' centers) for 1 to 8 entries, as a share of the frame's width (at cycleAspect). */
|
|
2733
|
+
declare const CYCLE_RADIUS: readonly number[];
|
|
2734
|
+
/** A cycle arrow: its thickness as a share of the circle's diameter; its length and its start as shares of the gap between two circles. */
|
|
2735
|
+
declare const CYCLE_ARROW: Readonly<{
|
|
2736
|
+
thickness: 0.3375;
|
|
2737
|
+
length: 0.53;
|
|
2738
|
+
start: 0.22;
|
|
2739
|
+
}>;
|
|
2740
|
+
/** Two entries: each arrow's length and its center's distance from the line between the centers (shares of W), and its center's place along that line. */
|
|
2741
|
+
declare const CYCLE_TWO: Readonly<{
|
|
2742
|
+
length: 0.2491013;
|
|
2743
|
+
offset: 0.18876154;
|
|
2744
|
+
along: 0.48825813;
|
|
2745
|
+
}>;
|
|
2746
|
+
/** DrawingML `rightArrow`'s adjustments in a cycle: the shaft 60% of the arrow's thickness, the head half of its smaller side. */
|
|
2747
|
+
declare const CYCLE_ARROW_ADJUST: readonly [number, number];
|
|
2748
|
+
/** A cycle's arrows are the primary lightened by this share (DrawingML lumMod 1 - L, lumOff L). */
|
|
2749
|
+
declare const CYCLE_ARROW_LIGHTEN = 0.4;
|
|
2750
|
+
/** One arrow of a cycle, after the node `index`: its unrotated box, its clockwise rotation in degrees and its outline as drawn. */
|
|
2751
|
+
interface ArrangementArrow {
|
|
2752
|
+
index: number;
|
|
2753
|
+
box: Box$4;
|
|
2754
|
+
rotation: number;
|
|
2755
|
+
/** DrawingML `rightArrow`'s adj1 and adj2. */
|
|
2756
|
+
adjust: readonly [number, number];
|
|
2757
|
+
/** The outline (seven points), turned about the box's center, in the same units as `box`. */
|
|
2758
|
+
points: [number, number][];
|
|
2759
|
+
}
|
|
2760
|
+
/** DrawingML `rightArrow` in `box` with `adjust`, turned `rotation` degrees clockwise about its center. */
|
|
2761
|
+
declare function rightArrowPoints(box: Box$4, rotation: number, adjust?: readonly [number, number]): [number, number][];
|
|
2762
|
+
/** The frame a cycle of `count` entries takes in `area`: the largest of cycleAspect's proportion, centered. */
|
|
2763
|
+
declare function cycleFrame(area: Box$4, count: number): Box$4;
|
|
2764
|
+
/** PowerPoint's Basic Cycle of `count` entries (1 to 8) in `frame` (cycleFrame): the circles in entry order and the arrow after each. */
|
|
2765
|
+
declare function cycleNodes(frame: Box$4, count: number, rtl?: boolean): {
|
|
2766
|
+
nodes: ArrangementNode[];
|
|
2767
|
+
arrows: ArrangementArrow[];
|
|
2768
|
+
};
|
|
2769
|
+
/** The text inset of OPF's cycle nodes, as a share of the font size. */
|
|
2770
|
+
declare const CYCLE_RING_MARGIN = 0.2;
|
|
2771
|
+
/** OPF's cycle: a node at most this share of the area's width and of its height, and between these proportions (width over height). */
|
|
2772
|
+
declare const CYCLE_RING_NODE: Readonly<{
|
|
2773
|
+
width: 0.46;
|
|
2774
|
+
height: 0.42;
|
|
2775
|
+
maxAspect: 3;
|
|
2776
|
+
minAspect: 1.15;
|
|
2777
|
+
}>;
|
|
2778
|
+
/**
|
|
2779
|
+
* OPF's own cycle design, drawn where PowerPoint's circles do not hold the entries: rounded rectangles (DrawingML roundRect at its
|
|
2780
|
+
* default corner) on an ellipse that fills `area`, the first at the top and the rest clockwise (two entries: left and right; one: in the
|
|
2781
|
+
* middle; two in a tall area: one above the other), each as large as the area lets every node be while neighbors keep room for an arrow between them (2 `gap`), and an arrow
|
|
2782
|
+
* from each to the next on the line between their centers, in the middle of the room between them.
|
|
2783
|
+
*/
|
|
2784
|
+
declare function cycleRing(area: Box$4, count: number, gap: number, rtl?: boolean): {
|
|
2785
|
+
nodes: ArrangementNode[];
|
|
2786
|
+
arrows: ArrangementArrow[];
|
|
2787
|
+
};
|
|
2788
|
+
/**
|
|
2789
|
+
* OPF's second cycle design, a loop of `rows` rows (columns in an area taller than wide) with exactly one node on every place of its
|
|
2790
|
+
* edge, so no place is left empty: two rows hold ceil(n/2) nodes left to right on top and the rest right to left below; three rows hold a
|
|
2791
|
+
* node at each end of the middle row too, the rest shared between the top and the bottom. A row of fewer nodes widens them, so every row
|
|
2792
|
+
* spans the area; the rows are one height. Neighbors keep room for an arrow (2 `gap`), and an arrow goes from each node to the next
|
|
2793
|
+
* (cycleLinks). In a tall area the loop is turned a quarter clockwise. Composition keeps whichever of the ring and the loops holds the
|
|
2794
|
+
* entries larger.
|
|
2795
|
+
*/
|
|
2796
|
+
declare function cycleLoop(area: Box$4, count: number, gap: number, rtl?: boolean, rows?: number): {
|
|
2797
|
+
nodes: ArrangementNode[];
|
|
2798
|
+
arrows: ArrangementArrow[];
|
|
2799
|
+
} | undefined;
|
|
2800
|
+
/**
|
|
2801
|
+
* SH-09's safe domain for live SmartArt, from the PowerPoint COM sweep (docs/smartart.md): the instances of an arrangement for which
|
|
2802
|
+
* PowerPoint laid out every node within 0.1 pt of core's rectangle, at core's font size, with no visible difference in the shapes, and drew
|
|
2803
|
+
* the SmartArt as it draws OPF's native export of the same slide (SH-07's thresholds). An instance outside it is exported as native shapes
|
|
2804
|
+
* (`smartArt: "shapes"`) with the reason.
|
|
2805
|
+
*/
|
|
2806
|
+
declare const SMART_ART_DOMAIN: Readonly<{
|
|
2807
|
+
/** Entries: a pyramid of 1 to 5 levels (6 to 8 never fitted the list's role size in the compared frames), a matrix of 1 to 4 quadrants. */
|
|
2808
|
+
count: Readonly<Record<Arrangement, number>>;
|
|
2809
|
+
/** The frame's width over its height, per arrangement: the range the 16:9, 4:3 and 1:1 slides gave, with a small margin. */
|
|
2810
|
+
aspect: Readonly<Record<Arrangement, {
|
|
2811
|
+
min: number;
|
|
2812
|
+
max: number;
|
|
2813
|
+
}>>;
|
|
2814
|
+
/** The most lines one entry may wrap to in its node, and in all its entries (a line drawn by PowerPoint's wrap can sit up to 1 px from core's). */
|
|
2815
|
+
lines: 2;
|
|
2816
|
+
totalLines: 6;
|
|
2817
|
+
/**
|
|
2818
|
+
* The room a line break keeps: an entry's breaks must be the same when its text rectangle is this share narrower or wider (composeSlide
|
|
2819
|
+
* fits it at both), so PowerPoint, which measures its own fonts, breaks the same lines.
|
|
2820
|
+
*/
|
|
2821
|
+
slack: 0.04;
|
|
2822
|
+
/**
|
|
2823
|
+
* SH-19: the widest line an entry may have (canvas pixels). PowerPoint measures a line up to about 0.6% wider or narrower than OPF does,
|
|
2824
|
+
* and a centered line moves by half the difference, so a longer line can sit more than SH-07's 1.5 px text gate from OPF's native text
|
|
2825
|
+
* (the sweep: a 537 px line of a one-level pyramid sat 1.74 px off; every line of 440 px or less was within 1.5 px).
|
|
2826
|
+
*/
|
|
2827
|
+
lineWidth: 500;
|
|
2828
|
+
/**
|
|
2829
|
+
* SH-17: the most of a node's text rectangle (less its margins) an entry's lines may fill from top to bottom: a box PowerPoint finds
|
|
2830
|
+
* nearly full is grown or searched to another scale (the sweep found it at 0.969 of the height and above).
|
|
2831
|
+
*/
|
|
2832
|
+
fill: Readonly<Partial<Record<Arrangement, number>>>;
|
|
2833
|
+
/**
|
|
2834
|
+
* SH-17: the most of the frame the entries' text may cover (each line's width times the size, over the frame's area): PowerPoint sets
|
|
2835
|
+
* a SmartArt's lines up to a pixel from where it sets OPF's native text, which a frame dense with large text shows above SH-07's gate
|
|
2836
|
+
* (every instance above 0.082 that failed it did so for this).
|
|
2837
|
+
*/
|
|
2838
|
+
ink: Readonly<Partial<Record<Arrangement, number>>>;
|
|
2839
|
+
}>;
|
|
2840
|
+
/**
|
|
2841
|
+
* The writing of an arrangement's entries, as the domain reads it: right to left (Arabic, Hebrew and the other right-to-left scripts),
|
|
2842
|
+
* Chinese or Japanese (`cjk`), another script than Latin (`other`), or Latin (no `script`).
|
|
2843
|
+
*/
|
|
2844
|
+
declare function smartArtScript(texts: readonly string[]): {
|
|
2845
|
+
rtl: boolean;
|
|
2846
|
+
script?: 'cjk' | 'other';
|
|
2847
|
+
};
|
|
2848
|
+
/** The facts of one composed arrangement the domain is checked on (ComposedArrangement.smartArt, the frame and the text). */
|
|
2849
|
+
interface SmartArtCandidate {
|
|
2850
|
+
kind: Arrangement;
|
|
2851
|
+
count: number;
|
|
2852
|
+
frame: Box$4;
|
|
2853
|
+
/** Per entry: the lines it wraps to, and whether its breaks hold within SMART_ART_DOMAIN.slack of its width. */
|
|
2854
|
+
nodes: {
|
|
2855
|
+
lines: number;
|
|
2856
|
+
stable: boolean;
|
|
2857
|
+
}[];
|
|
2858
|
+
/** A right-to-left deck or entry. */
|
|
2859
|
+
rtl: boolean;
|
|
2860
|
+
/** Text in a script other than Latin (the comparison found Japanese text placed several pixels off in PowerPoint's SmartArt). */
|
|
2861
|
+
script?: 'cjk' | 'other';
|
|
2862
|
+
/** 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. */
|
|
2863
|
+
fill?: number;
|
|
2864
|
+
ink?: number;
|
|
2865
|
+
/** SH-19: the widest line of any entry, canvas pixels. */
|
|
2866
|
+
widest?: number;
|
|
2867
|
+
}
|
|
2868
|
+
/**
|
|
2869
|
+
* Whether PowerPoint lays an arrangement out as the preview draws it (SMART_ART_DOMAIN): `undefined` when it does, else the reason it
|
|
2870
|
+
* falls back to native shapes, for the export's `pptx/smartart-unavailable` finding.
|
|
2871
|
+
*/
|
|
2872
|
+
declare function smartArtUnavailable(candidate: SmartArtCandidate): string | undefined;
|
|
2873
|
+
|
|
2874
|
+
/**
|
|
2875
|
+
* SH-19: OPF's own SmartArt layout definitions (ECMA-376 Part 1, §21.4 `dgm:layoutDef`) and OPF's interpreter of them.
|
|
2876
|
+
*
|
|
2877
|
+
* 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
|
|
2878
|
+
* quadrants and card grids, its wrapped and snaking chevrons and flows), the PPTX export writes OPF's own layout definition of the design,
|
|
2879
|
+
* so the design is live, editable SmartArt in PowerPoint. The definition is a table of explicit constraints (SH-19 spike, 2026-11-07,
|
|
2880
|
+
* 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
|
|
2881
|
+
* full-frame child that fixes the drawing's bounds, axis-aligned arrows as `sp` shapes turned by `rot`, and other arrows as `conn`
|
|
2882
|
+
* connectors between two node centers. PowerPoint evaluates such a definition with no algorithm of its own: every node lands within
|
|
2883
|
+
* 0.0001 pt of its constraints at any frame size. OPF's interpreter (evaluateLayoutDefinition) evaluates the same subset as PowerPoint
|
|
2884
|
+
* does, and returns the nodes and arrows in the shape of a composed arrangement (layoutArrangement), so render and pptx need no second
|
|
2885
|
+
* geometry path: the export builds the definition from the composed design, evaluates it, and writes it only when the result is the design.
|
|
2886
|
+
*
|
|
2887
|
+
* PowerPoint's rules the interpreter reproduces (measured through COM, docs/smartart.md):
|
|
2888
|
+
* - `composite`: each child at its constraints (shares of the root's `w` and `h`, or absolute millimeters); when the children's bounds do not
|
|
2889
|
+
* 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);
|
|
2890
|
+
* - 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,
|
|
2891
|
+
* 180 or 270 degrees keeps the box);
|
|
2892
|
+
* - `conn` with `begPts`/`endPts` `ctr`: a connector shape on the line from the source node's center to the destination's, from `begPad`
|
|
2893
|
+
* after the source center to `endPad` before the destination's, `h` thick, turned to the line's angle;
|
|
2894
|
+
* - names of layout nodes and `forEach` elements are unique in the whole definition (PowerPoint rejects a definition that repeats one);
|
|
2895
|
+
* - `hideLastTrans="0"` keeps the last node's transition (a loop's closing arrow).
|
|
2896
|
+
*
|
|
2897
|
+
* Pure data and geometry: no Node built-ins, so it runs on the edge runtimes as the rest of core.
|
|
2898
|
+
*/
|
|
2899
|
+
|
|
2900
|
+
interface Box$3 {
|
|
2901
|
+
x: number;
|
|
2902
|
+
y: number;
|
|
2903
|
+
width: number;
|
|
2904
|
+
height: number;
|
|
2905
|
+
}
|
|
2906
|
+
/** An algorithm (`dgm:alg`) and its parameters. */
|
|
2907
|
+
interface LayoutAlgorithm {
|
|
2908
|
+
type: 'composite' | 'tx' | 'sp' | 'conn' | 'snake';
|
|
2909
|
+
params?: Readonly<Record<string, string>>;
|
|
2910
|
+
}
|
|
2911
|
+
/** A shape (`dgm:shape`): its DrawingML preset, turn in degrees, adjustments (shares of 100000) and whether its geometry is hidden. */
|
|
2912
|
+
interface LayoutShapeType {
|
|
2913
|
+
type: string;
|
|
2914
|
+
rot?: number;
|
|
2915
|
+
hideGeom?: boolean;
|
|
2916
|
+
adj?: readonly number[];
|
|
2917
|
+
}
|
|
2918
|
+
/**
|
|
2919
|
+
* A constraint (`dgm:constr`): `for: 'ch'` with `forName` sets a child's value, otherwise the node's own; the value is `fact` times the
|
|
2920
|
+
* reference (`refType`: the root's `w` or `h`, or the font size), or `val` (millimeters for lengths, points for a font size).
|
|
2921
|
+
*/
|
|
2922
|
+
interface LayoutConstraint {
|
|
2923
|
+
type: 'l' | 't' | 'w' | 'h' | 'begPad' | 'endPad' | 'primFontSz' | 'lMarg' | 'rMarg' | 'tMarg' | 'bMarg';
|
|
2924
|
+
for?: 'ch';
|
|
2925
|
+
forName?: string;
|
|
2926
|
+
refType?: 'w' | 'h' | 'primFontSz';
|
|
2927
|
+
fact?: number;
|
|
2928
|
+
val?: number;
|
|
2929
|
+
op?: 'equ';
|
|
2930
|
+
}
|
|
2931
|
+
/** What a layout node presents (`dgm:presOf`): the point of its `forEach` (`desOrSelf` of a node, `self` of a transition), or nothing. */
|
|
2932
|
+
interface LayoutPresOf {
|
|
2933
|
+
axis: 'desOrSelf' | 'self';
|
|
2934
|
+
ptType?: 'node';
|
|
2935
|
+
}
|
|
2936
|
+
interface LayoutNodeDefinition {
|
|
2937
|
+
kind: 'layoutNode';
|
|
2938
|
+
name: string;
|
|
2939
|
+
styleLbl?: string;
|
|
2940
|
+
alg?: LayoutAlgorithm;
|
|
2941
|
+
shape?: LayoutShapeType;
|
|
2942
|
+
presOf?: LayoutPresOf;
|
|
2943
|
+
constraints?: readonly LayoutConstraint[];
|
|
2944
|
+
children?: readonly LayoutChild[];
|
|
2945
|
+
}
|
|
2946
|
+
/** `dgm:forEach` over the data model: the doc's child nodes (`ch`, from `st`, `cnt` of them), or the transition after a node (`followSib`). */
|
|
2947
|
+
interface LayoutForEach {
|
|
2948
|
+
kind: 'forEach';
|
|
2949
|
+
name: string;
|
|
2950
|
+
axis: 'ch' | 'followSib';
|
|
2951
|
+
ptType: 'node' | 'sibTrans';
|
|
2952
|
+
st?: number;
|
|
2953
|
+
cnt?: number;
|
|
2954
|
+
hideLastTrans?: boolean;
|
|
2955
|
+
children: readonly LayoutChild[];
|
|
2956
|
+
}
|
|
2957
|
+
/** 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. */
|
|
2958
|
+
interface LayoutBranch {
|
|
2959
|
+
name: string;
|
|
2960
|
+
count?: number;
|
|
2961
|
+
alg?: LayoutAlgorithm;
|
|
2962
|
+
shape?: LayoutShapeType;
|
|
2963
|
+
constraints?: readonly LayoutConstraint[];
|
|
2964
|
+
children?: readonly LayoutChild[];
|
|
2965
|
+
}
|
|
2966
|
+
interface LayoutChoose {
|
|
2967
|
+
kind: 'choose';
|
|
2968
|
+
name: string;
|
|
2969
|
+
branches: readonly LayoutBranch[];
|
|
2970
|
+
}
|
|
2971
|
+
type LayoutChild = LayoutNodeDefinition | LayoutForEach | LayoutChoose;
|
|
2972
|
+
/** A layout definition: its identity (what PowerPoint shows in Change Layout) and its root layout node. */
|
|
2973
|
+
interface LayoutDefinition {
|
|
2974
|
+
uniqueId: string;
|
|
2975
|
+
title: string;
|
|
2976
|
+
description: string;
|
|
2977
|
+
category: string;
|
|
2978
|
+
root: LayoutNodeDefinition;
|
|
2979
|
+
}
|
|
2980
|
+
/** 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`). */
|
|
2981
|
+
declare const TEXT_ONLY_LABELS: readonly string[];
|
|
2982
|
+
/** Millimeters per canvas pixel (1/96 inch): a constraint's absolute lengths are in millimeters. */
|
|
2983
|
+
declare const MM_PER_PX: number;
|
|
2984
|
+
/** The text rectangle of a DrawingML preset at `box` with its first adjustment (of 100000), as PowerPoint sets a node's text in it. */
|
|
2985
|
+
declare function presetTextRect(preset: string, box: Box$3, adjust?: number): Box$3;
|
|
2986
|
+
/** The largest-area rectangle turned by `rotation` degrees that fits in `box`, centered in it (PowerPoint's rule for a turned shape). */
|
|
2987
|
+
declare function turnedShapeBox(box: Box$3, rotation: number): Box$3;
|
|
2988
|
+
/** One shape the definition draws, in drawing order: its layout node, what it presents, its preset, box and turn. */
|
|
2989
|
+
interface LayoutShape {
|
|
2990
|
+
name: string;
|
|
2991
|
+
styleLbl?: string;
|
|
2992
|
+
/** The data-model point it presents: an entry (`node`) or the transition after one (`sibTrans`), 0-based; absent for a shape of the layout. */
|
|
2993
|
+
presents?: {
|
|
2994
|
+
type: 'node' | 'sibTrans';
|
|
2995
|
+
index: number;
|
|
2996
|
+
};
|
|
2997
|
+
preset: string;
|
|
2998
|
+
/** Unturned box, canvas pixels. */
|
|
2999
|
+
box: Box$3;
|
|
3000
|
+
rotation: number;
|
|
3001
|
+
adjust: readonly number[];
|
|
3002
|
+
hidden: boolean;
|
|
3003
|
+
/** A text-only node (TEXT_ONLY_LABELS): its box is the entry's text rectangle. */
|
|
3004
|
+
textOnly: boolean;
|
|
3005
|
+
/** 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. */
|
|
3006
|
+
margins?: [number, number, number, number];
|
|
3007
|
+
fontSize?: number;
|
|
3008
|
+
}
|
|
3009
|
+
/**
|
|
3010
|
+
* Evaluate a definition for a data model of `count` entries (each with its transition) in a frame (canvas pixels), as PowerPoint lays
|
|
3011
|
+
* 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,
|
|
3012
|
+
* a drawing that reaches outside its frame).
|
|
3013
|
+
*/
|
|
3014
|
+
declare function evaluateLayoutDefinition(definition: LayoutDefinition, frame: Box$3, count: number): LayoutShape[];
|
|
3015
|
+
/**
|
|
3016
|
+
* The interpreter's shapes as a composed arrangement's nodes and arrows (core ComposedArrangement): one node per entry (its shape, with
|
|
3017
|
+
* 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
|
|
3018
|
+
* of the layout before the first node as the background (a matrix's diamond). Hidden shapes are left out.
|
|
3019
|
+
*/
|
|
3020
|
+
declare function layoutArrangement(shapes: readonly LayoutShape[]): {
|
|
3021
|
+
nodes: ArrangementNode[];
|
|
3022
|
+
arrows: ArrangementArrow[];
|
|
3023
|
+
background?: Box$3;
|
|
3024
|
+
};
|
|
3025
|
+
/** One count's drawing in its frame (canvas pixels): composed nodes and arrows, and an optional background shape. */
|
|
3026
|
+
/**
|
|
3027
|
+
* One count's drawing in its frame (canvas pixels): composed nodes and arrows, an optional background shape, and (the composed count)
|
|
3028
|
+
* 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
|
|
3029
|
+
* 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).
|
|
3030
|
+
*/
|
|
3031
|
+
interface LayoutTable {
|
|
3032
|
+
nodes: readonly ArrangementNode[];
|
|
3033
|
+
arrows?: readonly ArrangementArrow[];
|
|
3034
|
+
background?: Box$3;
|
|
3035
|
+
textTops?: readonly (number | undefined)[];
|
|
3036
|
+
}
|
|
3037
|
+
/** How a definition paints and sets its text: style labels, the text insets as shares of the font size, the font size in points. */
|
|
3038
|
+
interface LayoutStyle {
|
|
3039
|
+
node: string;
|
|
3040
|
+
text: 'node' | 'slide';
|
|
3041
|
+
arrow?: string;
|
|
3042
|
+
margins: readonly [number, number, number, number];
|
|
3043
|
+
fontSize: number;
|
|
3044
|
+
}
|
|
3045
|
+
/**
|
|
3046
|
+
* A composite definition from one table per node count (1 to `max`; `table(k)` undefined leaves k to the `else` branch, a snake of
|
|
3047
|
+
* rounded rectangles). Returns the definition, or the reason a table cannot be one (an arrow neither axis-aligned nor on the line between
|
|
3048
|
+
* 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
|
|
3049
|
+
* PowerPoint needs every name unique.
|
|
3050
|
+
*/
|
|
3051
|
+
declare function compositeLayoutDefinition(identity: Omit<LayoutDefinition, 'root'>, frame: Box$3, max: number, table: (count: number) => LayoutTable | undefined, style: LayoutStyle): LayoutDefinition | {
|
|
3052
|
+
reason: string;
|
|
3053
|
+
};
|
|
3054
|
+
/** OPF's designs that have a layout definition of their own. */
|
|
3055
|
+
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"];
|
|
3056
|
+
type OpfLayoutDesign = typeof OPF_LAYOUT_DESIGNS[number];
|
|
3057
|
+
/** The inputs of one composed OPF design: its region, its gap and corner, its direction and (rows, columns, compact, `need`) its shape. */
|
|
3058
|
+
interface OpfLayoutRecipe {
|
|
3059
|
+
design: OpfLayoutDesign;
|
|
3060
|
+
area: Box$3;
|
|
3061
|
+
gap: number;
|
|
3062
|
+
radius?: number;
|
|
3063
|
+
rtl?: boolean;
|
|
3064
|
+
/** A card grid's columns, or a linear design's rows (columns of a vertical flow). */
|
|
3065
|
+
columns?: number;
|
|
3066
|
+
lines?: number;
|
|
3067
|
+
compact?: boolean;
|
|
3068
|
+
/** A linear design's text height (linearDesign `need`). */
|
|
3069
|
+
need?: number;
|
|
3070
|
+
}
|
|
3071
|
+
/** The most entries a definition's tables cover (ARRANGEMENT_MAX and ARRANGEMENT_CARDS_MAX). */
|
|
3072
|
+
declare const OPF_LAYOUT_MAX = 8;
|
|
3073
|
+
/** OPF's design of `recipe` for `count` entries, as composition draws it (undefined where the design cannot hold that many). */
|
|
3074
|
+
declare function opfLayoutGeometry(recipe: OpfLayoutRecipe, count: number): LayoutTable | undefined;
|
|
3075
|
+
/** The arrangement each of OPF's designs draws. */
|
|
3076
|
+
declare const OPF_LAYOUT_KIND: Readonly<Record<OpfLayoutDesign, Arrangement>>;
|
|
3077
|
+
/**
|
|
3078
|
+
* SH-19's safe domain for OPF's own layout definitions, from the PowerPoint COM sweep (docs/smartart.md): the instances for which PowerPoint
|
|
3079
|
+
* 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
|
|
3080
|
+
* 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.
|
|
3081
|
+
*/
|
|
3082
|
+
declare const SMART_ART_OPF_DOMAIN: Readonly<{
|
|
3083
|
+
/**
|
|
3084
|
+
* 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,
|
|
3085
|
+
* its quadrants and the compact rows held their entries only at a text density above the limit below.
|
|
3086
|
+
*/
|
|
3087
|
+
count: Readonly<Partial<Record<OpfLayoutDesign, readonly [number, number]>>>;
|
|
3088
|
+
/** The most lines one entry may wrap to (every entry that passed had one or two). */
|
|
3089
|
+
lines: 2;
|
|
3090
|
+
/**
|
|
3091
|
+
* 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
|
|
3092
|
+
* 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
|
|
3093
|
+
* gate (every instance at 0.075 or less passed; above it some did not).
|
|
3094
|
+
*/
|
|
3095
|
+
ink: 0.075;
|
|
3096
|
+
}>;
|
|
3097
|
+
/** The facts of one composed OPF design the domain is checked on (ComposedArrangement.layout and .smartArt). */
|
|
3098
|
+
interface OpfSmartArtCandidate {
|
|
3099
|
+
design: OpfLayoutDesign;
|
|
3100
|
+
compact?: boolean;
|
|
3101
|
+
count: number;
|
|
3102
|
+
lines: readonly number[];
|
|
3103
|
+
/** Whether each entry's line breaks hold within SMART_ART_DOMAIN.slack of its width. */
|
|
3104
|
+
stable?: readonly boolean[];
|
|
3105
|
+
ink?: number;
|
|
3106
|
+
/** The widest line of any entry, canvas pixels (SMART_ART_DOMAIN.lineWidth applies to OPF's layouts too). */
|
|
3107
|
+
widest?: number;
|
|
3108
|
+
rtl: boolean;
|
|
3109
|
+
script?: 'cjk' | 'other';
|
|
3110
|
+
}
|
|
3111
|
+
/** Whether PowerPoint draws an OPF design's layout definition as the preview does: undefined when it does, else the reason. */
|
|
3112
|
+
declare function opfSmartArtUnavailable(candidate: OpfSmartArtCandidate): string | undefined;
|
|
3113
|
+
|
|
3114
|
+
/**
|
|
3115
|
+
* SH-17: the linear arrangements of a layout region (`arrangement: "chevrons" | "flow" | "vertical-flow"`), next to SH-09's pyramid and
|
|
3116
|
+
* matrix (arrangements.ts).
|
|
3117
|
+
*
|
|
3118
|
+
* 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,
|
|
3119
|
+
* or a column of boxes with arrows between them. The first design is PowerPoint's own geometry for its Basic Chevron Process (`chevron1`),
|
|
3120
|
+
* Basic Process (`process1`) and Vertical Process (`process2`) SmartArt layouts, measured through COM (SH-17 sweep, 2026-11-06), so the
|
|
3121
|
+
* PPTX export can write the arrangement as live SmartArt that PowerPoint lays out exactly as the preview draws it. PowerPoint fits these
|
|
3122
|
+
* 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
|
|
3123
|
+
* 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
|
|
3124
|
+
* 0.0001 pt).
|
|
3125
|
+
*
|
|
3126
|
+
* - 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
|
|
3127
|
+
* 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
|
|
3128
|
+
* its height deep); PowerPoint sets the text in the chevron's own text rectangle (between the notch and the point) with a margin of
|
|
3129
|
+
* 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
|
|
3130
|
+
* 1023/1024 W and the height is the frame's.
|
|
3131
|
+
* - 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
|
|
3132
|
+
* 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
|
|
3133
|
+
* `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
|
|
3134
|
+
* frame less than 0.6 times as tall as wide is 1023/1024 W wide and as tall as the frame.
|
|
3135
|
+
* - 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,
|
|
3136
|
+
* 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).
|
|
3137
|
+
* 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.
|
|
3138
|
+
*
|
|
3139
|
+
* Every arrow is DrawingML's `rightArrow` (stem 0.6 of its height, head at its default length), turned by `rotation` about its center.
|
|
3140
|
+
*
|
|
3141
|
+
* 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
|
|
3142
|
+
* own design of the arrangement (chevronRow, flowRow, flowColumn), filling the region; a right-to-left deck mirrors both.
|
|
3143
|
+
*/
|
|
3144
|
+
|
|
3145
|
+
interface Box$2 {
|
|
3146
|
+
x: number;
|
|
3147
|
+
y: number;
|
|
3148
|
+
width: number;
|
|
3149
|
+
height: number;
|
|
3150
|
+
}
|
|
3151
|
+
/** SH-17's arrangements (arrangements.ts LINEAR_ARRANGEMENTS). */
|
|
3152
|
+
type LinearArrangement = typeof LINEAR_ARRANGEMENTS[number];
|
|
3153
|
+
declare const isLinearArrangement: (kind: string) => kind is LinearArrangement;
|
|
3154
|
+
/**
|
|
3155
|
+
* 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
|
|
3156
|
+
* height (vertical-flow), as PowerPoint's binary search leaves it (multiples of 1/8192). Measured for 1 to 10 nodes in 20 frames each.
|
|
3157
|
+
*/
|
|
3158
|
+
declare const SMART_ART_SCALES: Readonly<Record<LinearArrangement, readonly number[]>>;
|
|
3159
|
+
/** DrawingML's chevron default adjustment (the point's depth over the smaller side) and a process box's rounded corner. */
|
|
3160
|
+
declare const CHEVRON_ADJUST = 50000;
|
|
3161
|
+
declare const FLOW_ROUND_ADJUST = 10000;
|
|
3162
|
+
/** A rightArrow's stem (adj1) and head (adj2) adjustments, PowerPoint's for both process layouts. */
|
|
3163
|
+
declare const ARROW_ADJUST: readonly [number, number];
|
|
3164
|
+
/**
|
|
3165
|
+
* 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
|
|
3166
|
+
* elsewhere, a process box's 0.3 em on every side.
|
|
3167
|
+
*/
|
|
3168
|
+
declare const LINEAR_TEXT_MARGINS: Readonly<Record<LinearArrangement, readonly [number, number, number, number]>>;
|
|
3169
|
+
/** The geometry of one linear arrangement: its nodes and the arrows between them. */
|
|
3170
|
+
interface LinearGeometry {
|
|
3171
|
+
nodes: ArrangementNode[];
|
|
3172
|
+
arrows: ArrangementArrow[];
|
|
3173
|
+
}
|
|
3174
|
+
/** PowerPoint's Basic Chevron Process of `count` chevrons in `frame` (mirrored, pointing left, when `rtl`). */
|
|
3175
|
+
declare function chevronNodes(frame: Box$2, count: number, rtl?: boolean): LinearGeometry;
|
|
3176
|
+
/** PowerPoint's Basic Process of `count` boxes in `frame`, with an arrow between two (mirrored when `rtl`). */
|
|
3177
|
+
declare function flowNodes(frame: Box$2, count: number, rtl?: boolean): LinearGeometry;
|
|
3178
|
+
/** PowerPoint's Vertical Process of `count` boxes in `frame`, with a down arrow between two. */
|
|
3179
|
+
declare function verticalFlowNodes(frame: Box$2, count: number): LinearGeometry;
|
|
3180
|
+
/** PowerPoint's geometry of a linear arrangement in its SmartArt frame. */
|
|
3181
|
+
declare function linearNodes(kind: LinearArrangement, frame: Box$2, count: number, rtl?: boolean): LinearGeometry;
|
|
3182
|
+
/** The most rows (chevrons, flow) or columns (vertical flow) OPF's own design wraps its entries into. */
|
|
3183
|
+
declare const OPF_LINES_MAX = 4;
|
|
3184
|
+
/** 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. */
|
|
3185
|
+
declare const OPF_ARROW_LENGTH = 0.212;
|
|
3186
|
+
declare const OPF_ARROW_THICKNESS = 0.248;
|
|
3187
|
+
declare const OPF_ARROW_ROOM = 0.4;
|
|
3188
|
+
/** 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. */
|
|
3189
|
+
declare const OPF_COLUMN_ARROW_LENGTH = 0.375;
|
|
3190
|
+
declare const OPF_COLUMN_ARROW_THICKNESS = 0.45;
|
|
3191
|
+
declare const OPF_COLUMN_ROOM = 0.5;
|
|
3192
|
+
/** 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. */
|
|
3193
|
+
declare const OPF_CHEVRON_DEPTH = 0.2;
|
|
3194
|
+
/**
|
|
3195
|
+
* OPF's own design of a linear arrangement in `area`, drawn where PowerPoint's does not hold the entries (or lies outside the SmartArt
|
|
3196
|
+
* domain), in the deck's paint and PowerPoint's proportions, so the two read as one family. The entries go into `lines` rows (chevrons,
|
|
3197
|
+
* flow) or columns (vertical flow), as evenly as possible; every line spans the area (a line of fewer entries widens them, a column of
|
|
3198
|
+
* fewer lengthens them), and the block is centered in the area.
|
|
3199
|
+
*
|
|
3200
|
+
* - 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
|
|
3201
|
+
* chevron's point and the next row starts again at the left.
|
|
3202
|
+
* - 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,
|
|
3203
|
+
* joined by a down arrow at the end where the first stops, and so on.
|
|
3204
|
+
* - 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
|
|
3205
|
+
* top, joined by a right arrow at the bottom).
|
|
3206
|
+
*
|
|
3207
|
+
* `need` is the height the fullest node's text takes with its margins, once composition has sized the text in the tallest geometry
|
|
3208
|
+
* (`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
|
|
3209
|
+
* mirrors the design. Undefined when the area cannot hold it.
|
|
3210
|
+
*
|
|
3211
|
+
* `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
|
|
3212
|
+
* 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
|
|
3213
|
+
* chevron's point at most 0.12 of its width deep and half a gap from the next notch, and no least height.
|
|
3214
|
+
*/
|
|
3215
|
+
declare function linearDesign(kind: LinearArrangement, area: Box$2, count: number, gap: number, rtl?: boolean, lines?: number, need?: number, compact?: boolean): LinearGeometry | undefined;
|
|
3216
|
+
/**
|
|
3217
|
+
* 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
|
|
3218
|
+
* margin is at its start (the right when `rtl`).
|
|
3219
|
+
*/
|
|
3220
|
+
declare function linearMargins(kind: LinearArrangement, rtl: boolean, opf?: boolean): [number, number, number, number];
|
|
3221
|
+
|
|
3222
|
+
/** The 187 DrawingML preset names (ECMA-376 ST_ShapeType), without loading their geometry. */
|
|
3223
|
+
declare const SHAPE_PRESETS: readonly string[];
|
|
3224
|
+
/** Whether `name` is one of the 187 preset names. */
|
|
3225
|
+
declare const isPresetShape: (name: unknown) => name is string;
|
|
3226
|
+
/**
|
|
3227
|
+
* The four picture masks core draws without SH-01's preset geometry (FA-22's masks, the ECMA-376 formulas of rect, roundRect, ellipse
|
|
3228
|
+
* and hexagon), so a deck whose pictures use only these never loads the geometry in a browser. Every other preset, and every shape
|
|
3229
|
+
* block, needs the geometry: `ensureShapes` loads it where it is lazy.
|
|
3230
|
+
*/
|
|
3231
|
+
declare const BUILT_IN_MASKS: readonly string[];
|
|
3232
|
+
/**
|
|
3233
|
+
* 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
|
|
3234
|
+
* picture masked by a preset beyond the four built-in masks and the preset geometry is not loaded, else nothing. Node, Bun and Deno
|
|
3235
|
+
* load the geometry with core, so this is always empty there. With `diagrams` (SH-07: a PPTX export with `diagrams: "shapes"`, which fits
|
|
3236
|
+
* a diagram's node outlines to presets and reads their connection sites), a diagram needs the geometry too.
|
|
3237
|
+
*/
|
|
3238
|
+
declare function shapesPending(input: unknown, options?: {
|
|
3239
|
+
diagrams?: boolean;
|
|
3240
|
+
}): string[];
|
|
3241
|
+
/** SH-02: load the preset geometry when the deck needs it (shapesPending); returns what it loaded. Await it before composing in a browser. */
|
|
3242
|
+
declare function ensureShapes(input: unknown, options?: {
|
|
3243
|
+
diagrams?: boolean;
|
|
3244
|
+
}): Promise<string[]>;
|
|
3245
|
+
interface Box$1 {
|
|
3246
|
+
x: number;
|
|
3247
|
+
y: number;
|
|
3248
|
+
width: number;
|
|
3249
|
+
height: number;
|
|
3250
|
+
}
|
|
3251
|
+
type Rec = Record<string, any>;
|
|
3252
|
+
/** The theme shape styles (`style`), as PowerPoint's shape style gallery. */
|
|
3253
|
+
declare const SHAPE_STYLES: readonly ["none", "subtle", "moderate", "intense"];
|
|
3254
|
+
type ShapeStyleName = typeof SHAPE_STYLES[number];
|
|
3255
|
+
/** The style a shape takes when it names none: PowerPoint's default shape style, a solid accent fill with a darker line. */
|
|
3256
|
+
declare const DEFAULT_SHAPE_STYLE: ShapeStyleName;
|
|
3257
|
+
/** The six effect keys (SH-03 draws them). */
|
|
3258
|
+
declare const SHAPE_EFFECT_KEYS: readonly ["shadow", "innerShadow", "glow", "softEdge", "reflection", "blur"];
|
|
3259
|
+
/** Keys only a shape block takes (an image block also takes `shape`, `adjust`, `stroke`, `opacity` and `aspectRatio`). */
|
|
3260
|
+
declare const SHAPE_BLOCK_KEYS: readonly ["path", "fill", "style", "rotate", "flip", "anchor", "padding", "textDirection", "alt", "decorative", "hidden", "link", "shadow", "innerShadow", "glow", "softEdge", "reflection", "blur"];
|
|
3261
|
+
/** A line's default width on a shape: 1 point, PowerPoint's default line, in reference pixels. */
|
|
3262
|
+
declare const SHAPE_STROKE_WIDTH: number;
|
|
3263
|
+
/** A picture's line width when its stroke names none. */
|
|
3264
|
+
declare const PICTURE_STROKE_WIDTH = 2;
|
|
3265
|
+
/** PowerPoint's default text insets (0.1 inch left and right, 0.05 inch top and bottom), in reference pixels. */
|
|
3266
|
+
declare const SHAPE_PADDING: {
|
|
3267
|
+
readonly top: 4.8;
|
|
3268
|
+
readonly right: 9.6;
|
|
3269
|
+
readonly bottom: 4.8;
|
|
3270
|
+
readonly left: 9.6;
|
|
3271
|
+
};
|
|
3272
|
+
/** 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. */
|
|
3273
|
+
declare function presetAspect(preset: string | undefined): number;
|
|
3274
|
+
/** Whether a payload is a shape block: it names a preset with no `image`, or a custom `path`, and is no group. */
|
|
3275
|
+
declare function isShapeBlock(host: unknown): boolean;
|
|
3276
|
+
/** SVG path data (absolute commands, as SH-01 writes them) moved by dx, dy. Arc radii and flags stay; only points move. */
|
|
3277
|
+
declare function translatePathData(d: string, dx: number, dy: number): string;
|
|
3278
|
+
/** A frame mask or a shape's outline as one SVG path in slide coordinates: the preset's paths that take the fill, joined. */
|
|
3279
|
+
interface ShapeOutline {
|
|
3280
|
+
/** The DrawingML preset (an image mask always names one). */
|
|
3281
|
+
preset: string;
|
|
3282
|
+
/** DrawingML avLst guide values (1/100000 and 60000ths), for `a:prstGeom/a:avLst`. */
|
|
3283
|
+
adjust: Record<string, number>;
|
|
3284
|
+
/** The filled outline in slide coordinates. */
|
|
3285
|
+
path: string;
|
|
3286
|
+
}
|
|
3287
|
+
/**
|
|
3288
|
+
* An image frame's mask (FA-22, SH-02): `preset` (default rect) with the block's `adjust` (OPF units) at `box`, the DrawingML values
|
|
3289
|
+
* for export and the outline the preview clips to, from SH-01's preset geometry. An unknown preset is a rectangle.
|
|
3290
|
+
*/
|
|
3291
|
+
declare function presetMask(preset: unknown, box: Box$1, adjust?: Record<string, number>): ShapeOutline & {
|
|
3292
|
+
kind: string;
|
|
3293
|
+
};
|
|
3294
|
+
/** A validation issue of a shape or image block's `shape`/`adjust` (schema-check reports them). */
|
|
3295
|
+
interface ShapeIssue {
|
|
3296
|
+
path: string;
|
|
3297
|
+
code: 'shape-adjust-unknown' | 'shape-adjust-range' | 'shape-link-hidden';
|
|
3298
|
+
message: string;
|
|
3299
|
+
params: Record<string, unknown>;
|
|
3300
|
+
}
|
|
3301
|
+
/**
|
|
3302
|
+
* 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
|
|
3303
|
+
* value outside the preset's range (checked at the default square size; a range that depends on the size is checked there too), and
|
|
3304
|
+
* `link` with `hidden: true`. `at` builds a JSON Pointer under the block.
|
|
3305
|
+
*/
|
|
3306
|
+
declare function shapeIssues(host: unknown, at: (...keys: string[]) => string): ShapeIssue[];
|
|
3307
|
+
interface ComposedGradientStop {
|
|
3308
|
+
color: unknown;
|
|
3309
|
+
position: number;
|
|
3310
|
+
}
|
|
3311
|
+
interface ComposedGradient {
|
|
3312
|
+
type: 'linear' | 'radial' | 'rectangle' | 'shape';
|
|
3313
|
+
angle: number;
|
|
3314
|
+
stops: ComposedGradientStop[];
|
|
3315
|
+
}
|
|
3316
|
+
/** A resolved fill; ColorRefs stay as authored (engines resolve them). `opacity` multiplies the colors' own alpha. */
|
|
3317
|
+
type ComposedFill = {
|
|
3318
|
+
type: 'none';
|
|
3319
|
+
} | {
|
|
3320
|
+
type: 'solid';
|
|
3321
|
+
color: unknown;
|
|
3322
|
+
opacity?: number;
|
|
3323
|
+
} | {
|
|
3324
|
+
type: 'gradient';
|
|
3325
|
+
gradient: ComposedGradient;
|
|
3326
|
+
opacity?: number;
|
|
3327
|
+
} | {
|
|
3328
|
+
type: 'pattern';
|
|
3329
|
+
preset: string;
|
|
3330
|
+
foreground?: unknown;
|
|
3331
|
+
background?: unknown;
|
|
3332
|
+
opacity?: number;
|
|
3333
|
+
};
|
|
3334
|
+
interface ComposedArrowhead {
|
|
3335
|
+
type: 'triangle' | 'stealth' | 'diamond' | 'oval' | 'arrow';
|
|
3336
|
+
width: 'small' | 'medium' | 'large';
|
|
3337
|
+
length: 'small' | 'medium' | 'large';
|
|
3338
|
+
}
|
|
3339
|
+
interface ComposedStroke {
|
|
3340
|
+
/** ColorRef as authored; absent means the engine's neutral line color (a picture with no color). */
|
|
3341
|
+
color?: unknown;
|
|
3342
|
+
gradient?: ComposedGradient;
|
|
3343
|
+
/** Reference pixels, scaled to the canvas. */
|
|
3344
|
+
width: number;
|
|
3345
|
+
/** A DrawingML preset dash, or dash and gap lengths in stroke widths. */
|
|
3346
|
+
dash: string | number[];
|
|
3347
|
+
cap: 'flat' | 'round' | 'square';
|
|
3348
|
+
join: 'miter' | 'round' | 'bevel';
|
|
3349
|
+
miterLimit: number;
|
|
3350
|
+
compound: 'single' | 'double' | 'thickThin' | 'thinThick' | 'triple';
|
|
3351
|
+
align: 'center' | 'inside';
|
|
3352
|
+
start?: ComposedArrowhead;
|
|
3353
|
+
end?: ComposedArrowhead;
|
|
3354
|
+
sketch?: 'curved' | 'freehand' | 'scribble';
|
|
3355
|
+
/**
|
|
3356
|
+
* With `sketch`: the sketch both engines draw instead of the outline (shape-sketch.ts), with PowerPoint's seed (`sd`). One entry per
|
|
3357
|
+
* 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
|
|
3358
|
+
* without a line), and `fills`, the sketched outline a stroked path's fill fills (null: the path itself).
|
|
3359
|
+
*/
|
|
3360
|
+
sketched?: {
|
|
3361
|
+
seed: number;
|
|
3362
|
+
lines: (string | null)[];
|
|
3363
|
+
fills: (string | null)[];
|
|
3364
|
+
};
|
|
3365
|
+
}
|
|
3366
|
+
/**
|
|
3367
|
+
* What a theme style draws, as PowerPoint's shape styles on the theme's accent1 (Format > Shape Styles):
|
|
3368
|
+
* - subtle: "Light 1 Fill, Colored Outline": accent1 at 80% lighter, a 1 pt accent1 line, dark text (p:style lnRef 2, fillRef 1).
|
|
3369
|
+
* - moderate (the default): "Colored Fill": accent1, a 1 pt accent1 line 50% darker, light text (lnRef 2 with shade, fillRef 1).
|
|
3370
|
+
* - intense: "Intense Effect": accent1 25% darker, no line, bold light text and the soft shadow (lnRef 0, fillRef 1, effectRef 2).
|
|
3371
|
+
* - none: nothing the author did not set; text in the slide's text color.
|
|
3372
|
+
* `ref` is the `p:style` an export writes (the idx of each reference and its color), so PowerPoint shows the style as applied.
|
|
3373
|
+
*/
|
|
3374
|
+
interface ShapeStyleLook {
|
|
3375
|
+
fill: unknown;
|
|
3376
|
+
stroke?: {
|
|
3377
|
+
color: unknown;
|
|
3378
|
+
width: number;
|
|
3379
|
+
};
|
|
3380
|
+
text: unknown;
|
|
3381
|
+
bold: boolean;
|
|
3382
|
+
shadow?: 'soft';
|
|
3383
|
+
ref?: {
|
|
3384
|
+
line: {
|
|
3385
|
+
idx: number;
|
|
3386
|
+
color: unknown;
|
|
3387
|
+
};
|
|
3388
|
+
fill: {
|
|
3389
|
+
idx: number;
|
|
3390
|
+
color: unknown;
|
|
3391
|
+
};
|
|
3392
|
+
effect: {
|
|
3393
|
+
idx: number;
|
|
3394
|
+
color: unknown;
|
|
3395
|
+
};
|
|
3396
|
+
font: {
|
|
3397
|
+
idx: 'minor';
|
|
3398
|
+
color: unknown;
|
|
3399
|
+
};
|
|
3400
|
+
};
|
|
3401
|
+
}
|
|
3402
|
+
declare function shapeStyleLook(style: ShapeStyleName): ShapeStyleLook;
|
|
3403
|
+
/** One evaluated path of a shape, in slide coordinates (before rotation and flip, which engines apply about the frame's center). */
|
|
3404
|
+
interface ComposedShapePath {
|
|
3405
|
+
d: string;
|
|
3406
|
+
fill: ShapePathFill;
|
|
3407
|
+
stroke: boolean;
|
|
3408
|
+
/** True when the path does not end with Z: arrowheads draw at its ends. */
|
|
3409
|
+
open: boolean;
|
|
3410
|
+
/** An open path's two ends in slide coordinates, each with the direction (degrees, clockwise from +x) a line leaves the path there. */
|
|
3411
|
+
ends?: {
|
|
3412
|
+
start: ShapeEnd;
|
|
3413
|
+
end: ShapeEnd;
|
|
3414
|
+
};
|
|
3415
|
+
/**
|
|
3416
|
+
* For a filled path of a shape whose `shapeGradient` is `outline`: one polygon in slide coordinates, star-shaped about the center of
|
|
3417
|
+
* `gradientBox`, whose copies scaled about that center are the gradient's contours (the path itself when it is star-shaped from the
|
|
3418
|
+
* center, otherwise its radial envelope: along each ray from the center the farthest point of the outline).
|
|
3419
|
+
*/
|
|
3420
|
+
gradientOutline?: [number, number][][];
|
|
3421
|
+
}
|
|
3422
|
+
/** One end of an open path: the point, and the outward direction of the line there in degrees (clockwise from the positive x axis). */
|
|
3423
|
+
interface ShapeEnd {
|
|
3424
|
+
x: number;
|
|
3425
|
+
y: number;
|
|
3426
|
+
angle: number;
|
|
3427
|
+
}
|
|
3428
|
+
/**
|
|
3429
|
+
* The drawing of a shape block (`ComposedItem.shape`, `field` shape). Paint order: the paths in order (each filled in its mode,
|
|
3430
|
+
* `lighten` and `darken` shading the fill, then stroked where `stroke` is set), then the effects (SH-03), then the text.
|
|
3431
|
+
*/
|
|
3432
|
+
interface ComposedShape {
|
|
3433
|
+
/** Allocated region (the cell). */
|
|
3434
|
+
region: Box$1;
|
|
3435
|
+
/** The frame: the largest box of the shape's aspect centered in the region (or the region itself for an aspect of 0). */
|
|
3436
|
+
box: Box$1;
|
|
3437
|
+
/** The DrawingML preset, absent for a custom path. */
|
|
3438
|
+
preset?: string;
|
|
3439
|
+
/** In a browser or edge runtime before `ensureShapes`: the preset geometry is still loading, so `paths` is empty (engines draw no outline). */
|
|
3440
|
+
loading?: true;
|
|
3441
|
+
/**
|
|
3442
|
+
* For a gradient fill: the box the gradient spans, the bounds of the shape's whole outline in slide coordinates (PowerPoint lays a
|
|
3443
|
+
* gradient across the geometry's bounds, which for most presets are the frame and for `arc`, `blockArc` and the like are smaller).
|
|
3444
|
+
*/
|
|
3445
|
+
gradientBox?: Box$1;
|
|
3446
|
+
/**
|
|
3447
|
+
* How a `shape` gradient fill is drawn, as PowerPoint draws it: `outline`, contours that are the outline scaled about the center of
|
|
3448
|
+
* `gradientBox` (each filled path's `gradientOutline`), or `circle`, PowerPoint's circle gradient (some presets and every custom path).
|
|
3449
|
+
*/
|
|
3450
|
+
shapeGradient?: 'outline' | 'circle';
|
|
3451
|
+
/** The custom outline as authored (`path`), absent for a preset. */
|
|
3452
|
+
custom?: CustomPathInput;
|
|
3453
|
+
/** The adjust values drawn (valid OPF values), and the same in DrawingML units for `a:avLst`. */
|
|
3454
|
+
adjust: Record<string, number>;
|
|
3455
|
+
avLst: Record<string, number>;
|
|
3456
|
+
paths: ComposedShapePath[];
|
|
3457
|
+
/** The preset's text rectangle in slide coordinates. */
|
|
3458
|
+
textRect: Box$1;
|
|
3459
|
+
/** Insets inside it (scaled reference pixels). */
|
|
3460
|
+
padding: {
|
|
3461
|
+
top: number;
|
|
3462
|
+
right: number;
|
|
3463
|
+
bottom: number;
|
|
3464
|
+
left: number;
|
|
3465
|
+
};
|
|
3466
|
+
/** The text rectangle less the insets: where the text is fitted (for vertical text, the box turned about its center). */
|
|
3467
|
+
textBox: Box$1;
|
|
3468
|
+
anchor: 'top' | 'middle' | 'bottom';
|
|
3469
|
+
/** Where the fitted text block is drawn: `textBox` narrowed to the text's height at the anchor (present when the shape has text). */
|
|
3470
|
+
textArea?: Box$1;
|
|
3471
|
+
textDirection: 'horizontal' | 'vertical' | 'vertical270' | 'stacked';
|
|
3472
|
+
style: ShapeStyleName;
|
|
3473
|
+
/** The style's PowerPoint references (absent for style none). */
|
|
3474
|
+
styleRef?: ShapeStyleLook['ref'];
|
|
3475
|
+
fill: ComposedFill;
|
|
3476
|
+
stroke?: ComposedStroke;
|
|
3477
|
+
/** The color the text prefers (the style's), before `shapeTextColor` checks its contrast with the fill. */
|
|
3478
|
+
textColor: unknown;
|
|
3479
|
+
/** The ColorRef the text sits on: the fill's color (a gradient's middle stop, a pattern's background), absent on a transparent shape. */
|
|
3480
|
+
textBackdrop?: unknown;
|
|
3481
|
+
textBold: boolean;
|
|
3482
|
+
rotate?: number;
|
|
3483
|
+
flipH?: boolean;
|
|
3484
|
+
flipV?: boolean;
|
|
3485
|
+
alt?: string;
|
|
3486
|
+
decorative?: true;
|
|
3487
|
+
hidden?: true;
|
|
3488
|
+
link?: string;
|
|
3489
|
+
/** The effects to draw (the author's, and the soft shadow of the intense style): SH-03's drawEffects reads them. */
|
|
3490
|
+
effects?: Partial<Record<typeof SHAPE_EFFECT_KEYS[number], unknown>>;
|
|
3491
|
+
/** With `effects`: canvas pixels per reference pixel (min(width, height) / 720), the scale of the effects' lengths in both engines. */
|
|
3492
|
+
effectScale?: number;
|
|
3493
|
+
}
|
|
3494
|
+
/**
|
|
3495
|
+
* The geometry and look of a shape block in its `region` (the cell): the frame (the block's `aspectRatio`, else the preset's
|
|
3496
|
+
* aspect, as the largest centered box; `fill: true` in `options` takes the whole region), the evaluated paths, the text rectangle
|
|
3497
|
+
* and insets, and the effective fill, stroke, text color and effects. Text is fitted by composition in `textBox`.
|
|
3498
|
+
*/
|
|
3499
|
+
declare function composeShape(host: Rec, region: Box$1, options: {
|
|
3500
|
+
scale: number;
|
|
3501
|
+
aspect?: number;
|
|
3502
|
+
anchorY?: 'top' | 'middle' | 'bottom';
|
|
3503
|
+
}): ComposedShape;
|
|
3504
|
+
/**
|
|
3505
|
+
* LH-151 for shapes: the text color an engine draws on `backdrop` (the resolved fill under the text, #RRGGBB): the style's `preferred`
|
|
3506
|
+
* color when it reads at 4.5:1 (or the contrast cannot be measured), else whichever of the slide's text and background colors (tx1 and
|
|
3507
|
+
* bg1, so the export writes a theme color) reads better.
|
|
3508
|
+
*/
|
|
3509
|
+
declare function shapeTextColor(backdrop: string, preferred: string, text: string, background: string): string;
|
|
3510
|
+
/** The text to fit for `stacked` text: each character on its own line, as PowerPoint's stacked (wordArtVert) text draws it. */
|
|
3511
|
+
declare function stackedText(value: unknown): unknown;
|
|
3512
|
+
|
|
3513
|
+
/**
|
|
3514
|
+
* Overlay shapes and connectors (shapes SH-04): a slide's `shapes` array, drawn over the composed slide in array order (later entries on
|
|
3515
|
+
* top), above the content and the furniture. Nothing here moves content: the overlay is placed against the slide's final composition.
|
|
3516
|
+
*
|
|
3517
|
+
* - An overlay shape has the shape block vocabulary of SH-02 and one placement: `x`, `y`, `width`, `height` (fractions of the slide; `x`
|
|
3518
|
+
* 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
|
|
3519
|
+
* 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.
|
|
3520
|
+
* - A connector joins two ends (blocks or overlay shapes) at connection sites: a preset's own (SH-01's `connectionSites`, turned and flipped
|
|
3521
|
+
* with the shape) or a rectangle's four edge midpoints. Core routes it once as PowerPoint's connector presets (`straightConnector1`,
|
|
3522
|
+
* `bentConnector2`/`bentConnector3`, `curvedConnector2`/`curvedConnector3`) with their `a:xfrm` (box, rotation, flips) and `a:avLst`, and
|
|
3523
|
+
* evaluates the preset's own path through that transform, so the preview draws exactly the line PowerPoint draws from the export.
|
|
3524
|
+
*
|
|
3525
|
+
* The text fitter comes from composition (`composeOverlayShapes`' `item` callback), so this module imports composition's types only.
|
|
3526
|
+
*/
|
|
3527
|
+
|
|
3528
|
+
interface Point {
|
|
3529
|
+
x: number;
|
|
3530
|
+
y: number;
|
|
3531
|
+
}
|
|
3532
|
+
/** The routes of a connector (`connector.route`). */
|
|
3533
|
+
declare const CONNECTOR_ROUTES: readonly ["straight", "elbow", "curved"];
|
|
3534
|
+
type ConnectorRoute = typeof CONNECTOR_ROUTES[number];
|
|
3535
|
+
/** The DrawingML connector presets core routes with: one segment, an elbow of two or three segments, a curve of one or two cubics. */
|
|
3536
|
+
type ConnectorPreset = 'straightConnector1' | 'bentConnector2' | 'bentConnector3' | 'curvedConnector2' | 'curvedConnector3';
|
|
3537
|
+
/** A connector's default line width, in reference pixels (1.5 pt). */
|
|
3538
|
+
declare const CONNECTOR_STROKE_WIDTH = 2;
|
|
3539
|
+
/** A connector's default line color: the slide's text color, which reads on the slide's background. */
|
|
3540
|
+
declare const CONNECTOR_STROKE_COLOR = "text";
|
|
3541
|
+
/**
|
|
3542
|
+
* 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
|
|
3543
|
+
* route) or a site faces away from the other end.
|
|
3544
|
+
*/
|
|
3545
|
+
declare const CONNECTOR_STANDOFF = 24;
|
|
3546
|
+
/** An `at` shape's default shorter side: this share of the block's shorter side. */
|
|
3547
|
+
declare const OVERLAY_ANCHOR_SHARE = 0.15;
|
|
3548
|
+
/** The edges of `at`. */
|
|
3549
|
+
declare const OVERLAY_EDGES: readonly ["top", "bottom", "start", "end", "center"];
|
|
3550
|
+
type OverlayEdge = typeof OVERLAY_EDGES[number];
|
|
3551
|
+
/** Whether a `shapes` entry is a connector (it has `connector`); every other entry is an overlay shape. */
|
|
3552
|
+
declare const isOverlayConnector: (entry: unknown) => boolean;
|
|
3553
|
+
/**
|
|
3554
|
+
* The preset whose adjust values a connector's `adjust` names: `bentConnector3` for an elbow, `curvedConnector3` for a curve (their
|
|
3555
|
+
* `adj1`; the two-segment presets between perpendicular sites have none), `straightConnector1` (none) for a straight line.
|
|
3556
|
+
*/
|
|
3557
|
+
declare function connectorAdjustPreset(entry: unknown): 'straightConnector1' | 'bentConnector3' | 'curvedConnector3';
|
|
3558
|
+
/** Whether a slide has overlay shapes or connectors to compose. */
|
|
3559
|
+
declare const hasOverlayShapes: (slide: unknown) => boolean;
|
|
3560
|
+
/** A connection site in slide coordinates: the point and the direction (degrees clockwise from +x, y down) a connector leaves it. */
|
|
3561
|
+
interface ConnectionSite {
|
|
3562
|
+
x: number;
|
|
3563
|
+
y: number;
|
|
3564
|
+
angle: number;
|
|
3565
|
+
}
|
|
3566
|
+
/** 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. */
|
|
3567
|
+
declare function rectSites(box: LayoutBox): ConnectionSite[];
|
|
3568
|
+
/**
|
|
3569
|
+
* The connection sites of a composed shape (a shape block's `ComposedItem.shape` or an overlay shape's) in slide coordinates: the preset's
|
|
3570
|
+
* own (SH-01 `presetGeometry(...).connectionSites` at the frame's size with its adjust values) or a custom path's four edge midpoints, turned
|
|
3571
|
+
* and flipped with the shape. Undefined while the preset geometry is loading (a browser before `ensureShapes`).
|
|
3572
|
+
*/
|
|
3573
|
+
declare function shapeSites(shape: ComposedShape): ConnectionSite[] | undefined;
|
|
3574
|
+
/**
|
|
3575
|
+
* 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
|
|
3576
|
+
* 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.
|
|
3577
|
+
*/
|
|
3578
|
+
interface ConnectorFrame {
|
|
3579
|
+
box: LayoutBox;
|
|
3580
|
+
rotate: 0 | 90 | 270;
|
|
3581
|
+
flipH: boolean;
|
|
3582
|
+
flipV: boolean;
|
|
3583
|
+
}
|
|
3584
|
+
/** 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. */
|
|
3585
|
+
declare function frameToSlide(frame: ConnectorFrame, x: number, y: number): Point;
|
|
3586
|
+
/** A routed connector: its preset, frame, adjust values (OPF fractions and DrawingML integers) and its path in slide coordinates. */
|
|
3587
|
+
interface ConnectorRouteGeometry {
|
|
3588
|
+
preset: ConnectorPreset;
|
|
3589
|
+
frame: ConnectorFrame;
|
|
3590
|
+
/** OPF units (fractions of the frame's width), as `a:avLst` divides them: `{ adj1: 0.5 }`. */
|
|
3591
|
+
adjust: Record<string, number>;
|
|
3592
|
+
/** The same in DrawingML's integers (100000ths). */
|
|
3593
|
+
avLst: Record<string, number>;
|
|
3594
|
+
/** The route as SVG path data in slide coordinates (absolute M, L and C commands). */
|
|
3595
|
+
d: string;
|
|
3596
|
+
/** The route's two ends, each with the direction (degrees) a line leaves the path there, for arrowheads. */
|
|
3597
|
+
ends?: {
|
|
3598
|
+
start: ShapeEnd;
|
|
3599
|
+
end: ShapeEnd;
|
|
3600
|
+
};
|
|
3601
|
+
/** 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. */
|
|
3602
|
+
length: number;
|
|
3603
|
+
proper: boolean;
|
|
3604
|
+
/** The bounds of the route (a U route reaches past its frame). */
|
|
3605
|
+
bounds: LayoutBox;
|
|
3606
|
+
}
|
|
2198
3607
|
/**
|
|
2199
|
-
*
|
|
2200
|
-
*
|
|
2201
|
-
* the emphasised point takes a stronger shade of it: the series colour mixed away from the backdrop (towards black on a light backdrop,
|
|
2202
|
-
* towards white on a dark one) just far enough to stand {@link CHART_EMPHASIS_MIN_LIGHTNESS_STEP} L* from it. Moving away from the
|
|
2203
|
-
* backdrop only raises the contrast, so the shade keeps the series colour's. A series colour too close to black (or white) for that
|
|
2204
|
-
* step is shaded the other way instead, while the shade keeps {@link CHART_EMPHASIS_MIN_CONTRAST} against the backdrop.
|
|
3608
|
+
* The route of a connector from site `from` to site `to` (slide coordinates), as PowerPoint's preset for `route`. `scale` is canvas pixels
|
|
3609
|
+
* per reference pixel (min(width, height) / 720). Undefined while the preset geometry is loading.
|
|
2205
3610
|
*
|
|
2206
|
-
*
|
|
2207
|
-
*
|
|
2208
|
-
*
|
|
3611
|
+
* - straight: `straightConnector1` from one site to the other.
|
|
3612
|
+
* - elbow: between sites along the same axis `bentConnector3`, its middle segment halfway between the sites (`adj1` 0.5 of the frame) or,
|
|
3613
|
+
* when both face the same way, CONNECTOR_STANDOFF past the farther one (adj1 beyond 0 to 1, a U); between perpendicular sites
|
|
3614
|
+
* `bentConnector2`, an L through the corner. The sites' directions are taken to the nearest axis.
|
|
3615
|
+
* - curved: the same as `curvedConnector3` and `curvedConnector2`: the curve through the elbow's middle line, tangent to the sites' axes.
|
|
2209
3616
|
*
|
|
2210
|
-
*
|
|
2211
|
-
* of the 84 gallery theme x scheme x variant charts; a stronger shade has room in all of them. Undefined only for an unresolved colour or
|
|
2212
|
-
* when neither direction keeps both floors. The preview and the PPTX export call it with the same pair.
|
|
3617
|
+
* `own` is the connector's authored `adjust` (OPF units): its `adj1` replaces the automatic middle of a three-segment route.
|
|
2213
3618
|
*/
|
|
2214
|
-
declare function
|
|
2215
|
-
|
|
2216
|
-
|
|
3619
|
+
declare function connectorRoute(route: ConnectorRoute, from: ConnectionSite, to: ConnectionSite, scale?: number, own?: Record<string, number>): ConnectorRouteGeometry | undefined;
|
|
3620
|
+
/**
|
|
3621
|
+
* The sites a connector joins: `fromSite` and `toSite` where given and in range, else the pair whose route is best: sites that face each
|
|
3622
|
+
* other (opposite directions) with a proper route (leaving each site outward), then any proper route, then any; the shortest of those.
|
|
3623
|
+
* 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).
|
|
3624
|
+
*/
|
|
3625
|
+
declare function chooseConnectorSites(route: ConnectorRoute, fromSites: readonly ConnectionSite[], toSites: readonly ConnectionSite[], options?: {
|
|
3626
|
+
fromSite?: number;
|
|
3627
|
+
toSite?: number;
|
|
3628
|
+
scale?: number;
|
|
3629
|
+
same?: boolean;
|
|
3630
|
+
}): {
|
|
3631
|
+
from: number;
|
|
3632
|
+
to: number;
|
|
3633
|
+
geometry: ConnectorRouteGeometry;
|
|
2217
3634
|
} | undefined;
|
|
2218
|
-
/** Share of the text colour mixed into the surface for the `surfaceAlt` role. */
|
|
2219
|
-
declare const SURFACE_ALT_MIX = 0.1;
|
|
2220
|
-
/** Smallest contrast `surfaceAlt` keeps against `surface`, so a band is visible next to a plain row. */
|
|
2221
|
-
declare const SURFACE_ALT_MIN_CONTRAST = 1.1;
|
|
2222
3635
|
/**
|
|
2223
|
-
*
|
|
2224
|
-
*
|
|
2225
|
-
* on a dark table), moved further until it differs from the surface by {@link SURFACE_ALT_MIN_CONTRAST}, while the text keeps
|
|
2226
|
-
* 4.5:1 on it. When mixing towards the text cannot keep both (a surface and text that are close together), the band moves the
|
|
2227
|
-
* other way, away from the text, which only raises the text contrast. Pure arithmetic on opaque colours, so the preview and
|
|
2228
|
-
* the PPTX export, which both resolve the `surfaceAlt` ColorRef from their own `surface` and `text` roles, draw and write the
|
|
2229
|
-
* same colour. An unresolved surface is white; an unresolved text colour is the surface's best contrast partner.
|
|
3636
|
+
* An overlay shape (`SlideComposition.overlayShapes`, `kind` shape): a shape block item (`field` shape) whose `shape` is SH-02's
|
|
3637
|
+
* ComposedShape, so engines draw it with the shape block's drawing; `path` is `slides.N.shapes.I`.
|
|
2230
3638
|
*/
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
3639
|
+
interface ComposedOverlayShape extends ComposedItem {
|
|
3640
|
+
kind: 'shape';
|
|
3641
|
+
field: 'shape';
|
|
3642
|
+
shape: ComposedShape;
|
|
3643
|
+
/** The entry's index in the slide's `shapes`. */
|
|
3644
|
+
index: number;
|
|
3645
|
+
id?: string;
|
|
3646
|
+
/** For a shape placed by `at`: the block it follows (its id, the composed path of what it attaches to) and the physical edge. */
|
|
3647
|
+
attachedTo?: {
|
|
3648
|
+
id: string;
|
|
3649
|
+
ref: string;
|
|
3650
|
+
edge: 'top' | 'bottom' | 'left' | 'right' | 'center';
|
|
3651
|
+
};
|
|
3652
|
+
/** `front` (the default): over the slide, after its content and furniture; `back`: behind it, after the background and watermark, before the content. */
|
|
3653
|
+
layer: OverlayLayer;
|
|
3654
|
+
}
|
|
3655
|
+
/** The layers of overlay shapes (`layer`). Connectors are always in front. */
|
|
3656
|
+
declare const OVERLAY_LAYERS: readonly ["front", "back"];
|
|
3657
|
+
type OverlayLayer = typeof OVERLAY_LAYERS[number];
|
|
3658
|
+
/** One end of a connector. */
|
|
3659
|
+
interface ConnectorEnd {
|
|
3660
|
+
/** The id the connector names. */
|
|
3661
|
+
id: string;
|
|
3662
|
+
/**
|
|
3663
|
+
* 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
|
|
3664
|
+
* shape), a group's path (`slides.0.blocks.2`), or an overlay shape's path (`slides.0.shapes.3`).
|
|
3665
|
+
*/
|
|
3666
|
+
ref: string;
|
|
3667
|
+
/** `block` (a composed item), `group` (a group's box) or `shape` (an overlay shape). */
|
|
3668
|
+
target: 'block' | 'group' | 'shape';
|
|
3669
|
+
/** The connection site index (DrawingML's cxn idx) and the site. */
|
|
3670
|
+
site: number;
|
|
3671
|
+
point: Point;
|
|
3672
|
+
angle: number;
|
|
3673
|
+
}
|
|
3674
|
+
/**
|
|
3675
|
+
* A connector (`SlideComposition.overlayShapes`, `kind` connector): its route as PowerPoint's connector preset in its `a:xfrm` frame,
|
|
3676
|
+
* and the same route evaluated in slide coordinates (`paths[0]`, an open path with its ends), which engines stroke with SH-02's stroke
|
|
3677
|
+
* drawing (dash, compound, sketch and arrowheads).
|
|
3678
|
+
*/
|
|
3679
|
+
interface ComposedConnector {
|
|
3680
|
+
kind: 'connector';
|
|
3681
|
+
/** `slides.N.shapes.I`. */
|
|
3682
|
+
path: string;
|
|
3683
|
+
index: number;
|
|
3684
|
+
id?: string;
|
|
3685
|
+
route: ConnectorRoute;
|
|
3686
|
+
preset: ConnectorPreset;
|
|
3687
|
+
/** The unrotated frame (`a:off`, `a:ext`); `rotate`, `flipH` and `flipV` place the preset's path in it, as DrawingML does. */
|
|
3688
|
+
box: LayoutBox;
|
|
3689
|
+
rotate?: 90 | 270;
|
|
3690
|
+
flipH?: true;
|
|
3691
|
+
flipV?: true;
|
|
3692
|
+
/** OPF adjust values (fractions of the frame's width) and the same as DrawingML's `a:avLst` integers. */
|
|
3693
|
+
adjust: Record<string, number>;
|
|
3694
|
+
avLst: Record<string, number>;
|
|
3695
|
+
/** The route in slide coordinates: one open path (fill none) with its ends, as a shape's paths. Empty while the geometry loads. */
|
|
3696
|
+
paths: ComposedShapePath[];
|
|
3697
|
+
/** The bounds of the route. */
|
|
3698
|
+
bounds: LayoutBox;
|
|
3699
|
+
from: ConnectorEnd;
|
|
3700
|
+
to: ConnectorEnd;
|
|
3701
|
+
stroke?: ComposedStroke;
|
|
3702
|
+
alt?: string;
|
|
3703
|
+
decorative?: true;
|
|
3704
|
+
hidden?: true;
|
|
3705
|
+
}
|
|
3706
|
+
/** An entry of `SlideComposition.overlayShapes`, in draw order. */
|
|
3707
|
+
type ComposedOverlayEntry = ComposedOverlayShape | ComposedConnector;
|
|
3708
|
+
/** 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. */
|
|
3709
|
+
declare function slideBlockIds(slide: unknown, slidePath: string): Map<string, string>;
|
|
3710
|
+
/** A validation issue of a slide's `shapes` (schema-check reports them); `code` absent means an opf/schema error. */
|
|
3711
|
+
interface OverlayIssue {
|
|
3712
|
+
path: string;
|
|
3713
|
+
message: string;
|
|
3714
|
+
code?: 'shape-anchor-missing' | 'connector-end-missing';
|
|
3715
|
+
params: Record<string, unknown>;
|
|
3716
|
+
}
|
|
2234
3717
|
/**
|
|
2235
|
-
*
|
|
2236
|
-
*
|
|
2237
|
-
*
|
|
2238
|
-
* the preview and the PPTX export, which both pass their own `surface`, accent and text roles, draw and write the same color. An
|
|
2239
|
-
* unresolved surface is white, an unresolved accent black, an unresolved text color the surface's best contrast partner.
|
|
3718
|
+
* 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
|
|
3719
|
+
* (opf/shape-anchor-missing), a connector end that names no block or overlay shape of the slide (opf/connector-end-missing) and a site index
|
|
3720
|
+
* the end's shape does not have (opf/schema). `slidePath` is the slide's JSON Pointer (`/slides/0`).
|
|
2240
3721
|
*/
|
|
2241
|
-
declare function
|
|
3722
|
+
declare function overlayIssues(slide: unknown, slidePath: string): OverlayIssue[];
|
|
2242
3723
|
|
|
2243
3724
|
/** 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
3725
|
interface QuoteMarks {
|
|
@@ -2680,6 +4161,8 @@ declare function slideCitations(slide: unknown, slideIndex: number, presentation
|
|
|
2680
4161
|
/** Fits a string or TextRun[] into a box at a requested size (composeSlide supplies its placed fitter). */
|
|
2681
4162
|
type AnnotationFitter = (value: RichText, box: LayoutBox, requestedSize: number, minFontSize: number, path: string, alignment: CaptionAlignment) => TextFit | RichTextFit;
|
|
2682
4163
|
interface AnnotationLayoutOptions {
|
|
4164
|
+
/** LH-138: a caption that reads "Name: detail" draws its name in bold (a picture's caption; see `splitCaptionName`). */
|
|
4165
|
+
nameDetail?: boolean;
|
|
2683
4166
|
scale: number;
|
|
2684
4167
|
minFontSize: number;
|
|
2685
4168
|
fit: AnnotationFitter;
|
|
@@ -2703,6 +4186,16 @@ interface ComposedCaption {
|
|
|
2703
4186
|
overflow: boolean;
|
|
2704
4187
|
diagnostics: LayoutDiagnostic[];
|
|
2705
4188
|
}
|
|
4189
|
+
/** 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"). */
|
|
4190
|
+
declare const RUN_IN_HEADING_CHARS = 40;
|
|
4191
|
+
/**
|
|
4192
|
+
* 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
|
|
4193
|
+
* 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
|
|
4194
|
+
* 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
|
|
4195
|
+
* evidence ...") draws the label in bold, as a picture's caption does (`splitCaptionName`). The runs keep every character of the text, so the words,
|
|
4196
|
+
* 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.
|
|
4197
|
+
*/
|
|
4198
|
+
declare function runInHeading(text: string): RichText | undefined;
|
|
2706
4199
|
/** Reserve a caption band in `box` (the payload box) and return the band and the media box. */
|
|
2707
4200
|
declare function layoutCaption(value: unknown, box: LayoutBox, path: string, options: AnnotationLayoutOptions): ComposedCaption | undefined;
|
|
2708
4201
|
/** One listed note in a slide's footnote area. */
|
|
@@ -2785,6 +4278,12 @@ interface DiagramIssue {
|
|
|
2785
4278
|
declare function diagramPayload(value: unknown): DiagramPayload | undefined;
|
|
2786
4279
|
/** The share of the readability floor the smallest secondary label of a diagram keeps (its node labels keep the whole floor). */
|
|
2787
4280
|
declare const DIAGRAM_SECONDARY_FLOOR = 0.75;
|
|
4281
|
+
/**
|
|
4282
|
+
* SH-07: the diagram types (pele's names, ComposedDiagram.type) the PPTX export writes as native shapes and connectors with
|
|
4283
|
+
* `diagrams: "shapes"`: each passed its comparison of PowerPoint's drawing with the preview (docs/diagrams.md#exports). Every other type
|
|
4284
|
+
* stays a picture there and reports the info finding `diagram-shapes-unavailable`.
|
|
4285
|
+
*/
|
|
4286
|
+
declare const DIAGRAM_SHAPE_FAMILIES: readonly string[];
|
|
2788
4287
|
/** The diagram's own size limits, below pele's defaults: a slide holds one readable drawing, not a document. */
|
|
2789
4288
|
declare const DIAGRAM_SOURCE_LIMIT = 20000;
|
|
2790
4289
|
declare const DIAGRAM_MAX_EDGES = 500;
|
|
@@ -2853,11 +4352,21 @@ interface ComposedDiagram {
|
|
|
2853
4352
|
alt: string;
|
|
2854
4353
|
/** True when the diagram only fits below the readability floor: it is drawn smaller to stay inside its block. */
|
|
2855
4354
|
overflow?: boolean;
|
|
4355
|
+
/**
|
|
4356
|
+
* LH-185: set when the written direction did not hold the labels at the floor and the other main direction was tried. `turned` is
|
|
4357
|
+
* true when the drawing is in `to` (the labels fit there); false when neither did and the drawing stays as written, scaled.
|
|
4358
|
+
*/
|
|
4359
|
+
direction?: {
|
|
4360
|
+
from: string;
|
|
4361
|
+
to: string;
|
|
4362
|
+
turned: boolean;
|
|
4363
|
+
};
|
|
2856
4364
|
}
|
|
2857
4365
|
/**
|
|
2858
4366
|
* 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
4367
|
* 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,
|
|
4368
|
+
* 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
|
|
4369
|
+
* direction (LH-185, `direction`); when neither holds the labels at the floor, the drawing as written at the floor is scaled
|
|
2861
4370
|
* down to fit and marked `overflow`. Throws the diagram's issue (checkDiagram) when the source cannot be drawn.
|
|
2862
4371
|
*/
|
|
2863
4372
|
declare function layoutDiagram(value: unknown, options: DiagramLayoutOptions): ComposedDiagram;
|
|
@@ -2921,11 +4430,14 @@ declare function diagramPalette(input: DiagramPaletteInput): DiagramPalette;
|
|
|
2921
4430
|
/**
|
|
2922
4431
|
* A composed diagram as a self-contained SVG document in `palette`: every CSS variable and color-mix resolved, styles moved to
|
|
2923
4432
|
* 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.
|
|
4433
|
+
* host draws in) over the drawing's own viewBox, with `alt` as its title. Labels stay text in the palette's fonts. With `classes`,
|
|
4434
|
+
* pele's classes stay on the elements (SH-07: the PPTX export tells nodes, edges and labels apart by them); the drawing is the same.
|
|
2925
4435
|
*/
|
|
2926
4436
|
declare function paintDiagram(diagram: Pick<ComposedDiagram, 'svg' | 'width' | 'height' | 'alt'>, palette: DiagramPalette, size: {
|
|
2927
4437
|
width: number;
|
|
2928
4438
|
height: number;
|
|
4439
|
+
}, options?: {
|
|
4440
|
+
classes?: boolean;
|
|
2929
4441
|
}): string;
|
|
2930
4442
|
/**
|
|
2931
4443
|
* A composed diagram painted as an SVG group for a host's own SVG (a slide): the content of paintDiagram, translated to `box` and
|
|
@@ -2939,6 +4451,186 @@ declare function paintDiagramGroup(diagram: Pick<ComposedDiagram, 'svg' | 'width
|
|
|
2939
4451
|
height: number;
|
|
2940
4452
|
}): string;
|
|
2941
4453
|
|
|
4454
|
+
/** The viewBox every resolved icon is drawn in (its larger side is scaled to fit, centered). */
|
|
4455
|
+
declare const ICON_VIEWBOX = 24;
|
|
4456
|
+
/** An icon reference as written: a set's icon, a deck-local icon or an SVG source. */
|
|
4457
|
+
type IconReference = {
|
|
4458
|
+
kind: 'set';
|
|
4459
|
+
set: string;
|
|
4460
|
+
name: string;
|
|
4461
|
+
} | {
|
|
4462
|
+
kind: 'deck';
|
|
4463
|
+
name: string;
|
|
4464
|
+
} | {
|
|
4465
|
+
kind: 'source';
|
|
4466
|
+
src: string;
|
|
4467
|
+
};
|
|
4468
|
+
/** Parse an `icon` value; undefined when it is none of the three forms. */
|
|
4469
|
+
declare function parseIconReference(value: unknown): IconReference | undefined;
|
|
4470
|
+
/** One icon of a set record: its path data (drawn as the set's style) or its stroked and filled parts. */
|
|
4471
|
+
type IconSetIcon = string | {
|
|
4472
|
+
stroke?: string;
|
|
4473
|
+
fill?: string;
|
|
4474
|
+
};
|
|
4475
|
+
/** An icon-set record (https://openpresentation.org/schema/opf-icon-set/v1), embedded or registered. */
|
|
4476
|
+
interface IconSetRecord {
|
|
4477
|
+
name: string;
|
|
4478
|
+
license: string;
|
|
4479
|
+
copyright: string;
|
|
4480
|
+
viewBox: readonly [number, number, number, number];
|
|
4481
|
+
style: 'stroke' | 'fill';
|
|
4482
|
+
strokeWidth?: number;
|
|
4483
|
+
strokeLinecap?: 'butt' | 'round' | 'square';
|
|
4484
|
+
strokeLinejoin?: 'miter' | 'round' | 'bevel';
|
|
4485
|
+
icons: Readonly<Record<string, IconSetIcon>>;
|
|
4486
|
+
tags?: Readonly<Record<string, readonly string[]>>;
|
|
4487
|
+
summary?: string;
|
|
4488
|
+
version?: string;
|
|
4489
|
+
package?: string;
|
|
4490
|
+
homepage?: string;
|
|
4491
|
+
licenseText?: string;
|
|
4492
|
+
}
|
|
4493
|
+
/** A registered catalog's set: its record, or a function that loads it (a module whose default export is the record also does). */
|
|
4494
|
+
type IconSetLoader = () => Promise<unknown>;
|
|
4495
|
+
/** A path command in absolute coordinates: every SVG command is normalized to these four. */
|
|
4496
|
+
type IconCommand = ['M', number, number] | ['L', number, number] | ['C', number, number, number, number, number, number] | ['Z'];
|
|
4497
|
+
/** One part of a monochrome icon: filled (nonzero, or even-odd), stroked at `stroke` viewBox units, or both, in the one ink. */
|
|
4498
|
+
interface IconPart {
|
|
4499
|
+
commands: IconCommand[];
|
|
4500
|
+
fill?: true;
|
|
4501
|
+
evenOdd?: true;
|
|
4502
|
+
stroke?: number;
|
|
4503
|
+
linecap?: 'butt' | 'round' | 'square';
|
|
4504
|
+
linejoin?: 'miter' | 'round' | 'bevel';
|
|
4505
|
+
}
|
|
4506
|
+
/** A resolved icon: a monochrome glyph (`parts`, in a 0 0 24 24 viewBox) or a multicolor SVG `picture` with its own colors. */
|
|
4507
|
+
interface ResolvedIcon {
|
|
4508
|
+
/** The reference as written. */
|
|
4509
|
+
reference: string;
|
|
4510
|
+
kind: IconReference['kind'];
|
|
4511
|
+
/** `set` for a set's icon (with `name`), the deck-local name, or the source. */
|
|
4512
|
+
set?: string;
|
|
4513
|
+
name: string;
|
|
4514
|
+
parts?: IconPart[];
|
|
4515
|
+
/** A multicolor SVG (sanitized: no script, external reference or raster), drawn contained in the icon's box, with its aspect. */
|
|
4516
|
+
picture?: {
|
|
4517
|
+
svg: string;
|
|
4518
|
+
width: number;
|
|
4519
|
+
height: number;
|
|
4520
|
+
};
|
|
4521
|
+
/** The set's license and copyright, for a set's icon. */
|
|
4522
|
+
license?: string;
|
|
4523
|
+
copyright?: string;
|
|
4524
|
+
}
|
|
4525
|
+
type IconResolution = {
|
|
4526
|
+
ok: true;
|
|
4527
|
+
icon: ResolvedIcon;
|
|
4528
|
+
} | {
|
|
4529
|
+
ok: false;
|
|
4530
|
+
code: 'icon-unknown' | 'icon-invalid' | 'icon-unloaded';
|
|
4531
|
+
message: string;
|
|
4532
|
+
suggestions?: string[];
|
|
4533
|
+
};
|
|
4534
|
+
/**
|
|
4535
|
+
* SVG path data as absolute M, L, C and Z commands (H and V become lines, S, Q and T cubic curves, arcs cubic curves of at most a
|
|
4536
|
+
* quarter turn each). Throws a RangeError for path data that is not well formed.
|
|
4537
|
+
*/
|
|
4538
|
+
declare function iconPathCommands(d: string): IconCommand[];
|
|
4539
|
+
/** Path commands as SVG path data (what the preview draws). */
|
|
4540
|
+
declare function iconPathData(commands: readonly IconCommand[]): string;
|
|
4541
|
+
/** The commands placed in `box` (canvas pixels) from the 0 0 24 24 icon viewBox. */
|
|
4542
|
+
declare function placeIconCommands(commands: readonly IconCommand[], box: {
|
|
4543
|
+
x: number;
|
|
4544
|
+
y: number;
|
|
4545
|
+
width: number;
|
|
4546
|
+
height: number;
|
|
4547
|
+
}): IconCommand[];
|
|
4548
|
+
/**
|
|
4549
|
+
* An author's or an LLM's SVG as an icon. A script, an event handler, an external reference (`href`, `url()` or `@import` that is not
|
|
4550
|
+
* a fragment) or a raster refuses it (`icon-invalid`): nothing is fetched or run. An SVG whose shapes (path, circle, ellipse, rect,
|
|
4551
|
+
* line, polyline, polygon, in groups with transforms) are drawn in one paint (a color or `currentColor`, opacity 1) is a monochrome
|
|
4552
|
+
* glyph: its shapes become path commands in the 0 0 24 24 viewBox (normalized from its own viewBox, or its width and height), drawn in
|
|
4553
|
+
* the accent. Any other SVG (several colors, gradients, text, opacity) is a picture with its own colors.
|
|
4554
|
+
*/
|
|
4555
|
+
declare function iconFromSvg(text: string): {
|
|
4556
|
+
ok: true;
|
|
4557
|
+
parts?: IconPart[];
|
|
4558
|
+
picture?: ResolvedIcon['picture'];
|
|
4559
|
+
} | {
|
|
4560
|
+
ok: false;
|
|
4561
|
+
message: string;
|
|
4562
|
+
};
|
|
4563
|
+
/** Every `icon` value of a document (or a slide), with its dotted path: list entries, metrics and groups at any depth. */
|
|
4564
|
+
declare function documentIcons(input: unknown): {
|
|
4565
|
+
path: string;
|
|
4566
|
+
value: unknown;
|
|
4567
|
+
}[];
|
|
4568
|
+
/** Up to `limit` names nearest to `name`: names that contain it or that it contains first, then the fewest edits. */
|
|
4569
|
+
declare function nearIconNames(name: string, names: Iterable<string>, limit?: number): string[];
|
|
4570
|
+
interface IconOptions {
|
|
4571
|
+
/** The catalogs the host registered: their `iconSets` (records or loaders) are where `<set>:<name>` resolves after the document's own. */
|
|
4572
|
+
catalogs?: readonly unknown[];
|
|
4573
|
+
}
|
|
4574
|
+
/**
|
|
4575
|
+
* Resolve one `icon` value. The order: a deck-local name in the document's `icons`; a set's icon in the sets the document embeds
|
|
4576
|
+
* (`catalogs.<group>.iconSets`), then in the registered catalogs' sets (records, or the sets ensureIcons loaded); a source through
|
|
4577
|
+
* the document's assets, as a data URI or the text ensureIcons read. `icon-unknown` (with near names) when the set or name is not
|
|
4578
|
+
* found, `icon-invalid` for a value or an SVG that cannot be an icon, `icon-unloaded` for a registered set or a source that
|
|
4579
|
+
* ensureIcons has not loaded yet (not a problem of the document).
|
|
4580
|
+
*/
|
|
4581
|
+
declare function resolveIcon(document: unknown, value: unknown, options?: IconOptions): IconResolution;
|
|
4582
|
+
/** What ensureIcons loads: the registered sets the document names that are not loaded yet, and the SVG files it has not read. */
|
|
4583
|
+
declare function iconsPending(document: unknown, options?: IconOptions): {
|
|
4584
|
+
sets: string[];
|
|
4585
|
+
sources: string[];
|
|
4586
|
+
};
|
|
4587
|
+
/**
|
|
4588
|
+
* Load what a document's icons need before the synchronous code reads them: each registered set it names that is a loader (the
|
|
4589
|
+
* gallery's sets load on first use, so a deck that draws no icon never loads one), and, with `readSource`, each SVG file it names (an
|
|
4590
|
+
* asset, a relative path or an HTTPS URL; core never fetches by itself). Resolves with the sets and sources it loaded. Cheap when
|
|
4591
|
+
* nothing is pending. opf-pptx's `toPptx`, the renderer's browser fonts handle, core's Node file API, the CLI and the MCP call it.
|
|
4592
|
+
*/
|
|
4593
|
+
declare function ensureIcons(document: unknown, options?: IconOptions & {
|
|
4594
|
+
readSource?: (source: string) => Promise<string | Uint8Array | undefined>;
|
|
4595
|
+
}): Promise<{
|
|
4596
|
+
sets: string[];
|
|
4597
|
+
sources: string[];
|
|
4598
|
+
}>;
|
|
4599
|
+
/**
|
|
4600
|
+
* Embed the set icons a document uses: each set's icons it names go under `catalogs.default.iconSets.<id>` (the set's license,
|
|
4601
|
+
* copyright, viewBox and style, and only those icons), so the document draws them with no registered catalog. The group is the one
|
|
4602
|
+
* the set's catalog is the source of: `default` when the document's default has that source or names none (it is then given the
|
|
4603
|
+
* source), else `custom`. A registered set embeds once it is loaded (ensureIcons). Returns a copy, and the `<set>:<name>` added.
|
|
4604
|
+
*/
|
|
4605
|
+
declare function embedIcons(document: unknown, options?: IconOptions): {
|
|
4606
|
+
document: unknown;
|
|
4607
|
+
added: string[];
|
|
4608
|
+
};
|
|
4609
|
+
/** The color of an icon's chip or glyph: the slide's primary with a DrawingML luminance transform, or a scheme slot. */
|
|
4610
|
+
interface IconPaint {
|
|
4611
|
+
hex: string;
|
|
4612
|
+
role: 'primary' | 'bg1' | 'tx1';
|
|
4613
|
+
lumMod?: number;
|
|
4614
|
+
lumOff?: number;
|
|
4615
|
+
}
|
|
4616
|
+
/** LH-14: on a light slide the chip is the primary lightened to 20% of its luminance plus 80% (PowerPoint's "Lighter 80%"). */
|
|
4617
|
+
declare const ICON_CHIP_TINT: {
|
|
4618
|
+
readonly lumMod: 20000;
|
|
4619
|
+
readonly lumOff: 80000;
|
|
4620
|
+
};
|
|
4621
|
+
/** The least contrast of an icon's glyph against its chip (WCAG 1.4.11, graphical objects). */
|
|
4622
|
+
declare const ICON_MIN_CONTRAST = 3;
|
|
4623
|
+
/**
|
|
4624
|
+
* LH-14: the chip and glyph colors of an icon, as Claude Design draws an icon chip. On a light slide: a chip in a light tint of the
|
|
4625
|
+
* primary (ICON_CHIP_TINT) with the glyph in the primary; on a dark one the inverse: a primary chip with the glyph in the scheme
|
|
4626
|
+
* color that reads best on it (readableSchemeColor). A glyph under ICON_MIN_CONTRAST against its chip takes the text color instead.
|
|
4627
|
+
* The export writes the primary as its theme accent with the same transform, so the icon recolors with the theme.
|
|
4628
|
+
*/
|
|
4629
|
+
declare function iconColors(roles: Pick<ResolvedColorRoles, 'primary' | 'text' | 'background'>, dark: boolean): {
|
|
4630
|
+
chip: IconPaint;
|
|
4631
|
+
glyph: IconPaint;
|
|
4632
|
+
};
|
|
4633
|
+
|
|
2942
4634
|
/** The chart constructs the engines draw. Every catalog chart type id resolves to one (see `chartOptionTarget`). */
|
|
2943
4635
|
/** `combo` (FA-15) draws clustered columns and line series in one plot, the lines optionally on a secondary value axis. */
|
|
2944
4636
|
type ChartOptionKind = 'bar' | 'line' | 'area' | 'pie' | 'doughnut' | 'scatter' | 'radar' | 'treemap' | 'histogram' | 'pareto' | 'box' | 'waterfall' | 'funnel' | 'map' | 'combo';
|
|
@@ -3090,6 +4782,18 @@ declare function groupsAxisTicks(axis: {
|
|
|
3090
4782
|
}): boolean;
|
|
3091
4783
|
/** The number format code PowerPoint prints a grouping series' labels with, as `groupNumber` does (its separators follow the viewer's region). */
|
|
3092
4784
|
declare const GROUPED_LABEL_CODE = "#,##0";
|
|
4785
|
+
/**
|
|
4786
|
+
* LH-153: whether a value axis the engines do not compose (a combo chart's axes, a scatter chart's, the chartex constructs': waterfall,
|
|
4787
|
+
* histogram, pareto, box and whisker) groups its tick labels, decided from its data alone so the preview and PowerPoint (which picks its own
|
|
4788
|
+
* ticks) agree: every value is a whole number, one reaches four digits (`groupsThousands`) and the values span at least `minRange` (default
|
|
4789
|
+
* 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,
|
|
4790
|
+
* 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
|
|
4791
|
+
* four-digit whole number that must not read "1,990".
|
|
4792
|
+
*/
|
|
4793
|
+
declare function groupsDataRange(values: readonly (number | null | undefined)[], options?: {
|
|
4794
|
+
zeroBased?: boolean;
|
|
4795
|
+
minRange?: number;
|
|
4796
|
+
}): boolean;
|
|
3093
4797
|
|
|
3094
4798
|
interface Box {
|
|
3095
4799
|
x: number;
|
|
@@ -3163,7 +4867,7 @@ declare function chartCategoriesInTime(labels: readonly unknown[], options?: {
|
|
|
3163
4867
|
declare function monthOf(text: unknown, language?: string): number | undefined;
|
|
3164
4868
|
|
|
3165
4869
|
/** 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';
|
|
4870
|
+
type ChartFallback = 'map-as-columns' | 'pareto-as-columns' | 'box-per-series' | 'nested-rings' | 'scatter-by-position';
|
|
3167
4871
|
/** How the engines draw a chart: the construct and the data they plot. */
|
|
3168
4872
|
interface ChartDrawPlan {
|
|
3169
4873
|
/** The catalog chart type the engines draw: the authored one, or its fallback (`column` for a map, `doughnut` for a pie of several series). */
|
|
@@ -3193,6 +4897,9 @@ declare function isPlaceLabel(label: unknown, language?: string): boolean;
|
|
|
3193
4897
|
*
|
|
3194
4898
|
* - **Map over categories that are not places** (`map-as-columns`): a `world` chart whose category labels are fewer than half places
|
|
3195
4899
|
* ({@link isPlaceLabel}) is drawn as clustered columns, every series kept. A map needs places to plot; Q1 to Q4 would be empty tiles.
|
|
4900
|
+
* - **Several series on a Pareto chart** (`pareto-as-columns`, LH-175): a Pareto chart sorts one series and draws its cumulative share,
|
|
4901
|
+
* so two or more series that hold numbers (Current and Baseline by quarter) are drawn as clustered columns in data order, every series
|
|
4902
|
+
* kept, in the preview and in PowerPoint.
|
|
3196
4903
|
* - **One value per box-and-whisker category** (`box-per-series`): when no category label repeats (two rows or more), each box would be a
|
|
3197
4904
|
* single value. The rows are one group named after the category column, so each series is one box of its values across the categories.
|
|
3198
4905
|
* - **Several series on a pie or doughnut** (`nested-rings`): two or more series that hold numbers are drawn as a doughnut of one ring per
|
|
@@ -3200,8 +4907,8 @@ declare function isPlaceLabel(label: unknown, language?: string): boolean;
|
|
|
3200
4907
|
* - **Scatter whose X column holds no number** (`scatter-by-position`): the text column cannot be an X axis, so it is left out and every
|
|
3201
4908
|
* series is plotted against the category position (1, 2, 3, ...), like a scatter of one value column.
|
|
3202
4909
|
*
|
|
3203
|
-
* A construct that plots one series (treemap, histogram
|
|
3204
|
-
* first; the others are listed in `dropped`.
|
|
4910
|
+
* A construct that plots one series (treemap, histogram with categories, a Pareto chart of one numeric series, waterfall, funnel, map,
|
|
4911
|
+
* and pie) still draws only the first; the others are listed in `dropped`.
|
|
3205
4912
|
*/
|
|
3206
4913
|
declare function chartDrawPlan(chart: unknown, resolved: Extract<ResolvedChartData, {
|
|
3207
4914
|
ok: true;
|
|
@@ -3223,7 +4930,7 @@ declare function chartDrawDiagnostics(chart: unknown, resolved: ResolvedChartDat
|
|
|
3223
4930
|
declare function markLabelColor(fill: string, text: string, background?: string): string;
|
|
3224
4931
|
|
|
3225
4932
|
/** 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"];
|
|
4933
|
+
declare const LAYOUT_BODY_KINDS: readonly ["text", "list", "image", "video", "chart", "table", "code", "metric", "quote", "timeline", "diagram", "shape"];
|
|
3227
4934
|
type LayoutBodyKind = typeof LAYOUT_BODY_KINDS[number];
|
|
3228
4935
|
/** What a layout template holds, derived from its regions. */
|
|
3229
4936
|
interface LayoutContent {
|
|
@@ -3393,6 +5100,14 @@ declare const EYEBROW_TEXT_KIND = "text:eyebrow";
|
|
|
3393
5100
|
* full stop at its end. A single character ("A", "1") is a marker or a placeholder, not a name.
|
|
3394
5101
|
*/
|
|
3395
5102
|
declare function isLabelText(value: unknown): boolean;
|
|
5103
|
+
/** 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). */
|
|
5104
|
+
declare const ROW_LABEL_WORDS = 6;
|
|
5105
|
+
declare const ROW_LABEL_CHARS = 48;
|
|
5106
|
+
/**
|
|
5107
|
+
* 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
|
|
5108
|
+
* characters and at most ROW_LABEL_WORDS words, with no full stop at its end ("Live in 8 weeks", "Proven at our scale").
|
|
5109
|
+
*/
|
|
5110
|
+
declare function rowLabel(value: unknown): boolean;
|
|
3396
5111
|
/**
|
|
3397
5112
|
* 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
5113
|
* 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 +5245,11 @@ interface LayoutDiagnostic {
|
|
|
3530
5245
|
/**
|
|
3531
5246
|
* OPF 0.19 adds the content-binding codes of template layouts: `region-unknown`, `region-kind` and `region-full` for an
|
|
3532
5247
|
* ignored `region` pin, and `layout-unplaced` for a block no region had room for (drawn anyway; `paginate` moves it).
|
|
5248
|
+
* LH-14: `icon-dropped` for an icon the slide has no room for without setting text smaller: the text stays, the chip is not drawn.
|
|
5249
|
+
* SH-09: `arrangement-adapted` for a pyramid or matrix drawn another way: a matrix of other than four entries as cards, or a list the
|
|
5250
|
+
* arrangement's designs cannot hold at the list's size (or of a shape it does not draw) as a list.
|
|
3533
5251
|
*/
|
|
3534
|
-
code: "text-overflow" | "small-cell" | "unresolved-content" | "unsupported-image-treatment" | "numbering-adapted" | "region-unknown" | "region-kind" | "region-full" | "layout-unplaced" | "emphasis-ignored";
|
|
5252
|
+
code: "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";
|
|
3535
5253
|
path: string;
|
|
3536
5254
|
message: string;
|
|
3537
5255
|
/**
|
|
@@ -3704,6 +5422,11 @@ interface ComposedItem {
|
|
|
3704
5422
|
/** Optional visible card allocation; box and all accepted internals occupy its padded interior. */
|
|
3705
5423
|
frameBox?: LayoutBox;
|
|
3706
5424
|
text?: TextFit | RichTextFit | ListFit | CodeTextFit;
|
|
5425
|
+
/**
|
|
5426
|
+
* 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
|
|
5427
|
+
* bold. Engines draw and export these runs (`text` is their rich fit); absent, the block draws `value`.
|
|
5428
|
+
*/
|
|
5429
|
+
runs?: RichText;
|
|
3707
5430
|
textStyle?: TextStyle;
|
|
3708
5431
|
/** Complete accepted quote internals; consumers must reuse these fits and styles. */
|
|
3709
5432
|
quoteLayout?: QuoteLayout;
|
|
@@ -3725,6 +5448,8 @@ interface ComposedItem {
|
|
|
3725
5448
|
caption?: ComposedCaption;
|
|
3726
5449
|
/** Picture geometry and treatments of an image item (`field` image); absent on every other item. */
|
|
3727
5450
|
image?: ComposedImage;
|
|
5451
|
+
/** 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. */
|
|
5452
|
+
shape?: ComposedShape;
|
|
3728
5453
|
/**
|
|
3729
5454
|
* RR-92: the value axis of a column, bar, line or area chart (`field` chart), computed from the chart box (`chartValueAxis`). The preview
|
|
3730
5455
|
* 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 +5552,13 @@ interface ComposedEmphasis {
|
|
|
3827
5552
|
*/
|
|
3828
5553
|
interface ComposedSteps {
|
|
3829
5554
|
form: 'row' | 'column' | 'flow' | 'tiles';
|
|
3830
|
-
/**
|
|
5555
|
+
/**
|
|
5556
|
+
* 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
|
|
5557
|
+
* 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
|
|
5558
|
+
* (`numeral`) or LH-162's accent dots (a badge with an empty label).
|
|
5559
|
+
*/
|
|
3831
5560
|
region: string;
|
|
3832
|
-
/** `row`: the region's first block; `column`, `flow` and `tiles`: the list's payload path. */
|
|
5561
|
+
/** `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
5562
|
path: string;
|
|
3834
5563
|
badges: ComposedStepBadge[];
|
|
3835
5564
|
connector?: {
|
|
@@ -3849,6 +5578,62 @@ interface ComposedSteps {
|
|
|
3849
5578
|
}[];
|
|
3850
5579
|
lineWidth: number;
|
|
3851
5580
|
}
|
|
5581
|
+
/**
|
|
5582
|
+
* SH-09: one pyramid or matrix of an `arrangement` region (layout record), in canvas pixels: a lone list of one level whose entries are
|
|
5583
|
+
* the nodes (arrangements.ts has the geometry, PowerPoint's Basic Pyramid and Basic Matrix). Each entry is a list column
|
|
5584
|
+
* (ComposedItem.listColumns) centered in its node's text rectangle at `fontSize`, the list's size or larger. Engines draw, under the
|
|
5585
|
+
* text: the matrix's `background` diamond, then every node (a matrix's empty quadrants too) filled in the primary color with a
|
|
5586
|
+
* `lineWidth` outline in the background color (arrangementPaint). `smartArt` holds what the PPTX export checks against the domain
|
|
5587
|
+
* PowerPoint was compared on (smartArtUnavailable): each entry's line count and whether its line breaks hold when its width changes by
|
|
5588
|
+
* SMART_ART_DOMAIN.slack.
|
|
5589
|
+
*/
|
|
5590
|
+
interface ComposedArrangement {
|
|
5591
|
+
kind: Arrangement;
|
|
5592
|
+
/**
|
|
5593
|
+
* `smartart`: PowerPoint's Basic Pyramid or Basic Matrix geometry (the PPTX export may write it as live SmartArt); `opf`: OPF's own design
|
|
5594
|
+
* of the arrangement (a stepped pyramid with the entries beside it, or four quadrants filling the region); `cards`: a matrix of other
|
|
5595
|
+
* than four entries, as a grid of cards. Only `smartart` has a `background` diamond (a matrix).
|
|
5596
|
+
*/
|
|
5597
|
+
design: 'smartart' | 'opf' | 'cards';
|
|
5598
|
+
/** 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). */
|
|
5599
|
+
instead?: string;
|
|
5600
|
+
/** The entries' alignment in their text rectangles: centered on their nodes, or at the start edge (beside a level, in a card). */
|
|
5601
|
+
align: 'center' | 'start';
|
|
5602
|
+
/** The nodes' paint: the primary with a background-colored outline (arrangementPaint), or the card neutral with its border (a card grid). */
|
|
5603
|
+
paint: 'primary' | 'card';
|
|
5604
|
+
/** 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). */
|
|
5605
|
+
text: 'node' | 'slide';
|
|
5606
|
+
region: string;
|
|
5607
|
+
/** The list's payload path. */
|
|
5608
|
+
path: string;
|
|
5609
|
+
frame: LayoutBox;
|
|
5610
|
+
/** The matrix's diamond (its square). */
|
|
5611
|
+
background?: LayoutBox;
|
|
5612
|
+
/** The nodes in order (a matrix always has four); `path` is the entry's text path, absent for an empty quadrant. */
|
|
5613
|
+
nodes: (ArrangementNode & {
|
|
5614
|
+
path?: string;
|
|
5615
|
+
})[];
|
|
5616
|
+
/** 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). */
|
|
5617
|
+
arrows?: ArrangementArrow[];
|
|
5618
|
+
fontSize: number;
|
|
5619
|
+
/** The text inset inside each node's text rectangle (ARRANGEMENT_TEXT_MARGIN of the size). */
|
|
5620
|
+
textMargin: number;
|
|
5621
|
+
/** SH-17: the text insets (left, top, right, bottom) where they differ by side (a chevron's start); absent: `textMargin` on every side. */
|
|
5622
|
+
margins?: [number, number, number, number];
|
|
5623
|
+
lineWidth: number;
|
|
5624
|
+
smartArt: {
|
|
5625
|
+
lines: number[];
|
|
5626
|
+
stable: boolean[];
|
|
5627
|
+
fill?: number;
|
|
5628
|
+
ink?: number;
|
|
5629
|
+
widest?: number;
|
|
5630
|
+
};
|
|
5631
|
+
/**
|
|
5632
|
+
* SH-19: OPF's own design (`opf`, `cards`): the inputs that draw it for any count (smart-art-layout.ts opfLayoutGeometry), from which the
|
|
5633
|
+
* PPTX export writes OPF's SmartArt layout definition of it.
|
|
5634
|
+
*/
|
|
5635
|
+
layout?: OpfLayoutRecipe;
|
|
5636
|
+
}
|
|
3852
5637
|
/**
|
|
3853
5638
|
* LH-07: one numbered circle of a sequence (`ComposedSteps.badges`); `path` is the step's block (`row`) or list entry (`column`).
|
|
3854
5639
|
* `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 +5665,86 @@ interface ComposedStepBadge {
|
|
|
3880
5665
|
/** LH-134: a numeral beside a ruled row: the line box of its text, drawn without a circle. */
|
|
3881
5666
|
numeral?: LayoutBox;
|
|
3882
5667
|
}
|
|
5668
|
+
/**
|
|
5669
|
+
* LH-14: one icon the slide draws (`SlideComposition.icons`), on a chip as Claude Design draws one: a circle of `radius` around
|
|
5670
|
+
* (`cx`, `cy`) in `colors.chip`, and the glyph in `box` (ICON_GLYPH of the chip's diameter, centered on it). A monochrome icon is
|
|
5671
|
+
* `parts`, path commands already placed in canvas pixels (each filled, stroked at `stroke` canvas pixels with its caps and joins, or
|
|
5672
|
+
* both) in `colors.glyph`; a multicolor SVG is `picture`, drawn contained in `box` with its own colors. `path` is the `icon` field's
|
|
5673
|
+
* path, `owner` the list entry, metric or group it marks. Paint order: after the cards and surfaces, before the text.
|
|
5674
|
+
*/
|
|
5675
|
+
interface ComposedIcon {
|
|
5676
|
+
path: string;
|
|
5677
|
+
owner: string;
|
|
5678
|
+
reference: string;
|
|
5679
|
+
chip: {
|
|
5680
|
+
cx: number;
|
|
5681
|
+
cy: number;
|
|
5682
|
+
radius: number;
|
|
5683
|
+
};
|
|
5684
|
+
box: LayoutBox;
|
|
5685
|
+
parts?: IconPart[];
|
|
5686
|
+
picture?: {
|
|
5687
|
+
svg: string;
|
|
5688
|
+
width: number;
|
|
5689
|
+
height: number;
|
|
5690
|
+
};
|
|
5691
|
+
colors: {
|
|
5692
|
+
chip: IconPaint;
|
|
5693
|
+
glyph: IconPaint;
|
|
5694
|
+
};
|
|
5695
|
+
}
|
|
5696
|
+
/**
|
|
5697
|
+
* 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
|
|
5698
|
+
* 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.
|
|
5699
|
+
*/
|
|
5700
|
+
declare const ICON_CHIP = 1.75;
|
|
5701
|
+
declare const ICON_GLYPH = 0.55;
|
|
5702
|
+
/**
|
|
5703
|
+
* 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
|
|
5704
|
+
* taller than a line: what a slide draws when the full chips (the guarded rule `icon-chips`) would set a block smaller.
|
|
5705
|
+
*/
|
|
5706
|
+
declare const ICON_CHIP_COMPACT = 1.22;
|
|
5707
|
+
/** 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. */
|
|
5708
|
+
declare const ICON_CHIP_GAP = 0.3;
|
|
5709
|
+
/** 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. */
|
|
5710
|
+
declare const METRIC_ICON_TEXT = 24;
|
|
3883
5711
|
/** LH-137: the check-mark tiles of a summary list: the fewest and most entries, and the longest entry in characters. */
|
|
3884
5712
|
declare const CHECK_TILE_MIN = 2;
|
|
3885
5713
|
declare const CHECK_TILE_MAX = 6;
|
|
3886
5714
|
declare const CHECK_TILE_MAX_CHARACTERS = 90;
|
|
3887
5715
|
/** 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
5716
|
declare const CHECK_TILE_MAX_LINES = 2;
|
|
5717
|
+
/**
|
|
5718
|
+
* 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
|
|
5719
|
+
* ICON_CARD_LABEL_CHARACTERS and ICON_CARD_LABEL_WORDS words and an optional description of at most ICON_CARD_DESCRIPTION_CHARACTERS.
|
|
5720
|
+
*/
|
|
5721
|
+
declare const ICON_CARD_MIN = 2;
|
|
5722
|
+
declare const ICON_CARD_MAX = 8;
|
|
5723
|
+
declare const ICON_CARD_LABEL_CHARACTERS = 48;
|
|
5724
|
+
declare const ICON_CARD_LABEL_WORDS = 7;
|
|
5725
|
+
declare const ICON_CARD_DESCRIPTION_CHARACTERS = 160;
|
|
5726
|
+
/** 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. */
|
|
5727
|
+
declare const ICON_CARD_DESCRIPTION = 0.82;
|
|
5728
|
+
/**
|
|
5729
|
+
* 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
|
|
5730
|
+
* 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
|
|
5731
|
+
* to COMPACT_GRID_DISPLAY.
|
|
5732
|
+
*/
|
|
5733
|
+
declare const ICON_CARD_FILL = 0.8;
|
|
5734
|
+
/**
|
|
5735
|
+
* 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
|
|
5736
|
+
* 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.
|
|
5737
|
+
*/
|
|
5738
|
+
declare const TEXT_TILE_MIN = 4;
|
|
5739
|
+
declare const TEXT_TILE_MAX = 8;
|
|
5740
|
+
declare const TEXT_TILE_CHARACTERS = 90;
|
|
5741
|
+
declare const TEXT_TILE_LINES = 2;
|
|
5742
|
+
declare const TEXT_TILE_MARKER = 0.45;
|
|
5743
|
+
/**
|
|
5744
|
+
* LH-165, LH-162: the column counts of the balanced grids of `count` equal cards: two to four cards a row, at most four rows, every row
|
|
5745
|
+
* full but the last, which is at most one card short and never a lone card under full rows.
|
|
5746
|
+
*/
|
|
5747
|
+
declare function cardGridColumns(count: number): number[];
|
|
3889
5748
|
/**
|
|
3890
5749
|
* 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
5750
|
* 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 +5826,14 @@ interface ImageFocus {
|
|
|
3967
5826
|
x: number;
|
|
3968
5827
|
y: number;
|
|
3969
5828
|
}
|
|
3970
|
-
/**
|
|
5829
|
+
/**
|
|
5830
|
+
* 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;
|
|
5831
|
+
* `kind` and `preset` are the preset name.
|
|
5832
|
+
*/
|
|
3971
5833
|
interface ImageShape {
|
|
3972
|
-
kind:
|
|
3973
|
-
preset:
|
|
3974
|
-
/** DrawingML avLst guide values (for example adj
|
|
5834
|
+
kind: string;
|
|
5835
|
+
preset: string;
|
|
5836
|
+
/** DrawingML avLst guide values the block set (for example adj), in 1/100000 units or 60000ths of a degree. */
|
|
3975
5837
|
adjust: Record<string, number>;
|
|
3976
5838
|
path: string;
|
|
3977
5839
|
}
|
|
@@ -4033,12 +5895,9 @@ interface ComposedImage {
|
|
|
4033
5895
|
focus: ImageFocus;
|
|
4034
5896
|
/** Mask on the frame: a DrawingML preset with its guide values, and the same outline as an SVG path. */
|
|
4035
5897
|
shape: ImageShape;
|
|
4036
|
-
/**
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
width: number;
|
|
4040
|
-
};
|
|
4041
|
-
/** Picture opacity below 1; the border and overlay are not affected. */
|
|
5898
|
+
/** SH-02: the line along the shape outline (`stroke`, renamed from `border`); width in reference pixels, already scaled to the canvas. */
|
|
5899
|
+
stroke?: ComposedStroke;
|
|
5900
|
+
/** Picture opacity below 1; the stroke and overlay are not affected. */
|
|
4042
5901
|
opacity?: number;
|
|
4043
5902
|
/** Luminance-based recolor (Rec. 601 weights on sRGB values). */
|
|
4044
5903
|
recolor?: {
|
|
@@ -4090,6 +5949,8 @@ interface ComposedBackgroundImage {
|
|
|
4090
5949
|
scrims?: ComposedScrim[];
|
|
4091
5950
|
/** Present when core reads the picture's aspect ratio and the fit is not tile; otherwise call `fitImage` with the host's. */
|
|
4092
5951
|
picture?: ImageFitPlacement;
|
|
5952
|
+
/** LH-158: the background's `textPlacement`, when the author picked where a heading group goes on the picture (SlideComposition.pictureText). */
|
|
5953
|
+
textPlacement?: PictureTextPlacement;
|
|
4093
5954
|
}
|
|
4094
5955
|
/**
|
|
4095
5956
|
* The deck logo drawn on a cover or section slide, at the top-left of the free area and above the
|
|
@@ -4224,7 +6085,8 @@ interface SlideComposition {
|
|
|
4224
6085
|
* 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
6086
|
* well (no block smaller unless the layout overflows): `chart` holds the shortest plot height (chartPlotBox) of the layout's
|
|
4226
6087
|
* 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.
|
|
6088
|
+
* 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
|
|
6089
|
+
* icons draws its icon cards across the body under the heading (withCards), its text at least as large as in the layout.
|
|
4228
6090
|
*/
|
|
4229
6091
|
recomposed?: {
|
|
4230
6092
|
layoutSize: number;
|
|
@@ -4234,11 +6096,17 @@ interface SlideComposition {
|
|
|
4234
6096
|
plot: number;
|
|
4235
6097
|
};
|
|
4236
6098
|
kpis?: true;
|
|
6099
|
+
table?: true;
|
|
6100
|
+
cards?: true;
|
|
4237
6101
|
};
|
|
4238
6102
|
/** 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
6103
|
emphasis?: ComposedEmphasis;
|
|
4240
6104
|
/** LH-07: the step badges, connectors and flows of the slide's `sequence` regions, in reading order; absent when none draws. */
|
|
4241
6105
|
steps?: ComposedSteps[];
|
|
6106
|
+
/** LH-14: the icons the slide draws on chips (list entries, metrics, groups), in reading order; absent when none draws. */
|
|
6107
|
+
icons?: ComposedIcon[];
|
|
6108
|
+
/** SH-09: the pyramids and matrices of the slide's `arrangement` regions, in reading order; absent when none draws. */
|
|
6109
|
+
arrangements?: ComposedArrangement[];
|
|
4242
6110
|
/**
|
|
4243
6111
|
* 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
6112
|
* 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 +6117,14 @@ interface SlideComposition {
|
|
|
4249
6117
|
path: string;
|
|
4250
6118
|
box: LayoutBox;
|
|
4251
6119
|
};
|
|
6120
|
+
/**
|
|
6121
|
+
* LH-158: where the heading group of a sized title area (a cover, a section) sits on a picture background, with every candidate
|
|
6122
|
+
* placement and its score on the host's measured grid (`pictureLuminance`), so an editor or host can offer the others. Present when
|
|
6123
|
+
* the picture was measured or the background names a `textPlacement`; absent otherwise (the group then sits as wave 6 put it).
|
|
6124
|
+
*/
|
|
6125
|
+
pictureText?: PictureText;
|
|
6126
|
+
/** 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. */
|
|
6127
|
+
surface?: MessageSurface;
|
|
4252
6128
|
/**
|
|
4253
6129
|
* 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
6130
|
* 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 +6136,23 @@ interface SlideComposition {
|
|
|
4260
6136
|
size: number;
|
|
4261
6137
|
path: string;
|
|
4262
6138
|
};
|
|
6139
|
+
/**
|
|
6140
|
+
* SH-04: the slide's overlay (`shapes`), in draw order over everything else: overlay shapes (`kind` shape, a shape block item with
|
|
6141
|
+
* `path` slides.N.shapes.I) and connectors (`kind` connector, PowerPoint's connector preset in its frame and the route in slide
|
|
6142
|
+
* coordinates). Placed on the final composition, so it never moves content. Absent on a slide without `shapes`.
|
|
6143
|
+
*/
|
|
6144
|
+
overlayShapes?: ComposedOverlayEntry[];
|
|
4263
6145
|
explanation?: CompositionExplanation;
|
|
4264
6146
|
}
|
|
6147
|
+
/**
|
|
6148
|
+
* LH-164: a slide whose whole body is one display message takes the layout's accent surface (messageSurface in message-surface.ts).
|
|
6149
|
+
* `kind` is the LH-09 rule that made the body one message: `statement-message` (a statement record's message) or `display-message` (a
|
|
6150
|
+
* 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).
|
|
6151
|
+
*/
|
|
6152
|
+
interface MessageSurface {
|
|
6153
|
+
kind: 'statement-message' | 'display-message';
|
|
6154
|
+
variant: ColorVariant;
|
|
6155
|
+
}
|
|
4265
6156
|
interface ComposeSlideOptions {
|
|
4266
6157
|
/** Context for inherited furniture, generated organization names, social profiles, logos, layout hints, references and marker numbering. */
|
|
4267
6158
|
presentation?: {
|
|
@@ -4286,6 +6177,8 @@ interface ComposeSlideOptions {
|
|
|
4286
6177
|
catalogs?: unknown;
|
|
4287
6178
|
references?: unknown;
|
|
4288
6179
|
datasets?: unknown;
|
|
6180
|
+
icons?: unknown;
|
|
6181
|
+
assets?: unknown;
|
|
4289
6182
|
};
|
|
4290
6183
|
/**
|
|
4291
6184
|
* OPF 0.19: the resolved theme record's `design` (titleAlignment, contentAlignment, contentBox, contentDirection,
|
|
@@ -4297,6 +6190,18 @@ interface ComposeSlideOptions {
|
|
|
4297
6190
|
* `onDark` value (cover logo, `var:organization.logo.*` in zone images, picture bullets). Core never inspects colors.
|
|
4298
6191
|
*/
|
|
4299
6192
|
darkBackground?: boolean;
|
|
6193
|
+
/**
|
|
6194
|
+
* LH-164: the accent surface this slide was given because its whole body is one display message (resolveSlideContext's
|
|
6195
|
+
* `resolved.messageSurface`, which also drew `roles` and `darkBackground` for it). Composition draws nothing for it and reports it as
|
|
6196
|
+
* `SlideComposition.surface`, so an editor or host can say why the slide is not on the deck's plain surface.
|
|
6197
|
+
*/
|
|
6198
|
+
messageSurface?: MessageSurface;
|
|
6199
|
+
/**
|
|
6200
|
+
* 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 }`)
|
|
6201
|
+
* to the hex the engines draw, for the slide's roles and variables; `resolveSlideContext` passes it with `messageSurface`, so a color that does
|
|
6202
|
+
* not read on the surface can be drawn in one that does.
|
|
6203
|
+
*/
|
|
6204
|
+
resolveRunColor?: (reference: unknown) => string | undefined;
|
|
4300
6205
|
/**
|
|
4301
6206
|
* The resolved theme's `background`, the lowest level of the background chain (the slide's design.background, then
|
|
4302
6207
|
* the deck's, then this). Only an image background produces geometry (`SlideComposition.backgroundImage`).
|
|
@@ -4367,6 +6272,8 @@ declare class OPFCompositionError extends Error {
|
|
|
4367
6272
|
readonly explanation?: CompositionExplanation;
|
|
4368
6273
|
constructor(diagnostics: LayoutDiagnostic[], explanation?: CompositionExplanation);
|
|
4369
6274
|
}
|
|
6275
|
+
/** 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). */
|
|
6276
|
+
declare function imageShape(preset: string, box: LayoutBox, adjust?: Record<string, number>): ImageShape;
|
|
4370
6277
|
/**
|
|
4371
6278
|
* 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
6279
|
* 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 +6286,6 @@ declare function defaultImageFocus(frame: LayoutBox, fit: ImageFit, aspect: numb
|
|
|
4379
6286
|
* Outline of a DrawingML preset in a box, following the ECMA-376 presetShapeDefinitions formulas:
|
|
4380
6287
|
* roundRect (adj; ss = min(w,h), radius = ss*adj/100000), ellipse, and hexagon (adj, vf).
|
|
4381
6288
|
*/
|
|
4382
|
-
declare function imageShape(kind: ImageShape['kind'], box: LayoutBox, cornerRadius?: number): ImageShape;
|
|
4383
6289
|
/**
|
|
4384
6290
|
* 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
6291
|
* 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,6 +6327,7 @@ declare function imageBackground(value: unknown): {
|
|
|
4421
6327
|
opacity?: number;
|
|
4422
6328
|
recolor?: unknown;
|
|
4423
6329
|
overlay?: unknown;
|
|
6330
|
+
textPlacement?: PictureTextPlacement;
|
|
4424
6331
|
} | undefined;
|
|
4425
6332
|
interface FurniturePartBase {
|
|
4426
6333
|
kind: 'header' | 'footer';
|
|
@@ -4577,7 +6484,8 @@ interface QuoteContent {
|
|
|
4577
6484
|
attribution?: string;
|
|
4578
6485
|
role?: string;
|
|
4579
6486
|
photo?: unknown;
|
|
4580
|
-
source?: string;
|
|
6487
|
+
source?: string; /** LH-132: how the photo is drawn; composeSlide decides when absent. */
|
|
6488
|
+
portrait?: 'avatar' | 'side';
|
|
4581
6489
|
}
|
|
4582
6490
|
/** Source and displayed-text ranges are half-open UTF-16 offsets. Added punctuation has no source range. */
|
|
4583
6491
|
interface QuoteTextSource {
|
|
@@ -4620,10 +6528,12 @@ interface QuotePhoto {
|
|
|
4620
6528
|
path: string;
|
|
4621
6529
|
/** Asset value (string or Asset object) that engines resolve like any other image; crop to cover the frame. */
|
|
4622
6530
|
value: unknown;
|
|
4623
|
-
/** Square frame, in reference pixels. */
|
|
6531
|
+
/** Square frame, in reference pixels (LH-132: a tall one for a portrait beside the quote). */
|
|
4624
6532
|
box: LayoutBox;
|
|
4625
|
-
/** Circle mask: the `ellipse` DrawingML preset and the same outline as an SVG path, as an image block's shape 'circle'. */
|
|
6533
|
+
/** 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
6534
|
shape: ImageShape;
|
|
6535
|
+
/** 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. */
|
|
6536
|
+
focus?: ImageFocus;
|
|
4627
6537
|
}
|
|
4628
6538
|
interface QuoteLayout {
|
|
4629
6539
|
/** Measured vertical content envelope at the allocated width, including the photo. */
|
|
@@ -4638,9 +6548,26 @@ interface QuoteLayout {
|
|
|
4638
6548
|
* color by both engines. Absent for every other quote.
|
|
4639
6549
|
*/
|
|
4640
6550
|
rule?: LayoutBox;
|
|
6551
|
+
/**
|
|
6552
|
+
* 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
|
|
6553
|
+
* 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.
|
|
6554
|
+
*/
|
|
6555
|
+
mark?: QuoteMark;
|
|
4641
6556
|
diagnostics: QuoteLayoutDiagnostic[];
|
|
4642
6557
|
overflow: boolean;
|
|
4643
6558
|
}
|
|
6559
|
+
/** LH-78: a quote's decorative mark: one glyph, fitted like any quote part (its box, fit and style are the engines' to draw). */
|
|
6560
|
+
interface QuoteMark {
|
|
6561
|
+
/** `<quote path>.mark`: generated, with no source field. */
|
|
6562
|
+
path: string;
|
|
6563
|
+
text: string;
|
|
6564
|
+
box: LayoutBox;
|
|
6565
|
+
fit: TextFit;
|
|
6566
|
+
style: TextStyle;
|
|
6567
|
+
requestedStyle: TextStyle;
|
|
6568
|
+
/** 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. */
|
|
6569
|
+
hidden?: string;
|
|
6570
|
+
}
|
|
4644
6571
|
interface QuoteLayoutOptions {
|
|
4645
6572
|
/** Canvas short edge divided by 720. Insets retain the current 18 reference-pixel contract. */
|
|
4646
6573
|
scale?: number;
|
|
@@ -4716,11 +6643,6 @@ declare const TITLE_RULE_SIZE: {
|
|
|
4716
6643
|
readonly width: 80;
|
|
4717
6644
|
readonly height: 5;
|
|
4718
6645
|
};
|
|
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
6646
|
/**
|
|
4725
6647
|
* 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
6648
|
* limit, as before.
|
|
@@ -4740,6 +6662,14 @@ interface QuoteBodyOptions extends QuoteLayoutOptions {
|
|
|
4740
6662
|
* Composition sets it for a short quote under or over data.
|
|
4741
6663
|
*/
|
|
4742
6664
|
pull?: boolean;
|
|
6665
|
+
/**
|
|
6666
|
+
* 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
|
|
6667
|
+
* it, centered against it, instead of the avatar beside the attribution. Composition sets it for a wide quote or the quote's `portrait`;
|
|
6668
|
+
* a box too small for the picture keeps the avatar.
|
|
6669
|
+
*/
|
|
6670
|
+
portrait?: 'side';
|
|
6671
|
+
/** LH-132: the share of the quote's width the portrait beside it takes (); QUOTE_PORTRAIT_SHARE when absent. */
|
|
6672
|
+
portraitShare?: number;
|
|
4743
6673
|
}
|
|
4744
6674
|
/** 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
6675
|
declare const QUOTE_PULL_RULE: {
|
|
@@ -4756,6 +6686,31 @@ declare const QUOTE_PULL_LINES = 2;
|
|
|
4756
6686
|
* check overflow before accepting the parts. Line boxes are not shaped glyph or native raster bounds.
|
|
4757
6687
|
*/
|
|
4758
6688
|
declare function layoutQuote(value: string | QuoteContent, box: LayoutBox, options?: QuoteBodyOptions): QuoteLayout;
|
|
6689
|
+
/**
|
|
6690
|
+
* 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
|
|
6691
|
+
* 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
|
|
6692
|
+
* 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
|
|
6693
|
+
* 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
|
|
6694
|
+
* `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
|
|
6695
|
+
* less padding than that, a quote that overflows, a pull line and a photo beside the quote draw no mark.
|
|
6696
|
+
*/
|
|
6697
|
+
declare const QUOTE_MARK: {
|
|
6698
|
+
readonly sizes: readonly [1.5, 1.25, 1];
|
|
6699
|
+
readonly ink: {
|
|
6700
|
+
readonly top: 0.22;
|
|
6701
|
+
readonly bottom: 0.58;
|
|
6702
|
+
};
|
|
6703
|
+
readonly fill: 0.7;
|
|
6704
|
+
};
|
|
6705
|
+
declare function markQuote(layout: QuoteLayout, card: LayoutBox, options?: {
|
|
6706
|
+
scale?: number;
|
|
6707
|
+
fontFamilies?: Partial<FontFamilies>;
|
|
6708
|
+
textMeasurement?: TextMeasurement;
|
|
6709
|
+
direction?: TextDirection;
|
|
6710
|
+
language?: string;
|
|
6711
|
+
path?: string;
|
|
6712
|
+
citationMarker?: (runPath: string) => string | undefined;
|
|
6713
|
+
}): QuoteLayout;
|
|
4759
6714
|
interface MetricContent {
|
|
4760
6715
|
value: string | number;
|
|
4761
6716
|
label?: string;
|
|
@@ -4946,6 +6901,59 @@ declare const TIER_MAX = 5;
|
|
|
4946
6901
|
/** 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
6902
|
declare const PILLAR_MAX = 5;
|
|
4948
6903
|
declare const PILLAR_WORD_MAX = 14;
|
|
6904
|
+
/**
|
|
6905
|
+
* 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
|
|
6906
|
+
* 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.
|
|
6907
|
+
*/
|
|
6908
|
+
declare const PORTRAIT_MODES: readonly ["avatar", "side", "top"];
|
|
6909
|
+
type PortraitMode = typeof PORTRAIT_MODES[number];
|
|
6910
|
+
/**
|
|
6911
|
+
* 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
|
|
6912
|
+
* 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.
|
|
6913
|
+
*/
|
|
6914
|
+
declare const PORTRAIT_TOP_MAX = 4;
|
|
6915
|
+
declare const PORTRAIT_SIDE_MAX = 6;
|
|
6916
|
+
declare const PORTRAIT_SIDE_SHARE = 0.4;
|
|
6917
|
+
/** 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. */
|
|
6918
|
+
declare const PORTRAIT_SIDE_SHARES: readonly [0.4, 0.35, 0.3];
|
|
6919
|
+
/**
|
|
6920
|
+
* 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
|
|
6921
|
+
* 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.
|
|
6922
|
+
*/
|
|
6923
|
+
declare const PORTRAIT_TALLEST: {
|
|
6924
|
+
readonly top: 0.8;
|
|
6925
|
+
readonly side: 0.7;
|
|
6926
|
+
};
|
|
6927
|
+
declare const PORTRAIT_WIDEST: number;
|
|
6928
|
+
/** 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. */
|
|
6929
|
+
declare const PORTRAIT_SIDE_FILL = 0.6;
|
|
6930
|
+
/**
|
|
6931
|
+
* LH-132, in reference pixels: the narrowest card a portrait is drawn across the top of, the narrowest portrait beside the text and the
|
|
6932
|
+
* narrowest text beside it, and the gap between a portrait and its text.
|
|
6933
|
+
*/
|
|
6934
|
+
declare const PORTRAIT_MIN: {
|
|
6935
|
+
readonly topCard: 160;
|
|
6936
|
+
readonly side: 72;
|
|
6937
|
+
readonly text: 150;
|
|
6938
|
+
};
|
|
6939
|
+
declare const PORTRAIT_GAP = 16;
|
|
6940
|
+
/** LH-132: a team's texts keep at least this size (reference px; Claude Design sets a name at 20) before a top portrait gives up its square. */
|
|
6941
|
+
declare const PORTRAIT_TEXT_SIZE = 21;
|
|
6942
|
+
/**
|
|
6943
|
+
* 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
|
|
6944
|
+
* 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
|
|
6945
|
+
* tried, and the avatar kept.
|
|
6946
|
+
*/
|
|
6947
|
+
declare const PORTRAIT_SIDE_CHARS = 20;
|
|
6948
|
+
/**
|
|
6949
|
+
* 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
|
|
6950
|
+
* QUOTE_PORTRAIT_MIN_WIDTH wide: QUOTE_PORTRAIT_SHARE of its width, at most PORTRAIT_TALLEST.side tall for that width and never taller
|
|
6951
|
+
* than the quote, QUOTE_PORTRAIT_GAP from the text, which is centered against it. A narrower quote (three side by side) keeps the avatar.
|
|
6952
|
+
*/
|
|
6953
|
+
declare const QUOTE_PORTRAIT_SHARE = 0.26;
|
|
6954
|
+
declare const QUOTE_PORTRAIT_STEP = 0.02;
|
|
6955
|
+
declare const QUOTE_PORTRAIT_GAP = 40;
|
|
6956
|
+
declare const QUOTE_PORTRAIT_MIN_WIDTH = 640;
|
|
4949
6957
|
/**
|
|
4950
6958
|
* Measure every metric field before accepting geometry. Short single-line values and units can
|
|
4951
6959
|
* share a baseline; longer values or units stack. No locale formatting or rewritten source text is
|
|
@@ -5153,7 +7161,12 @@ interface RichTextRun {
|
|
|
5153
7161
|
italic?: boolean;
|
|
5154
7162
|
underline?: boolean;
|
|
5155
7163
|
strikethrough?: boolean;
|
|
5156
|
-
color
|
|
7164
|
+
/** A ColorRef string, or SH-02's lighter or darker form ({ color, lighten } or { color, darken }). */
|
|
7165
|
+
color?: string | {
|
|
7166
|
+
color: unknown;
|
|
7167
|
+
lighten?: number;
|
|
7168
|
+
darken?: number;
|
|
7169
|
+
};
|
|
5157
7170
|
fontSize?: number;
|
|
5158
7171
|
fontFamily?: string;
|
|
5159
7172
|
link?: string;
|
|
@@ -5261,7 +7274,10 @@ interface ListEntryLayout {
|
|
|
5261
7274
|
anchor?: 'end';
|
|
5262
7275
|
none?: true;
|
|
5263
7276
|
};
|
|
5264
|
-
/**
|
|
7277
|
+
/**
|
|
7278
|
+
* 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
|
|
7279
|
+
* 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.
|
|
7280
|
+
*/
|
|
5265
7281
|
heading?: true;
|
|
5266
7282
|
/**
|
|
5267
7283
|
* LH-07: the entry's step badge (`ListFitOptions.badges`): a circle of `diameter` centered at (`cx`, `cy`) in the marker column,
|
|
@@ -5277,6 +7293,15 @@ interface ListEntryLayout {
|
|
|
5277
7293
|
fontSize: number;
|
|
5278
7294
|
numeral?: LayoutBox;
|
|
5279
7295
|
};
|
|
7296
|
+
/**
|
|
7297
|
+
* LH-14: the entry's icon chip (`ListFitOptions.icons`): a circle of `diameter` centered at (`cx`, `cy`) in the marker column, centered
|
|
7298
|
+
* on the first line's capitals, in place of the bullet. Composition draws the entry's `icon` in it (SlideComposition.icons).
|
|
7299
|
+
*/
|
|
7300
|
+
icon?: {
|
|
7301
|
+
cx: number;
|
|
7302
|
+
cy: number;
|
|
7303
|
+
diameter: number;
|
|
7304
|
+
};
|
|
5280
7305
|
/**
|
|
5281
7306
|
* 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
7307
|
* on its backdrop (the text color where the primary reads under 4.5:1).
|
|
@@ -5378,6 +7403,19 @@ interface ListFitOptions extends RichTextOptions {
|
|
|
5378
7403
|
display?: boolean;
|
|
5379
7404
|
/** 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
7405
|
displayMax?: number;
|
|
7406
|
+
/**
|
|
7407
|
+
* 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
|
|
7408
|
+
* 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).
|
|
7409
|
+
*/
|
|
7410
|
+
headingMax?: number;
|
|
7411
|
+
/** 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. */
|
|
7412
|
+
displayRule?: 'short';
|
|
7413
|
+
/**
|
|
7414
|
+
* 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
|
|
7415
|
+
* 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
|
|
7416
|
+
* (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.
|
|
7417
|
+
*/
|
|
7418
|
+
labelScale?: number;
|
|
5381
7419
|
/**
|
|
5382
7420
|
* LH-08: ruled rows (effective `design.listStyle: "rows"`): each first-level entry is a row, a hairline between two rows (`ListFit.rules`)
|
|
5383
7421
|
* 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 +7430,14 @@ interface ListFitOptions extends RichTextOptions {
|
|
|
5392
7430
|
* `numbering` and entries of level 0; ignored otherwise.
|
|
5393
7431
|
*/
|
|
5394
7432
|
badges?: boolean;
|
|
7433
|
+
/**
|
|
7434
|
+
* LH-14: the entries that carry an `icon` draw it on a chip ICON_CHIP times the list size across in the marker column, in place of the
|
|
7435
|
+
* bullet (`ListEntryLayout.icon`), centered on the entry's first line; every entry keeps that column, so the texts start at one edge.
|
|
7436
|
+
* Needs one level and no numbering; ignored otherwise. A ruled list (`rows`) sets the chips at the start of its labels.
|
|
7437
|
+
*/
|
|
7438
|
+
icons?: boolean;
|
|
7439
|
+
/** LH-14: the chip's size in em of the list size: ICON_CHIP (the default) or ICON_CHIP_COMPACT. */
|
|
7440
|
+
iconScale?: number;
|
|
5395
7441
|
/**
|
|
5396
7442
|
* 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
7443
|
* 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
|
|
@@ -5581,22 +7627,57 @@ declare const EMPHASIS_BAND_MAX_CHARACTERS = 60;
|
|
|
5581
7627
|
declare const EMPHASIS_PILL_MAX_CHARACTERS = 30;
|
|
5582
7628
|
/** 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
7629
|
declare const EMPHASIS_TAKEAWAY_MAX_CHARACTERS = 120;
|
|
5584
|
-
/** LH-114: the longest quote (its text, without the marks) drawn as a pull line, in characters. */
|
|
5585
|
-
declare const QUOTE_PULL_MAX_CHARACTERS = 140;
|
|
5586
7630
|
/**
|
|
5587
|
-
*
|
|
5588
|
-
*
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
* LH-
|
|
7631
|
+
* 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
|
|
7632
|
+
* many lines across the band at its size.
|
|
7633
|
+
*/
|
|
7634
|
+
declare const EMPHASIS_NOTE_LINES = 3;
|
|
7635
|
+
/**
|
|
7636
|
+
* 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
|
|
7637
|
+
* do in its first NOTE_PEER_WORDS words, is one of them (a peer), and stays text.
|
|
5593
7638
|
*/
|
|
7639
|
+
declare const NOTE_PEER_RATIO: readonly [0.6, 1.6];
|
|
7640
|
+
declare const NOTE_PEER_WORDS = 6;
|
|
7641
|
+
/** 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. */
|
|
7642
|
+
declare const FIGURE_ROW_MIN = 2;
|
|
7643
|
+
declare const FIGURE_ROW_MAX = 4;
|
|
7644
|
+
declare const FIGURE_WORDS = 4;
|
|
7645
|
+
/** 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. */
|
|
7646
|
+
declare function figureText(value: unknown): boolean;
|
|
7647
|
+
/**
|
|
7648
|
+
* 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)
|
|
7649
|
+
* with a description (its label). A list where only some entries lead with a figure, or whose entries have no descriptions, is a list.
|
|
7650
|
+
*/
|
|
7651
|
+
declare function figureList(value: unknown): boolean;
|
|
7652
|
+
/** LH-114: the longest quote (its text, without the marks) drawn as a pull line, in characters. */
|
|
7653
|
+
declare const QUOTE_PULL_MAX_CHARACTERS = 140;
|
|
5594
7654
|
declare function composeSlide(input: unknown, options?: ComposeSlideOptions): SlideComposition;
|
|
5595
7655
|
/**
|
|
5596
7656
|
* 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
7657
|
* 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
7658
|
*/
|
|
5599
7659
|
declare function textInkBox(item: ComposedItem, measurement: TextMeasurement | undefined): LayoutBox;
|
|
7660
|
+
/** 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. */
|
|
7661
|
+
declare const SHORT_MESSAGE_WORDS = 25;
|
|
7662
|
+
declare const SHORT_TEXT_WORDS = 4;
|
|
7663
|
+
/** 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). */
|
|
7664
|
+
declare const MESSAGE_DISPLAY_SIZE = 56;
|
|
7665
|
+
/** LH-09: a message drawn at display size takes at most this many balanced lines. */
|
|
7666
|
+
declare const MESSAGE_DISPLAY_LINES = 4;
|
|
7667
|
+
declare function messageWords(value: unknown): number;
|
|
7668
|
+
/** 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. */
|
|
7669
|
+
declare function lonePayload(slide: Record<string, any>): {
|
|
7670
|
+
field: string;
|
|
7671
|
+
host: Record<string, any>;
|
|
7672
|
+
} | undefined;
|
|
7673
|
+
/**
|
|
7674
|
+
* LH-09: how a stacked record with one primary region (the statement) sets a slide with one block. `title`: the title is the statement
|
|
7675
|
+
* (a sentence over a paragraph, n27, n29), drawn at display size under LH-130's accent rule with the paragraph at its size below.
|
|
7676
|
+
* `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
|
|
7677
|
+
* 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
|
|
7678
|
+
* 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.
|
|
7679
|
+
*/
|
|
7680
|
+
declare function statementMessage(slide: Record<string, any>, plan: LayoutTemplate, fill?: boolean): 'title' | 'body' | undefined;
|
|
5600
7681
|
/**
|
|
5601
7682
|
* 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
7683
|
* of the body's height tall, and at most CHART_MAX_PLOT_ASPECT times as wide as tall.
|
|
@@ -5616,5 +7697,5 @@ declare function resolveCanvasDimensions(input: unknown): {
|
|
|
5616
7697
|
height: number;
|
|
5617
7698
|
};
|
|
5618
7699
|
|
|
5619
|
-
export { CHART_CONTEXT_FOCUS_DIFFERENCE as $, ASCII_QUOTE_MARKS as A, ENGINE_DEFAULT_CHART_TYPES as E, CALM_PICTURE_SPREAD as J, CAPTIONABLE_FIELDS as K, CAPTION_FONT_RATIO as N, CAPTION_MAX_RATIO as O, CARD_BORDER_MIX as P, CARD_FILL_SPACE as Q, SOCIAL_PLATFORMS as S, CARD_INSET as U, CARD_RADIUS as V, CARD_SURFACE_MIN_CONTRAST as W, CARD_SURFACE_MIX as X, CELL_CARD_INSET as Y, CHART_AXIS_MAX_OVERSHOOT as Z, CHART_BAND_MIX as _, CHART_CONTEXT_LABELED_MIN_CONTRAST as a0, CHART_CONTEXT_MIN_CONTRAST as a1, CHART_DARK_SERIES_MIN_CONTRAST as a2, CHART_EMPHASIS_MIN_CONTRAST as a3, CHART_EMPHASIS_MIN_LIGHTNESS_STEP as a4, CHART_HEADER_LEGEND_ROWS as a5, CHART_HEADER_MAX_LEGEND as a6, CHART_HIGHLIGHT_MUTED_MIN_CONTRAST as a7, CHART_HIGHLIGHT_MUTED_MIX as a8, CHART_LABELED_ZERO_SHARE as a9, CODE_PANEL_DARK_SHADE as aA, CODE_PANEL_FOREGROUND as aB, CODE_SYNTAX_MIN_CONTRAST as aC, CHART_LEAD_LIGHTNESS_STEP as aa, CHART_MAX_INTERVALS as ab, CHART_MAX_PLOT_ASPECT as ac, CHART_MIN_PLOT_PX as ad, CHART_MIN_PLOT_SHARE as ae, CHART_MIN_TICK_SPACING_PX as af, CHART_SERIES_MIN_DIFFERENCE as ag, CHART_SERIES_MIN_LIGHTNESS_STEP as ah, CHART_SERIES_SOFT_MIX as ai, CHART_SERIES_TIER_SIZE as aj, CHART_SERIES_TINT_MIX as ak, CHART_SLICE_LABEL_MIN_RADIUS as al, CHART_TEXT_FLOOR_PX as am, CHART_TEXT_PX as an, CHART_VALUE_LIST_MAX_ROWS as ao, CHART_VALUE_LIST_SMALL_SLICE as ap, CHECK_TILE_MAX as aq, CHECK_TILE_MAX_CHARACTERS as ar, CHECK_TILE_MAX_LINES as as, CHECK_TILE_MIN as at, CITATION_MARKER_RAISE as au, CITATION_MARKER_SCALE as av, CODE_HIGHLIGHT_LANGUAGES as aw, CODE_HIGHLIGHT_MAX_LENGTH as ax, CODE_NOMINAL_SIZE as ay, CODE_PANEL_BACKGROUND as az, CHART_TYPES as c, DARK_BACKGROUND_LUMINANCE as c8, DEFAULT_CHART_LABEL_SEPARATOR as c9, EMPHASIS_SURFACE_MIN_CONTRAST as cA, EMPHASIS_TAKEAWAY_MAX_CHARACTERS as cB, EMPHASIS_TEXT_MIN_CONTRAST as cC, EYEBROW_GAP as cD, EYEBROW_LABEL_CHARS as cE, EYEBROW_LABEL_WORDS as cF, EYEBROW_MAX_SIZE as cG, EYEBROW_MIN_SIZE as cH, EYEBROW_SHARE as cI, EYEBROW_TAG_SIZE as cJ, EYEBROW_TEXT_KIND as cK, EYEBROW_TRACKING as cL, FEATURED_LABEL_MAX_CHARACTERS as cN, FEATURED_LABEL_MAX_WORDS as cO, FEATURED_MARK_MAX_CHARACTERS as cP, FEATURED_MAX_CELLS as cQ, FONT_SIZE_GRID_PER_PX as cR, FOOTNOTE_MAX_RATIO as cS, FURNITURE_GAP as cT, FURNITURE_IMAGE_SHARE as cU, FURNITURE_ZONE_GUTTER as cV, DEFAULT_FURNITURE_DATE_FORMAT as ca, DESIGN_HINT_KEYS as cb, DIAGRAM_BORDER_MIN_CONTRAST as cc, DIAGRAM_LINE_MIN_CONTRAST as cd, DIAGRAM_MAX_EDGES as ce, DIAGRAM_NOMINAL_SIZE as cf, DIAGRAM_SECONDARY_FLOOR as cg, DIAGRAM_SOURCE_LIMIT as ch, DIAGRAM_SURFACE_ALT_MIX as ci, DIAGRAM_SURFACE_MIX as cj, DIAGRAM_SYNTAXES as ck, EMPHASIS_BAND_MAX_CHARACTERS as cw, EMPHASIS_BAND_MAX_SHARE as cx, EMPHASIS_PILL_MAX_CHARACTERS as cy, EMPHASIS_PILL_SIZE as cz, MAX_NUMBERING_LEVELS as d$, GROUPED_LABEL_CODE as d8, LIST_ROWS_SPREAD as dA, LIST_RULE_WIDTH as dB, LIST_WHOLE_ENTRIES as dC, LONE_DISPLAY_SIZES as dD, LONE_FILL as dE, LONE_METRIC_TARGET as dF, LONE_TARGET as dG, MAX_COMPOSITION_DEPTH as d_, HEADING_AREAS as db, HEADING_DISPLAY_SIZES as dc, JOINED_FIXED_MAX as dj, LAYOUT_BODY_KINDS as dl, LEAD_NOMINAL_SIZE as dm, LIST_ACCENT_RULE_WIDTH as dn, LIST_DISPLAY_GAP as dp, LIST_DISPLAY_RULE as dq, LIST_DISPLAY_SCALE as dr, LIST_HEADING_SCALE as ds, LIST_MARKERS as dt, LIST_NOMINAL_SIZE as du, LIST_NUMERAL_GAP as dv, LIST_NUMERAL_SCALE as dw, LIST_QUESTION_LINES as dx, LIST_ROWS_GAP as dy, LIST_ROWS_LABEL_SHARE as dz, MAX_NUMBERING_VALUE as e0, MAX_REGION_BLOCKS as e1, MAX_REGION_DEPTH as e2, MAX_REGION_ENTRIES as e3, MAX_ROMAN_VALUE as e4, MAX_TEMPLATE_TRACKS as e5, METRIC_BAND_MIN_COLUMN as e6, METRIC_BAND_RATIO as e7, METRIC_BAND_VALUE_SHARE as e8, METRIC_DISPLAY_HEIGHT as e9, NEUTRAL_SHARES as eA, NUMBERING_STYLES as eB, NUMBERING_SUFFIXES as eC, NUMBER_GROUPING_MIN as eD, NUMERAL_TAKEAWAYS as eE, OPFCompositionError as eJ, OPFLayoutTemplateError as eK, PAIR_ARROW_HEIGHT as eL, PAIR_ARROW_MARGIN as eM, PAIR_ARROW_WIDTH as eN, PAIR_FIGURE_KINDS as eO, PAIR_GRID_ANSWER as eP, PAIR_GRID_MIN as eQ, PAIR_GRID_QUESTION as eR, PAIR_LENGTH_RATIO as eS, PATTERN_PRESETS as eT, PATTERN_PRESET_ALIASES as eU, PATTERN_TILE_SIZE as eV, PICTURE_BULLET_SCALE as eW, PILLAR_MAX as eX, PILLAR_WORD_MAX as eY, PORTRAIT_FOCUS_Y as eZ, PROSE_NOMINAL_SIZE as e_, METRIC_DISPLAY_SIZES as ea, METRIC_DISPLAY_WIDTH as eb, METRIC_PILL_PAD_X as ec, METRIC_PILL_PAD_Y as ed, METRIC_PILL_RISE as ee, METRIC_ROLE_VALUE_SIZE as ef, METRIC_TILE_VALUE_SHARE as eg, METRIC_TREND_ARROW_GAP as eh, METRIC_TREND_ARROW_SIZE as ei, METRIC_TREND_MIN_CONTRAST as ej, METRIC_TREND_SHAPES as ek, METRIC_UNIT_GAP as el, METRIC_UNIT_SHARE as em, METRIC_VALUE_MIN_CONTRAST as en, MIN_MEASURE_CHARS as eo, MOVED_ROW_MAX as ep, ENGINE_DEFAULT_COLOR_SCHEME as f, QUOTE_MARKS as f1, QUOTE_NOMINAL_SIZE as f2, QUOTE_PULL_LINES as f3, QUOTE_PULL_MAX_CHARACTERS as f4, QUOTE_PULL_PREFIX as f5, QUOTE_PULL_ROLE_SEPARATOR as f6, QUOTE_PULL_RULE as f7, QUOTE_SOURCE_SEPARATOR as f8, SCRIM_FADE as fP, SCRIM_MARGIN as fQ, SCRIM_TARGET_CONTRAST as fR, SMALL_CHART_MAX_POINTS as fS, SMALL_CHART_MAX_SERIES as fT, STEP_BADGE as fU, STEP_BADGE_GAP as fV, STEP_FLOW_CHARACTERS as fW, STEP_FLOW_MAX as fX, STEP_FLOW_MIN as fY, SURFACE_ALT_MIN_CONTRAST as fZ, SURFACE_ALT_MIX as f_, REGION_ANCHORS as fi, REGION_FLOWS as fj, REGION_KINDS as fk, REGION_ROLES as fl, RESERVED_REGION_NAMES as fm, ENGINE_DEFAULT_FONT_SCHEME as g, captionSettings as g$, alignBarRows as gS, allocateRows as gT, annotationText as gU, applyHslTransforms as gV, applyLuminance as gW, autoImageFit as gX, bindNoBreak as gY, bindRegions as gZ, blockKind as g_, TABLE_HIGHLIGHT_MIX as gd, TABLE_NOMINAL_SIZE as ge, TABLE_NUMERIC_SHARE as gf, TERM_WORDS as gg, THEME_DESIGN_KEYS as gh, TIER_MAX as gi, TIER_VALUE_SIZES as gj, TIMELINE_OUTLINE_MIN_CONTRAST as gk, TIMELINE_STATUSES as gl, TIMELINE_STATUS_WORDS as gm, TIMELINE_TEXT_MIN_CONTRAST as gn, TITLE_RULE_SIZE as go, ENGINE_DEFAULT_THEME as h, eyebrowCaps as h$, chartBandColor as h0, chartCategoriesInTime as h1, chartColorForFill as h2, chartContextColor as h3, chartContextColors as h4, chartEmphasisColors as h5, chartEndLabels as h6, chartHeader as h7, chartHeaderCaption as h8, chartHighlightColors as h9, checkDiagram as hA, checkMarkPoints as hB, citationMarkerText as hC, clrMapAttributes as hD, codeHighlightBands as hE, codeHighlightColors as hF, codeHighlightLines as hG, codeLineNumbers as hH, codeLineRuns as hI, codeSyntaxPalette as hJ, codeSyntaxPaletteForRoles as hK, codeSyntaxPaletteForScheme as hL, collectCitations as hM, colorContrast as hN, colorMapFor as hO, composeLayoutAreas as hP, composeSlide as hQ, coverKept as hR, deckBackgroundIsFixed as hS, defaultImageFocus as hT, defaultSlideBackground as hU, diagramPalette as hV, diagramPayload as hW, diagramsPending as hX, emphasisSurface as hY, endLabelText as hZ, ensureDiagrams as h_, chartHighlightMarks as ha, chartIntervalsFor as hb, chartLabelText as hc, chartLayer as hd, chartLayerDataLabels as he, chartOptionSupport as hf, chartOptionTarget as hg, chartPaletteForFill as hh, chartPlotBox as hi, chartPlotInset as hj, chartRingLabels as hk, chartSchemeSeries as hl, chartSeriesLabelColor as hm, chartSeriesPalette as hn, chartSliceLabels as ho, chartSlideFocus as hp, chartSoftColors as hq, chartStack as hr, chartTextSize as hs, chartTitleFocus as ht, chartTitleReferences as hu, chartValueAxis as hv, chartValueAxisHidden as hw, chartValueList as hx, chartWaterfall as hy, chartWaterfallColors 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, isPlaceLabel as u, markLabelColor as v, normalizeLanguageFamily as w, AUTO_FIT_MIN_KEPT as x, AUTO_LAYOUT as y };
|
|
5620
|
-
export type {
|
|
7700
|
+
export { ARROW_ADJUST as $, embedIcons as A, ensureDiagrams as B, ensureIcons as D, ENGINE_DEFAULT_CHART_TYPES as E, ensureShapes as G, iconsPending as H, isPlaceLabel as J, markLabelColor as K, nearIconNames as N, normalizeLanguageFamily as O, parseIconReference as P, resolveIcon as Q, SOCIAL_PLATFORMS as S, shapesPending as U, ARRANGEMENTS as V, ARRANGEMENT_CARDS_MAX as W, ARRANGEMENT_GROWTH as X, ARRANGEMENT_LINE_POINTS as Y, ARRANGEMENT_MAX as Z, ARRANGEMENT_TEXT_MARGIN as _, CHECK_TILE_MIN as a$, ASCII_QUOTE_MARKS as a0, AUTO_FIT_MIN_KEPT as a1, AUTO_LAYOUT as a2, CHART_EMPHASIS_MIN_LIGHTNESS_STEP as aA, CHART_HEADER_LEGEND_ROWS as aB, CHART_HEADER_MAX_LEGEND as aC, CHART_HIGHLIGHT_MUTED_MIN_CONTRAST as aD, CHART_HIGHLIGHT_MUTED_MIX as aE, CHART_LABELED_ZERO_SHARE as aF, CHART_LEAD_LIGHTNESS_STEP as aG, CHART_MAX_INTERVALS as aH, CHART_MAX_PLOT_ASPECT as aI, CHART_MIN_PLOT_PX as aJ, CHART_MIN_PLOT_SHARE as aK, CHART_MIN_TICK_SPACING_PX as aL, CHART_SERIES_MIN_DIFFERENCE as aM, CHART_SERIES_MIN_LIGHTNESS_STEP as aN, CHART_SERIES_SOFT_MIX as aO, CHART_SERIES_TIER_SIZE as aP, CHART_SERIES_TINT_MIX as aQ, CHART_SLICE_LABEL_MIN_RADIUS as aR, CHART_SLICE_MAX_SHIFT as aS, CHART_SLICE_SEPARATOR_PX as aT, CHART_TEXT_FLOOR_PX as aU, CHART_TEXT_PX as aV, CHART_VALUE_LIST_MAX_ROWS as aW, CHART_VALUE_LIST_SMALL_SLICE as aX, CHECK_TILE_MAX as aY, CHECK_TILE_MAX_CHARACTERS as aZ, CHECK_TILE_MAX_LINES as a_, BUILT_IN_MASKS as ab, CALM_PICTURE_SPREAD as af, CAPTIONABLE_FIELDS as ag, CAPTION_FONT_RATIO as ah, CAPTION_MAX_RATIO as ai, CARD_BORDER_MIX as aj, CARD_FILL_SPACE as ak, CARD_INSET as al, CARD_RADIUS as am, CARD_SURFACE_MIN_CONTRAST as an, CARD_SURFACE_MIX as ao, CARD_TEXT_MARGIN as ap, CARD_TEXT_MIN_CONTRAST as aq, CELL_CARD_INSET as ar, CHART_AXIS_MAX_OVERSHOOT as as, CHART_BAND_MIX as at, CHART_BAR_GAP_WIDTH as au, CHART_CONTEXT_FOCUS_DIFFERENCE as av, CHART_CONTEXT_LABELED_MIN_CONTRAST as aw, CHART_CONTEXT_MIN_CONTRAST as ax, CHART_DARK_SERIES_MIN_CONTRAST as ay, CHART_EMPHASIS_MIN_CONTRAST as az, CHEVRON_ADJUST as b0, CITATION_MARKER_RAISE as b1, CITATION_MARKER_SCALE as b2, CODE_HIGHLIGHT_LANGUAGES as b3, CODE_HIGHLIGHT_MAX_LENGTH as b4, CODE_NOMINAL_SIZE as b5, CODE_PANEL_BACKGROUND as b6, CODE_PANEL_DARK_SHADE as b7, CODE_PANEL_FOREGROUND as b8, CODE_SYNTAX_MIN_CONTRAST as b9, CONNECTOR_ROUTES as ba, CONNECTOR_STANDOFF as bb, CONNECTOR_STROKE_COLOR as bc, CONNECTOR_STROKE_WIDTH as bd, CYCLE_ARROW as be, CYCLE_ARROW_ADJUST as bf, CYCLE_ARROW_LIGHTEN as bg, CYCLE_DIAMETER as bh, CYCLE_RADIUS as bi, CYCLE_RING_MARGIN as bj, CYCLE_RING_NODE as bk, CYCLE_TWO as bl, CHART_TYPES as c, FIGURE_ROW_MIN as d$, EMPHASIS_BAND_MAX_CHARACTERS as dE, EMPHASIS_BAND_MAX_SHARE as dF, EMPHASIS_NOTE_LINES as dG, EMPHASIS_PILL_MAX_CHARACTERS as dH, EMPHASIS_PILL_SIZE as dI, EMPHASIS_SURFACE_MIN_CONTRAST as dJ, EMPHASIS_TAKEAWAY_MAX_CHARACTERS as dK, EMPHASIS_TEXT_MIN_CONTRAST as dL, EYEBROW_GAP as dM, EYEBROW_LABEL_CHARS as dN, EYEBROW_LABEL_WORDS as dO, EYEBROW_MAX_SIZE as dP, EYEBROW_MIN_SIZE as dQ, EYEBROW_SHARE as dR, EYEBROW_TAG_SIZE as dS, EYEBROW_TEXT_KIND as dT, EYEBROW_TRACKING as dU, FEATURED_LABEL_MAX_CHARACTERS as dW, FEATURED_LABEL_MAX_WORDS as dX, FEATURED_MARK_MAX_CHARACTERS as dY, FEATURED_MAX_CELLS as dZ, FIGURE_ROW_MAX as d_, DARK_BACKGROUND_LUMINANCE as dd, DEFAULT_CHART_LABEL_SEPARATOR as de, DEFAULT_FURNITURE_DATE_FORMAT as df, DEFAULT_SHAPE_STYLE as dg, DESIGN_HINT_KEYS as dh, DIAGRAM_BORDER_MIN_CONTRAST as di, DIAGRAM_LINE_MIN_CONTRAST as dj, DIAGRAM_MAX_EDGES as dk, DIAGRAM_NOMINAL_SIZE as dl, DIAGRAM_SECONDARY_FLOOR as dm, DIAGRAM_SHAPE_FAMILIES as dn, DIAGRAM_SOURCE_LIMIT as dp, DIAGRAM_SURFACE_ALT_MIX as dq, DIAGRAM_SURFACE_MIX as dr, DIAGRAM_SYNTAXES as ds, LIST_DISPLAY_SCALE as e$, FIGURE_WORDS as e0, FLOW_ROUND_ADJUST as e1, FONT_SIZE_GRID_PER_PX as e2, FOOTNOTE_MAX_RATIO as e3, FURNITURE_GAP as e4, FURNITURE_IMAGE_SHARE as e5, FURNITURE_ZONE_GUTTER as e6, ICON_CHIP as eA, ICON_CHIP_COMPACT as eB, ICON_CHIP_GAP as eC, ICON_CHIP_TINT as eD, ICON_GLYPH as eE, ICON_MIN_CONTRAST as eF, ICON_VIEWBOX as eG, JOINED_FIXED_MAX as eS, LAYOUT_BODY_KINDS as eU, LEAD_NOMINAL_SIZE as eV, LINEAR_ARRANGEMENTS as eW, LINEAR_TEXT_MARGINS as eX, LIST_ACCENT_RULE_WIDTH as eY, LIST_DISPLAY_GAP as eZ, LIST_DISPLAY_RULE as e_, GROUPED_LABEL_CODE as el, HEADING_AREAS as eo, HEADING_DISPLAY_SIZES as ep, HISTOGRAM_LABEL_SLOT as eq, HISTOGRAM_MIN_BINS as er, ICON_CARD_DESCRIPTION as et, ICON_CARD_DESCRIPTION_CHARACTERS as eu, ICON_CARD_FILL as ev, ICON_CARD_LABEL_CHARACTERS as ew, ICON_CARD_LABEL_WORDS as ex, ICON_CARD_MAX as ey, ICON_CARD_MIN as ez, ENGINE_DEFAULT_COLOR_SCHEME as f, MESSAGE_DISPLAY_SIZE as f$, LIST_HEADING_SCALE as f0, LIST_MARKERS as f1, LIST_NOMINAL_SIZE as f2, LIST_NUMERAL_GAP as f3, LIST_NUMERAL_SCALE as f4, LIST_QUESTION_LINES as f5, LIST_ROWS_GAP as f6, LIST_ROWS_LABEL_SHARE as f7, LIST_ROWS_SPREAD as f8, LIST_RULE_WIDTH as f9, MATRIX_BACKGROUND_LIGHTEN as fN, MATRIX_ENTRIES as fO, MATRIX_GAP as fP, MATRIX_INSET as fQ, MATRIX_QUADRANT as fR, MAX_COMPOSITION_DEPTH as fS, MAX_NUMBERING_LEVELS as fT, MAX_NUMBERING_VALUE as fU, MAX_REGION_BLOCKS as fV, MAX_REGION_DEPTH as fW, MAX_REGION_ENTRIES as fX, MAX_ROMAN_VALUE as fY, MAX_TEMPLATE_TRACKS as fZ, MESSAGE_DISPLAY_LINES as f_, LIST_WHOLE_ENTRIES as fa, LONE_DISPLAY_SIZES as fb, LONE_FILL as fc, LONE_METRIC_TARGET as fd, LONE_TARGET as fe, ENGINE_DEFAULT_FONT_SCHEME as g, METRIC_BAND_MIN_COLUMN as g0, METRIC_BAND_RATIO as g1, METRIC_BAND_VALUE_SHARE as g2, METRIC_DISPLAY_HEIGHT as g3, METRIC_DISPLAY_SIZES as g4, METRIC_DISPLAY_WIDTH as g5, METRIC_ICON_TEXT as g6, METRIC_PILL_PAD_X as g7, METRIC_PILL_PAD_Y as g8, METRIC_PILL_RISE as g9, NUMBERING_SUFFIXES as gA, NUMBER_GROUPING_MIN as gB, NUMERAL_TAKEAWAYS as gC, OPFCompositionError as gH, OPFLayoutTemplateError as gI, OPF_ARROW_LENGTH as gJ, OPF_ARROW_ROOM as gK, OPF_ARROW_THICKNESS as gL, OPF_CHEVRON_DEPTH as gM, OPF_COLUMN_ARROW_LENGTH as gN, OPF_COLUMN_ARROW_THICKNESS as gO, OPF_COLUMN_ROOM as gP, OPF_LAYOUT_DESIGNS as gQ, OPF_LAYOUT_KIND as gR, OPF_LAYOUT_MAX as gS, OPF_LINES_MAX as gT, OVERLAY_ANCHOR_SHARE as gU, OVERLAY_EDGES as gV, OVERLAY_LAYERS as gW, METRIC_ROLE_VALUE_SIZE as ga, METRIC_TILE_VALUE_SHARE as gb, METRIC_TREND_ARROW_GAP as gc, METRIC_TREND_ARROW_SIZE as gd, METRIC_TREND_MIN_CONTRAST as ge, METRIC_TREND_SHAPES as gf, METRIC_UNIT_GAP as gg, METRIC_UNIT_SHARE as gh, METRIC_VALUE_MIN_CONTRAST as gi, MIN_MEASURE_CHARS as gj, MM_PER_PX as gk, MOVED_ROW_MAX as gl, NEUTRAL_SHARES as gw, NOTE_PEER_RATIO as gx, NOTE_PEER_WORDS as gy, NUMBERING_STYLES as gz, ENGINE_DEFAULT_THEME as h, PAIR_ARROW_HEIGHT as h1, PAIR_ARROW_MARGIN as h2, PAIR_ARROW_WIDTH as h3, PAIR_FIGURE_KINDS as h4, PAIR_GRID_ANSWER as h5, PAIR_GRID_MIN as h6, PAIR_GRID_QUESTION as h7, PAIR_LENGTH_RATIO as h8, PANEL_SCRIM_LIMIT as h9, PYRAMID_STEPS_SHARE as hA, PYRAMID_TEXT_WIDTH as hB, QUOTE_MARK as hM, QUOTE_MARKS as hN, QUOTE_NOMINAL_SIZE as hO, QUOTE_PORTRAIT_GAP as hP, QUOTE_PORTRAIT_MIN_WIDTH as hQ, QUOTE_PORTRAIT_SHARE as hR, QUOTE_PORTRAIT_STEP as hS, QUOTE_PULL_LINES as hT, QUOTE_PULL_MAX_CHARACTERS as hU, QUOTE_PULL_PREFIX as hV, QUOTE_PULL_ROLE_SEPARATOR as hW, QUOTE_PULL_RULE as hX, QUOTE_SOURCE_SEPARATOR as hY, PATTERN_PRESETS as ha, PATTERN_PRESET_ALIASES as hb, PATTERN_TILE_SIZE as hc, PICTURE_BULLET_SCALE as hd, PICTURE_PANEL_SHARES as he, PICTURE_STROKE_WIDTH as hf, PICTURE_TEXT_COLUMNS as hg, PICTURE_TEXT_PLACEMENTS as hh, PILLAR_MAX as hi, PILLAR_WORD_MAX as hj, PORTRAIT_FOCUS_Y as hk, PORTRAIT_GAP as hl, PORTRAIT_MIN as hm, PORTRAIT_MODES as hn, PORTRAIT_SIDE_CHARS as ho, PORTRAIT_SIDE_FILL as hp, PORTRAIT_SIDE_MAX as hq, PORTRAIT_SIDE_SHARE as hr, PORTRAIT_SIDE_SHARES as hs, PORTRAIT_TALLEST as ht, PORTRAIT_TEXT_SIZE as hu, PORTRAIT_TOP_MAX as hv, PORTRAIT_WIDEST as hw, PROSE_NOMINAL_SIZE as hx, PYRAMID_MAX_ASPECT as hy, PYRAMID_STEPS_ASPECT as hz, SMART_ART_OPF_DOMAIN as i$, REGION_ANCHORS as i7, REGION_FLOWS as i8, REGION_KINDS as i9, SALIENT_LIMIT as iK, SCRIM_FADE as iL, SCRIM_MARGIN as iM, SCRIM_TARGET_CONTRAST as iN, SHAPE_BLOCK_KEYS as iO, SHAPE_EFFECT_KEYS as iP, SHAPE_PADDING as iQ, SHAPE_PRESETS as iR, SHAPE_STROKE_WIDTH as iS, SHAPE_STYLES as iT, SHORT_MESSAGE_WORDS as iU, SHORT_TEXT_WORDS as iV, SMALL_CHART_MAX_POINTS as iW, SMALL_CHART_MAX_SERIES as iX, SMART_ART_DOMAIN as iY, SMART_ART_LAYOUTS as iZ, SMART_ART_NAMES as i_, REGION_ROLES as ia, RESERVED_REGION_NAMES as ib, ROUND_RECT_ADJUST as ic, ROW_LABEL_CHARS as id, ROW_LABEL_WORDS as ie, RUN_IN_HEADING_CHARS as ig, SMART_ART_SCALES as j0, STEP_BADGE as j1, STEP_BADGE_GAP as j2, STEP_FLOW_CHARACTERS as j3, STEP_FLOW_MAX as j4, STEP_FLOW_MIN as j5, SURFACE_ALT_MIN_CONTRAST as j6, SURFACE_ALT_MIX as j7, THEME_DESIGN_KEYS as jA, TIER_MAX as jB, TIER_VALUE_SIZES as jC, TIMELINE_OUTLINE_MIN_CONTRAST as jD, TIMELINE_STATUSES as jE, TIMELINE_STATUS_WORDS as jF, TIMELINE_TEXT_MIN_CONTRAST as jG, TITLE_RULE_SIZE as jH, TABLE_HIGHLIGHT_MIX as jq, TABLE_NOMINAL_SIZE as jr, TABLE_NUMERIC_SHARE as js, TERM_WORDS as jt, TEXT_ONLY_LABELS as ju, TEXT_TILE_CHARACTERS as jv, TEXT_TILE_LINES as jw, TEXT_TILE_MARKER as jx, TEXT_TILE_MAX as jy, TEXT_TILE_MIN as jz, chartWaterfallColors as k$, alignBarRows as k9, chartHistogram as kA, chartIntervalsFor as kB, chartLabelText as kC, chartLayer as kD, chartLayerDataLabels as kE, chartNumericAxes as kF, chartOptionSupport as kG, chartOptionTarget as kH, chartPaletteForFill as kI, chartPlotBox as kJ, chartPlotInset as kK, chartRingLabels as kL, chartSchemeSeries as kM, chartSeriesLabelColor as kN, chartSeriesPalette as kO, chartSliceLabels as kP, chartSlicePlan as kQ, chartSlideFocus as kR, chartSoftColors as kS, chartStack as kT, chartTextSize as kU, chartTitleFocus as kV, chartTitleReferences as kW, chartValueAxis as kX, chartValueAxisHidden as kY, chartValueList as kZ, chartWaterfall as k_, allocateRows as ka, annotationText as kb, applyColorTransform as kc, applyHslTransforms as kd, applyLuminance as ke, arrangementPaint as kf, autoImageFit as kg, bindNoBreak as kh, bindRegions as ki, blockKind as kj, captionSettings as kk, cardGridColumns as kl, cardNodes as km, chartBandColor as kn, chartBarGeometry as ko, chartCategoriesInTime as kp, chartColorForFill as kq, chartContextColor as kr, chartContextColors as ks, chartDoughnut as kt, chartEmphasisColors as ku, chartEndLabels as kv, chartHeader as kw, chartHeaderCaption as kx, chartHighlightColors as ky, chartHighlightMarks as kz, LANGUAGES as l, groupsDataRange as l$, checkDiagram as l0, checkMarkPoints as l1, chevronNodes as l2, chooseConnectorSites as l3, choosePictureText as l4, citationMarkerText as l5, clrMapAttributes as l6, codeHighlightBands as l7, codeHighlightColors as l8, codeHighlightLines as l9, documentIcons as lA, emphasisSurface as lB, endLabelText as lC, evaluateLayoutDefinition as lD, eyebrowCaps as lE, eyebrowLabel as lF, eyebrowSize as lG, featuredCells as lH, figureList as lI, figureText as lJ, fitImage as lK, fitList as lL, fitRichText as lM, fitText as lN, flowNodes as lO, focusHits as lP, formatChartLabelNumber as lQ, formatChartLabelPercent as lR, formatFurnitureDate as lS, formatListNumber as lT, frameToSlide as lU, grayOfLuminance as lV, gridFlowShape as lW, groupBinding as lX, groupNumber as lY, groupingNode as lZ, groupsAxisTicks as l_, codeLineNumbers as la, codeLineRuns as lb, codeSyntaxPalette as lc, codeSyntaxPaletteForRoles as ld, codeSyntaxPaletteForScheme as le, collectCitations as lf, colorContrast as lg, colorMapFor as lh, colorTransform as li, composeLayoutAreas as lj, composeShape as lk, composeSlide as ll, compositeLayoutDefinition as lm, connectorAdjustPreset as ln, connectorRoute as lo, coverKept as lp, cycleAspect as lq, cycleFrame as lr, cycleLoop as ls, cycleNodes as lt, cycleRing as lu, deckBackgroundIsFixed as lv, defaultImageFocus as lw, defaultSlideBackground as lx, diagramPalette as ly, diagramPayload as lz, LOGO_SHAPES as m, measureText as m$, groupsThousands as m0, hasOverlayShapes as m1, histogramBins as m2, histogramEdgeDecimals as m3, histogramEdgeFormat as m4, histogramEdgeText as m5, horizontalBarPlot as m6, iconColors as m7, iconFromSvg as m8, iconPathCommands as m9, layoutMetric as mA, layoutQuote as mB, layoutRegion as mC, layoutStructure as mD, layoutTable as mE, layoutTemplate as mF, layoutTemplateIssues as mG, layoutTimeline as mH, layoutVariantApplies as mI, layoutWatermark as mJ, lineMayStartAt as mK, linearDesign as mL, linearMargins as mM, linearNodes as mN, listColumnBreaks as mO, listGridShape as mP, listNumberLabel as mQ, listNumbers as mR, lonePayload as mS, luminanceGrid as mT, majorityKind as mU, markQuote as mV, matrixNodes as mW, matrixQuadrants as mX, matrixSquare as mY, maxIntervalsFor as mZ, measureMonospaceText as m_, iconPathData as ma, imageBackground as mb, imageShape as mc, intrinsicImageAspect as md, intrinsicImageSize as me, isColorVariant as mf, isDarkColor as mg, isFixedBackground as mh, isLabelText as mi, isLayoutTemplate as mj, isLinearArrangement as mk, isOverlayConnector as ml, isPresetShape as mm, isShapeBlock as mn, isTimeFieldTitle as mo, isWrappedInQuoteMarks as mp, isolateNumbers as mq, layoutArrangement as mr, layoutCaption as ms, layoutCode as mt, layoutColorVariant as mu, layoutContent as mv, layoutDiagram as mw, layoutEntries as mx, layoutFootnotes as my, layoutFurniture as mz, resolveSlideDirection as n$, measureTextOutline as n0, messageWords as n1, metricPillFill as n2, metricTrendColor as n3, metricTrendMark as n4, metricTrendPoints as n5, metricValueColor as n6, monthOf as n7, niceScale as n8, nodeWidthAt as n9, presetTextRect as nA, pyramidFrame as nB, pyramidNodes as nC, pyramidSteps as nD, questionText as nE, quoteLanguage as nF, quoteMarksFor as nG, readableSchemeColor as nH, rectSites as nI, referencesSlide as nJ, refreshChartMarks as nK, refreshEndLabels as nL, regionAccepts as nM, regionRoleRank as nN, repeatedPairs as nO, resolveCanvasDimensions as nP, resolveChartColors as nQ, resolveChartOptions as nR, resolveCodeLanguage as nS, resolveColorRef as nT, resolveColorRoles as nU, resolveDesignHints as nV, resolveFontFamilies as nW, resolveLogo as nX, resolveNumbering as nY, resolvePatternPreset as nZ, resolveScriptFonts as n_, normalizeColorVariant as na, normalizeHexColor as nb, numberRanges as nc, numberingAtLevel as nd, numberingStyleDraws as ne, numericText as nf, opfLayoutGeometry as ng, opfSmartArtUnavailable as nh, overlayIssues as ni, paintDiagram as nj, paintDiagramGroup as nk, pairEntry as nl, paragraphDirection as nm, paragraphDirectionAt as nn, patternBitmap as no, patternRuns as np, physicalAlignment as nq, pictureScrims as nr, placeEndLabels as ns, placeIconCommands as nt, placeReferences as nu, placeStackNames as nv, placeTextLines as nw, placedImageBlocks as nx, presetAspect as ny, presetMask as nz, resolveSocialProfile as o0, resolveTextStyle as o1, restackForRows as o2, rightArrowPoints as o3, rootNodes as o4, rowLabel as o5, runInHeading as o6, sampledGrays as o7, sampledWeight as o8, scorePictureText as o9, tableGrid as oA, tableHighlightColor as oB, tableHighlightRows as oC, tableRowBoundaries as oD, tableSlideFocus as oE, textColorForFill as oF, textInkBox as oG, textLength as oH, textWidthMeasurer as oI, timelineMarkerShapes as oJ, timelineTextColor as oK, tokenizeCode as oL, trackingWidth as oM, translatePathData as oN, turnedShapeBox as oO, unbindNoBreak as oP, unwrapQuoteMarks as oQ, verticalFlowNodes as oR, visualReadingOrder as oS, walkCitationRuns as oT, waterfallLabelText as oU, waterfallRoles as oV, waterfallSignedFormat as oW, waterfallSteps as oX, wrapText as oY, scottBinCount as oa, scrimGeometry as ob, scrimOpacity as oc, scriptFontRole as od, shapeIssues as oe, shapeSites as of, shapeStyleLook as og, shapeTextColor as oh, shareHeights as oi, shareSiblingChartAxes as oj, shareSiblingPlots as ok, sliceNumberedItems as ol, slideBlockIds as om, slideCitations as on, slideFocusSources as oo, smallChart as op, smartArtScript as oq, smartArtUnavailable as or, snapFontSizeDown as os, snapFontSizeUp as ot, softenChartPalette as ou, stackCategoryValues as ov, stackedText as ow, statementMessage as ox, styledText as oy, surfaceAltColor as oz, chartDrawDiagnostics as x, chartDrawPlan as y, diagramsPending as z };
|
|
7701
|
+
export type { ComposeSlideOptions as C, Fonts as F, IconOptions as I, LayoutDiagnostic as L, MessageSurface as M, ResolvedColorRoles as R, TextMeasurement as T, ColorVariant 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, BackgroundImageFit as ac, BindRegionsOptions as ad, BoundBlock as ae, FontFamilies as b, ChartSlicePlan as b$, ChartLayerDoughnut as bA, ChartLayerEndLabels as bB, ChartLayerFocus as bC, ChartLayerGeometry as bD, ChartLayerHeader as bE, ChartLayerHistogram as bF, ChartLayerReferences as bG, ChartLayerRing as bH, ChartLayerRows as bI, ChartLayerSlices as bJ, ChartLayerSmall as bK, ChartLayerStack as bL, ChartLayerValueList as bM, ChartLayerWaterfall as bN, ChartLegendPosition as bO, ChartNumericAxes as bP, ChartOptionDiagnostic as bQ, ChartOptionKind as bR, ChartOptionSupport as bS, ChartOptionTarget as bT, ChartPaletteOptions as bU, ChartPlotGeometry as bV, ChartPlotInset as bW, ChartReferenceBand as bX, ChartReferenceLine as bY, ChartScale as bZ, ChartSliceLabel as b_, Caption as bm, CaptionAlignment as bn, CaptionObject as bo, CaptionPosition as bp, CaptionSettings as bq, ChartAxisGeometry as br, ChartBarGeometry as bs, ChartColorContext as bt, ChartEndLabel as bu, ChartHeaderLegendEntry as bv, ChartHighlightMarks as bw, ChartLabelContent as bx, ChartLabelPosition as by, ChartLayer as bz, ComposedSteps as c$, ChartSoftColor as c0, ChartStackEnd as c1, ChartStackName as c2, ChartValueAxis as c3, ChartValueListHole as c4, ChartValueListRow as c5, CitationMarker as c6, CitationNote as c7, CodeContent as c8, CodeHighlightBand as c9, ComposedChart as cA, ComposedConnector as cB, ComposedDiagram as cC, ComposedDiagramItem as cD, ComposedEmphasis as cE, ComposedFill as cF, ComposedFlow as cG, ComposedFootnoteEntry as cH, ComposedFootnotes as cI, ComposedGradient as cJ, ComposedGroup as cK, ComposedHeadingArea as cL, ComposedIcon as cM, ComposedImage as cN, ComposedItem as cO, ComposedLayoutArea as cP, ComposedListColumn as cQ, ComposedLogo as cR, ComposedOverlay as cS, ComposedOverlayEntry as cT, ComposedOverlayShape as cU, ComposedPlacement as cV, ComposedRegion as cW, ComposedScrim as cX, ComposedShape as cY, ComposedShapePath as cZ, ComposedStepBadge as c_, CodeHighlightColors as ca, CodeHighlightEntry as cb, CodeHighlightIssue as cc, CodeHighlightLines as cd, CodeLayout as ce, CodeLayoutDiagnostic as cf, CodeLayoutOptions as cg, CodeLineSegment as ch, CodeLineSource as ci, CodeRun as cj, CodeSyntaxPalette as ck, CodeSyntaxPaletteOptions as cl, CodeSyntaxPaletteTheme as cm, CodeTextFit as cn, CodeTextPart as co, CodeToken as cp, CodeTokenKind as cq, ColorAccentSlot as cr, ColorBaseSlot as cs, ColorMap as ct, ColorVariantBackground as cu, ColorVariantInput as cv, ComposedArrangement as cw, ComposedArrowhead as cx, ComposedBackgroundImage as cy, ComposedCaption as cz, ChartDrawPlan as d, ComposedStroke as d0, Composition as d1, CompositionCandidate as d2, CompositionDecision as d3, CompositionExplanation as d4, CompositionPenalties as d5, CompositionTrack as d6, ConnectionSite as d7, ConnectorEnd as d8, ConnectorFrame as d9, DiagramPalette as dA, DiagramPaletteInput as dB, DiagramPayload as dC, DiagramSyntax as dD, EmphasisSurface as dV, ConnectorPreset as da, ConnectorRoute as db, ConnectorRouteGeometry as dc, DeckCitations as dt, DesignHintKey as du, DesignHintSource as dv, DesignHints as dw, DiagramIssue as dx, DiagramLayoutOptions as dy, DiagramMeasure as dz, ChartFallback as e, FeaturedCells as e7, FeaturedKind as e8, FlowShape as e9, IconCommand as eH, IconPaint as eI, IconPart as eJ, IconSetIcon as eK, IconSetLoader as eL, ImageEdge as eM, ImageFit as eN, ImageFitOption as eO, ImageFitPlacement as eP, ImageFocus as eQ, ImageShape as eR, JoinedArrangement as eT, FocusSource as ea, FontFaceSelection as eb, FootnoteLayoutOptions as ec, FurnitureField as ed, FurnitureImagePart as ee, FurnitureLayout as ef, FurniturePart as eg, FurniturePartBase as eh, FurnitureSocialLink as ei, FurnitureTextExtras as ej, FurnitureTextPart as ek, GroupedBinding as em, GroupingNode as en, HistogramBin as es, LayoutTemplateIssue as fA, LayoutVariantDeck as fB, LayoutVariantRole 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, LayoutAlgorithm as ff, LayoutArea as fg, LayoutAreasOptions as fh, LayoutBodyKind as fi, LayoutBox as fj, LayoutBranch as fk, LayoutChild as fl, LayoutChoose as fm, LayoutConstraint as fn, LayoutContent as fo, LayoutDefinition as fp, LayoutEntry as fq, LayoutForEach as fr, LayoutNodeDefinition as fs, LayoutPresOf as ft, LayoutRegion as fu, LayoutShape as fv, LayoutShapeType as fw, LayoutStyle as fx, LayoutTable as fy, LayoutTemplate as fz, OverlayIssue as g$, Numbering as gD, NumberingInput as gE, NumberingStyleName as gF, NumberingSuffix as gG, OpfLayoutDesign as gX, OpfLayoutRecipe as gY, OpfSmartArtCandidate as gZ, OverlayEdge as g_, MetricContent as gm, MetricLayout as gn, MetricLayoutDiagnostic as go, MetricLayoutOptions as gp, MetricSentiment as gq, MetricTextPart as gr, MetricTextSource as gs, MetricTrend as gt, MetricTrendColorOptions as gu, MetricTrendMark as gv, QuoteLayout as h$, OverlayLayer as h0, PhysicalAlignment as hC, PictureLuminance as hD, PictureText as hE, PictureTextAlignment as hF, PictureTextAnchor as hG, PictureTextCandidate as hH, PictureTextInput as hI, PictureTextPlacement as hJ, PictureWeights as hK, PortraitMode as hL, QuoteBodyOptions as hZ, QuoteContent as h_, IconReference as i, QuoteLayoutDiagnostic as i0, QuoteLayoutOptions as i1, QuoteMark as i2, QuoteMarks as i3, QuotePhoto as i4, QuoteTextPart as i5, QuoteTextSource as i6, ResolvedDesignHints as iA, ResolvedNumbering as iB, ResolvedScriptFonts as iC, RichText as iD, RichTextFit as iE, RichTextFragment as iF, RichTextLine as iG, RichTextOptions as iH, RichTextRun as iI, RowDemand as iJ, ReadingBox as ih, Reference as ii, ReferencesSlideOptions as ij, RegionAnchor as ik, RegionBinding as il, RegionBindingDiagnostic as im, RegionBindingResult as io, RegionFlow as ip, RegionKind as iq, RegionRole as ir, ResolveColorRefOptions as is, ResolveColorRefRoles as it, ResolveColorRolesOptions as iu, ResolveDesignHintsOptions as iv, ResolveScriptFontsOptions as iw, ResolvedChartDataLabels as ix, ResolvedChartHighlight as iy, ResolvedChartOptions as iz, IconResolution as j, TimelineLayoutDiagnostic as j$, SchemeColor as j8, SchemeNeutrals as j9, TableBorder as jI, TableCellLayout as jJ, TableCellStyle as jK, TableGrid as jL, TableGridCell as jM, TableGridIssue as jN, TableLayout as jO, TableLayoutOptions as jP, TableRowLayout as jQ, TextDirection as jR, TextFit as jS, TextLineInk as jT, TextLineSegment as jU, TextLineSource as jV, TextPlacement as jW, TextPlacementLine as jX, TimelineContent as jY, TimelineEvent as jZ, TimelineLayout as j_, ScrimEdge as ja, ScriptFontApp as jb, ScriptFontSlots as jc, ScriptFontSource as jd, ScriptFontSupplement as je, ScriptMeasurementProfile as jf, ScriptRole as jg, ShapeEnd as jh, ShapeStyleLook as ji, ShapeStyleName as jj, SiblingPlotChart as jk, SlideCitations as jl, SlideComposition as jm, SmartArtCandidate as jn, SocialProfile as jo, SourceTextFit as jp, IconSetRecord as k, TimelineLayoutOptions as k0, TimelineMarkerShape as k1, TimelineStatus as k2, TimelineStatusColors as k3, TimelineTextPart as k4, WaterfallRole as k5, WaterfallStep as k6, WatermarkTextLayout as k7, WatermarkTextOptions as k8, LanguageFamilyName as n, LanguageVocabulary as o, LogoShape as p, LogoVariant as q, MeasureTextWidth as r, ResolveLogoOptions as s, ResolvedIcon as t, ResolvedLogo as u, SocialPlatformVocabulary as v, TextStyle as w };
|