pptx-svelte-viewer 3.18.0 → 3.19.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 (29) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +32 -27
  3. package/dist/{AiChatPanel-BpbQoAYF.js → AiChatPanel-B3wS82GP.js} +1 -1
  4. package/dist/{GLTFLoader-D2645ZAi.js → GLTFLoader-cXVvZ-Qt.js} +216 -199
  5. package/dist/{OrbitControls-Cm0ChW-y.js → OrbitControls-Dj3MmTu8.js} +9 -7
  6. package/dist/{export-BUF4iVeY.js → export-jE_PACKp.js} +32805 -32100
  7. package/dist/i18n.js +1 -1
  8. package/dist/index.js +2 -2
  9. package/dist/pptx-svelte-viewer.css +1 -1
  10. package/dist/{smartart-3d-DjfDf-du.js → smartart-3d-Btipz914.js} +2 -2
  11. package/dist/{three.module-CS4jrTOJ.js → three.module-BP1MPwgf.js} +4861 -4594
  12. package/dist/{translator-DTR0k69d.js → translator-wOMMyMjv.js} +5 -0
  13. package/dist/viewer/editor/editor-arrange-controller.d.ts +1 -1
  14. package/dist/viewer/editor/editor-arrange-controller.d.ts.map +1 -1
  15. package/dist/viewer/editor/editor-arrange-ops.d.ts +7 -3
  16. package/dist/viewer/editor/editor-arrange-ops.d.ts.map +1 -1
  17. package/dist/viewer/editor/editor-element-controller.d.ts.map +1 -1
  18. package/dist/viewer/editor/editor-freeform.d.ts +16 -0
  19. package/dist/viewer/editor/editor-freeform.d.ts.map +1 -1
  20. package/dist/viewer/editor/editor-ink-controller.svelte.d.ts +5 -4
  21. package/dist/viewer/editor/editor-ink-controller.svelte.d.ts.map +1 -1
  22. package/dist/viewer/editor/editor-state.svelte.d.ts +14 -0
  23. package/dist/viewer/editor/editor-state.svelte.d.ts.map +1 -1
  24. package/dist/viewer/editor/editor-template-controller.d.ts +8 -0
  25. package/dist/viewer/editor/editor-template-controller.d.ts.map +1 -1
  26. package/dist/viewer/index.d.ts +28 -5
  27. package/dist/viewer/index.js +1 -1
  28. package/dist/viewer/state/create-viewer-state.svelte.d.ts.map +1 -1
  29. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -7,6 +7,44 @@ A release listed with no entries carried no Conventional Commit in this package'
7
7
  scope: scripts/release-plan.mjs re-releases a package whenever any of its files
8
8
  change, not only on conventional ones.
9
9
 
