@univerjs-pro/print 0.4.2 → 0.5.0-alpha.0

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 _0x528cdf=_0x31f2;(function(_0x383a96,_0x580bae){const _0x3e0993=_0x31f2,_0x93cd30=_0x383a96();while(!![]){try{const _0x1c8071=-parseInt(_0x3e0993(0xfe))/0x1+parseInt(_0x3e0993(0x10c))/0x2*(-parseInt(_0x3e0993(0x119))/0x3)+parseInt(_0x3e0993(0x101))/0x4*(parseInt(_0x3e0993(0xfc))/0x5)+parseInt(_0x3e0993(0x116))/0x6*(-parseInt(_0x3e0993(0xf1))/0x7)+parseInt(_0x3e0993(0xf9))/0x8*(parseInt(_0x3e0993(0xf2))/0x9)+-parseInt(_0x3e0993(0x112))/0xa+-parseInt(_0x3e0993(0xed))/0xb*(-parseInt(_0x3e0993(0x105))/0xc);if(_0x1c8071===_0x580bae)break;else _0x93cd30['push'](_0x93cd30['shift']());}catch(_0x5d0623){_0x93cd30['push'](_0x93cd30['shift']());}}}(_0x967c,0x29b95));function _0x31f2(_0x494bea,_0x1a00d9){const _0x967cee=_0x967c();return _0x31f2=function(_0x31f2de,_0x577832){_0x31f2de=_0x31f2de-0xec;let _0x22eb63=_0x967cee[_0x31f2de];return _0x22eb63;},_0x31f2(_0x494bea,_0x1a00d9);}Object[_0x528cdf(0x122)](exports,Symbol[_0x528cdf(0xf5)],{'value':_0x528cdf(0xf7)});var e=(_0x3ff6fc=>(_0x3ff6fc[_0x528cdf(0x11c)]=_0x528cdf(0x11c),_0x3ff6fc[_0x528cdf(0x11a)]=_0x528cdf(0x11a),_0x3ff6fc[_0x528cdf(0xef)]=_0x528cdf(0xef),_0x3ff6fc['Statement']=_0x528cdf(0x108),_0x3ff6fc[_0x528cdf(0x100)]=_0x528cdf(0x100),_0x3ff6fc[_0x528cdf(0x109)]=_0x528cdf(0x109),_0x3ff6fc['A3']='A3',_0x3ff6fc['A4']='A4',_0x3ff6fc['A5']='A5',_0x3ff6fc['B4']='B4',_0x3ff6fc['B5']='B5',_0x3ff6fc))(e||{}),i=(_0x1027c9=>(_0x1027c9[_0x528cdf(0x118)]=_0x528cdf(0x118),_0x1027c9['Landscape']=_0x528cdf(0xf0),_0x1027c9))(i||{}),c=(_0x4b8992=>(_0x4b8992[_0x528cdf(0xff)]=_0x528cdf(0xff),_0x4b8992[_0x528cdf(0x10a)]=_0x528cdf(0x10a),_0x4b8992[_0x528cdf(0x10f)]=_0x528cdf(0x10f),_0x4b8992[_0x528cdf(0x10d)]=_0x528cdf(0x10d),_0x4b8992[_0x528cdf(0x115)]=_0x528cdf(0x115),_0x4b8992))(c||{}),g=(_0x531ef9=>(_0x531ef9[_0x528cdf(0x120)]=_0x528cdf(0x120),_0x531ef9[_0x528cdf(0x117)]=_0x528cdf(0x117),_0x531ef9[_0x528cdf(0x11d)]='Middle',_0x531ef9))(g||{}),o=(_0x401ef8=>(_0x401ef8[_0x528cdf(0xfd)]='Normal',_0x401ef8['Narrow']=_0x528cdf(0x11e),_0x401ef8['Wide']=_0x528cdf(0xf8),_0x401ef8['None']=_0x528cdf(0x104),_0x401ef8))(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['Executive']]:{'w':0x2b8,'h':0x3f0},[e['Folio']]:{'w':0x330,'h':0x4e0},[e[_0x528cdf(0xef)]]:{'w':0x330,'h':0x540},[e[_0x528cdf(0x11c)]]:{'w':0x330,'h':0x420},[e[_0x528cdf(0x108)]]:{'w':0x210,'h':0x330},[e[_0x528cdf(0x11a)]]:{'w':0x420,'h':0x660}},N={[o['Normal']]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[o['Narrow']]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[o[_0x528cdf(0xf8)]]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[o[_0x528cdf(0x104)]]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},n='printing-canvas-container',p=_0x528cdf(0x113);function A(_0x35d0e9,_0x52d800){const _0x3afd00=_0x528cdf,{w:_0x4a0968,h:_0x47cd0a}=m[_0x35d0e9],_0x49045e=_0x52d800===i['Portrait']?_0x4a0968:_0x47cd0a,_0x5a972b=_0x52d800===i[_0x3afd00(0x118)]?_0x47cd0a:_0x4a0968,_0x36b095='\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'+_0x49045e+_0x3afd00(0x110)+_0x5a972b+_0x3afd00(0xfa)+n+_0x3afd00(0x107)+n+_0x3afd00(0xee)+p+_0x3afd00(0xf4)+_0x5a972b+'px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20'+_0x49045e+_0x3afd00(0x11f),_0x56d2f9=document[_0x3afd00(0xf6)](_0x3afd00(0x106));return _0x56d2f9['innerHTML']=_0x36b095,_0x56d2f9[_0x3afd00(0x114)]='offline-printing-css',_0x56d2f9;}function _0x967c(){const _0x1663d3=['1276497HkSnJp','PaperMarginMap','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','toStringTag','createElement','Module','Wide','16MzCXhn','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.','PrintPaperSize','336785DnZPKL','Normal','149630jHlyfi','Origin','Executive','20ufgJQl','PRINT_CONTAINER_CLASS','PrintDirection','None','3591672FQmDag','style',',\x20.','Statement','Folio','FitWidth','createPrintStyle','2VNRgVH','FitPage','PrintAlign','FitHeight','px\x20','PrintPaperMargin','923010AfwMMz','printing-canvas','className','Custom','30ayUdAN','End','Portrait','823245dTVWsL','Tabloid','PaperSizePxMap','Letter','Middle','Narrow','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a}','Start','PRINT_CANVAS_CLASS','defineProperty','PrintScale','11TbKyTl','\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','Landscape','325514jXbnwC'];_0x967c=function(){return _0x1663d3;};return _0x967c();}exports[_0x528cdf(0x121)]=p,exports[_0x528cdf(0x102)]=n,exports[_0x528cdf(0xf3)]=N,exports[_0x528cdf(0x11b)]=m,exports[_0x528cdf(0x10e)]=g,exports[_0x528cdf(0x103)]=i,exports[_0x528cdf(0x111)]=o,exports[_0x528cdf(0xfb)]=e,exports[_0x528cdf(0xec)]=c,exports[_0x528cdf(0x10b)]=A;
1
+ 'use strict';const _0x3de9a3=_0x1642;(function(_0xc8f7c8,_0x1ea47c){const _0x4ee2a3=_0x1642,_0x1a54a5=_0xc8f7c8();while(!![]){try{const _0x182b0d=-parseInt(_0x4ee2a3(0x15d))/0x1*(-parseInt(_0x4ee2a3(0x18f))/0x2)+parseInt(_0x4ee2a3(0x171))/0x3+parseInt(_0x4ee2a3(0x179))/0x4*(parseInt(_0x4ee2a3(0x17a))/0x5)+parseInt(_0x4ee2a3(0x17f))/0x6+-parseInt(_0x4ee2a3(0x189))/0x7+parseInt(_0x4ee2a3(0x16f))/0x8*(parseInt(_0x4ee2a3(0x181))/0x9)+-parseInt(_0x4ee2a3(0x176))/0xa;if(_0x182b0d===_0x1ea47c)break;else _0x1a54a5['push'](_0x1a54a5['shift']());}catch(_0x4076e2){_0x1a54a5['push'](_0x1a54a5['shift']());}}}(_0x14c0,0x8f945));function _0x1642(_0x4fe375,_0x5b5770){const _0x14c095=_0x14c0();return _0x1642=function(_0x1642fb,_0x4002c9){_0x1642fb=_0x1642fb-0x15c;let _0x199864=_0x14c095[_0x1642fb];return _0x199864;},_0x1642(_0x4fe375,_0x5b5770);}Object[_0x3de9a3(0x16a)](exports,Symbol[_0x3de9a3(0x18d)],{'value':_0x3de9a3(0x15c)});var e=(_0x5e8e4e=>(_0x5e8e4e['Letter']=_0x3de9a3(0x191),_0x5e8e4e[_0x3de9a3(0x170)]=_0x3de9a3(0x170),_0x5e8e4e[_0x3de9a3(0x16d)]='Legal',_0x5e8e4e['Statement']=_0x3de9a3(0x167),_0x5e8e4e[_0x3de9a3(0x18c)]=_0x3de9a3(0x18c),_0x5e8e4e[_0x3de9a3(0x168)]=_0x3de9a3(0x168),_0x5e8e4e['A3']='A3',_0x5e8e4e['A4']='A4',_0x5e8e4e['A5']='A5',_0x5e8e4e['B4']='B4',_0x5e8e4e['B5']='B5',_0x5e8e4e))(e||{}),i=(_0x4b115c=>(_0x4b115c[_0x3de9a3(0x173)]=_0x3de9a3(0x173),_0x4b115c[_0x3de9a3(0x165)]=_0x3de9a3(0x165),_0x4b115c))(i||{}),c=(_0xeb2688=>(_0xeb2688[_0x3de9a3(0x18b)]=_0x3de9a3(0x18b),_0xeb2688['FitWidth']=_0x3de9a3(0x172),_0xeb2688[_0x3de9a3(0x187)]='FitHeight',_0xeb2688[_0x3de9a3(0x161)]='FitPage',_0xeb2688[_0x3de9a3(0x177)]='Custom',_0xeb2688))(c||{}),g=(_0x243ac1=>(_0x243ac1[_0x3de9a3(0x18a)]='Start',_0x243ac1[_0x3de9a3(0x183)]=_0x3de9a3(0x183),_0x243ac1[_0x3de9a3(0x16b)]=_0x3de9a3(0x16b),_0x243ac1))(g||{}),o=(_0x9d1949=>(_0x9d1949[_0x3de9a3(0x169)]=_0x3de9a3(0x169),_0x9d1949[_0x3de9a3(0x17c)]=_0x3de9a3(0x17c),_0x9d1949[_0x3de9a3(0x186)]='Wide',_0x9d1949[_0x3de9a3(0x175)]='None',_0x9d1949))(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[_0x3de9a3(0x18c)]]:{'w':0x2b8,'h':0x3f0},[e['Folio']]:{'w':0x330,'h':0x4e0},[e[_0x3de9a3(0x16d)]]:{'w':0x330,'h':0x540},[e[_0x3de9a3(0x191)]]:{'w':0x330,'h':0x420},[e['Statement']]:{'w':0x210,'h':0x330},[e[_0x3de9a3(0x170)]]:{'w':0x420,'h':0x660}},N={[o[_0x3de9a3(0x169)]]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[o['Narrow']]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[o['Wide']]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[o[_0x3de9a3(0x175)]]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},n=_0x3de9a3(0x184),p=_0x3de9a3(0x174);function A(_0x38e4d9,_0x5b764f){const _0x1ed9af=_0x3de9a3,{w:_0x235bb5,h:_0x46dc3c}=m[_0x38e4d9],_0x5f85fa=_0x5b764f===i[_0x1ed9af(0x173)]?_0x235bb5:_0x46dc3c,_0x424f08=_0x5b764f===i[_0x1ed9af(0x173)]?_0x46dc3c:_0x235bb5,_0x251ced='\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'+_0x5f85fa+_0x1ed9af(0x182)+_0x424f08+_0x1ed9af(0x16e)+n+_0x1ed9af(0x178)+n+_0x1ed9af(0x164)+p+_0x1ed9af(0x188)+_0x424f08+_0x1ed9af(0x18e)+_0x5f85fa+_0x1ed9af(0x160),_0x52c0f8=document[_0x1ed9af(0x15f)](_0x1ed9af(0x180));return _0x52c0f8[_0x1ed9af(0x163)]=_0x251ced,_0x52c0f8[_0x1ed9af(0x17d)]=_0x1ed9af(0x166),_0x52c0f8;}function _0x14c0(){const _0x5cebc6=['createPrintStyle','innerHTML','\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.','Landscape','offline-printing-css','Statement','Folio','Normal','defineProperty','Middle','PRINT_CONTAINER_CLASS','Legal','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.','3797384ubxlYy','Tabloid','932226bIQKlD','FitWidth','Portrait','printing-canvas','None','24010890Chwtqu','Custom',',\x20.','3854828gkvOjK','5VJZgTq','PrintPaperMargin','Narrow','className','PrintScale','5426838dskdvl','style','9Udnucy','px\x20','End','printing-canvas-container','PaperMarginMap','Wide','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','1335824QhiyRT','Start','Origin','Executive','toStringTag','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','1052854FTmHrI','PrintPaperSize','Letter','Module','1hySZiH','PaperSizePxMap','createElement','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a}','FitPage'];_0x14c0=function(){return _0x5cebc6;};return _0x14c0();}exports['PRINT_CANVAS_CLASS']=p,exports[_0x3de9a3(0x16c)]=n,exports[_0x3de9a3(0x185)]=N,exports[_0x3de9a3(0x15e)]=m,exports['PrintAlign']=g,exports['PrintDirection']=i,exports[_0x3de9a3(0x17b)]=o,exports[_0x3de9a3(0x190)]=e,exports[_0x3de9a3(0x17e)]=c,exports[_0x3de9a3(0x162)]=A;
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- function _0x2827(_0xfcfdb1,_0x31ea03){const _0x318648=_0x3186();return _0x2827=function(_0x28275a,_0x4edc66){_0x28275a=_0x28275a-0xd8;let _0x541e41=_0x318648[_0x28275a];return _0x541e41;},_0x2827(_0xfcfdb1,_0x31ea03);}function _0x3186(){const _0x9290b0=['FitHeight','None','Custom','\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','Portrait','Executive',',\x20.','3yetgJf','px\x20','createElement','10370248lPsKkF','Tabloid','Middle','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','32126CneoyC','className','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.','FitPage','style','innerHTML','End','Legal','Narrow','6XGwbxN','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a}','Folio','offline-printing-css','2175381cYtbmR','Landscape','Letter','printing-canvas','Normal','703600PRyJFG','4370WCacnd','2558585cFqtEM','Statement','FitWidth','2024MeSdHi','51aZqWPW','4596697OIKANW','Wide'];_0x3186=function(){return _0x9290b0;};return _0x3186();}const _0x1bb0a5=_0x2827;(function(_0x13a8fe,_0x311029){const _0x9907b1=_0x2827,_0x136d96=_0x13a8fe();while(!![]){try{const _0x1232fe=-parseInt(_0x9907b1(0xda))/0x1*(parseInt(_0x9907b1(0xeb))/0x2)+parseInt(_0x9907b1(0xe4))/0x3*(-parseInt(_0x9907b1(0xfd))/0x4)+-parseInt(_0x9907b1(0xff))/0x5+-parseInt(_0x9907b1(0xf4))/0x6*(-parseInt(_0x9907b1(0xdb))/0x7)+parseInt(_0x9907b1(0xe7))/0x8+parseInt(_0x9907b1(0xf8))/0x9+-parseInt(_0x9907b1(0xfe))/0xa*(-parseInt(_0x9907b1(0xd9))/0xb);if(_0x1232fe===_0x311029)break;else _0x136d96['push'](_0x136d96['shift']());}catch(_0x56ac95){_0x136d96['push'](_0x136d96['shift']());}}}(_0x3186,0xbb8ef));var o=(_0x5d66c8=>(_0x5d66c8[_0x1bb0a5(0xfa)]=_0x1bb0a5(0xfa),_0x5d66c8['Tabloid']='Tabloid',_0x5d66c8['Legal']='Legal',_0x5d66c8[_0x1bb0a5(0x100)]='Statement',_0x5d66c8[_0x1bb0a5(0xe2)]=_0x1bb0a5(0xe2),_0x5d66c8[_0x1bb0a5(0xf6)]='Folio',_0x5d66c8['A3']='A3',_0x5d66c8['A4']='A4',_0x5d66c8['A5']='A5',_0x5d66c8['B4']='B4',_0x5d66c8['B5']='B5',_0x5d66c8))(o||{}),i=(_0x546983=>(_0x546983[_0x1bb0a5(0xe1)]=_0x1bb0a5(0xe1),_0x546983[_0x1bb0a5(0xf9)]=_0x1bb0a5(0xf9),_0x546983))(i||{}),w=(_0x40a8c6=>(_0x40a8c6['Origin']='Origin',_0x40a8c6[_0x1bb0a5(0xd8)]=_0x1bb0a5(0xd8),_0x40a8c6[_0x1bb0a5(0xdd)]=_0x1bb0a5(0xdd),_0x40a8c6[_0x1bb0a5(0xee)]='FitPage',_0x40a8c6[_0x1bb0a5(0xdf)]=_0x1bb0a5(0xdf),_0x40a8c6))(w||{}),m=(_0x3e76ff=>(_0x3e76ff['Start']='Start',_0x3e76ff['End']=_0x1bb0a5(0xf1),_0x3e76ff[_0x1bb0a5(0xe9)]='Middle',_0x3e76ff))(m||{}),e=(_0x2666b0=>(_0x2666b0[_0x1bb0a5(0xfc)]=_0x1bb0a5(0xfc),_0x2666b0[_0x1bb0a5(0xf3)]=_0x1bb0a5(0xf3),_0x2666b0[_0x1bb0a5(0xdc)]=_0x1bb0a5(0xdc),_0x2666b0['None']=_0x1bb0a5(0xde),_0x2666b0))(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['Executive']]:{'w':0x2b8,'h':0x3f0},[o[_0x1bb0a5(0xf6)]]:{'w':0x330,'h':0x4e0},[o[_0x1bb0a5(0xf2)]]:{'w':0x330,'h':0x540},[o[_0x1bb0a5(0xfa)]]:{'w':0x330,'h':0x420},[o['Statement']]:{'w':0x210,'h':0x330},[o[_0x1bb0a5(0xe8)]]:{'w':0x420,'h':0x660}},v={[e[_0x1bb0a5(0xfc)]]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[e[_0x1bb0a5(0xf3)]]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[e['Wide']]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[e['None']]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},l='printing-canvas-container',p=_0x1bb0a5(0xfb);function N(_0x225e95,_0x436e79){const _0x16202f=_0x1bb0a5,{w:_0x5089fc,h:_0xe5f02}=g[_0x225e95],_0x33c3e3=_0x436e79===i[_0x16202f(0xe1)]?_0x5089fc:_0xe5f02,_0x146a0c=_0x436e79===i['Portrait']?_0xe5f02:_0x5089fc,_0x288ef2=_0x16202f(0xe0)+_0x33c3e3+_0x16202f(0xe5)+_0x146a0c+_0x16202f(0xed)+l+_0x16202f(0xe3)+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+'\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20'+_0x146a0c+_0x16202f(0xea)+_0x33c3e3+_0x16202f(0xf5),_0x11163b=document[_0x16202f(0xe6)](_0x16202f(0xef));return _0x11163b[_0x16202f(0xf0)]=_0x288ef2,_0x11163b[_0x16202f(0xec)]=_0x16202f(0xf7),_0x11163b;}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 _0x3e38df=_0x10c4;(function(_0x209f9f,_0x2f2662){const _0x559793=_0x10c4,_0x55e51c=_0x209f9f();while(!![]){try{const _0x4125b4=parseInt(_0x559793(0xe4))/0x1+parseInt(_0x559793(0xca))/0x2+-parseInt(_0x559793(0xc9))/0x3*(parseInt(_0x559793(0xe3))/0x4)+parseInt(_0x559793(0xde))/0x5+-parseInt(_0x559793(0xc7))/0x6+-parseInt(_0x559793(0xcc))/0x7+-parseInt(_0x559793(0xbf))/0x8*(-parseInt(_0x559793(0xd0))/0x9);if(_0x4125b4===_0x2f2662)break;else _0x55e51c['push'](_0x55e51c['shift']());}catch(_0x36ea2c){_0x55e51c['push'](_0x55e51c['shift']());}}}(_0x1475,0xa1f88));function _0x1475(){const _0x555f1b=['style','Statement','943119uBeFvT','Narrow','Wide','offline-printing-css','Letter','Origin','Middle',',\x20.','End','FitHeight','Custom','innerHTML','FitPage','Tabloid','1425240rExQfE','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a}','className','None','Normal','204ELiOAR','898033NbFuHH','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','px\x20','Portrait','Executive','88SeoAKn','\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','\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.','printing-canvas','Start','Landscape','Legal','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','1124988RqwgZI','Folio','65343CEhjec','1250698XLGdtO','FitWidth','6995590ekmWBQ','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.'];_0x1475=function(){return _0x555f1b;};return _0x1475();}function _0x10c4(_0x4b6f47,_0x296ab8){const _0x147574=_0x1475();return _0x10c4=function(_0x10c4c0,_0x4e9bc2){_0x10c4c0=_0x10c4c0-0xbd;let _0x383a6e=_0x147574[_0x10c4c0];return _0x383a6e;},_0x10c4(_0x4b6f47,_0x296ab8);}var o=(_0x20a1af=>(_0x20a1af[_0x3e38df(0xd4)]=_0x3e38df(0xd4),_0x20a1af[_0x3e38df(0xdd)]='Tabloid',_0x20a1af['Legal']=_0x3e38df(0xc5),_0x20a1af['Statement']='Statement',_0x20a1af['Executive']=_0x3e38df(0xbe),_0x20a1af[_0x3e38df(0xc8)]='Folio',_0x20a1af['A3']='A3',_0x20a1af['A4']='A4',_0x20a1af['A5']='A5',_0x20a1af['B4']='B4',_0x20a1af['B5']='B5',_0x20a1af))(o||{}),i=(_0x13c5d0=>(_0x13c5d0[_0x3e38df(0xbd)]=_0x3e38df(0xbd),_0x13c5d0[_0x3e38df(0xc4)]=_0x3e38df(0xc4),_0x13c5d0))(i||{}),w=(_0x2c72f5=>(_0x2c72f5[_0x3e38df(0xd5)]='Origin',_0x2c72f5[_0x3e38df(0xcb)]=_0x3e38df(0xcb),_0x2c72f5[_0x3e38df(0xd9)]=_0x3e38df(0xd9),_0x2c72f5['FitPage']=_0x3e38df(0xdc),_0x2c72f5[_0x3e38df(0xda)]=_0x3e38df(0xda),_0x2c72f5))(w||{}),m=(_0x53163d=>(_0x53163d[_0x3e38df(0xc3)]='Start',_0x53163d[_0x3e38df(0xd8)]=_0x3e38df(0xd8),_0x53163d[_0x3e38df(0xd6)]=_0x3e38df(0xd6),_0x53163d))(m||{}),e=(_0x39f112=>(_0x39f112[_0x3e38df(0xe2)]='Normal',_0x39f112[_0x3e38df(0xd1)]=_0x3e38df(0xd1),_0x39f112['Wide']=_0x3e38df(0xd2),_0x39f112[_0x3e38df(0xe1)]=_0x3e38df(0xe1),_0x39f112))(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[_0x3e38df(0xbe)]]:{'w':0x2b8,'h':0x3f0},[o[_0x3e38df(0xc8)]]:{'w':0x330,'h':0x4e0},[o[_0x3e38df(0xc5)]]:{'w':0x330,'h':0x540},[o[_0x3e38df(0xd4)]]:{'w':0x330,'h':0x420},[o[_0x3e38df(0xcf)]]:{'w':0x210,'h':0x330},[o[_0x3e38df(0xdd)]]:{'w':0x420,'h':0x660}},v={[e['Normal']]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[e[_0x3e38df(0xd1)]]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[e[_0x3e38df(0xd2)]]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[e[_0x3e38df(0xe1)]]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},l='printing-canvas-container',p=_0x3e38df(0xc2);function N(_0x2250d5,_0x15f2e7){const _0x51d917=_0x3e38df,{w:_0x505cfe,h:_0x5be308}=g[_0x2250d5],_0x12ef07=_0x15f2e7===i['Portrait']?_0x505cfe:_0x5be308,_0x436e49=_0x15f2e7===i[_0x51d917(0xbd)]?_0x5be308:_0x505cfe,_0x50a7f6=_0x51d917(0xc0)+_0x12ef07+_0x51d917(0xe6)+_0x436e49+_0x51d917(0xcd)+l+_0x51d917(0xd7)+l+_0x51d917(0xc1)+p+_0x51d917(0xe5)+_0x436e49+_0x51d917(0xc6)+_0x12ef07+_0x51d917(0xdf),_0x219dee=document['createElement'](_0x51d917(0xce));return _0x219dee[_0x51d917(0xdb)]=_0x50a7f6,_0x219dee[_0x51d917(0xe0)]=_0x51d917(0xd3),_0x219dee;}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 +1,63 @@
1
- export * from './common';
1
+ export declare function createPrintStyle(paperSize: PrintPaperSize, direction: PrintDirection): HTMLStyleElement;
2
+
3
+ declare interface IPaperSize {
4
+ w: number;
5
+ h: number;
6
+ }
7
+
8
+ export declare interface IPrintMargin {
9
+ top: number;
10
+ left: number;
11
+ right: number;
12
+ bottom: number;
13
+ }
14
+
15
+ export declare const PaperMarginMap: Record<PrintPaperMargin, IPrintMargin>;
16
+
17
+ export declare const PaperSizePxMap: Record<PrintPaperSize, IPaperSize>;
18
+
19
+ export declare const PRINT_CANVAS_CLASS = "printing-canvas";
20
+
21
+ export declare const PRINT_CONTAINER_CLASS = "printing-canvas-container";
22
+
23
+ export declare enum PrintAlign {
24
+ Start = "Start",
25
+ End = "End",
26
+ Middle = "Middle"
27
+ }
28
+
29
+ export declare enum PrintDirection {
30
+ Portrait = "Portrait",
31
+ Landscape = "Landscape"
32
+ }
33
+
34
+ export declare enum PrintPaperMargin {
35
+ Normal = "Normal",
36
+ Narrow = "Narrow",
37
+ Wide = "Wide",
38
+ None = "None"
39
+ }
40
+
41
+ export declare enum PrintPaperSize {
42
+ Letter = "Letter",
43
+ Tabloid = "Tabloid",
44
+ Legal = "Legal",
45
+ Statement = "Statement",
46
+ Executive = "Executive",
47
+ Folio = "Folio",
48
+ A3 = "A3",
49
+ A4 = "A4",
50
+ A5 = "A5",
51
+ B4 = "B4",
52
+ B5 = "B5"
53
+ }
54
+
55
+ export declare enum PrintScale {
56
+ Origin = "Origin",
57
+ FitWidth = "FitWidth",
58
+ FitHeight = "FitHeight",
59
+ FitPage = "FitPage",
60
+ Custom = "Custom"
61
+ }
62
+
63
+ export { }
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x292f59,_0x4dc288){const _0x95fa21=_0x59c4,_0xf27dc=_0x292f59();while(!![]){try{const _0xc09503=parseInt(_0x95fa21(0x166))/0x1+parseInt(_0x95fa21(0x159))/0x2+-parseInt(_0x95fa21(0x15c))/0x3*(parseInt(_0x95fa21(0x13b))/0x4)+-parseInt(_0x95fa21(0x160))/0x5+-parseInt(_0x95fa21(0x155))/0x6+-parseInt(_0x95fa21(0x14b))/0x7+parseInt(_0x95fa21(0x14f))/0x8*(parseInt(_0x95fa21(0x13f))/0x9);if(_0xc09503===_0x4dc288)break;else _0xf27dc['push'](_0xf27dc['shift']());}catch(_0x1c753b){_0xf27dc['push'](_0xf27dc['shift']());}}}(_0x8a9d,0x93095),function(_0x163877,_0x153832){const _0x3a8b5e=_0x59c4;typeof exports==_0x3a8b5e(0x150)&&typeof module<'u'?_0x153832(exports):typeof define==_0x3a8b5e(0x163)&&define[_0x3a8b5e(0x141)]?define([_0x3a8b5e(0x15e)],_0x153832):(_0x163877=typeof globalThis<'u'?globalThis:_0x163877||self,_0x153832(_0x163877[_0x3a8b5e(0x138)]={}));}(this,function(_0x570fea){'use strict';const _0x40e20b=_0x59c4;var _0x5926d3=(_0x535eb7=>(_0x535eb7['Letter']=_0x40e20b(0x152),_0x535eb7[_0x40e20b(0x15b)]=_0x40e20b(0x15b),_0x535eb7[_0x40e20b(0x13d)]='Legal',_0x535eb7[_0x40e20b(0x156)]='Statement',_0x535eb7[_0x40e20b(0x16e)]=_0x40e20b(0x16e),_0x535eb7['Folio']=_0x40e20b(0x143),_0x535eb7['A3']='A3',_0x535eb7['A4']='A4',_0x535eb7['A5']='A5',_0x535eb7['B4']='B4',_0x535eb7['B5']='B5',_0x535eb7))(_0x5926d3||{}),_0x2d9850=(_0x31cdc0=>(_0x31cdc0['Portrait']=_0x40e20b(0x167),_0x31cdc0['Landscape']=_0x40e20b(0x162),_0x31cdc0))(_0x2d9850||{}),_0x1f56c4=(_0x34220e=>(_0x34220e[_0x40e20b(0x151)]='Origin',_0x34220e['FitWidth']=_0x40e20b(0x139),_0x34220e[_0x40e20b(0x16b)]=_0x40e20b(0x16b),_0x34220e[_0x40e20b(0x145)]=_0x40e20b(0x145),_0x34220e[_0x40e20b(0x140)]='Custom',_0x34220e))(_0x1f56c4||{}),_0x72bf4f=(_0x5155cd=>(_0x5155cd['Start']=_0x40e20b(0x14c),_0x5155cd[_0x40e20b(0x16a)]=_0x40e20b(0x16a),_0x5155cd[_0x40e20b(0x148)]='Middle',_0x5155cd))(_0x72bf4f||{}),_0x347171=(_0x3286f5=>(_0x3286f5['Normal']=_0x40e20b(0x164),_0x3286f5[_0x40e20b(0x153)]='Narrow',_0x3286f5[_0x40e20b(0x158)]=_0x40e20b(0x158),_0x3286f5[_0x40e20b(0x161)]=_0x40e20b(0x161),_0x3286f5))(_0x347171||{});const _0x2accb0={[_0x5926d3['A3']]:{'w':0x463,'h':0x633},[_0x5926d3['A4']]:{'w':0x31a,'h':0x464},[_0x5926d3['A5']]:{'w':0x22f,'h':0x31a},[_0x5926d3['B4']]:{'w':0x3b0,'h':0x540},[_0x5926d3['B5']]:{'w':0x299,'h':0x3b0},[_0x5926d3['Executive']]:{'w':0x2b8,'h':0x3f0},[_0x5926d3['Folio']]:{'w':0x330,'h':0x4e0},[_0x5926d3[_0x40e20b(0x13d)]]:{'w':0x330,'h':0x540},[_0x5926d3[_0x40e20b(0x152)]]:{'w':0x330,'h':0x420},[_0x5926d3['Statement']]:{'w':0x210,'h':0x330},[_0x5926d3[_0x40e20b(0x15b)]]:{'w':0x420,'h':0x660}},_0xb69046={[_0x347171['Normal']]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[_0x347171['Narrow']]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[_0x347171[_0x40e20b(0x158)]]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[_0x347171['None']]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},_0x39ee77='printing-canvas-container',_0x94815b=_0x40e20b(0x13e);function _0x3bf368(_0x4513b4,_0x1980d3){const _0x210bbd=_0x40e20b,{w:_0x218055,h:_0x30dcd0}=_0x2accb0[_0x4513b4],_0x553929=_0x1980d3===_0x2d9850[_0x210bbd(0x167)]?_0x218055:_0x30dcd0,_0x4ebc38=_0x1980d3===_0x2d9850[_0x210bbd(0x167)]?_0x30dcd0:_0x218055,_0x10a81f=_0x210bbd(0x16d)+_0x553929+'px\x20'+_0x4ebc38+_0x210bbd(0x142)+_0x39ee77+_0x210bbd(0x144)+_0x39ee77+'\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.'+_0x94815b+'\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x20'+_0x4ebc38+_0x210bbd(0x14d)+_0x553929+_0x210bbd(0x169),_0x56d4b4=document['createElement'](_0x210bbd(0x15d));return _0x56d4b4[_0x210bbd(0x146)]=_0x10a81f,_0x56d4b4[_0x210bbd(0x16c)]=_0x210bbd(0x154),_0x56d4b4;}_0x570fea[_0x40e20b(0x15f)]=_0x94815b,_0x570fea[_0x40e20b(0x165)]=_0x39ee77,_0x570fea[_0x40e20b(0x147)]=_0xb69046,_0x570fea[_0x40e20b(0x149)]=_0x2accb0,_0x570fea['PrintAlign']=_0x72bf4f,_0x570fea[_0x40e20b(0x15a)]=_0x2d9850,_0x570fea[_0x40e20b(0x14e)]=_0x347171,_0x570fea[_0x40e20b(0x13a)]=_0x5926d3,_0x570fea[_0x40e20b(0x16f)]=_0x1f56c4,_0x570fea[_0x40e20b(0x13c)]=_0x3bf368,Object[_0x40e20b(0x157)](_0x570fea,Symbol[_0x40e20b(0x168)],{'value':_0x40e20b(0x14a)});}));function _0x59c4(_0xaaba7e,_0x30ca99){const _0x8a9d4a=_0x8a9d();return _0x59c4=function(_0x59c4a7,_0x2b12ed){_0x59c4a7=_0x59c4a7-0x138;let _0x2e46ee=_0x8a9d4a[_0x59c4a7];return _0x2e46ee;},_0x59c4(_0xaaba7e,_0x30ca99);}function _0x8a9d(){const _0x113a09=['Normal','PRINT_CONTAINER_CLASS','202594JNMpIg','Portrait','toStringTag','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a}','End','FitHeight','className','\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','Executive','PrintScale','UniverPrint','FitWidth','PrintPaperSize','2791688gbtBZa','createPrintStyle','Legal','printing-canvas','104751edNDqd','Custom','amd','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.','Folio',',\x20.','FitPage','innerHTML','PaperMarginMap','Middle','PaperSizePxMap','Module','4515973RGJlnj','Start','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','PrintPaperMargin','2416fdFGwp','object','Origin','Letter','Narrow','offline-printing-css','4524114LxxsdW','Statement','defineProperty','Wide','49408yjwQEm','PrintDirection','Tabloid','3oDnrse','style','exports','PRINT_CANVAS_CLASS','5214675ROCZGY','None','Landscape','function'];_0x8a9d=function(){return _0x113a09;};return _0x8a9d();}
1
+ (function(_0xd405bb,_0x87bced){const _0x47364f=_0x3d95,_0x24108c=_0xd405bb();while(!![]){try{const _0x2c8d2a=-parseInt(_0x47364f(0x1e7))/0x1+-parseInt(_0x47364f(0x1f7))/0x2*(-parseInt(_0x47364f(0x1dd))/0x3)+parseInt(_0x47364f(0x1e5))/0x4+-parseInt(_0x47364f(0x1dc))/0x5*(-parseInt(_0x47364f(0x1c8))/0x6)+parseInt(_0x47364f(0x1f4))/0x7+-parseInt(_0x47364f(0x1db))/0x8+parseInt(_0x47364f(0x1d6))/0x9*(-parseInt(_0x47364f(0x1e1))/0xa);if(_0x2c8d2a===_0x87bced)break;else _0x24108c['push'](_0x24108c['shift']());}catch(_0x4b647f){_0x24108c['push'](_0x24108c['shift']());}}}(_0x3d82,0x6fa92),function(_0x2f9666,_0x15967f){const _0x35bd86=_0x3d95;typeof exports==_0x35bd86(0x1ee)&&typeof module<'u'?_0x15967f(exports):typeof define==_0x35bd86(0x1cb)&&define['amd']?define([_0x35bd86(0x1d1)],_0x15967f):(_0x2f9666=typeof globalThis<'u'?globalThis:_0x2f9666||self,_0x15967f(_0x2f9666[_0x35bd86(0x1e0)]={}));}(this,function(_0x42b097){'use strict';const _0xb5513b=_0x3d95;var _0x4f2109=(_0x514080=>(_0x514080[_0xb5513b(0x1e9)]=_0xb5513b(0x1e9),_0x514080[_0xb5513b(0x1f9)]=_0xb5513b(0x1f9),_0x514080[_0xb5513b(0x1ef)]='Legal',_0x514080[_0xb5513b(0x1d3)]=_0xb5513b(0x1d3),_0x514080[_0xb5513b(0x1ec)]=_0xb5513b(0x1ec),_0x514080[_0xb5513b(0x1f2)]='Folio',_0x514080['A3']='A3',_0x514080['A4']='A4',_0x514080['A5']='A5',_0x514080['B4']='B4',_0x514080['B5']='B5',_0x514080))(_0x4f2109||{}),_0x5d1bb1=(_0x4d8162=>(_0x4d8162[_0xb5513b(0x1ca)]='Portrait',_0x4d8162[_0xb5513b(0x1f1)]=_0xb5513b(0x1f1),_0x4d8162))(_0x5d1bb1||{}),_0x220b10=(_0x38fab5=>(_0x38fab5[_0xb5513b(0x1f0)]=_0xb5513b(0x1f0),_0x38fab5[_0xb5513b(0x1c6)]=_0xb5513b(0x1c6),_0x38fab5['FitHeight']=_0xb5513b(0x1fc),_0x38fab5[_0xb5513b(0x1de)]='FitPage',_0x38fab5[_0xb5513b(0x1f3)]='Custom',_0x38fab5))(_0x220b10||{}),_0x2787c5=(_0x1e3289=>(_0x1e3289[_0xb5513b(0x1cc)]=_0xb5513b(0x1cc),_0x1e3289[_0xb5513b(0x1d7)]=_0xb5513b(0x1d7),_0x1e3289[_0xb5513b(0x1e8)]='Middle',_0x1e3289))(_0x2787c5||{}),_0x4cfcd5=(_0x8123df=>(_0x8123df[_0xb5513b(0x1ea)]=_0xb5513b(0x1ea),_0x8123df[_0xb5513b(0x1d4)]=_0xb5513b(0x1d4),_0x8123df[_0xb5513b(0x1cd)]=_0xb5513b(0x1cd),_0x8123df['None']=_0xb5513b(0x1d0),_0x8123df))(_0x4cfcd5||{});const _0x2ccb77={[_0x4f2109['A3']]:{'w':0x463,'h':0x633},[_0x4f2109['A4']]:{'w':0x31a,'h':0x464},[_0x4f2109['A5']]:{'w':0x22f,'h':0x31a},[_0x4f2109['B4']]:{'w':0x3b0,'h':0x540},[_0x4f2109['B5']]:{'w':0x299,'h':0x3b0},[_0x4f2109['Executive']]:{'w':0x2b8,'h':0x3f0},[_0x4f2109[_0xb5513b(0x1f2)]]:{'w':0x330,'h':0x4e0},[_0x4f2109[_0xb5513b(0x1ef)]]:{'w':0x330,'h':0x540},[_0x4f2109[_0xb5513b(0x1e9)]]:{'w':0x330,'h':0x420},[_0x4f2109['Statement']]:{'w':0x210,'h':0x330},[_0x4f2109[_0xb5513b(0x1f9)]]:{'w':0x420,'h':0x660}},_0x1b09ad={[_0x4cfcd5[_0xb5513b(0x1ea)]]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[_0x4cfcd5['Narrow']]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[_0x4cfcd5[_0xb5513b(0x1cd)]]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[_0x4cfcd5[_0xb5513b(0x1d0)]]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},_0x12609f='printing-canvas-container',_0x590fa5=_0xb5513b(0x1ce);function _0x194eb1(_0x4abb63,_0x141a36){const _0x462137=_0xb5513b,{w:_0x36894f,h:_0x4db716}=_0x2ccb77[_0x4abb63],_0x58a014=_0x141a36===_0x5d1bb1[_0x462137(0x1ca)]?_0x36894f:_0x4db716,_0x5b2efd=_0x141a36===_0x5d1bb1[_0x462137(0x1ca)]?_0x4db716:_0x36894f,_0x225f64='\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'+_0x58a014+_0x462137(0x1e6)+_0x5b2efd+_0x462137(0x1d8)+_0x12609f+_0x462137(0x1e2)+_0x12609f+'\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.'+_0x590fa5+_0x462137(0x1d9)+_0x5b2efd+_0x462137(0x1c7)+_0x58a014+_0x462137(0x1df),_0x401da4=document[_0x462137(0x1cf)](_0x462137(0x1f6));return _0x401da4[_0x462137(0x1e4)]=_0x225f64,_0x401da4[_0x462137(0x1fb)]=_0x462137(0x1f8),_0x401da4;}_0x42b097[_0xb5513b(0x1eb)]=_0x590fa5,_0x42b097[_0xb5513b(0x1da)]=_0x12609f,_0x42b097[_0xb5513b(0x1fa)]=_0x1b09ad,_0x42b097[_0xb5513b(0x1e3)]=_0x2ccb77,_0x42b097[_0xb5513b(0x1ed)]=_0x2787c5,_0x42b097[_0xb5513b(0x1f5)]=_0x5d1bb1,_0x42b097['PrintPaperMargin']=_0x4cfcd5,_0x42b097['PrintPaperSize']=_0x4f2109,_0x42b097[_0xb5513b(0x1d2)]=_0x220b10,_0x42b097[_0xb5513b(0x1d5)]=_0x194eb1,Object['defineProperty'](_0x42b097,Symbol[_0xb5513b(0x1c9)],{'value':'Module'});}));function _0x3d95(_0x292ad6,_0xb48340){const _0x3d822b=_0x3d82();return _0x3d95=function(_0x3d95da,_0x17d469){_0x3d95da=_0x3d95da-0x1c6;let _0x4266e7=_0x3d822b[_0x3d95da];return _0x4266e7;},_0x3d95(_0x292ad6,_0xb48340);}function _0x3d82(){const _0x2f9f8f=['function','Start','Wide','printing-canvas','createElement','None','exports','PrintScale','Statement','Narrow','createPrintStyle','47853JtDWWB','End','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','PRINT_CONTAINER_CLASS','5871912QIyFRW','84815rAZKVa','508440tZawIb','FitPage','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a}','UniverPrint','1590tdsijc',',\x20.','PaperSizePxMap','innerHTML','2207480nAihDa','px\x20','901586YPSoBL','Middle','Letter','Normal','PRINT_CANVAS_CLASS','Executive','PrintAlign','object','Legal','Origin','Landscape','Folio','Custom','5905109BTscbf','PrintDirection','style','10rFMJXZ','offline-printing-css','Tabloid','PaperMarginMap','className','FitHeight','FitWidth','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','246UJcWBN','toStringTag','Portrait'];_0x3d82=function(){return _0x2f9f8f;};return _0x3d82();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/print",
3
- "version": "0.4.2",
3
+ "version": "0.5.0-alpha.0",
4
4
  "private": false,
5
5
  "description": "Print module for UniverJS",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -30,8 +30,7 @@
30
30
  },
