pptxgenjs-plus 4.1.17
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/LICENSE +22 -0
- package/README.md +93 -0
- package/dist/pptxgen.bundle.js +109 -0
- package/dist/pptxgen.cjs.js +21468 -0
- package/dist/pptxgen.es.js +21342 -0
- package/dist/pptxgen.min.js +109 -0
- package/package.json +113 -0
- package/types/index.d.ts +4592 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015-2022 Brent Ely
|
|
4
|
+
Copyright (c) 2026 lofcz
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# PptxGenJS
|
|
2
|
+
|
|
3
|
+
Fork of [PptxGenJS](https://github.com/gitbrent/PptxGenJS) published as [`pptxgenjs-plus`](https://www.npmjs.com/package/pptxgenjs-plus) on npm.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
[](https://www.npmjs.com/package/pptxgenjs-plus)
|
|
10
|
+
|
|
11
|
+
PptxGenJS is a JavaScript library for generating PowerPoint presentations programmatically. It runs in Node.js, browsers, and bundler-based environments (React, Angular, Vite, Webpack, Electron), and requires no PowerPoint installation or license. Output is standards-compliant [Open Office XML (OOXML)](https://ecma-international.org/publications-and-standards/standards/ecma-376/), compatible with Microsoft PowerPoint, Apple Keynote, LibreOffice Impress, and Google Slides (via import). For PowerPoint-specific behavior, see Microsoft's [Office implementation notes](https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oi29500/1fd4a662-8623-49c0-82f0-18fa91b413b8).
|
|
12
|
+
|
|
13
|
+
## About this fork
|
|
14
|
+
|
|
15
|
+
This repository is a fork of [gitbrent/PptxGenJS](https://github.com/gitbrent/PptxGenJS), maintained by [Matěj Lofcz Štágl](https://github.com/lofcz) and published as [`pptxgenjs-plus`](https://www.npmjs.com/package/pptxgenjs-plus).
|
|
16
|
+
|
|
17
|
+
- **Strict null-safety** — the entire source compiles under TypeScript `strictNullChecks` with zero non-null assertions (`!`) and zero unchecked `as` casts; null-safety is enforced through explicit types, guard clauses, and validated defaults
|
|
18
|
+
- **Continuous integration** — unit, end-to-end, OOXML package-contract tests, and an optional LibreOffice consumer check
|
|
19
|
+
- **Security** — no known vulnerabilities in the published package, and a published [security policy](SECURITY.md)
|
|
20
|
+
|
|
21
|
+
The public API remains compatible with upstream PptxGenJS; existing code and documentation continue to apply.
|
|
22
|
+
|
|
23
|
+
## Requirements
|
|
24
|
+
|
|
25
|
+
- Node.js 20 or newer
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install pptxgenjs-plus
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
yarn add pptxgenjs-plus
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The package ships dual ES Module and CommonJS builds. Bundlers select the correct build automatically via the `exports` field in `package.json`. The `.pptx` output can be delivered as a browser download, base64 string, Blob, Buffer, or Node stream.
|
|
38
|
+
|
|
39
|
+
## Quick start
|
|
40
|
+
|
|
41
|
+
A presentation is created in four steps: instantiate, add a slide, add content, save.
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import pptxgen from "pptxgenjs-plus";
|
|
45
|
+
|
|
46
|
+
// 1. Create a presentation
|
|
47
|
+
const pres = new pptxgen();
|
|
48
|
+
|
|
49
|
+
// 2. Add a slide
|
|
50
|
+
const slide = pres.addSlide();
|
|
51
|
+
|
|
52
|
+
// 3. Add content (text, tables, shapes, images, charts, media)
|
|
53
|
+
slide.addText("Quarterly Results", { x: 0.5, y: 0.5, fontSize: 24, bold: true });
|
|
54
|
+
slide.addText("Revenue up 12% year over year", { x: 0.5, y: 1.3, fontSize: 14, color: "363636" });
|
|
55
|
+
|
|
56
|
+
// 4. Write the .pptx file
|
|
57
|
+
await pres.writeFile({ fileName: "quarterly-results.pptx" });
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
When loading the library via a `<script>` tag rather than a module import, the constructor is the global `PptxGenJS` (for example, `const pres = new PptxGenJS()`); the remaining steps are identical.
|
|
61
|
+
|
|
62
|
+
## Documentation
|
|
63
|
+
|
|
64
|
+
Complete API reference, tutorials, and integration guides are available on the official docs site: [https://gitbrent.github.io/PptxGenJS](https://gitbrent.github.io/PptxGenJS).
|
|
65
|
+
|
|
66
|
+
Local Rspress docs under [`docs/`](docs) can be previewed with `bun run docs:dev`.
|
|
67
|
+
|
|
68
|
+
## Issues and support
|
|
69
|
+
|
|
70
|
+
Report defects and feature requests on the [issue tracker](https://github.com/lofcz/PptxGenJS/issues/new), or [submit a pull request](https://github.com/lofcz/PptxGenJS/pulls). When reporting an issue, include a code snippet or a link that demonstrates the problem. See [CONTRIBUTING.md](CONTRIBUTING.md) for build and test instructions.
|
|
71
|
+
|
|
72
|
+
## Contributors
|
|
73
|
+
|
|
74
|
+
Thanks to everyone who contributed to the original project and this distribution.
|
|
75
|
+
|
|
76
|
+
Notable contributions:
|
|
77
|
+
|
|
78
|
+
- [Dzmitry Dulko](https://github.com/DzmitryDulko) — initial NPM publication
|
|
79
|
+
- [Michal Kacerovský](https://github.com/kajda90) — Master Slide layouts and chart expertise
|
|
80
|
+
- [Connor Bowman](https://github.com/conbow) — placeholder support
|
|
81
|
+
- [Reima Frgos](https://github.com/ReimaFrgos) — chart and general functionality patches
|
|
82
|
+
- [Matt King](https://github.com/kyrrigle) — chart expertise
|
|
83
|
+
- [Mike Wilcox](https://github.com/clubajax) — chart expertise
|
|
84
|
+
- [Joonas](https://github.com/wyozi) — [react-pptx](https://github.com/wyozi/react-pptx)
|
|
85
|
+
- [NEOMA GmbH](https://neo-ma.de) — thank you for the `@neo-ma/pptxgenjs` hardening work (strict null-safety, OOXML package contracts, LibreOffice consumer checks) that this fork builds on
|
|
86
|
+
|
|
87
|
+
PowerPoint shape definitions and portions of the XML generation are derived from the [Officegen Project](https://github.com/Ziv-Barber/officegen).
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
|
|
91
|
+
Copyright © 2015-present [Brent Ely](https://github.com/gitbrent/), © 2026-present [Matěj Lofcz Štágl](https://github.com/lofcz)
|
|
92
|
+
|
|
93
|
+
Licensed under the [MIT License](https://github.com/lofcz/PptxGenJS/blob/master/LICENSE).
|