pptxgenjs-plus 4.1.18 → 4.1.20
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/dist/pptxgen.bundle.js +38 -34
- package/dist/pptxgen.cjs.js +154 -48
- package/dist/pptxgen.es.js +154 -48
- package/dist/pptxgen.min.js +35 -33
- package/package.json +5 -2
- package/types/index.d.ts +66 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pptxgenjs-plus",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.20",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Brent Ely",
|
|
6
6
|
"url": "https://github.com/gitbrent/"
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"build": "rslib build -c rsbuild.config.mts && bun run build:types",
|
|
41
41
|
"build:types": "bun scripts/gen-types-namespace.mjs",
|
|
42
42
|
"build:jsx": "bun run --cwd packages/pptxgenjs-jsx build",
|
|
43
|
+
"build:std": "bun run --cwd packages/pptxgenjs-std build",
|
|
43
44
|
"generate:version": "bun scripts/package-version.mjs",
|
|
44
45
|
"dist": "bun run build",
|
|
45
46
|
"prepare": "bun run build",
|
|
@@ -59,7 +60,8 @@
|
|
|
59
60
|
"pptx:verify": "bun test/pptx-verify.ts",
|
|
60
61
|
"fixtures:repair": "bun test/repair-fixtures.ts",
|
|
61
62
|
"test:jsx": "bun run --cwd packages/pptxgenjs-jsx typecheck && bun test packages/pptxgenjs-jsx",
|
|
62
|
-
"
|
|
63
|
+
"test:std": "bun run --cwd packages/pptxgenjs-std typecheck && bun test packages/pptxgenjs-std",
|
|
64
|
+
"check": "bun run lint && bun run typecheck && bun run test && bun run test:jsx && bun run test:std",
|
|
63
65
|
"prepublishOnly": "bun run check && bun run build"
|
|
64
66
|
},
|
|
65
67
|
"browser": {
|
|
@@ -72,6 +74,7 @@
|
|
|
72
74
|
},
|
|
73
75
|
"dependencies": {
|
|
74
76
|
"@node-projects/jszip": "^4.2.1",
|
|
77
|
+
"@rgrove/parse-xml": "^4.2.3",
|
|
75
78
|
"pako": "^3.0.1"
|
|
76
79
|
},
|
|
77
80
|
"devDependencies": {
|
package/types/index.d.ts
CHANGED
|
@@ -1195,8 +1195,12 @@ declare interface ISlideObject {
|
|
|
1195
1195
|
zoomSlideNum?: number;
|
|
1196
1196
|
/** target section title (section/summary zoom) @internal */
|
|
1197
1197
|
zoomSectionTitle?: string;
|
|
1198
|
+
/** extra summary-zoom section titles (`sectionTitles`) @internal */
|
|
1199
|
+
zoomSectionTitles?: string[];
|
|
1198
1200
|
/** resolved target section GUID (braced `{…}`), set at build @internal */
|
|
1199
1201
|
zoomSectionId?: string;
|
|
1202
|
+
/** resolved extra summary-zoom section GUIDs @internal */
|
|
1203
|
+
zoomSectionIds?: string[];
|
|
1200
1204
|
/** cover/thumbnail image rId @internal */
|
|
1201
1205
|
zoomRid?: number;
|
|
1202
1206
|
/** content-part / ink / Office App relationship id @internal */
|
|
@@ -1828,6 +1832,11 @@ declare class PptxGenJS implements IPresentationProps {
|
|
|
1828
1832
|
browseMode?: boolean;
|
|
1829
1833
|
/** Laser-pointer color. MS-PPTX §2.3.1.16 `p14:laserClr` on `showPr`. */
|
|
1830
1834
|
laserColor?: string;
|
|
1835
|
+
/**
|
|
1836
|
+
* Slide-show options (`p:showPr`). Opt-in — omitted unless set.
|
|
1837
|
+
* @example pptx.slideShow = { mode: 'kiosk', loop: true }
|
|
1838
|
+
*/
|
|
1839
|
+
slideShow?: SlideShowProps;
|
|
1831
1840
|
/**
|
|
1832
1841
|
* Chart data-point properties and datalabels follow their cell references.
|
|
1833
1842
|
* MS-PPTX §2.4.1.1 `chartTrackingRefBased` on `presentationPr` extLst.
|
|
@@ -2060,9 +2069,18 @@ declare interface PresentationProps {
|
|
|
2060
2069
|
notesGuides?: GuideProps[];
|
|
2061
2070
|
/**
|
|
2062
2071
|
* Default DPI used when compressing/saving images. MS-PPTX §2.3.1.5 `defaultImageDpi`.
|
|
2063
|
-
* Only applies when image compression is on.
|
|
2072
|
+
* Only applies when image compression is on. `0` means "do not compress".
|
|
2073
|
+
* @example 220
|
|
2074
|
+
* @example 0
|
|
2064
2075
|
*/
|
|
2065
2076
|
defaultImageDpi?: number;
|
|
2077
|
+
/**
|
|
2078
|
+
* Slide-show options (`p:showPr`). Opt-in — omitted unless set.
|
|
2079
|
+
* Emits the required present/browse/kiosk choice plus optional loop/narration/animation flags.
|
|
2080
|
+
* Flat `browseMode` / `laserColor` still work and merge into this `showPr`.
|
|
2081
|
+
* @example { mode: 'kiosk', loop: true }
|
|
2082
|
+
*/
|
|
2083
|
+
slideShow?: SlideShowProps;
|
|
2066
2084
|
/**
|
|
2067
2085
|
* Discard image editing data (crop info, imgProps) on save. MS-PPTX §2.3.1.6 `discardImageEditData`.
|
|
2068
2086
|
* @default false
|
|
@@ -2205,9 +2223,11 @@ declare interface PresSlide extends SlideBaseProps {
|
|
|
2205
2223
|
addComment: (comment: CommentProps) => PresSlide;
|
|
2206
2224
|
/**
|
|
2207
2225
|
* Slide creation identifier (MS-PPTX §2.3.1.4 `p14:creationId` on `cSld`).
|
|
2208
|
-
* Opt-in — omitted unless set.
|
|
2226
|
+
* Opt-in — omitted unless set. `true` assigns a reproducible id from the slide number.
|
|
2227
|
+
* @example 123456789
|
|
2228
|
+
* @example true
|
|
2209
2229
|
*/
|
|
2210
|
-
creationId?: number;
|
|
2230
|
+
creationId?: number | true;
|
|
2211
2231
|
/**
|
|
2212
2232
|
* Add a Slide Zoom object linking to another slide (MS-PPTX §2.10 `p16:sldZm`).
|
|
2213
2233
|
* Rendered inside `mc:AlternateContent` with a `pic` fallback for older readers.
|
|
@@ -3341,6 +3361,44 @@ declare interface SlideShowEvent {
|
|
|
3341
3361
|
seek?: number;
|
|
3342
3362
|
}
|
|
3343
3363
|
|
|
3364
|
+
/**
|
|
3365
|
+
* Slide-show options written to `ppt/presProps.xml` as `p:showPr` (ECMA-376 §19.2.1.30).
|
|
3366
|
+
* Opt-in: unset writes no `showPr`. The present/browse/kiosk choice is required when `showPr` is emitted.
|
|
3367
|
+
*/
|
|
3368
|
+
declare interface SlideShowProps {
|
|
3369
|
+
/**
|
|
3370
|
+
* How the slide show runs (`p:showPr` choice).
|
|
3371
|
+
* - `present`: full screen, presenter-driven
|
|
3372
|
+
* - `browse`: windowed, viewer-driven
|
|
3373
|
+
* - `kiosk`: full screen, self-running
|
|
3374
|
+
* @default 'present'
|
|
3375
|
+
*/
|
|
3376
|
+
mode?: 'present' | 'browse' | 'kiosk';
|
|
3377
|
+
/** Restart the show after the last slide. @default false */
|
|
3378
|
+
loop?: boolean;
|
|
3379
|
+
/** Play recorded narration. @default true */
|
|
3380
|
+
showNarration?: boolean;
|
|
3381
|
+
/** Play animations. @default true */
|
|
3382
|
+
showAnimation?: boolean;
|
|
3383
|
+
/** Use the slide timings recorded in the file. @default true */
|
|
3384
|
+
useTimings?: boolean;
|
|
3385
|
+
/**
|
|
3386
|
+
* Show the scrollbar when `mode` is `browse` (`p:browse@showScrollbar`).
|
|
3387
|
+
* Distinct from `browseMode` (MS-PPTX status-bar `p14:browseMode@showStatus`).
|
|
3388
|
+
*/
|
|
3389
|
+
showScrollbar?: boolean;
|
|
3390
|
+
/**
|
|
3391
|
+
* Status-bar visibility in browse mode (MS-PPTX §2.3.1.2 `p14:browseMode@showStatus`).
|
|
3392
|
+
* Merges with the presentation-level `browseMode` property.
|
|
3393
|
+
*/
|
|
3394
|
+
browseMode?: boolean;
|
|
3395
|
+
/**
|
|
3396
|
+
* Laser-pointer color (MS-PPTX §2.3.1.16 `p14:laserClr`).
|
|
3397
|
+
* Merges with the presentation-level `laserColor` property.
|
|
3398
|
+
*/
|
|
3399
|
+
laserColor?: Color;
|
|
3400
|
+
}
|
|
3401
|
+
|
|
3344
3402
|
/** ECMA-376 `ST_TLTriggerEvent` values used by `p14:triggerEvt`. */
|
|
3345
3403
|
declare type SlideShowTriggerType = 'onBegin' | 'onEnd' | 'begin' | 'end' | 'onClick' | 'onDblClick' | 'onMouseOver' | 'onMouseOut' | 'onNext' | 'onPrev' | 'onStopAudio';
|
|
3346
3404
|
|
|
@@ -3421,7 +3479,9 @@ declare type SplitDirection = 'horizontalIn' | 'horizontalOut' | 'verticalIn' |
|
|
|
3421
3479
|
/** A Summary Zoom navigation object. MS-PPTX §2.11 `CT_SummaryZoom`. */
|
|
3422
3480
|
declare interface SummaryZoomProps extends ZoomBaseProps {
|
|
3423
3481
|
/** Title of the target section (must match an `addSection({ title })`). */
|
|
3424
|
-
sectionTitle
|
|
3482
|
+
sectionTitle?: string;
|
|
3483
|
+
/** Additional section titles (each emits a `p16:summaryZmObj`). */
|
|
3484
|
+
sectionTitles?: string[];
|
|
3425
3485
|
/** Alt-text title on the zoom object. */
|
|
3426
3486
|
title?: string;
|
|
3427
3487
|
/** Alt-text description on the zoom object. */
|
|
@@ -4557,6 +4617,7 @@ export { SlideMasterProps }
|
|
|
4557
4617
|
export { SlideNumberProps }
|
|
4558
4618
|
export { SlideObjectAnimation }
|
|
4559
4619
|
export { SlideShowEvent }
|
|
4620
|
+
export { SlideShowProps }
|
|
4560
4621
|
export { SlideShowTriggerType }
|
|
4561
4622
|
export { SlideTransitionProps }
|
|
4562
4623
|
export { SoftEdgeProps }
|
|
@@ -4782,6 +4843,7 @@ declare namespace PptxGenJS {
|
|
|
4782
4843
|
export { SlideNumberProps }
|
|
4783
4844
|
export { SlideObjectAnimation }
|
|
4784
4845
|
export { SlideShowEvent }
|
|
4846
|
+
export { SlideShowProps }
|
|
4785
4847
|
export { SlideShowTriggerType }
|
|
4786
4848
|
export { SlideTransitionProps }
|
|
4787
4849
|
export { SoftEdgeProps }
|