@embedpdf-editor/react-chapter-viewer 0.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.
- package/LICENSE +22 -0
- package/NOTICE +7 -0
- package/README.md +90 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +803 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9791 -0
- package/dist/index.js.map +1 -0
- package/package.json +76 -0
- package/src/vite.ts +21 -0
package/package.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@embedpdf-editor/react-chapter-viewer",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./vite": {
|
|
16
|
+
"types": "./src/vite.ts",
|
|
17
|
+
"import": "./src/vite.ts",
|
|
18
|
+
"default": "./src/vite.ts"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@embedpdf/core": "^2.14.3",
|
|
23
|
+
"@embedpdf/engines": "^2.14.3",
|
|
24
|
+
"@embedpdf/models": "^2.14.3",
|
|
25
|
+
"@embedpdf/plugin-annotation": "^2.14.3",
|
|
26
|
+
"@embedpdf/plugin-commands": "^2.14.3",
|
|
27
|
+
"@embedpdf/plugin-document-manager": "^2.14.3",
|
|
28
|
+
"@embedpdf/plugin-form": "^2.14.3",
|
|
29
|
+
"@embedpdf/plugin-history": "^2.14.3",
|
|
30
|
+
"@embedpdf/plugin-i18n": "^2.14.3",
|
|
31
|
+
"@embedpdf/plugin-interaction-manager": "^2.14.3",
|
|
32
|
+
"@embedpdf/plugin-redaction": "^2.14.3",
|
|
33
|
+
"@embedpdf/plugin-render": "^2.14.3",
|
|
34
|
+
"@embedpdf/plugin-rotate": "^2.14.3",
|
|
35
|
+
"@embedpdf/plugin-selection": "^2.14.3",
|
|
36
|
+
"@embedpdf/plugin-signature": "^2.14.3",
|
|
37
|
+
"@embedpdf/plugin-stamp": "^2.14.3",
|
|
38
|
+
"@embedpdf/plugin-tiling": "^2.14.3",
|
|
39
|
+
"@embedpdf/plugin-ui": "^2.14.3",
|
|
40
|
+
"scheduler": "^0.23.2"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"react": ">=16.8.0",
|
|
44
|
+
"react-dom": ">=16.8.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@microsoft/api-extractor": "^7.56.3",
|
|
48
|
+
"@types/react": "^18.2.0",
|
|
49
|
+
"typescript": "^5.0.0",
|
|
50
|
+
"vite": "^6.3.5",
|
|
51
|
+
"@embedpdf-editor/chapter-core": "0.1.0",
|
|
52
|
+
"@embedpdf-editor/chapter-viewer": "0.1.0",
|
|
53
|
+
"@embedpdf-editor/plugin-note": "0.1.0",
|
|
54
|
+
"@embedpdf-editor/plugin-chapter-scroll": "0.1.0",
|
|
55
|
+
"@embedpdf-editor/plugin-chapter-render": "0.1.0",
|
|
56
|
+
"@embedpdf-editor/editor-engine": "0.1.0",
|
|
57
|
+
"@embedpdf-editor/plugin-chapter-manager": "0.1.0",
|
|
58
|
+
"@embedpdf/build": "1.1.0",
|
|
59
|
+
"@embedpdf-editor/plugin-editor-toolbar": "0.1.0",
|
|
60
|
+
"@embedpdf-editor/plugin-paragraph-bookmark": "0.1.0"
|
|
61
|
+
},
|
|
62
|
+
"files": [
|
|
63
|
+
"dist",
|
|
64
|
+
"src/vite.ts",
|
|
65
|
+
"LICENSE",
|
|
66
|
+
"NOTICE",
|
|
67
|
+
"README.md"
|
|
68
|
+
],
|
|
69
|
+
"publishConfig": {
|
|
70
|
+
"access": "public"
|
|
71
|
+
},
|
|
72
|
+
"scripts": {
|
|
73
|
+
"build": "pnpm run clean && vite build && node ../scripts/bundle-dts.mjs react-chapter-viewer",
|
|
74
|
+
"clean": "rimraf dist"
|
|
75
|
+
}
|
|
76
|
+
}
|
package/src/vite.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import type { UserConfig } from 'vite';
|
|
4
|
+
|
|
5
|
+
const require = createRequire(import.meta.url);
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 供 Vite 项目合并使用:`react-dom` 预构建依赖 `scheduler`,由本包 dependencies 提供,
|
|
9
|
+
* 业务项目无需在 package.json 中单独声明 scheduler。
|
|
10
|
+
*/
|
|
11
|
+
export function chapterViewerViteResolve(): Pick<UserConfig, 'resolve' | 'optimizeDeps'> {
|
|
12
|
+
const schedulerDir = path.dirname(require.resolve('scheduler/package.json'));
|
|
13
|
+
return {
|
|
14
|
+
resolve: {
|
|
15
|
+
alias: [{ find: 'scheduler', replacement: schedulerDir }],
|
|
16
|
+
},
|
|
17
|
+
optimizeDeps: {
|
|
18
|
+
include: ['scheduler', '@embedpdf/engines/react', '@embedpdf/engines'],
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|