emf-converter 4.4.0 → 4.4.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 +1 -1
- package/dist/browser.js +38655 -0
- package/dist/browser.mjs +38644 -0
- package/dist/index.js +10 -5
- package/dist/index.mjs +10 -5
- package/package.json +8 -2
package/dist/index.js
CHANGED
|
@@ -10355,6 +10355,15 @@ function decodeImageCodecFallback(bytes) {
|
|
|
10355
10355
|
return null;
|
|
10356
10356
|
}
|
|
10357
10357
|
|
|
10358
|
+
// src/node-canvas-loader.ts
|
|
10359
|
+
async function loadNodeCanvasModule() {
|
|
10360
|
+
return import(
|
|
10361
|
+
/* webpackIgnore: true */
|
|
10362
|
+
/* @vite-ignore */
|
|
10363
|
+
'@napi-rs/canvas'
|
|
10364
|
+
);
|
|
10365
|
+
}
|
|
10366
|
+
|
|
10358
10367
|
// src/png-encoder.ts
|
|
10359
10368
|
var crcTable = null;
|
|
10360
10369
|
function crc32(bytes, start, end) {
|
|
@@ -14290,11 +14299,7 @@ async function ensureNodeCanvasModule() {
|
|
|
14290
14299
|
return nodeCanvasModule;
|
|
14291
14300
|
}
|
|
14292
14301
|
try {
|
|
14293
|
-
nodeCanvasModule = await
|
|
14294
|
-
/* webpackIgnore: true */
|
|
14295
|
-
/* @vite-ignore */
|
|
14296
|
-
'@napi-rs/canvas'
|
|
14297
|
-
);
|
|
14302
|
+
nodeCanvasModule = await loadNodeCanvasModule();
|
|
14298
14303
|
} catch {
|
|
14299
14304
|
nodeCanvasModule = null;
|
|
14300
14305
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -10353,6 +10353,15 @@ function decodeImageCodecFallback(bytes) {
|
|
|
10353
10353
|
return null;
|
|
10354
10354
|
}
|
|
10355
10355
|
|
|
10356
|
+
// src/node-canvas-loader.ts
|
|
10357
|
+
async function loadNodeCanvasModule() {
|
|
10358
|
+
return import(
|
|
10359
|
+
/* webpackIgnore: true */
|
|
10360
|
+
/* @vite-ignore */
|
|
10361
|
+
'@napi-rs/canvas'
|
|
10362
|
+
);
|
|
10363
|
+
}
|
|
10364
|
+
|
|
10356
10365
|
// src/png-encoder.ts
|
|
10357
10366
|
var crcTable = null;
|
|
10358
10367
|
function crc32(bytes, start, end) {
|
|
@@ -14288,11 +14297,7 @@ async function ensureNodeCanvasModule() {
|
|
|
14288
14297
|
return nodeCanvasModule;
|
|
14289
14298
|
}
|
|
14290
14299
|
try {
|
|
14291
|
-
nodeCanvasModule = await
|
|
14292
|
-
/* webpackIgnore: true */
|
|
14293
|
-
/* @vite-ignore */
|
|
14294
|
-
'@napi-rs/canvas'
|
|
14295
|
-
);
|
|
14300
|
+
nodeCanvasModule = await loadNodeCanvasModule();
|
|
14296
14301
|
} catch {
|
|
14297
14302
|
nodeCanvasModule = null;
|
|
14298
14303
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "emf-converter",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.1",
|
|
4
4
|
"description": "Convert EMF/WMF metafile binaries to PNG data URLs or SVG (markup, data URL, React/JSX)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"canvas",
|
|
@@ -31,19 +31,25 @@
|
|
|
31
31
|
],
|
|
32
32
|
"main": "dist/index.js",
|
|
33
33
|
"module": "dist/index.mjs",
|
|
34
|
+
"browser": "dist/browser.mjs",
|
|
34
35
|
"types": "dist/index.d.ts",
|
|
35
36
|
"exports": {
|
|
36
37
|
".": {
|
|
37
38
|
"types": "./dist/index.d.ts",
|
|
39
|
+
"browser": {
|
|
40
|
+
"import": "./dist/browser.mjs",
|
|
41
|
+
"require": "./dist/browser.js"
|
|
42
|
+
},
|
|
38
43
|
"import": "./dist/index.mjs",
|
|
39
44
|
"require": "./dist/index.js"
|
|
40
45
|
}
|
|
41
46
|
},
|
|
42
47
|
"scripts": {
|
|
43
|
-
"build": "tsup",
|
|
48
|
+
"build": "tsup && tsup --config tsup.browser.config.ts",
|
|
44
49
|
"dev": "tsup --watch",
|
|
45
50
|
"typecheck": "tsc --noEmit --pretty",
|
|
46
51
|
"test": "vitest run",
|
|
52
|
+
"test:browser-package": "node scripts/check-browser-package.mjs",
|
|
47
53
|
"test:watch": "vitest",
|
|
48
54
|
"pack": "bun run build && bun pm pack",
|
|
49
55
|
"docs:typecheck": "vue-tsc --noEmit -p docs/tsconfig.json",
|