reamkit 1.32.1 → 1.33.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +16 -11
  3. package/dist/esm/core/bidi/algorithm.js +2 -2
  4. package/dist/esm/core/bidi/char-types.js +1 -1
  5. package/dist/esm/core/bidi/index.js +3 -3
  6. package/dist/esm/core/bytes.js +1 -1
  7. package/dist/esm/core/converter/facade.js +10 -5
  8. package/dist/esm/core/converter/ream.d.ts +9 -0
  9. package/dist/esm/core/converter/ream.js +40 -10
  10. package/dist/esm/core/crypto/asn1.js +2 -2
  11. package/dist/esm/core/crypto/cms.js +5 -3
  12. package/dist/esm/core/crypto/index.js +2 -1
  13. package/dist/esm/core/crypto/offcrypto.d.ts +2 -5
  14. package/dist/esm/core/crypto/offcrypto.js +9 -15
  15. package/dist/esm/core/crypto/password-error.d.ts +8 -0
  16. package/dist/esm/core/crypto/password-error.js +14 -0
  17. package/dist/esm/core/crypto/primitives.js +16 -16
  18. package/dist/esm/core/document-model/index.d.ts +1 -1
  19. package/dist/esm/core/document-model/types.d.ts +174 -2
  20. package/dist/esm/core/drawingml/chart-geometry.d.ts +24 -6
  21. package/dist/esm/core/drawingml/chart-geometry.js +905 -208
  22. package/dist/esm/core/drawingml/chart-parser.d.ts +5 -1
  23. package/dist/esm/core/drawingml/chart-parser.js +275 -19
  24. package/dist/esm/core/drawingml/chart-text.d.ts +41 -0
  25. package/dist/esm/core/drawingml/chart-text.js +93 -0
  26. package/dist/esm/core/drawingml/colors.js +5 -5
  27. package/dist/esm/core/drawingml/diagram/layout-engine.js +1 -4
  28. package/dist/esm/core/drawingml/diagram/run.js +2 -1
  29. package/dist/esm/core/drawingml/preset-geometry.js +4 -6
  30. package/dist/esm/core/drawingml/shape-render.js +1 -1
  31. package/dist/esm/core/drawingml/text-warp.js +4 -16
  32. package/dist/esm/core/drawingml/theme-parser.js +14 -8
  33. package/dist/esm/core/font/arabic-joining.js +2 -2
  34. package/dist/esm/core/font/binary-reader.js +2 -0
  35. package/dist/esm/core/font/font-registry.js +1 -0
  36. package/dist/esm/core/font/ligatures.js +1 -1
  37. package/dist/esm/core/font/opentype-layout.js +11 -5
  38. package/dist/esm/core/font/ttf-build.js +6 -10
  39. package/dist/esm/core/font/ttf-parser.js +2 -1
  40. package/dist/esm/core/font/ttf-subset.js +8 -8
  41. package/dist/esm/core/fonts/families.js +1 -1
  42. package/dist/esm/core/fonts/remote-fonts.js +4 -4
  43. package/dist/esm/core/hyphenation/index.js +1 -1
  44. package/dist/esm/core/images.js +8 -8
  45. package/dist/esm/core/ir/adapters.d.ts +9 -0
  46. package/dist/esm/core/ir/loss.js +1 -0
  47. package/dist/esm/core/line-breaker/cjk.js +1 -1
  48. package/dist/esm/core/line-breaker/index.js +4 -3
  49. package/dist/esm/core/links.js +1 -1
  50. package/dist/esm/core/lzw.js +1 -1
  51. package/dist/esm/core/metafile/blit.js +1 -1
  52. package/dist/esm/core/metafile/emf.js +5 -7
  53. package/dist/esm/core/metafile/picture.js +1 -1
  54. package/dist/esm/core/metafile/symbol-fonts.js +7 -7
  55. package/dist/esm/core/metafile/wmf.js +5 -7
  56. package/dist/esm/core/number-format.js +4 -6
  57. package/dist/esm/core/numbering/index.js +3 -2
  58. package/dist/esm/core/ole/cfb.js +4 -4
  59. package/dist/esm/core/ole/escher-blip.js +1 -1
  60. package/dist/esm/core/opc/index.js +5 -4
  61. package/dist/esm/core/opc/package.js +3 -1
  62. package/dist/esm/core/opc/xml-entities.js +1 -1
  63. package/dist/esm/core/outline.js +1 -1
  64. package/dist/esm/core/png-encode.js +3 -3
  65. package/dist/esm/core/po-helpers.js +1 -1
  66. package/dist/esm/core/spreadsheet-model/types.d.ts +6 -0
  67. package/dist/esm/core/style-cascade/index.js +4 -3
  68. package/dist/esm/core/tiff.js +3 -1
  69. package/dist/esm/excel/activex-parser.js +1 -1
  70. package/dist/esm/excel/conditional-format.js +7 -7
  71. package/dist/esm/excel/formula/functions.js +8 -4
  72. package/dist/esm/excel/formula/index.js +3 -3
  73. package/dist/esm/excel/formula/lexer.js +2 -2
  74. package/dist/esm/excel/formula/parser.js +4 -3
  75. package/dist/esm/excel/formula/value.js +1 -1
  76. package/dist/esm/excel/index.js +7 -6
  77. package/dist/esm/excel/print-model.d.ts +1 -0
  78. package/dist/esm/excel/print-model.js +7 -32
  79. package/dist/esm/excel/printer-settings.js +6 -7
  80. package/dist/esm/excel/rich-value.js +1 -1
  81. package/dist/esm/excel/sheet-shape-parser.js +4 -2
  82. package/dist/esm/excel/sheet-to-flow.d.ts +8 -0
  83. package/dist/esm/excel/sheet-to-flow.js +14 -11
  84. package/dist/esm/excel/styles-parser.js +5 -3
  85. package/dist/esm/excel/tint.js +5 -5
  86. package/dist/esm/excel/vml-drawing.js +2 -2
  87. package/dist/esm/excel/worksheet-parser.js +5 -5
  88. package/dist/esm/excel/xls/biff-chart.js +1 -3
  89. package/dist/esm/excel/xls/biff-reader.js +10 -11
  90. package/dist/esm/excel/xls/xls-reader.js +1 -1
  91. package/dist/esm/excel/xlsx-reader.js +17 -4
  92. package/dist/esm/excel/xlsx-to-pdf.js +1 -1
  93. package/dist/esm/excel/xlsx-writer.js +2 -2
  94. package/dist/esm/html/html-writer.js +18 -10
  95. package/dist/esm/index.js +2 -1
  96. package/dist/esm/layout/line-paint.js +1 -1
  97. package/dist/esm/layout/math-layout.js +5 -8
  98. package/dist/esm/layout/styled-layout.js +133 -75
  99. package/dist/esm/layout/turned-section.js +2 -2
  100. package/dist/esm/markdown/markdown-writer.js +50 -9
  101. package/dist/esm/pdf/encryption.js +9 -9
  102. package/dist/esm/pdf/icc-profile.js +2 -2
  103. package/dist/esm/pdf/index.js +3 -2
  104. package/dist/esm/pdf/objects.js +7 -0
  105. package/dist/esm/pdf/serialize.js +1 -1
  106. package/dist/esm/pdf/struct-tree.js +3 -1
  107. package/dist/esm/pdf/styled-page-emitter.js +23 -15
  108. package/dist/esm/pdf/styled-page-renderer.js +9 -5
  109. package/dist/esm/pdf-reader/annot-draw.js +3 -3
  110. package/dist/esm/pdf-reader/ccitt.js +2 -1
  111. package/dist/esm/pdf-reader/cff-outline.js +1 -4
  112. package/dist/esm/pdf-reader/content.js +13 -15
  113. package/dist/esm/pdf-reader/decrypt.d.ts +18 -6
  114. package/dist/esm/pdf-reader/decrypt.js +90 -45
  115. package/dist/esm/pdf-reader/document.d.ts +7 -1
  116. package/dist/esm/pdf-reader/document.js +18 -4
  117. package/dist/esm/pdf-reader/encodings.js +1 -1
  118. package/dist/esm/pdf-reader/flow-build.js +4 -6
  119. package/dist/esm/pdf-reader/font.js +3 -3
  120. package/dist/esm/pdf-reader/function.js +8 -7
  121. package/dist/esm/pdf-reader/icc.js +1 -1
  122. package/dist/esm/pdf-reader/images.js +1 -1
  123. package/dist/esm/pdf-reader/jbig2.js +36 -38
  124. package/dist/esm/pdf-reader/jpeg.js +14 -13
  125. package/dist/esm/pdf-reader/layout.js +12 -9
  126. package/dist/esm/pdf-reader/lexer.js +2 -1
  127. package/dist/esm/pdf-reader/math-rows.js +2 -2
  128. package/dist/esm/pdf-reader/optional-content.js +1 -1
  129. package/dist/esm/pdf-reader/page-numbers.js +1 -1
  130. package/dist/esm/pdf-reader/pattern-tint.js +1 -2
  131. package/dist/esm/pdf-reader/reader.d.ts +5 -1
  132. package/dist/esm/pdf-reader/reader.js +83 -16
  133. package/dist/esm/pdf-reader/struct-tree.js +1 -1
  134. package/dist/esm/pdf-reader/tagged.js +3 -2
  135. package/dist/esm/pdf-reader/text.js +2 -2
  136. package/dist/esm/pdf-reader/type1-outline.js +1 -3
  137. package/dist/esm/pptx/embedded-fonts.js +3 -5
  138. package/dist/esm/pptx/placeholder-cascade.js +1 -1
  139. package/dist/esm/pptx/ppt/ppt-reader.js +5 -4
  140. package/dist/esm/pptx/ppt/ppt-text.js +9 -10
  141. package/dist/esm/pptx/pptx-reader.js +6 -5
  142. package/dist/esm/pptx/preset-table-styles.js +1 -1
  143. package/dist/esm/pptx/slide-parser.js +6 -4
  144. package/dist/esm/pptx/sp-helpers.js +1 -1
  145. package/dist/esm/pptx/table-style.js +2 -1
  146. package/dist/esm/svg/svg-writer.js +1 -1
  147. package/dist/esm/word/doc/doc-reader.js +2 -2
  148. package/dist/esm/word/doc/doc-text.js +20 -22
  149. package/dist/esm/word/document-parser.js +26 -21
  150. package/dist/esm/word/docx-reader.js +2 -2
  151. package/dist/esm/word/docx-to-pdf.js +3 -3
  152. package/dist/esm/word/docx-writer.js +10 -6
  153. package/dist/esm/word/drawing-parser.js +18 -18
  154. package/dist/esm/word/font-table.js +1 -1
  155. package/dist/esm/word/index.js +6 -5
  156. package/dist/esm/word/numbering-parser.js +4 -3
  157. package/dist/esm/word/omml-parser.js +1 -1
  158. package/dist/esm/word/paragraph-properties.js +11 -10
  159. package/dist/esm/word/run-properties.js +4 -4
  160. package/dist/esm/word/settings-parser.js +2 -1
  161. package/dist/esm/word/shading.js +1 -1
  162. package/dist/esm/word/styles-parser.js +5 -4
  163. package/dist/esm/word/table-parser.js +4 -4
  164. package/dist/esm/word/theme-fonts.js +1 -1
  165. package/package.json +9 -3
