reamkit 1.22.0 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/esm/core/converter/ream.d.ts +16 -0
  2. package/dist/esm/core/converter/ream.js +59 -9
  3. package/dist/esm/core/document-model/types.d.ts +18 -0
  4. package/dist/esm/core/drawingml/chart-geometry.js +11 -5
  5. package/dist/esm/core/drawingml/colors.d.ts +4 -2
  6. package/dist/esm/core/drawingml/colors.js +15 -0
  7. package/dist/esm/core/drawingml/theme-parser.d.ts +38 -0
  8. package/dist/esm/core/drawingml/theme-parser.js +64 -1
  9. package/dist/esm/core/fonts/families.d.ts +10 -0
  10. package/dist/esm/core/fonts/families.js +44 -0
  11. package/dist/esm/core/fonts/index.d.ts +3 -2
  12. package/dist/esm/core/fonts/remote-fonts.d.ts +50 -0
  13. package/dist/esm/core/fonts/remote-fonts.js +114 -8
  14. package/dist/esm/core/fonts/scripts.d.ts +26 -0
  15. package/dist/esm/core/fonts/scripts.js +177 -0
  16. package/dist/esm/core/metafile/blit.d.ts +33 -0
  17. package/dist/esm/core/metafile/blit.js +67 -0
  18. package/dist/esm/core/metafile/dib.d.ts +61 -0
  19. package/dist/esm/core/metafile/dib.js +205 -0
  20. package/dist/esm/core/metafile/emf.js +137 -23
  21. package/dist/esm/core/metafile/picture.d.ts +12 -1
  22. package/dist/esm/core/metafile/wmf.js +149 -9
  23. package/dist/esm/core/ole/escher-blip.d.ts +12 -0
  24. package/dist/esm/core/ole/escher-blip.js +88 -0
  25. package/dist/esm/{pdf-reader → core}/png-encode.js +1 -1
  26. package/dist/esm/excel/print-model.js +3 -1
  27. package/dist/esm/excel/styles-parser.js +1 -1
  28. package/dist/esm/excel/xls/biff-reader.js +53 -18
  29. package/dist/esm/excel/xls/biff-styles.d.ts +5 -2
  30. package/dist/esm/excel/xls/biff-styles.js +9 -7
  31. package/dist/esm/excel/xls/escher.js +90 -24
  32. package/dist/esm/layout/page-doc.d.ts +39 -0
  33. package/dist/esm/layout/styled-layout.d.ts +2 -2
  34. package/dist/esm/layout/styled-layout.js +301 -35
  35. package/dist/esm/pdf/styled-page-emitter.js +35 -2
  36. package/dist/esm/pdf-reader/image-decode.js +1 -1
  37. package/dist/esm/pptx/embedded-fonts.d.ts +31 -0
  38. package/dist/esm/pptx/embedded-fonts.js +104 -0
  39. package/dist/esm/pptx/placeholder-cascade.d.ts +73 -6
  40. package/dist/esm/pptx/placeholder-cascade.js +114 -18
  41. package/dist/esm/pptx/ppt/ppt-reader.js +120 -10
  42. package/dist/esm/pptx/ppt/ppt-text.d.ts +66 -1
  43. package/dist/esm/pptx/ppt/ppt-text.js +576 -137
  44. package/dist/esm/pptx/pptx-reader.d.ts +8 -0
  45. package/dist/esm/pptx/pptx-reader.js +27 -5
  46. package/dist/esm/pptx/preset-table-styles.d.ts +9 -0
  47. package/dist/esm/pptx/preset-table-styles.js +27 -0
  48. package/dist/esm/pptx/slide-parser.d.ts +7 -1
  49. package/dist/esm/pptx/slide-parser.js +106 -33
  50. package/dist/esm/pptx/sp-helpers.d.ts +2 -1
  51. package/dist/esm/pptx/sp-helpers.js +3 -2
  52. package/dist/esm/pptx/table-style.d.ts +9 -1
  53. package/dist/esm/pptx/table-style.js +49 -7
  54. package/dist/esm/word/document-parser.d.ts +7 -1
  55. package/dist/esm/word/document-parser.js +6 -6
  56. package/dist/esm/word/docx-reader.js +6 -3
  57. package/dist/esm/word/docx-to-pdf.d.ts +8 -7
  58. package/dist/esm/word/docx-to-pdf.js +25 -7
  59. package/dist/esm/word/drawing-parser.js +31 -19
  60. package/dist/esm/word/numbering-parser.d.ts +2 -1
  61. package/dist/esm/word/numbering-parser.js +6 -6
  62. package/dist/esm/word/paragraph-properties.d.ts +2 -1
  63. package/dist/esm/word/paragraph-properties.js +2 -2
  64. package/dist/esm/word/run-properties.d.ts +5 -2
  65. package/dist/esm/word/run-properties.js +13 -8
  66. package/dist/esm/word/styles-parser.d.ts +2 -1
  67. package/dist/esm/word/styles-parser.js +12 -12
  68. package/dist/esm/word/table-parser.js +3 -3
  69. package/dist/esm/word/theme-fonts.d.ts +10 -0
  70. package/dist/esm/word/theme-fonts.js +28 -0
  71. package/package.json +1 -1
  72. /package/dist/esm/{pdf-reader → core}/png-encode.d.ts +0 -0
