@s8fy/pptx-viewer-svelte 2.1.0 → 3.0.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/README.md +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +5 -5
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ Peer dependency: Svelte **5**. The package declares Node.js **22.12+**. It expor
|
|
|
31
31
|
<div use:pptx={options}></div>
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
The `pptx
|
|
34
|
+
The `pptx` action reuses the controller for source changes and recreates it when configuration changes. The package also exports `mountViewer()` for component authors that prefer an imperative wrapper. Module import is SSR-safe, while invoking an action or helper requires a browser DOM node.
|
|
35
35
|
|
|
36
36
|
## Action parameters and lifecycle
|
|
37
37
|
|
|
@@ -55,7 +55,7 @@ export function mount(host: HTMLElement) {
|
|
|
55
55
|
}
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
`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.
|
|
58
|
+
`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
59
|
|
|
60
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).
|
|
61
61
|
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@s8fy/pptx-viewer");function mountViewer(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@s8fy/pptx-viewer"),t=require("@s8fy/pptx-viewer/internal");function mountViewer(n,r={}){let i=new t.ViewerBinding(n,e.createPptxViewer,r),notify=e=>{t.ViewerBinding.notify(e,i.viewer)};return notify(r.onReady),{get viewer(){return i.viewer},update(e={}){let t=i.viewer;return i.update(e),t!==i.viewer&¬ify(e.onReady),i.viewer},destroy(){i.destroy()}}}function pptx(e,t={}){let n=mountViewer(e,t);return{update(e={}){n.update(e)},destroy(){n.destroy()}}}exports.mountViewer=mountViewer,exports.pptx=pptx;
|
package/dist/index.d.cts
CHANGED
|
@@ -12,6 +12,4 @@ export declare function pptx(node: HTMLElement, params?: PptxActionParams): {
|
|
|
12
12
|
update(next?: PptxActionParams): void;
|
|
13
13
|
destroy(): void;
|
|
14
14
|
};
|
|
15
|
-
export declare const usePptx: typeof pptx;
|
|
16
|
-
export declare const createPptx: typeof mountViewer;
|
|
17
15
|
export type { Viewer, ViewerOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,4 @@ export declare function pptx(node: HTMLElement, params?: PptxActionParams): {
|
|
|
12
12
|
update(next?: PptxActionParams): void;
|
|
13
13
|
destroy(): void;
|
|
14
14
|
};
|
|
15
|
-
export declare const usePptx: typeof pptx;
|
|
16
|
-
export declare const createPptx: typeof mountViewer;
|
|
17
15
|
export type { Viewer, ViewerOptions };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createPptxViewer as e } from "@s8fy/pptx-viewer";
|
|
2
|
+
import { ViewerBinding as t } from "@s8fy/pptx-viewer/internal";
|
|
2
3
|
//#endregion
|
|
3
4
|
//#region src/index.ts
|
|
4
5
|
function mountViewer(n, r = {}) {
|
|
5
|
-
let i = new
|
|
6
|
-
|
|
6
|
+
let i = new t(n, e, r), notify = (e) => {
|
|
7
|
+
t.notify(e, i.viewer);
|
|
7
8
|
};
|
|
8
9
|
return notify(r.onReady), {
|
|
9
10
|
get viewer() {
|
|
@@ -29,6 +30,5 @@ function pptx(e, t = {}) {
|
|
|
29
30
|
}
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
|
-
var n = pptx, r = mountViewer;
|
|
33
33
|
//#endregion
|
|
34
|
-
export {
|
|
34
|
+
export { mountViewer, pptx };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@s8fy/pptx-viewer-svelte",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Svelte adapter helpers for @s8fy/pptx-viewer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"powerpoint",
|
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
"svelte",
|
|
11
11
|
"viewer"
|
|
12
12
|
],
|
|
13
|
-
"homepage": "https://
|
|
13
|
+
"homepage": "https://structurify.io/en/products/pptx-viewer",
|
|
14
14
|
"bugs": {
|
|
15
|
-
"url": "https://github.com/hustcer/
|
|
15
|
+
"url": "https://github.com/hustcer/xdoc-feedback/issues"
|
|
16
16
|
},
|
|
17
17
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
18
18
|
"author": "hustcer@outlook.com",
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
|
-
"url": "git+https://github.com/hustcer/
|
|
21
|
+
"url": "git+https://github.com/hustcer/xdoc-feedback.git",
|
|
22
22
|
"directory": "packages/pptx-viewer-svelte"
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
"registry": "https://registry.npmjs.org"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@s8fy/pptx-viewer": "
|
|
53
|
+
"@s8fy/pptx-viewer": "3.0.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@typescript/typescript6": "^6.0.2",
|
|
57
57
|
"svelte": "^5.55.5",
|
|
58
58
|
"typescript": "~7.0.2",
|
|
59
|
-
"vite": "^8.3.
|
|
60
|
-
"vite-plugin-dts": "^5.1.
|
|
59
|
+
"vite": "^8.3.2",
|
|
60
|
+
"vite-plugin-dts": "^5.1.2",
|
|
61
61
|
"vitest": "^4.1.11"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|