pptx-react-viewer 4.55.0 → 4.56.1
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/CHANGELOG.md +60 -0
- package/README.md +16 -1
- package/dist/ai.d.ts +17 -0
- package/dist/ai.js +11 -0
- package/dist/ai.js.br +2 -0
- package/dist/ai.js.gz +0 -0
- package/dist/ai.mjs +9 -0
- package/dist/ai.mjs.br +0 -0
- package/dist/ai.mjs.gz +0 -0
- package/dist/{chunk-EXSGJHOH.mjs → chunk-3CN33VMC.mjs} +3017 -3037
- package/dist/chunk-3CN33VMC.mjs.br +0 -0
- package/dist/chunk-3CN33VMC.mjs.gz +0 -0
- package/dist/chunk-F6WCYCHV.js +40 -0
- package/dist/chunk-F6WCYCHV.js.br +0 -0
- package/dist/chunk-F6WCYCHV.js.gz +0 -0
- package/dist/chunk-NE5JQMED.mjs +37 -0
- package/dist/chunk-NE5JQMED.mjs.br +0 -0
- package/dist/chunk-NE5JQMED.mjs.gz +0 -0
- package/dist/{chunk-OIQAJR57.js → chunk-OOBBI4DH.js} +106 -8
- package/dist/chunk-OOBBI4DH.js.br +0 -0
- package/dist/chunk-OOBBI4DH.js.gz +0 -0
- package/dist/{chunk-V7JICDSL.js → chunk-PAJZXF2Q.js} +3113 -3132
- package/dist/chunk-PAJZXF2Q.js.br +0 -0
- package/dist/chunk-PAJZXF2Q.js.gz +0 -0
- package/dist/{chunk-64BFLDBT.mjs → chunk-UMGVFMAW.mjs} +107 -9
- package/dist/chunk-UMGVFMAW.mjs.br +0 -0
- package/dist/chunk-UMGVFMAW.mjs.gz +0 -0
- package/dist/index.d.ts +95 -14
- package/dist/index.js +28 -23
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +64 -7
- package/dist/internals.js +80 -80
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +1 -1
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer-canvas.css +1 -1
- package/dist/pptx-viewer-canvas.css.br +0 -0
- package/dist/pptx-viewer-canvas.css.gz +0 -0
- package/dist/viewer/index.d.ts +20 -10
- package/dist/viewer/index.js +19 -18
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +3 -2
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +9 -4
- package/dist/chunk-64BFLDBT.mjs.br +0 -0
- package/dist/chunk-64BFLDBT.mjs.gz +0 -0
- package/dist/chunk-EXSGJHOH.mjs.br +0 -0
- package/dist/chunk-EXSGJHOH.mjs.gz +0 -0
- package/dist/chunk-OIQAJR57.js.br +0 -0
- package/dist/chunk-OIQAJR57.js.gz +0 -0
- package/dist/chunk-V7JICDSL.js.br +0 -0
- package/dist/chunk-V7JICDSL.js.gz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,66 @@ A release listed with no entries carried no Conventional Commit in this package'
|
|
|
7
7
|
scope: scripts/release-plan.mjs releases whenever any published file changes, not only on
|
|
8
8
|
conventional commits.
|
|
9
9
|
|
|
10
|
+
## [4.56.1](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-react-viewer@4.56.1) - 2026-10-28
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **pptx:** Resolve viewer lint errors and stale save refs ([4abc45b](https://github.com/ChristopherVR/ooxml/commit/4abc45b210fbf2ce2cd7c4673bdf9d8f14a254be))
|
|
15
|
+
|
|
16
|
+
## [4.56.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-react-viewer@4.56.0) - 2026-10-28
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
- **pptx:** Expose the slide thumbnail rail as a building block in every binding ([#228](https://github.com/ChristopherVR/ooxml/issues/228)) ([2b77f02](https://github.com/ChristopherVR/ooxml/commit/2b77f026e1e26e6a5fe3c52f275608f39bc0ea8e))
|
|
21
|
+
- **text:** Share font selection with word script layout ([59ad0a2](https://github.com/ChristopherVR/ooxml/commit/59ad0a2e8249d3ffc9be34c2c9e6f9ffe8b3b07a))
|
|
22
|
+
- **chart:** Share manual plot layout across chart painters ([18b79c0](https://github.com/ChristopherVR/ooxml/commit/18b79c04bb1d2aa914630453413d995d0bb54922))
|
|
23
|
+
- **chart:** Share smooth series paths and authored strokes ([7329e5c](https://github.com/ChristopherVR/ooxml/commit/7329e5cbb546a041c0e67417fbe84e9d3dc415a2))
|
|
24
|
+
- **chart:** Share point label offsets and pie leader lines ([861f78f](https://github.com/ChristopherVR/ooxml/commit/861f78f5d9ba0fa93ed6e85ddfc209fd2bf828ca))
|
|
25
|
+
- **drawingml:** Render guide-driven custom shapes in word ([81558e6](https://github.com/ChristopherVR/ooxml/commit/81558e6fcfdb2a64ced22661410cbdfba954cea2))
|
|
26
|
+
- **drawingml:** Share picture crop with excel ([f093c0f](https://github.com/ChristopherVR/ooxml/commit/f093c0f6d1c2ea96736613990e870143d770774e))
|
|
27
|
+
- **chart:** Share calendar date axis rendering ([474de5c](https://github.com/ChristopherVR/ooxml/commit/474de5c4f2418ee7b67ec34a5e08c8eefa4bb992))
|
|
28
|
+
- **chart:** Share chart data table layout and rendering ([09fbdf1](https://github.com/ChristopherVR/ooxml/commit/09fbdf1ec8016b376b67053d8a5575fc3d1ef145))
|
|
29
|
+
- **drawingml:** Share ordered picture effects with excel ([b669575](https://github.com/ChristopherVR/ooxml/commit/b669575a041ab25169a7c83757075fe9dffe390a))
|
|
30
|
+
- **chart:** Share funnel geometry and neutral rendering ([28f6ce3](https://github.com/ChristopherVR/ooxml/commit/28f6ce302fa5791a11819209d6501e97e971b80b))
|
|
31
|
+
- **chart:** Share box distributions and neutral rendering ([6390e30](https://github.com/ChristopherVR/ooxml/commit/6390e30ac6994e6891f8324e4264949f66e0a0a0))
|
|
32
|
+
- **diagram:** Paint cached pictures in word and excel ([f254d51](https://github.com/ChristopherVR/ooxml/commit/f254d51eeed81279dd9f971cb7ac496364738ec2))
|
|
33
|
+
- **drawingml:** Share source-backed text body 3d codecs ([bcf2a0a](https://github.com/ChristopherVR/ooxml/commit/bcf2a0a491c6e4dc4e5fd4f5b615f3673285cadf))
|
|
34
|
+
- **pptx:** Add an /ai entry and createAiAssistant to every binding ([#219](https://github.com/ChristopherVR/ooxml/issues/219)) ([ecd4d43](https://github.com/ChristopherVR/ooxml/commit/ecd4d43acfc0133c2f9c1e3320f366244ba3bba3))
|
|
35
|
+
- **visio:** Improve selection dragging and resizing ([60cf8dd](https://github.com/ChristopherVR/ooxml/commit/60cf8dd9c547f16e114b98ae01fed0968aca5866))
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
- **pptx:** Scope collaboration undo to the local participant ([55b8bad](https://github.com/ChristopherVR/ooxml/commit/55b8badcf0ec06a7294debff8deff844dcfafb62))
|
|
40
|
+
- **pptx:** Autocorrect only the text typed in this edit ([0e5a85e](https://github.com/ChristopherVR/ooxml/commit/0e5a85e496e0d53e36c00e6fdfd5dd3749337d8a))
|
|
41
|
+
- **pptx:** Keep browser-local blob URLs out of the collaboration room ([433891b](https://github.com/ChristopherVR/ooxml/commit/433891b1db9a173780e6ad59cad56d92a5a0e929))
|
|
42
|
+
- **chart:** Resolve chartex axes by position to avoid prototype pollution ([16edc2f](https://github.com/ChristopherVR/ooxml/commit/16edc2fd96b261ecbfbe388491fe12494be15b89))
|
|
43
|
+
- **drawingml:** Separate guide and path coordinate spaces ([4db9fe1](https://github.com/ChristopherVR/ooxml/commit/4db9fe140ec43aae8cac6cae8846ccf4dad9ba58))
|
|
44
|
+
- **chart:** Export shared date format tokenizer ([b928657](https://github.com/ChristopherVR/ooxml/commit/b928657532d41bec6a83a5969c03be922ef0a90a))
|
|
45
|
+
- **drawingml:** Bound picture luminance and report extensions ([a36e847](https://github.com/ChristopherVR/ooxml/commit/a36e84725c483815ae7508872dd4d89c5a8375b2))
|
|
46
|
+
- **chart:** Paint date ticks over plot backgrounds ([e3fad37](https://github.com/ChristopherVR/ooxml/commit/e3fad379f6d990c1ad85658e751cb84176ca7852))
|
|
47
|
+
- **docx:** Load media for cached smartart pictures ([149b350](https://github.com/ChristopherVR/ooxml/commit/149b35025750b5189813e34cfa33cd1ff5757a17))
|
|
48
|
+
- **chart:** Retain table names and exclude hidden box series ([292dc25](https://github.com/ChristopherVR/ooxml/commit/292dc25c22544d9179d5c0fd31327a3d0aafb462))
|
|
49
|
+
- **chart:** Match native funnel label and box mean defaults ([06bbf26](https://github.com/ChristopherVR/ooxml/commit/06bbf26e496f00270eca67472087454496217cc1))
|
|
50
|
+
- **drawingml:** Preserve anchors and guard text 3d edits ([617a029](https://github.com/ChristopherVR/ooxml/commit/617a02979d5cdae5e3818afd8fb79af367de25eb))
|
|
51
|
+
- **drawingml:** Preserve omitted picture source formatting ([5e2d57d](https://github.com/ChristopherVR/ooxml/commit/5e2d57dfe0b3076be7c6cb5b086c596643eb5203))
|
|
52
|
+
|
|
53
|
+
### Refactor
|
|
54
|
+
|
|
55
|
+
- **opc:** Share hyperlink policy with explicit host protocols ([5f8ac72](https://github.com/ChristopherVR/ooxml/commit/5f8ac72edbe4fff4d2fa303ed3ce8a471762bd12))
|
|
56
|
+
|
|
57
|
+
### Documentation
|
|
58
|
+
|
|
59
|
+
- Record further shared office capability delivery ([845ee99](https://github.com/ChristopherVR/ooxml/commit/845ee99bdc290e148c485c87e64d853a5884e7f8))
|
|
60
|
+
|
|
61
|
+
### Testing
|
|
62
|
+
|
|
63
|
+
- **diagram:** Guard optional word media in picture assertion ([c8f5d14](https://github.com/ChristopherVR/ooxml/commit/c8f5d14ddcdef1ee04de6d4f3e557d1719eae5e8))
|
|
64
|
+
|
|
65
|
+
### Chores
|
|
66
|
+
|
|
67
|
+
- Integrate current main for reuse verification ([a22d5f5](https://github.com/ChristopherVR/ooxml/commit/a22d5f53406330909d3853ab64a4d850bc3c0ad1))
|
|
68
|
+
- Integrate main before shared capability push ([9dc78da](https://github.com/ChristopherVR/ooxml/commit/9dc78da5262a854807b9fc8395f1fd97f71c2eb4))
|
|
69
|
+
|
|
10
70
|
## [4.55.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-react-viewer@4.55.0) - 2026-10-28
|
|
11
71
|
|
|
12
72
|
### Features
|
package/README.md
CHANGED
|
@@ -110,7 +110,7 @@ const bytes = await viewerRef.current?.getContent(); // Uint8Array of a valid .p
|
|
|
110
110
|
| `shareDefaults` | `{ roomId?, userName?, serverUrl? }` | n/a | Seed values for the Share dialog fields |
|
|
111
111
|
| `smartArt3D` | `boolean` | `false` | Opt-in Three.js 3D SmartArt renderer (needs the optional `three` dependency; falls back to SVG without it) |
|
|
112
112
|
| `surfaceChart3D`, `barChart3D`, `lineChart3D`, `areaChart3D`, `pieChart3D` | `boolean` | `false` | Independently opt in to interactive Three.js renderers for the matching 3D chart kinds; each falls back to SVG when WebGL is unavailable. |
|
|
113
|
-
| `ai` | `PptxAiConfig`
|
|
113
|
+
| `ai` | `PptxAiAssistant \| PptxAiConfig` | n/a | Optional AI assistant: a handle from `createAiAssistant` (`pptx-react-viewer/ai`), or a plain config. The SDK peers load only when its panel is opened. See [AI assistant](#ai-assistant). |
|
|
114
114
|
| `onOpenFile` | `() => void` | n/a | Host override for File > Open; bypasses the built-in file picker |
|
|
115
115
|
| `onContentChange` | `(content: Uint8Array) => void` | n/a | Called with freshly serialised `.pptx` bytes when the content changes |
|
|
116
116
|
| `onDirtyChange` | `(isDirty: boolean) => void` | n/a | Called when dirty state changes |
|
|
@@ -265,6 +265,21 @@ import { PowerPointViewer, vermilionLightTheme } from 'pptx-react-viewer';
|
|
|
265
265
|
|
|
266
266
|
The underlying palettes (`vermilionLightColors`, `vermilionDarkColors`) and radius (`vermilionRadius`) are exported too, so you can spread them into your own variant.
|
|
267
267
|
|
|
268
|
+
## AI assistant
|
|
269
|
+
|
|
270
|
+
Create the assistant with `createAiAssistant` from the `pptx-react-viewer/ai` entry. Install the `ai` and `@ai-sdk/react` peers, create an assistant once (at module scope or in `useMemo`) and pass it to the `ai` prop:
|
|
271
|
+
|
|
272
|
+
```tsx
|
|
273
|
+
import { PowerPointViewer } from 'pptx-react-viewer';
|
|
274
|
+
import { createAiAssistant } from 'pptx-react-viewer/ai';
|
|
275
|
+
|
|
276
|
+
const assistant = createAiAssistant({ connection: { kind: 'endpoint', api: '/api/ai/chat' } });
|
|
277
|
+
|
|
278
|
+
<PowerPointViewer content={bytes} ai={assistant} />;
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
The panel still loads lazily, the first time the user opens it, and the main entries still reach the same lazy panel loader. The handle is opaque: only `createAiAssistant` makes one, and any other value is read as a plain config. A plain `PptxAiConfig` (`ai={{ connection }}`) keeps working through the viewer's own lazy panel and is not deprecated in this release; the handle is a preparatory, opt-in path for a later major release (see [The `/ai` entry](https://christophervr.github.io/ooxml/pptx/guide/ai-assistant#ai-entry)). The `PptxAi*` types are exported from both `pptx-react-viewer` and `pptx-react-viewer/ai`. See the [AI assistant guide](https://christophervr.github.io/ooxml/pptx/guide/ai-assistant) for connection modes, tools and the write policy.
|
|
282
|
+
|
|
268
283
|
## Localization (i18n)
|
|
269
284
|
|
|
270
285
|
UI labels go through [i18next](https://www.i18next.com/) / [react-i18next](https://react.i18next.com/) with dotted keys such as `pptx.statusBar.allSaved`, or through your own i18n library with `PptxI18nProvider` (see below). Initialise an i18next instance and wrap your app in `I18nextProvider` (the demo's `demos/pptx/demo-react/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/ooxml/pptx/guide/localization) for full wiring examples and how to contribute a translation upstream; the live demo's language picker is a working reference.
|
package/dist/ai.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PptxAiConfig } from 'ooxml-ui/pptx/ai';
|
|
2
|
+
export { PptxAiBridge, PptxAiConfig, PptxAiConnection, PptxAiContextStrategy, PptxAiToolName, PptxAiWritePolicy } from 'ooxml-ui/pptx/ai';
|
|
3
|
+
import { PptxAiAssistant } from 'ooxml-ui/pptx/ai/host';
|
|
4
|
+
export { PptxAiAssistant } from 'ooxml-ui/pptx/ai/host';
|
|
5
|
+
|
|
6
|
+
//#region src/ai.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Create an AI assistant for the viewer's `ai` prop from a `PptxAiConfig`.
|
|
9
|
+
*
|
|
10
|
+
* The handle is opaque and loads nothing. It keeps `config` by reference; create a new
|
|
11
|
+
* handle to change it. Every handle renders the same chat panel component, so a handle
|
|
12
|
+
* created on every render (rather than in `useMemo` or at module scope) never remounts the
|
|
13
|
+
* chat.
|
|
14
|
+
*/
|
|
15
|
+
declare function createAiAssistant(config: PptxAiConfig): PptxAiAssistant;
|
|
16
|
+
|
|
17
|
+
export { createAiAssistant };
|
package/dist/ai.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkF6WCYCHV_js = require('./chunk-F6WCYCHV.js');
|
|
4
|
+
require('./chunk-PIRHQTI4.js');
|
|
5
|
+
|
|
6
|
+
// src/ai.ts
|
|
7
|
+
function createAiAssistant(config) {
|
|
8
|
+
return chunkF6WCYCHV_js.aiAssistants.register(config, chunkF6WCYCHV_js.AiChatPanelLazy);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
exports.createAiAssistant = createAiAssistant;
|
package/dist/ai.js.br
ADDED
package/dist/ai.js.gz
ADDED
|
Binary file
|
package/dist/ai.mjs
ADDED
package/dist/ai.mjs.br
ADDED
|
Binary file
|
package/dist/ai.mjs.gz
ADDED
|
Binary file
|