31
31
  "./lib/*": "./lib/*"
32
32
  },
33
- "main": "./lib/cjs/index.js",
34
- "module": "./lib/es/index.js",
33
+ "main": "./lib/es/index.js",
35
34
  "types": "./lib/types/index.d.ts",
36
35
  "publishConfig": {
37
36
  "access": "public"
@@ -44,11 +43,11 @@
44
43
  ],
45
44
  "devDependencies": {
46
45
  "typescript": "5.6.3",
47
- "vite": "^5.4.8",
48
- "vitest": "^2.1.2",
49
- "@univerjs-infra/shared": "0.4.2"
46
+ "vite": "^5.4.10",
47
+ "vitest": "^2.1.4",
48
+ "@univerjs-infra/shared": "0.5.0-alpha.0"
50
49
  },
51
- "univerSpace": {
50
+ "space": {
52
51
  ".": {
53
52
  "import": "./lib/es/index.js",
54
53
  "require": "./lib/cjs/index.js",
@@ -66,6 +65,7 @@
66
65
  "test:watch": "vitest",
67
66
  "coverage": "vitest run --coverage",
68
67
  "lint:types": "tsc --noEmit",
69
- "build": "tsc && vite build"
70
- }
68
+ "build": "tsx build.ts"
69
+ },
70
+ "module": "./lib/es/index.js"
71
71
  }
