Appearance
Architecture
PptxGenJS is a TypeScript library that turns a presentation object model into an OOXML .pptx package. Consumer projects should import only the public package exports and let this repository own the internal OOXML generation details.
Responsibilities
src/index.ts,src/node.ts,src/browser.ts,src/standalone.ts, andsrc/core.tsdefine the public entry points described bypackage.jsonexports.src/pptxgen.tsowns the main presentation class and package export flow.src/slide.tsowns slide-level object collection and public slide methods.src/gen-*.tsfiles own internal generation primitives for XML, charts, objects, media, and tables.src/core-interfaces.tsandsrc/core-enums.tsdefine the public typed contract.scripts/package-smoke.mjsverifies the packed package boundary from a consumer perspective.
Boundaries
- The maintained runtime package is ESM-only.
- CommonJS and IIFE/global browser bundles are not maintained package targets.
dist/is generated release output, not hand-edited source.- Internal OOXML generators are implementation details unless deliberately exposed through
package.jsonexports and public declarations. - Downstream deck-production workflows belong in
slide-factoryunless the behavior is broadly reusable for PptxGenJS consumers.
Data And Control Flow
- Consumers create a presentation through a public PptxGenJS entry point.
- Public methods collect slides and slide objects into internal structures.
- The export flow calls internal generators to create package parts and OOXML.
- Runtime adapters write the result for Node or browser environments.
- Package smoke tests verify that consumers can import only supported public entry points.
Extension Points
- Add public API only through exported entry points and generated declarations.
- Add OOXML behavior with focused regression or schema fixtures.
- Add package-boundary checks when changing public exports, runtime targets, or declaration output.