10
+ ## [3.18.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-svelte-viewer@3.18.1) - 2026-09-14
11
+
12
+ ### Bug Fixes
13
+
14
+ - **i18n:** Localize inspector and ribbon controls (by @yunfeizhu) ([a657a76](https://github.com/ChristopherVR/pptx-viewer/commit/a657a766d653106f04d50f7b13a94a6c12c77f1e))
15
+
16
+ ## [3.18.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-svelte-viewer@3.18.0) - 2026-09-13
17
+
18
+ ### Features
19
+
20
+ - **shared:** Add configurable viewport fit options (by @Sudhansh6) ([93e3218](https://github.com/ChristopherVR/pptx-viewer/commit/93e3218de54ce8d153761e2fba83f3558fc3051b))
21
+ - **svelte:** Add configurable viewport fit options (by @Sudhansh6) ([ca86364](https://github.com/ChristopherVR/pptx-viewer/commit/ca86364ea1e047eed2880b14f46f1cfc7a1a2e42))
22
+ - **shared:** Expose public element insertion across viewers (by @Sudhansh6) ([2701047](https://github.com/ChristopherVR/pptx-viewer/commit/2701047d5011b5d7ce8408009addc1dc31f6e3f7))
23
+
24
+ ### Bug Fixes
25
+
26
+ - **core:** Preserve empty paragraph insertion formatting (by @Sudhansh6) ([121f6bf](https://github.com/ChristopherVR/pptx-viewer/commit/121f6bf9f64a29ab07e07b5d4f042a4b075d7876))
27
+ - **shared:** Preserve empty paragraph insertion formatting (by @Sudhansh6) ([b34d0f5](https://github.com/ChristopherVR/pptx-viewer/commit/b34d0f5ab9879e02f1de85c0e50b15f3947735c3))
28
+ - **svelte:** Preserve empty paragraph insertion formatting (by @Sudhansh6) ([256a707](https://github.com/ChristopherVR/pptx-viewer/commit/256a707679d9d583ac64cd51f76f4247e36cb010))
29
+ - **svelte:** Preserve unsaved state when notifying content changes (by @Sudhansh6) ([23dfbc7](https://github.com/ChristopherVR/pptx-viewer/commit/23dfbc707b40add5fed17efab2fe4441e837523d))
30
+ - **shared:** Continue inserted paragraphs from the local list (by @Sudhansh6) ([78b8226](https://github.com/ChristopherVR/pptx-viewer/commit/78b82261a320b93052627ec9e6e460c4845f6f32))
31
+ - **shared:** Leave empty clipboard paste shortcuts unclaimed (by @Sudhansh6) ([aec446f](https://github.com/ChristopherVR/pptx-viewer/commit/aec446f7f36371ad2f9c1cf3e68b7aaeb4f2cc28))
32
+
33
+ ### Other
34
+
35
+ - Retain empty paragraph styles with source alignment (by @Sudhansh6) ([d979cd2](https://github.com/ChristopherVR/pptx-viewer/commit/d979cd25b7c05cef0fc4d4501c39d2bb11e572e0))
36
+ - Integrate semantic list commands with empty paragraph formatting (by @Sudhansh6) ([c5d9a6f](https://github.com/ChristopherVR/pptx-viewer/commit/c5d9a6f4f52c44180111c1f5fca0f10299dce47a))
37
+ - Sync main font and SmartArt fixes (by @Sudhansh6) ([f2066eb](https://github.com/ChristopherVR/pptx-viewer/commit/f2066eb87b62884cadd77593e8b36426398c3312))
38
+ - Sync main paragraph and history fixes (by @Sudhansh6) ([a18a2d7](https://github.com/ChristopherVR/pptx-viewer/commit/a18a2d7fe2bccf7d8c49b72d7a80087d423d1da0))
39
+ - Sync viewport fit changes from main (by @Sudhansh6) ([3c3c0bd](https://github.com/ChristopherVR/pptx-viewer/commit/3c3c0bdb2f88648dd20ffac9b6fd5a691741253d))
40
+ - Sync public insertion with viewport fit API (by @Sudhansh6) ([47df3db](https://github.com/ChristopherVR/pptx-viewer/commit/47df3db6bb7bb6bbee06e36c9ff9565b2fc61252))
41
+ - Sync public insertion with empty paragraph formatting (by @Sudhansh6) ([d1ad9c9](https://github.com/ChristopherVR/pptx-viewer/commit/d1ad9c9562313085cab62f3b9f9fa0abc6d0fa1f))
42
+ - Integrate preview and save-state fixes into insertion (by @Sudhansh6) ([1c33fb5](https://github.com/ChristopherVR/pptx-viewer/commit/1c33fb571634306e6dd989291185313e3cdafb49))
43
+
44
+ ### Documentation
45
+
46
+ - Move viewport fitting into developer guides (by @Sudhansh6) ([60707eb](https://github.com/ChristopherVR/pptx-viewer/commit/60707ebf8f261779b2ebfa41ff0741267a672bd3))
47
+
10
48
  ## [3.17.7](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-svelte-viewer@3.17.7) - 2026-09-13
11
49
 
12
50
  ### Bug Fixes
package/README.md CHANGED
@@ -49,6 +49,9 @@ Requires Svelte 5 (runes) as a peer. The `pptx-viewer-core` engine is
49
49
  install automatically, so you don't install anything separately unless you
50
50
  want to call the SDK directly.
51
51
 
52
+ Install `three` only when you enable a 3D SmartArt or 3D chart prop. The viewer falls back to
53
+ SVG when it is absent. Install `yjs` with `y-websocket` or `y-webrtc` only for collaboration.
54
+
52
55
  Component styles ship as a real stylesheet, not runtime-injected CSS (which
53
56
  proved unreliable in real SvelteKit apps: SSR, a strict CSP, or the host's own
54
57
  global CSS could all cause it to silently not apply). Import it once at your
@@ -99,33 +102,35 @@ or fullscreen fitting. See the [cross-binding defaults](../../docs/guide/viewpor
99
102
 
100
103
  ## Props
101
104
 
102
- | Prop | Type | Default | Description |
103
- | -------------------- | ------------------------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------- |
104
- | `source` | `Uint8Array \| ArrayBuffer \| null` | - | Raw `.pptx` bytes. |
105
- | `theme` | `ViewerTheme` | - | Color/radius/CSS-var overrides. |
106
- | `fonts` | `ViewerFontSource[]` | `[]` | Licensed font sources supplied by the host application. |
107
- | `locale` | `string` | `'en'` | UI locale (see `pptx-svelte-viewer/i18n`). |
108
- | `initialSlide` | `number` | `0` | Slide shown after load (0-based). |
109
- | `showThumbnails` | `boolean` | `true` | Thumbnail sidebar. |
110
- | `showToolbar` | `boolean` | `true` | Navigation/zoom/fullscreen toolbar. |
111
- | `showNotes` | `boolean` | `true` | Speaker-notes panel and its toolbar toggle. |
112
- | `hiddenActions` | `ToolbarActionId[]` | - | Toolbar buttons/ribbon tabs to hide individually (e.g. `['share', 'broadcast']`), instead of hiding the whole toolbar. |
113
- | `editable` | `boolean` | `false` | Ribbon editing, insertion, arrange, and save. |
114
- | `smartArt3D` | `boolean` | `false` | Opt-in Three.js 3D SmartArt renderer (needs the optional `three` peer; falls back to SVG without it). |
115
- | `class` | `string` | - | Class applied to the root element. |
116
- | `fileName` | `string` | - | Display name shown in the desktop title bar. |
117
- | `autosave` | `boolean` | `false` | Debounced crash-recovery autosave to IndexedDB (requires `filePath`; fires `onautosave`). |
118
- | `filePath` | `string` | - | IndexedDB record key for autosave; autosave is inert without it. |
119
- | `autosaveIntervalMs` | `number` | `2000` | Autosave debounce window in milliseconds. |
120
- | `collaboration` | `CollaborationConfig` | - | Yjs real-time collaboration config (y-websocket or serverless y-webrtc room, role). |
121
- | `shareDefaults` | `{ roomId?, userName?, serverUrl? }` | - | Prefilled values for the Share/Broadcast dialogs. |
122
- | `defaultThemeKey` | `string` | - | Initial File > Options > Appearance selection when no persisted preference exists. |
123
- | `availableThemes` | `ThemeCatalogEntry[]` | - | Theme choices offered by File > Options > Appearance (defaults to the built-in catalog). |
124
- | `onThemeChange` | `(key: string) => void` | - | Host hook for the appearance picker; when set, the host owns persisting the choice. |
125
- | `defaultLocale` | `string` | - | Initial File > Options > Language selection when no persisted preference exists. |
126
- | `availableLocales` | `LocaleCatalogEntry[]` | - | Locale choices offered by File > Options > Language (defaults to the registered dictionaries). |
127
- | `onLocaleChange` | `(code: string) => void` | - | Host hook for the language picker; when set, the host owns persisting the switch. |
128
- | `accountAuth` | `AccountAuthConfig` | - | Optional sign-in hook point for File > Account (disabled unless `enabled: true`). |
105
+ | Prop | Type | Default | Description |
106
+ | -------------------------------------------------------------------------- | ------------------------------------ | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
107
+ | `source` | `Uint8Array \| ArrayBuffer \| null` | - | Raw `.pptx` bytes. |
108
+ | `theme` | `ViewerTheme` | - | Color/radius/CSS-var overrides. |
109
+ | `fonts` | `ViewerFontSource[]` | `[]` | Licensed font sources supplied by the host application. |
110
+ | `locale` | `string` | `'en'` | UI locale (see `pptx-svelte-viewer/i18n`). |
111
+ | `initialSlide` | `number` | `0` | Slide shown after load (0-based). |
112
+ | `showThumbnails` | `boolean` | `true` | Thumbnail sidebar. |
113
+ | `showToolbar` | `boolean` | `true` | Navigation/zoom/fullscreen toolbar. |
114
+ | `showNotes` | `boolean` | `true` | Speaker-notes panel and its toolbar toggle. |
115
+ | `hiddenActions` | `ToolbarActionId[]` | - | Toolbar buttons/ribbon tabs to hide individually (e.g. `['share', 'broadcast']`), instead of hiding the whole toolbar. |
116
+ | `editable` | `boolean` | `false` | Ribbon editing, insertion, arrange, and save. |
117
+ | `smartArt3D` | `boolean` | `false` | Opt-in Three.js 3D SmartArt renderer (needs the optional `three` peer; falls back to SVG without it). |
118
+ | `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. |
119
+ | `ai` | `PptxAiConfig` | n/a | Optional AI assistant configuration. The SDK peers load only when its panel is opened. |
120
+ | `class` | `string` | - | Class applied to the root element. |
121
+ | `fileName` | `string` | - | Display name shown in the desktop title bar. |
122
+ | `autosave` | `boolean` | `true` | Debounced crash-recovery autosave to IndexedDB (requires `filePath`; fires `onautosave`). |
123
+ | `filePath` | `string` | - | IndexedDB record key for autosave; autosave is inert without it. |
124
+ | `autosaveIntervalMs` | `number` | File > Options cadence | Autosave debounce window in milliseconds. |
125
+ | `collaboration` | `CollaborationConfig` | - | Yjs real-time collaboration config (y-websocket or serverless y-webrtc room, role). |
126
+ | `shareDefaults` | `{ roomId?, userName?, serverUrl? }` | - | Prefilled values for the Share/Broadcast dialogs. |
127
+ | `defaultThemeKey` | `string` | - | Initial File > Options > Appearance selection when no persisted preference exists. |
128
+ | `availableThemes` | `ThemeCatalogEntry[]` | - | Theme choices offered by File > Options > Appearance (defaults to the built-in catalog). |
129
+ | `onThemeChange` | `(key: string) => void` | - | Host hook for the appearance picker; when set, the host owns persisting the choice. |
130
+ | `defaultLocale` | `string` | - | Initial File > Options > Language selection when no persisted preference exists. |
131
+ | `availableLocales` | `LocaleCatalogEntry[]` | - | Locale choices offered by File > Options > Language (defaults to the registered dictionaries). |
132
+ | `onLocaleChange` | `(code: string) => void` | - | Host hook for the language picker; when set, the host owns persisting the switch. |
133
+ | `accountAuth` | `AccountAuthConfig` | - | Optional sign-in hook point for File > Account (disabled unless `enabled: true`). |
129
134
 
130
135
  ### Callbacks
131
136
 
@@ -1,4 +1,4 @@
1
- import { B as ce, C as pe, D as de, E as ve, F as ue, H as A, I as he, L as U, N as Y, O as _e, P as $, R, S as ge, T as xe, U as V, V as fe, _ as me, b as be, g as ye, h as ke, k as we, v as Ce, w as Me, x as ze, y as Se, z as Pe } from "./export-BUF4iVeY.js";
1
+ import { B as ce, C as pe, D as de, E as ve, F as ue, H as A, I as he, L as U, N as Y, O as _e, P as $, R, S as ge, T as xe, U as V, V as fe, _ as me, b as be, g as ye, h as ke, k as we, v as Ce, w as Me, x as ze, y as Se, z as Pe } from "./export-jE_PACKp.js";
2
2
  import "svelte/internal/disclose-version";
3
3
  import * as e from "svelte/internal/client";
4
4
  import { onMount as qe, untrack as O } from "svelte";