@@ -1429,6 +1429,16 @@ export interface ChartSeries {
1429
1429
  readonly xValues?: ReadonlyArray<number>;
1430
1430
  readonly colorHex?: string;
1431
1431
  readonly pointColors?: ReadonlyArray<ChartDataPoint>;
1432
+ /**
1433
+ * §21.2.2.61 `c:explosion` — how far a pie's slices stand out from its
1434
+ * centre, as a percentage of its radius: the series' own, and each point's
1435
+ * (`c:dPt/c:explosion`) over it.
1436
+ */
1437
+ readonly explosion?: number;
1438
+ readonly pointExplosions?: ReadonlyArray<{
1439
+ readonly idx: number;
1440
+ readonly percent: number;
1441
+ }>;
1432
1442
  /**
1433
1443
  * §21.2.2.49 `c:dLbl/c:tx` — a data label the author typed rather than one
1434
1444
  * the chart computes, by point index. Excel and Calc print it verbatim: it
@@ -1440,6 +1450,19 @@ export interface ChartSeries {
1440
1450
  readonly idx: number;
1441
1451
  readonly text: string;
1442
1452
  }>;
1453
+ /**
1454
+ * §21.2.2.47 `c:dLbl` — where one point's label stands, when the point says:
1455
+ * its own `c:dLblPos`, and the `c:layout/c:manualLayout` it was dragged to —
1456
+ * `x` and `y` fractions of the chart, the label's own top-left corner where
1457
+ * `edge`, else how far it moved from where the chart would set it.
1458
+ */
1459
+ readonly pointLabelPlacements?: ReadonlyArray<{
1460
+ readonly idx: number;
1461
+ readonly position?: ChartLabelPosition;
1462
+ readonly x?: number;
1463
+ readonly y?: number;
1464
+ readonly edge?: boolean;
1465
+ }>;
1443
1466
  /**
1444
1467
  * §21.2.2.59 `c:val/c:numRef/c:f` and §21.2.2.215 `c:tx/c:strRef/c:f` — where
1445
1468
  * the series reads its numbers and its name FROM, when the chart part carries
@@ -1489,10 +1512,76 @@ export interface ChartLineStyle {
1489
1512
  /** §20.1.10.49 `a:prstDash` — the rule's dash pattern, when it names one. */
1490
1513
  readonly dash?: ShapeDash;
1491
1514
  }
