@sv-print/plugin-api-pdf3 0.2.0 → 0.2.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/dist/index.js CHANGED
@@ -1,35 +1 @@
1
- "use strict";var j=(n,a,e)=>new Promise((x,o)=>{var c=t=>{try{f(e.next(t))}catch(m){o(m)}},I=t=>{try{f(e.throw(t))}catch(m){o(m)}},f=t=>t.done?x(t.value):Promise.resolve(t.value).then(c,I);f((e=e.apply(n,a)).next())});const z=require("@zumer/snapdom"),A=require("jspdf");function T(n,a){const e=q();return T=function(x,o){return x=x-167,e[x]},T(n,a)}(function(n,a){const e=T,x=n();for(;[];)try{if(parseInt(e(215))/1+-parseInt(e(203))/2+-parseInt(e(240))/3*(parseInt(e(184))/4)+-parseInt(e(231))/5*(parseInt(e(247))/6)+-parseInt(e(222))/7*(-parseInt(e(242))/8)+parseInt(e(185))/9+parseInt(e(235))/10===a)break;x.push(x.shift())}catch(o){x.push(x.shift())}})(q,686546);const J=function(n,a,e){return j(this,null,function*(){const x=T;var o=this,c=globalThis.$.Deferred(),I=!![];let f=(P,v)=>{const b=T,i=Math[b(216)](P/v*100);console[b(230)](b(220),P,"total",v),console.log("toPdf percent: ",i+"%")},t=e||{};if(this[x(228)][x(238)]){if(typeof a=="string"){const l=a[x(183)](".pdf")>-1?a:a+".pdf";t[x(236)]=l}else t=a||{},!t[x(236)]&&(t.name="sv-print-"+Date[x(181)]()+x(187));let P=this[x(228)][0][x(179)],v=this[x(228)][0][x(173)];var m=globalThis.hinnn.mm[x(180)](t[x(233)]||P),O=globalThis[x(171)].mm[x(180)](t[x(207)]||v),u=globalThis.$[x(241)]({},t||{});const b=this.printPanels[0][x(208)],i=this.printPanels[0][x(218)],E=i&&(i[x(212)]>0||i.layoutColumnGap>0),H=b!=null&&b!=""&&b!=x(223);var w=new A.jsPDF({orientation:this.getOrient(0)==1?x(219):"landscape",unit:"pt",format:H?b[x(239)]():[m,O]}),g=yield this.getHtml(n,t);t&&(t[x(188)]&&(u[x(194)]=t.pixelRatio,u[x(205)]=t[x(188)]),t[x(237)]!=null&&(I=t[x(237)]),t[x(200)]!=null&&(f=t[x(200)])),globalThis.$(g)[x(244)](x(179),"").css(x(173),""),this[x(245)]();var C=this.getTempContainer();if(E&&t[x(233)]&&t.paperHeight){let l=Math[x(216)](t[x(233)]/(P+i.layoutRowGap/2)),h=Math.floor(t[x(207)]/(v+i[x(197)]/2));const _=l*h,d=g.find(".hiprint-printPanel .hiprint-printPaper"),y=d.length,s=Math.ceil(y/_);let p=globalThis.$(x(170));i[x(176)]==x(248)?p.append(`<style>
2
- .hiprint-printPanel-small{
3
- box-sizing: border-box;
4
- border: 0px;
5
- }
6
- .hiprint-printPaper-small{
7
- position: relative;
8
- padding: 0;
9
- }
10
- .hiprint-printTemplate .hiprint-printPaper{
11
- margin: -`+(Number(i[x(212)])||0)/2+x(177)+(Number(i[x(197)])||0)/2+x(227)+(Number(i[x(212)])||0)/2+x(226)+(Number(i.layoutColumnGap)||0)/2+`mm;
12
- }
13
- </style>`):p[x(191)](x(225)+(Number(i[x(212)])||0)/2+"mm -"+(Number(i[x(197)])||0)/2+x(227)+(Number(i.layoutRowGap)||0)/2+"mm "+(Number(i[x(197)])||0)/2+x(186));for(let r=0;r<s;r++){const N=globalThis.$(x(178)+t[x(233)]+x(224)+t.paperHeight+x(213)),D=r*_,Y=Math[x(196)]((r+1)*_,y);for(let R=D;R<Y;R++){const G=d.eq(R)[x(189)]();G.removeClass(x(246)),G[x(217)](x(214)+R);const V=globalThis.$('<div class="hiprint-printPanel-small"></div>');V[x(191)](G),N[x(202)](x(201)).append(V)}p[x(191)](N)}this[x(167)](p,u),C[x(211)](p[0]),globalThis.$(p)[x(244)](x(168))}else this[x(167)](g,u),C[x(211)](g[0]),globalThis.$(g)[x(244)](x(168));let k=C[x(202)](x(243))[x(238)];this[x(199)](g,function(){const l=x;try{C[l(202)](l(243)).each(function(h,_){const d=l;globalThis[d(171)][d(232)].add(function(y){const s=d;z.snapdom.toCanvas(_,u)[s(198)](function(p){const r=s;var N=p[r(234)]("2d");N[r(193)]=![];var D=p[r(182)](r(192),u.quality||.92);w[r(169)](D,r(195),0,0,m,O),h<k-1&&w[r(190)](),f(h+1,k),y()})[s(174)](p=>{throw new Error(p.message)})}),h==k-1&&(globalThis[d(171)].queue[d(206)](function(y){const s=d;if(I)o.removeTempContainer(),w[s(221)](t[s(236)]);else{o.removeTempContainer();let p=t[s(204)]||"blob",r=w[s(172)](p);c[s(229)](r)}globalThis[s(171)][s(232)].clear()}),globalThis.hinnn.queue.run())})}catch(h){console[l(209)](l(175)),console[l(230)](h)}})}return c[x(210)]()})};function q(){const n=["870396MNVKbV","type","scale","add","paperHeight","paperType","error","promise","html","layoutRowGap",`mm;"></div>
14
- </div>`,"hiprint-printPaper-small start-","817870sRwNtd","floor","addClass","panelLayoutOptions","portrait","cur","save","36393lfxVEX","\u81EA\u5B9A\u4E49","mm;height:",`<style>
15
- .hiprint-printPanel-small{
16
- box-sizing: border-box;
17
- border: 0px;
18
- }
19
- .hiprint-printPaper-small{
20
- position: relative;
21
- padding: 0;
22
- }
23
- .hiprint-printTemplate .hiprint-printPaper{
24
- display: flex;
25
- flex-wrap: wrap;
26
- flex-direction: column;
27
- align-content: flex-start;
28
- margin: -`,"mm ",`mm;
29
- }
30
- .hiprint-printTemplate .hiprint-printPanel-small {
31
- display:inline-block;
32
- padding: `,"printPanels","resolve","log","465JYscVO","queue","paperWidth","getContext","1830570nhlfoR","name","isDownload","length","toLocaleLowerCase","453RnbkRT","extend","824JuXcAV",".hiprint-printPanel .hiprint-printPaper","css","createTempContainer","hiprint-printPaper","57762hBjdeZ","row","svg2canvas","position:fixed","addImage",'<div class="hiprint-printTemplate"></div>',"hinnn","output","height","catch","toPdf \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ","layoutType","mm -",`<div class="hiprint-printPanel">
33
- <div class="hiprint-printPaper" style="width:`,"width","toPt","now","toDataURL","indexOf","21820PdnyNC","11739024gYkaDO",`mm;
34
- }
35
- </style>`,".pdf","pixelRatio","clone","addPage","append","image/jpeg","imageSmoothingEnabled","dpr","JPEG","min","layoutColumnGap","then","loadAllImages","onProgress",".hiprint-printPaper","find"];return q=function(){return n},q()}(function(n,a){for(var e=M,x=n();[];)try{var o=parseInt(e(491))/1*(-parseInt(e(490))/2)+parseInt(e(495))/3+-parseInt(e(487))/4+parseInt(e(484))/5*(parseInt(e(494))/6)+-parseInt(e(493))/7*(parseInt(e(488))/8)+-parseInt(e(497))/9+parseInt(e(485))/10;if(o===a)break;x.push(x.shift())}catch(c){x.push(x.shift())}})($,444814);function M(n,a){var e=$();return M=function(x,o){x=x-484;var c=e[x];return c},M(n,a)}function $(){var n=["11800220KdCSqW","add toPdf Api to PrintTemplate","149712dcKDWM","36112hbQYCs","toPdf","31846ymriPr","23eWdTxC","newPrintTemplate","602uMlddO","44490VKEqul","1166520yrTloY","add toPdf Api","5859288JZXlPB","215YCzUPc"];return $=function(){return n},$()}function K(n){var a=M;return{name:a(496),description:a(496),hooks:[{hook:a(492),name:a(486),description:a(486),priority:1,run:({template:e,options:x})=>{var o=a;Object.defineProperty(e,o(489),{value:J,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:"0.3.0"}}module.exports=K;
1
+ "use strict";var k=(a,n,e)=>new Promise((x,r)=>{var p=t=>{try{l(e.next(t))}catch(f){r(f)}},m=t=>{try{l(e.throw(t))}catch(f){r(f)}},l=t=>t.done?x(t.value):Promise.resolve(t.value).then(p,m);l((e=e.apply(a,n)).next())});const B=require("@zumer/snapdom"),H=require("jspdf");(function(a,n){const e=q,x=a();for(;;)try{if(-parseInt(e(364))/1*(-parseInt(e(353))/2)+-parseInt(e(341))/3*(parseInt(e(378))/4)+parseInt(e(347))/5+parseInt(e(351))/6*(parseInt(e(369))/7)+parseInt(e(371))/8+-parseInt(e(374))/9+-parseInt(e(352))/10*(parseInt(e(334))/11)===n)break;x.push(x.shift())}catch(r){x.push(x.shift())}})(w,319677);const W=function(a,n,e){return k(this,null,function*(){const x=q;var r=this,p=globalThis.$[x(340)](),m=!0;let l=(P,T)=>{const c=x,d=Math[c(361)](P/T*100);console[c(319)](c(377),P,"total",T),console[c(319)](c(372),d+"%")},t=e||{};if(this[x(382)][x(327)]){if(typeof n===x(375)){const o=n[x(367)](x(365))>-1?n:n+x(365);t[x(360)]=o}else t=n||{},!t[x(360)]&&(t.name=x(362)+Date[x(344)]()+x(365));let P=this[x(382)][0][x(333)],T=this[x(382)][0][x(348)];const c=t[x(343)]&&t[x(330)];var f=globalThis[x(363)].mm[x(323)](t[x(343)]||P),C=globalThis.hinnn.mm[x(323)](t[x(330)]||T),u=globalThis.$[x(338)]({backgroundColor:x(329)},t||{});const d=this[x(382)][0][x(335)],R=d!=null&&d!=""&&d!=x(376),X=this[x(321)](0)==1||c?x(328):"landscape",E=R&&!c?d[x(332)]():[f,C];var v=new H.jsPDF({orientation:X,unit:"pt",format:E}),_=yield this.getHtml(a,t);t&&(t[x(326)]&&(u[x(346)]=t.pixelRatio,u[x(368)]=t[x(326)]),t[x(379)]!=null&&(m=t[x(379)]),t[x(336)]!=null&&(l=t[x(336)])),globalThis.$(_)[x(355)]("width","")[x(355)](x(348),""),this[x(325)]();var I=this[x(342)]();this[x(331)](_,u),I[x(337)](_[0]),globalThis.$(_)[x(355)](x(324));let A=I[x(354)](x(381)).length;this[x(370)](I,function(){const o=x;try{I[o(354)](o(381))[o(345)](function(b,G){const i=o;globalThis[i(363)][i(322)][i(358)](function(j){const s=i;B.snapdom.toCanvas(G,u)[s(318)](function(h){const g=s;var O=h[g(366)]("2d");O[g(356)]=!1;var Z=h.toDataURL("image/jpeg",u.quality||.92);v.addImage(Z,g(320),0,0,f,C),b<A-1&&v.addPage(),l(b+1,A),j()})[s(350)](h=>{throw new Error(h.message)})}),b==A-1&&(globalThis.hinnn.queue[i(358)](function(j){const s=i;if(m)r.removeTempContainer(),v[s(349)](t[s(360)]);else{r[s(359)]();let h=t[s(373)]||"blob",g=v.output(h);p.resolve(g)}globalThis[s(363)].queue.clear()}),globalThis[i(363)][i(322)][i(380)]())})}catch(b){console[o(339)](o(357)),console[o(319)](b)}})}return p.promise()})};function q(a,n){const e=w();return q=function(x,r){return x=x-318,e[x]},q(a,n)}function w(){const a=["save","catch","1270116jXYvDl","10isvtQq","134FXOcys","find","css","imageSmoothingEnabled","toPdf 失败(可能您的图片资源无法正常加载): ","add","removeTempContainer","name","floor","sv-print-","hinnn","2913lJqTSb",".pdf","getContext","indexOf","scale","7ephwfs","loadAllImages","2436640DEXpzD","toPdf percent: ","type","4154787eMEquO","string","自定义","cur","11468BswBuP","isDownload","run",".hiprint-printPanel .hiprint-printPaper","printPanels","then","log","JPEG","getOrient","queue","toPt","position:fixed","createTempContainer","pixelRatio","length","portrait","#fff","paperHeight","svg2canvas","toLocaleLowerCase","width","565334qhgZZz","paperType","onProgress","html","extend","error","Deferred","183uXkDZV","getTempContainer","paperWidth","now","each","dpr","1480820qWimoZ","height"];return w=function(){return a},w()}function y(){var a=["2979GBpDqr","add toPdf Api","4575935rhWZqJ","918DcynHl","toPdf","1523658KGpjTG","defineProperty","1531140yqUKYr","46392ARDXSt","230qAbAyB","newPrintTemplate","5242002lfWGRM","2950684ipXaaP","5TaYwDD","0.3.0","add toPdf Api to PrintTemplate","176VhqARN"];return y=function(){return a},y()}(function(a,n){for(var e=D,x=a();;)try{var r=-parseInt(e(324))/1*(parseInt(e(316))/2)+-parseInt(e(329))/3+-parseInt(e(319))/4+-parseInt(e(320))/5*(-parseInt(e(318))/6)+-parseInt(e(326))/7+parseInt(e(315))/8*(-parseInt(e(327))/9)+-parseInt(e(314))/10*(-parseInt(e(323))/11);if(r===n)break;x.push(x.shift())}catch(p){x.push(x.shift())}})(y,490146);function D(a,n){var e=y();return D=function(x,r){x=x-314;var p=e[x];return p},D(a,n)}function $(a){var n=D;return{name:n(325),description:"add toPdf Api",hooks:[{hook:n(317),name:n(322),description:n(322),priority:1,run:({template:e,options:x})=>{var r=n;Object[r(330)](e,r(328),{value:W,enumerable:!1,writable:!0,configurable:!0})}}],leastHiprintVersion:n(321)}}module.exports=$;
package/dist/index.mjs CHANGED
@@ -1,185 +1,131 @@
1
- var E = (n, a, e) => new Promise((x, o) => {
2
- var c = (t) => {
1
+ var R = (a, n, t) => new Promise((x, r) => {
2
+ var p = (e) => {
3
3
  try {
4
- f(e.next(t));
5
- } catch (m) {
6
- o(m);
4
+ c(t.next(e));
5
+ } catch (f) {
6
+ r(f);
7
7
  }
8
- }, I = (t) => {
8
+ }, m = (e) => {
9
9
  try {
10
- f(e.throw(t));
11
- } catch (m) {
12
- o(m);
10
+ c(t.throw(e));
11
+ } catch (f) {
12
+ r(f);
13
13
  }
14
- }, f = (t) => t.done ? x(t.value) : Promise.resolve(t.value).then(c, I);
15
- f((e = e.apply(n, a)).next());
14
+ }, c = (e) => e.done ? x(e.value) : Promise.resolve(e.value).then(p, m);
15
+ c((t = t.apply(a, n)).next());
16
16
  });
17
- import { snapdom as A } from "@zumer/snapdom";
18
- import { jsPDF as J } from "jspdf";
19
- function T(n, a) {
20
- const e = M();
21
- return T = function(x, o) {
22
- return x = x - 167, e[x];
23
- }, T(n, a);
24
- }
25
- (function(n, a) {
26
- const e = T, x = n();
27
- for (; []; )
17
+ import { snapdom as B } from "@zumer/snapdom";
18
+ import { jsPDF as H } from "jspdf";
19
+ (function(a, n) {
20
+ const t = w, x = a();
21
+ for (; ; )
28
22
  try {
29
- if (parseInt(e(215)) / 1 + -parseInt(e(203)) / 2 + -parseInt(e(240)) / 3 * (parseInt(e(184)) / 4) + -parseInt(e(231)) / 5 * (parseInt(e(247)) / 6) + -parseInt(e(222)) / 7 * (-parseInt(e(242)) / 8) + parseInt(e(185)) / 9 + parseInt(e(235)) / 10 === a)
30
- break;
23
+ if (-parseInt(t(364)) / 1 * (-parseInt(t(353)) / 2) + -parseInt(t(341)) / 3 * (parseInt(t(378)) / 4) + parseInt(t(347)) / 5 + parseInt(t(351)) / 6 * (parseInt(t(369)) / 7) + parseInt(t(371)) / 8 + -parseInt(t(374)) / 9 + -parseInt(t(352)) / 10 * (parseInt(t(334)) / 11) === n) break;
31
24
  x.push(x.shift());
32
- } catch (o) {
25
+ } catch (r) {
33
26
  x.push(x.shift());
34
27
  }
35
- })(M, 686546);
36
- const K = function(n, a, e) {
37
- return E(this, null, function* () {
38
- const x = T;
39
- var o = this, c = globalThis.$.Deferred(), I = !![];
40
- let f = (P, v) => {
41
- const b = T, i = Math[b(216)](P / v * 100);
42
- console[b(230)](b(220), P, "total", v), console.log("toPdf percent: ", i + "%");
43
- }, t = e || {};
44
- if (this[x(228)][x(238)]) {
45
- if (typeof a == "string") {
46
- const l = a[x(183)](".pdf") > -1 ? a : a + ".pdf";
47
- t[x(236)] = l;
48
- } else
49
- t = a || {}, !t[x(236)] && (t.name = "sv-print-" + Date[x(181)]() + x(187));
50
- let P = this[x(228)][0][x(179)], v = this[x(228)][0][x(173)];
51
- var m = globalThis.hinnn.mm[x(180)](t[x(233)] || P), O = globalThis[x(171)].mm[x(180)](t[x(207)] || v), u = globalThis.$[x(241)]({}, t || {});
52
- const b = this.printPanels[0][x(208)], i = this.printPanels[0][x(218)], H = i && (i[x(212)] > 0 || i.layoutColumnGap > 0), Y = b != null && b != "" && b != x(223);
53
- var w = new J({ orientation: this.getOrient(0) == 1 ? x(219) : "landscape", unit: "pt", format: Y ? b[x(239)]() : [m, O] }), g = yield this.getHtml(n, t);
54
- t && (t[x(188)] && (u[x(194)] = t.pixelRatio, u[x(205)] = t[x(188)]), t[x(237)] != null && (I = t[x(237)]), t[x(200)] != null && (f = t[x(200)])), globalThis.$(g)[x(244)](x(179), "").css(x(173), ""), this[x(245)]();
55
- var C = this.getTempContainer();
56
- if (H && t[x(233)] && t.paperHeight) {
57
- let l = Math[x(216)](t[x(233)] / (P + i.layoutRowGap / 2)), h = Math.floor(t[x(207)] / (v + i[x(197)] / 2));
58
- const _ = l * h, d = g.find(".hiprint-printPanel .hiprint-printPaper"), y = d.length, p = Math.ceil(y / _);
59
- let s = globalThis.$(x(170));
60
- i[x(176)] == x(248) ? s.append(`<style>
61
- .hiprint-printPanel-small{
62
- box-sizing: border-box;
63
- border: 0px;
64
- }
65
- .hiprint-printPaper-small{
66
- position: relative;
67
- padding: 0;
68
- }
69
- .hiprint-printTemplate .hiprint-printPaper{
70
- margin: -` + (Number(i[x(212)]) || 0) / 2 + x(177) + (Number(i[x(197)]) || 0) / 2 + x(227) + (Number(i[x(212)]) || 0) / 2 + x(226) + (Number(i.layoutColumnGap) || 0) / 2 + `mm;
71
- }
72
- </style>`) : s[x(191)](x(225) + (Number(i[x(212)]) || 0) / 2 + "mm -" + (Number(i[x(197)]) || 0) / 2 + x(227) + (Number(i.layoutRowGap) || 0) / 2 + "mm " + (Number(i[x(197)]) || 0) / 2 + x(186));
73
- for (let r = 0; r < p; r++) {
74
- const N = globalThis.$(x(178) + t[x(233)] + x(224) + t.paperHeight + x(213)), D = r * _, j = Math[x(196)]((r + 1) * _, y);
75
- for (let R = D; R < j; R++) {
76
- const G = d.eq(R)[x(189)]();
77
- G.removeClass(x(246)), G[x(217)](x(214) + R);
78
- const V = globalThis.$('<div class="hiprint-printPanel-small"></div>');
79
- V[x(191)](G), N[x(202)](x(201)).append(V);
80
- }
81
- s[x(191)](N);
82
- }
83
- this[x(167)](s, u), C[x(211)](s[0]), globalThis.$(s)[x(244)](x(168));
84
- } else
85
- this[x(167)](g, u), C[x(211)](g[0]), globalThis.$(g)[x(244)](x(168));
86
- let q = C[x(202)](x(243))[x(238)];
87
- this[x(199)](g, function() {
88
- const l = x;
28
+ })(q, 319677);
29
+ const W = function(a, n, t) {
30
+ return R(this, null, function* () {
31
+ const x = w;
32
+ var r = this, p = globalThis.$[x(340)](), m = !0;
33
+ let c = (P, T) => {
34
+ const l = x, h = Math[l(361)](P / T * 100);
35
+ console[l(319)](l(377), P, "total", T), console[l(319)](l(372), h + "%");
36
+ }, e = t || {};
37
+ if (this[x(382)][x(327)]) {
38
+ if (typeof n === x(375)) {
39
+ const o = n[x(367)](x(365)) > -1 ? n : n + x(365);
40
+ e[x(360)] = o;
41
+ } else e = n || {}, !e[x(360)] && (e.name = x(362) + Date[x(344)]() + x(365));
42
+ let P = this[x(382)][0][x(333)], T = this[x(382)][0][x(348)];
43
+ const l = e[x(343)] && e[x(330)];
44
+ var f = globalThis[x(363)].mm[x(323)](e[x(343)] || P), C = globalThis.hinnn.mm[x(323)](e[x(330)] || T), u = globalThis.$[x(338)]({ backgroundColor: x(329) }, e || {});
45
+ const h = this[x(382)][0][x(335)], X = h != null && h != "" && h != x(376), j = this[x(321)](0) == 1 || l ? x(328) : "landscape", E = X && !l ? h[x(332)]() : [f, C];
46
+ var v = new H({ orientation: j, unit: "pt", format: E }), _ = yield this.getHtml(a, e);
47
+ e && (e[x(326)] && (u[x(346)] = e.pixelRatio, u[x(368)] = e[x(326)]), e[x(379)] != null && (m = e[x(379)]), e[x(336)] != null && (c = e[x(336)])), globalThis.$(_)[x(355)]("width", "")[x(355)](x(348), ""), this[x(325)]();
48
+ var I = this[x(342)]();
49
+ this[x(331)](_, u), I[x(337)](_[0]), globalThis.$(_)[x(355)](x(324));
50
+ let A = I[x(354)](x(381)).length;
51
+ this[x(370)](I, function() {
52
+ const o = x;
89
53
  try {
90
- C[l(202)](l(243)).each(function(h, _) {
91
- const d = l;
92
- globalThis[d(171)][d(232)].add(function(y) {
93
- const p = d;
94
- A.toCanvas(_, u)[p(198)](function(s) {
95
- const r = p;
96
- var N = s[r(234)]("2d");
97
- N[r(193)] = ![];
98
- var D = s[r(182)](r(192), u.quality || 0.92);
99
- w[r(169)](D, r(195), 0, 0, m, O), h < q - 1 && w[r(190)](), f(h + 1, q), y();
100
- })[p(174)]((s) => {
101
- throw new Error(s.message);
54
+ I[o(354)](o(381))[o(345)](function(b, G) {
55
+ const i = o;
56
+ globalThis[i(363)][i(322)][i(358)](function(k) {
57
+ const s = i;
58
+ B.toCanvas(G, u)[s(318)](function(d) {
59
+ const g = s;
60
+ var O = d[g(366)]("2d");
61
+ O[g(356)] = !1;
62
+ var Z = d.toDataURL("image/jpeg", u.quality || 0.92);
63
+ v.addImage(Z, g(320), 0, 0, f, C), b < A - 1 && v.addPage(), c(b + 1, A), k();
64
+ })[s(350)]((d) => {
65
+ throw new Error(d.message);
102
66
  });
103
- }), h == q - 1 && (globalThis[d(171)].queue[d(206)](function(y) {
104
- const p = d;
105
- if (I)
106
- o.removeTempContainer(), w[p(221)](t[p(236)]);
67
+ }), b == A - 1 && (globalThis.hinnn.queue[i(358)](function(k) {
68
+ const s = i;
69
+ if (m) r.removeTempContainer(), v[s(349)](e[s(360)]);
107
70
  else {
108
- o.removeTempContainer();
109
- let s = t[p(204)] || "blob", r = w[p(172)](s);
110
- c[p(229)](r);
71
+ r[s(359)]();
72
+ let d = e[s(373)] || "blob", g = v.output(d);
73
+ p.resolve(g);
111
74
  }
112
- globalThis[p(171)][p(232)].clear();
113
- }), globalThis.hinnn.queue.run());
75
+ globalThis[s(363)].queue.clear();
76
+ }), globalThis[i(363)][i(322)][i(380)]());
114
77
  });
115
- } catch (h) {
116
- console[l(209)](l(175)), console[l(230)](h);
78
+ } catch (b) {
79
+ console[o(339)](o(357)), console[o(319)](b);
117
80
  }
118
81
  });
119
82
  }
120
- return c[x(210)]();
83
+ return p.promise();
121
84
  });
122
85
  };
123
- function M() {
124
- const n = ["870396MNVKbV", "type", "scale", "add", "paperHeight", "paperType", "error", "promise", "html", "layoutRowGap", `mm;"></div>
125
- </div>`, "hiprint-printPaper-small start-", "817870sRwNtd", "floor", "addClass", "panelLayoutOptions", "portrait", "cur", "save", "36393lfxVEX", "\u81EA\u5B9A\u4E49", "mm;height:", `<style>
126
- .hiprint-printPanel-small{
127
- box-sizing: border-box;
128
- border: 0px;
129
- }
130
- .hiprint-printPaper-small{
131
- position: relative;
132
- padding: 0;
133
- }
134
- .hiprint-printTemplate .hiprint-printPaper{
135
- display: flex;
136
- flex-wrap: wrap;
137
- flex-direction: column;
138
- align-content: flex-start;
139
- margin: -`, "mm ", `mm;
140
- }
141
- .hiprint-printTemplate .hiprint-printPanel-small {
142
- display:inline-block;
143
- padding: `, "printPanels", "resolve", "log", "465JYscVO", "queue", "paperWidth", "getContext", "1830570nhlfoR", "name", "isDownload", "length", "toLocaleLowerCase", "453RnbkRT", "extend", "824JuXcAV", ".hiprint-printPanel .hiprint-printPaper", "css", "createTempContainer", "hiprint-printPaper", "57762hBjdeZ", "row", "svg2canvas", "position:fixed", "addImage", '<div class="hiprint-printTemplate"></div>', "hinnn", "output", "height", "catch", "toPdf \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ", "layoutType", "mm -", `<div class="hiprint-printPanel">
144
- <div class="hiprint-printPaper" style="width:`, "width", "toPt", "now", "toDataURL", "indexOf", "21820PdnyNC", "11739024gYkaDO", `mm;
145
- }
146
- </style>`, ".pdf", "pixelRatio", "clone", "addPage", "append", "image/jpeg", "imageSmoothingEnabled", "dpr", "JPEG", "min", "layoutColumnGap", "then", "loadAllImages", "onProgress", ".hiprint-printPaper", "find"];
147
- return M = function() {
148
- return n;
149
- }, M();
86
+ function w(a, n) {
87
+ const t = q();
88
+ return w = function(x, r) {
89
+ return x = x - 318, t[x];
90
+ }, w(a, n);
91
+ }
92
+ function q() {
93
+ const a = ["save", "catch", "1270116jXYvDl", "10isvtQq", "134FXOcys", "find", "css", "imageSmoothingEnabled", "toPdf 失败(可能您的图片资源无法正常加载): ", "add", "removeTempContainer", "name", "floor", "sv-print-", "hinnn", "2913lJqTSb", ".pdf", "getContext", "indexOf", "scale", "7ephwfs", "loadAllImages", "2436640DEXpzD", "toPdf percent: ", "type", "4154787eMEquO", "string", "自定义", "cur", "11468BswBuP", "isDownload", "run", ".hiprint-printPanel .hiprint-printPaper", "printPanels", "then", "log", "JPEG", "getOrient", "queue", "toPt", "position:fixed", "createTempContainer", "pixelRatio", "length", "portrait", "#fff", "paperHeight", "svg2canvas", "toLocaleLowerCase", "width", "565334qhgZZz", "paperType", "onProgress", "html", "extend", "error", "Deferred", "183uXkDZV", "getTempContainer", "paperWidth", "now", "each", "dpr", "1480820qWimoZ", "height"];
94
+ return q = function() {
95
+ return a;
96
+ }, q();
150
97
  }
151
- (function(n, a) {
152
- for (var e = $, x = n(); []; )
98
+ function y() {
99
+ var a = ["2979GBpDqr", "add toPdf Api", "4575935rhWZqJ", "918DcynHl", "toPdf", "1523658KGpjTG", "defineProperty", "1531140yqUKYr", "46392ARDXSt", "230qAbAyB", "newPrintTemplate", "5242002lfWGRM", "2950684ipXaaP", "5TaYwDD", "0.3.0", "add toPdf Api to PrintTemplate", "176VhqARN"];
100
+ return y = function() {
101
+ return a;
102
+ }, y();
103
+ }
104
+ (function(a, n) {
105
+ for (var t = D, x = a(); ; )
153
106
  try {
154
- var o = parseInt(e(491)) / 1 * (-parseInt(e(490)) / 2) + parseInt(e(495)) / 3 + -parseInt(e(487)) / 4 + parseInt(e(484)) / 5 * (parseInt(e(494)) / 6) + -parseInt(e(493)) / 7 * (parseInt(e(488)) / 8) + -parseInt(e(497)) / 9 + parseInt(e(485)) / 10;
155
- if (o === a)
156
- break;
107
+ var r = -parseInt(t(324)) / 1 * (parseInt(t(316)) / 2) + -parseInt(t(329)) / 3 + -parseInt(t(319)) / 4 + -parseInt(t(320)) / 5 * (-parseInt(t(318)) / 6) + -parseInt(t(326)) / 7 + parseInt(t(315)) / 8 * (-parseInt(t(327)) / 9) + -parseInt(t(314)) / 10 * (-parseInt(t(323)) / 11);
108
+ if (r === n) break;
157
109
  x.push(x.shift());
158
- } catch (c) {
110
+ } catch (p) {
159
111
  x.push(x.shift());
160
112
  }
161
- })(k, 444814);
162
- function $(n, a) {
163
- var e = k();
164
- return $ = function(x, o) {
165
- x = x - 484;
166
- var c = e[x];
167
- return c;
168
- }, $(n, a);
169
- }
170
- function k() {
171
- var n = ["11800220KdCSqW", "add toPdf Api to PrintTemplate", "149712dcKDWM", "36112hbQYCs", "toPdf", "31846ymriPr", "23eWdTxC", "newPrintTemplate", "602uMlddO", "44490VKEqul", "1166520yrTloY", "add toPdf Api", "5859288JZXlPB", "215YCzUPc"];
172
- return k = function() {
173
- return n;
174
- }, k();
113
+ })(y, 490146);
114
+ function D(a, n) {
115
+ var t = y();
116
+ return D = function(x, r) {
117
+ x = x - 314;
118
+ var p = t[x];
119
+ return p;
120
+ }, D(a, n);
175
121
  }
176
- function X(n) {
177
- var a = $;
178
- return { name: a(496), description: a(496), hooks: [{ hook: a(492), name: a(486), description: a(486), priority: 1, run: ({ template: e, options: x }) => {
179
- var o = a;
180
- Object.defineProperty(e, o(489), { value: K, enumerable: ![], writable: !![], configurable: !![] });
181
- } }], leastHiprintVersion: "0.3.0" };
122
+ function M(a) {
123
+ var n = D;
124
+ return { name: n(325), description: "add toPdf Api", hooks: [{ hook: n(317), name: n(322), description: n(322), priority: 1, run: ({ template: t, options: x }) => {
125
+ var r = n;
126
+ Object[r(330)](t, r(328), { value: W, enumerable: !1, writable: !0, configurable: !0 });
127
+ } }], leastHiprintVersion: n(321) };
182
128
  }
183
129
  export {
184
- X as default
130
+ M as default
185
131
  };
package/dist/index.umd.js CHANGED
@@ -1,35 +1 @@
1
- (function(c,b){typeof exports=="object"&&typeof module!="undefined"?module.exports=b(require("@zumer/snapdom"),require("jspdf")):typeof define=="function"&&define.amd?define(["@zumer/snapdom","jspdf"],b):(c=typeof globalThis!="undefined"?globalThis:c||self,c.pluginApiPdf=b(c.snapdom,c.jspdf))})(this,function(c,b){"use strict";var H=(c,b,s)=>new Promise(($,u)=>{var g=a=>{try{T(s.next(a))}catch(t){u(t)}},P=a=>{try{T(s.throw(a))}catch(t){u(t)}},T=a=>a.done?$(a.value):Promise.resolve(a.value).then(g,P);T((s=s.apply(c,b)).next())});function s(a,t){const e=u();return s=function(x,l){return x=x-167,e[x]},s(a,t)}(function(a,t){const e=s,x=a();for(;[];)try{if(parseInt(e(215))/1+-parseInt(e(203))/2+-parseInt(e(240))/3*(parseInt(e(184))/4)+-parseInt(e(231))/5*(parseInt(e(247))/6)+-parseInt(e(222))/7*(-parseInt(e(242))/8)+parseInt(e(185))/9+parseInt(e(235))/10===t)break;x.push(x.shift())}catch(l){x.push(x.shift())}})(u,686546);const $=function(a,t,e){return H(this,null,function*(){const x=s;var l=this,v=globalThis.$.Deferred(),O=!![];let V=(I,w)=>{const h=s,i=Math[h(216)](I/w*100);console[h(230)](h(220),I,"total",w),console.log("toPdf percent: ",i+"%")},n=e||{};if(this[x(228)][x(238)]){if(typeof t=="string"){const d=t[x(183)](".pdf")>-1?t:t+".pdf";n[x(236)]=d}else n=t||{},!n[x(236)]&&(n.name="sv-print-"+Date[x(181)]()+x(187));let I=this[x(228)][0][x(179)],w=this[x(228)][0][x(173)];var z=globalThis.hinnn.mm[x(180)](n[x(233)]||I),A=globalThis[x(171)].mm[x(180)](n[x(207)]||w),_=globalThis.$[x(241)]({},n||{});const h=this.printPanels[0][x(208)],i=this.printPanels[0][x(218)],Y=i&&(i[x(212)]>0||i.layoutColumnGap>0),J=h!=null&&h!=""&&h!=x(223);var R=new b.jsPDF({orientation:this.getOrient(0)==1?x(219):"landscape",unit:"pt",format:J?h[x(239)]():[z,A]}),y=yield this.getHtml(a,n);n&&(n[x(188)]&&(_[x(194)]=n.pixelRatio,_[x(205)]=n[x(188)]),n[x(237)]!=null&&(O=n[x(237)]),n[x(200)]!=null&&(V=n[x(200)])),globalThis.$(y)[x(244)](x(179),"").css(x(173),""),this[x(245)]();var q=this.getTempContainer();if(Y&&n[x(233)]&&n.paperHeight){let d=Math[x(216)](n[x(233)]/(I+i.layoutRowGap/2)),m=Math.floor(n[x(207)]/(w+i[x(197)]/2));const C=d*m,f=y.find(".hiprint-printPanel .hiprint-printPaper"),N=f.length,o=Math.ceil(N/C);let p=globalThis.$(x(170));i[x(176)]==x(248)?p.append(`<style>
2
- .hiprint-printPanel-small{
3
- box-sizing: border-box;
4
- border: 0px;
5
- }
6
- .hiprint-printPaper-small{
7
- position: relative;
8
- padding: 0;
9
- }
10
- .hiprint-printTemplate .hiprint-printPaper{
11
- margin: -`+(Number(i[x(212)])||0)/2+x(177)+(Number(i[x(197)])||0)/2+x(227)+(Number(i[x(212)])||0)/2+x(226)+(Number(i.layoutColumnGap)||0)/2+`mm;
12
- }
13
- </style>`):p[x(191)](x(225)+(Number(i[x(212)])||0)/2+"mm -"+(Number(i[x(197)])||0)/2+x(227)+(Number(i.layoutRowGap)||0)/2+"mm "+(Number(i[x(197)])||0)/2+x(186));for(let r=0;r<o;r++){const j=globalThis.$(x(178)+n[x(233)]+x(224)+n.paperHeight+x(213)),D=r*C,K=Math[x(196)]((r+1)*C,N);for(let M=D;M<K;M++){const G=f.eq(M)[x(189)]();G.removeClass(x(246)),G[x(217)](x(214)+M);const E=globalThis.$('<div class="hiprint-printPanel-small"></div>');E[x(191)](G),j[x(202)](x(201)).append(E)}p[x(191)](j)}this[x(167)](p,_),q[x(211)](p[0]),globalThis.$(p)[x(244)](x(168))}else this[x(167)](y,_),q[x(211)](y[0]),globalThis.$(y)[x(244)](x(168));let k=q[x(202)](x(243))[x(238)];this[x(199)](y,function(){const d=x;try{q[d(202)](d(243)).each(function(m,C){const f=d;globalThis[f(171)][f(232)].add(function(N){const o=f;c.snapdom.toCanvas(C,_)[o(198)](function(p){const r=o;var j=p[r(234)]("2d");j[r(193)]=![];var D=p[r(182)](r(192),_.quality||.92);R[r(169)](D,r(195),0,0,z,A),m<k-1&&R[r(190)](),V(m+1,k),N()})[o(174)](p=>{throw new Error(p.message)})}),m==k-1&&(globalThis[f(171)].queue[f(206)](function(N){const o=f;if(O)l.removeTempContainer(),R[o(221)](n[o(236)]);else{l.removeTempContainer();let p=n[o(204)]||"blob",r=R[o(172)](p);v[o(229)](r)}globalThis[o(171)][o(232)].clear()}),globalThis.hinnn.queue.run())})}catch(m){console[d(209)](d(175)),console[d(230)](m)}})}return v[x(210)]()})};function u(){const a=["870396MNVKbV","type","scale","add","paperHeight","paperType","error","promise","html","layoutRowGap",`mm;"></div>
14
- </div>`,"hiprint-printPaper-small start-","817870sRwNtd","floor","addClass","panelLayoutOptions","portrait","cur","save","36393lfxVEX","\u81EA\u5B9A\u4E49","mm;height:",`<style>
15
- .hiprint-printPanel-small{
16
- box-sizing: border-box;
17
- border: 0px;
18
- }
19
- .hiprint-printPaper-small{
20
- position: relative;
21
- padding: 0;
22
- }
23
- .hiprint-printTemplate .hiprint-printPaper{
24
- display: flex;
25
- flex-wrap: wrap;
26
- flex-direction: column;
27
- align-content: flex-start;
28
- margin: -`,"mm ",`mm;
29
- }
30
- .hiprint-printTemplate .hiprint-printPanel-small {
31
- display:inline-block;
32
- padding: `,"printPanels","resolve","log","465JYscVO","queue","paperWidth","getContext","1830570nhlfoR","name","isDownload","length","toLocaleLowerCase","453RnbkRT","extend","824JuXcAV",".hiprint-printPanel .hiprint-printPaper","css","createTempContainer","hiprint-printPaper","57762hBjdeZ","row","svg2canvas","position:fixed","addImage",'<div class="hiprint-printTemplate"></div>',"hinnn","output","height","catch","toPdf \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ","layoutType","mm -",`<div class="hiprint-printPanel">
33
- <div class="hiprint-printPaper" style="width:`,"width","toPt","now","toDataURL","indexOf","21820PdnyNC","11739024gYkaDO",`mm;
34
- }
35
- </style>`,".pdf","pixelRatio","clone","addPage","append","image/jpeg","imageSmoothingEnabled","dpr","JPEG","min","layoutColumnGap","then","loadAllImages","onProgress",".hiprint-printPaper","find"];return u=function(){return a},u()}(function(a,t){for(var e=g,x=a();[];)try{var l=parseInt(e(491))/1*(-parseInt(e(490))/2)+parseInt(e(495))/3+-parseInt(e(487))/4+parseInt(e(484))/5*(parseInt(e(494))/6)+-parseInt(e(493))/7*(parseInt(e(488))/8)+-parseInt(e(497))/9+parseInt(e(485))/10;if(l===t)break;x.push(x.shift())}catch(v){x.push(x.shift())}})(P,444814);function g(a,t){var e=P();return g=function(x,l){x=x-484;var v=e[x];return v},g(a,t)}function P(){var a=["11800220KdCSqW","add toPdf Api to PrintTemplate","149712dcKDWM","36112hbQYCs","toPdf","31846ymriPr","23eWdTxC","newPrintTemplate","602uMlddO","44490VKEqul","1166520yrTloY","add toPdf Api","5859288JZXlPB","215YCzUPc"];return P=function(){return a},P()}function T(a){var t=g;return{name:t(496),description:t(496),hooks:[{hook:t(492),name:t(486),description:t(486),priority:1,run:({template:e,options:x})=>{var l=t;Object.defineProperty(e,l(489),{value:$,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:"0.3.0"}}return T});
1
+ (function(r,d){typeof exports=="object"&&typeof module!="undefined"?module.exports=d(require("@zumer/snapdom"),require("jspdf")):typeof define=="function"&&define.amd?define(["@zumer/snapdom","jspdf"],d):(r=typeof globalThis!="undefined"?globalThis:r||self,r.pluginApiPdf=d(r.window,r.jspdf))})(this,function(r,d){"use strict";var G=(r,d,l)=>new Promise((u,c)=>{var h=n=>{try{_(l.next(n))}catch(t){c(t)}},b=n=>{try{_(l.throw(n))}catch(t){c(t)}},_=n=>n.done?u(n.value):Promise.resolve(n.value).then(h,b);_((l=l.apply(r,d)).next())});(function(n,t){const x=u,e=n();for(;;)try{if(-parseInt(x(364))/1*(-parseInt(x(353))/2)+-parseInt(x(341))/3*(parseInt(x(378))/4)+parseInt(x(347))/5+parseInt(x(351))/6*(parseInt(x(369))/7)+parseInt(x(371))/8+-parseInt(x(374))/9+-parseInt(x(352))/10*(parseInt(x(334))/11)===t)break;e.push(e.shift())}catch(i){e.push(e.shift())}})(c,319677);const l=function(n,t,x){return G(this,null,function*(){const e=u;var i=this,m=globalThis.$[e(340)](),C=!0;let k=(D,j)=>{const f=e,g=Math[f(361)](D/j*100);console[f(319)](f(377),D,"total",j),console[f(319)](f(372),g+"%")},a=x||{};if(this[e(382)][e(327)]){if(typeof t===e(375)){const o=t[e(367)](e(365))>-1?t:t+e(365);a[e(360)]=o}else a=t||{},!a[e(360)]&&(a.name=e(362)+Date[e(344)]()+e(365));let D=this[e(382)][0][e(333)],j=this[e(382)][0][e(348)];const f=a[e(343)]&&a[e(330)];var R=globalThis[e(363)].mm[e(323)](a[e(343)]||D),X=globalThis.hinnn.mm[e(323)](a[e(330)]||j),I=globalThis.$[e(338)]({backgroundColor:e(329)},a||{});const g=this[e(382)][0][e(335)],O=g!=null&&g!=""&&g!=e(376),Z=this[e(321)](0)==1||f?e(328):"landscape",z=O&&!f?g[e(332)]():[R,X];var w=new d.jsPDF({orientation:Z,unit:"pt",format:z}),q=yield this.getHtml(n,a);a&&(a[e(326)]&&(I[e(346)]=a.pixelRatio,I[e(368)]=a[e(326)]),a[e(379)]!=null&&(C=a[e(379)]),a[e(336)]!=null&&(k=a[e(336)])),globalThis.$(q)[e(355)]("width","")[e(355)](e(348),""),this[e(325)]();var y=this[e(342)]();this[e(331)](q,I),y[e(337)](q[0]),globalThis.$(q)[e(355)](e(324));let A=y[e(354)](e(381)).length;this[e(370)](y,function(){const o=e;try{y[o(354)](o(381))[o(345)](function(T,B){const s=o;globalThis[s(363)][s(322)][s(358)](function(E){const p=s;r.snapdom.toCanvas(B,I)[p(318)](function(v){const P=p;var H=v[P(366)]("2d");H[P(356)]=!1;var W=v.toDataURL("image/jpeg",I.quality||.92);w.addImage(W,P(320),0,0,R,X),T<A-1&&w.addPage(),k(T+1,A),E()})[p(350)](v=>{throw new Error(v.message)})}),T==A-1&&(globalThis.hinnn.queue[s(358)](function(E){const p=s;if(C)i.removeTempContainer(),w[p(349)](a[p(360)]);else{i[p(359)]();let v=a[p(373)]||"blob",P=w.output(v);m.resolve(P)}globalThis[p(363)].queue.clear()}),globalThis[s(363)][s(322)][s(380)]())})}catch(T){console[o(339)](o(357)),console[o(319)](T)}})}return m.promise()})};function u(n,t){const x=c();return u=function(e,i){return e=e-318,x[e]},u(n,t)}function c(){const n=["save","catch","1270116jXYvDl","10isvtQq","134FXOcys","find","css","imageSmoothingEnabled","toPdf 失败(可能您的图片资源无法正常加载): ","add","removeTempContainer","name","floor","sv-print-","hinnn","2913lJqTSb",".pdf","getContext","indexOf","scale","7ephwfs","loadAllImages","2436640DEXpzD","toPdf percent: ","type","4154787eMEquO","string","自定义","cur","11468BswBuP","isDownload","run",".hiprint-printPanel .hiprint-printPaper","printPanels","then","log","JPEG","getOrient","queue","toPt","position:fixed","createTempContainer","pixelRatio","length","portrait","#fff","paperHeight","svg2canvas","toLocaleLowerCase","width","565334qhgZZz","paperType","onProgress","html","extend","error","Deferred","183uXkDZV","getTempContainer","paperWidth","now","each","dpr","1480820qWimoZ","height"];return c=function(){return n},c()}function h(){var n=["2979GBpDqr","add toPdf Api","4575935rhWZqJ","918DcynHl","toPdf","1523658KGpjTG","defineProperty","1531140yqUKYr","46392ARDXSt","230qAbAyB","newPrintTemplate","5242002lfWGRM","2950684ipXaaP","5TaYwDD","0.3.0","add toPdf Api to PrintTemplate","176VhqARN"];return h=function(){return n},h()}(function(n,t){for(var x=b,e=n();;)try{var i=-parseInt(x(324))/1*(parseInt(x(316))/2)+-parseInt(x(329))/3+-parseInt(x(319))/4+-parseInt(x(320))/5*(-parseInt(x(318))/6)+-parseInt(x(326))/7+parseInt(x(315))/8*(-parseInt(x(327))/9)+-parseInt(x(314))/10*(-parseInt(x(323))/11);if(i===t)break;e.push(e.shift())}catch(m){e.push(e.shift())}})(h,490146);function b(n,t){var x=h();return b=function(e,i){e=e-314;var m=x[e];return m},b(n,t)}function _(n){var t=b;return{name:t(325),description:"add toPdf Api",hooks:[{hook:t(317),name:t(322),description:t(322),priority:1,run:({template:x,options:e})=>{var i=t;Object[i(330)](x,i(328),{value:l,enumerable:!1,writable:!0,configurable:!0})}}],leastHiprintVersion:t(321)}}return _});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sv-print/plugin-api-pdf3",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "add pdf api to print template",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",