@univerjs-pro/print 1.0.0-alpha.1 → 1.0.0-alpha.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/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- function _0xe3d4(){const _0x3be0dd=['style','PRINT_CANVAS_CLASS','End','583zvVSvx','className','Module','innerHTML','PrintPaperMargin','PRINT_CONTAINER_CLASS','px;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','toStringTag','px\x20','1641774ZGHDSG','7145vBThfo','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@media\x20print\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','FitWidth','599988OZSLqa','6000mpQOXi','Origin','defineProperty','Narrow','Normal','5994096aovDMb','Custom','Start','FitPage','Middle','Portrait','PrintScale','Landscape','341001oZPJkO','\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','PrintAlign','PrintDirection','Wide','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','createElement','printing-canvas','232TKsgjc','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}',',\x20.','267407mIlZkM','360qlpAcs','createPrintStyle','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','1521600WVgafj','None','offline-printing-css','6QweZaY','FitHeight'];_0xe3d4=function(){return _0x3be0dd;};return _0xe3d4();}const _0x52c6ab=_0x47b9;(function(_0x28407d,_0x40d1ae){const _0x5008f3=_0x47b9,_0x120a67=_0x28407d();while(!![]){try{const _0xa4d60d=parseInt(_0x5008f3(0xfc))/0x1+parseInt(_0x5008f3(0xff))/0x2*(parseInt(_0x5008f3(0x10d))/0x3)+parseInt(_0x5008f3(0x117))/0x4+-parseInt(_0x5008f3(0x10e))/0x5*(parseInt(_0x5008f3(0x112))/0x6)+parseInt(_0x5008f3(0xf8))/0x7*(-parseInt(_0x5008f3(0xf5))/0x8)+-parseInt(_0x5008f3(0xed))/0x9*(-parseInt(_0x5008f3(0xf9))/0xa)+-parseInt(_0x5008f3(0x104))/0xb*(parseInt(_0x5008f3(0x111))/0xc);if(_0xa4d60d===_0x40d1ae)break;else _0x120a67['push'](_0x120a67['shift']());}catch(_0x5b9569){_0x120a67['push'](_0x120a67['shift']());}}}(_0xe3d4,0xccdd6),Object[_0x52c6ab(0x114)](exports,Symbol[_0x52c6ab(0x10b)],{'value':_0x52c6ab(0x106)}));let e=function(_0x2fdc40){const _0x11fdd4=_0x52c6ab;return _0x2fdc40[_0x11fdd4(0xea)]=_0x11fdd4(0xea),_0x2fdc40[_0x11fdd4(0xec)]=_0x11fdd4(0xec),_0x2fdc40;}({}),t=function(_0x4b661e){const _0x121087=_0x52c6ab;return _0x4b661e[_0x121087(0x113)]='Origin',_0x4b661e['FitWidth']=_0x121087(0x110),_0x4b661e[_0x121087(0x100)]='FitHeight',_0x4b661e[_0x121087(0xe8)]=_0x121087(0xe8),_0x4b661e[_0x121087(0x118)]='Custom',_0x4b661e;}({}),n=function(_0x3a6b64){const _0x1dc140=_0x52c6ab;return _0x3a6b64[_0x1dc140(0xe7)]='Start',_0x3a6b64[_0x1dc140(0x103)]=_0x1dc140(0x103),_0x3a6b64[_0x1dc140(0xe9)]='Middle',_0x3a6b64;}({}),r=function(_0x4f48d4){const _0xad291a=_0x52c6ab;return _0x4f48d4[_0xad291a(0x116)]='Normal',_0x4f48d4[_0xad291a(0x115)]=_0xad291a(0x115),_0x4f48d4[_0xad291a(0xf1)]=_0xad291a(0xf1),_0x4f48d4[_0xad291a(0xfd)]='None',_0x4f48d4[_0xad291a(0x118)]=_0xad291a(0x118),_0x4f48d4;}({});const i={'Normal':{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},'Narrow':{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},'Wide':{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},'None':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},'Custom':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},a='printing-canvas-container',o=_0x52c6ab(0xf4);function _0x47b9(_0x1f3645,_0x22c6e4){_0x1f3645=_0x1f3645-0xe7;const _0xe3d46f=_0xe3d4();let _0x47b9c1=_0xe3d46f[_0x1f3645];return _0x47b9c1;}function s(_0x1c3ddf,_0x368f9b,_0x24957e){const _0x4ae1dd=_0x52c6ab;let _0x1f043f=_0x24957e===_0x4ae1dd(0xea)?_0x1c3ddf:_0x368f9b,_0x416bdb=_0x24957e===_0x4ae1dd(0xea)?_0x368f9b:_0x1c3ddf,_0xe168de='\x0a\x20\x20\x20\x20.'+o+_0x4ae1dd(0x10f)+_0x1f043f+_0x4ae1dd(0x10c)+_0x416bdb+_0x4ae1dd(0x10a)+a+_0x4ae1dd(0xf7)+a+_0x4ae1dd(0xee)+o+_0x4ae1dd(0xfb)+_0x416bdb+_0x4ae1dd(0xf2)+_0x1f043f+_0x4ae1dd(0xf6),_0x24fe9b=document[_0x4ae1dd(0xf3)](_0x4ae1dd(0x101));return _0x24fe9b[_0x4ae1dd(0x107)]=_0xe168de,_0x24fe9b[_0x4ae1dd(0x105)]=_0x4ae1dd(0xfe),_0x24fe9b;}exports[_0x52c6ab(0x102)]=o,exports[_0x52c6ab(0x109)]=a,exports['PaperMarginMap']=i,exports[_0x52c6ab(0xef)]=n,exports[_0x52c6ab(0xf0)]=e,exports[_0x52c6ab(0x108)]=r,exports[_0x52c6ab(0xeb)]=t,exports[_0x52c6ab(0xfa)]=s;
1
+ const _0x40534b=_0x3d20;(function(_0x27f3e9,_0x19de86){const _0x2522cd=_0x3d20,_0x1d2162=_0x27f3e9();while(!![]){try{const _0x5b4fb1=parseInt(_0x2522cd(0x19f))/0x1+-parseInt(_0x2522cd(0x1b7))/0x2+-parseInt(_0x2522cd(0x1a7))/0x3+-parseInt(_0x2522cd(0x192))/0x4+-parseInt(_0x2522cd(0x199))/0x5*(parseInt(_0x2522cd(0x1a9))/0x6)+parseInt(_0x2522cd(0x193))/0x7*(-parseInt(_0x2522cd(0x1ac))/0x8)+-parseInt(_0x2522cd(0x1ad))/0x9*(-parseInt(_0x2522cd(0x1a2))/0xa);if(_0x5b4fb1===_0x19de86)break;else _0x1d2162['push'](_0x1d2162['shift']());}catch(_0x1f5b70){_0x1d2162['push'](_0x1d2162['shift']());}}}(_0x5003,0x7d31f),Object[_0x40534b(0x1ba)](exports,Symbol[_0x40534b(0x19d)],{'value':_0x40534b(0x196)}));let e=function(_0x53ee04){const _0x370cf4=_0x40534b;return _0x53ee04[_0x370cf4(0x198)]=_0x370cf4(0x198),_0x53ee04[_0x370cf4(0x1b4)]='Landscape',_0x53ee04;}({}),t=function(_0x3b668c){const _0x428e27=_0x40534b;return _0x3b668c['Origin']='Origin',_0x3b668c[_0x428e27(0x1b6)]=_0x428e27(0x1b6),_0x3b668c[_0x428e27(0x1b3)]=_0x428e27(0x1b3),_0x3b668c[_0x428e27(0x1ab)]=_0x428e27(0x1ab),_0x3b668c[_0x428e27(0x19a)]=_0x428e27(0x19a),_0x3b668c;}({}),n=function(_0x3c3fa5){const _0x4a8b1e=_0x40534b;return _0x3c3fa5['Start']='Start',_0x3c3fa5['End']=_0x4a8b1e(0x1b5),_0x3c3fa5['Middle']=_0x4a8b1e(0x1a4),_0x3c3fa5;}({}),r=function(_0x1cb5e6){const _0x29a6b1=_0x40534b;return _0x1cb5e6[_0x29a6b1(0x1b9)]=_0x29a6b1(0x1b9),_0x1cb5e6['Narrow']=_0x29a6b1(0x197),_0x1cb5e6[_0x29a6b1(0x1a8)]=_0x29a6b1(0x1a8),_0x1cb5e6[_0x29a6b1(0x194)]='None',_0x1cb5e6[_0x29a6b1(0x19a)]=_0x29a6b1(0x19a),_0x1cb5e6;}({});const i={'Normal':{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},'Narrow':{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},'Wide':{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},'None':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},'Custom':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},a='printing-canvas-container',o=_0x40534b(0x1af);function s(_0x2fff59,_0x4c65f2,_0x40bcf8){const _0x4b1a0b=_0x40534b;let _0x35973b=_0x40bcf8===_0x4b1a0b(0x198)?_0x2fff59:_0x4c65f2,_0x2461f0=_0x40bcf8===_0x4b1a0b(0x198)?_0x4c65f2:_0x2fff59,_0x53bc94='\x0a\x20\x20\x20\x20.'+o+_0x4b1a0b(0x1b1)+_0x35973b+'px\x20'+_0x2461f0+_0x4b1a0b(0x1b2)+a+_0x4b1a0b(0x1a6)+a+_0x4b1a0b(0x1aa)+o+_0x4b1a0b(0x1b0)+_0x2461f0+_0x4b1a0b(0x1a0)+_0x35973b+_0x4b1a0b(0x1b8),_0x85412=document[_0x4b1a0b(0x19e)](_0x4b1a0b(0x1ae));return _0x85412[_0x4b1a0b(0x19c)]=_0x53bc94,_0x85412[_0x4b1a0b(0x191)]=_0x4b1a0b(0x1a3),_0x85412;}function _0x3d20(_0x4ebeda,_0x34c44f){_0x4ebeda=_0x4ebeda-0x191;const _0x50032d=_0x5003();let _0x3d20dd=_0x50032d[_0x4ebeda];return _0x3d20dd;}exports[_0x40534b(0x19b)]=o,exports[_0x40534b(0x1a1)]=a,exports[_0x40534b(0x1bb)]=i,exports[_0x40534b(0x195)]=n,exports['PrintDirection']=e,exports['PrintPaperMargin']=r,exports[_0x40534b(0x1a5)]=t,exports['createPrintStyle']=s;function _0x5003(){const _0x9dc865=['PRINT_CANVAS_CLASS','innerHTML','toStringTag','createElement','303645LgzPac','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','PRINT_CONTAINER_CLASS','37525470mPUMtC','offline-printing-css','Middle','PrintScale',',\x20.','3040785UUGYQf','Wide','68382HorZUO','\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','FitPage','416472aNaxbP','9QWEFyp','style','printing-canvas','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@media\x20print\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','px;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','FitHeight','Landscape','End','FitWidth','1179530gQuluJ','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}','Normal','defineProperty','PaperMarginMap','className','2311604EWEMYb','105IeMgmJ','None','PrintAlign','Module','Narrow','Portrait','255ElxUdk','Custom'];_0x5003=function(){return _0x9dc865;};return _0x5003();}
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x20f4f1=_0x218f;(function(_0x180259,_0x4ceb2f){const _0x499cc0=_0x218f,_0x2fb154=_0x180259();while(!![]){try{const _0x141d85=-parseInt(_0x499cc0(0x1b6))/0x1*(parseInt(_0x499cc0(0x1c1))/0x2)+parseInt(_0x499cc0(0x1af))/0x3*(-parseInt(_0x499cc0(0x1ae))/0x4)+parseInt(_0x499cc0(0x1c2))/0x5*(parseInt(_0x499cc0(0x1a3))/0x6)+-parseInt(_0x499cc0(0x1b7))/0x7+-parseInt(_0x499cc0(0x1bf))/0x8+-parseInt(_0x499cc0(0x1a6))/0x9*(-parseInt(_0x499cc0(0x1a5))/0xa)+parseInt(_0x499cc0(0x1b2))/0xb;if(_0x141d85===_0x4ceb2f)break;else _0x2fb154['push'](_0x2fb154['shift']());}catch(_0x3e90cb){_0x2fb154['push'](_0x2fb154['shift']());}}}(_0x4132,0xf3afd));let e=function(_0x87eea8){const _0x2489df=_0x218f;return _0x87eea8[_0x2489df(0x1bb)]='Portrait',_0x87eea8[_0x2489df(0x1ba)]='Landscape',_0x87eea8;}({}),t=function(_0x4dd7c7){const _0x5d4bec=_0x218f;return _0x4dd7c7[_0x5d4bec(0x1bc)]=_0x5d4bec(0x1bc),_0x4dd7c7[_0x5d4bec(0x1a2)]='FitWidth',_0x4dd7c7['FitHeight']=_0x5d4bec(0x1b3),_0x4dd7c7[_0x5d4bec(0x1bd)]=_0x5d4bec(0x1bd),_0x4dd7c7['Custom']='Custom',_0x4dd7c7;}({}),n=function(_0x17d8ed){const _0x39f197=_0x218f;return _0x17d8ed['Start']=_0x39f197(0x1b4),_0x17d8ed['End']=_0x39f197(0x1c0),_0x17d8ed[_0x39f197(0x1a9)]=_0x39f197(0x1a9),_0x17d8ed;}({}),r=function(_0xa4c55a){const _0x149189=_0x218f;return _0xa4c55a[_0x149189(0x1be)]=_0x149189(0x1be),_0xa4c55a[_0x149189(0x1b9)]=_0x149189(0x1b9),_0xa4c55a['Wide']=_0x149189(0x1a4),_0xa4c55a[_0x149189(0x1b1)]=_0x149189(0x1b1),_0xa4c55a[_0x149189(0x1b8)]='Custom',_0xa4c55a;}({});const i={'Normal':{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},'Narrow':{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},'Wide':{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},'None':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},'Custom':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},a=_0x20f4f1(0x1ad),o=_0x20f4f1(0x1b5);function _0x4132(){const _0x4c273c=['Start','printing-canvas','9014ETyqIn','1848819vVGiMZ','Custom','Narrow','Landscape','Portrait','Origin','FitPage','Normal','10772032mLQKTj','End','298RzguzQ','3695xcJraK','px;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','FitWidth','12486kTPyli','Wide','45830DFoWyW','3402yuFvTj','style','innerHTML','Middle','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','className','px\x20','printing-canvas-container','3140584qhtuIv','3QbgZbt','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}','None','16134371xYJHUq','FitHeight'];_0x4132=function(){return _0x4c273c;};return _0x4132();}function _0x218f(_0x301b47,_0x7b8b94){_0x301b47=_0x301b47-0x1a1;const _0x4132dc=_0x4132();let _0x218f93=_0x4132dc[_0x301b47];return _0x218f93;}function s(_0x388dde,_0x5b1cbd,_0x5f47d6){const _0x5132f1=_0x20f4f1;let _0x4dd5e8=_0x5f47d6===_0x5132f1(0x1bb)?_0x388dde:_0x5b1cbd,_0x352fc2=_0x5f47d6==='Portrait'?_0x5b1cbd:_0x388dde,_0x77f566='\x0a\x20\x20\x20\x20.'+o+'\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@media\x20print\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20size:\x20'+_0x4dd5e8+_0x5132f1(0x1ac)+_0x352fc2+_0x5132f1(0x1a1)+a+',\x20.'+a+'\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.'+o+_0x5132f1(0x1aa)+_0x352fc2+'px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20'+_0x4dd5e8+_0x5132f1(0x1b0),_0xeaab11=document['createElement'](_0x5132f1(0x1a7));return _0xeaab11[_0x5132f1(0x1a8)]=_0x77f566,_0xeaab11[_0x5132f1(0x1ab)]='offline-printing-css',_0xeaab11;}export{o as PRINT_CANVAS_CLASS,a as PRINT_CONTAINER_CLASS,i as PaperMarginMap,n as PrintAlign,e as PrintDirection,r as PrintPaperMargin,t as PrintScale,s as createPrintStyle};
1
+ function _0x32b2(_0x2549e9,_0x9f5a05){_0x2549e9=_0x2549e9-0x1e4;const _0x2268ff=_0x2268();let _0x32b233=_0x2268ff[_0x2549e9];return _0x32b233;}const _0x1ecb4f=_0x32b2;(function(_0x45aefe,_0xd91787){const _0x3c6e14=_0x32b2,_0x5a45b9=_0x45aefe();while(!![]){try{const _0x287a5a=parseInt(_0x3c6e14(0x1f1))/0x1+parseInt(_0x3c6e14(0x1fa))/0x2*(parseInt(_0x3c6e14(0x1ed))/0x3)+parseInt(_0x3c6e14(0x1ff))/0x4+parseInt(_0x3c6e14(0x201))/0x5*(parseInt(_0x3c6e14(0x1ec))/0x6)+parseInt(_0x3c6e14(0x1e9))/0x7*(parseInt(_0x3c6e14(0x1ef))/0x8)+parseInt(_0x3c6e14(0x1f4))/0x9+-parseInt(_0x3c6e14(0x1f7))/0xa*(parseInt(_0x3c6e14(0x1f9))/0xb);if(_0x287a5a===_0xd91787)break;else _0x5a45b9['push'](_0x5a45b9['shift']());}catch(_0x17ec34){_0x5a45b9['push'](_0x5a45b9['shift']());}}}(_0x2268,0x857ba));let e=function(_0x206ea3){const _0x1894df=_0x32b2;return _0x206ea3[_0x1894df(0x200)]=_0x1894df(0x200),_0x206ea3[_0x1894df(0x1f0)]=_0x1894df(0x1f0),_0x206ea3;}({}),t=function(_0x106d83){const _0x33530e=_0x32b2;return _0x106d83[_0x33530e(0x1eb)]='Origin',_0x106d83['FitWidth']='FitWidth',_0x106d83[_0x33530e(0x204)]=_0x33530e(0x204),_0x106d83[_0x33530e(0x203)]='FitPage',_0x106d83[_0x33530e(0x1f5)]=_0x33530e(0x1f5),_0x106d83;}({}),n=function(_0x445dd5){const _0x3d5a4e=_0x32b2;return _0x445dd5[_0x3d5a4e(0x1e5)]=_0x3d5a4e(0x1e5),_0x445dd5[_0x3d5a4e(0x202)]='End',_0x445dd5[_0x3d5a4e(0x1f3)]=_0x3d5a4e(0x1f3),_0x445dd5;}({}),r=function(_0x535054){const _0x59e9a4=_0x32b2;return _0x535054['Normal']=_0x59e9a4(0x1fe),_0x535054[_0x59e9a4(0x1e6)]=_0x59e9a4(0x1e6),_0x535054[_0x59e9a4(0x207)]=_0x59e9a4(0x207),_0x535054[_0x59e9a4(0x1f6)]=_0x59e9a4(0x1f6),_0x535054[_0x59e9a4(0x1f5)]=_0x59e9a4(0x1f5),_0x535054;}({});const i={'Normal':{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},'Narrow':{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},'Wide':{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},'None':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},'Custom':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},a='printing-canvas-container',o=_0x1ecb4f(0x1e4);function s(_0x300f3d,_0x23b50c,_0x28cf04){const _0x2043ee=_0x1ecb4f;let _0x3b9e89=_0x28cf04===_0x2043ee(0x200)?_0x300f3d:_0x23b50c,_0x423b81=_0x28cf04===_0x2043ee(0x200)?_0x23b50c:_0x300f3d,_0x3466e9=_0x2043ee(0x1f2)+o+_0x2043ee(0x205)+_0x3b9e89+_0x2043ee(0x1fd)+_0x423b81+_0x2043ee(0x1ea)+a+_0x2043ee(0x206)+a+_0x2043ee(0x1f8)+o+'\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20'+_0x423b81+_0x2043ee(0x1ee)+_0x3b9e89+'px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}',_0x10384c=document[_0x2043ee(0x1fc)]('style');return _0x10384c[_0x2043ee(0x1e7)]=_0x3466e9,_0x10384c[_0x2043ee(0x1e8)]=_0x2043ee(0x1fb),_0x10384c;}function _0x2268(){const _0x33d2e7=['px\x20','Normal','893676WRTkIx','Portrait','5bcUKmI','End','FitPage','FitHeight','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@media\x20print\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20size:\x20',',\x20.','Wide','printing-canvas','Start','Narrow','innerHTML','className','18417KNCWaR','px;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','Origin','5050680ufvyYW','3izJZQk','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','1096VDVtOl','Landscape','774492wMcAMP','\x0a\x20\x20\x20\x20.','Middle','6031008IBVulx','Custom','None','2205250hXDFBd','\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','154gvSsse','1527692CkSfso','offline-printing-css','createElement'];_0x2268=function(){return _0x33d2e7;};return _0x2268();}export{o as PRINT_CANVAS_CLASS,a as PRINT_CONTAINER_CLASS,i as PaperMarginMap,n as PrintAlign,e as PrintDirection,r as PrintPaperMargin,t as PrintScale,s as createPrintStyle};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x20f4f1=_0x218f;(function(_0x180259,_0x4ceb2f){const _0x499cc0=_0x218f,_0x2fb154=_0x180259();while(!![]){try{const _0x141d85=-parseInt(_0x499cc0(0x1b6))/0x1*(parseInt(_0x499cc0(0x1c1))/0x2)+parseInt(_0x499cc0(0x1af))/0x3*(-parseInt(_0x499cc0(0x1ae))/0x4)+parseInt(_0x499cc0(0x1c2))/0x5*(parseInt(_0x499cc0(0x1a3))/0x6)+-parseInt(_0x499cc0(0x1b7))/0x7+-parseInt(_0x499cc0(0x1bf))/0x8+-parseInt(_0x499cc0(0x1a6))/0x9*(-parseInt(_0x499cc0(0x1a5))/0xa)+parseInt(_0x499cc0(0x1b2))/0xb;if(_0x141d85===_0x4ceb2f)break;else _0x2fb154['push'](_0x2fb154['shift']());}catch(_0x3e90cb){_0x2fb154['push'](_0x2fb154['shift']());}}}(_0x4132,0xf3afd));let e=function(_0x87eea8){const _0x2489df=_0x218f;return _0x87eea8[_0x2489df(0x1bb)]='Portrait',_0x87eea8[_0x2489df(0x1ba)]='Landscape',_0x87eea8;}({}),t=function(_0x4dd7c7){const _0x5d4bec=_0x218f;return _0x4dd7c7[_0x5d4bec(0x1bc)]=_0x5d4bec(0x1bc),_0x4dd7c7[_0x5d4bec(0x1a2)]='FitWidth',_0x4dd7c7['FitHeight']=_0x5d4bec(0x1b3),_0x4dd7c7[_0x5d4bec(0x1bd)]=_0x5d4bec(0x1bd),_0x4dd7c7['Custom']='Custom',_0x4dd7c7;}({}),n=function(_0x17d8ed){const _0x39f197=_0x218f;return _0x17d8ed['Start']=_0x39f197(0x1b4),_0x17d8ed['End']=_0x39f197(0x1c0),_0x17d8ed[_0x39f197(0x1a9)]=_0x39f197(0x1a9),_0x17d8ed;}({}),r=function(_0xa4c55a){const _0x149189=_0x218f;return _0xa4c55a[_0x149189(0x1be)]=_0x149189(0x1be),_0xa4c55a[_0x149189(0x1b9)]=_0x149189(0x1b9),_0xa4c55a['Wide']=_0x149189(0x1a4),_0xa4c55a[_0x149189(0x1b1)]=_0x149189(0x1b1),_0xa4c55a[_0x149189(0x1b8)]='Custom',_0xa4c55a;}({});const i={'Normal':{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},'Narrow':{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},'Wide':{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},'None':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},'Custom':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},a=_0x20f4f1(0x1ad),o=_0x20f4f1(0x1b5);function _0x4132(){const _0x4c273c=['Start','printing-canvas','9014ETyqIn','1848819vVGiMZ','Custom','Narrow','Landscape','Portrait','Origin','FitPage','Normal','10772032mLQKTj','End','298RzguzQ','3695xcJraK','px;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','FitWidth','12486kTPyli','Wide','45830DFoWyW','3402yuFvTj','style','innerHTML','Middle','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','className','px\x20','printing-canvas-container','3140584qhtuIv','3QbgZbt','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}','None','16134371xYJHUq','FitHeight'];_0x4132=function(){return _0x4c273c;};return _0x4132();}function _0x218f(_0x301b47,_0x7b8b94){_0x301b47=_0x301b47-0x1a1;const _0x4132dc=_0x4132();let _0x218f93=_0x4132dc[_0x301b47];return _0x218f93;}function s(_0x388dde,_0x5b1cbd,_0x5f47d6){const _0x5132f1=_0x20f4f1;let _0x4dd5e8=_0x5f47d6===_0x5132f1(0x1bb)?_0x388dde:_0x5b1cbd,_0x352fc2=_0x5f47d6==='Portrait'?_0x5b1cbd:_0x388dde,_0x77f566='\x0a\x20\x20\x20\x20.'+o+'\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@media\x20print\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20size:\x20'+_0x4dd5e8+_0x5132f1(0x1ac)+_0x352fc2+_0x5132f1(0x1a1)+a+',\x20.'+a+'\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.'+o+_0x5132f1(0x1aa)+_0x352fc2+'px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20'+_0x4dd5e8+_0x5132f1(0x1b0),_0xeaab11=document['createElement'](_0x5132f1(0x1a7));return _0xeaab11[_0x5132f1(0x1a8)]=_0x77f566,_0xeaab11[_0x5132f1(0x1ab)]='offline-printing-css',_0xeaab11;}export{o as PRINT_CANVAS_CLASS,a as PRINT_CONTAINER_CLASS,i as PaperMarginMap,n as PrintAlign,e as PrintDirection,r as PrintPaperMargin,t as PrintScale,s as createPrintStyle};
1
+ function _0x32b2(_0x2549e9,_0x9f5a05){_0x2549e9=_0x2549e9-0x1e4;const _0x2268ff=_0x2268();let _0x32b233=_0x2268ff[_0x2549e9];return _0x32b233;}const _0x1ecb4f=_0x32b2;(function(_0x45aefe,_0xd91787){const _0x3c6e14=_0x32b2,_0x5a45b9=_0x45aefe();while(!![]){try{const _0x287a5a=parseInt(_0x3c6e14(0x1f1))/0x1+parseInt(_0x3c6e14(0x1fa))/0x2*(parseInt(_0x3c6e14(0x1ed))/0x3)+parseInt(_0x3c6e14(0x1ff))/0x4+parseInt(_0x3c6e14(0x201))/0x5*(parseInt(_0x3c6e14(0x1ec))/0x6)+parseInt(_0x3c6e14(0x1e9))/0x7*(parseInt(_0x3c6e14(0x1ef))/0x8)+parseInt(_0x3c6e14(0x1f4))/0x9+-parseInt(_0x3c6e14(0x1f7))/0xa*(parseInt(_0x3c6e14(0x1f9))/0xb);if(_0x287a5a===_0xd91787)break;else _0x5a45b9['push'](_0x5a45b9['shift']());}catch(_0x17ec34){_0x5a45b9['push'](_0x5a45b9['shift']());}}}(_0x2268,0x857ba));let e=function(_0x206ea3){const _0x1894df=_0x32b2;return _0x206ea3[_0x1894df(0x200)]=_0x1894df(0x200),_0x206ea3[_0x1894df(0x1f0)]=_0x1894df(0x1f0),_0x206ea3;}({}),t=function(_0x106d83){const _0x33530e=_0x32b2;return _0x106d83[_0x33530e(0x1eb)]='Origin',_0x106d83['FitWidth']='FitWidth',_0x106d83[_0x33530e(0x204)]=_0x33530e(0x204),_0x106d83[_0x33530e(0x203)]='FitPage',_0x106d83[_0x33530e(0x1f5)]=_0x33530e(0x1f5),_0x106d83;}({}),n=function(_0x445dd5){const _0x3d5a4e=_0x32b2;return _0x445dd5[_0x3d5a4e(0x1e5)]=_0x3d5a4e(0x1e5),_0x445dd5[_0x3d5a4e(0x202)]='End',_0x445dd5[_0x3d5a4e(0x1f3)]=_0x3d5a4e(0x1f3),_0x445dd5;}({}),r=function(_0x535054){const _0x59e9a4=_0x32b2;return _0x535054['Normal']=_0x59e9a4(0x1fe),_0x535054[_0x59e9a4(0x1e6)]=_0x59e9a4(0x1e6),_0x535054[_0x59e9a4(0x207)]=_0x59e9a4(0x207),_0x535054[_0x59e9a4(0x1f6)]=_0x59e9a4(0x1f6),_0x535054[_0x59e9a4(0x1f5)]=_0x59e9a4(0x1f5),_0x535054;}({});const i={'Normal':{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},'Narrow':{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},'Wide':{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},'None':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},'Custom':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},a='printing-canvas-container',o=_0x1ecb4f(0x1e4);function s(_0x300f3d,_0x23b50c,_0x28cf04){const _0x2043ee=_0x1ecb4f;let _0x3b9e89=_0x28cf04===_0x2043ee(0x200)?_0x300f3d:_0x23b50c,_0x423b81=_0x28cf04===_0x2043ee(0x200)?_0x23b50c:_0x300f3d,_0x3466e9=_0x2043ee(0x1f2)+o+_0x2043ee(0x205)+_0x3b9e89+_0x2043ee(0x1fd)+_0x423b81+_0x2043ee(0x1ea)+a+_0x2043ee(0x206)+a+_0x2043ee(0x1f8)+o+'\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20'+_0x423b81+_0x2043ee(0x1ee)+_0x3b9e89+'px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}',_0x10384c=document[_0x2043ee(0x1fc)]('style');return _0x10384c[_0x2043ee(0x1e7)]=_0x3466e9,_0x10384c[_0x2043ee(0x1e8)]=_0x2043ee(0x1fb),_0x10384c;}function _0x2268(){const _0x33d2e7=['px\x20','Normal','893676WRTkIx','Portrait','5bcUKmI','End','FitPage','FitHeight','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@media\x20print\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20size:\x20',',\x20.','Wide','printing-canvas','Start','Narrow','innerHTML','className','18417KNCWaR','px;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','Origin','5050680ufvyYW','3izJZQk','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','1096VDVtOl','Landscape','774492wMcAMP','\x0a\x20\x20\x20\x20.','Middle','6031008IBVulx','Custom','None','2205250hXDFBd','\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','154gvSsse','1527692CkSfso','offline-printing-css','createElement'];_0x2268=function(){return _0x33d2e7;};return _0x2268();}export{o as PRINT_CANVAS_CLASS,a as PRINT_CONTAINER_CLASS,i as PaperMarginMap,n as PrintAlign,e as PrintDirection,r as PrintPaperMargin,t as PrintScale,s as createPrintStyle};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1ea7(_0x5e8fc0,_0x5ba1a8){_0x5e8fc0=_0x5e8fc0-0x9e;const _0x23f424=_0x23f4();let _0x1ea77c=_0x23f424[_0x5e8fc0];return _0x1ea77c;}(function(_0x3c49cd,_0x2481b4){const _0x3aea21=_0x1ea7,_0x4aca3e=_0x3c49cd();while(!![]){try{const _0x5eaac7=parseInt(_0x3aea21(0xb4))/0x1+-parseInt(_0x3aea21(0xc1))/0x2*(parseInt(_0x3aea21(0xc5))/0x3)+-parseInt(_0x3aea21(0xbc))/0x4+parseInt(_0x3aea21(0xb3))/0x5+parseInt(_0x3aea21(0xc3))/0x6+parseInt(_0x3aea21(0xb7))/0x7+-parseInt(_0x3aea21(0x9e))/0x8;if(_0x5eaac7===_0x2481b4)break;else _0x4aca3e['push'](_0x4aca3e['shift']());}catch(_0x6160d6){_0x4aca3e['push'](_0x4aca3e['shift']());}}}(_0x23f4,0x4b7b3),function(_0x16a93b,_0x4053cd){const _0x9cc85c=_0x1ea7;typeof exports==_0x9cc85c(0xcc)&&typeof module<'u'?_0x4053cd(exports):typeof define==_0x9cc85c(0xbe)&&define[_0x9cc85c(0xa4)]?define([_0x9cc85c(0xac)],_0x4053cd):(_0x16a93b=typeof globalThis<'u'?globalThis:_0x16a93b||self,_0x4053cd(_0x16a93b[_0x9cc85c(0x9f)]={}));}(this,function(_0x28cb5b){const _0x3e805c=_0x1ea7;Object[_0x3e805c(0xaf)](_0x28cb5b,Symbol[_0x3e805c(0xc4)],{'value':_0x3e805c(0xba)});let _0x177eb9=function(_0x12b4cb){const _0x8b0d30=_0x3e805c;return _0x12b4cb[_0x8b0d30(0xa3)]='Portrait',_0x12b4cb[_0x8b0d30(0xc7)]=_0x8b0d30(0xc7),_0x12b4cb;}({}),_0x1d8e81=function(_0x502586){const _0x4ede08=_0x3e805c;return _0x502586['Origin']=_0x4ede08(0xbb),_0x502586[_0x4ede08(0xcd)]=_0x4ede08(0xcd),_0x502586[_0x4ede08(0xb8)]=_0x4ede08(0xb8),_0x502586[_0x4ede08(0xb9)]=_0x4ede08(0xb9),_0x502586[_0x4ede08(0xb0)]='Custom',_0x502586;}({}),_0x17ad25=function(_0xeb9e66){const _0x2cbf3c=_0x3e805c;return _0xeb9e66['Start']='Start',_0xeb9e66[_0x2cbf3c(0xa8)]=_0x2cbf3c(0xa8),_0xeb9e66['Middle']=_0x2cbf3c(0xc8),_0xeb9e66;}({}),_0x35b8f3=function(_0x5bf4d2){const _0xf1d282=_0x3e805c;return _0x5bf4d2[_0xf1d282(0xc2)]=_0xf1d282(0xc2),_0x5bf4d2[_0xf1d282(0xc0)]='Narrow',_0x5bf4d2[_0xf1d282(0xb2)]=_0xf1d282(0xb2),_0x5bf4d2[_0xf1d282(0xa1)]=_0xf1d282(0xa1),_0x5bf4d2['Custom']=_0xf1d282(0xb0),_0x5bf4d2;}({}),_0x2d148e={'Normal':{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},'Narrow':{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},'Wide':{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},'None':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},'Custom':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},_0x4851e8='printing-canvas-container',_0xbda53e=_0x3e805c(0xb1);function _0x4e55fb(_0x3c58d7,_0x4cc40f,_0x3a2e6c){const _0x1b636d=_0x3e805c;let _0x3b2b01=_0x3a2e6c==='Portrait'?_0x3c58d7:_0x4cc40f,_0x10240e=_0x3a2e6c===_0x1b636d(0xa3)?_0x4cc40f:_0x3c58d7,_0x84e44=_0x1b636d(0xbd)+_0xbda53e+_0x1b636d(0xa9)+_0x3b2b01+_0x1b636d(0xad)+_0x10240e+_0x1b636d(0xc9)+_0x4851e8+',\x20.'+_0x4851e8+_0x1b636d(0xc6)+_0xbda53e+'\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20'+_0x10240e+_0x1b636d(0xa7)+_0x3b2b01+_0x1b636d(0xb5),_0x280902=document['createElement']('style');return _0x280902[_0x1b636d(0xcb)]=_0x84e44,_0x280902[_0x1b636d(0xae)]=_0x1b636d(0xca),_0x280902;}_0x28cb5b[_0x3e805c(0xab)]=_0xbda53e,_0x28cb5b[_0x3e805c(0xbf)]=_0x4851e8,_0x28cb5b[_0x3e805c(0xa6)]=_0x2d148e,_0x28cb5b[_0x3e805c(0xa0)]=_0x17ad25,_0x28cb5b[_0x3e805c(0xb6)]=_0x177eb9,_0x28cb5b[_0x3e805c(0xa2)]=_0x35b8f3,_0x28cb5b[_0x3e805c(0xaa)]=_0x1d8e81,_0x28cb5b[_0x3e805c(0xa5)]=_0x4e55fb;}));function _0x23f4(){const _0x55f0b2=['function','PRINT_CONTAINER_CLASS','Narrow','58cDfbkI','Normal','3512844ENReeB','toStringTag','53253rlunHR','\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','Landscape','Middle','px;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','offline-printing-css','innerHTML','object','FitWidth','7406328xLaTId','UniverProPrint','PrintAlign','None','PrintPaperMargin','Portrait','amd','createPrintStyle','PaperMarginMap','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','End','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@media\x20print\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','PrintScale','PRINT_CANVAS_CLASS','exports','px\x20','className','defineProperty','Custom','printing-canvas','Wide','2753935YmabSA','585569YXUjVc','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}','PrintDirection','1028958qxEjEt','FitHeight','FitPage','Module','Origin','476332JAqKOJ','\x0a\x20\x20\x20\x20.'];_0x23f4=function(){return _0x55f0b2;};return _0x23f4();}
1
+ (function(_0x4d02d5,_0x343d88){const _0x31de97=_0x73c4,_0x38e18e=_0x4d02d5();while(!![]){try{const _0x43e7a2=parseInt(_0x31de97(0x203))/0x1+parseInt(_0x31de97(0x1e7))/0x2*(-parseInt(_0x31de97(0x205))/0x3)+parseInt(_0x31de97(0x1fb))/0x4*(-parseInt(_0x31de97(0x1f1))/0x5)+-parseInt(_0x31de97(0x1e3))/0x6+parseInt(_0x31de97(0x1ed))/0x7+parseInt(_0x31de97(0x1f6))/0x8*(parseInt(_0x31de97(0x1e4))/0x9)+parseInt(_0x31de97(0x1ff))/0xa;if(_0x43e7a2===_0x343d88)break;else _0x38e18e['push'](_0x38e18e['shift']());}catch(_0x22017b){_0x38e18e['push'](_0x38e18e['shift']());}}}(_0x306f,0x6cad0),function(_0x768bdf,_0x57d916){const _0x41651f=_0x73c4;typeof exports==_0x41651f(0x1ee)&&typeof module<'u'?_0x57d916(exports):typeof define==_0x41651f(0x1f9)&&define[_0x41651f(0x209)]?define([_0x41651f(0x1e0)],_0x57d916):(_0x768bdf=typeof globalThis<'u'?globalThis:_0x768bdf||self,_0x57d916(_0x768bdf['UniverProPrint']={}));}(this,function(_0x1b47dd){const _0x22a1fb=_0x73c4;Object[_0x22a1fb(0x1eb)](_0x1b47dd,Symbol[_0x22a1fb(0x1fd)],{'value':_0x22a1fb(0x1e8)});let _0x3a9410=function(_0x410ff1){const _0x285845=_0x22a1fb;return _0x410ff1[_0x285845(0x1f7)]=_0x285845(0x1f7),_0x410ff1['Landscape']=_0x285845(0x1ec),_0x410ff1;}({}),_0xc71d33=function(_0x52a903){const _0x370e02=_0x22a1fb;return _0x52a903[_0x370e02(0x1df)]=_0x370e02(0x1df),_0x52a903[_0x370e02(0x1e9)]='FitWidth',_0x52a903[_0x370e02(0x1f2)]=_0x370e02(0x1f2),_0x52a903[_0x370e02(0x207)]='FitPage',_0x52a903[_0x370e02(0x1ea)]=_0x370e02(0x1ea),_0x52a903;}({}),_0x48b1c1=function(_0x14ee4e){const _0x45e48d=_0x22a1fb;return _0x14ee4e[_0x45e48d(0x1fa)]=_0x45e48d(0x1fa),_0x14ee4e['End']='End',_0x14ee4e['Middle']=_0x45e48d(0x201),_0x14ee4e;}({}),_0x190a5f=function(_0x11a2ed){const _0x1b9b53=_0x22a1fb;return _0x11a2ed[_0x1b9b53(0x204)]=_0x1b9b53(0x204),_0x11a2ed[_0x1b9b53(0x1f4)]='Narrow',_0x11a2ed[_0x1b9b53(0x1f3)]=_0x1b9b53(0x1f3),_0x11a2ed[_0x1b9b53(0x1f0)]=_0x1b9b53(0x1f0),_0x11a2ed[_0x1b9b53(0x1ea)]=_0x1b9b53(0x1ea),_0x11a2ed;}({}),_0x5a2989={'Normal':{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},'Narrow':{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},'Wide':{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},'None':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},'Custom':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},_0x5d9617='printing-canvas-container',_0x2a2429=_0x22a1fb(0x1ef);function _0x3163cc(_0x3375d4,_0x4ab40d,_0x1507e7){const _0x3a641f=_0x22a1fb;let _0x495746=_0x1507e7===_0x3a641f(0x1f7)?_0x3375d4:_0x4ab40d,_0x5905df=_0x1507e7==='Portrait'?_0x4ab40d:_0x3375d4,_0x490ab1=_0x3a641f(0x1e5)+_0x2a2429+'\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@media\x20print\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20size:\x20'+_0x495746+_0x3a641f(0x1e1)+_0x5905df+_0x3a641f(0x1f5)+_0x5d9617+_0x3a641f(0x206)+_0x5d9617+'\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.'+_0x2a2429+'\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20'+_0x5905df+_0x3a641f(0x200)+_0x495746+'px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}',_0x438fbb=document['createElement'](_0x3a641f(0x20a));return _0x438fbb[_0x3a641f(0x1fe)]=_0x490ab1,_0x438fbb[_0x3a641f(0x1fc)]=_0x3a641f(0x1f8),_0x438fbb;}_0x1b47dd['PRINT_CANVAS_CLASS']=_0x2a2429,_0x1b47dd[_0x22a1fb(0x202)]=_0x5d9617,_0x1b47dd['PaperMarginMap']=_0x5a2989,_0x1b47dd['PrintAlign']=_0x48b1c1,_0x1b47dd[_0x22a1fb(0x1e6)]=_0x3a9410,_0x1b47dd[_0x22a1fb(0x1e2)]=_0x190a5f,_0x1b47dd['PrintScale']=_0xc71d33,_0x1b47dd[_0x22a1fb(0x208)]=_0x3163cc;}));function _0x73c4(_0x4a0344,_0x3541da){_0x4a0344=_0x4a0344-0x1df;const _0x306fac=_0x306f();let _0x73c4cf=_0x306fac[_0x4a0344];return _0x73c4cf;}function _0x306f(){const _0x19b318=['201429AUKGfA','\x0a\x20\x20\x20\x20.','PrintDirection','2HvUMDS','Module','FitWidth','Custom','defineProperty','Landscape','4287276sgibfH','object','printing-canvas','None','2830jVWWvi','FitHeight','Wide','Narrow','px;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','56EuSoQb','Portrait','offline-printing-css','function','Start','6212nQfodD','className','toStringTag','innerHTML','5382850LxcFtN','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','Middle','PRINT_CONTAINER_CLASS','760260KMFVxO','Normal','902676zjHWLy',',\x20.','FitPage','createPrintStyle','amd','style','Origin','exports','px\x20','PrintPaperMargin','2655924qyUPqu'];_0x306f=function(){return _0x19b318;};return _0x306f();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/print",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0-alpha.2",
4
4
  "private": false,
5
5
  "description": "Shared print utilities for Univer Pro.",
6
6
  "author": "DreamNum Co., Ltd. <developer@univer.ai>",
@@ -50,7 +50,7 @@
50
50
  "devDependencies": {
51
51
  "typescript": "^6.0.3",
52
52
  "vitest": "^4.1.9",
53
- "@univerjs-infra/shared": "1.0.0-alpha.1"
53
+ "@univerjs-infra/shared": "1.0.0-alpha.2"
54
54
  },
55
55
  "scripts": {
56
56
  "test": "vitest run",