@univerjs-pro/print 0.6.10 → 0.7.0-nightly.202504291607

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
- 'use strict';const _0x11fc89=_0x4381;(function(_0x53b19a,_0xa0fcb9){const _0x3b4cc5=_0x4381,_0x65c2f4=_0x53b19a();while(!![]){try{const _0xb232e2=-parseInt(_0x3b4cc5(0x131))/0x1*(-parseInt(_0x3b4cc5(0x12d))/0x2)+-parseInt(_0x3b4cc5(0x141))/0x3*(parseInt(_0x3b4cc5(0x125))/0x4)+-parseInt(_0x3b4cc5(0x148))/0x5+-parseInt(_0x3b4cc5(0x13b))/0x6+parseInt(_0x3b4cc5(0x14b))/0x7+-parseInt(_0x3b4cc5(0x147))/0x8+-parseInt(_0x3b4cc5(0x145))/0x9*(-parseInt(_0x3b4cc5(0x139))/0xa);if(_0xb232e2===_0xa0fcb9)break;else _0x65c2f4['push'](_0x65c2f4['shift']());}catch(_0x52512b){_0x65c2f4['push'](_0x65c2f4['shift']());}}}(_0x3cb5,0x5f5ac));Object[_0x11fc89(0x13f)](exports,Symbol[_0x11fc89(0x143)],{'value':_0x11fc89(0x14d)});function _0x4381(_0x322189,_0x50bc67){const _0x3cb512=_0x3cb5();return _0x4381=function(_0x43816d,_0x5946c0){_0x43816d=_0x43816d-0x125;let _0x5baacd=_0x3cb512[_0x43816d];return _0x5baacd;},_0x4381(_0x322189,_0x50bc67);}function _0x3cb5(){const _0x3e139a=['3378960ZdzOaB','px;\x20\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.','px\x20','232939euvHyj','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','Module','PaperMarginMap','PRINT_CONTAINER_CLASS','PrintPaperSize','className','FitWidth','Executive','PrintAlign','None','FitHeight','Narrow','Wide','5060ngfZqB','innerHTML','PrintPaperMargin','Middle','PrintScale','Normal','printing-canvas-container','Folio','368426NmwVkz','Portrait','Origin','Landscape','2tOYgNw','printing-canvas','End','Tabloid','Start','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','PRINT_CANVAS_CLASS','Custom','20695180WsObud','createElement','3666330OVMygh','\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.','Legal','Statement','defineProperty','\x0a@media\x20print\x20{\x0a\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','36BsKYEZ','createPrintStyle','toStringTag','FitPage','9fKKfOC','style','6228976PdAFWo'];_0x3cb5=function(){return _0x3e139a;};return _0x3cb5();}var e=(_0x181f74=>(_0x181f74['Letter']='Letter',_0x181f74[_0x11fc89(0x134)]='Tabloid',_0x181f74[_0x11fc89(0x13d)]=_0x11fc89(0x13d),_0x181f74[_0x11fc89(0x13e)]=_0x11fc89(0x13e),_0x181f74['Executive']=_0x11fc89(0x153),_0x181f74[_0x11fc89(0x12c)]=_0x11fc89(0x12c),_0x181f74['A3']='A3',_0x181f74['A4']='A4',_0x181f74['A5']='A5',_0x181f74['B4']='B4',_0x181f74['B5']='B5',_0x181f74))(e||{}),i=(_0x434925=>(_0x434925[_0x11fc89(0x12e)]='Portrait',_0x434925[_0x11fc89(0x130)]=_0x11fc89(0x130),_0x434925))(i||{}),c=(_0x415d40=>(_0x415d40[_0x11fc89(0x12f)]=_0x11fc89(0x12f),_0x415d40[_0x11fc89(0x152)]=_0x11fc89(0x152),_0x415d40['FitHeight']=_0x11fc89(0x156),_0x415d40[_0x11fc89(0x144)]='FitPage',_0x415d40['Custom']=_0x11fc89(0x138),_0x415d40))(c||{}),g=(_0x5cd337=>(_0x5cd337[_0x11fc89(0x135)]=_0x11fc89(0x135),_0x5cd337['End']=_0x11fc89(0x133),_0x5cd337[_0x11fc89(0x128)]='Middle',_0x5cd337))(g||{}),o=(_0x167145=>(_0x167145[_0x11fc89(0x12a)]=_0x11fc89(0x12a),_0x167145['Narrow']=_0x11fc89(0x157),_0x167145[_0x11fc89(0x158)]=_0x11fc89(0x158),_0x167145[_0x11fc89(0x155)]='None',_0x167145))(o||{});const m={[e['A3']]:{'w':0x463,'h':0x633},[e['A4']]:{'w':0x31a,'h':0x464},[e['A5']]:{'w':0x22f,'h':0x31a},[e['B4']]:{'w':0x3b0,'h':0x540},[e['B5']]:{'w':0x299,'h':0x3b0},[e[_0x11fc89(0x153)]]:{'w':0x2b8,'h':0x3f0},[e['Folio']]:{'w':0x330,'h':0x4e0},[e[_0x11fc89(0x13d)]]:{'w':0x330,'h':0x540},[e['Letter']]:{'w':0x330,'h':0x420},[e[_0x11fc89(0x13e)]]:{'w':0x210,'h':0x330},[e[_0x11fc89(0x134)]]:{'w':0x420,'h':0x660}},N={[o['Normal']]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[o[_0x11fc89(0x157)]]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[o[_0x11fc89(0x158)]]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[o['None']]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},n=_0x11fc89(0x12b),p=_0x11fc89(0x132);function A(_0x5a4276,_0x32435f){const _0x2b1911=_0x11fc89,{w:_0x45afb0,h:_0x456679}=m[_0x5a4276],_0x3c57d7=_0x32435f===i[_0x2b1911(0x12e)]?_0x45afb0:_0x456679,_0x1d801f=_0x32435f===i[_0x2b1911(0x12e)]?_0x456679:_0x45afb0,_0x111fe2=_0x2b1911(0x140)+_0x3c57d7+_0x2b1911(0x14a)+_0x1d801f+_0x2b1911(0x149)+n+',\x20.'+n+_0x2b1911(0x13c)+p+_0x2b1911(0x14c)+_0x1d801f+_0x2b1911(0x136)+_0x3c57d7+'px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a}',_0x35c743=document[_0x2b1911(0x13a)](_0x2b1911(0x146));return _0x35c743[_0x2b1911(0x126)]=_0x111fe2,_0x35c743[_0x2b1911(0x151)]='offline-printing-css',_0x35c743;}exports[_0x11fc89(0x137)]=p,exports[_0x11fc89(0x14f)]=n,exports[_0x11fc89(0x14e)]=N,exports['PaperSizePxMap']=m,exports[_0x11fc89(0x154)]=g,exports['PrintDirection']=i,exports[_0x11fc89(0x127)]=o,exports[_0x11fc89(0x150)]=e,exports[_0x11fc89(0x129)]=c,exports[_0x11fc89(0x142)]=A;
1
+ 'use strict';function _0x46f5(_0x26a390,_0x46c934){const _0x1f61b5=_0x1f61();return _0x46f5=function(_0x46f576,_0x289cd8){_0x46f576=_0x46f576-0x122;let _0x58eba5=_0x1f61b5[_0x46f576];return _0x58eba5;},_0x46f5(_0x26a390,_0x46c934);}const _0x2330fe=_0x46f5;(function(_0x3e53e1,_0x53a29d){const _0x56377b=_0x46f5,_0x371097=_0x3e53e1();while(!![]){try{const _0xa733e=parseInt(_0x56377b(0x12e))/0x1*(parseInt(_0x56377b(0x135))/0x2)+-parseInt(_0x56377b(0x12c))/0x3+-parseInt(_0x56377b(0x141))/0x4*(parseInt(_0x56377b(0x137))/0x5)+parseInt(_0x56377b(0x13a))/0x6*(-parseInt(_0x56377b(0x12d))/0x7)+-parseInt(_0x56377b(0x12f))/0x8+parseInt(_0x56377b(0x122))/0x9*(parseInt(_0x56377b(0x126))/0xa)+-parseInt(_0x56377b(0x147))/0xb*(-parseInt(_0x56377b(0x13e))/0xc);if(_0xa733e===_0x53a29d)break;else _0x371097['push'](_0x371097['shift']());}catch(_0x1d3c6b){_0x371097['push'](_0x371097['shift']());}}}(_0x1f61,0x70801));Object[_0x2330fe(0x129)](exports,Symbol[_0x2330fe(0x124)],{'value':'Module'});var e=(_0x2ea512=>(_0x2ea512['Portrait']=_0x2330fe(0x128),_0x2ea512[_0x2330fe(0x13c)]=_0x2330fe(0x13c),_0x2ea512))(e||{}),d=(_0x170845=>(_0x170845['Origin']=_0x2330fe(0x146),_0x170845['FitWidth']=_0x2330fe(0x140),_0x170845[_0x2330fe(0x14d)]=_0x2330fe(0x14d),_0x170845[_0x2330fe(0x13d)]=_0x2330fe(0x13d),_0x170845['Custom']='Custom',_0x170845))(d||{}),l=(_0x176d98=>(_0x176d98[_0x2330fe(0x136)]='Start',_0x176d98[_0x2330fe(0x130)]=_0x2330fe(0x130),_0x176d98[_0x2330fe(0x123)]=_0x2330fe(0x123),_0x176d98))(l||{}),i=(_0x2e722a=>(_0x2e722a[_0x2330fe(0x14b)]=_0x2330fe(0x14b),_0x2e722a[_0x2330fe(0x145)]=_0x2330fe(0x145),_0x2e722a[_0x2330fe(0x12b)]='Wide',_0x2e722a[_0x2330fe(0x148)]=_0x2330fe(0x148),_0x2e722a))(i||{});const h={[i['Normal']]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[i[_0x2330fe(0x145)]]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[i[_0x2330fe(0x12b)]]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[i[_0x2330fe(0x148)]]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},r=_0x2330fe(0x131),c='printing-canvas';function m(_0x393357,_0xc9e918,_0x1feb86){const _0x5678bd=_0x2330fe,_0x3f4758=_0x1feb86===e[_0x5678bd(0x128)]?_0x393357:_0xc9e918,_0xff4dd2=_0x1feb86===e[_0x5678bd(0x128)]?_0xc9e918:_0x393357,_0xbef3d4=_0x5678bd(0x14c)+_0x3f4758+_0x5678bd(0x125)+_0xff4dd2+'px;\x20\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.'+r+_0x5678bd(0x133)+r+'\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.'+c+'\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20'+_0xff4dd2+_0x5678bd(0x14a)+_0x3f4758+_0x5678bd(0x127),_0x329731=document[_0x5678bd(0x144)](_0x5678bd(0x143));return _0x329731[_0x5678bd(0x142)]=_0xbef3d4,_0x329731[_0x5678bd(0x149)]=_0x5678bd(0x13f),_0x329731;}function _0x1f61(){const _0x41ca8f=['1kepnMI','2096848svEiZd','End','printing-canvas-container','PrintPaperMargin',',\x20.','PrintAlign','1710346jUQFJd','Start','15wdjUzo','PaperMarginMap','PrintScale','3426AczHUp','PrintDirection','Landscape','FitPage','14395020BJSANE','offline-printing-css','FitWidth','852884XIbwPy','innerHTML','style','createElement','Narrow','Origin','11CirnXP','None','className','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','Normal','\x0a@media\x20print\x20{\x0a\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','FitHeight','PRINT_CONTAINER_CLASS','21213bBNfYo','Middle','toStringTag','px\x20','1090zrHAjL','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a}','Portrait','defineProperty','createPrintStyle','Wide','541605CFUoLk','9422oIvlVP'];_0x1f61=function(){return _0x41ca8f;};return _0x1f61();}exports['PRINT_CANVAS_CLASS']=c,exports[_0x2330fe(0x14e)]=r,exports[_0x2330fe(0x138)]=h,exports[_0x2330fe(0x134)]=l,exports[_0x2330fe(0x13b)]=e,exports[_0x2330fe(0x132)]=i,exports[_0x2330fe(0x139)]=d,exports[_0x2330fe(0x12a)]=m;
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0xa20cb4=_0x10e7;(function(_0x316bdd,_0x479d8d){const _0x233188=_0x10e7,_0x46bba3=_0x316bdd();while(!![]){try{const _0x5f9075=parseInt(_0x233188(0xfe))/0x1*(-parseInt(_0x233188(0xf8))/0x2)+-parseInt(_0x233188(0xfc))/0x3+parseInt(_0x233188(0x105))/0x4+-parseInt(_0x233188(0xe8))/0x5+-parseInt(_0x233188(0xeb))/0x6+-parseInt(_0x233188(0xf7))/0x7*(-parseInt(_0x233188(0x107))/0x8)+parseInt(_0x233188(0xfd))/0x9;if(_0x5f9075===_0x479d8d)break;else _0x46bba3['push'](_0x46bba3['shift']());}catch(_0x2a2fc1){_0x46bba3['push'](_0x46bba3['shift']());}}}(_0x7e4c,0x99b75));function _0x10e7(_0x343681,_0x306b2b){const _0x7e4c70=_0x7e4c();return _0x10e7=function(_0x10e79e,_0xfb3eb0){_0x10e79e=_0x10e79e-0xe6;let _0x249f6e=_0x7e4c70[_0x10e79e];return _0x249f6e;},_0x10e7(_0x343681,_0x306b2b);}function _0x7e4c(){const _0x542486=['1706375udLpWp','Folio','Executive','7304142cEQQKw','px;\x20\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','style','Narrow','px\x20','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a}','Origin','className','Legal',',\x20.','Statement','77kHwavq','1622hWMmdG','Landscape','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','Tabloid','2215026coKvua','10140759ZnHqEB','457NLFXsX','createElement','Wide','innerHTML','FitHeight','\x0a@media\x20print\x20{\x0a\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','Middle','3742752WKbeGK','FitPage','898024zoylBv','Normal','FitWidth','Portrait','Start','None','printing-canvas','Letter','offline-printing-css'];_0x7e4c=function(){return _0x542486;};return _0x7e4c();}var o=(_0x3c99b1=>(_0x3c99b1[_0xa20cb4(0xe6)]=_0xa20cb4(0xe6),_0x3c99b1[_0xa20cb4(0xfb)]=_0xa20cb4(0xfb),_0x3c99b1[_0xa20cb4(0xf4)]=_0xa20cb4(0xf4),_0x3c99b1[_0xa20cb4(0xf6)]=_0xa20cb4(0xf6),_0x3c99b1['Executive']=_0xa20cb4(0xea),_0x3c99b1[_0xa20cb4(0xe9)]=_0xa20cb4(0xe9),_0x3c99b1['A3']='A3',_0x3c99b1['A4']='A4',_0x3c99b1['A5']='A5',_0x3c99b1['B4']='B4',_0x3c99b1['B5']='B5',_0x3c99b1))(o||{}),i=(_0xfcafba=>(_0xfcafba[_0xa20cb4(0x10a)]=_0xa20cb4(0x10a),_0xfcafba[_0xa20cb4(0xf9)]='Landscape',_0xfcafba))(i||{}),w=(_0x2a2a15=>(_0x2a2a15[_0xa20cb4(0xf2)]='Origin',_0x2a2a15['FitWidth']=_0xa20cb4(0x109),_0x2a2a15[_0xa20cb4(0x102)]=_0xa20cb4(0x102),_0x2a2a15[_0xa20cb4(0x106)]=_0xa20cb4(0x106),_0x2a2a15['Custom']='Custom',_0x2a2a15))(w||{}),m=(_0xb62c87=>(_0xb62c87[_0xa20cb4(0x10b)]=_0xa20cb4(0x10b),_0xb62c87['End']='End',_0xb62c87[_0xa20cb4(0x104)]=_0xa20cb4(0x104),_0xb62c87))(m||{}),e=(_0x4771ed=>(_0x4771ed[_0xa20cb4(0x108)]=_0xa20cb4(0x108),_0x4771ed[_0xa20cb4(0xef)]=_0xa20cb4(0xef),_0x4771ed[_0xa20cb4(0x100)]='Wide',_0x4771ed[_0xa20cb4(0x10c)]=_0xa20cb4(0x10c),_0x4771ed))(e||{});const g={[o['A3']]:{'w':0x463,'h':0x633},[o['A4']]:{'w':0x31a,'h':0x464},[o['A5']]:{'w':0x22f,'h':0x31a},[o['B4']]:{'w':0x3b0,'h':0x540},[o['B5']]:{'w':0x299,'h':0x3b0},[o[_0xa20cb4(0xea)]]:{'w':0x2b8,'h':0x3f0},[o['Folio']]:{'w':0x330,'h':0x4e0},[o[_0xa20cb4(0xf4)]]:{'w':0x330,'h':0x540},[o[_0xa20cb4(0xe6)]]:{'w':0x330,'h':0x420},[o[_0xa20cb4(0xf6)]]:{'w':0x210,'h':0x330},[o[_0xa20cb4(0xfb)]]:{'w':0x420,'h':0x660}},v={[e[_0xa20cb4(0x108)]]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[e[_0xa20cb4(0xef)]]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[e[_0xa20cb4(0x100)]]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[e[_0xa20cb4(0x10c)]]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},l='printing-canvas-container',p=_0xa20cb4(0x10d);function N(_0x2e87db,_0x531e3d){const _0x5d2d0d=_0xa20cb4,{w:_0x294c02,h:_0x2e17e5}=g[_0x2e87db],_0x27b423=_0x531e3d===i['Portrait']?_0x294c02:_0x2e17e5,_0x461597=_0x531e3d===i[_0x5d2d0d(0x10a)]?_0x2e17e5:_0x294c02,_0xed38f=_0x5d2d0d(0x103)+_0x27b423+_0x5d2d0d(0xf0)+_0x461597+_0x5d2d0d(0xec)+l+_0x5d2d0d(0xf5)+l+'\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.'+p+_0x5d2d0d(0xed)+_0x461597+_0x5d2d0d(0xfa)+_0x27b423+_0x5d2d0d(0xf1),_0x33293a=document[_0x5d2d0d(0xff)](_0x5d2d0d(0xee));return _0x33293a[_0x5d2d0d(0x101)]=_0xed38f,_0x33293a[_0x5d2d0d(0xf3)]=_0x5d2d0d(0xe7),_0x33293a;}export{p as PRINT_CANVAS_CLASS,l as PRINT_CONTAINER_CLASS,v as PaperMarginMap,g as PaperSizePxMap,m as PrintAlign,i as PrintDirection,e as PrintPaperMargin,o as PrintPaperSize,w as PrintScale,N as createPrintStyle};
1
+ const _0x3372b4=_0x2029;function _0x4f0c(){const _0x263b2f=['Portrait','printing-canvas','Middle','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','innerHTML','\x0a@media\x20print\x20{\x0a\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','1730840XHbdZK','2822169JCvkJm','9656088QMdrQI','offline-printing-css','390425AZoNdm','End','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a}','Wide','FitPage','2FunHJI','Origin','Custom','596820xLsSaz','None','4397304RAvLqY','createElement',',\x20.','FitWidth','956404yWgnvJ','Start','Landscape','px\x20','printing-canvas-container','px;\x20\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.','Narrow','Normal','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','FitHeight'];_0x4f0c=function(){return _0x263b2f;};return _0x4f0c();}(function(_0x3e2aea,_0x4b5a99){const _0x5c5845=_0x2029,_0x340f50=_0x3e2aea();while(!![]){try{const _0x48bc27=parseInt(_0x5c5845(0x128))/0x1+-parseInt(_0x5c5845(0x12d))/0x2*(parseInt(_0x5c5845(0x130))/0x3)+-parseInt(_0x5c5845(0x114))/0x4+parseInt(_0x5c5845(0x124))/0x5+-parseInt(_0x5c5845(0x132))/0x6+-parseInt(_0x5c5845(0x125))/0x7+parseInt(_0x5c5845(0x126))/0x8;if(_0x48bc27===_0x4b5a99)break;else _0x340f50['push'](_0x340f50['shift']());}catch(_0x1e6c3a){_0x340f50['push'](_0x340f50['shift']());}}}(_0x4f0c,0x5a368));function _0x2029(_0x3552e3,_0x3433eb){const _0x4f0cd3=_0x4f0c();return _0x2029=function(_0x2029f6,_0x5ed534){_0x2029f6=_0x2029f6-0x114;let _0x2b88cc=_0x4f0cd3[_0x2029f6];return _0x2b88cc;},_0x2029(_0x3552e3,_0x3433eb);}var e=(_0x2a0273=>(_0x2a0273['Portrait']=_0x3372b4(0x11e),_0x2a0273[_0x3372b4(0x116)]=_0x3372b4(0x116),_0x2a0273))(e||{}),h=(_0x5d7d50=>(_0x5d7d50[_0x3372b4(0x12e)]=_0x3372b4(0x12e),_0x5d7d50[_0x3372b4(0x135)]='FitWidth',_0x5d7d50[_0x3372b4(0x11d)]=_0x3372b4(0x11d),_0x5d7d50[_0x3372b4(0x12c)]=_0x3372b4(0x12c),_0x5d7d50[_0x3372b4(0x12f)]=_0x3372b4(0x12f),_0x5d7d50))(h||{}),l=(_0x24da31=>(_0x24da31[_0x3372b4(0x115)]='Start',_0x24da31[_0x3372b4(0x129)]=_0x3372b4(0x129),_0x24da31[_0x3372b4(0x120)]='Middle',_0x24da31))(l||{}),o=(_0x3c78f6=>(_0x3c78f6[_0x3372b4(0x11b)]='Normal',_0x3c78f6[_0x3372b4(0x11a)]=_0x3372b4(0x11a),_0x3c78f6['Wide']='Wide',_0x3c78f6[_0x3372b4(0x131)]=_0x3372b4(0x131),_0x3c78f6))(o||{});const c={[o['Normal']]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[o[_0x3372b4(0x11a)]]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[o[_0x3372b4(0x12b)]]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[o['None']]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},d=_0x3372b4(0x118),m=_0x3372b4(0x11f);function g(_0xa7933e,_0x237813,_0x1eecd9){const _0x519a4f=_0x3372b4,_0x5e495a=_0x1eecd9===e[_0x519a4f(0x11e)]?_0xa7933e:_0x237813,_0x239f3f=_0x1eecd9===e[_0x519a4f(0x11e)]?_0x237813:_0xa7933e,_0x349b11=_0x519a4f(0x123)+_0x5e495a+_0x519a4f(0x117)+_0x239f3f+_0x519a4f(0x119)+d+_0x519a4f(0x134)+d+'\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.'+m+_0x519a4f(0x11c)+_0x239f3f+_0x519a4f(0x121)+_0x5e495a+_0x519a4f(0x12a),_0x50eb1b=document[_0x519a4f(0x133)]('style');return _0x50eb1b[_0x519a4f(0x122)]=_0x349b11,_0x50eb1b['className']=_0x519a4f(0x127),_0x50eb1b;}export{m as PRINT_CANVAS_CLASS,d as PRINT_CONTAINER_CLASS,c as PaperMarginMap,l as PrintAlign,e as PrintDirection,o as PrintPaperMargin,h as PrintScale,g as createPrintStyle};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0xa20cb4=_0x10e7;(function(_0x316bdd,_0x479d8d){const _0x233188=_0x10e7,_0x46bba3=_0x316bdd();while(!![]){try{const _0x5f9075=parseInt(_0x233188(0xfe))/0x1*(-parseInt(_0x233188(0xf8))/0x2)+-parseInt(_0x233188(0xfc))/0x3+parseInt(_0x233188(0x105))/0x4+-parseInt(_0x233188(0xe8))/0x5+-parseInt(_0x233188(0xeb))/0x6+-parseInt(_0x233188(0xf7))/0x7*(-parseInt(_0x233188(0x107))/0x8)+parseInt(_0x233188(0xfd))/0x9;if(_0x5f9075===_0x479d8d)break;else _0x46bba3['push'](_0x46bba3['shift']());}catch(_0x2a2fc1){_0x46bba3['push'](_0x46bba3['shift']());}}}(_0x7e4c,0x99b75));function _0x10e7(_0x343681,_0x306b2b){const _0x7e4c70=_0x7e4c();return _0x10e7=function(_0x10e79e,_0xfb3eb0){_0x10e79e=_0x10e79e-0xe6;let _0x249f6e=_0x7e4c70[_0x10e79e];return _0x249f6e;},_0x10e7(_0x343681,_0x306b2b);}function _0x7e4c(){const _0x542486=['1706375udLpWp','Folio','Executive','7304142cEQQKw','px;\x20\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','style','Narrow','px\x20','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a}','Origin','className','Legal',',\x20.','Statement','77kHwavq','1622hWMmdG','Landscape','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','Tabloid','2215026coKvua','10140759ZnHqEB','457NLFXsX','createElement','Wide','innerHTML','FitHeight','\x0a@media\x20print\x20{\x0a\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','Middle','3742752WKbeGK','FitPage','898024zoylBv','Normal','FitWidth','Portrait','Start','None','printing-canvas','Letter','offline-printing-css'];_0x7e4c=function(){return _0x542486;};return _0x7e4c();}var o=(_0x3c99b1=>(_0x3c99b1[_0xa20cb4(0xe6)]=_0xa20cb4(0xe6),_0x3c99b1[_0xa20cb4(0xfb)]=_0xa20cb4(0xfb),_0x3c99b1[_0xa20cb4(0xf4)]=_0xa20cb4(0xf4),_0x3c99b1[_0xa20cb4(0xf6)]=_0xa20cb4(0xf6),_0x3c99b1['Executive']=_0xa20cb4(0xea),_0x3c99b1[_0xa20cb4(0xe9)]=_0xa20cb4(0xe9),_0x3c99b1['A3']='A3',_0x3c99b1['A4']='A4',_0x3c99b1['A5']='A5',_0x3c99b1['B4']='B4',_0x3c99b1['B5']='B5',_0x3c99b1))(o||{}),i=(_0xfcafba=>(_0xfcafba[_0xa20cb4(0x10a)]=_0xa20cb4(0x10a),_0xfcafba[_0xa20cb4(0xf9)]='Landscape',_0xfcafba))(i||{}),w=(_0x2a2a15=>(_0x2a2a15[_0xa20cb4(0xf2)]='Origin',_0x2a2a15['FitWidth']=_0xa20cb4(0x109),_0x2a2a15[_0xa20cb4(0x102)]=_0xa20cb4(0x102),_0x2a2a15[_0xa20cb4(0x106)]=_0xa20cb4(0x106),_0x2a2a15['Custom']='Custom',_0x2a2a15))(w||{}),m=(_0xb62c87=>(_0xb62c87[_0xa20cb4(0x10b)]=_0xa20cb4(0x10b),_0xb62c87['End']='End',_0xb62c87[_0xa20cb4(0x104)]=_0xa20cb4(0x104),_0xb62c87))(m||{}),e=(_0x4771ed=>(_0x4771ed[_0xa20cb4(0x108)]=_0xa20cb4(0x108),_0x4771ed[_0xa20cb4(0xef)]=_0xa20cb4(0xef),_0x4771ed[_0xa20cb4(0x100)]='Wide',_0x4771ed[_0xa20cb4(0x10c)]=_0xa20cb4(0x10c),_0x4771ed))(e||{});const g={[o['A3']]:{'w':0x463,'h':0x633},[o['A4']]:{'w':0x31a,'h':0x464},[o['A5']]:{'w':0x22f,'h':0x31a},[o['B4']]:{'w':0x3b0,'h':0x540},[o['B5']]:{'w':0x299,'h':0x3b0},[o[_0xa20cb4(0xea)]]:{'w':0x2b8,'h':0x3f0},[o['Folio']]:{'w':0x330,'h':0x4e0},[o[_0xa20cb4(0xf4)]]:{'w':0x330,'h':0x540},[o[_0xa20cb4(0xe6)]]:{'w':0x330,'h':0x420},[o[_0xa20cb4(0xf6)]]:{'w':0x210,'h':0x330},[o[_0xa20cb4(0xfb)]]:{'w':0x420,'h':0x660}},v={[e[_0xa20cb4(0x108)]]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[e[_0xa20cb4(0xef)]]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[e[_0xa20cb4(0x100)]]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[e[_0xa20cb4(0x10c)]]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},l='printing-canvas-container',p=_0xa20cb4(0x10d);function N(_0x2e87db,_0x531e3d){const _0x5d2d0d=_0xa20cb4,{w:_0x294c02,h:_0x2e17e5}=g[_0x2e87db],_0x27b423=_0x531e3d===i['Portrait']?_0x294c02:_0x2e17e5,_0x461597=_0x531e3d===i[_0x5d2d0d(0x10a)]?_0x2e17e5:_0x294c02,_0xed38f=_0x5d2d0d(0x103)+_0x27b423+_0x5d2d0d(0xf0)+_0x461597+_0x5d2d0d(0xec)+l+_0x5d2d0d(0xf5)+l+'\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.'+p+_0x5d2d0d(0xed)+_0x461597+_0x5d2d0d(0xfa)+_0x27b423+_0x5d2d0d(0xf1),_0x33293a=document[_0x5d2d0d(0xff)](_0x5d2d0d(0xee));return _0x33293a[_0x5d2d0d(0x101)]=_0xed38f,_0x33293a[_0x5d2d0d(0xf3)]=_0x5d2d0d(0xe7),_0x33293a;}export{p as PRINT_CANVAS_CLASS,l as PRINT_CONTAINER_CLASS,v as PaperMarginMap,g as PaperSizePxMap,m as PrintAlign,i as PrintDirection,e as PrintPaperMargin,o as PrintPaperSize,w as PrintScale,N as createPrintStyle};
1
+ const _0x3372b4=_0x2029;function _0x4f0c(){const _0x263b2f=['Portrait','printing-canvas','Middle','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','innerHTML','\x0a@media\x20print\x20{\x0a\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','1730840XHbdZK','2822169JCvkJm','9656088QMdrQI','offline-printing-css','390425AZoNdm','End','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a}','Wide','FitPage','2FunHJI','Origin','Custom','596820xLsSaz','None','4397304RAvLqY','createElement',',\x20.','FitWidth','956404yWgnvJ','Start','Landscape','px\x20','printing-canvas-container','px;\x20\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.','Narrow','Normal','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','FitHeight'];_0x4f0c=function(){return _0x263b2f;};return _0x4f0c();}(function(_0x3e2aea,_0x4b5a99){const _0x5c5845=_0x2029,_0x340f50=_0x3e2aea();while(!![]){try{const _0x48bc27=parseInt(_0x5c5845(0x128))/0x1+-parseInt(_0x5c5845(0x12d))/0x2*(parseInt(_0x5c5845(0x130))/0x3)+-parseInt(_0x5c5845(0x114))/0x4+parseInt(_0x5c5845(0x124))/0x5+-parseInt(_0x5c5845(0x132))/0x6+-parseInt(_0x5c5845(0x125))/0x7+parseInt(_0x5c5845(0x126))/0x8;if(_0x48bc27===_0x4b5a99)break;else _0x340f50['push'](_0x340f50['shift']());}catch(_0x1e6c3a){_0x340f50['push'](_0x340f50['shift']());}}}(_0x4f0c,0x5a368));function _0x2029(_0x3552e3,_0x3433eb){const _0x4f0cd3=_0x4f0c();return _0x2029=function(_0x2029f6,_0x5ed534){_0x2029f6=_0x2029f6-0x114;let _0x2b88cc=_0x4f0cd3[_0x2029f6];return _0x2b88cc;},_0x2029(_0x3552e3,_0x3433eb);}var e=(_0x2a0273=>(_0x2a0273['Portrait']=_0x3372b4(0x11e),_0x2a0273[_0x3372b4(0x116)]=_0x3372b4(0x116),_0x2a0273))(e||{}),h=(_0x5d7d50=>(_0x5d7d50[_0x3372b4(0x12e)]=_0x3372b4(0x12e),_0x5d7d50[_0x3372b4(0x135)]='FitWidth',_0x5d7d50[_0x3372b4(0x11d)]=_0x3372b4(0x11d),_0x5d7d50[_0x3372b4(0x12c)]=_0x3372b4(0x12c),_0x5d7d50[_0x3372b4(0x12f)]=_0x3372b4(0x12f),_0x5d7d50))(h||{}),l=(_0x24da31=>(_0x24da31[_0x3372b4(0x115)]='Start',_0x24da31[_0x3372b4(0x129)]=_0x3372b4(0x129),_0x24da31[_0x3372b4(0x120)]='Middle',_0x24da31))(l||{}),o=(_0x3c78f6=>(_0x3c78f6[_0x3372b4(0x11b)]='Normal',_0x3c78f6[_0x3372b4(0x11a)]=_0x3372b4(0x11a),_0x3c78f6['Wide']='Wide',_0x3c78f6[_0x3372b4(0x131)]=_0x3372b4(0x131),_0x3c78f6))(o||{});const c={[o['Normal']]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[o[_0x3372b4(0x11a)]]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[o[_0x3372b4(0x12b)]]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[o['None']]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},d=_0x3372b4(0x118),m=_0x3372b4(0x11f);function g(_0xa7933e,_0x237813,_0x1eecd9){const _0x519a4f=_0x3372b4,_0x5e495a=_0x1eecd9===e[_0x519a4f(0x11e)]?_0xa7933e:_0x237813,_0x239f3f=_0x1eecd9===e[_0x519a4f(0x11e)]?_0x237813:_0xa7933e,_0x349b11=_0x519a4f(0x123)+_0x5e495a+_0x519a4f(0x117)+_0x239f3f+_0x519a4f(0x119)+d+_0x519a4f(0x134)+d+'\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.'+m+_0x519a4f(0x11c)+_0x239f3f+_0x519a4f(0x121)+_0x5e495a+_0x519a4f(0x12a),_0x50eb1b=document[_0x519a4f(0x133)]('style');return _0x50eb1b[_0x519a4f(0x122)]=_0x349b11,_0x50eb1b['className']=_0x519a4f(0x127),_0x50eb1b;}export{m as PRINT_CANVAS_CLASS,d as PRINT_CONTAINER_CLASS,c as PaperMarginMap,l as PrintAlign,e as PrintDirection,o as PrintPaperMargin,h as PrintScale,g as createPrintStyle};
@@ -1,10 +1,4 @@
1
- import { PrintPaperMargin, PrintPaperSize, IPrintMargin } from './types';
2
- interface IPaperSize {
3
- w: number;
4
- h: number;
5
- }
6
- export declare const PaperSizePxMap: Record<PrintPaperSize, IPaperSize>;
1
+ import { IPrintMargin, PrintPaperMargin } from './types';
7
2
  export declare const PaperMarginMap: Record<PrintPaperMargin, IPrintMargin>;
