pptxgenjs-plus 4.1.17 → 4.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -93
- package/dist/pptxgen.bundle.js +36 -42
- package/dist/pptxgen.cjs.js +1577 -860
- package/dist/pptxgen.es.js +1577 -860
- package/dist/pptxgen.min.js +38 -44
- package/package.json +14 -9
- package/types/index.d.ts +239 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pptxgenjs-plus",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.18",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Brent Ely",
|
|
6
6
|
"url": "https://github.com/gitbrent/"
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
14
|
"description": "Create JavaScript PowerPoint Presentations",
|
|
15
|
-
"homepage": "https://github.com/lofcz/
|
|
15
|
+
"homepage": "https://github.com/lofcz/pptxgenjs-plus#readme",
|
|
16
|
+
"workspaces": [
|
|
17
|
+
"packages/*"
|
|
18
|
+
],
|
|
16
19
|
"publishConfig": {
|
|
17
20
|
"access": "public"
|
|
18
21
|
},
|
|
@@ -34,14 +37,15 @@
|
|
|
34
37
|
"node": ">=24"
|
|
35
38
|
},
|
|
36
39
|
"scripts": {
|
|
37
|
-
"build": "rslib build -c rsbuild.config.
|
|
40
|
+
"build": "rslib build -c rsbuild.config.mts && bun run build:types",
|
|
38
41
|
"build:types": "bun scripts/gen-types-namespace.mjs",
|
|
42
|
+
"build:jsx": "bun run --cwd packages/pptxgenjs-jsx build",
|
|
39
43
|
"generate:version": "bun scripts/package-version.mjs",
|
|
40
44
|
"dist": "bun run build",
|
|
41
45
|
"prepare": "bun run build",
|
|
42
|
-
"start": "rslib build -c rsbuild.config.
|
|
46
|
+
"start": "rslib build -c rsbuild.config.mts --watch",
|
|
43
47
|
"ship": "bun run build",
|
|
44
|
-
"watch": "rslib build -c rsbuild.config.
|
|
48
|
+
"watch": "rslib build -c rsbuild.config.mts --watch",
|
|
45
49
|
"docs:dev": "rspress dev",
|
|
46
50
|
"docs:build": "rspress build",
|
|
47
51
|
"docs:preview": "rspress preview",
|
|
@@ -54,7 +58,8 @@
|
|
|
54
58
|
"powerpoint:verify": "bun test/powerpoint-verify.ts",
|
|
55
59
|
"pptx:verify": "bun test/pptx-verify.ts",
|
|
56
60
|
"fixtures:repair": "bun test/repair-fixtures.ts",
|
|
57
|
-
"
|
|
61
|
+
"test:jsx": "bun run --cwd packages/pptxgenjs-jsx typecheck && bun test packages/pptxgenjs-jsx",
|
|
62
|
+
"check": "bun run lint && bun run typecheck && bun run test && bun run test:jsx",
|
|
58
63
|
"prepublishOnly": "bun run check && bun run build"
|
|
59
64
|
},
|
|
60
65
|
"browser": {
|
|
@@ -77,13 +82,13 @@
|
|
|
77
82
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
78
83
|
"@types/node": "^26.2.0",
|
|
79
84
|
"eslint": "^10.8.1",
|
|
80
|
-
"fast-xml-parser": "^5.
|
|
85
|
+
"fast-xml-parser": "^5.11.0",
|
|
81
86
|
"typescript": "^6.0.3",
|
|
82
87
|
"typescript-eslint": "^8.67.0"
|
|
83
88
|
},
|
|
84
89
|
"repository": {
|
|
85
90
|
"type": "git",
|
|
86
|
-
"url": "git+https://github.com/lofcz/
|
|
91
|
+
"url": "git+https://github.com/lofcz/pptxgenjs-plus.git"
|
|
87
92
|
},
|
|
88
93
|
"keywords": [
|
|
89
94
|
"es6-powerpoint",
|
|
@@ -108,6 +113,6 @@
|
|
|
108
113
|
"typescript-powerpoint"
|
|
109
114
|
],
|
|
110
115
|
"bugs": {
|
|
111
|
-
"url": "https://github.com/lofcz/
|
|
116
|
+
"url": "https://github.com/lofcz/pptxgenjs-plus/issues"
|
|
112
117
|
}
|
|
113
118
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ declare interface AddFontOptions {
|
|
|
15
15
|
declare interface AddSlideProps {
|
|
16
16
|
masterName?: string;
|
|
17
17
|
sectionTitle?: string;
|
|
18
|
+
/** Optional slide transition applied at creation (same as `slide.addTransition()`). */
|
|
19
|
+
transition?: SlideTransitionProps;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
declare enum AlignH {
|
|
@@ -109,6 +111,24 @@ declare interface BaseAnimationConfig {
|
|
|
109
111
|
presetSubtype?: number;
|
|
110
112
|
}
|
|
111
113
|
|
|
114
|
+
/**
|
|
115
|
+
* Blur effect (`a:blur`) — ECMA-376 `CT_BlurEffect` / `CT_EffectList` first child.
|
|
116
|
+
* - `radius` in points (written as `rad` in EMUs)
|
|
117
|
+
* - `grow` expands the visual bounds (`a:blur@grow`, schema default true)
|
|
118
|
+
*/
|
|
119
|
+
declare interface BlurProps {
|
|
120
|
+
/**
|
|
121
|
+
* Blur radius (points)
|
|
122
|
+
* @example 6
|
|
123
|
+
*/
|
|
124
|
+
radius: number;
|
|
125
|
+
/**
|
|
126
|
+
* Whether the effect grows the shape bounds
|
|
127
|
+
* - OOXML `a:blur@grow` (optional, default true)
|
|
128
|
+
*/
|
|
129
|
+
grow?: boolean;
|
|
130
|
+
}
|
|
131
|
+
|
|
112
132
|
declare interface BorderProps {
|
|
113
133
|
/**
|
|
114
134
|
* Border type
|
|
@@ -121,6 +141,13 @@ declare interface BorderProps {
|
|
|
121
141
|
* @default '666666'
|
|
122
142
|
*/
|
|
123
143
|
color?: HexColor;
|
|
144
|
+
/**
|
|
145
|
+
* Border transparency (percent)
|
|
146
|
+
* - range: 0-100
|
|
147
|
+
* - DrawingML `a:srgbClr/a:alpha` on the border `a:solidFill`
|
|
148
|
+
* @default 0
|
|
149
|
+
*/
|
|
150
|
+
transparency?: number;
|
|
124
151
|
/**
|
|
125
152
|
* Border width (points)
|
|
126
153
|
* - same name and unit as `ShapeLineProps.width`
|
|
@@ -441,6 +468,35 @@ declare interface FlyAnimationConfig extends BaseAnimationConfig {
|
|
|
441
468
|
|
|
442
469
|
declare type FlyDirection = 'top' | 'bottom' | 'left' | 'right' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
443
470
|
|
|
471
|
+
/**
|
|
472
|
+
* Builder passed to `slide.addGroup(opts, group => { ... })`.
|
|
473
|
+
* Child `x`/`y` are relative to the group origin.
|
|
474
|
+
*/
|
|
475
|
+
declare interface Group {
|
|
476
|
+
addShape(shapeName: SHAPE_NAME, options?: ShapeProps): Group;
|
|
477
|
+
addText(text: string | TextProps[], options?: TextPropsOptions): Group;
|
|
478
|
+
addImage(options: ImageProps): Group;
|
|
479
|
+
addGroup(options: GroupProps, build?: (group: Group) => void): Group;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Group shape (`p:grpSp` / ECMA-376 PresentationML §19.3.1.22).
|
|
484
|
+
* Child object coordinates are relative to the group origin.
|
|
485
|
+
*/
|
|
486
|
+
declare interface GroupProps extends PositionProps, ObjectNameProps {
|
|
487
|
+
/**
|
|
488
|
+
* Group rotation in degrees
|
|
489
|
+
* @default 0
|
|
490
|
+
*/
|
|
491
|
+
rotate?: number;
|
|
492
|
+
/**
|
|
493
|
+
* Group shadow (`a:effectLst` on `p:grpSpPr`)
|
|
494
|
+
*/
|
|
495
|
+
shadow?: ShadowProps;
|
|
496
|
+
/** @internal child objects collected by `addGroup` */
|
|
497
|
+
_objects?: ISlideObject[];
|
|
498
|
+
}
|
|
499
|
+
|
|
444
500
|
declare type GrowShrinkAmount = 'tiny' | 'smaller' | 'larger' | 'huge';
|
|
445
501
|
|
|
446
502
|
declare interface GrowShrinkAnimationConfig extends BaseAnimationConfig {
|
|
@@ -985,6 +1041,11 @@ declare interface ImageProps extends PositionProps, DataOrPathProps, ObjectNameP
|
|
|
985
1041
|
* @example { color: '696969', width: 2 } // 2pt dim-gray border
|
|
986
1042
|
*/
|
|
987
1043
|
line?: ShapeLineProps;
|
|
1044
|
+
/**
|
|
1045
|
+
* Alias of `line` (atomisystems image-border API). Same union as table `border` so `ObjectOptions` stays compatible.
|
|
1046
|
+
* @example { color: 'FF0000', pt: 2 }
|
|
1047
|
+
*/
|
|
1048
|
+
border?: BorderProps | [BorderProps, BorderProps, BorderProps, BorderProps];
|
|
988
1049
|
/**
|
|
989
1050
|
* Placeholder type
|
|
990
1051
|
* - values: 'body' | 'header' | 'footer' | 'title' | et. al.
|
|
@@ -1031,6 +1092,10 @@ declare interface ImageProps extends PositionProps, DataOrPathProps, ObjectNameP
|
|
|
1031
1092
|
* Reflection effect (`a:reflection`)
|
|
1032
1093
|
*/
|
|
1033
1094
|
reflection?: ReflectionProps;
|
|
1095
|
+
/**
|
|
1096
|
+
* Blur effect (`a:blur` in picture `effectLst`)
|
|
1097
|
+
*/
|
|
1098
|
+
blur?: BlurProps;
|
|
1034
1099
|
/**
|
|
1035
1100
|
* Image sizing options
|
|
1036
1101
|
*/
|
|
@@ -1122,6 +1187,8 @@ declare interface ISlideObject {
|
|
|
1122
1187
|
mtype?: MediaType;
|
|
1123
1188
|
mediaRid?: number;
|
|
1124
1189
|
shape?: SHAPE_NAME;
|
|
1190
|
+
/** @internal group children (`p:grpSp`) */
|
|
1191
|
+
_objects?: ISlideObject[];
|
|
1125
1192
|
/** zoom kind: slide | section | summary @internal */
|
|
1126
1193
|
zoomKind?: 'slide' | 'section' | 'summary';
|
|
1127
1194
|
/** 1-based target slide number (slide zoom) @internal */
|
|
@@ -1199,6 +1266,12 @@ declare interface LaserTracePoint {
|
|
|
1199
1266
|
|
|
1200
1267
|
declare type Margin = number | [number, number, number, number];
|
|
1201
1268
|
|
|
1269
|
+
/**
|
|
1270
|
+
* Failed media/image load policy.
|
|
1271
|
+
* `'placeholder'` isolates one asset; it does not swallow invalid API usage.
|
|
1272
|
+
*/
|
|
1273
|
+
declare type MediaOnError = 'throw' | 'placeholder';
|
|
1274
|
+
|
|
1202
1275
|
/**
|
|
1203
1276
|
* Add media (audio/video) to slide
|
|
1204
1277
|
* @requires either `link` or `path`
|
|
@@ -1408,6 +1481,11 @@ declare interface ObjectOptions extends ImageProps, PositionProps, ShapeProps, T
|
|
|
1408
1481
|
_placeholderType?: PLACEHOLDER_TYPE;
|
|
1409
1482
|
/** image added without `w`/`h`: size it from the image itself during export @internal */
|
|
1410
1483
|
_sizeFromImage?: boolean;
|
|
1484
|
+
/** Caller set this axis; placeholder geometry must not overwrite it. */
|
|
1485
|
+
_explicitX?: boolean;
|
|
1486
|
+
_explicitY?: boolean;
|
|
1487
|
+
_explicitW?: boolean;
|
|
1488
|
+
_explicitH?: boolean;
|
|
1411
1489
|
cx?: Coord;
|
|
1412
1490
|
cy?: Coord;
|
|
1413
1491
|
margin?: Margin;
|
|
@@ -1535,6 +1613,12 @@ declare interface OptsChartData {
|
|
|
1535
1613
|
* @see Toukyh/fix-custom-label
|
|
1536
1614
|
*/
|
|
1537
1615
|
labelsRange?: string[];
|
|
1616
|
+
/**
|
|
1617
|
+
* Per-series line dash for line/scatter/bubble (overrides chart-level `lineDash`)
|
|
1618
|
+
* - DrawingML `a:prstDash` / ST_PresetLineDashVal
|
|
1619
|
+
* @example 'dash'
|
|
1620
|
+
*/
|
|
1621
|
+
lineDash?: 'solid' | 'dash' | 'dashDot' | 'lgDash' | 'lgDashDot' | 'lgDashDotDot' | 'sysDash' | 'sysDot';
|
|
1538
1622
|
}
|
|
1539
1623
|
|
|
1540
1624
|
declare interface OptsChartGridLine {
|
|
@@ -1572,7 +1656,7 @@ declare enum OutputType {
|
|
|
1572
1656
|
|
|
1573
1657
|
declare type PathAnimation = 'pathdown' | 'patharcdown' | 'pathturnright' | 'pathcircle' | 'pathzigzag';
|
|
1574
1658
|
|
|
1575
|
-
declare type PLACEHOLDER_TYPE = 'title' | 'body' | '
|
|
1659
|
+
declare type PLACEHOLDER_TYPE = 'title' | 'body' | 'ctrTitle' | 'subTitle' | 'dt' | 'sldNum' | 'ftr' | 'hdr' | 'obj' | 'chart' | 'tbl' | 'clipArt' | 'dgm' | 'media' | 'sldImg' | 'pic';
|
|
1576
1660
|
|
|
1577
1661
|
declare interface PlaceholderProps extends PositionProps, TextBaseProps, NvPrExtensionProps {
|
|
1578
1662
|
name: string;
|
|
@@ -1581,6 +1665,10 @@ declare interface PlaceholderProps extends PositionProps, TextBaseProps, NvPrExt
|
|
|
1581
1665
|
* margin (points)
|
|
1582
1666
|
*/
|
|
1583
1667
|
margin?: Margin;
|
|
1668
|
+
/**
|
|
1669
|
+
* Placeholder background fill. Kept when a slide inherits layout defaults (caller fill wins).
|
|
1670
|
+
*/
|
|
1671
|
+
fill?: ShapeFillProps;
|
|
1584
1672
|
}
|
|
1585
1673
|
|
|
1586
1674
|
/** Modern placeholder type extension (`CT_PlaceholderTypeACB`, MS-PPTX §2.22). */
|
|
@@ -1644,6 +1732,24 @@ declare class PptxGenJS implements IPresentationProps {
|
|
|
1644
1732
|
private _author;
|
|
1645
1733
|
set author(value: string);
|
|
1646
1734
|
get author(): string;
|
|
1735
|
+
/**
|
|
1736
|
+
* OPC `dcterms:created` written to `docProps/core.xml`.
|
|
1737
|
+
*/
|
|
1738
|
+
private _created?;
|
|
1739
|
+
set created(value: Date);
|
|
1740
|
+
get created(): Date | undefined;
|
|
1741
|
+
/**
|
|
1742
|
+
* OPC `dcterms:modified` written to `docProps/core.xml`.
|
|
1743
|
+
*/
|
|
1744
|
+
private _modified?;
|
|
1745
|
+
set modified(value: Date);
|
|
1746
|
+
get modified(): Date | undefined;
|
|
1747
|
+
/**
|
|
1748
|
+
* Failed image/media load policy. Default throws so invalid input still fails the export.
|
|
1749
|
+
*/
|
|
1750
|
+
private _mediaOnError;
|
|
1751
|
+
set mediaOnError(value: MediaOnError);
|
|
1752
|
+
get mediaOnError(): MediaOnError;
|
|
1647
1753
|
/**
|
|
1648
1754
|
* @type {string}
|
|
1649
1755
|
*/
|
|
@@ -1899,6 +2005,21 @@ export default PptxGenJS;
|
|
|
1899
2005
|
declare interface PresentationProps {
|
|
1900
2006
|
author: string;
|
|
1901
2007
|
company: string;
|
|
2008
|
+
/**
|
|
2009
|
+
* OPC core property `dcterms:created` (W3CDTF). Defaults to export time.
|
|
2010
|
+
*/
|
|
2011
|
+
created?: Date;
|
|
2012
|
+
/**
|
|
2013
|
+
* OPC core property `dcterms:modified` (W3CDTF). Defaults to export time.
|
|
2014
|
+
*/
|
|
2015
|
+
modified?: Date;
|
|
2016
|
+
/**
|
|
2017
|
+
* How a failed image/media load is handled.
|
|
2018
|
+
* - `'throw'` (default): abort the export (invalid paths, HTTP errors, decode failures)
|
|
2019
|
+
* - `'placeholder'`: keep going and embed the broken-image sentinel for that asset only
|
|
2020
|
+
* @default 'throw'
|
|
2021
|
+
*/
|
|
2022
|
+
mediaOnError?: MediaOnError;
|
|
1902
2023
|
/**
|
|
1903
2024
|
* Zip compression for exported files
|
|
1904
2025
|
* @default 'none'
|
|
@@ -2021,6 +2142,16 @@ declare interface PresSlide extends SlideBaseProps {
|
|
|
2021
2142
|
addShape: (shapeName: SHAPE_NAME, options?: ShapeProps) => PresSlide;
|
|
2022
2143
|
addTable: (tableRows: TableRow[], options?: TableProps) => PresSlide;
|
|
2023
2144
|
addText: (text: string | TextProps[], options?: TextPropsOptions) => PresSlide;
|
|
2145
|
+
/**
|
|
2146
|
+
* Group shape (`p:grpSp`). Child `x`/`y` are relative to the group origin.
|
|
2147
|
+
* Holds shapes, text, images, and nested groups — not tables, charts, or media.
|
|
2148
|
+
*/
|
|
2149
|
+
addGroup: (options: GroupProps, build?: (group: Group) => void) => PresSlide;
|
|
2150
|
+
/**
|
|
2151
|
+
* WordArt: text with a warp (`presetShape` / `a:prstTxWarp`) and/or a gradient run fill.
|
|
2152
|
+
* Defaults to centered `textNoShape` (no transform) unless `options` override them.
|
|
2153
|
+
*/
|
|
2154
|
+
addWordArt: (text: string | TextProps[], options?: TextPropsOptions) => PresSlide;
|
|
2024
2155
|
/**
|
|
2025
2156
|
* Background color or image (`color` | `path` | `data`)
|
|
2026
2157
|
* @example { color: 'FF3399' } - hex color
|
|
@@ -2284,7 +2415,7 @@ declare interface ShadowProps {
|
|
|
2284
2415
|
rotateWithShape?: boolean;
|
|
2285
2416
|
}
|
|
2286
2417
|
|
|
2287
|
-
declare type SHAPE_NAME = 'accentBorderCallout1' | 'accentBorderCallout2' | 'accentBorderCallout3' | 'accentCallout1' | 'accentCallout2' | 'accentCallout3' | 'actionButtonBackPrevious' | 'actionButtonBeginning' | 'actionButtonBlank' | 'actionButtonDocument' | 'actionButtonEnd' | 'actionButtonForwardNext' | 'actionButtonHelp' | 'actionButtonHome' | 'actionButtonInformation' | 'actionButtonMovie' | 'actionButtonReturn' | 'actionButtonSound' | 'arc' | 'bentArrow' | 'bentUpArrow' | 'bevel' | 'blockArc' | 'borderCallout1' | 'borderCallout2' | 'borderCallout3' | 'bracePair' | 'bracketPair' | 'callout1' | 'callout2' | 'callout3' | 'can' | 'chartPlus' | 'chartStar' | 'chartX' | 'chevron' | 'chord' | 'circularArrow' | 'cloud' | 'cloudCallout' | 'corner' | 'cornerTabs' | 'cube' | 'curvedDownArrow' | 'curvedLeftArrow' | 'curvedRightArrow' | 'curvedUpArrow' | 'custGeom' | 'decagon' | 'diagStripe' | 'diamond' | 'dodecagon' | 'donut' | 'doubleWave' | 'downArrow' | 'downArrowCallout' | 'ellipse' | 'ellipseRibbon' | 'ellipseRibbon2' | 'flowChartAlternateProcess' | 'flowChartCollate' | 'flowChartConnector' | 'flowChartDecision' | 'flowChartDelay' | 'flowChartDisplay' | 'flowChartDocument' | 'flowChartExtract' | 'flowChartInputOutput' | 'flowChartInternalStorage' | 'flowChartMagneticDisk' | 'flowChartMagneticDrum' | 'flowChartMagneticTape' | 'flowChartManualInput' | 'flowChartManualOperation' | 'flowChartMerge' | 'flowChartMultidocument' | 'flowChartOfflineStorage' | 'flowChartOffpageConnector' | 'flowChartOnlineStorage' | 'flowChartOr' | 'flowChartPredefinedProcess' | 'flowChartPreparation' | 'flowChartProcess' | 'flowChartPunchedCard' | 'flowChartPunchedTape' | 'flowChartSort' | 'flowChartSummingJunction' | 'flowChartTerminator' | 'folderCorner' | 'frame' | 'funnel' | 'gear6' | 'gear9' | 'halfFrame' | 'heart' | 'heptagon' | 'hexagon' | 'homePlate' | 'horizontalScroll' | 'irregularSeal1' | 'irregularSeal2' | 'leftArrow' | 'leftArrowCallout' | 'leftBrace' | 'leftBracket' | 'leftCircularArrow' | 'leftRightArrow' | 'leftRightArrowCallout' | 'leftRightCircularArrow' | 'leftRightRibbon' | 'leftRightUpArrow' | 'leftUpArrow' | 'lightningBolt' | 'line' | 'lineInv' | 'mathDivide' | 'mathEqual' | 'mathMinus' | 'mathMultiply' | 'mathNotEqual' | 'mathPlus' | 'moon' | 'noSmoking' | 'nonIsoscelesTrapezoid' | 'notchedRightArrow' | 'octagon' | 'parallelogram' | 'pentagon' | 'pie' | 'pieWedge' | 'plaque' | 'plaqueTabs' | 'plus' | 'quadArrow' | 'quadArrowCallout' | 'rect' | 'ribbon' | 'ribbon2' | 'rightArrow' | 'rightArrowCallout' | 'rightBrace' | 'rightBracket' | 'round1Rect' | 'round2DiagRect' | 'round2SameRect' | 'roundRect' | 'rtTriangle' | 'smileyFace' | 'snip1Rect' | 'snip2DiagRect' | 'snip2SameRect' | 'snipRoundRect' | 'squareTabs' | 'star10' | 'star12' | 'star16' | 'star24' | 'star32' | 'star4' | 'star5' | 'star6' | 'star7' | 'star8' | 'stripedRightArrow' | 'sun' | 'swooshArrow' | 'teardrop' | 'trapezoid' | 'triangle' | 'upArrow' | 'upArrowCallout' | 'upDownArrow' | 'upDownArrowCallout' | 'uturnArrow' | 'verticalScroll' | 'wave' | 'wedgeEllipseCallout' | 'wedgeRectCallout' | 'wedgeRoundRectCallout';
|
|
2418
|
+
declare type SHAPE_NAME = 'accentBorderCallout1' | 'accentBorderCallout2' | 'accentBorderCallout3' | 'accentCallout1' | 'accentCallout2' | 'accentCallout3' | 'accentCallout4' | 'accentBorderCallout4' | 'actionButtonBackPrevious' | 'actionButtonBeginning' | 'actionButtonBlank' | 'actionButtonDocument' | 'actionButtonEnd' | 'actionButtonForwardNext' | 'actionButtonHelp' | 'actionButtonHome' | 'actionButtonInformation' | 'actionButtonMovie' | 'actionButtonReturn' | 'actionButtonSound' | 'arc' | 'bentArrow' | 'bentUpArrow' | 'bevel' | 'blockArc' | 'borderCallout1' | 'borderCallout2' | 'borderCallout3' | 'borderCallout4' | 'bracePair' | 'bracketPair' | 'callout1' | 'callout2' | 'callout3' | 'callout4' | 'can' | 'chartPlus' | 'chartStar' | 'chartX' | 'chevron' | 'chord' | 'circularArrow' | 'cloud' | 'cloudCallout' | 'corner' | 'cornerTabs' | 'cube' | 'curvedDownArrow' | 'curvedLeftArrow' | 'curvedRightArrow' | 'curvedUpArrow' | 'custGeom' | 'decagon' | 'diagStripe' | 'diamond' | 'dodecagon' | 'donut' | 'doubleWave' | 'downArrow' | 'downArrowCallout' | 'ellipse' | 'ellipseRibbon' | 'ellipseRibbon2' | 'flowChartAlternateProcess' | 'flowChartCollate' | 'flowChartConnector' | 'flowChartDecision' | 'flowChartDelay' | 'flowChartDisplay' | 'flowChartDocument' | 'flowChartExtract' | 'flowChartInputOutput' | 'flowChartInternalStorage' | 'flowChartMagneticDisk' | 'flowChartMagneticDrum' | 'flowChartMagneticTape' | 'flowChartManualInput' | 'flowChartManualOperation' | 'flowChartMerge' | 'flowChartMultidocument' | 'flowChartOfflineStorage' | 'flowChartOffpageConnector' | 'flowChartOnlineStorage' | 'flowChartOr' | 'flowChartPredefinedProcess' | 'flowChartPreparation' | 'flowChartProcess' | 'flowChartPunchedCard' | 'flowChartPunchedTape' | 'flowChartSort' | 'flowChartSummingJunction' | 'flowChartTerminator' | 'folderCorner' | 'frame' | 'funnel' | 'gear6' | 'gear9' | 'halfFrame' | 'heart' | 'heptagon' | 'hexagon' | 'homePlate' | 'horizontalScroll' | 'irregularSeal1' | 'irregularSeal2' | 'leftArrow' | 'leftArrowCallout' | 'leftBrace' | 'leftBracket' | 'leftCircularArrow' | 'leftRightArrow' | 'leftRightArrowCallout' | 'leftRightCircularArrow' | 'leftRightRibbon' | 'leftRightUpArrow' | 'leftUpArrow' | 'lightningBolt' | 'line' | 'lineInv' | 'mathDivide' | 'mathEqual' | 'mathMinus' | 'mathMultiply' | 'mathNotEqual' | 'mathPlus' | 'moon' | 'noSmoking' | 'nonIsoscelesTrapezoid' | 'notchedRightArrow' | 'octagon' | 'parallelogram' | 'pentagon' | 'pie' | 'pieWedge' | 'plaque' | 'plaqueTabs' | 'plus' | 'quadArrow' | 'quadArrowCallout' | 'rect' | 'ribbon' | 'ribbon2' | 'rightArrow' | 'rightArrowCallout' | 'rightBrace' | 'rightBracket' | 'round1Rect' | 'round2DiagRect' | 'round2SameRect' | 'roundRect' | 'rtTriangle' | 'smileyFace' | 'snip1Rect' | 'snip2DiagRect' | 'snip2SameRect' | 'snipRoundRect' | 'squareTabs' | 'star10' | 'star12' | 'star16' | 'star24' | 'star32' | 'star4' | 'star5' | 'star6' | 'star7' | 'star8' | 'stripedRightArrow' | 'sun' | 'swooshArrow' | 'teardrop' | 'trapezoid' | 'triangle' | 'upArrow' | 'upArrowCallout' | 'upDownArrow' | 'upDownArrowCallout' | 'uturnArrow' | 'verticalScroll' | 'wave' | 'wedgeEllipseCallout' | 'wedgeRectCallout' | 'wedgeRoundRectCallout';
|
|
2288
2419
|
|
|
2289
2420
|
declare enum SHAPE_TYPE {
|
|
2290
2421
|
ACTION_BUTTON_BACK_OR_PREVIOUS = "actionButtonBackPrevious",
|
|
@@ -2403,7 +2534,7 @@ declare enum SHAPE_TYPE {
|
|
|
2403
2534
|
LINE_CALLOUT_3_BORDER_AND_ACCENT_BAR = "accentBorderCallout3",
|
|
2404
2535
|
LINE_CALLOUT_3_NO_BORDER = "callout3",
|
|
2405
2536
|
LINE_CALLOUT_4 = "borderCallout4",
|
|
2406
|
-
LINE_CALLOUT_4_ACCENT_BAR = "
|
|
2537
|
+
LINE_CALLOUT_4_ACCENT_BAR = "accentCallout4",
|
|
2407
2538
|
LINE_CALLOUT_4_BORDER_AND_ACCENT_BAR = "accentBorderCallout4",
|
|
2408
2539
|
LINE_CALLOUT_4_NO_BORDER = "callout4",
|
|
2409
2540
|
LINE = "line",
|
|
@@ -2540,6 +2671,16 @@ declare interface ShapeFillProps {
|
|
|
2540
2671
|
* @deprecated v3.3.0 - use `transparency`
|
|
2541
2672
|
*/
|
|
2542
2673
|
alpha?: number;
|
|
2674
|
+
/**
|
|
2675
|
+
* Image data URI for a DrawingML `a:blipFill` (table cells and other solid-fill sites).
|
|
2676
|
+
* @example 'image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAIAAADwyuo0...'
|
|
2677
|
+
*/
|
|
2678
|
+
data?: string;
|
|
2679
|
+
/**
|
|
2680
|
+
* Image path/URL for a DrawingML `a:blipFill`.
|
|
2681
|
+
* @example '/images/cell-bg.png'
|
|
2682
|
+
*/
|
|
2683
|
+
path?: string;
|
|
2543
2684
|
}
|
|
2544
2685
|
|
|
2545
2686
|
declare type ShapeGradientFlip = 'none' | 'x' | 'xy' | 'y';
|
|
@@ -2818,6 +2959,18 @@ declare interface ShapeProps extends PositionProps, ObjectNameProps, AppearOnCli
|
|
|
2818
2959
|
} | {
|
|
2819
2960
|
close: true;
|
|
2820
2961
|
}>;
|
|
2962
|
+
/**
|
|
2963
|
+
* Multiple path arrays for `custGeom` (SVG-derived shapes). Each inner array becomes one `a:path`.
|
|
2964
|
+
*/
|
|
2965
|
+
paths?: Array<NonNullable<ShapeProps['points']>>;
|
|
2966
|
+
/**
|
|
2967
|
+
* Custom `a:path@w` in EMU. When set, `points`/`paths` coordinates are used as-is (already EMU).
|
|
2968
|
+
*/
|
|
2969
|
+
pathW?: number;
|
|
2970
|
+
/**
|
|
2971
|
+
* Custom `a:path@h` in EMU. When set with `pathW`, `points`/`paths` coordinates are used as-is.
|
|
2972
|
+
*/
|
|
2973
|
+
pathH?: number;
|
|
2821
2974
|
/**
|
|
2822
2975
|
* Rounded rectangle radius (only for pptx.shapes.ROUNDED_RECTANGLE)
|
|
2823
2976
|
* - values: 0.0 to 1.0
|
|
@@ -2848,6 +3001,10 @@ declare interface ShapeProps extends PositionProps, ObjectNameProps, AppearOnCli
|
|
|
2848
3001
|
* Reflection effect (`a:reflection`)
|
|
2849
3002
|
*/
|
|
2850
3003
|
reflection?: ReflectionProps;
|
|
3004
|
+
/**
|
|
3005
|
+
* Blur effect (`a:blur` in shape `effectLst`)
|
|
3006
|
+
*/
|
|
3007
|
+
blur?: BlurProps;
|
|
2851
3008
|
/**
|
|
2852
3009
|
* @deprecated v3.3.0
|
|
2853
3010
|
*/
|
|
@@ -2885,6 +3042,10 @@ declare enum ShapeType {
|
|
|
2885
3042
|
'accentCallout1' = "accentCallout1",
|
|
2886
3043
|
'accentCallout2' = "accentCallout2",
|
|
2887
3044
|
'accentCallout3' = "accentCallout3",
|
|
3045
|
+
'accentCallout4' = "accentCallout4",
|
|
3046
|
+
'accentBorderCallout4' = "accentBorderCallout4",
|
|
3047
|
+
'borderCallout4' = "borderCallout4",
|
|
3048
|
+
'callout4' = "callout4",
|
|
2888
3049
|
'actionButtonBackPrevious' = "actionButtonBackPrevious",
|
|
2889
3050
|
'actionButtonBeginning' = "actionButtonBeginning",
|
|
2890
3051
|
'actionButtonBlank' = "actionButtonBlank",
|
|
@@ -3062,6 +3223,7 @@ declare enum ShapeType {
|
|
|
3062
3223
|
|
|
3063
3224
|
declare enum SLIDE_OBJECT_TYPES {
|
|
3064
3225
|
'chart' = "chart",
|
|
3226
|
+
'group' = "group",
|
|
3065
3227
|
'hyperlink' = "hyperlink",
|
|
3066
3228
|
'image' = "image",
|
|
3067
3229
|
'media' = "media",
|
|
@@ -3123,7 +3285,10 @@ declare interface SlideMasterProps {
|
|
|
3123
3285
|
} | {
|
|
3124
3286
|
roundRect: ShapeProps;
|
|
3125
3287
|
} | {
|
|
3126
|
-
text:
|
|
3288
|
+
text: {
|
|
3289
|
+
text?: string | TextProps[];
|
|
3290
|
+
options?: TextPropsOptions;
|
|
3291
|
+
};
|
|
3127
3292
|
}
|
|
3128
3293
|
/** any of the 180+ shape types (`line`/`rect` above are shorthands) */
|
|
3129
3294
|
| {
|
|
@@ -3144,8 +3309,9 @@ declare interface SlideMasterProps {
|
|
|
3144
3309
|
/**
|
|
3145
3310
|
* Text to be shown in placeholder (shown until user focuses textbox or adds text)
|
|
3146
3311
|
* - Leave blank to have powerpoint show default phrase (ex: "Click to add title")
|
|
3312
|
+
* - `TextProps[]` for mixed runs (bold/color/etc.)
|
|
3147
3313
|
*/
|
|
3148
|
-
text?: string;
|
|
3314
|
+
text?: string | TextProps[];
|
|
3149
3315
|
};
|
|
3150
3316
|
}>;
|
|
3151
3317
|
/**
|
|
@@ -3192,12 +3358,18 @@ declare interface SlideTransitionProps {
|
|
|
3192
3358
|
*/
|
|
3193
3359
|
type: TRANSITION_TYPE;
|
|
3194
3360
|
/**
|
|
3195
|
-
* Transition direction.
|
|
3361
|
+
* Transition direction. OOXML tokens or friendly aliases (`left`→`l`, `up`→`u`, `horizontal`→`horz`).
|
|
3196
3362
|
* side (push/wipe/vortex/pan): 'l'|'r'|'u'|'d'; orientation (blinds/checker/comb/randomBar/doors): 'horz'|'vert';
|
|
3197
3363
|
* eight-dir (cover/pull/ferris/gallery/conveyor/flip/switch): 'l'|'r'|'u'|'d'|'lu'|'ru'|'ld'|'rd';
|
|
3198
|
-
* corner (strips): 'lu'|'ru'|'
|
|
3364
|
+
* corner (strips): 'lu'|'ru'|'ld'|'rd' (ECMA-376 §19.5.74 / ST_TransitionCornerDirectionType);
|
|
3365
|
+
* in/out (split `dir` / zoom / warp): 'in'|'out'.
|
|
3199
3366
|
*/
|
|
3200
3367
|
direction?: string;
|
|
3368
|
+
/**
|
|
3369
|
+
* Split-only orientation (`CT_SplitTransition@orient`, ECMA-376 §19.5.71).
|
|
3370
|
+
* Accepts 'horz'|'vert' or 'horizontal'|'vertical'. When omitted, `direction` of horz/vert is used.
|
|
3371
|
+
*/
|
|
3372
|
+
orient?: 'horz' | 'vert' | 'horizontal' | 'vertical';
|
|
3201
3373
|
/**
|
|
3202
3374
|
* Transition speed.
|
|
3203
3375
|
* @default 'fast'
|
|
@@ -3315,6 +3487,8 @@ declare interface TableCellProps extends TextBaseProps {
|
|
|
3315
3487
|
* @example { color:pptx.SchemeColor.accent1 } // theme color Accent1
|
|
3316
3488
|
*/
|
|
3317
3489
|
fill?: ShapeFillProps;
|
|
3490
|
+
/** @internal rId of a cell `a:blipFill` image (registered at addTable) */
|
|
3491
|
+
_fillRid?: number;
|
|
3318
3492
|
hyperlink?: HyperlinkProps;
|
|
3319
3493
|
/**
|
|
3320
3494
|
* Cell margin (inches)
|
|
@@ -3673,6 +3847,21 @@ declare interface TextBaseProps {
|
|
|
3673
3847
|
* @example 'Arial' // Arial font
|
|
3674
3848
|
*/
|
|
3675
3849
|
fontFace?: string;
|
|
3850
|
+
/**
|
|
3851
|
+
* East-Asian typeface (`a:ea`). Falls back to `fontFace` when omitted.
|
|
3852
|
+
* @example 'Microsoft YaHei'
|
|
3853
|
+
*/
|
|
3854
|
+
fontFaceEa?: string;
|
|
3855
|
+
/**
|
|
3856
|
+
* Complex-script typeface (`a:cs`). Falls back to `fontFace` when omitted.
|
|
3857
|
+
* @example 'Arial'
|
|
3858
|
+
*/
|
|
3859
|
+
fontFaceCs?: string;
|
|
3860
|
+
/**
|
|
3861
|
+
* Gradient text fill (`a:gradFill` on `a:rPr`). When set, overrides solid `color`.
|
|
3862
|
+
* @example { type:'linear', angle:45, stops:[{ pos:0, color:'FF0000' }, { pos:100, color:'0000FF' }] }
|
|
3863
|
+
*/
|
|
3864
|
+
gradient?: ShapeGradientProps;
|
|
3676
3865
|
/**
|
|
3677
3866
|
* Font size
|
|
3678
3867
|
* @example 12 // Font size 12
|
|
@@ -3881,10 +4070,16 @@ declare interface TextPropsOptions extends PositionProps, DataOrPathProps, TextB
|
|
|
3881
4070
|
outline?: {
|
|
3882
4071
|
color: Color;
|
|
3883
4072
|
size: number;
|
|
4073
|
+
transparency?: number;
|
|
3884
4074
|
};
|
|
3885
4075
|
paraSpaceAfter?: number;
|
|
3886
4076
|
paraSpaceBefore?: number;
|
|
3887
4077
|
placeholder?: string;
|
|
4078
|
+
/**
|
|
4079
|
+
* WordArt text warp preset (`a:prstTxWarp` on `a:bodyPr`)
|
|
4080
|
+
* @example 'textArchUp'
|
|
4081
|
+
*/
|
|
4082
|
+
presetShape?: TextShapeType;
|
|
3888
4083
|
/**
|
|
3889
4084
|
* Rounded rectangle radius (only for pptx.shapes.ROUNDED_RECTANGLE)
|
|
3890
4085
|
* - values: 0.0 to 1.0
|
|
@@ -3912,6 +4107,10 @@ declare interface TextPropsOptions extends PositionProps, DataOrPathProps, TextB
|
|
|
3912
4107
|
* Reflection effect (`a:reflection` on the text shape)
|
|
3913
4108
|
*/
|
|
3914
4109
|
reflection?: ReflectionProps;
|
|
4110
|
+
/**
|
|
4111
|
+
* Blur effect (`a:blur` on the text shape)
|
|
4112
|
+
*/
|
|
4113
|
+
blur?: BlurProps;
|
|
3915
4114
|
shape?: SHAPE_NAME;
|
|
3916
4115
|
/**
|
|
3917
4116
|
* Strikethrough style
|
|
@@ -3998,6 +4197,12 @@ declare interface TextPropsOptions extends PositionProps, DataOrPathProps, TextB
|
|
|
3998
4197
|
animation?: string | AnimationConfig;
|
|
3999
4198
|
}
|
|
4000
4199
|
|
|
4200
|
+
/**
|
|
4201
|
+
* WordArt / preset text warp (`a:prstTxWarp@prst`, ECMA-376 `ST_TextShapeType`)
|
|
4202
|
+
* @see standards/ecma/part-22_drawingml-reference-material-drawingml-main.txt §5.1.12.76
|
|
4203
|
+
*/
|
|
4204
|
+
declare type TextShapeType = 'textNoShape' | 'textPlain' | 'textStop' | 'textTriangle' | 'textTriangleInverted' | 'textChevron' | 'textChevronInverted' | 'textRingInside' | 'textRingOutside' | 'textArchUp' | 'textArchDown' | 'textCircle' | 'textButton' | 'textArchUpPour' | 'textArchDownPour' | 'textCirclePour' | 'textButtonPour' | 'textCurveUp' | 'textCurveDown' | 'textCanUp' | 'textCanDown' | 'textWave1' | 'textWave2' | 'textDoubleWave1' | 'textWave4' | 'textInflate' | 'textDeflate' | 'textInflateBottom' | 'textDeflateBottom' | 'textInflateTop' | 'textDeflateTop' | 'textDeflateInflate' | 'textDeflateInflateDeflate' | 'textFadeRight' | 'textFadeLeft' | 'textFadeUp' | 'textFadeDown' | 'textSlantUp' | 'textSlantDown' | 'textCascadeUp' | 'textCascadeDown';
|
|
4205
|
+
|
|
4001
4206
|
declare type ThemeColor = 'tx1' | 'tx2' | 'bg1' | 'bg2' | 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6';
|
|
4002
4207
|
|
|
4003
4208
|
declare interface ThemeProps {
|
|
@@ -4013,12 +4218,29 @@ declare interface ThemeProps {
|
|
|
4013
4218
|
* @default 'Calibri'
|
|
4014
4219
|
*/
|
|
4015
4220
|
bodyFontFace?: string;
|
|
4221
|
+
/**
|
|
4222
|
+
* East-Asian theme typeface (`a:ea` on major/minor `fontScheme`)
|
|
4223
|
+
* @example 'Microsoft YaHei'
|
|
4224
|
+
*/
|
|
4225
|
+
eaFontFace?: string;
|
|
4226
|
+
/**
|
|
4227
|
+
* Complex-script theme typeface (`a:cs` on major/minor `fontScheme`)
|
|
4228
|
+
* @example 'Arial'
|
|
4229
|
+
*/
|
|
4230
|
+
csFontFace?: string;
|
|
4016
4231
|
/**
|
|
4017
4232
|
* Custom theme color scheme — exactly 12 hex colors, in order:
|
|
4018
4233
|
* dk1, lt1, dk2, lt2, accent1–6, hlink, folHlink
|
|
4019
4234
|
* @example ['1B1B1B','FFFFFF','44546A','E7E6E6','0B5FFF','ED7D31','A5A5A5','FFC000','5B9BD5','70AD47','0563C1','954F72']
|
|
4020
4235
|
*/
|
|
4021
4236
|
themeColors?: HexColor[];
|
|
4237
|
+
/**
|
|
4238
|
+
* Hyperlink scheme color (`a:hlink` / `a:srgbClr`) as 6-digit hex, with or without `#`.
|
|
4239
|
+
* Overrides `themeColors[10]` when both are set. Invalid values are ignored.
|
|
4240
|
+
* @example 'FF0000'
|
|
4241
|
+
* @default '0563C1'
|
|
4242
|
+
*/
|
|
4243
|
+
hlinkColor?: string;
|
|
4022
4244
|
}
|
|
4023
4245
|
|
|
4024
4246
|
declare type TRANSITION_TYPE = `${TransitionType}`;
|
|
@@ -4172,6 +4394,7 @@ export { BARCHART_COLORS }
|
|
|
4172
4394
|
export { BULLET_TYPES }
|
|
4173
4395
|
export { BackgroundProps }
|
|
4174
4396
|
export { BaseAnimationConfig }
|
|
4397
|
+
export { BlurProps }
|
|
4175
4398
|
export { BorderProps }
|
|
4176
4399
|
export { CHART_NAME }
|
|
4177
4400
|
export { CHART_TYPE }
|
|
@@ -4231,6 +4454,8 @@ export { FloatAnimationConfig }
|
|
|
4231
4454
|
export { FloatDirection }
|
|
4232
4455
|
export { FlyAnimationConfig }
|
|
4233
4456
|
export { FlyDirection }
|
|
4457
|
+
export { Group }
|
|
4458
|
+
export { GroupProps }
|
|
4234
4459
|
export { GrowShrinkAmount }
|
|
4235
4460
|
export { GrowShrinkAnimationConfig }
|
|
4236
4461
|
export { GrowShrinkDirection }
|
|
@@ -4273,6 +4498,7 @@ export { LINEH_MODIFIER }
|
|
|
4273
4498
|
export { LaserTracePoint }
|
|
4274
4499
|
export { MASTER_OBJECTS }
|
|
4275
4500
|
export { Margin }
|
|
4501
|
+
export { MediaOnError }
|
|
4276
4502
|
export { MediaProps }
|
|
4277
4503
|
export { MediaType }
|
|
4278
4504
|
export { ModifiedThemeColor }
|
|
@@ -4353,6 +4579,7 @@ export { TextBaseProps }
|
|
|
4353
4579
|
export { TextGlowProps }
|
|
4354
4580
|
export { TextProps }
|
|
4355
4581
|
export { TextPropsOptions }
|
|
4582
|
+
export { TextShapeType }
|
|
4356
4583
|
export { ThemeColor }
|
|
4357
4584
|
export { ThemeProps }
|
|
4358
4585
|
export { TransitionType }
|
|
@@ -4392,6 +4619,7 @@ declare namespace PptxGenJS {
|
|
|
4392
4619
|
export { BULLET_TYPES }
|
|
4393
4620
|
export { BackgroundProps }
|
|
4394
4621
|
export { BaseAnimationConfig }
|
|
4622
|
+
export { BlurProps }
|
|
4395
4623
|
export { BorderProps }
|
|
4396
4624
|
export { CHART_NAME }
|
|
4397
4625
|
export { CHART_TYPE }
|
|
@@ -4451,6 +4679,8 @@ declare namespace PptxGenJS {
|
|
|
4451
4679
|
export { FloatDirection }
|
|
4452
4680
|
export { FlyAnimationConfig }
|
|
4453
4681
|
export { FlyDirection }
|
|
4682
|
+
export { Group }
|
|
4683
|
+
export { GroupProps }
|
|
4454
4684
|
export { GrowShrinkAmount }
|
|
4455
4685
|
export { GrowShrinkAnimationConfig }
|
|
4456
4686
|
export { GrowShrinkDirection }
|
|
@@ -4493,6 +4723,7 @@ declare namespace PptxGenJS {
|
|
|
4493
4723
|
export { LaserTracePoint }
|
|
4494
4724
|
export { MASTER_OBJECTS }
|
|
4495
4725
|
export { Margin }
|
|
4726
|
+
export { MediaOnError }
|
|
4496
4727
|
export { MediaProps }
|
|
4497
4728
|
export { MediaType }
|
|
4498
4729
|
export { ModifiedThemeColor }
|
|
@@ -4573,6 +4804,7 @@ declare namespace PptxGenJS {
|
|
|
4573
4804
|
export { TextGlowProps }
|
|
4574
4805
|
export { TextProps }
|
|
4575
4806
|
export { TextPropsOptions }
|
|
4807
|
+
export { TextShapeType }
|
|
4576
4808
|
export { ThemeColor }
|
|
4577
4809
|
export { ThemeProps }
|
|
4578
4810
|
export { TransitionType }
|