pptx-angular-viewer 1.30.0 → 1.31.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.
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.30.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-angular-viewer@1.30.1) - 2026-07-18
8
+
9
+ ### Documentation
10
+
11
+ - Correct and expand the per-package npm readmes (by @ChristopherVR) ([46f7c57](https://github.com/ChristopherVR/pptx-viewer/commit/46f7c573701a19e91c507d41ebdc956c64699c38))
12
+
13
+ ## [1.30.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-angular-viewer@1.30.0) - 2026-07-18
14
+
15
+ ### Features
16
+
17
+ - **angular:** Promote RibbonComponent for independent composition (by @ChristopherVR) ([00ab33e](https://github.com/ChristopherVR/pptx-viewer/commit/00ab33e515857cd60a5aef01537c1024297e08e5))
18
+
7
19
  ## [1.29.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-angular-viewer@1.29.0) - 2026-07-18
8
20
 
9
21
  ### Dependencies
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-angular/)** · **[📦 npm](https://www.npmjs.com/package/pptx-angular-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-angular/)**: open a `.pptx` and render it in your browser, no install required.
18
-
19
17
  ## Features
20
18
 
21
19
  - **Standalone component**: `<pptx-viewer>`, no NgModule needed.
@@ -48,7 +46,18 @@ The rendering is done by the framework-agnostic [`pptx-viewer-core`](https://www
48
46
  npm install pptx-angular-viewer
49
47
  ```
50
48
 
51
- **Peer requirements:** Angular 22+ (`@angular/core`, `@angular/common`) and `rxjs`.
49
+ **Peer requirements:** Angular 22+ (`@angular/core`, `@angular/common`), `rxjs`,
50
+ and `@ngx-translate/core` (all UI labels go through it, see
51
+ [Localization](#localization-i18n)):
52
+
53
+ ```bash
54
+ npm install @angular/core @angular/common rxjs @ngx-translate/core
55
+ ```
56
+
57
+ **Optional peers:** `three` enables interactive GLB/GLTF 3D models and the
58
+ `smartArt3D` renderer; `yjs` + `y-websocket` (or `y-webrtc` for serverless
59
+ peer-to-peer) enable real-time collaboration. Without them those features
60
+ degrade gracefully (poster images, no live session).
52
61
 
53
62
  ## Usage
54
63
 
@@ -205,26 +214,43 @@ and `LoadContentService` are the two nearly everything depends on).
205
214
 
206
215
  ### Inputs
207
216
 
208
- | Input | Type | Default | Description |
209
- | --------------- | ----------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------- |
210
- | `content` | `Uint8Array \| ArrayBuffer \| null` | `null` | The `.pptx` bytes to render. |
211
- | `theme` | `ViewerTheme` | n/a | Color/radius overrides applied as CSS custom properties. |
212
- | `class` | `string` | `''` | Class applied to the root element. |
213
- | `canEdit` | `boolean` | `false` | Enables the editor toolbar, inspector, and drag-and-drop editing. |
214
- | `collaboration` | `CollaborationConfig` | n/a | Yjs real-time collaboration config (server URL, room, role). |
215
- | `hiddenActions` | `ToolbarActionId[]` | `[]` | Toolbar buttons/ribbon tabs to hide individually (e.g. `['share', 'broadcast']`), instead of hiding the whole toolbar. |
217
+ | Input | Type | Default | Description |
218
+ | ------------------ | ------------------------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------- |
219
+ | `content` | `Uint8Array \| ArrayBuffer \| null` | `null` | The `.pptx` bytes to render. |
220
+ | `theme` | `ViewerTheme` | n/a | Color/radius overrides applied as CSS custom properties. Always wins over the File > Options theme picker. |
221
+ | `class` | `string` | `''` | Class applied to the root element. |
222
+ | `canEdit` | `boolean` | `false` | Enables the editor toolbar, inspector, and drag-and-drop editing. |
223
+ | `filePath` | `string` | n/a | Host file path/identifier keying the version-history store. |
224
+ | `fileName` | `string` | n/a | Display name of the open document, shown in the title bar. |
225
+ | `fonts` | `ViewerFontSource[]` | `[]` | Licensed font sources supplied by the host application. |
226
+ | `authorName` | `string` | n/a | Display name for the local user in collaboration/broadcast sessions and presence avatars. |
227
+ | `collaboration` | `CollaborationConfig` | n/a | Yjs real-time collaboration config (server URL, room, role). |
228
+ | `shareDefaults` | `{ roomId?, userName?, serverUrl? }` | n/a | Seed values for the Share dialog's start form. |
229
+ | `onOpenFile` | `() => void` | n/a | Host override for File > Open; bypasses the built-in file picker. |
230
+ | `smartArt3D` | `boolean` | `false` | Opt-in Three.js 3D SmartArt renderer (needs the optional `three` peer; falls back to SVG without it). |
231
+ | `hiddenActions` | `ToolbarActionId[]` | `[]` | Toolbar buttons/ribbon tabs to hide individually (e.g. `['share', 'broadcast']`), instead of hiding the whole toolbar. |
232
+ | `defaultThemeKey` | `string` | n/a | Initial File > Options > Appearance selection when no persisted preference exists. |
233
+ | `availableThemes` | `ThemeCatalogEntry[]` | n/a | Theme choices offered by File > Options > Appearance (defaults to the built-in catalog). |
234
+ | `onThemeChange` | `(key: string) => void` | n/a | Host hook for the appearance picker; when set, the host owns persisting the choice. |
235
+ | `defaultLocale` | `string` | n/a | Initial locale code when no persisted preference exists. |
236
+ | `availableLocales` | `LocaleCatalogEntry[]` | n/a | Locale choices offered by File > Options > Language (defaults to the registered `TranslateService` languages). |
237
+ | `onLocaleChange` | `(code: string) => void` | n/a | Host hook for the language picker; when set, the host owns applying/persisting the switch. |
238
+ | `accountAuth` | `AccountAuthConfig` | n/a | Optional sign-in hook point for File > Account (disabled unless `enabled: true`). |
216
239
 
217
240
  ### Outputs
218
241
 
219
- | Output | Payload | Description |
220
- | ------------------- | ------------ | -------------------------------------------------------------------- |
221
- | `activeSlideChange` | `number` | Emits the active slide index on navigation. |
222
- | `dirtyChange` | `boolean` | Emits `true`/`false` when the dirty state changes. |
223
- | `contentChange` | `Uint8Array` | Emits updated bytes after any editing change. |
224
- | `modeChange` | `string` | Emits the new mode (`'preview'`, `'edit'`, `'present'`, `'master'`). |
225
- | `zoomChange` | `number` | Emits the new zoom level (1 = 100%). |
226
- | `selectionChange` | `string[]` | Emits the selected element IDs when selection changes. |
227
- | `slideCountChange` | `number` | Emits the total slide count when slides change. |
242
+ | Output | Payload | Description |
243
+ | -------------------- | ----------------------------- | -------------------------------------------------------------------- |
244
+ | `activeSlideChange` | `number` | Emits the active slide index on navigation. |
245
+ | `dirtyChange` | `boolean` | Emits `true`/`false` when the dirty state changes. |
246
+ | `contentChange` | `Uint8Array` | Emits updated bytes after any editing change. |
247
+ | `modeChange` | `string` | Emits the new mode (`'preview'`, `'edit'`, `'present'`, `'master'`). |
248
+ | `zoomChange` | `number` | Emits the new zoom level (1 = 100%). |
249
+ | `selectionChange` | `string[]` | Emits the selected element IDs when selection changes. |
250
+ | `slideCountChange` | `number` | Emits the total slide count when slides change. |
251
+ | `propertiesChange` | `Partial<PptxCoreProperties>` | Emits when the user edits document properties in the Info dialog. |
252
+ | `startCollaboration` | `CollaborationConfig` | Emits when a collaboration/broadcast session starts. |
253
+ | `stopCollaboration` | `void` | Emits when the collaboration/broadcast session stops. |
228
254
 
229
255
  ### Methods
230
256
 
@@ -252,6 +278,15 @@ and `LoadContentService` are the two nearly everything depends on).
252
278
  | `selectElements(ids)` | `void` | Programmatically select elements by ID. |
253
279
  | `clearSelection()` | `void` | Clear the current selection. |
254
280
 
281
+ The component implements the full shared `PowerPointViewerAPI`, so the
282
+ following slide/element manipulation methods are also available:
283
+ `setActiveSlideIndex(index)`, `getSlides()`, `getSlide(index)`,
284
+ `getActiveSlide()`, `addSlide(afterIndex?)`, `deleteSlides(indexes)`,
285
+ `duplicateSlides(indexes)`, `moveSlide(from, to)`, `toggleHideSlides(indexes)`,
286
+ `getElements(slideIndex?)`, `getElementById(id, slideIndex?)`,
287
+ `updateElement(id, patch)`, `deleteElements(ids)`, and
288
+ `duplicateElement(id)`.
289
+
255
290
  ### Exported components & helpers
256
291
 
257
292
  `PowerPointViewerComponent`, `SlideCanvasComponent`, `RibbonComponent`,