@embedpdf/pdfium 1.0.0-alpha.1 → 1.0.1
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 +6 -7
- package/dist/base.d.ts +30 -0
- package/dist/functions.d.ts +170 -0
- package/dist/index.browser.js +6554 -0
- package/dist/index.browser.js.map +1 -0
- package/dist/index.cjs +5703 -4678
- package/dist/index.cjs.d.ts +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +47 -26
- package/dist/index.d.ts +47 -26
- package/dist/index.esm.d.ts +3 -0
- package/dist/index.js +3653 -1648
- package/dist/index.js.map +1 -1
- package/dist/pdfium.wasm +0 -0
- package/dist/runtime.d.ts +17 -0
- package/package.json +28 -12
package/dist/pdfium.wasm
CHANGED
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface WasmExports {
|
|
2
|
+
malloc: (size: number) => number;
|
|
3
|
+
free: (ptr: number) => void;
|
|
4
|
+
}
|
|
5
|
+
export interface PdfiumRuntimeMethods {
|
|
6
|
+
wasmExports: WasmExports;
|
|
7
|
+
cwrap: typeof cwrap;
|
|
8
|
+
addFunction: typeof addFunction;
|
|
9
|
+
removeFunction: typeof removeFunction;
|
|
10
|
+
ccall: typeof ccall;
|
|
11
|
+
setValue: typeof setValue;
|
|
12
|
+
getValue: typeof getValue;
|
|
13
|
+
UTF8ToString: typeof UTF8ToString;
|
|
14
|
+
UTF16ToString: typeof UTF16ToString;
|
|
15
|
+
stringToUTF8: typeof stringToUTF8;
|
|
16
|
+
stringToUTF16: typeof stringToUTF16;
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embedpdf/pdfium",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "PDFium WebAssembly for the web platform. This package provides a powerful JavaScript interface to PDFium, enabling high-quality PDF rendering and manipulation directly in web applications.",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"main": "./dist/index.
|
|
8
|
-
"module": "./dist/index.
|
|
7
|
+
"main": "./dist/index.cjs",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
"browser": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"default": "./dist/index.browser.js"
|
|
15
|
+
},
|
|
16
|
+
"import": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"default": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"require": {
|
|
21
|
+
"types": "./dist/index.d.cts",
|
|
22
|
+
"default": "./dist/index.cjs"
|
|
23
|
+
}
|
|
15
24
|
},
|
|
16
25
|
"./pdfium.wasm": "./dist/pdfium.wasm"
|
|
17
26
|
},
|
|
@@ -39,24 +48,31 @@
|
|
|
39
48
|
"author": "Bob Singor, Ji Chang",
|
|
40
49
|
"license": "MIT",
|
|
41
50
|
"devDependencies": {
|
|
42
|
-
"
|
|
43
|
-
"
|
|
51
|
+
"@rollup/plugin-commonjs": "^25.0.8",
|
|
52
|
+
"@rollup/plugin-node-resolve": "^15.2.1",
|
|
53
|
+
"@rollup/plugin-replace": "^5.0.2",
|
|
54
|
+
"@rollup/plugin-typescript": "^11.1.2",
|
|
44
55
|
"@types/emscripten": "^1.39.13",
|
|
45
|
-
"cpy-cli": "^5.0.0"
|
|
56
|
+
"cpy-cli": "^5.0.0",
|
|
57
|
+
"magic-string": "^0.30.17",
|
|
58
|
+
"rollup": "^3.28.0",
|
|
59
|
+
"rollup-plugin-copy": "^3.4.0",
|
|
60
|
+
"rollup-plugin-dts": "^6.2.1",
|
|
61
|
+
"typescript": "^5.0.0"
|
|
46
62
|
},
|
|
47
63
|
"publishConfig": {
|
|
48
64
|
"access": "public"
|
|
49
65
|
},
|
|
50
66
|
"scripts": {
|
|
51
|
-
"build": "
|
|
52
|
-
"build:watch": "
|
|
67
|
+
"build": "rollup -c",
|
|
68
|
+
"build:watch": "rollup -c -w",
|
|
53
69
|
"clean": "PROJECT_CWD=$(pwd) pnpm -w p:clean",
|
|
54
70
|
"lint": "PROJECT_CWD=$(pwd) pnpm -w p:lint",
|
|
55
71
|
"lint:fix": "PROJECT_CWD=$(pwd) pnpm -w p:lint:fix",
|
|
56
72
|
"typecheck": "PROJECT_CWD=$(pwd) pnpm -w p:typecheck",
|
|
57
73
|
"prewasm": "node ./scripts/generate-exported-functions.js && node ./scripts/generate-exported-runtime-methods.js",
|
|
58
74
|
"wasm": "make build && pnpm run wasm:copy",
|
|
59
|
-
"wasm:copy": "cpy ./docker/dist/pdfium.
|
|
75
|
+
"wasm:copy": "cpy ./docker/dist/pdfium.cjs ./src/vendor --flat && cpy ./docker/dist/pdfium.wasm ./src/vendor --flat && cpy ./docker/dist/pdfium.js ./src/vendor --flat",
|
|
60
76
|
"build:all": "pnpm run wasm && pnpm run build"
|
|
61
77
|
}
|
|
62
78
|
}
|