@@ -1,10 +0,0 @@
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>;
7
- export declare const PaperMarginMap: Record<PrintPaperMargin, IPrintMargin>;
8
- export declare const PRINT_CONTAINER_CLASS = "printing-canvas-container";
9
- export declare const PRINT_CANVAS_CLASS = "printing-canvas";
10
- export {};
@@ -1,3 +0,0 @@
1
- export { PaperSizePxMap, PRINT_CANVAS_CLASS, PRINT_CONTAINER_CLASS, PaperMarginMap, } from './constant';
2
- export { type IPrintMargin, PrintAlign, PrintDirection, PrintPaperMargin, PrintPaperSize, PrintScale } from './types';
3
- export { createPrintStyle } from './util';
@@ -1,41 +0,0 @@
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
- export declare enum PrintDirection {
15
- Portrait = "Portrait",
16
- Landscape = "Landscape"
17
- }
18
- export declare enum PrintScale {
19
- Origin = "Origin",
20
- FitWidth = "FitWidth",
21
- FitHeight = "FitHeight",
22
- FitPage = "FitPage",
23
- Custom = "Custom"
24
- }
25
- export declare enum PrintAlign {
26
- Start = "Start",
27
- End = "End",
28
- Middle = "Middle"
29
- }
30
- export declare enum PrintPaperMargin {
31
- Normal = "Normal",
32
- Narrow = "Narrow",
33
- Wide = "Wide",
34
- None = "None"
35
- }
36
- export interface IPrintMargin {
37
- top: number;
38
- left: number;
39
- right: number;
40
- bottom: number;
41
- }
@@ -1,2 +0,0 @@
1
- import { PrintDirection, PrintPaperSize } from './types';
2
- export declare function createPrintStyle(paperSize: PrintPaperSize, direction: PrintDirection): HTMLStyleElement;