@univerjs-pro/print 0.17.0 → 0.18.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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/types/common/constant.d.ts +2 -1
- package/lib/umd/index.js +1 -1
- package/package.json +6 -5
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x39d56a=_0x4d2d;(function(_0x361324,_0x82f00){const _0x4b248e=_0x4d2d,_0x56fecf=_0x361324();while(!![]){try{const _0x1b94a3=-parseInt(_0x4b248e(0x89))/0x1*(-parseInt(_0x4b248e(0x84))/0x2)+parseInt(_0x4b248e(0x8f))/0x3*(-parseInt(_0x4b248e(0x81))/0x4)+-parseInt(_0x4b248e(0x83))/0x5+parseInt(_0x4b248e(0x7d))/0x6*(parseInt(_0x4b248e(0x77))/0x7)+-parseInt(_0x4b248e(0x90))/0x8*(parseInt(_0x4b248e(0x88))/0x9)+-parseInt(_0x4b248e(0x79))/0xa+parseInt(_0x4b248e(0x8e))/0xb*(parseInt(_0x4b248e(0x76))/0xc);if(_0x1b94a3===_0x82f00)break;else _0x56fecf['push'](_0x56fecf['shift']());}catch(_0x5908ea){_0x56fecf['push'](_0x56fecf['shift']());}}}(_0x552f,0xa5b63),Object[_0x39d56a(0x92)](exports,Symbol[_0x39d56a(0x73)],{'value':_0x39d56a(0x72)}));let e=function(_0x5831c0){const _0x33a672=_0x39d56a;return _0x5831c0[_0x33a672(0x95)]=_0x33a672(0x95),_0x5831c0[_0x33a672(0x93)]=_0x33a672(0x93),_0x5831c0;}({}),t=function(_0x2c5d63){const _0xbccc35=_0x39d56a;return _0x2c5d63[_0xbccc35(0x96)]=_0xbccc35(0x96),_0x2c5d63['FitWidth']='FitWidth',_0x2c5d63['FitHeight']=_0xbccc35(0x75),_0x2c5d63['FitPage']=_0xbccc35(0x74),_0x2c5d63[_0xbccc35(0x82)]=_0xbccc35(0x82),_0x2c5d63;}({}),n=function(_0x42838c){const _0x59c941=_0x39d56a;return _0x42838c['Start']=_0x59c941(0x78),_0x42838c['End']=_0x59c941(0x7a),_0x42838c['Middle']=_0x59c941(0x97),_0x42838c;}({}),r=function(_0x4bb4a4){const _0x57eac2=_0x39d56a;return _0x4bb4a4[_0x57eac2(0x8c)]=_0x57eac2(0x8c),_0x4bb4a4[_0x57eac2(0x86)]='Narrow',_0x4bb4a4['Wide']=_0x57eac2(0x91),_0x4bb4a4[_0x57eac2(0x9a)]=_0x57eac2(0x9a),_0x4bb4a4[_0x57eac2(0x82)]=_0x57eac2(0x82),_0x4bb4a4;}({});function _0x552f(){const _0x4f3d76=['\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','4IRqCvf','Custom','398450nfRdMs','799534ydLYUv','printing-canvas','Narrow','PrintAlign','2466hONOmW','2pMIsxo','PrintPaperMargin','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.','Normal',',\x20.','8635oRbbxG','1323678hxQFdR','25336ubnAeB','Wide','defineProperty','Landscape','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}','Portrait','Origin','Middle','offline-printing-css','PRINT_CONTAINER_CLASS','None','px\x20','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','\x0a\x20\x20\x20\x20.','PaperMarginMap','PrintScale','Module','toStringTag','FitPage','FitHeight','31800uXfsrL','55748laZyAZ','Start','9636710FcdprO','End','className','\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','114FHooXQ','\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.','innerHTML'];_0x552f=function(){return _0x4f3d76;};return _0x552f();}const i={[r[_0x39d56a(0x8c)]]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[r[_0x39d56a(0x86)]]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[r['Wide']]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[r[_0x39d56a(0x9a)]]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},[r[_0x39d56a(0x82)]]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},a='printing-canvas-container',o=_0x39d56a(0x85);function s(_0x12b006,_0x50ff37,_0x57c606){const _0x30c9a6=_0x39d56a;let _0x595263=_0x57c606===e[_0x30c9a6(0x95)]?_0x12b006:_0x50ff37,_0x3d1633=_0x57c606===e[_0x30c9a6(0x95)]?_0x50ff37:_0x12b006,_0x363806=_0x30c9a6(0x9d)+o+_0x30c9a6(0x80)+_0x595263+_0x30c9a6(0x9b)+_0x3d1633+_0x30c9a6(0x8b)+a+_0x30c9a6(0x8d)+a+_0x30c9a6(0x7e)+o+_0x30c9a6(0x7c)+_0x3d1633+_0x30c9a6(0x9c)+_0x595263+_0x30c9a6(0x94),_0x1af2fd=document['createElement']('style');return _0x1af2fd[_0x30c9a6(0x7f)]=_0x363806,_0x1af2fd[_0x30c9a6(0x7b)]=_0x30c9a6(0x98),_0x1af2fd;}function _0x4d2d(_0x5126a8,_0x449c20){_0x5126a8=_0x5126a8-0x71;const _0x552fb0=_0x552f();let _0x4d2ddc=_0x552fb0[_0x5126a8];return _0x4d2ddc;}exports['PRINT_CANVAS_CLASS']=o,exports[_0x39d56a(0x99)]=a,exports[_0x39d56a(0x9e)]=i,exports[_0x39d56a(0x87)]=n,exports['PrintDirection']=e,exports[_0x39d56a(0x8a)]=r,exports[_0x39d56a(0x71)]=t,exports['createPrintStyle']=s;
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x4bbe(){const _0x370592=['Portrait','Narrow','Custom','None','932289vTpjsy','603272DWxxqh','style','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.','\x0a\x20\x20\x20\x20.','End','Origin','FitHeight','Start','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}','72OuZCCV','createElement',',\x20.','479683bHKzYD','124uvzeBM','\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','5175keqSKf','Normal','FitWidth','10370061iiUhJh','\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.','Middle','1074696xcGqJy','Landscape','offline-printing-css','Wide','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','445697dzsXMU','FitPage'];_0x4bbe=function(){return _0x370592;};return _0x4bbe();}const _0xaacdf2=_0x151b;(function(_0x155c9d,_0x361809){const _0x4cae0c=_0x151b,_0x24c799=_0x155c9d();while(!![]){try{const _0x32cbe4=parseInt(_0x4cae0c(0xb5))/0x1+-parseInt(_0x4cae0c(0xa9))/0x2+-parseInt(_0x4cae0c(0xa8))/0x3+-parseInt(_0x4cae0c(0xb6))/0x4*(-parseInt(_0x4cae0c(0xb8))/0x5)+-parseInt(_0x4cae0c(0xbe))/0x6+-parseInt(_0x4cae0c(0xa2))/0x7*(parseInt(_0x4cae0c(0xb2))/0x8)+parseInt(_0x4cae0c(0xbb))/0x9;if(_0x32cbe4===_0x361809)break;else _0x24c799['push'](_0x24c799['shift']());}catch(_0x21a54b){_0x24c799['push'](_0x24c799['shift']());}}}(_0x4bbe,0x491b3));function _0x151b(_0x28090e,_0x2695db){_0x28090e=_0x28090e-0xa2;const _0x4bbec2=_0x4bbe();let _0x151ba6=_0x4bbec2[_0x28090e];return _0x151ba6;}let e=function(_0x535bcc){const _0x551872=_0x151b;return _0x535bcc[_0x551872(0xa4)]=_0x551872(0xa4),_0x535bcc[_0x551872(0xbf)]=_0x551872(0xbf),_0x535bcc;}({}),t=function(_0x4e15b3){const _0xc4329=_0x151b;return _0x4e15b3[_0xc4329(0xae)]=_0xc4329(0xae),_0x4e15b3['FitWidth']=_0xc4329(0xba),_0x4e15b3[_0xc4329(0xaf)]=_0xc4329(0xaf),_0x4e15b3[_0xc4329(0xa3)]=_0xc4329(0xa3),_0x4e15b3['Custom']=_0xc4329(0xa6),_0x4e15b3;}({}),n=function(_0x578db0){const _0x182653=_0x151b;return _0x578db0[_0x182653(0xb0)]=_0x182653(0xb0),_0x578db0[_0x182653(0xad)]='End',_0x578db0[_0x182653(0xbd)]=_0x182653(0xbd),_0x578db0;}({}),r=function(_0x528bb0){const _0x5a4dd2=_0x151b;return _0x528bb0[_0x5a4dd2(0xb9)]=_0x5a4dd2(0xb9),_0x528bb0[_0x5a4dd2(0xa5)]=_0x5a4dd2(0xa5),_0x528bb0[_0x5a4dd2(0xc1)]=_0x5a4dd2(0xc1),_0x528bb0['None']='None',_0x528bb0[_0x5a4dd2(0xa6)]=_0x5a4dd2(0xa6),_0x528bb0;}({});const i={[r[_0xaacdf2(0xb9)]]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[r['Narrow']]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[r[_0xaacdf2(0xc1)]]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[r[_0xaacdf2(0xa7)]]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},[r[_0xaacdf2(0xa6)]]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},a='printing-canvas-container',o='printing-canvas';function s(_0x274ec8,_0x50b954,_0x2d022c){const _0x5870ad=_0xaacdf2;let _0x2b34c4=_0x2d022c===e['Portrait']?_0x274ec8:_0x50b954,_0x58b95c=_0x2d022c===e['Portrait']?_0x50b954:_0x274ec8,_0x52f3af=_0x5870ad(0xac)+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'+_0x2b34c4+'px\x20'+_0x58b95c+_0x5870ad(0xab)+a+_0x5870ad(0xb4)+a+_0x5870ad(0xbc)+o+_0x5870ad(0xb7)+_0x58b95c+_0x5870ad(0xc2)+_0x2b34c4+_0x5870ad(0xb1),_0x1acfbe=document[_0x5870ad(0xb3)](_0x5870ad(0xaa));return _0x1acfbe['innerHTML']=_0x52f3af,_0x1acfbe['className']=_0x5870ad(0xc0),_0x1acfbe;}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
|
-
|
|
1
|
+
function _0x4bbe(){const _0x370592=['Portrait','Narrow','Custom','None','932289vTpjsy','603272DWxxqh','style','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.','\x0a\x20\x20\x20\x20.','End','Origin','FitHeight','Start','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}','72OuZCCV','createElement',',\x20.','479683bHKzYD','124uvzeBM','\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','5175keqSKf','Normal','FitWidth','10370061iiUhJh','\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.','Middle','1074696xcGqJy','Landscape','offline-printing-css','Wide','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','445697dzsXMU','FitPage'];_0x4bbe=function(){return _0x370592;};return _0x4bbe();}const _0xaacdf2=_0x151b;(function(_0x155c9d,_0x361809){const _0x4cae0c=_0x151b,_0x24c799=_0x155c9d();while(!![]){try{const _0x32cbe4=parseInt(_0x4cae0c(0xb5))/0x1+-parseInt(_0x4cae0c(0xa9))/0x2+-parseInt(_0x4cae0c(0xa8))/0x3+-parseInt(_0x4cae0c(0xb6))/0x4*(-parseInt(_0x4cae0c(0xb8))/0x5)+-parseInt(_0x4cae0c(0xbe))/0x6+-parseInt(_0x4cae0c(0xa2))/0x7*(parseInt(_0x4cae0c(0xb2))/0x8)+parseInt(_0x4cae0c(0xbb))/0x9;if(_0x32cbe4===_0x361809)break;else _0x24c799['push'](_0x24c799['shift']());}catch(_0x21a54b){_0x24c799['push'](_0x24c799['shift']());}}}(_0x4bbe,0x491b3));function _0x151b(_0x28090e,_0x2695db){_0x28090e=_0x28090e-0xa2;const _0x4bbec2=_0x4bbe();let _0x151ba6=_0x4bbec2[_0x28090e];return _0x151ba6;}let e=function(_0x535bcc){const _0x551872=_0x151b;return _0x535bcc[_0x551872(0xa4)]=_0x551872(0xa4),_0x535bcc[_0x551872(0xbf)]=_0x551872(0xbf),_0x535bcc;}({}),t=function(_0x4e15b3){const _0xc4329=_0x151b;return _0x4e15b3[_0xc4329(0xae)]=_0xc4329(0xae),_0x4e15b3['FitWidth']=_0xc4329(0xba),_0x4e15b3[_0xc4329(0xaf)]=_0xc4329(0xaf),_0x4e15b3[_0xc4329(0xa3)]=_0xc4329(0xa3),_0x4e15b3['Custom']=_0xc4329(0xa6),_0x4e15b3;}({}),n=function(_0x578db0){const _0x182653=_0x151b;return _0x578db0[_0x182653(0xb0)]=_0x182653(0xb0),_0x578db0[_0x182653(0xad)]='End',_0x578db0[_0x182653(0xbd)]=_0x182653(0xbd),_0x578db0;}({}),r=function(_0x528bb0){const _0x5a4dd2=_0x151b;return _0x528bb0[_0x5a4dd2(0xb9)]=_0x5a4dd2(0xb9),_0x528bb0[_0x5a4dd2(0xa5)]=_0x5a4dd2(0xa5),_0x528bb0[_0x5a4dd2(0xc1)]=_0x5a4dd2(0xc1),_0x528bb0['None']='None',_0x528bb0[_0x5a4dd2(0xa6)]=_0x5a4dd2(0xa6),_0x528bb0;}({});const i={[r[_0xaacdf2(0xb9)]]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[r['Narrow']]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[r[_0xaacdf2(0xc1)]]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[r[_0xaacdf2(0xa7)]]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},[r[_0xaacdf2(0xa6)]]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},a='printing-canvas-container',o='printing-canvas';function s(_0x274ec8,_0x50b954,_0x2d022c){const _0x5870ad=_0xaacdf2;let _0x2b34c4=_0x2d022c===e['Portrait']?_0x274ec8:_0x50b954,_0x58b95c=_0x2d022c===e['Portrait']?_0x50b954:_0x274ec8,_0x52f3af=_0x5870ad(0xac)+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'+_0x2b34c4+'px\x20'+_0x58b95c+_0x5870ad(0xab)+a+_0x5870ad(0xb4)+a+_0x5870ad(0xbc)+o+_0x5870ad(0xb7)+_0x58b95c+_0x5870ad(0xc2)+_0x2b34c4+_0x5870ad(0xb1),_0x1acfbe=document[_0x5870ad(0xb3)](_0x5870ad(0xaa));return _0x1acfbe['innerHTML']=_0x52f3af,_0x1acfbe['className']=_0x5870ad(0xc0),_0x1acfbe;}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,4 +1,5 @@
|
|
|
1
|
-
import { IPrintMargin
|
|
1
|
+
import type { IPrintMargin } from './types';
|
|
2
|
+
import { PrintPaperMargin } from './types';
|
|
2
3
|
export declare const PaperMarginMap: Record<PrintPaperMargin, IPrintMargin>;
|
|
3
4
|
export declare const PRINT_CONTAINER_CLASS = "printing-canvas-container";
|
|
4
5
|
export declare const PRINT_CANVAS_CLASS = "printing-canvas";
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x141a(_0x39c228,_0x4b3cd3){_0x39c228=_0x39c228-0x108;const _0x13c286=_0x13c2();let _0x141a1f=_0x13c286[_0x39c228];return _0x141a1f;}(function(_0xdc0d34,_0x537b47){const _0x3b8fc7=_0x141a,_0x45d5df=_0xdc0d34();while(!![]){try{const _0x11a56a=parseInt(_0x3b8fc7(0x10f))/0x1+parseInt(_0x3b8fc7(0x121))/0x2*(-parseInt(_0x3b8fc7(0x136))/0x3)+-parseInt(_0x3b8fc7(0x11c))/0x4+-parseInt(_0x3b8fc7(0x130))/0x5+parseInt(_0x3b8fc7(0x138))/0x6*(-parseInt(_0x3b8fc7(0x12f))/0x7)+parseInt(_0x3b8fc7(0x124))/0x8+-parseInt(_0x3b8fc7(0x12b))/0x9*(-parseInt(_0x3b8fc7(0x110))/0xa);if(_0x11a56a===_0x537b47)break;else _0x45d5df['push'](_0x45d5df['shift']());}catch(_0x3baf75){_0x45d5df['push'](_0x45d5df['shift']());}}}(_0x13c2,0xcd466),function(_0x32afab,_0x315ea5){const _0x51c697=_0x141a;typeof exports==_0x51c697(0x139)&&typeof module<'u'?_0x315ea5(exports):typeof define==_0x51c697(0x115)&&define[_0x51c697(0x129)]?define([_0x51c697(0x11f)],_0x315ea5):(_0x32afab=typeof globalThis<'u'?globalThis:_0x32afab||self,_0x315ea5(_0x32afab[_0x51c697(0x122)]={}));}(this,function(_0x319422){const _0x3bf991=_0x141a;Object[_0x3bf991(0x10d)](_0x319422,Symbol['toStringTag'],{'value':_0x3bf991(0x10e)});let _0xd0e877=function(_0xd737cd){const _0x45c6b7=_0x3bf991;return _0xd737cd[_0x45c6b7(0x11e)]=_0x45c6b7(0x11e),_0xd737cd[_0x45c6b7(0x117)]=_0x45c6b7(0x117),_0xd737cd;}({}),_0x56bc55=function(_0x1c59c4){const _0x2ad0d4=_0x3bf991;return _0x1c59c4['Origin']=_0x2ad0d4(0x131),_0x1c59c4[_0x2ad0d4(0x114)]=_0x2ad0d4(0x114),_0x1c59c4[_0x2ad0d4(0x11a)]='FitHeight',_0x1c59c4[_0x2ad0d4(0x10c)]=_0x2ad0d4(0x10c),_0x1c59c4[_0x2ad0d4(0x126)]=_0x2ad0d4(0x126),_0x1c59c4;}({}),_0x481e41=function(_0x4c2f17){const _0x5b0c5b=_0x3bf991;return _0x4c2f17[_0x5b0c5b(0x109)]=_0x5b0c5b(0x109),_0x4c2f17[_0x5b0c5b(0x10b)]='End',_0x4c2f17['Middle']=_0x5b0c5b(0x135),_0x4c2f17;}({}),_0x3273a6=function(_0x257f6a){const _0x3e650c=_0x3bf991;return _0x257f6a[_0x3e650c(0x11b)]=_0x3e650c(0x11b),_0x257f6a['Narrow']=_0x3e650c(0x10a),_0x257f6a['Wide']=_0x3e650c(0x118),_0x257f6a[_0x3e650c(0x127)]=_0x3e650c(0x127),_0x257f6a['Custom']=_0x3e650c(0x126),_0x257f6a;}({}),_0x2a2aee={[_0x3273a6[_0x3bf991(0x11b)]]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[_0x3273a6['Narrow']]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[_0x3273a6['Wide']]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},[_0x3273a6[_0x3bf991(0x127)]]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},[_0x3273a6[_0x3bf991(0x126)]]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},_0x105987=_0x3bf991(0x111),_0x8b6602=_0x3bf991(0x108);function _0x23d3f2(_0x1cfc76,_0x36b619,_0x596ad9){const _0x48f30c=_0x3bf991;let _0x3218f6=_0x596ad9===_0xd0e877[_0x48f30c(0x11e)]?_0x1cfc76:_0x36b619,_0x11de4d=_0x596ad9===_0xd0e877['Portrait']?_0x36b619:_0x1cfc76,_0x36089b=_0x48f30c(0x12d)+_0x8b6602+_0x48f30c(0x112)+_0x3218f6+_0x48f30c(0x125)+_0x11de4d+'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.'+_0x105987+_0x48f30c(0x120)+_0x105987+_0x48f30c(0x11d)+_0x8b6602+'\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'+_0x11de4d+_0x48f30c(0x116)+_0x3218f6+_0x48f30c(0x128),_0x3fda65=document['createElement'](_0x48f30c(0x137));return _0x3fda65[_0x48f30c(0x12c)]=_0x36089b,_0x3fda65['className']=_0x48f30c(0x113),_0x3fda65;}_0x319422[_0x3bf991(0x12e)]=_0x8b6602,_0x319422[_0x3bf991(0x132)]=_0x105987,_0x319422[_0x3bf991(0x134)]=_0x2a2aee,_0x319422[_0x3bf991(0x12a)]=_0x481e41,_0x319422[_0x3bf991(0x119)]=_0xd0e877,_0x319422[_0x3bf991(0x133)]=_0x3273a6,_0x319422[_0x3bf991(0x13a)]=_0x56bc55,_0x319422[_0x3bf991(0x123)]=_0x23d3f2;}));function _0x13c2(){const _0x2c9fcc=['PrintScale','printing-canvas','Start','Narrow','End','FitPage','defineProperty','Module','101747nFhYqQ','3327110HwfdRG','printing-canvas-container','\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','offline-printing-css','FitWidth','function','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','Landscape','Wide','PrintDirection','FitHeight','Normal','1514724nlRZIJ','\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.','Portrait','exports',',\x20.','10864RSoRjq','UniverProPrint','createPrintStyle','10808944CQsURY','px\x20','Custom','None','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}','amd','PrintAlign','9wmVBcJ','innerHTML','\x0a\x20\x20\x20\x20.','PRINT_CANVAS_CLASS','63nYwvRZ','756960cPomQH','Origin','PRINT_CONTAINER_CLASS','PrintPaperMargin','PaperMarginMap','Middle','51zdaoRz','style','214902EWTBpz','object'];_0x13c2=function(){return _0x2c9fcc;};return _0x13c2();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/print",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Print module for UniverJS",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -43,16 +43,17 @@
|
|
|
43
43
|
],
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"typescript": "^5.9.3",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"@univerjs-infra/shared": "0.17.0"
|
|
46
|
+
"vitest": "^4.1.0",
|
|
47
|
+
"@univerjs-infra/shared": "0.18.0"
|
|
49
48
|
},
|
|
50
49
|
"scripts": {
|
|
51
50
|
"test": "vitest run",
|
|
52
51
|
"test:watch": "vitest",
|
|
53
52
|
"coverage": "vitest run --coverage",
|
|
54
53
|
"typecheck": "tsc --noEmit",
|
|
55
|
-
"build": "univer-cli build"
|
|
54
|
+
"build:bundle": "univer-cli build",
|
|
55
|
+
"build:types": "tsc -p tsconfig.node.json",
|
|
56
|
+
"build": "pnpm run build:bundle && pnpm run build:types"
|
|
56
57
|
},
|
|
57
58
|
"module": "./lib/es/index.js"
|
|
58
59
|
}
|