pptx-react-viewer 1.10.2 → 1.12.0

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +12 -0
  3. package/dist/PowerPointViewer-BzsjqMzg.d.mts +26 -0
  4. package/dist/PowerPointViewer-C2a7iXAK.d.ts +26 -0
  5. package/dist/hooks-unstable.d.mts +2294 -0
  6. package/dist/hooks-unstable.d.ts +2294 -0
  7. package/dist/hooks-unstable.js +4891 -0
  8. package/dist/hooks-unstable.js.br +0 -0
  9. package/dist/hooks-unstable.js.gz +0 -0
  10. package/dist/hooks-unstable.mjs +4891 -0
  11. package/dist/hooks-unstable.mjs.br +0 -0
  12. package/dist/hooks-unstable.mjs.gz +0 -0
  13. package/dist/i18n.js +1 -1
  14. package/dist/i18n.js.br +0 -0
  15. package/dist/i18n.js.gz +0 -0
  16. package/dist/i18n.mjs +1 -1
  17. package/dist/i18n.mjs.br +0 -0
  18. package/dist/i18n.mjs.gz +0 -0
  19. package/dist/index.d.mts +3 -2
  20. package/dist/index.d.ts +3 -2
  21. package/dist/index.js +324 -318
  22. package/dist/index.js.br +0 -0
  23. package/dist/index.js.gz +0 -0
  24. package/dist/index.mjs +324 -318
  25. package/dist/index.mjs.br +0 -0
  26. package/dist/index.mjs.gz +0 -0
  27. package/dist/pptx-viewer.css +1 -1
  28. package/dist/pptx-viewer.css.br +0 -0
  29. package/dist/pptx-viewer.css.gz +0 -0
  30. package/dist/{PowerPointViewer-88hWoBGx.d.mts → types-ui-DlsqFx7_.d.mts} +126 -23
  31. package/dist/{PowerPointViewer-88hWoBGx.d.ts → types-ui-DlsqFx7_.d.ts} +126 -23
  32. package/dist/usePresenterWindow-BKx5DLJy.d.ts +1619 -0
  33. package/dist/usePresenterWindow-BQwzr87T.d.mts +1619 -0
  34. package/dist/viewer/index.d.mts +10 -1604
  35. package/dist/viewer/index.d.ts +10 -1604
  36. package/dist/viewer/index.js +324 -318
  37. package/dist/viewer/index.js.br +0 -0
  38. package/dist/viewer/index.js.gz +0 -0
  39. package/dist/viewer/index.mjs +324 -318
  40. package/dist/viewer/index.mjs.br +0 -0
  41. package/dist/viewer/index.mjs.gz +0 -0
  42. package/package.json +6 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,22 @@ All notable changes to this project are documented here.
