@file-viewer/pptx 2.0.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.
@@ -0,0 +1,2 @@
1
+ import type { PptxWorkerFactoryOptions } from './types';
2
+ export declare const createPptxWorker: (options?: PptxWorkerFactoryOptions) => Worker;
package/dist/worker.js ADDED
@@ -0,0 +1,14 @@
1
+ export const createPptxWorker = (options = {}) => {
2
+ var _a;
3
+ if (options.workerFactory) {
4
+ return options.workerFactory();
5
+ }
6
+ if (options.workerUrl) {
7
+ return new Worker(options.workerUrl, {
8
+ type: (_a = options.workerType) !== null && _a !== void 0 ? _a : 'module',
9
+ });
10
+ }
11
+ return new Worker(new URL('./worker/pptx.worker.js', import.meta.url), {
12
+ type: 'module',
13
+ });
14
+ };
package/package.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "@file-viewer/pptx",
3
+ "version": "2.0.2",
4
+ "private": false,
5
+ "type": "module",
6
+ "description": "Native PPTX renderer extracted from Flyfish File Viewer",
7
+ "keywords": [
8
+ "pptx",
9
+ "powerpoint",
10
+ "presentation",
11
+ "file-viewer",
12
+ "document-preview"
13
+ ],
14
+ "publishConfig": {
15
+ "access": "public",
16
+ "registry": "https://registry.npmjs.org/"
17
+ },
18
+ "author": {
19
+ "name": "Wangyu",
20
+ "email": "wybaby168@gmail.com"
21
+ },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/flyfish-dev/pptxjs.git",
25
+ "directory": "packages/renderers/pptx"
26
+ },
27
+ "homepage": "https://doc.file-viewer.app/",
28
+ "bugs": {
29
+ "url": "https://github.com/flyfish-dev/pptxjs/issues"
30
+ },
31
+ "main": "./dist/index.js",
32
+ "module": "./dist/index.js",
33
+ "types": "./dist/index.d.ts",
34
+ "exports": {
35
+ ".": {
36
+ "types": "./dist/index.d.ts",
37
+ "import": "./dist/index.js",
38
+ "default": "./dist/index.js"
39
+ },
40
+ "./worker": {
41
+ "types": "./dist/worker.d.ts",
42
+ "import": "./dist/worker.js",
43
+ "default": "./dist/worker.js"
44
+ },
45
+ "./styles.css": "./dist/styles/pptxjs.css",
46
+ "./package.json": "./package.json"
47
+ },
48
+ "files": [
49
+ "dist",
50
+ "README.md",
51
+ "README.en.md",
52
+ "LICENSE"
53
+ ],
54
+ "dependencies": {
55
+ "billboard.js": "^3.17.2",
56
+ "d3-format": "^3.1.2",
57
+ "dingbat-to-unicode": "^1.0.1",
58
+ "jszip": "^3.10.1",
59
+ "tinycolor2": "^1.6.0"
60
+ },
61
+ "devDependencies": {
62
+ "@types/d3-format": "^3.0.4",
63
+ "@types/node": "^25.9.2",
64
+ "esbuild": "^0.27.2",
65
+ "typescript": "^6.0.3"
66
+ },
67
+ "license": "Apache-2.0",
68
+ "scripts": {
69
+ "build": "node scripts/clean-dist.mjs && tsc -b tsconfig.json --force && node scripts/build-worker.mjs && node scripts/copy-assets.mjs && node scripts/fix-esm-extensions.mjs",
70
+ "type-check": "tsc -b tsconfig.json"
71
+ }
72
+ }