vg-print 1.1.1 → 1.1.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.
- package/package.json +1 -1
- package/dist/Content/assets/hi.png +0 -0
- package/dist/chunk-MW6X4KTL-BXi3UvAj.js +0 -87
- package/dist/chunk-Q2Z2CG2I-BwVO1E3F.js +0 -8
- package/dist/chunk-Y7FY32AO-Dbd6pbtx.js +0 -13
- package/dist/css/print-lock.css +0 -297
- package/dist/download-EEjuwbYb.js +0 -15
- package/dist/favicon.ico +0 -0
- package/dist/index-uN5-3hGS.js +0 -106766
- package/dist/purify.es-CKk_t3XZ.js +0 -471
- package/dist/rasterize-34PCWURX-D6vrmnjW.js +0 -4
- package/dist/style.css +0 -1
- package/dist/toBlob-D0xYwgv2.js +0 -4
- package/dist/toCanvas-BaKM-G3n.js +0 -4
- package/dist/toImg-C8t-rKFY.js +0 -27
- package/dist/vg-print.es.js +0 -32
package/dist/toBlob-D0xYwgv2.js
DELETED
package/dist/toImg-C8t-rKFY.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { d as g } from "./chunk-Q2Z2CG2I-BwVO1E3F.js";
|
|
2
|
-
import { l as p } from "./index-uN5-3hGS.js";
|
|
3
|
-
async function x(i, o) {
|
|
4
|
-
let { scale: s = 1, width: n, height: l, meta: e = {} } = o, d = Number.isFinite(n), m = Number.isFinite(l), u = Number.isFinite(s) && s !== 1 || d || m;
|
|
5
|
-
if (p() && u) return await g(i, { ...o, format: "png", quality: 1, meta: e });
|
|
6
|
-
let t = new Image();
|
|
7
|
-
if (t.decoding = "sync", t.loading = "eager", t.src = i, await t.decode(), d && m) t.style.width = `${n}px`, t.style.height = `${l}px`;
|
|
8
|
-
else if (d) {
|
|
9
|
-
let a = Number.isFinite(e.w0) ? e.w0 : t.naturalWidth, h = Number.isFinite(e.h0) ? e.h0 : t.naturalHeight, r = n / Math.max(1, a);
|
|
10
|
-
t.style.width = `${n}px`, t.style.height = `${Math.round(h * r)}px`;
|
|
11
|
-
} else if (m) {
|
|
12
|
-
let a = Number.isFinite(e.w0) ? e.w0 : t.naturalWidth, h = Number.isFinite(e.h0) ? e.h0 : t.naturalHeight, r = l / Math.max(1, h);
|
|
13
|
-
t.style.height = `${l}px`, t.style.width = `${Math.round(a * r)}px`;
|
|
14
|
-
} else {
|
|
15
|
-
let a = Math.round(t.naturalWidth * s), h = Math.round(t.naturalHeight * s);
|
|
16
|
-
if (t.style.width = `${a}px`, t.style.height = `${h}px`, typeof i == "string" && i.startsWith("data:image/svg+xml")) try {
|
|
17
|
-
let r = decodeURIComponent(i.split(",")[1]).replace(/width="[^"]*"/, `width="${a}"`).replace(/height="[^"]*"/, `height="${h}"`);
|
|
18
|
-
i = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(r)}`, t.src = i;
|
|
19
|
-
} catch {
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
}
|
|
24
|
-
export {
|
|
25
|
-
x as toImg,
|
|
26
|
-
x as toSvg
|
|
27
|
-
};
|
package/dist/vg-print.es.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { F as t, H as a, P as r, b as n, r as i, o, e as p, A as d, c as l, d as c, q as g, j as P, k as f, f as u, i as m, v as x, w as C, x as H, g as h, m as w, a as v, h as A, y as I, z as b, t as k, p as q, u as y, s as F, n as L } from "./index-uN5-3hGS.js";
|
|
2
|
-
export {
|
|
3
|
-
t as FullDesigner,
|
|
4
|
-
a as Header,
|
|
5
|
-
r as Preview,
|
|
6
|
-
n as autoConnect,
|
|
7
|
-
i as clientGenerate,
|
|
8
|
-
o as connect,
|
|
9
|
-
p as createTemplate,
|
|
10
|
-
d as default,
|
|
11
|
-
l as defaultElementTypeProvider,
|
|
12
|
-
c as disAutoConnect,
|
|
13
|
-
g as disconnect,
|
|
14
|
-
P as exportImage,
|
|
15
|
-
f as exportImage2,
|
|
16
|
-
u as exportPdf,
|
|
17
|
-
m as exportPdf2,
|
|
18
|
-
x as getAddress,
|
|
19
|
-
C as getClientInfo,
|
|
20
|
-
H as getClients,
|
|
21
|
-
h as getHtml,
|
|
22
|
-
w as getPrinterList,
|
|
23
|
-
v as hiPrintPlugin,
|
|
24
|
-
A as hiprint,
|
|
25
|
-
I as ippPrint,
|
|
26
|
-
b as ippRequest,
|
|
27
|
-
k as isClientConnected,
|
|
28
|
-
q as printBrowser,
|
|
29
|
-
y as refreshPrinterList,
|
|
30
|
-
F as setHiwebSocket,
|
|
31
|
-
L as setHost
|
|
32
|
-
};
|