4
4
  This file is generated from [Conventional Commits](https://www.conventionalcommits.org)
5
5
  by [git-cliff](https://git-cliff.org); do not edit it by hand.
6
6
 
7
+ ## [1.11.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@1.11.0) - 2026-07-09
8
+
9
+ ### Features
10
+
11
+ - **shared:** Add vermilion light/dark theme presets to all bindings (by @ChristopherVR) ([1b6e816](https://github.com/ChristopherVR/pptx-viewer/commit/1b6e8161679a3f984cbfedb09ece0c8c01570c0a))
12
+
13
+ ### Other
14
+
15
+ - Reconcile with origin/main before push (by @ChristopherVR) ([10acef8](https://github.com/ChristopherVR/pptx-viewer/commit/10acef81a7f5d79e778e4e4464d956cc84682f7c))
16
+
17
+ ## [1.10.2](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@1.10.2) - 2026-07-09
18
+
19
+ ### Other
20
+
21
+ - Reconcile with origin/main before push (by @ChristopherVR) ([b8c46bc](https://github.com/ChristopherVR/pptx-viewer/commit/b8c46bc3622e301d3365f5c489144e5aa5401782))
22
+
7
23
  ## [1.10.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@1.10.1) - 2026-07-09
8
24
 
9
25
  ## [1.10.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@1.10.0) - 2026-07-08
package/README.md CHANGED
@@ -167,6 +167,16 @@ Override specific values with the `theme` prop:
167
167
 
168
168
  All `ViewerTheme.colors` keys are optional; override only what you need. Helpers `defaultThemeColors`, `defaultRadius`, `themeToCssVars`, `defaultCssVars`, `ViewerThemeProvider`, and `useViewerTheme` are exported for advanced use. See the [full docs](https://christophervr.github.io/pptx-viewer/) for the complete token list.
169
169
 
170
+ Two ready-made presets ship with the package: `vermilionLightTheme` (warm paper canvas) and `vermilionDarkTheme` (dimmed presenter room), the same vermilion brand look as the [documentation site](https://christophervr.github.io/pptx-viewer/):
171
+
172
+ ```tsx
173
+ import { PowerPointViewer, vermilionLightTheme } from 'pptx-react-viewer';
174
+
175
+ <PowerPointViewer content={bytes} theme={vermilionLightTheme} />;
176
+ ```
177
+
178
+ The underlying palettes (`vermilionLightColors`, `vermilionDarkColors`) and radius (`vermilionRadius`) are exported too, so you can spread them into your own variant.
179
+
170
180
  ## Localization (i18n)
171
181
 
172
182
  UI labels go through [i18next](https://www.i18next.com/) / [react-i18next](https://react.i18next.com/) with dotted keys such as `pptx.statusBar.allSaved`. Initialise an i18next instance and wrap your app in `I18nextProvider` (the demo's `demo/i18n.ts` shows a minimal config, including a `parseMissingKeyHandler` that derives Title Case labels for any key you don't explicitly translate). `pptx-react-viewer/i18n` exports `translationsEn` (the English dictionary), `keyToLabel` (the fallback), and a `TranslationKey` type you can use to type-check a new locale dictionary (`Record<TranslationKey, string>`) at compile time. Add a new language by supplying a resource bundle under its language code. See the [Localization guide](https://christophervr.github.io/pptx-viewer/guide/localization) for full wiring examples and how to contribute a translation upstream; the live demo's language picker is a working reference.
@@ -175,6 +185,8 @@ UI labels go through [i18next](https://www.i18next.com/) / [react-i18next](https
175
185
 
176
186
  You only need the `<PowerPointViewer>` component; everything else is internal. Behind it, the logic lives in many small, focused React hooks, and the components themselves just draw what those hooks produce. Slides are rendered as ordinary HTML and CSS (charts as inline SVG, tables as real `<table>` elements), which is why text stays sharp, selectable, and accessible. For the full component tree, the rendering pipeline, the animation and transition engine, connector routing, collaboration, and a file-by-file map, see the [full documentation](https://christophervr.github.io/pptx-viewer/).
177
187
 
188
+ A small curated set of those hooks is exported from `pptx-react-viewer/viewer` with a stable API; the complete set (67+) is also importable from `pptx-react-viewer/hooks-unstable` for advanced integrations, with **no compatibility guarantees** across releases. See the [Hooks reference](https://christophervr.github.io/pptx-viewer/react/hooks-reference) for the full list.
189
+
178
190
  ## Limitations
179
191
 
180
192
  CSS-based rendering trades a few visual effects for crisp text, accessibility, and DOM interactivity: `backdrop-filter` becomes semi-transparent backgrounds and path gradients approximate as elliptical radials, while `mix-blend-mode` and CSS 3D transforms render natively on screen but flatten in raster export. Text uses fonts available in the browser (embedded fonts are injected when present). Media playback depends on browser codec support. SmartArt is decomposed into editable shapes with a live reflow engine for structural edits, and charts edit via the inspector data grid rather than the chart surface. 3D models need the optional Three.js peer. See the [full docs](https://christophervr.github.io/pptx-viewer/) for the complete list.
@@ -0,0 +1,26 @@
1
+ import { f, V } from './presentation-CLc4eS3z.js';
2
+ import * as React from 'react';
3
+ import React__default from 'react';
4
+ import { b as PowerPointViewerProps, a as PowerPointViewerHandle } from './types-ui-DlsqFx7_.mjs';
5
+
6
+ /**
7
+ * Thin adapter shim: the initial-style resolution now lives in
8
+ * `pptx-viewer-shared` (`render/animation-effects`). Shared returns a neutral
9
+ * `AnimationStyle` (camelCase inline-style map); these wrappers re-type the
10
+ * result as `React.CSSProperties` so React consumers/tests are unchanged.
11
+ */
12
+
13
+ declare function getAnimationInitialStyle(preset: f | undefined, nativeAnimation?: V): React__default.CSSProperties;
14
+
15
+ /**
16
+ * Root React component for the PowerPoint viewer/editor.
17
+ *
18
+ * Accepts binary `.pptx` content and renders a full-featured editor with
19
+ * slide canvas, toolbar, inspector panels, presentation mode, and more.
20
+ *
21
+ * Uses `forwardRef` to expose a `PowerPointViewerHandle` for imperative
22
+ * access (e.g. serialising the current content for saving).
23
+ */
24
+ declare const PowerPointViewer: React.ForwardRefExoticComponent<PowerPointViewerProps & React.RefAttributes<PowerPointViewerHandle>>;
25
+
26
+ export { PowerPointViewer as P, getAnimationInitialStyle as g };
@@ -0,0 +1,26 @@
1
+ import { f, V } from './presentation-CLc4eS3z.js';
2
+ import * as React from 'react';
3
+ import React__default from 'react';
4
+ import { b as PowerPointViewerProps, a as PowerPointViewerHandle } from './types-ui-DlsqFx7_.js';
5
+
6
+ /**
7
+ * Thin adapter shim: the initial-style resolution now lives in
8
+ * `pptx-viewer-shared` (`render/animation-effects`). Shared returns a neutral
9
+ * `AnimationStyle` (camelCase inline-style map); these wrappers re-type the
10
+ * result as `React.CSSProperties` so React consumers/tests are unchanged.
11
+ */
12
+
13
+ declare function getAnimationInitialStyle(preset: f | undefined, nativeAnimation?: V): React__default.CSSProperties;
14
+
15
+ /**
16
+ * Root React component for the PowerPoint viewer/editor.
17
+ *
18
+ * Accepts binary `.pptx` content and renders a full-featured editor with
19
+ * slide canvas, toolbar, inspector panels, presentation mode, and more.
20
+ *
21
+ * Uses `forwardRef` to expose a `PowerPointViewerHandle` for imperative
22
+ * access (e.g. serialising the current content for saving).
23
+ */
24
+ declare const PowerPointViewer: React.ForwardRefExoticComponent<PowerPointViewerProps & React.RefAttributes<PowerPointViewerHandle>>;
25
+
26
+ export { PowerPointViewer as P, getAnimationInitialStyle as g };