vg-print 1.0.377 → 1.0.378

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 CHANGED
@@ -582,9 +582,17 @@ import {
582
582
  setHiwebSocket,
583
583
  connect,
584
584
  disconnect,
585
+ isClientConnected,
585
586
  clientGenerate
586
587
  } from 'vg-print'
587
588
 
589
+ // 连接客户端(需要先启动客户端)
590
+ connect()
591
+
592
+ // 检查客户端是否已连接
593
+ console.log(isClientConnected())
594
+
595
+
588
596
  // 1) 创建模板实例(可复用)
589
597
  const tpl = createTemplate(tmplJson)
590
598
 
@@ -1,4 +1,4 @@
1
- import { l as b } from "./index-CqfNvZfh.js";
1
+ import { l as b } from "./index-DJOFLu9X.js";
2
2
  function M(e) {
3
3
  return typeof e == "string" && /^data:image\/svg\+xml/i.test(e);
4
4
  }
@@ -1,4 +1,4 @@
1
- import { W as a } from "./chunk-3VYIPD3A-g7DHlmKH.js";
1
+ import { W as a } from "./chunk-3VYIPD3A-DBR5bzWJ.js";
2
2
  async function o(r, t) {
3
3
  let i = await a(r, t), e = new Image();
4
4
  return e.src = i.toDataURL(`image/${t.format}`, t.quality), await e.decode(), e.style.width = `${i.width / t.dpr}px`, e.style.height = `${i.height / t.dpr}px`, e;
@@ -1,4 +1,4 @@
1
- import { W as m } from "./chunk-3VYIPD3A-g7DHlmKH.js";
1
+ import { W as m } from "./chunk-3VYIPD3A-DBR5bzWJ.js";
2
2
  async function a(n, e) {
3
3
  let o = e.type;
4
4
  if (o === "svg") {
@@ -1,5 +1,5 @@
1
- import { m as f } from "./chunk-T4JIPPZO-CveXSBih.js";
2
- import { W as t } from "./chunk-3VYIPD3A-g7DHlmKH.js";
1
+ import { m as f } from "./chunk-T4JIPPZO-dtnsXJVt.js";
2
+ import { W as t } from "./chunk-3VYIPD3A-DBR5bzWJ.js";
3
3
  async function w(n, e) {
4
4
  let c = ((e == null ? void 0 : e.format) || (e == null ? void 0 : e.type) || "").toLowerCase(), a = c === "jpg" ? "jpeg" : c || "png", i = (e == null ? void 0 : e.filename) || `snapdom.${a}`, o = { ...e || {}, format: a, type: a };
5
5
  if (o.dpr = 1, a === "svg") {