pptx-vue-viewer 1.23.0 → 1.23.2
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 +12 -0
- package/README.md +53 -24
- package/dist/composables-unstable.cjs +1 -1
- package/dist/composables-unstable.cjs.br +0 -0
- package/dist/composables-unstable.cjs.gz +0 -0
- package/dist/composables-unstable.js +1 -1
- package/dist/composables-unstable.js.br +0 -0
- package/dist/composables-unstable.js.gz +0 -0
- package/dist/{dist-BHvZD9xP.js → dist-D0gUgHke.js} +41646 -41504
- package/dist/dist-D0gUgHke.js.br +0 -0
- package/dist/dist-D0gUgHke.js.gz +0 -0
- package/dist/{dist-CtD22qai.cjs → dist-DdP6BiXW.cjs} +41690 -41538
- package/dist/dist-DdP6BiXW.cjs.br +0 -0
- package/dist/dist-DdP6BiXW.cjs.gz +0 -0
- package/dist/gif-encoder-L4uIIOmL.cjs +2 -0
- package/dist/gif-encoder-L4uIIOmL.cjs.br +0 -0
- package/dist/gif-encoder-L4uIIOmL.cjs.gz +0 -0
- package/dist/gif-encoder-xdcrgUzu.js +2 -0
- package/dist/gif-encoder-xdcrgUzu.js.br +0 -0
- package/dist/gif-encoder-xdcrgUzu.js.gz +0 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.br +0 -0
- package/dist/index.cjs.gz +0 -0
- package/dist/index.js +2 -2
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/{useViewerSettingsDialog-DYK4zbNW.cjs → useViewerSettingsDialog-DipQyqZR.cjs} +231 -211
- package/dist/useViewerSettingsDialog-DipQyqZR.cjs.br +0 -0
- package/dist/useViewerSettingsDialog-DipQyqZR.cjs.gz +0 -0
- package/dist/{useViewerSettingsDialog-BFXCVlAC.js → useViewerSettingsDialog-pIBrqIvC.js} +3235 -3215
- package/dist/useViewerSettingsDialog-pIBrqIvC.js.br +0 -0
- package/dist/useViewerSettingsDialog-pIBrqIvC.js.gz +0 -0
- package/dist/viewer/PowerPointViewer.vue.d.ts.map +1 -1
- package/dist/viewer/composables/collaboration-load-adoption.d.ts +23 -0
- package/dist/viewer/composables/collaboration-load-adoption.d.ts.map +1 -0
- package/dist/viewer/composables/collaboration-types.d.ts +8 -0
- package/dist/viewer/composables/collaboration-types.d.ts.map +1 -1
- package/dist/viewer/composables/index.d.ts +1 -1
- package/dist/viewer/composables/index.d.ts.map +1 -1
- package/dist/viewer/composables/useCollaboration.d.ts.map +1 -1
- package/dist/viewer/composables/useCollaborationWiring.d.ts +6 -0
- package/dist/viewer/composables/useCollaborationWiring.d.ts.map +1 -1
- package/dist/viewer/composables/useLoadContent.d.ts +9 -1
- package/dist/viewer/composables/useLoadContent.d.ts.map +1 -1
- package/dist/viewer/index.cjs +1 -1
- package/dist/viewer/index.cjs.br +0 -0
- package/dist/viewer/index.cjs.gz +0 -0
- package/dist/viewer/index.js +2 -2
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/{viewer-DiZYxyTR.cjs → viewer-8CW4gBeB.cjs} +1009 -1006
- package/dist/viewer-8CW4gBeB.cjs.br +0 -0
- package/dist/viewer-8CW4gBeB.cjs.gz +0 -0
- package/dist/{viewer-CufTikwH.js → viewer-DV3MjTSD.js} +1197 -1194
- package/dist/viewer-DV3MjTSD.js.br +0 -0
- package/dist/viewer-DV3MjTSD.js.gz +0 -0
- package/package.json +1 -1
- package/dist/dist-BHvZD9xP.js.br +0 -0
- package/dist/dist-BHvZD9xP.js.gz +0 -0
- package/dist/dist-CtD22qai.cjs.br +0 -0
- package/dist/dist-CtD22qai.cjs.gz +0 -0
- package/dist/gif-encoder-CHVkGveW.js +0 -2
- package/dist/gif-encoder-CHVkGveW.js.br +0 -0
- package/dist/gif-encoder-CHVkGveW.js.gz +0 -0
- package/dist/gif-encoder-WqAwfQ70.cjs +0 -2
- package/dist/gif-encoder-WqAwfQ70.cjs.br +0 -0
- package/dist/gif-encoder-WqAwfQ70.cjs.gz +0 -0
- package/dist/useViewerSettingsDialog-BFXCVlAC.js.br +0 -0
- package/dist/useViewerSettingsDialog-BFXCVlAC.js.gz +0 -0
- package/dist/useViewerSettingsDialog-DYK4zbNW.cjs.br +0 -0
- package/dist/useViewerSettingsDialog-DYK4zbNW.cjs.gz +0 -0
- package/dist/viewer-CufTikwH.js.br +0 -0
- package/dist/viewer-CufTikwH.js.gz +0 -0
- package/dist/viewer-DiZYxyTR.cjs.br +0 -0
- package/dist/viewer-DiZYxyTR.cjs.gz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ 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.23.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vue-viewer@1.23.1) - 2026-07-18
|
|
8
|
+
|
|
9
|
+
## [1.23.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vue-viewer@1.23.0) - 2026-07-18
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
- **vue:** Export RibbonToolbar for independent composition (by @ChristopherVR) ([00a57ca](https://github.com/ChristopherVR/pptx-viewer/commit/00a57ca4f96339edc1b79d544f71330558f2ceff))
|
|
14
|
+
|
|
15
|
+
### Dependencies
|
|
16
|
+
|
|
17
|
+
- **deps:** Update dependencies to latest and migrate core/shared/locales to TypeScript 7 (by @ChristopherVR) ([cc72948](https://github.com/ChristopherVR/pptx-viewer/commit/cc729482cc5ae4ae56e1219f290c2953ec83c12a))
|
|
18
|
+
|
|
7
19
|
## [1.22.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vue-viewer@1.22.1) - 2026-07-18
|
|
8
20
|
|
|
9
21
|
## [1.22.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vue-viewer@1.22.0) - 2026-07-18
|
package/README.md
CHANGED
|
@@ -14,8 +14,6 @@ The rendering is done by the framework-agnostic [`pptx-viewer-core`](https://www
|
|
|
14
14
|
|
|
15
15
|
<samp>**[▶️ Try the live demo](https://christophervr.github.io/pptx-viewer/demo-vue/)** · **[📦 npm](https://www.npmjs.com/package/pptx-vue-viewer)** · **[📖 Full docs](https://christophervr.github.io/pptx-viewer/)** · **[🧩 Core SDK](https://www.npmjs.com/package/pptx-viewer-core)**</samp>
|
|
16
16
|
|
|
17
|
-
> **[▶️ Try the live demo](https://christophervr.github.io/pptx-viewer/demo-vue/)**: open a `.pptx` and render it in your browser, no install required.
|
|
18
|
-
|
|
19
17
|
## Features
|
|
20
18
|
|
|
21
19
|
- **A single component**: `<PowerPointViewer>`, written in `<script setup>` style.
|
|
@@ -46,13 +44,18 @@ The rendering is done by the framework-agnostic [`pptx-viewer-core`](https://www
|
|
|
46
44
|
npm install pptx-vue-viewer
|
|
47
45
|
```
|
|
48
46
|
|
|
49
|
-
**Peer requirements:** Vue 3.5
|
|
50
|
-
|
|
47
|
+
**Peer requirements:** Vue 3.5+, `vue-i18n` (all UI labels go through it, see
|
|
48
|
+
[Localization](#localization-i18n)), and the engine's `jszip` /
|
|
49
|
+
`fast-xml-parser` peers:
|
|
51
50
|
|
|
52
51
|
```bash
|
|
53
|
-
npm install vue jszip fast-xml-parser
|
|
52
|
+
npm install vue vue-i18n jszip fast-xml-parser
|
|
54
53
|
```
|
|
55
54
|
|
|
55
|
+
**Optional:** `three` enables interactive GLB/GLTF 3D models and the
|
|
56
|
+
`smartArt3D` renderer; without it those elements fall back to poster images /
|
|
57
|
+
flat SVG.
|
|
58
|
+
|
|
56
59
|
The `pptx-viewer-core` engine is **bundled in**, so you don't install it
|
|
57
60
|
separately unless you want to call the SDK directly.
|
|
58
61
|
|
|
@@ -162,28 +165,45 @@ async function save() {
|
|
|
162
165
|
|
|
163
166
|
### Props
|
|
164
167
|
|
|
165
|
-
| Prop
|
|
166
|
-
|
|
|
167
|
-
| `content`
|
|
168
|
-
| `theme`
|
|
169
|
-
| `class`
|
|
170
|
-
| `canEdit`
|
|
171
|
-
| `filePath`
|
|
172
|
-
| `
|
|
173
|
-
| `
|
|
174
|
-
| `
|
|
168
|
+
| Prop | Type | Default | Description |
|
|
169
|
+
| -------------------- | ------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
170
|
+
| `content` | `Uint8Array \| ArrayBuffer` | n/a | The `.pptx` bytes to render. **Required.** |
|
|
171
|
+
| `theme` | `ViewerTheme` | n/a | Color/radius overrides applied as CSS custom properties. Always wins over the File > Options theme picker. |
|
|
172
|
+
| `class` | `string` | n/a | Class applied to the root element. |
|
|
173
|
+
| `canEdit` | `boolean` | `false` | Enables the editor toolbar, inspector, and drag-and-drop editing. |
|
|
174
|
+
| `filePath` | `string` | n/a | Original file path, used for autosave recovery and version history. |
|
|
175
|
+
| `fileName` | `string` | n/a | Display name of the open document, shown in the title bar. |
|
|
176
|
+
| `fonts` | `ViewerFontSource[]` | n/a | Licensed font sources supplied by the host application. |
|
|
177
|
+
| `autosave` | `boolean` | `false` | Enables debounced autosave (emits `@autosave` with serialised bytes). |
|
|
178
|
+
| `autosaveIntervalMs` | `number` | `2000` | Autosave debounce window in milliseconds. |
|
|
179
|
+
| `authorName` | `string` | n/a | Author name for comments/annotations and collaboration presence. |
|
|
180
|
+
| `collaboration` | `CollaborationConfig` | n/a | Yjs real-time collaboration config (server URL, room, role). |
|
|
181
|
+
| `shareDefaults` | `{ roomId?, userName?, serverUrl? }` | n/a | Seed values for the Share dialog fields. |
|
|
182
|
+
| `onOpenFile` | `() => void` | n/a | Host override for File > Open; bypasses the built-in file picker. |
|
|
183
|
+
| `smartArt3D` | `boolean` | `false` | Opt-in Three.js 3D SmartArt renderer (needs the optional `three` peer; falls back to SVG without it). |
|
|
184
|
+
| `hiddenActions` | `ToolbarActionId[]` | n/a | Individual toolbar buttons and/or ribbon tabs to hide (e.g. `['share', 'broadcast', 'insert']`). Omit to show everything. |
|
|
185
|
+
| `defaultThemeKey` | `string` | n/a | Initial File > Options > Appearance selection when no persisted preference exists. |
|
|
186
|
+
| `availableThemes` | `ThemeCatalogEntry[]` | n/a | Theme choices offered by File > Options > Appearance (defaults to the built-in catalog). |
|
|
187
|
+
| `onThemeChange` | `(key: string) => void` | n/a | Host hook for the appearance picker; when set, the host owns persisting the choice. |
|
|
188
|
+
| `defaultLocale` | `string` | n/a | Initial locale code when no persisted preference exists. |
|
|
189
|
+
| `availableLocales` | `LocaleCatalogEntry[]` | n/a | Locale choices offered by File > Options > Language (defaults to the host `vue-i18n` locales). |
|
|
190
|
+
| `onLocaleChange` | `(code: string) => void` | n/a | Host hook for the language picker; when set, the host owns applying/persisting the switch. |
|
|
191
|
+
| `accountAuth` | `AccountAuthConfig` | n/a | Optional sign-in hook point for File > Account (disabled unless `enabled: true`). |
|
|
175
192
|
|
|
176
193
|
### Events
|
|
177
194
|
|
|
178
|
-
| Event | Payload
|
|
179
|
-
| --------------------- |
|
|
180
|
-
| `active-slide-change` | `number`
|
|
181
|
-
| `content-change` | `Uint8Array`
|
|
182
|
-
| `dirty-change` | `boolean`
|
|
183
|
-
| `mode-change` | `string`
|
|
184
|
-
| `zoom-change` | `number`
|
|
185
|
-
| `selection-change` | `string[]`
|
|
186
|
-
| `slide-count-change` | `number`
|
|
195
|
+
| Event | Payload | Description |
|
|
196
|
+
| --------------------- | --------------------- | ------------------------------------------------------------------------------------ |
|
|
197
|
+
| `active-slide-change` | `number` | Emits the active slide index on navigation. |
|
|
198
|
+
| `content-change` | `Uint8Array` | Emits updated bytes after any editing change. |
|
|
199
|
+
| `dirty-change` | `boolean` | Emits `true`/`false` when the dirty state changes. |
|
|
200
|
+
| `mode-change` | `string` | Emits the new mode when it changes (`'preview'`, `'edit'`, `'present'`, `'master'`). |
|
|
201
|
+
| `zoom-change` | `number` | Emits the new zoom level (1 = 100%). |
|
|
202
|
+
| `selection-change` | `string[]` | Emits the selected element IDs when selection changes. |
|
|
203
|
+
| `slide-count-change` | `number` | Emits the total slide count when slides are added/removed. |
|
|
204
|
+
| `autosave` | `Uint8Array` | Emits serialised bytes when autosave persists the presentation (`autosave` prop). |
|
|
205
|
+
| `start-collaboration` | `CollaborationConfig` | Emits when the user starts a collaboration session from the Share dialog. |
|
|
206
|
+
| `stop-collaboration` | - | Emits when the user stops a collaboration session. |
|
|
187
207
|
|
|
188
208
|
### Exposed methods (template `ref`)
|
|
189
209
|
|
|
@@ -211,6 +231,15 @@ async function save() {
|
|
|
211
231
|
| `selectElements(ids)` | `void` | Programmatically select elements by ID. |
|
|
212
232
|
| `clearSelection()` | `void` | Clear the current selection. |
|
|
213
233
|
|
|
234
|
+
The exposed surface implements the full shared `PowerPointViewerAPI`, so the
|
|
235
|
+
following slide/element manipulation methods are also available:
|
|
236
|
+
`setActiveSlideIndex(index)`, `getSlides()`, `getSlide(index)`,
|
|
237
|
+
`getActiveSlide()`, `addSlide(afterIndex?)`, `deleteSlides(indexes)`,
|
|
238
|
+
`duplicateSlides(indexes)`, `moveSlide(from, to)`, `toggleHideSlides(indexes)`,
|
|
239
|
+
`getElements(slideIndex?)`, `getElementById(id, slideIndex?)`,
|
|
240
|
+
`updateElement(id, patch)`, `deleteElements(ids)`, and
|
|
241
|
+
`duplicateElement(id)`.
|
|
242
|
+
|
|
214
243
|
### Exported components & helpers
|
|
215
244
|
|
|
216
245
|
`PowerPointViewer`, `SlideCanvas`, `SlideStage`, `ElementRenderer`,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const e = require("./useViewerSettingsDialog-
|
|
2
|
+
const e = require("./useViewerSettingsDialog-DipQyqZR.cjs");
|
|
3
3
|
let t = require("vue");
|
|
4
4
|
function s(e) {
|
|
5
5
|
const t = /* @__PURE__ */ new Set(), s = [];
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as a, $n as s, $t as t, A as e, Ar as n, At as u, B as l, Bt as i, Ct as o, D as c, Dt as r, E as v, Et as f, F as d, G as g, Gt as h, H as m, Ht as p, I as S, J as w, Jt as y, K as j, Kt as A, L as D, M as E, Mt as M, N as V, Nt as $, O as k, Ot as q, P as x, Q as z, R as B, Ra as G, Si as H, St as I, T as J, Tt as K, U as N, Ut as O, V as R, Vt as T, W as U, Wt as W, X, Xt as Y, Y as Z, Yt as _, Z as b, Zt as C, _ as F, _t as L, a as P, an as Q, at as aa, bt as sa, c as ta, cn as ea, ct as na, d as ua, dr as la, dt as ia, er as oa, et as ca, f as ra, ft as va, g as fa, gt as da, h as ga, hn as ha, ht as ma, i as pa, ii as Sa, in as wa, it as ya, j as ja, jt as Aa, k as Da, kt as Ea, l as Ma, ln as Va, m as $a, mt as ka, n as qa, nn as xa, nt as za, o as Ba, on as Ga, ot as Ha, p as Ia, pt as Ja, q as Ka, qt as Na, r as Oa, rn as Ra, rt as Ta, s as Ua, sn as Wa, st as Xa, t as Ya, tt as Za, u as _a, v as ba, vt as Ca, w as Fa, wt as La, xt as Pa, y as Qa, yt as as, z as ss, zt as ts } from "./useViewerSettingsDialog-
|
|
1
|
+
import { $ as a, $n as s, $t as t, A as e, Ar as n, At as u, B as l, Bt as i, Ct as o, D as c, Dt as r, E as v, Et as f, F as d, G as g, Gt as h, H as m, Ht as p, I as S, J as w, Jt as y, K as j, Kt as A, L as D, M as E, Mt as M, N as V, Nt as $, O as k, Ot as q, P as x, Q as z, R as B, Ra as G, Si as H, St as I, T as J, Tt as K, U as N, Ut as O, V as R, Vt as T, W as U, Wt as W, X, Xt as Y, Y as Z, Yt as _, Z as b, Zt as C, _ as F, _t as L, a as P, an as Q, at as aa, bt as sa, c as ta, cn as ea, ct as na, d as ua, dr as la, dt as ia, er as oa, et as ca, f as ra, ft as va, g as fa, gt as da, h as ga, hn as ha, ht as ma, i as pa, ii as Sa, in as wa, it as ya, j as ja, jt as Aa, k as Da, kt as Ea, l as Ma, ln as Va, m as $a, mt as ka, n as qa, nn as xa, nt as za, o as Ba, on as Ga, ot as Ha, p as Ia, pt as Ja, q as Ka, qt as Na, r as Oa, rn as Ra, rt as Ta, s as Ua, sn as Wa, st as Xa, t as Ya, tt as Za, u as _a, v as ba, vt as Ca, w as Fa, wt as La, xt as Pa, y as Qa, yt as as, z as ss, zt as ts } from "./useViewerSettingsDialog-pIBrqIvC.js";
|
|
2
2
|
import { computed as es, readonly as ns, ref as us } from "vue";
|
|
3
3
|
function ls(a = []) {
|
|
4
4
|
const s = us(is(a)), t = es(() => 0 === s.value.length);
|
|
Binary file
|
|
Binary file
|