@@ -1,6 +1,8 @@
1
1
  /** A run of uniformly-formatted text within a paragraph (PPT-2). */
2
2
  export interface PptRun {
3
3
  readonly text: string;
4
+ /** The typeface the run names, resolved through the deck's font collection. */
5
+ readonly fontFamily?: string;
4
6
  readonly bold?: boolean;
5
7
  readonly italic?: boolean;
6
8
  readonly underline?: boolean;
@@ -20,6 +22,12 @@ export interface PptParagraph {
20
22
  readonly align?: number;
21
23
  /** The 0-based outline/indent level. */
22
24
  readonly level?: number;
25
+ /**
26
+ * §2.9.20 — the bullet character this paragraph is marked with, already
27
+ * translated out of whatever symbol font stated it. Absent when the paragraph
28
+ * carries none.
29
+ */
30
+ readonly bullet?: string;
23
31
  }
24
32
  /**
25
33
  * An embedded picture referenced by a slide shape — the raw image bytes pulled
@@ -80,6 +88,35 @@ export interface PptAutoShape {
80
88
  readonly fillColorHex?: string;
81
89
  /** The resolved line colour as 6-hex RGB, when present. */
82
90
  readonly lineColorHex?: string;
91
+ /**
92
+ * MS-ODRAW §2.3.7.1 — the two-colour sweep a `fillType` of 4..8 asks for.
93
+ * `fillColor` is one end and `fillBackColor` the other; `fillAngle` is where
94
+ * it runs. Read as its fillColor alone, 41246-2's title slide came out a flat
95
+ * teal where every reader fades it to white.
96
+ */
97
+ readonly gradient?: {
98
+ readonly fromHex: string;
99
+ readonly toHex: string;
100
+ readonly angleDeg: number;
101
+ readonly radial: boolean;
102
+ };
103
+ /**
104
+ * §2.3.7.1 MSOFILLTYPE 3 — a picture stretched over the shape, its blip named
105
+ * by `fillBlip`. A `.ppt` table is a group of cell rectangles, and a cell with
106
+ * a picture background states it exactly this way.
107
+ */
108
+ readonly image?: PptImage;
109
+ /** §2.3.7.1 MSOFILLTYPE 2 — the picture REPEATS at its own size, not stretched. */
110
+ readonly imageTiled?: boolean;
111
+ /**
112
+ * §2.3.7.11/.12 `fillWidth` / `fillHeight` — the size one copy occupies, in
113
+ * points, when the shape states it rather than leaving the tile at the
114
+ * picture's own size.
115
+ */
116
+ readonly tileSizePt?: {
117
+ readonly widthPt: number;
118
+ readonly heightPt: number;
119
+ };
83
120
  readonly geometry?: PptCustomGeometry;
84
121
  }
85
122
  /**
@@ -89,13 +126,41 @@ export interface PptAutoShape {
89
126
  */
90
127
  export interface PptShape {
91
128
  readonly rectPt?: PptRect;
129
+ /**
130
+ * §2.3.22 — the shape IS a piece of WordArt: its text is the shape, centred
131
+ * in its box rather than flowed from the top. Drawn as an autoshape it was a
132
+ * coloured rectangle where the reference has a word.
133
+ */
134
+ readonly wordArt?: boolean;
135
+ /**
136
+ * Whether the shape is a placeholder (§2.9.24). On a MASTER that means it is
137
+ * a prototype, not decoration: drawn on the slides that follow it, every one
138
+ * of them would carry "Click to edit Master title style".
139
+ */
140
+ readonly placeholder?: boolean;
92
141
  readonly paragraphs?: ReadonlyArray<PptParagraph>;
93
142
  readonly image?: PptImage;
94
143
  readonly autoShape?: PptAutoShape;
95
144
  }
96
- /** One slide: its shapes in document order. */
145
+ /**
146
+ * A slide's background (PPT-12) — the fill on the shape MS-ODRAW marks with
147
+ * `fBackground`. A `.ppt` states it as a shape like any other; drawn as one it
148
+ * would be a rectangle among the content, and dropped it leaves a black slide
149
+ * white.
150
+ */
151
+ export interface PptBackground {
152
+ /** A solid fill's colour, as 6-hex RGB. */
153
+ readonly fillColorHex?: string;
154
+ /** A shaded fill, in the same terms an autoshape's is (PPT-9). */
155
+ readonly gradient?: PptAutoShape['gradient'];
156
+ /** A picture fill, stretched over the slide (or tiled across it). */
157
+ readonly image?: PptImage;
158
+ readonly imageTiled?: boolean;
159
+ }
160
+ /** One slide: its shapes in document order, over its background. */
97
161
  export interface PptSlide {
98
162
  readonly shapes: ReadonlyArray<PptShape>;
163
+ readonly background?: PptBackground;
99
164
  }
100
165
  /** The extracted content of a `.ppt`: its slides, deck page size and encryption flag. */
101
166
  export interface PptContent {