1515
+ /** A 3-D chart's wall or floor (§21.2.2.11, §21.2.2.69, §21.2.2.191): its fill and rule. */
1516
+ export interface ChartSurface {
1517
+ /** `c:spPr/a:solidFill` — RRGGBB; absent, unfilled. */
1518
+ readonly fillHex?: string;
1519
+ /** `c:spPr/a:ln` — its rule, `{ none: true }` for `a:noFill`; absent, the default. */
1520
+ readonly line?: ChartLineStyle;
1521
+ }
1522
+ /**
1523
+ * §21.2.2.216 `c:txPr`, §21.2.2.156 `c:rich` — how one kind of a chart's text
1524
+ * is set: the element's own run properties over the chart's (`c:chartSpace/
1525
+ * c:txPr`) over the application's defaults, theme tokens resolved.
1526
+ */
1527
+ export interface ChartTextStyle {
1528
+ /** `a:latin@typeface` — the family, `+mn-lt`/`+mj-lt` already resolved. */
1529
+ readonly family?: string;
1530
+ /** `@sz`, in points. */
1531
+ readonly sizePt?: number;
1532
+ readonly bold?: boolean;
1533
+ readonly italic?: boolean;
1534
+ /** `a:solidFill` — the text colour as RRGGBB. */
1535
+ readonly colorHex?: string;
1536
+ }
1537
+ /** A chart's text by role, each resolved through the cascade on its own. */
1538
+ export interface ChartTextStyles {
1539
+ /** `c:chart/c:title`. */
1540
+ readonly title?: ChartTextStyle;
1541
+ /** `c:legend` — the entries. */
1542
+ readonly legend?: ChartTextStyle;
1543
+ /** The category axis's tick labels — a scatter's horizontal value axis. */
1544
+ readonly catAxis?: ChartTextStyle;
1545
+ /** The value axis's tick labels — a scatter's upright one. */
1546
+ readonly valAxis?: ChartTextStyle;
1547
+ /** The secondary value axis's tick labels. */
1548
+ readonly secondaryValAxis?: ChartTextStyle;
1549
+ readonly catAxisTitle?: ChartTextStyle;
1550
+ readonly valAxisTitle?: ChartTextStyle;
1551
+ readonly secondaryValAxisTitle?: ChartTextStyle;
1552
+ /** `c:dLbls` — the values and labels printed on the data. */
1553
+ readonly dataLabels?: ChartTextStyle;
1554
+ }
1555
+ /** §21.2.2.48 ST_DLblPos — where a data label stands against its point. */
1556
+ export type ChartLabelPosition = 'bestFit' | 'b' | 'ctr' | 'inBase' | 'inEnd' | 'l' | 'outEnd' | 'r' | 't';
1557
+ /**
1558
+ * §21.2.2.49 `c:dLbls` — what a chart's data labels show and how their parts
1559
+ * are joined: the chart group's switches, the first series' own over them.
1560
+ */
1561
+ export interface ChartDataLabels {
1562
+ readonly showVal?: boolean;
1563
+ readonly showCatName?: boolean;
1564
+ readonly showSerName?: boolean;
1565
+ readonly showPercent?: boolean;
1566
+ /** §21.2.2.166 `c:separator` — between the parts; absent, Excel's ", ". */
1567
+ readonly separator?: string;
1568
+ /** `c:dLbls/c:numFmt@formatCode`, when the labels have their own. */
1569
+ readonly numberFormat?: string;
1570
+ /** §21.2.2.48 `c:dLblPos` — where the labels stand. */
1571
+ readonly position?: ChartLabelPosition;
1572
+ /** §21.2.2.183 `c:showLeaderLines` — a label set off its slice is tied back to it. */
1573
+ readonly showLeaderLines?: boolean;
1574
+ }
1492
1575
  /** A parsed chart (§21.2): its type, title, categories, series and rendering options. */
