@univer-cli/svg-facade-command 1.6.2 → 1.7.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/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x4cb7cb=_0x3fa7;(function(_0x1a6207,_0x47224e){const _0x2884e6=_0x3fa7,_0x37e7de=_0x1a6207();while(!![]){try{const _0x5ac0fd=parseInt(_0x2884e6(0x1f4))/0x1*(-parseInt(_0x2884e6(0x1f1))/0x2)+parseInt(_0x2884e6(0x201))/0x3+-parseInt(_0x2884e6(0x20d))/0x4*(parseInt(_0x2884e6(0x1ff))/0x5)+-parseInt(_0x2884e6(0x1fa))/0x6+-parseInt(_0x2884e6(0x20f))/0x7*(-parseInt(_0x2884e6(0x1f9))/0x8)+parseInt(_0x2884e6(0x205))/0x9*(-parseInt(_0x2884e6(0x208))/0xa)+parseInt(_0x2884e6(0x1e1))/0xb;if(_0x5ac0fd===_0x47224e)break;else _0x37e7de['push'](_0x37e7de['shift']());}catch(_0x503487){_0x37e7de['push'](_0x37e7de['shift']());}}}(_0x4b77,0x1f74b));import{readFileSync as _0x309b8c,writeFileSync as _0x68e6e2}from'node:fs';import{dirname as _0xb2f70a,resolve as _0x592fba}from'node:path';import{builtinTextMeasurer as _0x11d922,compileSvgToFacade as _0x5e6a6d,isSvgFacadeError as _0x2f8e70,wrapSlideScript as _0x21cdb4}from'@univer-cli/svg-facade';import{Command as _0x315a1c,InvalidArgumentError as _0x4a0534}from'commander';var u=_0x4cb7cb(0x1f6);function d(_0x4c5cb1){const _0x3720f3=_0x4cb7cb;let _0x4b4bc1=new _0x315a1c('compile-svg')[_0x3720f3(0x207)](_0x3720f3(0x1e9))[_0x3720f3(0x1e2)]('<file.svg>',_0x3720f3(0x1fb))[_0x3720f3(0x1ea)](_0x3720f3(0x1f5),_0x3720f3(0x1ed))['option']('--estimate-text-size',_0x3720f3(0x1fc))[_0x3720f3(0x1ea)]('--page\x20<number>','wrap\x20the\x20result\x20for\x20a\x201-based\x20target\x20Slide\x20page',f)[_0x3720f3(0x1ea)]('--add',_0x3720f3(0x1ec))[_0x3720f3(0x1ea)](_0x3720f3(0x20a),_0x3720f3(0x1f3))[_0x3720f3(0x20b)](async(_0x1bd1ab,_0x9c9a3c)=>{const _0x4e2bdf=_0x3720f3;p(_0x4b4bc1,_0x9c9a3c);try{let _0x5ed84a=_0x309b8c(_0x1bd1ab,_0x4e2bdf(0x20c)),_0x11b194=_0x9c9a3c['estimateTextSize']===!0x0,_0x207d8e=await _0x5e6a6d(_0x5ed84a,{'assetResolver':_0x59b4bd=>({'bytes':_0x309b8c(_0x592fba(_0xb2f70a(_0x1bd1ab),_0x59b4bd))}),'textMeasurer':_0x11b194?_0x11d922:_0x4c5cb1['textMeasurer']}),_0x203530=_0x11b194?[..._0x207d8e[_0x4e2bdf(0x209)],u]:_0x207d8e[_0x4e2bdf(0x209)],_0x2103b6=_0x9c9a3c[_0x4e2bdf(0x1e3)]===!0x0?_0x4e2bdf(0x1e3):'replace',_0x50c823=_0x9c9a3c[_0x4e2bdf(0x20e)]===void 0x0?_0x207d8e[_0x4e2bdf(0x1f7)]:_0x21cdb4(_0x207d8e[_0x4e2bdf(0x1f7)],{'page':_0x9c9a3c[_0x4e2bdf(0x20e)],'mode':_0x2103b6,..._0x207d8e[_0x4e2bdf(0x206)]});if(_0x9c9a3c[_0x4e2bdf(0x210)]!==void 0x0&&_0x68e6e2(_0x9c9a3c[_0x4e2bdf(0x210)],_0x50c823+'\x0a',_0x4e2bdf(0x20c)),_0x9c9a3c[_0x4e2bdf(0x1e6)]===!0x0){h(_0x4b4bc1,{'code':_0x50c823,'lints':_0x203530,'textMeasure':_0x207d8e['textMeasure'],'viewport':_0x207d8e['viewport'],'warnings':_0x207d8e['warnings'],..._0x9c9a3c[_0x4e2bdf(0x20e)]===void 0x0?{}:{'mode':_0x2103b6,'page':_0x9c9a3c['page']},..._0x9c9a3c[_0x4e2bdf(0x210)]===void 0x0?{}:{'out':_0x9c9a3c[_0x4e2bdf(0x210)]}});return;}m(_0x4b4bc1,_0x207d8e['warnings'],_0x203530),_0x9c9a3c[_0x4e2bdf(0x210)]===void 0x0?g(_0x4b4bc1,_0x50c823):g(_0x4b4bc1,_0x4e2bdf(0x1ee)+_0x9c9a3c[_0x4e2bdf(0x210)]);}catch(_0x7a1d87){throw _0x2f8e70(_0x7a1d87)&&_0x4b4bc1['error'](_0x7a1d87[_0x4e2bdf(0x1f7)]+':\x20'+_0x7a1d87['message'],{'code':_0x4e2bdf(0x1f8),'exitCode':0x1}),_0x7a1d87 instanceof Error&&_0x4b4bc1[_0x4e2bdf(0x203)](_0x7a1d87[_0x4e2bdf(0x202)],{'code':_0x4e2bdf(0x1f8),'exitCode':0x1}),_0x7a1d87;}});return _0x4b4bc1;}function f(_0xfd1bb8){const _0x114d31=_0x4cb7cb;let _0x1ace24=Number(_0xfd1bb8);if(!Number[_0x114d31(0x1e8)](_0x1ace24)||_0x1ace24<0x1)throw new _0x4a0534(_0x114d31(0x1eb)+_0xfd1bb8+'\x22.');return _0x1ace24;}function p(_0x2eb828,_0x467632){const _0x22ea9b=_0x4cb7cb;_0x467632['page']===void 0x0&&(_0x467632['add']===!0x0||_0x467632[_0x22ea9b(0x210)]!==void 0x0)&&_0x2eb828[_0x22ea9b(0x203)](_0x22ea9b(0x1f2),{'code':_0x22ea9b(0x1ef),'exitCode':0x1});}function m(_0x7880aa,_0xff11fb,_0x252884){const _0x4740f5=_0x4cb7cb;let _0x244b22=_0x7880aa[_0x4740f5(0x1e5)]();for(let _0x577608 of _0xff11fb)_0x244b22[_0x4740f5(0x1f0)]?.(_0x4740f5(0x1e7)+_0x577608+'\x0a');for(let _0x46e44f of _0x252884)_0x244b22[_0x4740f5(0x1f0)]?.(_0x4740f5(0x1e4)+_0x46e44f+'\x0a');(_0xff11fb[_0x4740f5(0x204)]>0x0||_0x252884[_0x4740f5(0x204)]>0x0)&&_0x244b22[_0x4740f5(0x1f0)]?.(_0x4740f5(0x200));}function h(_0x1aaada,_0x384266){const _0x9f6c81=_0x4cb7cb;_0x1aaada[_0x9f6c81(0x1e5)]()['writeOut']?.(JSON[_0x9f6c81(0x1fe)](_0x384266,null,0x2)+'\x0a');}function _0x3fa7(_0xb277be,_0xd4f58f){_0xb277be=_0xb277be-0x1e1;const _0x4b770d=_0x4b77();let _0x3fa75d=_0x4b770d[_0xb277be];return _0x3fa75d;}function g(_0x251b32,_0x527caa){const _0x14122f=_0x4cb7cb;_0x251b32[_0x14122f(0x1e5)]()[_0x14122f(0x1fd)]?.(_0x527caa+'\x0a');}function _0x4b77(){const _0x2e3c41=['description','20tKAgcH','lints','--out\x20<path>','action','utf8','440204SRsioP','page','7wvDtFZ','out','7132587bEAUjg','argument','add','lint:\x20','configureOutput','json','warning:\x20','isInteger','Compile\x20SVG\x20into\x20Univer\x20Slide\x20Facade\x20code','option','Expected\x20an\x20integer\x20>=\x201;\x20received\x20\x22','overlay\x20onto\x20the\x20target\x20page\x20instead\x20of\x20clearing\x20it\x20first','write\x20structured\x20JSON','generated\x20code:\x20','compile-svg.invalid-input','writeErr','6hgZPHC','--add\x20and\x20--out\x20require\x20--page\x20<number>.','write\x20generated\x20code\x20to\x20a\x20file','73643iRtivq','--json','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','code','compile-svg.failed','765448JpzZuT','789906ChxrnW','SVG\x20source\x20file','use\x20deterministic\x20text-size\x20estimation\x20instead\x20of\x20the\x20injected\x20measurer','writeOut','stringify','5LdPWBZ','warning\x20=\x20unsupported\x20SVG\x20feature\x20degraded;\x20lint\x20=\x20review\x20suggestion,\x20nothing\x20was\x20dropped\x0a','307746ACjMgS','message','error','length','1148427fihykp','viewport'];_0x4b77=function(){return _0x2e3c41;};return _0x4b77();}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.
|
|
4
|
+
"version": "1.7.0-alpha.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.
|
|
21
|
+
"@univer-cli/svg-facade": "1.7.0-alpha.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"commander": "^15.0.0"
|