@ai-matrx/alchemy 0.15.0 → 0.17.4

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 (62) hide show
  1. package/CHANGELOG.md +74 -1
  2. package/dist/core.cjs +3 -3
  3. package/dist/core.cjs.map +1 -1
  4. package/dist/core.d.cts +27 -2
  5. package/dist/core.d.ts +27 -2
  6. package/dist/core.js +4 -4
  7. package/dist/core.js.map +1 -1
  8. package/dist/index.cjs +3 -3
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.d.cts +27 -2
  11. package/dist/index.d.ts +27 -2
  12. package/dist/index.js +4 -4
  13. package/dist/index.js.map +1 -1
  14. package/dist/operate-capture.cjs +2 -0
  15. package/dist/operate-capture.cjs.map +1 -0
  16. package/dist/operate-capture.d.cts +105 -0
  17. package/dist/operate-capture.d.ts +105 -0
  18. package/dist/operate-capture.js +2 -0
  19. package/dist/operate-capture.js.map +1 -0
  20. package/dist/operate-document.cjs +1 -1
  21. package/dist/operate-document.cjs.map +1 -1
  22. package/dist/operate-document.js +1 -1
  23. package/dist/operate-document.js.map +1 -1
  24. package/dist/operate-pptx.cjs +151 -0
  25. package/dist/operate-pptx.cjs.map +1 -0
  26. package/dist/operate-pptx.d.cts +2695 -0
  27. package/dist/operate-pptx.d.ts +2695 -0
  28. package/dist/operate-pptx.js +151 -0
  29. package/dist/operate-pptx.js.map +1 -0
  30. package/dist/operate-read.cjs +6 -0
  31. package/dist/operate-read.cjs.map +1 -0
  32. package/dist/operate-read.d.cts +174 -0
  33. package/dist/operate-read.d.ts +174 -0
  34. package/dist/operate-read.js +6 -0
  35. package/dist/operate-read.js.map +1 -0
  36. package/dist/operate-rich-html.cjs +1 -1
  37. package/dist/operate-rich-html.cjs.map +1 -1
  38. package/dist/operate-rich-html.js +1 -1
  39. package/dist/operate-rich-html.js.map +1 -1
  40. package/dist/operate-server.cjs +1 -1
  41. package/dist/operate-server.cjs.map +1 -1
  42. package/dist/operate-server.js +1 -1
  43. package/dist/operate-server.js.map +1 -1
  44. package/dist/operate-xlsx.cjs +3 -2
  45. package/dist/operate-xlsx.cjs.map +1 -1
  46. package/dist/operate-xlsx.d.cts +1227 -6
  47. package/dist/operate-xlsx.d.ts +1227 -6
  48. package/dist/operate-xlsx.js +3 -2
  49. package/dist/operate-xlsx.js.map +1 -1
  50. package/dist/operate-zip.cjs +2 -0
  51. package/dist/operate-zip.cjs.map +1 -0
  52. package/dist/operate-zip.d.cts +35 -0
  53. package/dist/operate-zip.d.ts +35 -0
  54. package/dist/operate-zip.js +2 -0
  55. package/dist/operate-zip.js.map +1 -0
  56. package/dist/operate.cjs +3 -3
  57. package/dist/operate.cjs.map +1 -1
  58. package/dist/operate.d.cts +27 -2
  59. package/dist/operate.d.ts +27 -2
  60. package/dist/operate.js +4 -4
  61. package/dist/operate.js.map +1 -1
  62. package/package.json +51 -5