1493
1576
  export interface Chart {
1494
1577
  readonly type: ChartType;
1495
1578
  readonly title?: string;
1579
+ /**
1580
+ * The chart's text, role by role, as its application sets it. Absent when
1581
+ * the reader resolves none: the renderer then keeps its own sizes and greys
1582
+ * in the document's base face.
1583
+ */
1584
+ readonly text?: ChartTextStyles;
1496
1585
  readonly categories: ReadonlyArray<string>;
1497
1586
  /** §21.2.2.24 `c:cat/…/c:f` — where the categories live, when uncached. */
1498
1587
  readonly categoriesRef?: string;
@@ -1512,12 +1601,72 @@ export interface Chart {
1512
1601
  readonly barDir?: 'col' | 'bar';
1513
1602
  readonly grouping?: 'clustered' | 'stacked' | 'percentStacked' | 'standard';
1514
1603
  readonly doughnut?: boolean;
1604
+ /**
1605
+ * §21.2.2.140 `c:pie3DChart` with §21.2.2.228 `c:view3D` — a pie drawn as a
1606
+ * tilted disc: `rotX` the elevation in degrees (90 looks straight down),
1607
+ * `rotY` how far its first slice is turned clockwise from twelve o'clock.
1608
+ */
1609
+ readonly pie3D?: {
1610
+ readonly rotX: number;
1611
+ readonly rotY: number;
1612
+ };
1613
+ /**
1614
+ * §21.2.2.15 `c:bar3DChart` with §21.2.2.228 `c:view3D` — bars drawn as
1615
+ * boxes standing in a box of walls and a floor, seen at an angle with the
1616
+ * axes kept square: `rotX` the elevation and `rotY` the turn in degrees,
1617
+ * `depthPercent` a bar's depth as a percentage of its width, `gapDepth` the
1618
+ * room before and behind it as a percentage of its depth.
1619
+ */
1620
+ readonly bar3D?: {
1621
+ readonly rotX: number;
1622
+ readonly rotY: number;
1623
+ readonly depthPercent: number;
1624
+ readonly gapDepth: number;
1625
+ };
1626
+ /**
1627
+ * §21.2.2.69 `c:floor` — a 3-D chart's floor, the wall its bars stand on:
1628
+ * its fill and its rule. Absent, it is unfilled and ruled in light grey.
1629
+ */
1630
+ readonly floor?: ChartSurface;
1631
+ /** §21.2.2.11 `c:backWall` — the wall behind the bars; absent, nothing drawn. */
1632
+ readonly backWall?: ChartSurface;
1633
+ /** §21.2.2.191 `c:sideWall` — the wall beside them; absent, nothing drawn. */
1634
+ readonly sideWall?: ChartSurface;
1635
+ /** §21.2.2.68 `c:firstSliceAng` — a flat pie's first slice, degrees clockwise from twelve. */
1636
+ readonly firstSliceAngle?: number;
1637
+ /**
1638
+ * §21.2.2.104 `c:plotArea/c:layout/c:manualLayout` in `edge` mode — the box
1639
+ * the author sized the plot to, as fractions of the chart from its top
1640
+ * left; a pie is fitted into it whole, keeping its shape.
1641
+ */
1642
+ readonly plotBox?: {
1643
+ readonly x: number;
1644
+ readonly y: number;
1645
+ readonly w: number;
1646
+ readonly h: number;
1647
+ /**
1648
+ * `c:layoutTarget` `inner` — the box is the plot's own rectangle, the
1649
+ * axes' labels outside it; else (`outer`) it holds them too.
1650
+ */
1651
+ readonly inner?: boolean;
1652
+ };
1515
1653
  readonly showValues?: boolean;
1654
+ /**
1655
+ * §21.2.2.49 — the data labels' switches, when the chart has a `c:dLbls` at
1656
+ * all. Absent, it labels nothing.
1657
+ */
1658
+ readonly dataLabels?: ChartDataLabels;
1516
1659
  /**
1517
1660
  * §21.2.2.75 `c:gapWidth` — the gap between category slots as a percentage
1518
1661
  * of the bar width. Absent ⇒ the schema's 150.
1519
1662
  */
1520
1663
  readonly gapPercent?: number;
1664
+ /**
1665
+ * §21.2.2.131 `c:overlap` — how far the bars of one category's cluster lie
1666
+ * over each other, as a percentage of a bar's width: −100 a bar's width
1667
+ * apart … 100 one on the next. Absent ⇒ 0, bars side by side.
1668
+ */
1669
+ readonly overlapPercent?: number;
1521
1670
  readonly catAxisTitle?: string;
1522
1671
  /**
1523
1672
  * §21.2.2.134 `c:catAx/c:scaling/c:orientation` = `maxMin` — the category
@@ -1567,8 +1716,21 @@ export interface Chart {
1567
1716
  readonly valAxisLine?: ChartLineStyle;
1568
1717
  /** §21.2.2.196 — the secondary value axis's own rule. */
1569
1718
  readonly secondaryValAxisLine?: ChartLineStyle;
1570
- /** §21.2.2.87 `c:majorGridlines/c:spPr/a:ln` — the gridlines' own rule. */
1719
+ /**
1720
+ * §21.2.2.100 `c:majorGridlines` of the value axis (a scatter's upright one)
1721
+ * — its own rule (§21.2.2.197 `c:spPr/a:ln`). An axis without the element
1722
+ * rules nothing, which reads `{ none: true }`; absent, the default rule.
1723
+ */
1571
1724
  readonly gridLine?: ChartLineStyle;
1725
+ /** The same for a scatter's lying (x) axis. */
1726
+ readonly xGridLine?: ChartLineStyle;
1727
+ /**
1728
+ * §21.2.2.40 `c:delete` — the author deleted the category axis (a scatter's
1729
+ * x axis): neither its rule nor its labels are drawn, nor room kept for them.
1730
+ */
1731
+ readonly catAxisDeleted?: boolean;
1732
+ /** §21.2.2.40 — …or the value axis (a scatter's upright one). */
1733
+ readonly valAxisDeleted?: boolean;
1572
1734
  /**
1573
1735
  * §21.2.2.157 `c:valAx/c:scaling/c:min|c:max` — the value axis the AUTHOR
1574
1736
  * fixed. Absent means "auto", and only then is the range read off the data:
@@ -1578,10 +1740,20 @@ export interface Chart {
1578
1740
  readonly valAxisMin?: number;
1579
1741
  readonly valAxisMax?: number;
1580
1742
  /**
1581
- * §21.2.2.98 `c:valAx/c:majorUnit` — the step between the value axis's
1743
+ * §21.2.2.103 `c:valAx/c:majorUnit` — the step between the value axis's
1582
1744
  * labels, when the author fixed it. Absent ⇒ the application's own choice.
1583
1745
  */
1584
1746
  readonly valAxisMajorUnit?: number;
1747
+ /**
1748
+ * §21.2.2.226 — a scatter's lying value axis, the x's: the ends and step the
1749
+ * author fixed and its number format, as {@link Chart.valAxisMin},
1750
+ * {@link Chart.valAxisMax}, {@link Chart.valAxisMajorUnit} and
1751
+ * {@link Chart.numberFormat} are its upright one's.
1752
+ */
1753
+ readonly xAxisMin?: number;
1754
+ readonly xAxisMax?: number;
1755
+ readonly xAxisMajorUnit?: number;
1756
+ readonly xNumberFormat?: string;
1585
1757
  /**
1586
1758
  * §21.2.2.198 `c:chartSpace/c:spPr` — the frame around the whole chart: its
1587
1759
  * background fill and its outline. Excel writes both on every chart it
@@ -20,10 +20,14 @@ export interface ChartPolyline {
20
20
  readonly strokeHex: string;
21
21
  readonly widthPt: number;
22
22
  }
23
- /** A closed, filled polygon (area-chart bands). Drawn before strokes/labels. */
23
+ /**
24
+ * A closed polygon: area-chart bands, the faces of 3-D bars, a 3-D chart's
25
+ * walls. Drawn before rectangles, strokes and labels; one without a fill is
26
+ * its outline alone.
27
+ */
24
28
  export interface ChartPolygon {
25
29
  readonly points: ReadonlyArray<readonly [number, number]>;
26
- readonly fillHex: string;
30
+ readonly fillHex?: string;
27
31
  readonly strokeHex?: string;
28
32
  readonly widthPt?: number;
29
33
  }
@@ -44,7 +48,7 @@ export interface ChartWedge {
44
48
  /** How a {@link ChartLabel} sits horizontally relative to its anchor point. */
45
49
  export type LabelAlign = 'left' | 'center' | 'right';
46
50
  /** A text label (title, axis tick, category, data value, legend entry). */
47
- export interface ChartLabel {
51
+ export interface ChartLabel extends ChartFont {
48
52
  readonly text: string;
49
53
  /** Anchor point; `align` says how text sits relative to it. */
50
54
  readonly x: number;
@@ -80,6 +84,11 @@ export interface ChartScene {
80
84
  * frame and under the gridlines.
81
85
  */
82
86
  readonly plotBackground?: ChartRect;
87
+ /**
88
+ * §21.2.2.69/§21.2.2.11/§21.2.2.191 — a 3-D chart's floor and walls, drawn
89
+ * over the plot's own fill and under its gridlines.
90
+ */
91
+ readonly walls?: ReadonlyArray<ChartPolygon>;
83
92
  /**
84
93
  * Major gridlines, drawn UNDER the plotted data. Kept apart from the other
85
94
  * polylines because z-order is the whole point: gridlines over the bars strip
@@ -88,12 +97,21 @@ export interface ChartScene {
88
97
  */
89
98
  readonly gridlines?: ReadonlyArray<ChartPolyline>;
90
99
  }
100
+ /**
101
+ * The face a chart's text is set in beyond its size: the family the chart
102
+ * names (absent — the document's own) and its weight and slant.
103
+ */
104
+ export interface ChartFont {
105
+ readonly family?: string;
106
+ readonly bold?: boolean;
107
+ readonly italic?: boolean;
108
+ }
91
109
  /**
92
110
  * Injected text-width measurer: the rendered advance width (points) of `text` at
93
- * `sizePt`. Keeps this module free of any font/PDF dependency, so it is
94
- * unit-testable in isolation.
111
+ * `sizePt`, in `font` when the chart names one. Keeps this module free of any
112
+ * font/PDF dependency, so it is unit-testable in isolation.
95
113
  */
96
- export type MeasureText = (text: string, sizePt: number) => number;
114
+ export type MeasureText = (text: string, sizePt: number, font?: ChartFont) => number;
97
115
  /** Font size (points) for axis ticks, category/data labels and legend text. */
98
116
  export declare const CHART_LABEL_PT = 9;
99
117
  /** Font size (points) for the chart title. */