8
3
  export declare const PRINT_CONTAINER_CLASS = "printing-canvas-container";
9
4
  export declare const PRINT_CANVAS_CLASS = "printing-canvas";
10
- export {};
@@ -1,3 +1,3 @@
1
- export { PaperSizePxMap, PRINT_CANVAS_CLASS, PRINT_CONTAINER_CLASS, PaperMarginMap, } from './constant';
2
- export { type IPrintMargin, PrintAlign, PrintDirection, PrintPaperMargin, PrintPaperSize, PrintScale } from './types';
1
+ export { PaperMarginMap, PRINT_CANVAS_CLASS, PRINT_CONTAINER_CLASS, } from './constant';
2
+ export { type IPrintMargin, PrintAlign, PrintDirection, PrintPaperMargin, PrintScale } from './types';
3
3
  export { createPrintStyle } from './util';
@@ -1,16 +1,3 @@
1
- export declare enum PrintPaperSize {
2
- Letter = "Letter",
3
- Tabloid = "Tabloid",
4
- Legal = "Legal",
5
- Statement = "Statement",
6
- Executive = "Executive",
7
- Folio = "Folio",
8
- A3 = "A3",
9
- A4 = "A4",
10
- A5 = "A5",
11
- B4 = "B4",
12
- B5 = "B5"
13
- }
14
1
  export declare enum PrintDirection {
15
2
  Portrait = "Portrait",
16
3
  Landscape = "Landscape"
@@ -1,2 +1,2 @@
1
- import { PrintDirection, PrintPaperSize } from './types';
2
- export declare function createPrintStyle(paperSize: PrintPaperSize, direction: PrintDirection): HTMLStyleElement;
1
+ import { PrintDirection } from './types';
2
+ export declare function createPrintStyle(w: number, h: number, direction: PrintDirection): HTMLStyleElement;
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3ece(){const _0x1fe65c=['PrintDirection','FitWidth','Middle','px;\x20\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.','PrintPaperMargin','Portrait','defineProperty','Landscape','Folio','createPrintStyle','Narrow','printing-canvas','Module','printing-canvas-container','117593pfDuwK','PRINT_CONTAINER_CLASS','Normal','PaperSizePxMap','28200JRgceA','Legal','Wide','91FtehSe','FitHeight','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','5611195ywbjZf','PrintPaperSize','2976924TsUjIc','207ixvbQN','Custom','Tabloid','PaperMarginMap','Statement','PrintScale','21923HUYTim','7751hwVbqG','className','innerHTML','98bOBXqu','573WFZIkh','style','None','toStringTag','Origin','497672vTGmem','Start','5910jMgkKG','offline-printing-css','exports','object','amd','createElement',',\x20.','FitPage','px\x20','End','Letter','426CKQovF'];_0x3ece=function(){return _0x1fe65c;};return _0x3ece();}function _0x9be3(_0x45c117,_0x48718b){const _0x3ece05=_0x3ece();return _0x9be3=function(_0x9be34b,_0x21eca0){_0x9be34b=_0x9be34b-0xe3;let _0x29fa52=_0x3ece05[_0x9be34b];return _0x29fa52;},_0x9be3(_0x45c117,_0x48718b);}(function(_0x4b1fe4,_0x43df87){const _0x308d80=_0x9be3,_0xf40eb3=_0x4b1fe4();while(!![]){try{const _0x44d95b=-parseInt(_0x308d80(0xe7))/0x1*(-parseInt(_0x308d80(0xea))/0x2)+-parseInt(_0x308d80(0xeb))/0x3*(-parseInt(_0x308d80(0x110))/0x4)+-parseInt(_0x308d80(0x116))/0x5+parseInt(_0x308d80(0xfd))/0x6*(-parseInt(_0x308d80(0x10c))/0x7)+parseInt(_0x308d80(0xf0))/0x8*(-parseInt(_0x308d80(0x119))/0x9)+parseInt(_0x308d80(0xf2))/0xa*(parseInt(_0x308d80(0xe6))/0xb)+-parseInt(_0x308d80(0x118))/0xc*(-parseInt(_0x308d80(0x113))/0xd);if(_0x44d95b===_0x43df87)break;else _0xf40eb3['push'](_0xf40eb3['shift']());}catch(_0x55e1f2){_0xf40eb3['push'](_0xf40eb3['shift']());}}}(_0x3ece,0xda800),function(_0x3d1299,_0x6e954d){const _0x3ff8e6=_0x9be3;typeof exports==_0x3ff8e6(0xf5)&&typeof module<'u'?_0x6e954d(exports):typeof define=='function'&&define[_0x3ff8e6(0xf6)]?define([_0x3ff8e6(0xf4)],_0x6e954d):(_0x3d1299=typeof globalThis<'u'?globalThis:_0x3d1299||self,_0x6e954d(_0x3d1299['UniverProPrint']={}));}(this,function(_0x5a4b23){'use strict';const _0x46b77a=_0x9be3;var _0x3fa771=(_0x5871c1=>(_0x5871c1[_0x46b77a(0xfc)]='Letter',_0x5871c1[_0x46b77a(0x11b)]=_0x46b77a(0x11b),_0x5871c1['Legal']='Legal',_0x5871c1[_0x46b77a(0xe4)]='Statement',_0x5871c1['Executive']='Executive',_0x5871c1[_0x46b77a(0x106)]='Folio',_0x5871c1['A3']='A3',_0x5871c1['A4']='A4',_0x5871c1['A5']='A5',_0x5871c1['B4']='B4',_0x5871c1['B5']='B5',_0x5871c1))(_0x3fa771||{}),_0x1727d9=(_0x2653c3=>(_0x2653c3['Portrait']=_0x46b77a(0x103),_0x2653c3[_0x46b77a(0x105)]=_0x46b77a(0x105),_0x2653c3))(_0x1727d9||{}),_0x20d6e8=(_0x231110=>(_0x231110[_0x46b77a(0xef)]='Origin',_0x231110[_0x46b77a(0xff)]=_0x46b77a(0xff),_0x231110[_0x46b77a(0x114)]=_0x46b77a(0x114),_0x231110['FitPage']=_0x46b77a(0xf9),_0x231110[_0x46b77a(0x11a)]='Custom',_0x231110))(_0x20d6e8||{}),_0x491c0b=(_0x192921=>(_0x192921[_0x46b77a(0xf1)]=_0x46b77a(0xf1),_0x192921['End']=_0x46b77a(0xfb),_0x192921['Middle']=_0x46b77a(0x100),_0x192921))(_0x491c0b||{}),_0x516ef7=(_0x241ee7=>(_0x241ee7[_0x46b77a(0x10e)]=_0x46b77a(0x10e),_0x241ee7[_0x46b77a(0x108)]='Narrow',_0x241ee7['Wide']=_0x46b77a(0x112),_0x241ee7[_0x46b77a(0xed)]='None',_0x241ee7))(_0x516ef7||{});const _0x2c6de9={[_0x3fa771['A3']]:{'w':0x463,'h':0x633},[_0x3fa771['A4']]:{'w':0x31a,'h':0x464},[_0x3fa771['A5']]:{'w':0x22f,'h':0x31a},[_0x3fa771['B4']]:{'w':0x3b0,'h':0x540},[_0x3fa771['B5']]:{'w':0x299,'h':0x3b0},[_0x3fa771['Executive']]:{'w':0x2b8,'h':0x3f0},[_0x3fa771[_0x46b77a(0x106)]]:{'w':0x330,'h':0x4e0},[_0x3fa771[_0x46b77a(0x111)]]:{'w':0x330,'h':0x540},[_0x3fa771['Letter']]:{'w':0x330,'h':0x420},[_0x3fa771[_0x46b77a(0xe4)]]:{'w':0x210,'h':0x330},[_0x3fa771[_0x46b77a(0x11b)]]:{'w':0x420,'h':0x660}},_0x5d322c={[_0x516ef7['Normal']]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[_0x516ef7['Narrow']]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[_0x516ef7[_0x46b77a(0x112)]]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[_0x516ef7[_0x46b77a(0xed)]]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},_0x550f2d=_0x46b77a(0x10b),_0x435b10=_0x46b77a(0x109);function _0x800de2(_0x278c06,_0x29a5fd){const _0x1db24a=_0x46b77a,{w:_0x4a78bc,h:_0x28cb54}=_0x2c6de9[_0x278c06],_0x15e80a=_0x29a5fd===_0x1727d9[_0x1db24a(0x103)]?_0x4a78bc:_0x28cb54,_0x55b1f4=_0x29a5fd===_0x1727d9['Portrait']?_0x28cb54:_0x4a78bc,_0x4ec0dc='\x0a@media\x20print\x20{\x0a\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20size:\x20'+_0x15e80a+_0x1db24a(0xfa)+_0x55b1f4+_0x1db24a(0x101)+_0x550f2d+_0x1db24a(0xf8)+_0x550f2d+'\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.'+_0x435b10+_0x1db24a(0x115)+_0x55b1f4+'px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20'+_0x15e80a+'px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a}',_0xd254b8=document[_0x1db24a(0xf7)](_0x1db24a(0xec));return _0xd254b8[_0x1db24a(0xe9)]=_0x4ec0dc,_0xd254b8[_0x1db24a(0xe8)]=_0x1db24a(0xf3),_0xd254b8;}_0x5a4b23['PRINT_CANVAS_CLASS']=_0x435b10,_0x5a4b23[_0x46b77a(0x10d)]=_0x550f2d,_0x5a4b23[_0x46b77a(0xe3)]=_0x5d322c,_0x5a4b23[_0x46b77a(0x10f)]=_0x2c6de9,_0x5a4b23['PrintAlign']=_0x491c0b,_0x5a4b23[_0x46b77a(0xfe)]=_0x1727d9,_0x5a4b23[_0x46b77a(0x102)]=_0x516ef7,_0x5a4b23[_0x46b77a(0x117)]=_0x3fa771,_0x5a4b23[_0x46b77a(0xe5)]=_0x20d6e8,_0x5a4b23[_0x46b77a(0x107)]=_0x800de2,Object[_0x46b77a(0x104)](_0x5a4b23,Symbol[_0x46b77a(0xee)],{'value':_0x46b77a(0x10a)});}));
1
+ (function(_0x263bf6,_0x3ad56d){const _0xaa091a=_0x4d5b,_0x85e5a=_0x263bf6();while(!![]){try{const _0x1deb58=-parseInt(_0xaa091a(0x1d8))/0x1+-parseInt(_0xaa091a(0x1ee))/0x2+parseInt(_0xaa091a(0x1ef))/0x3+-parseInt(_0xaa091a(0x1e1))/0x4+parseInt(_0xaa091a(0x1ed))/0x5+parseInt(_0xaa091a(0x1da))/0x6*(parseInt(_0xaa091a(0x1d0))/0x7)+parseInt(_0xaa091a(0x1d7))/0x8;if(_0x1deb58===_0x3ad56d)break;else _0x85e5a['push'](_0x85e5a['shift']());}catch(_0x2146ea){_0x85e5a['push'](_0x85e5a['shift']());}}}(_0x3e03,0xaab77),function(_0x342ef5,_0x2595aa){const _0x19a8de=_0x4d5b;typeof exports==_0x19a8de(0x1d6)&&typeof module<'u'?_0x2595aa(exports):typeof define=='function'&&define[_0x19a8de(0x1db)]?define([_0x19a8de(0x1d2)],_0x2595aa):(_0x342ef5=typeof globalThis<'u'?globalThis:_0x342ef5||self,_0x2595aa(_0x342ef5['UniverProPrint']={}));}(this,function(_0x13dee9){'use strict';const _0x4cb5d7=_0x4d5b;var _0x46d056=(_0x507ffe=>(_0x507ffe[_0x4cb5d7(0x1d4)]=_0x4cb5d7(0x1d4),_0x507ffe[_0x4cb5d7(0x1e9)]=_0x4cb5d7(0x1e9),_0x507ffe))(_0x46d056||{}),_0x502f2b=(_0x446b40=>(_0x446b40[_0x4cb5d7(0x1f3)]=_0x4cb5d7(0x1f3),_0x446b40[_0x4cb5d7(0x1eb)]=_0x4cb5d7(0x1eb),_0x446b40[_0x4cb5d7(0x1f2)]=_0x4cb5d7(0x1f2),_0x446b40[_0x4cb5d7(0x1e5)]=_0x4cb5d7(0x1e5),_0x446b40['Custom']=_0x4cb5d7(0x1f1),_0x446b40))(_0x502f2b||{}),_0x47d699=(_0x50c932=>(_0x50c932[_0x4cb5d7(0x1ca)]=_0x4cb5d7(0x1ca),_0x50c932[_0x4cb5d7(0x1cf)]=_0x4cb5d7(0x1cf),_0x50c932[_0x4cb5d7(0x1d5)]=_0x4cb5d7(0x1d5),_0x50c932))(_0x47d699||{}),_0x488498=(_0x1e9af4=>(_0x1e9af4['Normal']='Normal',_0x1e9af4[_0x4cb5d7(0x1ce)]=_0x4cb5d7(0x1ce),_0x1e9af4[_0x4cb5d7(0x1e2)]=_0x4cb5d7(0x1e2),_0x1e9af4[_0x4cb5d7(0x1d1)]='None',_0x1e9af4))(_0x488498||{});const _0x527869={[_0x488498[_0x4cb5d7(0x1e7)]]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[_0x488498[_0x4cb5d7(0x1ce)]]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[_0x488498[_0x4cb5d7(0x1e2)]]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[_0x488498[_0x4cb5d7(0x1d1)]]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},_0x4619c1='printing-canvas-container',_0x290c4f='printing-canvas';function _0x5dd78c(_0x558336,_0x3469bb,_0x39e09e){const _0x4f9e61=_0x4cb5d7,_0x1a6332=_0x39e09e===_0x46d056[_0x4f9e61(0x1d4)]?_0x558336:_0x3469bb,_0x19b86e=_0x39e09e===_0x46d056['Portrait']?_0x3469bb:_0x558336,_0x3f3bd7=_0x4f9e61(0x1e6)+_0x1a6332+_0x4f9e61(0x1e4)+_0x19b86e+_0x4f9e61(0x1de)+_0x4619c1+_0x4f9e61(0x1f0)+_0x4619c1+_0x4f9e61(0x1cc)+_0x290c4f+_0x4f9e61(0x1ea)+_0x19b86e+_0x4f9e61(0x1dc)+_0x1a6332+_0x4f9e61(0x1cd),_0x15aea5=document[_0x4f9e61(0x1d3)](_0x4f9e61(0x1c9));return _0x15aea5[_0x4f9e61(0x1f4)]=_0x3f3bd7,_0x15aea5[_0x4f9e61(0x1ec)]=_0x4f9e61(0x1dd),_0x15aea5;}_0x13dee9[_0x4cb5d7(0x1d9)]=_0x290c4f,_0x13dee9['PRINT_CONTAINER_CLASS']=_0x4619c1,_0x13dee9[_0x4cb5d7(0x1f6)]=_0x527869,_0x13dee9[_0x4cb5d7(0x1cb)]=_0x47d699,_0x13dee9[_0x4cb5d7(0x1e8)]=_0x46d056,_0x13dee9[_0x4cb5d7(0x1f5)]=_0x488498,_0x13dee9[_0x4cb5d7(0x1df)]=_0x502f2b,_0x13dee9['createPrintStyle']=_0x5dd78c,Object[_0x4cb5d7(0x1e0)](_0x13dee9,Symbol['toStringTag'],{'value':_0x4cb5d7(0x1e3)});}));function _0x4d5b(_0x5c8455,_0x163ba1){const _0x3e03df=_0x3e03();return _0x4d5b=function(_0x4d5b2b,_0x5e3c06){_0x4d5b2b=_0x4d5b2b-0x1c9;let _0x6ba245=_0x3e03df[_0x4d5b2b];return _0x6ba245;},_0x4d5b(_0x5c8455,_0x163ba1);}function _0x3e03(){const _0xdba12d=['Start','PrintAlign','\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a}','Narrow','End','259lAmBvo','None','exports','createElement','Portrait','Middle','object','1425504IUtIao','1247507shMBXK','PRINT_CANVAS_CLASS','211338gMPXDU','amd','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','offline-printing-css','px;\x20\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.','PrintScale','defineProperty','5114904uodmHi','Wide','Module','px\x20','FitPage','\x0a@media\x20print\x20{\x0a\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','Normal','PrintDirection','Landscape','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','FitWidth','className','6661255HPYwhd','1121172zwXIus','2917152Pmqayv',',\x20.','Custom','FitHeight','Origin','innerHTML','PrintPaperMargin','PaperMarginMap','style'];_0x3e03=function(){return _0xdba12d;};return _0x3e03();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/print",
3
- "version": "0.6.10",
3
+ "version": "0.7.0-nightly.202504291607",
4
4
  "private": false,
5
5
  "description": "Print module for UniverJS",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -43,9 +43,9 @@
43
43
  ],
44
44
  "devDependencies": {
45
45
  "typescript": "^5.8.3",
46
- "vite": "^6.3.0",
47
- "vitest": "^3.1.1",
48
- "@univerjs-infra/shared": "0.6.10"
46
+ "vite": "^6.3.3",
47
+ "vitest": "^3.1.2",
48
+ "@univerjs-infra/shared": "0.7.0-beta.0"
49
49
  },
50
50
  "scripts": {
51
51
  "test": "vitest run",