@s8fy/pptx-viewer-svelte 3.0.0 → 3.1.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 (2) hide show
  1. package/README.md +12 -2
  2. package/package.json +5 -3
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # @s8fy/pptx-viewer-svelte
2
2
 
3
- Svelte helpers for `@s8fy/pptx-viewer`.
3
+ **High-fidelity PowerPoint viewing in Svelte, powered by the shared PPTX viewer engine.**
4
+
5
+ Svelte actions and imperative helpers for `@s8fy/pptx-viewer`, with font-driven text layout, vector graphics, charts, and supported DrawingML effects. Use the `pptx` action or `mountViewer` helper to manage the shared viewer controller.
4
6
 
5
7
  ## Install
6
8
 
@@ -57,7 +59,15 @@ export function mount(host: HTMLElement) {
57
59
 
58
60
  `mountViewer` returns `{ viewer, update(options?), destroy() }`. `viewer` always reads the current controller; `update` returns that controller and replaces the complete options set rather than merging a patch. Call `destroy()` on disposal when using this helper directly.
59
61
 
60
- Await imperative loads/exports and handle rejections. PDF/PPTX export requires an original file source. In SvelteKit, run imperative mounting in `onMount`; actions already run on the client. Shared defaults, font/asset settings, and methods are in the [viewer README](https://github.com/hustcer/pptx/tree/main/packages/pptx-viewer#readme).
62
+ Await imperative loads/exports and handle rejections. PDF/PPTX export requires an original file source. In SvelteKit, run imperative mounting in `onMount`; actions already run on the client. Shared rendering capabilities, defaults, font/asset settings, and methods are in the [viewer README](https://www.npmjs.com/package/@s8fy/pptx-viewer).
63
+
64
+ ## Upgrading to 3.0
65
+
66
+ - The `usePptx` alias is removed: import `pptx` and change `use:usePptx={options}` to `use:pptx={options}`.
67
+ - The `createPptx` alias is removed: call `mountViewer(host, options)` instead.
68
+ - Controllers from `onReady` or `mounted.viewer` no longer have `fullscreen()`. Use `await viewer.enterFullscreen()` in a user interaction handler and handle its `Promise<void>` rejection; `onError` only notifies and does not consume the rejection.
69
+
70
+ The retained `pptx` action and `mountViewer` signatures are unchanged. Rendering, parsing, PDF export, and lifecycle behavior follow the shared Viewer `3.0.0` contract.
61
71
 
62
72
  ## License
63
73
 
package/package.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "@s8fy/pptx-viewer-svelte",
3
- "version": "3.0.0",
4
- "description": "Svelte adapter helpers for @s8fy/pptx-viewer",
3
+ "version": "3.1.0",
4
+ "description": "High-fidelity PPTX viewer actions and helpers for Svelte, powered by @s8fy/pptx-viewer",
5
5
  "keywords": [
6
+ "high fidelity",
7
+ "high-fidelity",
6
8
  "powerpoint",
7
9
  "pptx",
8
10
  "presentation",
@@ -50,7 +52,7 @@
50
52
  "registry": "https://registry.npmjs.org"
51
53
  },
52
54
  "dependencies": {
53
- "@s8fy/pptx-viewer": "3.0.0"
55
+ "@s8fy/pptx-viewer": "3.1.0"
54
56
  },
55
57
  "devDependencies": {
56
58
  "@typescript/typescript6": "^6.0.2",