@univer-cli/svg-facade-command 1.0.4 → 1.1.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/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x2397b0=_0xa2cb;function _0xa2cb(_0x31da79,_0x4ecf60){_0x31da79=_0x31da79-0x1c5;const _0x34e646=_0x34e6();let _0xa2cbe1=_0x34e646[_0x31da79];return _0xa2cbe1;}(function(_0xfa9c9a,_0x3de219){const _0x4f91d1=_0xa2cb,_0x112b0e=_0xfa9c9a();while(!![]){try{const _0x156383=-parseInt(_0x4f91d1(0x1ec))/0x1+parseInt(_0x4f91d1(0x1c8))/0x2+parseInt(_0x4f91d1(0x1c9))/0x3*(parseInt(_0x4f91d1(0x1f0))/0x4)+parseInt(_0x4f91d1(0x1c6))/0x5+parseInt(_0x4f91d1(0x1f4))/0x6+parseInt(_0x4f91d1(0x1de))/0x7+-parseInt(_0x4f91d1(0x1d3))/0x8;if(_0x156383===_0x3de219)break;else _0x112b0e['push'](_0x112b0e['shift']());}catch(_0x2961b7){_0x112b0e['push'](_0x112b0e['shift']());}}}(_0x34e6,0x39412));import{readFileSync as _0x2df7aa,writeFileSync as _0x5f574e}from'node:fs';import{dirname as _0x47f62b,resolve as _0x21b7b6}from'node:path';import{builtinTextMeasurer as _0xe90e8f,compileSvgToFacade as _0x4a7433,isSvgFacadeError as _0x135fd9,wrapSlideScript as _0x9143dc}from'@univer-cli/svg-facade';import{Command as _0x185669,InvalidArgumentError as _0x54fab5}from'commander';function _0x34e6(){const _0x56e1ff=['out','8mwtyAA','estimateTextSize','--add\x20and\x20--out\x20require\x20--page\x20<number>.','compile-svg.failed','787350GjllGS','overlay\x20onto\x20the\x20target\x20page\x20instead\x20of\x20clearing\x20it\x20first','action','text\x20boxes\x20were\x20sized\x20by\x20estimation\x20(--estimate-text-size),\x20not\x20by\x20real\x20font\x20metrics:\x20text\x20can\x20sit\x20off-position,\x20especially\x20centred\x20or\x20right-aligned\x20lines;\x20recompile\x20without\x20the\x20flag\x20(with\x20a\x20browser)\x20before\x20you\x20ship','json','1791240kAbHdq','length','920456uyewao','296754meKTLJ','--estimate-text-size','utf8','lints','argument','<file.svg>','viewport','--out\x20<path>','writeErr','generated\x20code:\x20','7482080ZxMdMj','write\x20generated\x20code\x20to\x20a\x20file','add','description','writeOut','message','code','write\x20structured\x20JSON','error','stringify','compile-svg.invalid-input','2210110lyBPFn','Expected\x20an\x20integer\x20>=\x201;\x20received\x20\x22','page','configureOutput','textMeasure','textMeasurer','--page\x20<number>','warnings','compile-svg','option','SVG\x20source\x20file','use\x20deterministic\x20text-size\x20estimation\x20instead\x20of\x20the\x20injected\x20measurer','Compile\x20SVG\x20into\x20Univer\x20Slide\x20Facade\x20code','warning\x20=\x20unsupported\x20SVG\x20feature\x20degraded;\x20lint\x20=\x20review\x20suggestion,\x20nothing\x20was\x20dropped\x0a','293493vkFVfA','--json','wrap\x20the\x20result\x20for\x20a\x201-based\x20target\x20Slide\x20page'];_0x34e6=function(){return _0x56e1ff;};return _0x34e6();}var u=_0x2397b0(0x1f7);function d(_0x5b2d89){const _0x3f5cb=_0x2397b0;let _0x11d2d1=new _0x185669(_0x3f5cb(0x1e6))[_0x3f5cb(0x1d6)](_0x3f5cb(0x1ea))[_0x3f5cb(0x1cd)](_0x3f5cb(0x1ce),_0x3f5cb(0x1e8))[_0x3f5cb(0x1e7)](_0x3f5cb(0x1ed),_0x3f5cb(0x1da))[_0x3f5cb(0x1e7)](_0x3f5cb(0x1ca),_0x3f5cb(0x1e9))['option'](_0x3f5cb(0x1e4),_0x3f5cb(0x1ee),f)[_0x3f5cb(0x1e7)]('--add',_0x3f5cb(0x1f5))['option'](_0x3f5cb(0x1d0),_0x3f5cb(0x1d4))[_0x3f5cb(0x1f6)](async(_0x5469a4,_0x321f46)=>{const _0x5c208c=_0x3f5cb;p(_0x11d2d1,_0x321f46);try{let _0x1658d3=_0x2df7aa(_0x5469a4,_0x5c208c(0x1cb)),_0x35f4de=_0x321f46[_0x5c208c(0x1f1)]===!0x0,_0x2ab6bd=await _0x4a7433(_0x1658d3,{'assetResolver':_0x447ce7=>({'bytes':_0x2df7aa(_0x21b7b6(_0x47f62b(_0x5469a4),_0x447ce7))}),'textMeasurer':_0x35f4de?_0xe90e8f:_0x5b2d89[_0x5c208c(0x1e3)]}),_0x502ae3=_0x35f4de?[..._0x2ab6bd[_0x5c208c(0x1cc)],u]:_0x2ab6bd[_0x5c208c(0x1cc)],_0x40d221=_0x321f46[_0x5c208c(0x1d5)]===!0x0?'add':'replace',_0x9f2897=_0x321f46[_0x5c208c(0x1e0)]===void 0x0?_0x2ab6bd[_0x5c208c(0x1d9)]:_0x9143dc(_0x2ab6bd[_0x5c208c(0x1d9)],{'page':_0x321f46['page'],'mode':_0x40d221,..._0x2ab6bd[_0x5c208c(0x1cf)]});if(_0x321f46[_0x5c208c(0x1ef)]!==void 0x0&&_0x5f574e(_0x321f46[_0x5c208c(0x1ef)],_0x9f2897+'\x0a','utf8'),_0x321f46[_0x5c208c(0x1c5)]===!0x0){h(_0x11d2d1,{'code':_0x9f2897,'lints':_0x502ae3,'textMeasure':_0x2ab6bd[_0x5c208c(0x1e2)],'viewport':_0x2ab6bd[_0x5c208c(0x1cf)],'warnings':_0x2ab6bd[_0x5c208c(0x1e5)],..._0x321f46[_0x5c208c(0x1e0)]===void 0x0?{}:{'mode':_0x40d221,'page':_0x321f46['page']},..._0x321f46['out']===void 0x0?{}:{'out':_0x321f46['out']}});return;}m(_0x11d2d1,_0x2ab6bd[_0x5c208c(0x1e5)],_0x502ae3),_0x321f46[_0x5c208c(0x1ef)]===void 0x0?g(_0x11d2d1,_0x9f2897):g(_0x11d2d1,_0x5c208c(0x1d2)+_0x321f46[_0x5c208c(0x1ef)]);}catch(_0x488d28){throw _0x135fd9(_0x488d28)&&_0x11d2d1[_0x5c208c(0x1db)](_0x488d28['code']+':\x20'+_0x488d28[_0x5c208c(0x1d8)],{'code':_0x5c208c(0x1f3),'exitCode':0x1}),_0x488d28 instanceof Error&&_0x11d2d1[_0x5c208c(0x1db)](_0x488d28[_0x5c208c(0x1d8)],{'code':_0x5c208c(0x1f3),'exitCode':0x1}),_0x488d28;}});return _0x11d2d1;}function f(_0x390227){const _0x4e93a1=_0x2397b0;let _0x9a9d36=Number(_0x390227);if(!Number['isInteger'](_0x9a9d36)||_0x9a9d36<0x1)throw new _0x54fab5(_0x4e93a1(0x1df)+_0x390227+'\x22.');return _0x9a9d36;}function p(_0x2645c1,_0x162709){const _0x2bece3=_0x2397b0;_0x162709[_0x2bece3(0x1e0)]===void 0x0&&(_0x162709[_0x2bece3(0x1d5)]===!0x0||_0x162709[_0x2bece3(0x1ef)]!==void 0x0)&&_0x2645c1[_0x2bece3(0x1db)](_0x2bece3(0x1f2),{'code':_0x2bece3(0x1dd),'exitCode':0x1});}function m(_0x3e99c0,_0x4143c2,_0x19fadf){const _0xa42a9d=_0x2397b0;let _0x43733f=_0x3e99c0[_0xa42a9d(0x1e1)]();for(let _0x338068 of _0x4143c2)_0x43733f[_0xa42a9d(0x1d1)]?.('warning:\x20'+_0x338068+'\x0a');for(let _0x2f646d of _0x19fadf)_0x43733f[_0xa42a9d(0x1d1)]?.('lint:\x20'+_0x2f646d+'\x0a');(_0x4143c2[_0xa42a9d(0x1c7)]>0x0||_0x19fadf[_0xa42a9d(0x1c7)]>0x0)&&_0x43733f[_0xa42a9d(0x1d1)]?.(_0xa42a9d(0x1eb));}function h(_0x167b32,_0x325d1a){const _0x5e396b=_0x2397b0;_0x167b32[_0x5e396b(0x1e1)]()[_0x5e396b(0x1d7)]?.(JSON[_0x5e396b(0x1dc)](_0x325d1a,null,0x2)+'\x0a');}function g(_0x3a62c6,_0x20a415){const _0x34c4d2=_0x2397b0;_0x3a62c6['configureOutput']()[_0x34c4d2(0x1d7)]?.(_0x20a415+'\x0a');}export{d as createCompileSvgCommand};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univer-cli/svg-facade-command",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"README.zh-CN.md"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@univer-cli/svg-facade": "1.0
|
|
21
|
+
"@univer-cli/svg-facade": "1.1.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"commander": "^15.0.0"
|