@@ -0,0 +1,2695 @@
1
+ // Type definitions for pptxgenjs 4.0.1
2
+ // Project: https://gitbrent.github.io/PptxGenJS/
3
+ // Definitions by: Brent Ely <https://github.com/gitbrent/>
4
+ // Michael Beaumont <https://github.com/michaelbeaumont>
5
+ // Nicholas Tietz-Sokolsky <https://github.com/ntietz>
6
+ // David Adams <https://github.com/iota-pi>
7
+ // Stephen Cronin <https://github.com/cronin4392>
8
+ // TypeScript Version: 3.x
9
+
10
+
11
+
12
+ declare class PptxGenJS {
13
+ /**
14
+ * PptxGenJS Library Version
15
+ * @type {string}
16
+ */
17
+ readonly version: string
18
+
19
+ // Exposed prop types
20
+ readonly presLayout: PptxGenJS.PresLayout
21
+ readonly AlignH: typeof PptxGenJS.AlignH
22
+ readonly AlignV: typeof PptxGenJS.AlignV
23
+ readonly ChartType: typeof PptxGenJS.ChartType
24
+ readonly OutputType: typeof PptxGenJS.OutputType
25
+ readonly SchemeColor: typeof PptxGenJS.SchemeColor
26
+ readonly ShapeType: typeof PptxGenJS.ShapeType
27
+ readonly PlaceholderType: typeof PptxGenJS.PLACEHOLDER_TYPES
28
+
29
+ // Presentation Props
30
+
31
+ /**
32
+ * Presentation layout name.
33
+ * Standard layouts:
34
+ * - 'LAYOUT_4x3' (10" x 7.5")
35
+ * - 'LAYOUT_16x9' (10" x 5.625")
36
+ * - 'LAYOUT_16x10' (10" x 6.25")
37
+ * - 'LAYOUT_WIDE' (13.33" x 7.5")
38
+ *
39
+ * Custom layouts:
40
+ * - Use `pptx.defineLayout()` to create custom layouts (e.g.: 'A4')
41
+ *
42
+ * @type {string}
43
+ * @see https://support.office.com/en-us/article/Change-the-size-of-your-slides-040a811c-be43-40b9-8d04-0de5ed79987e
44
+ */
45
+ layout: string
46
+ /**
47
+ * Whether Right-to-Left (RTL) mode is enabled
48
+ * @type {boolean}
49
+ */
50
+ rtlMode: boolean
51
+
52
+ // Presentation Metadata
53
+ /**
54
+ * Author name
55
+ * @type {string}
56
+ */
57
+ author: string
58
+ /**
59
+ * Comapny name
60
+ * @type {string}
61
+ */
62
+ company: string
63
+ /**
64
+ * @type {string}
65
+ * @note the `revision` value must be a whole number only (without "." or "," - otherwise, PowerPoint will throw errors upon opening!)
66
+ */
67
+ revision: string
68
+ /**
69
+ * Presentation subject
70
+ * @type {string}
71
+ */
72
+ subject: string
73
+ /**
74
+ * Presentation theme (default fonts)
75
+ * @type {ThemeProps}
76
+ */
77
+ theme: PptxGenJS.ThemeProps
78
+ /**
79
+ * Presentation name
80
+ * @type {string}
81
+ */
82
+ title: string
83
+
84
+ // Methods
85
+
86
+ /**
87
+ * Export the current Presentation to stream
88
+ * @param {WriteBaseProps} props output properties
89
+ * @returns {Promise<string | ArrayBuffer | Blob | Uint8Array>} file stream
90
+ */
91
+ stream(props?: PptxGenJS.WriteBaseProps): Promise<string | ArrayBuffer | Blob | Uint8Array>
92
+ /**
93
+ * Export the current Presentation as JSZip content with the selected type
94
+ * @param {WriteProps} props output properties
95
+ * @returns {Promise<string | ArrayBuffer | Blob | Uint8Array>} file content in selected type
96
+ */
97
+ write(props?: PptxGenJS.WriteProps): Promise<string | ArrayBuffer | Blob | Uint8Array>
98
+ /**
99
+ * Export the current Presentation. Writes file to local file system if `fs` exists, otherwise, initiates download in browsers
100
+ * @param {WriteFileProps} props output file properties
101
+ * @example pptx.writeFile({ fileName:'CustomerReport.pptx' }) // export presentation as "CustomerReport.pptx"
102
+ * @example pptx.writeFile({ fileName:'CustomerReport.pptx', compression:true }) // export presentation as "CustomerReport.pptx" compressed (can save up to 30%)
103
+ * @returns {Promise<string>} the presentation name
104
+ */
105
+ writeFile(props?: PptxGenJS.WriteFileProps): Promise<string>
106
+ /**
107
+ * Add a new Section to Presentation
108
+ * @param {SectionProps} props section properties
109
+ * @example pptx.addSection({ title:'Charts' });
110
+ */
111
+ addSection(props: PptxGenJS.SectionProps): void
112
+ /**
113
+ * Add a new Slide to Presentation
114
+ * @param {AddSlideProps} props slide options
115
+ * @returns {Slide} the new Slide
116
+ */
117
+ addSlide(props?: PptxGenJS.AddSlideProps): PptxGenJS.Slide
118
+ /**
119
+ * Add a new Slide to Presentation
120
+ * @param {string} masterName master slide name
121
+ * @returns {Slide} the new Slide
122
+ * @deprecated use `addSlide(IAddSlideOptions)`
123
+ */
124
+ addSlide(masterName?: string): PptxGenJS.Slide
125
+ /**
126
+ * Create a custom Slide Layout in any size
127
+ * @param {PresLayout} layout an object with user-defined w/h
128
+ * @example pptx.defineLayout({ name:'A3', width:16.5, height:11.7 });
129
+ */
130
+ defineLayout(layout: PptxGenJS.PresLayout): void
131
+ /**
132
+ * Create a new slide master [layout] for the Presentation
133
+ * @param {SlideMasterProps} props layout definition
134
+ */
135
+ defineSlideMaster(props: PptxGenJS.SlideMasterProps): void
136
+ /**
137
+ * Reproduces an HTML table as a PowerPoint table - including column widths, style, etc. - creates 1 or more slides as needed
138
+ * @param {string} eleId table HTML element ID
139
+ * @param {TableToSlidesProps} props generation options
140
+ */
141
+ tableToSlides(eleId: string, props?: PptxGenJS.TableToSlidesProps): void
142
+ }
143
+
144
+ declare namespace PptxGenJS {
145
+ // Exported enums for module apps
146
+ // @example: pptxgen.ShapeType.rect
147
+ export enum AlignH {
148
+ 'left' = 'left',
149
+ 'center' = 'center',
150
+ 'right' = 'right',
151
+ 'justify' = 'justify',
152
+ }
153
+ export enum AlignV {
154
+ 'top' = 'top',
155
+ 'middle' = 'middle',
156
+ 'bottom' = 'bottom',
157
+ }
158
+ export enum ChartType {
159
+ 'area' = 'area',
160
+ 'bar' = 'bar',
161
+ 'bar3d' = 'bar3D',
162
+ 'bubble' = 'bubble',
163
+ 'bubble3d' = 'bubble3D',
164
+ 'doughnut' = 'doughnut',
165
+ 'line' = 'line',
166
+ 'pie' = 'pie',
167
+ 'radar' = 'radar',
168
+ 'scatter' = 'scatter',
169
+ }
170
+ export enum OutputType {
171
+ 'arraybuffer' = 'arraybuffer',
172
+ 'base64' = 'base64',
173
+ 'binarystring' = 'binarystring',
174
+ 'blob' = 'blob',
175
+ 'nodebuffer' = 'nodebuffer',
176
+ 'uint8array' = 'uint8array',
177
+ }
178
+ /**
179
+ * TODO: FUTURE: v4.0: rename to `SchemeColor`
180
+ */
181
+ export enum SchemeColor {
182
+ 'text1' = 'tx1',
183
+ 'text2' = 'tx2',
184
+ 'background1' = 'bg1',
185
+ 'background2' = 'bg2',
186
+ 'accent1' = 'accent1',
187
+ 'accent2' = 'accent2',
188
+ 'accent3' = 'accent3',
189
+ 'accent4' = 'accent4',
190
+ 'accent5' = 'accent5',
191
+ 'accent6' = 'accent6',
192
+ }
193
+ export enum ShapeType {
194
+ 'accentBorderCallout1' = 'accentBorderCallout1',
195
+ 'accentBorderCallout2' = 'accentBorderCallout2',
196
+ 'accentBorderCallout3' = 'accentBorderCallout3',
197
+ 'accentCallout1' = 'accentCallout1',
198
+ 'accentCallout2' = 'accentCallout2',
199
+ 'accentCallout3' = 'accentCallout3',
200
+ 'actionButtonBackPrevious' = 'actionButtonBackPrevious',
201
+ 'actionButtonBeginning' = 'actionButtonBeginning',
202
+ 'actionButtonBlank' = 'actionButtonBlank',
203
+ 'actionButtonDocument' = 'actionButtonDocument',
204
+ 'actionButtonEnd' = 'actionButtonEnd',
205
+ 'actionButtonForwardNext' = 'actionButtonForwardNext',
206
+ 'actionButtonHelp' = 'actionButtonHelp',
207
+ 'actionButtonHome' = 'actionButtonHome',
208
+ 'actionButtonInformation' = 'actionButtonInformation',
209
+ 'actionButtonMovie' = 'actionButtonMovie',
210
+ 'actionButtonReturn' = 'actionButtonReturn',
211
+ 'actionButtonSound' = 'actionButtonSound',
212
+ 'arc' = 'arc',
213
+ 'bentArrow' = 'bentArrow',
214
+ 'bentUpArrow' = 'bentUpArrow',
215
+ 'bevel' = 'bevel',
216
+ 'blockArc' = 'blockArc',
217
+ 'borderCallout1' = 'borderCallout1',
218
+ 'borderCallout2' = 'borderCallout2',
219
+ 'borderCallout3' = 'borderCallout3',
220
+ 'bracePair' = 'bracePair',
221
+ 'bracketPair' = 'bracketPair',
222
+ 'callout1' = 'callout1',
223
+ 'callout2' = 'callout2',
224
+ 'callout3' = 'callout3',
225
+ 'can' = 'can',
226
+ 'chartPlus' = 'chartPlus',
227
+ 'chartStar' = 'chartStar',
228
+ 'chartX' = 'chartX',
229
+ 'chevron' = 'chevron',
230
+ 'chord' = 'chord',
231
+ 'circularArrow' = 'circularArrow',
232
+ 'cloud' = 'cloud',
233
+ 'cloudCallout' = 'cloudCallout',
234
+ 'corner' = 'corner',
235
+ 'cornerTabs' = 'cornerTabs',
236
+ 'cube' = 'cube',
237
+ 'curvedDownArrow' = 'curvedDownArrow',
238
+ 'curvedLeftArrow' = 'curvedLeftArrow',
239
+ 'curvedRightArrow' = 'curvedRightArrow',
240
+ 'curvedUpArrow' = 'curvedUpArrow',
241
+ 'decagon' = 'decagon',
242
+ 'diagStripe' = 'diagStripe',
243
+ 'diamond' = 'diamond',
244
+ 'dodecagon' = 'dodecagon',
245
+ 'donut' = 'donut',
246
+ 'doubleWave' = 'doubleWave',
247
+ 'downArrow' = 'downArrow',
248
+ 'downArrowCallout' = 'downArrowCallout',
249
+ 'ellipse' = 'ellipse',
250
+ 'ellipseRibbon' = 'ellipseRibbon',
251
+ 'ellipseRibbon2' = 'ellipseRibbon2',
252
+ 'flowChartAlternateProcess' = 'flowChartAlternateProcess',
253
+ 'flowChartCollate' = 'flowChartCollate',
254
+ 'flowChartConnector' = 'flowChartConnector',
255
+ 'flowChartDecision' = 'flowChartDecision',
256
+ 'flowChartDelay' = 'flowChartDelay',
257
+ 'flowChartDisplay' = 'flowChartDisplay',
258
+ 'flowChartDocument' = 'flowChartDocument',
259
+ 'flowChartExtract' = 'flowChartExtract',
260
+ 'flowChartInputOutput' = 'flowChartInputOutput',
261
+ 'flowChartInternalStorage' = 'flowChartInternalStorage',
262
+ 'flowChartMagneticDisk' = 'flowChartMagneticDisk',
263
+ 'flowChartMagneticDrum' = 'flowChartMagneticDrum',
264
+ 'flowChartMagneticTape' = 'flowChartMagneticTape',
265
+ 'flowChartManualInput' = 'flowChartManualInput',
266
+ 'flowChartManualOperation' = 'flowChartManualOperation',
267
+ 'flowChartMerge' = 'flowChartMerge',
268
+ 'flowChartMultidocument' = 'flowChartMultidocument',
269
+ 'flowChartOfflineStorage' = 'flowChartOfflineStorage',
270
+ 'flowChartOffpageConnector' = 'flowChartOffpageConnector',
271
+ 'flowChartOnlineStorage' = 'flowChartOnlineStorage',
272
+ 'flowChartOr' = 'flowChartOr',
273
+ 'flowChartPredefinedProcess' = 'flowChartPredefinedProcess',
274
+ 'flowChartPreparation' = 'flowChartPreparation',
275
+ 'flowChartProcess' = 'flowChartProcess',
276
+ 'flowChartPunchedCard' = 'flowChartPunchedCard',
277
+ 'flowChartPunchedTape' = 'flowChartPunchedTape',
278
+ 'flowChartSort' = 'flowChartSort',
279
+ 'flowChartSummingJunction' = 'flowChartSummingJunction',
280
+ 'flowChartTerminator' = 'flowChartTerminator',
281
+ 'folderCorner' = 'folderCorner',
282
+ 'frame' = 'frame',
283
+ 'funnel' = 'funnel',
284
+ 'gear6' = 'gear6',
285
+ 'gear9' = 'gear9',
286
+ 'halfFrame' = 'halfFrame',
287
+ 'heart' = 'heart',
288
+ 'heptagon' = 'heptagon',
289
+ 'hexagon' = 'hexagon',
290
+ 'homePlate' = 'homePlate',
291
+ 'horizontalScroll' = 'horizontalScroll',
292
+ 'irregularSeal1' = 'irregularSeal1',
293
+ 'irregularSeal2' = 'irregularSeal2',
294
+ 'leftArrow' = 'leftArrow',
295
+ 'leftArrowCallout' = 'leftArrowCallout',
296
+ 'leftBrace' = 'leftBrace',
297
+ 'leftBracket' = 'leftBracket',
298
+ 'leftCircularArrow' = 'leftCircularArrow',
299
+ 'leftRightArrow' = 'leftRightArrow',
300
+ 'leftRightArrowCallout' = 'leftRightArrowCallout',
301
+ 'leftRightCircularArrow' = 'leftRightCircularArrow',
302
+ 'leftRightRibbon' = 'leftRightRibbon',
303
+ 'leftRightUpArrow' = 'leftRightUpArrow',
304
+ 'leftUpArrow' = 'leftUpArrow',
305
+ 'lightningBolt' = 'lightningBolt',
306
+ 'line' = 'line',
307
+ 'lineInv' = 'lineInv',
308
+ 'mathDivide' = 'mathDivide',
309
+ 'mathEqual' = 'mathEqual',
310
+ 'mathMinus' = 'mathMinus',
311
+ 'mathMultiply' = 'mathMultiply',
312
+ 'mathNotEqual' = 'mathNotEqual',
313
+ 'mathPlus' = 'mathPlus',
314
+ 'moon' = 'moon',
315
+ 'nonIsoscelesTrapezoid' = 'nonIsoscelesTrapezoid',
316
+ 'noSmoking' = 'noSmoking',
317
+ 'notchedRightArrow' = 'notchedRightArrow',
318
+ 'octagon' = 'octagon',
319
+ 'parallelogram' = 'parallelogram',
320
+ 'pentagon' = 'pentagon',
321
+ 'pie' = 'pie',
322
+ 'pieWedge' = 'pieWedge',
323
+ 'plaque' = 'plaque',
324
+ 'plaqueTabs' = 'plaqueTabs',
325
+ 'plus' = 'plus',
326
+ 'quadArrow' = 'quadArrow',
327
+ 'quadArrowCallout' = 'quadArrowCallout',
328
+ 'rect' = 'rect',
329
+ 'ribbon' = 'ribbon',
330
+ 'ribbon2' = 'ribbon2',
331
+ 'rightArrow' = 'rightArrow',
332
+ 'rightArrowCallout' = 'rightArrowCallout',
333
+ 'rightBrace' = 'rightBrace',
334
+ 'rightBracket' = 'rightBracket',
335
+ 'round1Rect' = 'round1Rect',
336
+ 'round2DiagRect' = 'round2DiagRect',
337
+ 'round2SameRect' = 'round2SameRect',
338
+ 'roundRect' = 'roundRect',
339
+ 'rtTriangle' = 'rtTriangle',
340
+ 'smileyFace' = 'smileyFace',
341
+ 'snip1Rect' = 'snip1Rect',
342
+ 'snip2DiagRect' = 'snip2DiagRect',
343
+ 'snip2SameRect' = 'snip2SameRect',
344
+ 'snipRoundRect' = 'snipRoundRect',
345
+ 'squareTabs' = 'squareTabs',
346
+ 'star10' = 'star10',
347
+ 'star12' = 'star12',
348
+ 'star16' = 'star16',
349
+ 'star24' = 'star24',
350
+ 'star32' = 'star32',
351
+ 'star4' = 'star4',
352
+ 'star5' = 'star5',
353
+ 'star6' = 'star6',
354
+ 'star7' = 'star7',
355
+ 'star8' = 'star8',
356
+ 'stripedRightArrow' = 'stripedRightArrow',
357
+ 'sun' = 'sun',
358
+ 'swooshArrow' = 'swooshArrow',
359
+ 'teardrop' = 'teardrop',
360
+ 'trapezoid' = 'trapezoid',
361
+ 'triangle' = 'triangle',
362
+ 'upArrow' = 'upArrow',
363
+ 'upArrowCallout' = 'upArrowCallout',
364
+ 'upDownArrow' = 'upDownArrow',
365
+ 'upDownArrowCallout' = 'upDownArrowCallout',
366
+ 'uturnArrow' = 'uturnArrow',
367
+ 'verticalScroll' = 'verticalScroll',
368
+ 'wave' = 'wave',
369
+ 'wedgeEllipseCallout' = 'wedgeEllipseCallout',
370
+ 'wedgeRectCallout' = 'wedgeRectCallout',
371
+ 'wedgeRoundRectCallout' = 'wedgeRoundRectCallout',
372
+ }
373
+ // used by charts, shape, text
374
+ export interface BorderOptions {
375
+ /**
376
+ * Border type
377
+ */
378
+ type?: 'none' | 'dash' | 'solid'
379
+ /**
380
+ * Border color (hex)
381
+ * @example 'FF3399'
382
+ */
383
+ color?: HexColor
384
+ /**
385
+ * Border size (points)
386
+ */
387
+ pt?: number
388
+ }
389
+ // These are used by browser/script clients and have been named like this since v0.1.
390
+ // Desc: charts and shapes for `pptxgen.charts.` `pptxgen.shapes.`
391
+ // Note: "charts" and "shapes" are manually created by cloning
392
+ export enum charts {
393
+ 'AREA' = 'area',
394
+ 'BAR' = 'bar',
395
+ 'BAR3D' = 'bar3D',
396
+ 'BUBBLE' = 'bubble',
397
+ 'DOUGHNUT' = 'doughnut',
398
+ 'LINE' = 'line',
399
+ 'PIE' = 'pie',
400
+ 'RADAR' = 'radar',
401
+ 'SCATTER' = 'scatter',
402
+ }
403
+ export enum shapes {
404
+ ACTION_BUTTON_BACK_OR_PREVIOUS = 'actionButtonBackPrevious',
405
+ ACTION_BUTTON_BEGINNING = 'actionButtonBeginning',
406
+ ACTION_BUTTON_CUSTOM = 'actionButtonBlank',
407
+ ACTION_BUTTON_DOCUMENT = 'actionButtonDocument',
408
+ ACTION_BUTTON_END = 'actionButtonEnd',
409
+ ACTION_BUTTON_FORWARD_OR_NEXT = 'actionButtonForwardNext',
410
+ ACTION_BUTTON_HELP = 'actionButtonHelp',
411
+ ACTION_BUTTON_HOME = 'actionButtonHome',
412
+ ACTION_BUTTON_INFORMATION = 'actionButtonInformation',
413
+ ACTION_BUTTON_MOVIE = 'actionButtonMovie',
414
+ ACTION_BUTTON_RETURN = 'actionButtonReturn',
415
+ ACTION_BUTTON_SOUND = 'actionButtonSound',
416
+ ARC = 'arc',
417
+ BALLOON = 'wedgeRoundRectCallout',
418
+ BENT_ARROW = 'bentArrow',
419
+ BENT_UP_ARROW = 'bentUpArrow',
420
+ BEVEL = 'bevel',
421
+ BLOCK_ARC = 'blockArc',
422
+ CAN = 'can',
423
+ CHART_PLUS = 'chartPlus',
424
+ CHART_STAR = 'chartStar',
425
+ CHART_X = 'chartX',
426
+ CHEVRON = 'chevron',
427
+ CHORD = 'chord',
428
+ CIRCULAR_ARROW = 'circularArrow',
429
+ CLOUD = 'cloud',
430
+ CLOUD_CALLOUT = 'cloudCallout',
431
+ CORNER = 'corner',
432
+ CORNER_TABS = 'cornerTabs',
433
+ CROSS = 'plus',
434
+ CUBE = 'cube',
435
+ CURVED_DOWN_ARROW = 'curvedDownArrow',
436
+ CURVED_DOWN_RIBBON = 'ellipseRibbon',
437
+ CURVED_LEFT_ARROW = 'curvedLeftArrow',
438
+ CURVED_RIGHT_ARROW = 'curvedRightArrow',
439
+ CURVED_UP_ARROW = 'curvedUpArrow',
440
+ CURVED_UP_RIBBON = 'ellipseRibbon2',
441
+ DECAGON = 'decagon',
442
+ DIAGONAL_STRIPE = 'diagStripe',
443
+ DIAMOND = 'diamond',
444
+ DODECAGON = 'dodecagon',
445
+ DONUT = 'donut',
446
+ DOUBLE_BRACE = 'bracePair',
447
+ DOUBLE_BRACKET = 'bracketPair',
448
+ DOUBLE_WAVE = 'doubleWave',
449
+ DOWN_ARROW = 'downArrow',
450
+ DOWN_ARROW_CALLOUT = 'downArrowCallout',
451
+ DOWN_RIBBON = 'ribbon',
452
+ EXPLOSION1 = 'irregularSeal1',
453
+ EXPLOSION2 = 'irregularSeal2',
454
+ FLOWCHART_ALTERNATE_PROCESS = 'flowChartAlternateProcess',
455
+ FLOWCHART_CARD = 'flowChartPunchedCard',
456
+ FLOWCHART_COLLATE = 'flowChartCollate',
457
+ FLOWCHART_CONNECTOR = 'flowChartConnector',
458
+ FLOWCHART_DATA = 'flowChartInputOutput',
459
+ FLOWCHART_DECISION = 'flowChartDecision',
460
+ FLOWCHART_DELAY = 'flowChartDelay',
461
+ FLOWCHART_DIRECT_ACCESS_STORAGE = 'flowChartMagneticDrum',
462
+ FLOWCHART_DISPLAY = 'flowChartDisplay',
463
+ FLOWCHART_DOCUMENT = 'flowChartDocument',
464
+ FLOWCHART_EXTRACT = 'flowChartExtract',
465
+ FLOWCHART_INTERNAL_STORAGE = 'flowChartInternalStorage',
466
+ FLOWCHART_MAGNETIC_DISK = 'flowChartMagneticDisk',
467
+ FLOWCHART_MANUAL_INPUT = 'flowChartManualInput',
468
+ FLOWCHART_MANUAL_OPERATION = 'flowChartManualOperation',
469
+ FLOWCHART_MERGE = 'flowChartMerge',
470
+ FLOWCHART_MULTIDOCUMENT = 'flowChartMultidocument',
471
+ FLOWCHART_OFFLINE_STORAGE = 'flowChartOfflineStorage',
472
+ FLOWCHART_OFFPAGE_CONNECTOR = 'flowChartOffpageConnector',
473
+ FLOWCHART_OR = 'flowChartOr',
474
+ FLOWCHART_PREDEFINED_PROCESS = 'flowChartPredefinedProcess',
475
+ FLOWCHART_PREPARATION = 'flowChartPreparation',
476
+ FLOWCHART_PROCESS = 'flowChartProcess',
477
+ FLOWCHART_PUNCHED_TAPE = 'flowChartPunchedTape',
478
+ FLOWCHART_SEQUENTIAL_ACCESS_STORAGE = 'flowChartMagneticTape',
479
+ FLOWCHART_SORT = 'flowChartSort',
480
+ FLOWCHART_STORED_DATA = 'flowChartOnlineStorage',
481
+ FLOWCHART_SUMMING_JUNCTION = 'flowChartSummingJunction',
482
+ FLOWCHART_TERMINATOR = 'flowChartTerminator',
483
+ FOLDED_CORNER = 'folderCorner',
484
+ FRAME = 'frame',
485
+ FUNNEL = 'funnel',
486
+ GEAR_6 = 'gear6',
487
+ GEAR_9 = 'gear9',
488
+ HALF_FRAME = 'halfFrame',
489
+ HEART = 'heart',
490
+ HEPTAGON = 'heptagon',
491
+ HEXAGON = 'hexagon',
492
+ HORIZONTAL_SCROLL = 'horizontalScroll',
493
+ ISOSCELES_TRIANGLE = 'triangle',
494
+ LEFT_ARROW = 'leftArrow',
495
+ LEFT_ARROW_CALLOUT = 'leftArrowCallout',
496
+ LEFT_BRACE = 'leftBrace',
497
+ LEFT_BRACKET = 'leftBracket',
498
+ LEFT_CIRCULAR_ARROW = 'leftCircularArrow',
499
+ LEFT_RIGHT_ARROW = 'leftRightArrow',
500
+ LEFT_RIGHT_ARROW_CALLOUT = 'leftRightArrowCallout',
501
+ LEFT_RIGHT_CIRCULAR_ARROW = 'leftRightCircularArrow',
502
+ LEFT_RIGHT_RIBBON = 'leftRightRibbon',
503
+ LEFT_RIGHT_UP_ARROW = 'leftRightUpArrow',
504
+ LEFT_UP_ARROW = 'leftUpArrow',
505
+ LIGHTNING_BOLT = 'lightningBolt',
506
+ LINE_CALLOUT_1 = 'borderCallout1',
507
+ LINE_CALLOUT_1_ACCENT_BAR = 'accentCallout1',
508
+ LINE_CALLOUT_1_BORDER_AND_ACCENT_BAR = 'accentBorderCallout1',
509
+ LINE_CALLOUT_1_NO_BORDER = 'callout1',
510
+ LINE_CALLOUT_2 = 'borderCallout2',
511
+ LINE_CALLOUT_2_ACCENT_BAR = 'accentCallout2',
512
+ LINE_CALLOUT_2_BORDER_AND_ACCENT_BAR = 'accentBorderCallout2',
513
+ LINE_CALLOUT_2_NO_BORDER = 'callout2',
514
+ LINE_CALLOUT_3 = 'borderCallout3',
515
+ LINE_CALLOUT_3_ACCENT_BAR = 'accentCallout3',
516
+ LINE_CALLOUT_3_BORDER_AND_ACCENT_BAR = 'accentBorderCallout3',
517
+ LINE_CALLOUT_3_NO_BORDER = 'callout3',
518
+ LINE_CALLOUT_4 = 'borderCallout4',
519
+ LINE_CALLOUT_4_ACCENT_BAR = 'accentCallout4',
520
+ LINE_CALLOUT_4_BORDER_AND_ACCENT_BAR = 'accentBorderCallout4',
521
+ LINE_CALLOUT_4_NO_BORDER = 'callout4',
522
+ LINE = 'line',
523
+ LINE_INVERSE = 'lineInv',
524
+ MATH_DIVIDE = 'mathDivide',
525
+ MATH_EQUAL = 'mathEqual',
526
+ MATH_MINUS = 'mathMinus',
527
+ MATH_MULTIPLY = 'mathMultiply',
528
+ MATH_NOT_EQUAL = 'mathNotEqual',
529
+ MATH_PLUS = 'mathPlus',
530
+ MOON = 'moon',
531
+ NON_ISOSCELES_TRAPEZOID = 'nonIsoscelesTrapezoid',
532
+ NOTCHED_RIGHT_ARROW = 'notchedRightArrow',
533
+ NO_SYMBOL = 'noSmoking',
534
+ OCTAGON = 'octagon',
535
+ OVAL = 'ellipse',
536
+ OVAL_CALLOUT = 'wedgeEllipseCallout',
537
+ PARALLELOGRAM = 'parallelogram',
538
+ PENTAGON = 'homePlate',
539
+ PIE = 'pie',
540
+ PIE_WEDGE = 'pieWedge',
541
+ PLAQUE = 'plaque',
542
+ PLAQUE_TABS = 'plaqueTabs',
543
+ QUAD_ARROW = 'quadArrow',
544
+ QUAD_ARROW_CALLOUT = 'quadArrowCallout',
545
+ RECTANGLE = 'rect',
546
+ RECTANGULAR_CALLOUT = 'wedgeRectCallout',
547
+ REGULAR_PENTAGON = 'pentagon',
548
+ RIGHT_ARROW = 'rightArrow',
549
+ RIGHT_ARROW_CALLOUT = 'rightArrowCallout',
550
+ RIGHT_BRACE = 'rightBrace',
551
+ RIGHT_BRACKET = 'rightBracket',
552
+ RIGHT_TRIANGLE = 'rtTriangle',
553
+ ROUNDED_RECTANGLE = 'roundRect',
554
+ ROUNDED_RECTANGULAR_CALLOUT = 'wedgeRoundRectCallout',
555
+ ROUND_1_RECTANGLE = 'round1Rect',
556
+ ROUND_2_DIAG_RECTANGLE = 'round2DiagRect',
557
+ ROUND_2_SAME_RECTANGLE = 'round2SameRect',
558
+ SMILEY_FACE = 'smileyFace',
559
+ SNIP_1_RECTANGLE = 'snip1Rect',
560
+ SNIP_2_DIAG_RECTANGLE = 'snip2DiagRect',
561
+ SNIP_2_SAME_RECTANGLE = 'snip2SameRect',
562
+ SNIP_ROUND_RECTANGLE = 'snipRoundRect',
563
+ SQUARE_TABS = 'squareTabs',
564
+ STAR_10_POINT = 'star10',
565
+ STAR_12_POINT = 'star12',
566
+ STAR_16_POINT = 'star16',
567
+ STAR_24_POINT = 'star24',
568
+ STAR_32_POINT = 'star32',
569
+ STAR_4_POINT = 'star4',
570
+ STAR_5_POINT = 'star5',
571
+ STAR_6_POINT = 'star6',
572
+ STAR_7_POINT = 'star7',
573
+ STAR_8_POINT = 'star8',
574
+ STRIPED_RIGHT_ARROW = 'stripedRightArrow',
575
+ SUN = 'sun',
576
+ SWOOSH_ARROW = 'swooshArrow',
577
+ TEAR = 'teardrop',
578
+ TRAPEZOID = 'trapezoid',
579
+ UP_ARROW = 'upArrow',
580
+ UP_ARROW_CALLOUT = 'upArrowCallout',
581
+ UP_DOWN_ARROW = 'upDownArrow',
582
+ UP_DOWN_ARROW_CALLOUT = 'upDownArrowCallout',
583
+ UP_RIBBON = 'ribbon2',
584
+ U_TURN_ARROW = 'uturnArrow',
585
+ VERTICAL_SCROLL = 'verticalScroll',
586
+ WAVE = 'wave',
587
+ }
588
+
589
+ // @source `core-enums.ts`
590
+ export type JSZIP_OUTPUT_TYPE = 'arraybuffer' | 'base64' | 'binarystring' | 'blob' | 'nodebuffer' | 'uint8array'
591
+ export type WRITE_OUTPUT_TYPE = JSZIP_OUTPUT_TYPE | 'STREAM'
592
+ export enum CHART_TYPE {
593
+ 'AREA' = 'area',
594
+ 'BAR' = 'bar',
595
+ 'BAR3D' = 'bar3D',
596
+ 'BUBBLE' = 'bubble',
597
+ 'DOUGHNUT' = 'doughnut',
598
+ 'LINE' = 'line',
599
+ 'PIE' = 'pie',
600
+ 'RADAR' = 'radar',
601
+ 'SCATTER' = 'scatter',
602
+ }
603
+ export enum SCHEME_COLOR_NAMES {
604
+ 'TEXT1' = 'tx1',
605
+ 'TEXT2' = 'tx2',
606
+ 'BACKGROUND1' = 'bg1',
607
+ 'BACKGROUND2' = 'bg2',
608
+ 'ACCENT1' = 'accent1',
609
+ 'ACCENT2' = 'accent2',
610
+ 'ACCENT3' = 'accent3',
611
+ 'ACCENT4' = 'accent4',
612
+ 'ACCENT5' = 'accent5',
613
+ 'ACCENT6' = 'accent6',
614
+ }
615
+
616
+ // @source `core-interfaces.d.ts` (via import)
617
+ // @code `import { CHART_NAME, PLACEHOLDER_TYPES, SHAPE_NAME, SLIDE_OBJECT_TYPES, TEXT_HALIGN, TEXT_VALIGN, WRITE_OUTPUT_TYPE } from './core-enums'`
618
+ export type CHART_NAME = 'area' | 'bar' | 'bar3D' | 'bubble' | 'doughnut' | 'line' | 'pie' | 'radar' | 'scatter'
619
+ export enum PLACEHOLDER_TYPES {
620
+ 'title' = 'title',
621
+ 'body' = 'body',
622
+ 'image' = 'pic',
623
+ 'chart' = 'chart',
624
+ 'table' = 'tbl',
625
+ 'media' = 'media',
626
+ }
627
+ export type PLACEHOLDER_TYPE = 'title' | 'body' | 'pic' | 'chart' | 'tbl' | 'media'
628
+
629
+ export type SHAPE_NAME =
630
+ | 'accentBorderCallout1'
631
+ | 'accentBorderCallout2'
632
+ | 'accentBorderCallout3'
633
+ | 'accentCallout1'
634
+ | 'accentCallout2'
635
+ | 'accentCallout3'
636
+ | 'actionButtonBackPrevious'
637
+ | 'actionButtonBeginning'
638
+ | 'actionButtonBlank'
639
+ | 'actionButtonDocument'
640
+ | 'actionButtonEnd'
641
+ | 'actionButtonForwardNext'
642
+ | 'actionButtonHelp'
643
+ | 'actionButtonHome'
644
+ | 'actionButtonInformation'
645
+ | 'actionButtonMovie'
646
+ | 'actionButtonReturn'
647
+ | 'actionButtonSound'
648
+ | 'arc'
649
+ | 'bentArrow'
650
+ | 'bentUpArrow'
651
+ | 'bevel'
652
+ | 'blockArc'
653
+ | 'borderCallout1'
654
+ | 'borderCallout2'
655
+ | 'borderCallout3'
656
+ | 'bracePair'
657
+ | 'bracketPair'
658
+ | 'callout1'
659
+ | 'callout2'
660
+ | 'callout3'
661
+ | 'can'
662
+ | 'chartPlus'
663
+ | 'chartStar'
664
+ | 'chartX'
665
+ | 'chevron'
666
+ | 'chord'
667
+ | 'circularArrow'
668
+ | 'cloud'
669
+ | 'cloudCallout'
670
+ | 'corner'
671
+ | 'cornerTabs'
672
+ | 'cube'
673
+ | 'curvedDownArrow'
674
+ | 'curvedLeftArrow'
675
+ | 'curvedRightArrow'
676
+ | 'curvedUpArrow'
677
+ | 'decagon'
678
+ | 'diagStripe'
679
+ | 'diamond'
680
+ | 'dodecagon'
681
+ | 'donut'
682
+ | 'doubleWave'
683
+ | 'downArrow'
684
+ | 'downArrowCallout'
685
+ | 'ellipse'
686
+ | 'ellipseRibbon'
687
+ | 'ellipseRibbon2'
688
+ | 'flowChartAlternateProcess'
689
+ | 'flowChartCollate'
690
+ | 'flowChartConnector'
691
+ | 'flowChartDecision'
692
+ | 'flowChartDelay'
693
+ | 'flowChartDisplay'
694
+ | 'flowChartDocument'
695
+ | 'flowChartExtract'
696
+ | 'flowChartInputOutput'
697
+ | 'flowChartInternalStorage'
698
+ | 'flowChartMagneticDisk'
699
+ | 'flowChartMagneticDrum'
700
+ | 'flowChartMagneticTape'
701
+ | 'flowChartManualInput'
702
+ | 'flowChartManualOperation'
703
+ | 'flowChartMerge'
704
+ | 'flowChartMultidocument'
705
+ | 'flowChartOfflineStorage'
706
+ | 'flowChartOffpageConnector'
707
+ | 'flowChartOnlineStorage'
708
+ | 'flowChartOr'
709
+ | 'flowChartPredefinedProcess'
710
+ | 'flowChartPreparation'
711
+ | 'flowChartProcess'
712
+ | 'flowChartPunchedCard'
713
+ | 'flowChartPunchedTape'
714
+ | 'flowChartSort'
715
+ | 'flowChartSummingJunction'
716
+ | 'flowChartTerminator'
717
+ | 'folderCorner'
718
+ | 'frame'
719
+ | 'funnel'
720
+ | 'gear6'
721
+ | 'gear9'
722
+ | 'halfFrame'
723
+ | 'heart'
724
+ | 'heptagon'
725
+ | 'hexagon'
726
+ | 'homePlate'
727
+ | 'horizontalScroll'
728
+ | 'irregularSeal1'
729
+ | 'irregularSeal2'
730
+ | 'leftArrow'
731
+ | 'leftArrowCallout'
732
+ | 'leftBrace'
733
+ | 'leftBracket'
734
+ | 'leftCircularArrow'
735
+ | 'leftRightArrow'
736
+ | 'leftRightArrowCallout'
737
+ | 'leftRightCircularArrow'
738
+ | 'leftRightRibbon'
739
+ | 'leftRightUpArrow'
740
+ | 'leftUpArrow'
741
+ | 'lightningBolt'
742
+ | 'line'
743
+ | 'lineInv'
744
+ | 'mathDivide'
745
+ | 'mathEqual'
746
+ | 'mathMinus'
747
+ | 'mathMultiply'
748
+ | 'mathNotEqual'
749
+ | 'mathPlus'
750
+ | 'moon'
751
+ | 'noSmoking'
752
+ | 'nonIsoscelesTrapezoid'
753
+ | 'notchedRightArrow'
754
+ | 'octagon'
755
+ | 'parallelogram'
756
+ | 'pentagon'
757
+ | 'pie'
758
+ | 'pieWedge'
759
+ | 'plaque'
760
+ | 'plaqueTabs'
761
+ | 'plus'
762
+ | 'quadArrow'
763
+ | 'quadArrowCallout'
764
+ | 'rect'
765
+ | 'ribbon'
766
+ | 'ribbon2'
767
+ | 'rightArrow'
768
+ | 'rightArrowCallout'
769
+ | 'rightBrace'
770
+ | 'rightBracket'
771
+ | 'round1Rect'
772
+ | 'round2DiagRect'
773
+ | 'round2SameRect'
774
+ | 'roundRect'
775
+ | 'rtTriangle'
776
+ | 'smileyFace'
777
+ | 'snip1Rect'
778
+ | 'snip2DiagRect'
779
+ | 'snip2SameRect'
780
+ | 'snipRoundRect'
781
+ | 'squareTabs'
782
+ | 'star10'
783
+ | 'star12'
784
+ | 'star16'
785
+ | 'star24'
786
+ | 'star32'
787
+ | 'star4'
788
+ | 'star5'
789
+ | 'star6'
790
+ | 'star7'
791
+ | 'star8'
792
+ | 'stripedRightArrow'
793
+ | 'sun'
794
+ | 'swooshArrow'
795
+ | 'teardrop'
796
+ | 'trapezoid'
797
+ | 'triangle'
798
+ | 'upArrow'
799
+ | 'upArrowCallout'
800
+ | 'upDownArrow'
801
+ | 'upDownArrowCallout'
802
+ | 'uturnArrow'
803
+ | 'verticalScroll'
804
+ | 'wave'
805
+ | 'wedgeEllipseCallout'
806
+ | 'wedgeRectCallout'
807
+ | 'wedgeRoundRectCallout'
808
+
809
+ export enum SLIDE_OBJECT_TYPES {
810
+ 'chart' = 'chart',
811
+ 'hyperlink' = 'hyperlink',
812
+ 'image' = 'image',
813
+ 'media' = 'media',
814
+ 'online' = 'online',
815
+ 'placeholder' = 'placeholder',
816
+ 'table' = 'table',
817
+ 'tablecell' = 'tablecell',
818
+ 'text' = 'text',
819
+ 'notes' = 'notes',
820
+ }
821
+ export enum TEXT_HALIGN {
822
+ 'left' = 'left',
823
+ 'center' = 'center',
824
+ 'right' = 'right',
825
+ 'justify' = 'justify',
826
+ }
827
+ export enum TEXT_VALIGN {
828
+ 'b' = 'b',
829
+ 'ctr' = 'ctr',
830
+ 't' = 't',
831
+ }
832
+
833
+ // @source `core-interfaces.d.ts` (direct)
834
+ // Core Types
835
+ // ==========
836
+
837
+ /**
838
+ * Coordinate number - either:
839
+ * - Inches (0-n)
840
+ * - Percentage (0-100)
841
+ *
842
+ * @example 10.25 // coordinate in inches
843
+ * @example '75%' // coordinate as percentage of slide size
844
+ */
845
+ export type Coord = number | `${number}%`
846
+ export interface PositionProps {
847
+ /**
848
+ * Horizontal position
849
+ * - inches or percentage
850
+ * @example 10.25 // position in inches
851
+ * @example '75%' // position as percentage of slide size
852
+ */
853
+ x?: Coord
854
+ /**
855
+ * Vertical position
856
+ * - inches or percentage
857
+ * @example 10.25 // position in inches
858
+ * @example '75%' // position as percentage of slide size
859
+ */
860
+ y?: Coord
861
+ /**
862
+ * Height
863
+ * - inches or percentage
864
+ * @example 10.25 // height in inches
865
+ * @example '75%' // height as percentage of slide size
866
+ */
867
+ h?: Coord
868
+ /**
869
+ * Width
870
+ * - inches or percentage
871
+ * @example 10.25 // width in inches
872
+ * @example '75%' // width as percentage of slide size
873
+ */
874
+ w?: Coord
875
+ }
876
+ /**
877
+ * Either `data` or `path` is required
878
+ */
879
+ export interface DataOrPathProps {
880
+ /**
881
+ * URL or relative path
882
+ *
883
+ * @example 'https://onedrives.com/myimg.png` // retrieve image via URL
884
+ * @example '/home/gitbrent/images/myimg.png` // retrieve image via local path
885
+ */
886
+ path?: string
887
+ /**
888
+ * base64-encoded string
889
+ * - Useful for avoiding potential path/server issues
890
+ *
891
+ * @example 'image/png;base64,iVtDafDrBF[...]=' // pre-encoded image in base-64
892
+ */
893
+ data?: string
894
+ }
895
+ export interface BackgroundProps extends DataOrPathProps, ShapeFillProps {
896
+ /**
897
+ * Color (hex format)
898
+ * @deprecated v3.6.0 - use `ShapeFillProps` instead
899
+ */
900
+ fill?: HexColor
901
+
902
+ /**
903
+ * source URL
904
+ * @deprecated v3.6.0 - use `DataOrPathProps` instead - remove in v4.0.0
905
+ */
906
+ src?: string
907
+ }
908
+ /**
909
+ * Color in Hex format
910
+ * @example 'FF3399'
911
+ */
912
+ export type HexColor = string
913
+ export type ThemeColor = 'tx1' | 'tx2' | 'bg1' | 'bg2' | 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6'
914
+ export type Color = HexColor | ThemeColor
915
+ export type Margin = number | [number, number, number, number]
916
+ export type HAlign = 'left' | 'center' | 'right' | 'justify'
917
+ export type VAlign = 'top' | 'middle' | 'bottom'
918
+
919
+ // used by charts, shape, text
920
+ export interface BorderProps {
921
+ /**
922
+ * Border type
923
+ * @default solid
924
+ */
925
+ type?: 'none' | 'dash' | 'solid'
926
+ /**
927
+ * Border color (hex)
928
+ * @example 'FF3399'
929
+ * @default '666666'
930
+ */
931
+ color?: HexColor
932
+
933
+ // TODO: add `transparency` prop to Borders (0-100%)
934
+
935
+ // TODO: add `width` - deprecate `pt`
936
+ /**
937
+ * Border size (points)
938
+ * @default 1
939
+ */
940
+ pt?: number
941
+ }
942
+ // used by: image, object, text,
943
+ export interface HyperlinkProps {
944
+ //_rId: number
945
+ /**
946
+ * Slide number to link to
947
+ */
948
+ slide?: number
949
+ /**
950
+ * Url to link to
951
+ */
952
+ url?: string
953
+ /**
954
+ * Hyperlink Tooltip
955
+ */
956
+ tooltip?: string
957
+ }
958
+ // used by: chart, text, image
959
+ export interface ShadowProps {
960
+ /**
961
+ * shadow type
962
+ * @default 'none'
963
+ */
964
+ type: 'outer' | 'inner' | 'none'
965
+ /**
966
+ * opacity (percent)
967
+ * - range: 0.0-1.0
968
+ * @example 0.5 // 50% opaque
969
+ */
970
+ opacity?: number // TODO: "Transparency (0-100%)" in PPT // TODO: deprecate and add `transparency`
971
+ /**
972
+ * blur (points)
973
+ * - range: 0-100
974
+ * @default 0
975
+ */
976
+ blur?: number
977
+ /**
978
+ * angle (degrees)
979
+ * - range: 0-359
980
+ * @default 0
981
+ */
982
+ angle?: number
983
+ /**
984
+ * shadow offset (points)
985
+ * - range: 0-200
986
+ * @default 0
987
+ */
988
+ offset?: number // TODO: "Distance" in PPT
989
+ /**
990
+ * shadow color (hex format)
991
+ * @example 'FF3399'
992
+ */
993
+ color?: HexColor
994
+ /**
995
+ * whether to rotate shadow with shape
996
+ * @default false
997
+ */
998
+ rotateWithShape?: boolean
999
+ }
1000
+ // used by: shape, table, text
1001
+ export interface ShapeFillProps {
1002
+ /**
1003
+ * Fill color
1004
+ * - `HexColor` or `ThemeColor`
1005
+ * @example 'FF0000' // hex color (red)
1006
+ * @example pptx.SchemeColor.text1 // Theme color (Text1)
1007
+ */
1008
+ color?: Color
1009
+ /**
1010
+ * Transparency (percent)
1011
+ * - MS-PPT > Format Shape > Fill & Line > Fill > Transparency
1012
+ * - range: 0-100
1013
+ * @default 0
1014
+ */
1015
+ transparency?: number
1016
+ /**
1017
+ * Fill type
1018
+ * @default 'solid'
1019
+ */
1020
+ type?: 'none' | 'solid'
1021
+
1022
+ /**
1023
+ * Transparency (percent)
1024
+ * @deprecated v3.3.0 - use `transparency`
1025
+ */
1026
+ alpha?: number
1027
+ }
1028
+ export interface ShapeLineProps extends ShapeFillProps {
1029
+ /**
1030
+ * Line width (pt)
1031
+ * @default 1
1032
+ */
1033
+ width?: number
1034
+ /**
1035
+ * Dash type
1036
+ * @default 'solid'
1037
+ */
1038
+ dashType?: 'solid' | 'dash' | 'dashDot' | 'lgDash' | 'lgDashDot' | 'lgDashDotDot' | 'sysDash' | 'sysDot'
1039
+ /**
1040
+ * Begin arrow type
1041
+ * @since v3.3.0
1042
+ */
1043
+ beginArrowType?: 'none' | 'arrow' | 'diamond' | 'oval' | 'stealth' | 'triangle'
1044
+ /**
1045
+ * End arrow type
1046
+ * @since v3.3.0
1047
+ */
1048
+ endArrowType?: 'none' | 'arrow' | 'diamond' | 'oval' | 'stealth' | 'triangle'
1049
+ // FUTURE: beginArrowSize (1-9)
1050
+ // FUTURE: endArrowSize (1-9)
1051
+
1052
+ /**
1053
+ * Dash type
1054
+ * @deprecated v3.3.0 - use `dashType`
1055
+ */
1056
+ lineDash?: 'solid' | 'dash' | 'dashDot' | 'lgDash' | 'lgDashDot' | 'lgDashDotDot' | 'sysDash' | 'sysDot'
1057
+ /**
1058
+ * @deprecated v3.3.0 - use `beginArrowType`
1059
+ */
1060
+ lineHead?: 'none' | 'arrow' | 'diamond' | 'oval' | 'stealth' | 'triangle'
1061
+ /**
1062
+ * @deprecated v3.3.0 - use `endArrowType`
1063
+ */
1064
+ lineTail?: 'none' | 'arrow' | 'diamond' | 'oval' | 'stealth' | 'triangle'
1065
+ /**
1066
+ * Line width (pt)
1067
+ * @deprecated v3.3.0 - use `width`
1068
+ */
1069
+ pt?: number
1070
+ /**
1071
+ * Line size (pt)
1072
+ * @deprecated v3.3.0 - use `width`
1073
+ */
1074
+ size?: number
1075
+ }
1076
+ // used by: chart, slide, table, text
1077
+ export interface TextBaseProps {
1078
+ /**
1079
+ * Horizontal alignment
1080
+ * @default 'left'
1081
+ */
1082
+ align?: HAlign
1083
+ /**
1084
+ * Bold style
1085
+ * @default false
1086
+ */
1087
+ bold?: boolean
1088
+ /**
1089
+ * Add a line-break
1090
+ * @default false
1091
+ */
1092
+ breakLine?: boolean
1093
+ /**
1094
+ * Add standard or custom bullet
1095
+ * - use `true` for standard bullet
1096
+ * - pass object options for custom bullet
1097
+ * @default false
1098
+ */
1099
+ bullet?:
1100
+ | boolean
1101
+ | {
1102
+ /**
1103
+ * Bullet type
1104
+ * @default bullet
1105
+ */
1106
+ type?: 'bullet' | 'number'
1107
+ /**
1108
+ * Bullet character code (unicode)
1109
+ * @since v3.3.0
1110
+ * @example '25BA' // 'BLACK RIGHT-POINTING POINTER' (U+25BA)
1111
+ */
1112
+ characterCode?: string
1113
+ /**
1114
+ * Indentation (space between bullet and text) (points)
1115
+ * @since v3.3.0
1116
+ * @default 27 // DEF_BULLET_MARGIN
1117
+ * @example 10 // Indents text 10 points from bullet
1118
+ */
1119
+ indent?: number
1120
+ /**
1121
+ * Number type
1122
+ * @since v3.3.0
1123
+ * @example 'romanLcParenR' // roman numerals lower-case with paranthesis right
1124
+ */
1125
+ numberType?:
1126
+ | 'alphaLcParenBoth'
1127
+ | 'alphaLcParenR'
1128
+ | 'alphaLcPeriod'
1129
+ | 'alphaUcParenBoth'
1130
+ | 'alphaUcParenR'
1131
+ | 'alphaUcPeriod'
1132
+ | 'arabicParenBoth'
1133
+ | 'arabicParenR'
1134
+ | 'arabicPeriod'
1135
+ | 'arabicPlain'
1136
+ | 'romanLcParenBoth'
1137
+ | 'romanLcParenR'
1138
+ | 'romanLcPeriod'
1139
+ | 'romanUcParenBoth'
1140
+ | 'romanUcParenR'
1141
+ | 'romanUcPeriod'
1142
+ /**
1143
+ * Number bullets start at
1144
+ * @since v3.3.0
1145
+ * @default 1
1146
+ * @example 10 // numbered bullets start with 10
1147
+ */
1148
+ numberStartAt?: number
1149
+
1150
+ // DEPRECATED
1151
+
1152
+ /**
1153
+ * Bullet code (unicode)
1154
+ * @deprecated v3.3.0 - use `characterCode`
1155
+ */
1156
+ code?: string
1157
+ /**
1158
+ * Margin between bullet and text
1159
+ * @since v3.2.1
1160
+ * @deplrecated v3.3.0 - use `indent`
1161
+ */
1162
+ marginPt?: number
1163
+ /**
1164
+ * Number to start with (only applies to type:number)
1165
+ * @deprecated v3.3.0 - use `numberStartAt`
1166
+ */
1167
+ startAt?: number
1168
+ /**
1169
+ * Number type
1170
+ * @deprecated v3.3.0 - use `numberType`
1171
+ */
1172
+ style?: string
1173
+ }
1174
+ /**
1175
+ * Text color
1176
+ * - `HexColor` or `ThemeColor`
1177
+ * - MS-PPT > Format Shape > Text Options > Text Fill & Outline > Text Fill > Color
1178
+ * @example 'FF0000' // hex color (red)
1179
+ * @example pptx.SchemeColor.text1 // Theme color (Text1)
1180
+ */
1181
+ color?: Color
1182
+ /**
1183
+ * Font face name
1184
+ * @example 'Arial' // Arial font
1185
+ */
1186
+ fontFace?: string
1187
+ /**
1188
+ * Font size
1189
+ * @example 12 // Font size 12
1190
+ */
1191
+ fontSize?: number
1192
+ /**
1193
+ * Text highlight color (hex format)
1194
+ * @example 'FFFF00' // yellow
1195
+ */
1196
+ highlight?: HexColor
1197
+ /**
1198
+ * italic style
1199
+ * @default false
1200
+ */
1201
+ italic?: boolean
1202
+ /**
1203
+ * language
1204
+ * - ISO 639-1 standard language code
1205
+ * @default 'en-US' // english US
1206
+ * @example 'fr-CA' // french Canadian
1207
+ */
1208
+ lang?: string
1209
+ /**
1210
+ * Add a soft line-break (shift+enter) before line text content
1211
+ * @default false
1212
+ * @since v3.5.0
1213
+ */
1214
+ softBreakBefore?: boolean
1215
+ /**
1216
+ * tab stops
1217
+ * - PowerPoint: Paragraph > Tabs > Tab stop position
1218
+ * @example [{ position:1 }, { position:3 }] // Set first tab stop to 1 inch, set second tab stop to 3 inches
1219
+ */
1220
+ tabStops?: Array<{ position: number, alignment?: 'l' | 'r' | 'ctr' | 'dec' }>
1221
+ /**
1222
+ * text direction
1223
+ * `horz` = horizontal
1224
+ * `vert` = rotate 90^
1225
+ * `vert270` = rotate 270^
1226
+ * `wordArtVert` = stacked
1227
+ * @default 'horz'
1228
+ */
1229
+ textDirection?: 'horz' | 'vert' | 'vert270' | 'wordArtVert'
1230
+ /**
1231
+ * Transparency (percent)
1232
+ * - MS-PPT > Format Shape > Text Options > Text Fill & Outline > Text Fill > Transparency
1233
+ * - range: 0-100
1234
+ * @default 0
1235
+ */
1236
+ transparency?: number
1237
+ /**
1238
+ * underline properties
1239
+ * - PowerPoint: Font > Color & Underline > Underline Style/Underline Color
1240
+ * @default (none)
1241
+ */
1242
+ underline?: {
1243
+ style?:
1244
+ | 'dash'
1245
+ | 'dashHeavy'
1246
+ | 'dashLong'
1247
+ | 'dashLongHeavy'
1248
+ | 'dbl'
1249
+ | 'dotDash'
1250
+ | 'dotDashHeave'
1251
+ | 'dotDotDash'
1252
+ | 'dotDotDashHeavy'
1253
+ | 'dotted'
1254
+ | 'dottedHeavy'
1255
+ | 'heavy'
1256
+ | 'none'
1257
+ | 'sng'
1258
+ | 'wavy'
1259
+ | 'wavyDbl'
1260
+ | 'wavyHeavy'
1261
+ color?: Color
1262
+ }
1263
+ /**
1264
+ * vertical alignment
1265
+ * @default 'top'
1266
+ */
1267
+ valign?: VAlign
1268
+ }
1269
+ export interface PlaceholderProps extends PositionProps, TextBaseProps {
1270
+ name: string
1271
+ type: PLACEHOLDER_TYPE
1272
+ /**
1273
+ * margin (points)
1274
+ */
1275
+ margin?: Margin
1276
+ }
1277
+ export interface ObjectNameProps {
1278
+ /**
1279
+ * Object name
1280
+ * - used instead of default "Object N" name
1281
+ * - PowerPoint: Home > Arrange > Selection Pane...
1282
+ * @since v3.10.0
1283
+ * @default 'Object 1'
1284
+ * @example 'Antenna Design 9'
1285
+ */
1286
+ objectName?: string
1287
+ }
1288
+ export interface ThemeProps {
1289
+ /**
1290
+ * Headings font face name
1291
+ * @example 'Arial Narrow'
1292
+ * @default 'Calibri Light'
1293
+ */
1294
+ headFontFace?: string
1295
+ /**
1296
+ * Body font face name
1297
+ * @example 'Arial'
1298
+ * @default 'Calibri'
1299
+ */
1300
+ bodyFontFace?: string
1301
+ }
1302
+
1303
+ // image / media ==================================================================================
1304
+ export type MediaType = 'audio' | 'online' | 'video'
1305
+
1306
+ export interface ImageProps extends PositionProps, DataOrPathProps, ObjectNameProps {
1307
+ /**
1308
+ * Alt Text value ("How would you describe this object and its contents to someone who is blind?")
1309
+ * - PowerPoint: [right-click on an image] > "Edit Alt Text..."
1310
+ */
1311
+ altText?: string
1312
+ /**
1313
+ * Flip horizontally?
1314
+ * @default false
1315
+ */
1316
+ flipH?: boolean
1317
+ /**
1318
+ * Flip vertical?
1319
+ * @default false
1320
+ */
1321
+ flipV?: boolean
1322
+ hyperlink?: HyperlinkProps
1323
+ /**
1324
+ * Placeholder type
1325
+ * - values: 'body' | 'header' | 'footer' | 'title' | et. al.
1326
+ * @example 'body'
1327
+ * @see https://docs.microsoft.com/en-us/office/vba/api/powerpoint.ppplaceholdertype
1328
+ */
1329
+ placeholder?: string
1330
+ /**
1331
+ * Image rotation (degrees)
1332
+ * - range: -360 to 360
1333
+ * @default 0
1334
+ * @example 180 // rotate image 180 degrees
1335
+ */
1336
+ rotate?: number
1337
+ /**
1338
+ * Enable image rounding
1339
+ * @default false
1340
+ */
1341
+ rounding?: boolean
1342
+ /**
1343
+ * Shadow Props
1344
+ * - MS-PPT > Format Picture > Shadow
1345
+ * @example
1346
+ * { type: 'outer', color: '000000', opacity: 0.5, blur: 20, offset: 20, angle: 270 }
1347
+ */
1348
+ shadow?: ShadowProps
1349
+ /**
1350
+ * Image sizing options
1351
+ */
1352
+ sizing?: {
1353
+ /**
1354
+ * Sizing type
1355
+ */
1356
+ type: 'contain' | 'cover' | 'crop'
1357
+ /**
1358
+ * Image width
1359
+ * - inches or percentage
1360
+ * @example 10.25 // position in inches
1361
+ * @example '75%' // position as percentage of slide size
1362
+ */
1363
+ w: Coord
1364
+ /**
1365
+ * Image height
1366
+ * - inches or percentage
1367
+ * @example 10.25 // position in inches
1368
+ * @example '75%' // position as percentage of slide size
1369
+ */
1370
+ h: Coord
1371
+ /**
1372
+ * Offset from left to crop image
1373
+ * - `crop` only
1374
+ * - inches or percentage
1375
+ * @example 10.25 // position in inches
1376
+ * @example '75%' // position as percentage of slide size
1377
+ */
1378
+ x?: Coord
1379
+ /**
1380
+ * Offset from top to crop image
1381
+ * - `crop` only
1382
+ * - inches or percentage
1383
+ * @example 10.25 // position in inches
1384
+ * @example '75%' // position as percentage of slide size
1385
+ */
1386
+ y?: Coord
1387
+ }
1388
+ /**
1389
+ * Transparency (percent)
1390
+ * - MS-PPT > Format Picture > Picture > Picture Transparency > Transparency
1391
+ * - range: 0-100
1392
+ * @default 0
1393
+ * @example 25 // 25% transparent
1394
+ */
1395
+ transparency?: number
1396
+ }
1397
+ /**
1398
+ * Add media (audio/video) to slide
1399
+ * @requires either `link` or `path`
1400
+ */
1401
+ export interface MediaProps extends PositionProps, DataOrPathProps, ObjectNameProps {
1402
+ /**
1403
+ * Media type
1404
+ * - Use 'online' to embed a YouTube video (only supported in recent versions of PowerPoint)
1405
+ */
1406
+ type: MediaType
1407
+ /**
1408
+ * Cover image
1409
+ * @since 3.9.0
1410
+ * @default "play button" image, gray background
1411
+ */
1412
+ cover?: string
1413
+ /**
1414
+ * media file extension
1415
+ * - use when the media file path does not already have an extension, ex: "/folder/SomeSong"
1416
+ * @since 3.9.0
1417
+ * @default extension from file provided
1418
+ */
1419
+ extn?: string
1420
+ /**
1421
+ * video embed link
1422
+ * - works with YouTube
1423
+ * - other sites may not show correctly in PowerPoint
1424
+ * @example 'https://www.youtube.com/embed/Dph6ynRVyUc' // embed a youtube video
1425
+ */
1426
+ link?: string
1427
+ /**
1428
+ * full or local path
1429
+ * @example 'https://freesounds/simpsons/bart.mp3' // embed mp3 audio clip from server
1430
+ * @example '/sounds/simpsons_haha.mp3' // embed mp3 audio clip from local directory
1431
+ */
1432
+ path?: string
1433
+ }
1434
+
1435
+ // shapes =========================================================================================
1436
+
1437
+ export interface ShapeProps extends PositionProps, ObjectNameProps {
1438
+ /**
1439
+ * Horizontal alignment
1440
+ * @default 'left'
1441
+ */
1442
+ align?: HAlign
1443
+ /**
1444
+ * Radius (only for pptx.shapes.PIE, pptx.shapes.ARC, pptx.shapes.BLOCK_ARC)
1445
+ * - In the case of pptx.shapes.BLOCK_ARC you have to setup the arcThicknessRatio
1446
+ * - values: [0-359, 0-359]
1447
+ * @since v3.4.0
1448
+ * @default [270, 0]
1449
+ */
1450
+ angleRange?: [number, number]
1451
+ /**
1452
+ * Radius (only for pptx.shapes.BLOCK_ARC)
1453
+ * - You have to setup the angleRange values too
1454
+ * - values: 0.0-1.0
1455
+ * @since v3.4.0
1456
+ * @default 0.5
1457
+ */
1458
+ arcThicknessRatio?: number
1459
+ /**
1460
+ * Shape fill color properties
1461
+ * @example { color:'FF0000' } // hex color (red)
1462
+ * @example { color:'0088CC', transparency:50 } // hex color, 50% transparent
1463
+ * @example { color:pptx.SchemeColor.accent1 } // Theme color Accent1
1464
+ */
1465
+ fill?: ShapeFillProps
1466
+ /**
1467
+ * Flip shape horizontally?
1468
+ * @default false
1469
+ */
1470
+ flipH?: boolean
1471
+ /**
1472
+ * Flip shape vertical?
1473
+ * @default false
1474
+ */
1475
+ flipV?: boolean
1476
+ /**
1477
+ * Add hyperlink to shape
1478
+ * @example hyperlink: { url: "https://github.com/gitbrent/pptxgenjs", tooltip: "Visit Homepage" },
1479
+ */
1480
+ hyperlink?: HyperlinkProps
1481
+ /**
1482
+ * Line options
1483
+ */
1484
+ line?: ShapeLineProps
1485
+ /**
1486
+ * Points (only for pptx.shapes.CUSTOM_GEOMETRY)
1487
+ * - type: 'arc'
1488
+ * - `hR` Shape Arc Height Radius
1489
+ * - `wR` Shape Arc Width Radius
1490
+ * - `stAng` Shape Arc Start Angle
1491
+ * - `swAng` Shape Arc Swing Angle
1492
+ * @see http://www.datypic.com/sc/ooxml/e-a_arcTo-1.html
1493
+ * @example [{ x: 0, y: 0 }, { x: 10, y: 10 }] // draw a line between those two points
1494
+ */
1495
+ points?: Array<
1496
+ | { x: Coord, y: Coord, moveTo?: boolean }
1497
+ | { x: Coord, y: Coord, curve: { type: 'arc', hR: Coord, wR: Coord, stAng: number, swAng: number } }
1498
+ | { x: Coord, y: Coord, curve: { type: 'cubic', x1: Coord, y1: Coord, x2: Coord, y2: Coord } }
1499
+ | { x: Coord, y: Coord, curve: { type: 'quadratic', x1: Coord, y1: Coord } }
1500
+ | { close: true }
1501
+ >
1502
+ /**
1503
+ * Rounded rectangle radius (only for pptx.shapes.ROUNDED_RECTANGLE)
1504
+ * - values: 0.0 to 1.0
1505
+ * @default 0
1506
+ */
1507
+ rectRadius?: number
1508
+ /**
1509
+ * Rotation (degrees)
1510
+ * - range: -360 to 360
1511
+ * @default 0
1512
+ * @example 180 // rotate 180 degrees
1513
+ */
1514
+ rotate?: number
1515
+ /**
1516
+ * Shadow options
1517
+ * TODO: need new demo.js entry for shape shadow
1518
+ */
1519
+ shadow?: ShadowProps
1520
+
1521
+ /**
1522
+ * @deprecated v3.3.0
1523
+ */
1524
+ lineSize?: number
1525
+ /**
1526
+ * @deprecated v3.3.0
1527
+ */
1528
+ lineDash?: 'dash' | 'dashDot' | 'lgDash' | 'lgDashDot' | 'lgDashDotDot' | 'solid' | 'sysDash' | 'sysDot'
1529
+ /**
1530
+ * @deprecated v3.3.0
1531
+ */
1532
+ lineHead?: 'arrow' | 'diamond' | 'none' | 'oval' | 'stealth' | 'triangle'
1533
+ /**
1534
+ * @deprecated v3.3.0
1535
+ */
1536
+ lineTail?: 'arrow' | 'diamond' | 'none' | 'oval' | 'stealth' | 'triangle'
1537
+ /**
1538
+ * Shape name (used instead of default "Shape N" name)
1539
+ * @deprecated v3.10.0 - use `objectName`
1540
+ */
1541
+ shapeName?: string
1542
+ }
1543
+
1544
+ // tables =========================================================================================
1545
+
1546
+ export interface TableToSlidesProps extends TableProps {
1547
+ //_arrObjTabHeadRows?: TableRow[]
1548
+ // _masterSlide?: SlideLayout
1549
+
1550
+ /**
1551
+ * Add an image to slide(s) created during autopaging
1552
+ * - `image` prop requires either `path` or `data`
1553
+ * - see `DataOrPathProps` for details on `image` props
1554
+ * - see `PositionProps` for details on `options` props
1555
+ */
1556
+ addImage?: { image: DataOrPathProps, options: PositionProps }
1557
+ /**
1558
+ * Add a shape to slide(s) created during autopaging
1559
+ */
1560
+ addShape?: { shapeName: SHAPE_NAME, options: ShapeProps }
1561
+ /**
1562
+ * Add a table to slide(s) created during autopaging
1563
+ */
1564
+ addTable?: { rows: TableRow[], options: TableProps }
1565
+ /**
1566
+ * Add a text object to slide(s) created during autopaging
1567
+ */
1568
+ addText?: { text: TextProps[], options: TextPropsOptions }
1569
+ /**
1570
+ * Whether to enable auto-paging
1571
+ * - auto-paging creates new slides as content overflows a slide
1572
+ * @default true
1573
+ */
1574
+ autoPage?: boolean
1575
+ /**
1576
+ * Auto-paging character weight
1577
+ * - adjusts how many characters are used before lines wrap
1578
+ * - range: -1.0 to 1.0
1579
+ * @see https://gitbrent.github.io/PptxGenJS/docs/api-tables.html
1580
+ * @default 0.0
1581
+ * @example 0.5 // lines are longer (increases the number of characters that can fit on a given line)
1582
+ */
1583
+ autoPageCharWeight?: number
1584
+ /**
1585
+ * Auto-paging line weight
1586
+ * - adjusts how many lines are used before slides wrap
1587
+ * - range: -1.0 to 1.0
1588
+ * @see https://gitbrent.github.io/PptxGenJS/docs/api-tables.html
1589
+ * @default 0.0
1590
+ * @example 0.5 // tables are taller (increases the number of lines that can fit on a given slide)
1591
+ */
1592
+ autoPageLineWeight?: number
1593
+ /**
1594
+ * Whether to repeat head row(s) on new tables created by autopaging
1595
+ * @since v3.3.0
1596
+ * @default false
1597
+ */
1598
+ autoPageRepeatHeader?: boolean
1599
+ /**
1600
+ * The `y` location to use on subsequent slides created by autopaging
1601
+ * @default (top margin of Slide)
1602
+ */
1603
+ autoPageSlideStartY?: number
1604
+ /**
1605
+ * Column widths (inches)
1606
+ */
1607
+ colW?: number | number[]
1608
+ /**
1609
+ * Master slide name
1610
+ * - define a master slide to have your auto-paged slides have corporate design, etc.
1611
+ * @see https://gitbrent.github.io/PptxGenJS/docs/masters.html
1612
+ */
1613
+ masterSlideName?: string
1614
+ /**
1615
+ * Slide margin
1616
+ * - this margin will be across all slides created by auto-paging
1617
+ */
1618
+ slideMargin?: Margin
1619
+
1620
+ /**
1621
+ * @deprecated v3.3.0 - use `autoPageRepeatHeader`
1622
+ */
1623
+ addHeaderToEach?: boolean
1624
+ /**
1625
+ * @deprecated v3.3.0 - use `autoPageSlideStartY`
1626
+ */
1627
+ newSlideStartY?: number
1628
+ }
1629
+ export interface TableCellProps extends TextBaseProps {
1630
+ /**
1631
+ * Auto-paging character weight
1632
+ * - adjusts how many characters are used before lines wrap
1633
+ * - range: -1.0 to 1.0
1634
+ * @see https://gitbrent.github.io/PptxGenJS/docs/api-tables.html
1635
+ * @default 0.0
1636
+ * @example 0.5 // lines are longer (increases the number of characters that can fit on a given line)
1637
+ */
1638
+ autoPageCharWeight?: number
1639
+ /**
1640
+ * Auto-paging line weight
1641
+ * - adjusts how many lines are used before slides wrap
1642
+ * - range: -1.0 to 1.0
1643
+ * @see https://gitbrent.github.io/PptxGenJS/docs/api-tables.html
1644
+ * @default 0.0
1645
+ * @example 0.5 // tables are taller (increases the number of lines that can fit on a given slide)
1646
+ */
1647
+ autoPageLineWeight?: number
1648
+ /**
1649
+ * Cell border
1650
+ */
1651
+ border?: BorderProps | [BorderProps, BorderProps, BorderProps, BorderProps]
1652
+ /**
1653
+ * Cell colspan
1654
+ */
1655
+ colspan?: number
1656
+ /**
1657
+ * Fill color
1658
+ * @example { color:'FF0000' } // hex color (red)
1659
+ * @example { color:'0088CC', transparency:50 } // hex color, 50% transparent
1660
+ * @example { color:pptx.SchemeColor.accent1 } // theme color Accent1
1661
+ */
1662
+ fill?: ShapeFillProps
1663
+ hyperlink?: HyperlinkProps
1664
+ /**
1665
+ * Cell margin (inches)
1666
+ * @default 0
1667
+ */
1668
+ margin?: Margin
1669
+ /**
1670
+ * Cell rowspan
1671
+ */
1672
+ rowspan?: number
1673
+ }
1674
+ export interface TableProps extends PositionProps, TextBaseProps, ObjectNameProps {
1675
+ //_arrObjTabHeadRows?: TableRow[]
1676
+
1677
+ /**
1678
+ * Whether to enable auto-paging
1679
+ * - auto-paging creates new slides as content overflows a slide
1680
+ * @default false
1681
+ */
1682
+ autoPage?: boolean
1683
+ /**
1684
+ * Auto-paging character weight
1685
+ * - adjusts how many characters are used before lines wrap
1686
+ * - range: -1.0 to 1.0
1687
+ * @see https://gitbrent.github.io/PptxGenJS/docs/api-tables.html
1688
+ * @default 0.0
1689
+ * @example 0.5 // lines are longer (increases the number of characters that can fit on a given line)
1690
+ */
1691
+ autoPageCharWeight?: number
1692
+ /**
1693
+ * Auto-paging line weight
1694
+ * - adjusts how many lines are used before slides wrap
1695
+ * - range: -1.0 to 1.0
1696
+ * @see https://gitbrent.github.io/PptxGenJS/docs/api-tables.html
1697
+ * @default 0.0
1698
+ * @example 0.5 // tables are taller (increases the number of lines that can fit on a given slide)
1699
+ */
1700
+ autoPageLineWeight?: number
1701
+ /**
1702
+ * Whether table header row(s) should be repeated on each new slide creating by autoPage.
1703
+ * Use `autoPageHeaderRows` to designate how many rows comprise the table header (1+).
1704
+ * @default false
1705
+ * @since v3.3.0
1706
+ */
1707
+ autoPageRepeatHeader?: boolean
1708
+ /**
1709
+ * Number of rows that comprise table headers
1710
+ * - required when `autoPageRepeatHeader` is set to true.
1711
+ * @example 2 - repeats the first two table rows on each new slide created
1712
+ * @default 1
1713
+ * @since v3.3.0
1714
+ */
1715
+ autoPageHeaderRows?: number
1716
+ /**
1717
+ * The `y` location to use on subsequent slides created by autopaging
1718
+ * @default (top margin of Slide)
1719
+ */
1720
+ autoPageSlideStartY?: number
1721
+ /**
1722
+ * Table border
1723
+ * - single value is applied to all 4 sides
1724
+ * - array of values in TRBL order for individual sides
1725
+ */
1726
+ border?: BorderProps | [BorderProps, BorderProps, BorderProps, BorderProps]
1727
+ /**
1728
+ * Width of table columns (inches)
1729
+ * - single value is applied to every column equally based upon `w`
1730
+ * - array of values in applied to each column in order
1731
+ * @default columns of equal width based upon `w`
1732
+ */
1733
+ colW?: number | number[]
1734
+ /**
1735
+ * Cell background color
1736
+ * @example { color:'FF0000' } // hex color (red)
1737
+ * @example { color:'0088CC', transparency:50 } // hex color, 50% transparent
1738
+ * @example { color:pptx.SchemeColor.accent1 } // theme color Accent1
1739
+ */
1740
+ fill?: ShapeFillProps
1741
+ /**
1742
+ * Cell margin (inches)
1743
+ * - affects all table cells, is superceded by cell options
1744
+ */
1745
+ margin?: Margin
1746
+ /**
1747
+ * Height of table rows (inches)
1748
+ * - single value is applied to every row equally based upon `h`
1749
+ * - array of values in applied to each row in order
1750
+ * @default rows of equal height based upon `h`
1751
+ */
1752
+ rowH?: number | number[]
1753
+ /**
1754
+ * DEV TOOL: Verbose Mode (to console)
1755
+ * - tell the library to provide an almost ridiculous amount of detail during auto-paging calculations
1756
+ * @default false // obviously
1757
+ */
1758
+ verbose?: boolean // Undocumented; shows verbose output
1759
+
1760
+ /**
1761
+ * @deprecated v3.3.0 - use `autoPageSlideStartY`
1762
+ */
1763
+ newSlideStartY?: number
1764
+ }
1765
+ export interface TableCell {
1766
+ text?: string | TableCell[]
1767
+ options?: TableCellProps
1768
+ }
1769
+ export interface TableRowSlide {
1770
+ rows: TableRow[]
1771
+ }
1772
+ export type TableRow = TableCell[]
1773
+
1774
+ // text ===========================================================================================
1775
+ export interface TextGlowProps {
1776
+ /**
1777
+ * Border color (hex format)
1778
+ * @example 'FF3399'
1779
+ */
1780
+ color?: HexColor
1781
+ /**
1782
+ * opacity (0.0 - 1.0)
1783
+ * @example 0.5
1784
+ * 50% opaque
1785
+ */
1786
+ opacity: number
1787
+ /**
1788
+ * size (points)
1789
+ */
1790
+ size: number
1791
+ }
1792
+
1793
+ export interface TextPropsOptions extends PositionProps, DataOrPathProps, TextBaseProps, ObjectNameProps {
1794
+ baseline?: number
1795
+ /**
1796
+ * Character spacing
1797
+ */
1798
+ charSpacing?: number
1799
+ /**
1800
+ * Text fit options
1801
+ *
1802
+ * MS-PPT > Format Shape > Shape Options > Text Box > "[unlabeled group]": [3 options below]
1803
+ * - 'none' = Do not Autofit
1804
+ * - 'shrink' = Shrink text on overflow
1805
+ * - 'resize' = Resize shape to fit text
1806
+ *
1807
+ * **Note** 'shrink' and 'resize' only take effect after editing text/resize shape.
1808
+ * Both PowerPoint and Word dynamically calculate a scaling factor and apply it when edit/resize occurs.
1809
+ *
1810
+ * There is no way for this library to trigger that behavior, sorry.
1811
+ * @since v3.3.0
1812
+ * @default "none"
1813
+ */
1814
+ fit?: 'none' | 'shrink' | 'resize'
1815
+ /**
1816
+ * Shape fill
1817
+ * @example { color:'FF0000' } // hex color (red)
1818
+ * @example { color:'0088CC', transparency:50 } // hex color, 50% transparent
1819
+ * @example { color:pptx.SchemeColor.accent1 } // theme color Accent1
1820
+ */
1821
+ fill?: ShapeFillProps
1822
+ /**
1823
+ * Flip shape horizontally?
1824
+ * @default false
1825
+ */
1826
+ flipH?: boolean
1827
+ /**
1828
+ * Flip shape vertical?
1829
+ * @default false
1830
+ */
1831
+ flipV?: boolean
1832
+ glow?: TextGlowProps
1833
+ hyperlink?: HyperlinkProps
1834
+ indentLevel?: number
1835
+ isTextBox?: boolean
1836
+ line?: ShapeLineProps
1837
+ /**
1838
+ * Line spacing (pt)
1839
+ * - PowerPoint: Paragraph > Indents and Spacing > Line Spacing: > "Exactly"
1840
+ * @example 28 // 28pt
1841
+ */
1842
+ lineSpacing?: number
1843
+ /**
1844
+ * line spacing multiple (percent)
1845
+ * - range: 0.0-9.99
1846
+ * - PowerPoint: Paragraph > Indents and Spacing > Line Spacing: > "Multiple"
1847
+ * @example 1.5 // 1.5X line spacing
1848
+ * @since v3.5.0
1849
+ */
1850
+ lineSpacingMultiple?: number
1851
+ // TODO: [20220219] powerpoint uses inches but library has always been pt... @future @deprecated - update in v4.0? [range: 0.0-22.0]
1852
+ /**
1853
+ * Margin (points)
1854
+ * - PowerPoint: Format Shape > Shape Options > Size & Properties > Text Box > Left/Right/Top/Bottom margin
1855
+ * @default "Normal" margin in PowerPoint [3.5, 7.0, 3.5, 7.0] // (this library sets no value, but PowerPoint defaults to "Normal" [0.05", 0.1", 0.05", 0.1"])
1856
+ * @example 0 // Top/Right/Bottom/Left margin 0 [0.0" in powerpoint]
1857
+ * @example 10 // Top/Right/Bottom/Left margin 10 [0.14" in powerpoint]
1858
+ * @example [10,5,10,5] // Top margin 10, Right margin 5, Bottom margin 10, Left margin 5
1859
+ */
1860
+ margin?: Margin
1861
+ outline?: { color: Color, size: number }
1862
+ paraSpaceAfter?: number
1863
+ paraSpaceBefore?: number
1864
+ placeholder?: string
1865
+ /**
1866
+ * Rounded rectangle radius (only for pptx.shapes.ROUNDED_RECTANGLE)
1867
+ * - values: 0.0 to 1.0
1868
+ * @default 0
1869
+ */
1870
+ rectRadius?: number
1871
+ /**
1872
+ * Rotation (degrees)
1873
+ * - range: -360 to 360
1874
+ * @default 0
1875
+ * @example 180 // rotate 180 degrees
1876
+ */
1877
+ rotate?: number
1878
+ /**
1879
+ * Whether to enable right-to-left mode
1880
+ * @default false
1881
+ */
1882
+ rtlMode?: boolean
1883
+ shadow?: ShadowProps
1884
+ shape?: SHAPE_NAME
1885
+ strike?: boolean | 'dblStrike' | 'sngStrike'
1886
+ subscript?: boolean
1887
+ superscript?: boolean
1888
+ /**
1889
+ * Vertical alignment
1890
+ * @default middle
1891
+ */
1892
+ valign?: VAlign
1893
+ vert?: 'eaVert' | 'horz' | 'mongolianVert' | 'vert' | 'vert270' | 'wordArtVert' | 'wordArtVertRtl'
1894
+ /**
1895
+ * Text wrap
1896
+ * @since v3.3.0
1897
+ * @default true
1898
+ */
1899
+ wrap?: boolean
1900
+
1901
+ /**
1902
+ * Whether "Fit to Shape?" is enabled
1903
+ * @deprecated v3.3.0 - use `fit`
1904
+ */
1905
+ autoFit?: boolean
1906
+ /**
1907
+ * Whather "Shrink Text on Overflow?" is enabled
1908
+ * @deprecated v3.3.0 - use `fit`
1909
+ */
1910
+ shrinkText?: boolean
1911
+ /**
1912
+ * Inset
1913
+ * @deprecated v3.10.0 - use `margin`
1914
+ */
1915
+ inset?: number
1916
+ /**
1917
+ * Dash type
1918
+ * @deprecated v3.3.0 - use `line.dashType`
1919
+ */
1920
+ lineDash?: 'solid' | 'dash' | 'dashDot' | 'lgDash' | 'lgDashDot' | 'lgDashDotDot' | 'sysDash' | 'sysDot'
1921
+ /**
1922
+ * @deprecated v3.3.0 - use `line.beginArrowType`
1923
+ */
1924
+ lineHead?: 'none' | 'arrow' | 'diamond' | 'oval' | 'stealth' | 'triangle'
1925
+ /**
1926
+ * @deprecated v3.3.0 - use `line.width`
1927
+ */
1928
+ lineSize?: number
1929
+ /**
1930
+ * @deprecated v3.3.0 - use `line.endArrowType`
1931
+ */
1932
+ lineTail?: 'none' | 'arrow' | 'diamond' | 'oval' | 'stealth' | 'triangle'
1933
+ }
1934
+ export interface TextProps {
1935
+ text?: string
1936
+ options?: TextPropsOptions
1937
+ }
1938
+
1939
+ // charts =========================================================================================
1940
+ // FUTURE: BREAKING-CHANGE: (soln: use `OptsDataLabelPosition|string` until 3.5/4.0)
1941
+ /*
1942
+ export interface OptsDataLabelPosition {
1943
+ pie: 'ctr' | 'inEnd' | 'outEnd' | 'bestFit'
1944
+ scatter: 'b' | 'ctr' | 'l' | 'r' | 't'
1945
+ // TODO: add all othere chart types
1946
+ }
1947
+ */
1948
+
1949
+ export type ChartAxisTickMark = 'none' | 'inside' | 'outside' | 'cross'
1950
+ export type ChartLineCap = 'flat' | 'round' | 'square'
1951
+
1952
+ export interface OptsChartData {
1953
+ //_dataIndex?: number
1954
+
1955
+ /**
1956
+ * category labels
1957
+ * @example ['Year 2000', 'Year 2010', 'Year 2020'] // single-level category axes labels
1958
+ * @example [['Year 2000', 'Year 2010', 'Year 2020'], ['Decades', '', '']] // multi-level category axes labels
1959
+ * @since `labels` string[][] type added v3.11.0
1960
+ */
1961
+ labels?: string[] | string[][]
1962
+ /**
1963
+ * series name
1964
+ * @example 'Locations'
1965
+ */
1966
+ name?: string
1967
+ /**
1968
+ * bubble sizes
1969
+ * @example [5, 1, 5, 1]
1970
+ */
1971
+ sizes?: number[]
1972
+ /**
1973
+ * category values
1974
+ * @example [2000, 2010, 2020]
1975
+ */
1976
+ values?: number[]
1977
+ /**
1978
+ * Override `chartColors`
1979
+ */
1980
+ //color?: string // TODO: WIP: (Pull #727)
1981
+ }
1982
+ export interface OptsChartGridLine {
1983
+ /**
1984
+ * MS-PPT > Chart format > Format Major Gridlines > Line > Cap type
1985
+ * - line cap type
1986
+ * @default flat
1987
+ */
1988
+ cap?: ChartLineCap
1989
+ /**
1990
+ * Gridline color (hex)
1991
+ * @example 'FF3399'
1992
+ */
1993
+ color?: HexColor
1994
+ /**
1995
+ * Gridline size (points)
1996
+ */
1997
+ size?: number
1998
+ /**
1999
+ * Gridline style
2000
+ */
2001
+ style?: 'solid' | 'dash' | 'dot' | 'none'
2002
+ }
2003
+ // TODO: 202008: chart types remain with predicated with "I" in v3.3.0 (ran out of time!)
2004
+ export interface IChartMulti {
2005
+ type: CHART_NAME
2006
+ data: OptsChartData[]
2007
+ options: IChartOpts
2008
+ }
2009
+ export interface IChartPropsFillLine {
2010
+ /**
2011
+ * PowerPoint: Format Chart Area/Plot > Border ["Line"]
2012
+ * @example border: {color: 'FF0000', pt: 1} // hex RGB color, 1 pt line
2013
+ */
2014
+ border?: BorderProps
2015
+ /**
2016
+ * PowerPoint: Format Chart Area/Plot Area > Fill
2017
+ * @example fill: {color: '696969'} // hex RGB color value
2018
+ * @example fill: {color: pptx.SchemeColor.background2} // Theme color value
2019
+ * @example fill: {transparency: 50} // 50% transparency
2020
+ */
2021
+ fill?: ShapeFillProps
2022
+ }
2023
+ export interface IChartAreaProps extends IChartPropsFillLine {
2024
+ /**
2025
+ * Whether the chart area has rounded corners
2026
+ * - only applies when either `fill` or `border` is used
2027
+ * @default true
2028
+ * @since v3.11
2029
+ */
2030
+ roundedCorners?: boolean
2031
+ }
2032
+ export interface IChartPropsBase {
2033
+ /**
2034
+ * Axis position
2035
+ */
2036
+ axisPos?: 'b' | 'l' | 'r' | 't'
2037
+ chartColors?: HexColor[]
2038
+ /**
2039
+ * opacity (0 - 100)
2040
+ * @example 50 // 50% opaque
2041
+ */
2042
+ chartColorsOpacity?: number
2043
+ dataBorder?: BorderProps
2044
+ displayBlanksAs?: string
2045
+ invertedColors?: HexColor[]
2046
+ lang?: string
2047
+ layout?: PositionProps
2048
+ shadow?: ShadowProps
2049
+ /**
2050
+ * @default false
2051
+ */
2052
+ showLabel?: boolean
2053
+ showLeaderLines?: boolean
2054
+ /**
2055
+ * @default false
2056
+ */
2057
+ showLegend?: boolean
2058
+ /**
2059
+ * @default false
2060
+ */
2061
+ showPercent?: boolean
2062
+ /**
2063
+ * @default false
2064
+ */
2065
+ showSerName?: boolean
2066
+ /**
2067
+ * @default false
2068
+ */
2069
+ showTitle?: boolean
2070
+ /**
2071
+ * @default false
2072
+ */
2073
+ showValue?: boolean
2074
+ /**
2075
+ * 3D Perspecitve
2076
+ * - range: 0-120
2077
+ * @default 30
2078
+ */
2079
+ v3DPerspective?: number
2080
+ /**
2081
+ * Right Angle Axes
2082
+ * - Shows chart from first-person perspective
2083
+ * - Overrides `v3DPerspective` when true
2084
+ * - PowerPoint: Chart Options > 3-D Rotation
2085
+ * @default false
2086
+ */
2087
+ v3DRAngAx?: boolean
2088
+ /**
2089
+ * X Rotation
2090
+ * - PowerPoint: Chart Options > 3-D Rotation
2091
+ * - range: 0-359.9
2092
+ * @default 30
2093
+ */
2094
+ v3DRotX?: number
2095
+ /**
2096
+ * Y Rotation
2097
+ * - range: 0-359.9
2098
+ * @default 30
2099
+ */
2100
+ v3DRotY?: number
2101
+
2102
+ /**
2103
+ * PowerPoint: Format Chart Area (Fill & Border/Line)
2104
+ * @since v3.11
2105
+ */
2106
+ chartArea?: IChartAreaProps
2107
+ /**
2108
+ * PowerPoint: Format Plot Area (Fill & Border/Line)
2109
+ * @since v3.11
2110
+ */
2111
+ plotArea?: IChartPropsFillLine
2112
+
2113
+ /**
2114
+ * @deprecated v3.11.0 - use `plotArea.border`
2115
+ */
2116
+ border?: BorderProps
2117
+ /**
2118
+ * @deprecated v3.11.0 - use `plotArea.fill`
2119
+ */
2120
+ fill?: HexColor
2121
+ }
2122
+ export interface IChartPropsAxisCat {
2123
+ /**
2124
+ * Multi-Chart prop: array of cat axes
2125
+ */
2126
+ catAxes?: IChartPropsAxisCat[]
2127
+ catAxisBaseTimeUnit?: string
2128
+ catAxisCrossesAt?: number | 'autoZero'
2129
+ catAxisHidden?: boolean
2130
+ catAxisLabelColor?: string
2131
+ catAxisLabelFontBold?: boolean
2132
+ catAxisLabelFontFace?: string
2133
+ catAxisLabelFontItalic?: boolean
2134
+ catAxisLabelFontSize?: number
2135
+ catAxisLabelFrequency?: string
2136
+ catAxisLabelPos?: 'none' | 'low' | 'high' | 'nextTo'
2137
+ catAxisLabelRotate?: number
2138
+ catAxisLineColor?: string
2139
+ catAxisLineShow?: boolean
2140
+ catAxisLineSize?: number
2141
+ catAxisLineStyle?: 'solid' | 'dash' | 'dot'
2142
+ catAxisMajorTickMark?: ChartAxisTickMark
2143
+ catAxisMajorTimeUnit?: string
2144
+ catAxisMajorUnit?: number
2145
+ catAxisMaxVal?: number
2146
+ catAxisMinorTickMark?: ChartAxisTickMark
2147
+ catAxisMinorTimeUnit?: string
2148
+ catAxisMinorUnit?: number
2149
+ catAxisMinVal?: number
2150
+ /** @since v3.11.0 */
2151
+ catAxisMultiLevelLabels?: boolean
2152
+ catAxisOrientation?: 'minMax'
2153
+ catAxisTitle?: string
2154
+ catAxisTitleColor?: string
2155
+ catAxisTitleFontFace?: string
2156
+ catAxisTitleFontSize?: number
2157
+ catAxisTitleRotate?: number
2158
+ catGridLine?: OptsChartGridLine
2159
+ catLabelFormatCode?: string
2160
+ /**
2161
+ * Whether data should use secondary category axis (instead of primary)
2162
+ * @default false
2163
+ */
2164
+ secondaryCatAxis?: boolean
2165
+ showCatAxisTitle?: boolean
2166
+ }
2167
+ export interface IChartPropsAxisSer {
2168
+ serAxisBaseTimeUnit?: string
2169
+ serAxisHidden?: boolean
2170
+ serAxisLabelColor?: string
2171
+ serAxisLabelFontBold?: boolean
2172
+ serAxisLabelFontFace?: string
2173
+ serAxisLabelFontItalic?: boolean
2174
+ serAxisLabelFontSize?: number
2175
+ serAxisLabelFrequency?: string
2176
+ serAxisLabelPos?: 'none' | 'low' | 'high' | 'nextTo'
2177
+ serAxisLineColor?: string
2178
+ serAxisLineShow?: boolean
2179
+ serAxisMajorTimeUnit?: string
2180
+ serAxisMajorUnit?: number
2181
+ serAxisMinorTimeUnit?: string
2182
+ serAxisMinorUnit?: number
2183
+ serAxisOrientation?: string
2184
+ serAxisTitle?: string
2185
+ serAxisTitleColor?: string
2186
+ serAxisTitleFontFace?: string
2187
+ serAxisTitleFontSize?: number
2188
+ serAxisTitleRotate?: number
2189
+ serGridLine?: OptsChartGridLine
2190
+ serLabelFormatCode?: string
2191
+ showSerAxisTitle?: boolean
2192
+ }
2193
+ export interface IChartPropsAxisVal {
2194
+ /**
2195
+ * Whether data should use secondary value axis (instead of primary)
2196
+ * @default false
2197
+ */
2198
+ secondaryValAxis?: boolean
2199
+ showValAxisTitle?: boolean
2200
+ /**
2201
+ * Multi-Chart prop: array of val axes
2202
+ */
2203
+ valAxes?: IChartPropsAxisVal[]
2204
+ valAxisCrossesAt?: number | 'autoZero'
2205
+ valAxisDisplayUnit?: 'billions' | 'hundredMillions' | 'hundreds' | 'hundredThousands' | 'millions' | 'tenMillions' | 'tenThousands' | 'thousands' | 'trillions'
2206
+ valAxisDisplayUnitLabel?: boolean
2207
+ valAxisHidden?: boolean
2208
+ valAxisLabelColor?: string
2209
+ valAxisLabelFontBold?: boolean
2210
+ valAxisLabelFontFace?: string
2211
+ valAxisLabelFontItalic?: boolean
2212
+ valAxisLabelFontSize?: number
2213
+ valAxisLabelFormatCode?: string
2214
+ valAxisLabelPos?: 'none' | 'low' | 'high' | 'nextTo'
2215
+ valAxisLabelRotate?: number
2216
+ valAxisLineColor?: string
2217
+ valAxisLineShow?: boolean
2218
+ valAxisLineSize?: number
2219
+ valAxisLineStyle?: 'solid' | 'dash' | 'dot'
2220
+ /**
2221
+ * PowerPoint: Format Axis > Axis Options > Logarithmic scale - Base
2222
+ * - range: 2-99
2223
+ * @since v3.5.0
2224
+ */
2225
+ valAxisLogScaleBase?: number
2226
+ valAxisMajorTickMark?: ChartAxisTickMark
2227
+ valAxisMajorUnit?: number
2228
+ valAxisMaxVal?: number
2229
+ valAxisMinorTickMark?: ChartAxisTickMark
2230
+ valAxisMinVal?: number
2231
+ valAxisOrientation?: 'minMax'
2232
+ valAxisTitle?: string
2233
+ valAxisTitleColor?: string
2234
+ valAxisTitleFontFace?: string
2235
+ valAxisTitleFontSize?: number
2236
+ valAxisTitleRotate?: number
2237
+ valGridLine?: OptsChartGridLine
2238
+ /**
2239
+ * Value label format code
2240
+ * - this also directs Data Table formatting
2241
+ * @since v3.3.0
2242
+ * @example '#%' // round percent
2243
+ * @example '0.00%' // shows values as '0.00%'
2244
+ * @example '$0.00' // shows values as '$0.00'
2245
+ */
2246
+ valLabelFormatCode?: string
2247
+ }
2248
+ export interface IChartPropsChartBar {
2249
+ bar3DShape?: string
2250
+ barDir?: string
2251
+ barGapDepthPct?: number
2252
+ /**
2253
+ * MS-PPT > Format chart > Format Data Point > Series Options > "Gap Width"
2254
+ * - width (percent)
2255
+ * - range: `0`-`500`
2256
+ * @default 150
2257
+ */
2258
+ barGapWidthPct?: number
2259
+ barGrouping?: string
2260
+ /**
2261
+ * MS-PPT > Format chart > Format Data Point > Series Options > "Series Overlap"
2262
+ * - overlap (percent)
2263
+ * - range: `-100`-`100`
2264
+ * @since v3.9.0
2265
+ * @default 0
2266
+ */
2267
+ barOverlapPct?: number
2268
+ }
2269
+ export interface IChartPropsChartDoughnut {
2270
+ dataNoEffects?: boolean
2271
+ holeSize?: number
2272
+ }
2273
+ export interface IChartPropsChartLine {
2274
+ /**
2275
+ * MS-PPT > Chart format > Format Data Series > Line > Cap type
2276
+ * - line cap type
2277
+ * @default flat
2278
+ */
2279
+ lineCap?: ChartLineCap
2280
+ /**
2281
+ * MS-PPT > Chart format > Format Data Series > Marker Options > Built-in > Type
2282
+ * - line dash type
2283
+ * @default solid
2284
+ */
2285
+ lineDash?: 'dash' | 'dashDot' | 'lgDash' | 'lgDashDot' | 'lgDashDotDot' | 'solid' | 'sysDash' | 'sysDot'
2286
+ /**
2287
+ * MS-PPT > Chart format > Format Data Series > Marker Options > Built-in > Type
2288
+ * - marker type
2289
+ * @default circle
2290
+ */
2291
+ lineDataSymbol?: 'circle' | 'dash' | 'diamond' | 'dot' | 'none' | 'square' | 'triangle'
2292
+ /**
2293
+ * MS-PPT > Chart format > Format Data Series > [Marker Options] > Border > Color
2294
+ * - border color
2295
+ * @default circle
2296
+ */
2297
+ lineDataSymbolLineColor?: string
2298
+ /**
2299
+ * MS-PPT > Chart format > Format Data Series > [Marker Options] > Border > Width
2300
+ * - border width (points)
2301
+ * @default 0.75
2302
+ */
2303
+ lineDataSymbolLineSize?: number
2304
+ /**
2305
+ * MS-PPT > Chart format > Format Data Series > Marker Options > Built-in > Size
2306
+ * - marker size
2307
+ * - range: 2-72
2308
+ * @default 6
2309
+ */
2310
+ lineDataSymbolSize?: number
2311
+ /**
2312
+ * MS-PPT > Chart format > Format Data Series > Line > Width
2313
+ * - line width (points)
2314
+ * - range: 0-1584
2315
+ * @default 2
2316
+ */
2317
+ lineSize?: number
2318
+ /**
2319
+ * MS-PPT > Chart format > Format Data Series > Line > Smoothed line
2320
+ * - "Smoothed line"
2321
+ * @default false
2322
+ */
2323
+ lineSmooth?: boolean
2324
+ }
2325
+ export interface IChartPropsChartPie {
2326
+ dataNoEffects?: boolean
2327
+ /**
2328
+ * MS-PPT > Format chart > Format Data Series > Series Options > "Angle of first slice"
2329
+ * - angle (degrees)
2330
+ * - range: 0-359
2331
+ * @since v3.4.0
2332
+ * @default 0
2333
+ */
2334
+ firstSliceAng?: number
2335
+ }
2336
+ export interface IChartPropsChartRadar {
2337
+ /**
2338
+ * MS-PPT > Chart Type > Waterfall
2339
+ * - radar chart type
2340
+ * @default standard
2341
+ */
2342
+ radarStyle?: 'standard' | 'marker' | 'filled' // TODO: convert to 'radar'|'markers'|'filled' in 4.0 (verbatim with PPT app UI)
2343
+ }
2344
+ export interface IChartPropsDataLabel {
2345
+ dataLabelBkgrdColors?: boolean
2346
+ dataLabelColor?: string
2347
+ dataLabelFontBold?: boolean
2348
+ dataLabelFontFace?: string
2349
+ dataLabelFontItalic?: boolean
2350
+ dataLabelFontSize?: number
2351
+ /**
2352
+ * Data label format code
2353
+ * @example '#%' // round percent
2354
+ * @example '0.00%' // shows values as '0.00%'
2355
+ * @example '$0.00' // shows values as '$0.00'
2356
+ */
2357
+ dataLabelFormatCode?: string
2358
+ dataLabelFormatScatter?: 'custom' | 'customXY' | 'XY'
2359
+ dataLabelPosition?: 'b' | 'bestFit' | 'ctr' | 'l' | 'r' | 't' | 'inEnd' | 'outEnd'
2360
+ }
2361
+ export interface IChartPropsDataTable {
2362
+ dataTableFontSize?: number
2363
+ /**
2364
+ * Data table format code
2365
+ * @since v3.3.0
2366
+ * @example '#%' // round percent
2367
+ * @example '0.00%' // shows values as '0.00%'
2368
+ * @example '$0.00' // shows values as '$0.00'
2369
+ */
2370
+ dataTableFormatCode?: string
2371
+ /**
2372
+ * Whether to show a data table adjacent to the chart
2373
+ * @default false
2374
+ */
2375
+ showDataTable?: boolean
2376
+ showDataTableHorzBorder?: boolean
2377
+ showDataTableKeys?: boolean
2378
+ showDataTableOutline?: boolean
2379
+ showDataTableVertBorder?: boolean
2380
+ }
2381
+ export interface IChartPropsLegend {
2382
+ legendColor?: string
2383
+ legendFontFace?: string
2384
+ legendFontSize?: number
2385
+ legendPos?: 'b' | 'l' | 'r' | 't' | 'tr'
2386
+ }
2387
+ export interface IChartPropsTitle extends TextBaseProps {
2388
+ title?: string
2389
+ titleAlign?: string
2390
+ titleBold?: boolean
2391
+ titleColor?: string
2392
+ titleFontFace?: string
2393
+ titleFontSize?: number
2394
+ titlePos?: { x: number, y: number }
2395
+ titleRotate?: number
2396
+ }
2397
+ export interface IChartOpts
2398
+ extends IChartPropsAxisCat,
2399
+ IChartPropsAxisSer,
2400
+ IChartPropsAxisVal,
2401
+ IChartPropsBase,
2402
+ IChartPropsChartBar,
2403
+ IChartPropsChartDoughnut,
2404
+ IChartPropsChartLine,
2405
+ IChartPropsChartPie,
2406
+ IChartPropsChartRadar,
2407
+ IChartPropsDataLabel,
2408
+ IChartPropsDataTable,
2409
+ IChartPropsLegend,
2410
+ IChartPropsTitle,
2411
+ ObjectNameProps,
2412
+ OptsChartGridLine,
2413
+ PositionProps {
2414
+ /**
2415
+ * Alt Text value ("How would you describe this object and its contents to someone who is blind?")
2416
+ * - PowerPoint: [right-click on a chart] > "Edit Alt Text..."
2417
+ */
2418
+ altText?: string
2419
+ }
2420
+ export interface ISlideRelChart extends OptsChartData {
2421
+ type: CHART_NAME | IChartMulti[]
2422
+ opts: IChartOpts
2423
+ data: OptsChartData[]
2424
+ // internal below
2425
+ //rId: number
2426
+ //Target: string
2427
+ //globalId: number
2428
+ //fileName: string
2429
+ }
2430
+
2431
+ // Core
2432
+ // ====
2433
+ export interface WriteBaseProps {
2434
+ /**
2435
+ * Whether to compress export (can save substantial space, but takes a bit longer to export)
2436
+ * @default false
2437
+ * @since v3.5.0
2438
+ */
2439
+ compression?: boolean
2440
+ }
2441
+ export interface WriteProps extends WriteBaseProps {
2442
+ /**
2443
+ * Output type
2444
+ * - values: 'arraybuffer' | 'base64' | 'binarystring' | 'blob' | 'nodebuffer' | 'uint8array' | 'STREAM'
2445
+ * @default 'blob'
2446
+ */
2447
+ outputType?: WRITE_OUTPUT_TYPE
2448
+ }
2449
+ export interface WriteFileProps extends WriteBaseProps {
2450
+ /**
2451
+ * Export file name
2452
+ * @default 'Presentation.pptx'
2453
+ */
2454
+ fileName?: string
2455
+ }
2456
+ export interface SectionProps {
2457
+ //_type: 'user' | 'default'
2458
+ //_slides: PresSlide[]
2459
+
2460
+ /**
2461
+ * Section title
2462
+ */
2463
+ title: string
2464
+ /**
2465
+ * Section order - uses to add section at any index
2466
+ * - values: 1-n
2467
+ */
2468
+ order?: number
2469
+ }
2470
+ export interface PresLayout {
2471
+ //_sizeW?: number
2472
+ //_sizeH?: number
2473
+
2474
+ /**
2475
+ * Layout Name
2476
+ * @example 'LAYOUT_WIDE'
2477
+ */
2478
+ name: string
2479
+ width: number
2480
+ height: number
2481
+ }
2482
+ export interface SlideNumberProps extends PositionProps, TextBaseProps {
2483
+ /**
2484
+ * margin (points)
2485
+ */
2486
+ margin?: Margin // TODO: convert to inches in 4.0 (valid values are 0-22)
2487
+ }
2488
+ export interface SlideMasterProps {
2489
+ /**
2490
+ * Unique name for this master
2491
+ */
2492
+ title: string
2493
+ background?: BackgroundProps
2494
+ margin?: Margin
2495
+ slideNumber?: SlideNumberProps
2496
+ objects?: Array<| { chart: IChartOpts }
2497
+ | { image: ImageProps }
2498
+ | { line: ShapeProps }
2499
+ | { rect: ShapeProps }
2500
+ | { text: TextProps }
2501
+ | {
2502
+ placeholder: {
2503
+ options: PlaceholderProps
2504
+ /**
2505
+ * Text to be shown in placeholder (shown until user focuses textbox or adds text)
2506
+ * - Leave blank to have powerpoint show default phrase (ex: "Click to add title")
2507
+ */
2508
+ text?: string
2509
+ }
2510
+ }>
2511
+
2512
+ /**
2513
+ * @deprecated v3.3.0 - use `background`
2514
+ */
2515
+ bkgd?: string | BackgroundProps
2516
+ }
2517
+ export interface ObjectOptions extends ImageProps, PositionProps, ShapeProps, TableCellProps, TextPropsOptions {
2518
+ //_placeholderIdx?: number
2519
+ //_placeholderType?: PLACEHOLDER_TYPE
2520
+
2521
+ cx?: Coord
2522
+ cy?: Coord
2523
+ margin?: Margin
2524
+ colW?: number | number[] // table
2525
+ rowH?: number | number[] // table
2526
+ }
2527
+ export interface PresSlide {
2528
+ addChart: Function
2529
+ addImage: Function
2530
+ addMedia: Function
2531
+ addNotes: Function
2532
+ addShape: Function
2533
+ addTable: Function
2534
+ addText: Function
2535
+
2536
+ /**
2537
+ * Background color or image (`color` | `path` | `data`)
2538
+ * @example { color: 'FF3399' } - hex color
2539
+ * @example { color: 'FF3399', transparency:50 } - hex color with 50% transparency
2540
+ * @example { path: 'https://onedrives.com/myimg.png` } - retrieve image via URL
2541
+ * @example { path: '/home/gitbrent/images/myimg.png` } - retrieve image via local path
2542
+ * @example { data: 'image/png;base64,iVtDaDrF[...]=' } - base64 string
2543
+ * @since v3.3.0
2544
+ */
2545
+ background?: BackgroundProps
2546
+ /**
2547
+ * Default text color (hex format)
2548
+ * @example 'FF3399'
2549
+ * @default '000000' (DEF_FONT_COLOR)
2550
+ */
2551
+ color?: HexColor
2552
+ /**
2553
+ * Whether slide is hidden
2554
+ * @default false
2555
+ */
2556
+ hidden?: boolean
2557
+ /**
2558
+ * Slide number options
2559
+ */
2560
+ slideNumber?: SlideNumberProps
2561
+ }
2562
+ export interface AddSlideProps {
2563
+ masterName?: string // TODO: 20200528: rename to "masterTitle" (createMaster uses `title` so lets be consistent)
2564
+ sectionTitle?: string
2565
+ }
2566
+ export interface PresentationProps {
2567
+ author: string
2568
+ company: string
2569
+ layout: string
2570
+ masterSlide: PresSlide
2571
+ /**
2572
+ * Presentation's layout
2573
+ * read-only
2574
+ */
2575
+ presLayout: PresLayout
2576
+ revision: string
2577
+ /**
2578
+ * Whether to enable right-to-left mode
2579
+ * @default false
2580
+ */
2581
+ rtlMode: boolean
2582
+ subject: string
2583
+ theme: ThemeProps
2584
+ title: string
2585
+ }
2586
+
2587
+ // LAST: Slide
2588
+ /**
2589
+ * `slide.d.ts`
2590
+ */
2591
+ export class Slide {
2592
+ /**
2593
+ * Background color or image (`color` | `path` | `data`)
2594
+ * @example { color: 'FF3399' } - hex color
2595
+ * @example { color: 'FF3399', transparency:50 } - hex color with 50% transparency
2596
+ * @example { path: 'https://onedrives.com/myimg.png` } - retrieve image via URL
2597
+ * @example { path: '/home/gitbrent/images/myimg.png` } - retrieve image via local path
2598
+ * @example { data: 'image/png;base64,iVtDaDrF[...]=' } - base64 string
2599
+ * @since 3.3.0
2600
+ */
2601
+ background: BackgroundProps
2602
+ /**
2603
+ * Default text color (hex format)
2604
+ * @example 'FF3399'
2605
+ * @default '000000' (DEF_FONT_COLOR)
2606
+ */
2607
+ color: HexColor
2608
+ /**
2609
+ * Whether slide is hidden
2610
+ * @default false
2611
+ */
2612
+ hidden: boolean
2613
+ /**
2614
+ * Slide number options
2615
+ */
2616
+ slideNumber: SlideNumberProps
2617
+ /**
2618
+ * New slides added by an auto paged table
2619
+ */
2620
+ newAutoPagedSlides: PresSlide[]
2621
+ /**
2622
+ * Add chart to Slide
2623
+ * @param {CHART_NAME|IChartMulti[]} type - chart type
2624
+ * @param {object[]} data - data object
2625
+ * @param {IChartOpts} options - chart options
2626
+ * @return {Slide} this Slide
2627
+ * @type {Function}
2628
+ */
2629
+ addChart(type: CHART_NAME | IChartMulti[], data: any[], options?: IChartOpts): Slide
2630
+ /**
2631
+ * Add image to Slide
2632
+ * @param {ImageProps} options - image options
2633
+ * @return {Slide} this Slide
2634
+ */
2635
+ addImage(options: ImageProps): Slide
2636
+ /**
2637
+ * Add media (audio/video) to Slide
2638
+ * @param {MediaProps} options - media options
2639
+ * @return {Slide} this Slide
2640
+ */
2641
+ addMedia(options: MediaProps): Slide
2642
+ /**
2643
+ * Add speaker notes to Slide
2644
+ * @docs https://gitbrent.github.io/PptxGenJS/docs/speaker-notes.html
2645
+ * @param {string} notes - notes to add to slide
2646
+ * @return {Slide} this Slide
2647
+ */
2648
+ addNotes(notes: string): Slide
2649
+ /**
2650
+ * Add shape to Slide
2651
+ * @param {SHAPE_NAME} shapeName - shape name
2652
+ * @param {ShapeProps} options - shape options
2653
+ * @return {Slide} this Slide
2654
+ */
2655
+ addShape(shapeName: SHAPE_NAME, options?: ShapeProps): Slide
2656
+ /**
2657
+ * Add table to Slide
2658
+ * @param {TableRow[]} tableRows - table rows
2659
+ * @param {TableProps} options - table options
2660
+ * @return {Slide} this Slide
2661
+ */
2662
+ addTable(tableRows: TableRow[], options?: TableProps): Slide
2663
+ /**
2664
+ * Add text to Slide
2665
+ * @param {string|TextProps[]} text - text string or complex object
2666
+ * @param {TextPropsOptions} options - text options
2667
+ * @return {Slide} this Slide
2668
+ */
2669
+ addText(text: string | TextProps[], options?: TextPropsOptions): Slide
2670
+
2671
+ /**
2672
+ * Background color
2673
+ * @deprecated in 3.3.0 - use `background` instead
2674
+ */
2675
+ bkgd: string
2676
+ }
2677
+ }
2678
+
2679
+ /**
2680
+ * `@ai-matrx/alchemy/operate/pptx` — THE PowerPoint door. `buildPresentation` hands a fresh deck
2681
+ * to the caller's layout function and answers the .pptx Blob; pptxgenjs loads on first use.
2682
+ */
2683
+
2684
+ type PptxDeck = PptxGenJS;
2685
+ type PresentationOptions = {
2686
+ title?: string;
2687
+ author?: string;
2688
+ subject?: string;
2689
+ /** Default LAYOUT_WIDE (16:9). */
2690
+ layout?: string;
2691
+ };
2692
+ /** Build a deck: `fill` adds slides to it; the .pptx comes back as a Blob (save it with kit's downloadFile). */
2693
+ declare function buildPresentation(fill: (deck: PptxDeck) => void | Promise<void>, options?: PresentationOptions): Promise<Blob>;
2694
+
2695
+ export { type PptxDeck, type PresentationOptions, buildPresentation };