pptxgenjs-plus 4.1.17 → 4.1.19

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 CHANGED
@@ -1,93 +1,66 @@
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
- ![PptxGenJS Sample Slides](https://raw.githubusercontent.com/gitbrent/PptxGenJS/gh-pages/img/readme_banner.png)
6
-
7
- ![GitHub Repo stars](https://img.shields.io/github/stars/lofcz/PptxGenJS?style=flat-square)
8
- ![GitHub License](https://img.shields.io/github/license/lofcz/PptxGenJS?style=flat-square)
9
- [![npm version](https://img.shields.io/npm/v/pptxgenjs-plus?style=flat-square)](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 &copy; 2015-present [Brent Ely](https://github.com/gitbrent/), &copy; 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).
1
+ # pptxgenjs-plus
2
+
3
+ [![npm](https://img.shields.io/npm/v/pptxgenjs-plus?style=flat-square&labelColor=3f3f46&color=71717a)](https://www.npmjs.com/package/pptxgenjs-plus)
4
+ [![license](https://img.shields.io/github/license/lofcz/pptxgenjs-plus?style=flat-square&labelColor=3f3f46&color=71717a)](https://github.com/lofcz/pptxgenjs-plus/blob/next/LICENSE)
5
+ [![node](https://img.shields.io/node/v/pptxgenjs-plus?style=flat-square&labelColor=3f3f46&color=71717a)](https://www.npmjs.com/package/pptxgenjs-plus)
6
+
7
+ ```bash
8
+ _/| \|\||
9
+ / | `_ generate pptx -- |||/
10
+ / =\ using typescript on node /= |||/
11
+ _-' \ or in the browser / |||||/
12
+ _____________-' _`-/ \-' |||||||/`-_____________
13
+ \ / -- -||||||||| /
14
+ \ \ |/|||| /
15
+ |_____ _\ \_______ _______/ /_ _____|
16
+ _________.\___,-' \__________/ \___________/ `-.___/,_________
17
+ ```
18
+
19
+ ## Getting started
20
+
21
+ ```bash
22
+ npm install pptxgenjs-plus
23
+ ```
24
+
25
+ ```ts
26
+ import pptxgen from 'pptxgenjs-plus'
27
+
28
+ const pres = new pptxgen()
29
+ const slide = pres.addSlide()
30
+ slide.addText('Hello', { x: 0.5, y: 0.5, fontSize: 24 })
31
+ await pres.writeFile({ fileName: 'hello.pptx' })
32
+ ```
33
+
34
+ Declarative JSX lives in the workspace package `pptxgenjs-plus-jsx` (`packages/pptxgenjs-jsx`):
35
+
36
+ ```tsx
37
+ /** @jsxImportSource pptxgenjs-plus-jsx */
38
+ import { Deck, Slide, Text } from 'pptxgenjs-plus-jsx'
39
+ import { renderPptx } from 'pptxgenjs-plus-jsx/render'
40
+
41
+ await renderPptx(
42
+ <Deck title="Hello">
43
+ <Slide>
44
+ <Text x={0.5} y={0.5} w={8} h={1} fontSize={24}>Hello</Text>
45
+ </Slide>
46
+ </Deck>,
47
+ { fileName: 'hello.pptx' },
48
+ )
49
+ ```
50
+
51
+ ## Contributors
52
+
53
+ Thanks to everyone who contributed to the original project and this distribution.
54
+
55
+ Notable contributions:
56
+
57
+ - [Dzmitry Dulko](https://github.com/DzmitryDulko) — initial NPM publication
58
+ - [Michal Kacerovský](https://github.com/kajda90) — Master Slide layouts and chart expertise
59
+ - [Connor Bowman](https://github.com/conbow) — placeholder support
60
+ - [Reima Frgos](https://github.com/ReimaFrgos) — chart and general functionality patches
61
+ - [Matt King](https://github.com/kyrrigle) — chart expertise
62
+ - [Mike Wilcox](https://github.com/clubajax) — chart expertise
63
+ - [Joonas](https://github.com/wyozi) — [react-pptx](https://github.com/wyozi/react-pptx)
64
+ - [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
65
+
66
+ PowerPoint shape definitions and portions of the XML generation are derived from the [Officegen Project](https://github.com/Ziv-Barber/officegen).