@univer-cli/svg-facade-command 1.5.2 → 1.6.1
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 _0x3293b4=_0x1dee;(function(_0x416993,_0x21e4c6){const _0x485a10=_0x1dee,_0x28f433=_0x416993();while(!![]){try{const _0x2877c7=-parseInt(_0x485a10(0x136))/0x1*(parseInt(_0x485a10(0x146))/0x2)+parseInt(_0x485a10(0x141))/0x3+parseInt(_0x485a10(0x13c))/0x4*(parseInt(_0x485a10(0x13a))/0x5)+-parseInt(_0x485a10(0x140))/0x6+parseInt(_0x485a10(0x15d))/0x7+-parseInt(_0x485a10(0x147))/0x8*(-parseInt(_0x485a10(0x137))/0x9)+-parseInt(_0x485a10(0x156))/0xa;if(_0x2877c7===_0x21e4c6)break;else _0x28f433['push'](_0x28f433['shift']());}catch(_0x428ea5){_0x28f433['push'](_0x28f433['shift']());}}}(_0x1589,0xeae39));import{readFileSync as _0x3af39f,writeFileSync as _0x589f16}from'node:fs';function _0x1dee(_0x23556e,_0x24f0dc){_0x23556e=_0x23556e-0x132;const _0x158959=_0x1589();let _0x1deec6=_0x158959[_0x23556e];return _0x1deec6;}import{dirname as _0x204ccf,resolve as _0x2a1af0}from'node:path';import{builtinTextMeasurer as _0x390438,compileSvgToFacade as _0x26d780,isSvgFacadeError as _0x267d96,wrapSlideScript as _0x434bc9}from'@univer-cli/svg-facade';import{Command as _0x18b7d8,InvalidArgumentError as _0x5a3e01}from'commander';function _0x1589(){const _0x4b8c56=['isInteger','generated\x20code:\x20','SVG\x20source\x20file','warning\x20=\x20unsupported\x20SVG\x20feature\x20degraded;\x20lint\x20=\x20review\x20suggestion,\x20nothing\x20was\x20dropped\x0a','overlay\x20onto\x20the\x20target\x20page\x20instead\x20of\x20clearing\x20it\x20first','estimateTextSize','use\x20deterministic\x20text-size\x20estimation\x20instead\x20of\x20the\x20injected\x20measurer','description','write\x20structured\x20JSON','1MbjHdh','11310291IPubfi','length','action','5uGWZWm','writeOut','3568732CTBimJ','textMeasure','compile-svg.failed','out','1744992BpaHaf','1614069YlmDCG','option','write\x20generated\x20code\x20to\x20a\x20file','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','lints','3270314LlYVRL','8IRyLtT','--json','message','wrap\x20the\x20result\x20for\x20a\x201-based\x20target\x20Slide\x20page','configureOutput','lint:\x20','--page\x20<number>','--out\x20<path>','stringify','compile-svg','viewport','textMeasurer','utf8','error','add','7630450oRFlLj','writeErr','page','warnings','replace','json','<file.svg>','6749638XmoSig','code'];_0x1589=function(){return _0x4b8c56;};return _0x1589();}var u=_0x3293b4(0x144);function d(_0x4c35d1){const _0x45c9dc=_0x3293b4;let _0x5f07fa=new _0x18b7d8(_0x45c9dc(0x150))[_0x45c9dc(0x134)]('Compile\x20SVG\x20into\x20Univer\x20Slide\x20Facade\x20code')['argument'](_0x45c9dc(0x15c),_0x45c9dc(0x161))[_0x45c9dc(0x142)](_0x45c9dc(0x148),_0x45c9dc(0x135))[_0x45c9dc(0x142)]('--estimate-text-size',_0x45c9dc(0x133))[_0x45c9dc(0x142)](_0x45c9dc(0x14d),_0x45c9dc(0x14a),f)[_0x45c9dc(0x142)]('--add',_0x45c9dc(0x163))[_0x45c9dc(0x142)](_0x45c9dc(0x14e),_0x45c9dc(0x143))[_0x45c9dc(0x139)](async(_0x343c7a,_0x3cb67)=>{const _0x385810=_0x45c9dc;p(_0x5f07fa,_0x3cb67);try{let _0x14a2d7=_0x3af39f(_0x343c7a,_0x385810(0x153)),_0x4efe64=_0x3cb67[_0x385810(0x132)]===!0x0,_0x14e50d=await _0x26d780(_0x14a2d7,{'assetResolver':_0x35f1ca=>({'bytes':_0x3af39f(_0x2a1af0(_0x204ccf(_0x343c7a),_0x35f1ca))}),'textMeasurer':_0x4efe64?_0x390438:_0x4c35d1[_0x385810(0x152)]}),_0x1ab763=_0x4efe64?[..._0x14e50d['lints'],u]:_0x14e50d[_0x385810(0x145)],_0x1fec76=_0x3cb67[_0x385810(0x155)]===!0x0?_0x385810(0x155):_0x385810(0x15a),_0x5f3955=_0x3cb67['page']===void 0x0?_0x14e50d[_0x385810(0x15e)]:_0x434bc9(_0x14e50d[_0x385810(0x15e)],{'page':_0x3cb67['page'],'mode':_0x1fec76,..._0x14e50d[_0x385810(0x151)]});if(_0x3cb67[_0x385810(0x13f)]!==void 0x0&&_0x589f16(_0x3cb67[_0x385810(0x13f)],_0x5f3955+'\x0a',_0x385810(0x153)),_0x3cb67[_0x385810(0x15b)]===!0x0){h(_0x5f07fa,{'code':_0x5f3955,'lints':_0x1ab763,'textMeasure':_0x14e50d[_0x385810(0x13d)],'viewport':_0x14e50d[_0x385810(0x151)],'warnings':_0x14e50d[_0x385810(0x159)],..._0x3cb67[_0x385810(0x158)]===void 0x0?{}:{'mode':_0x1fec76,'page':_0x3cb67[_0x385810(0x158)]},..._0x3cb67[_0x385810(0x13f)]===void 0x0?{}:{'out':_0x3cb67[_0x385810(0x13f)]}});return;}m(_0x5f07fa,_0x14e50d[_0x385810(0x159)],_0x1ab763),_0x3cb67[_0x385810(0x13f)]===void 0x0?g(_0x5f07fa,_0x5f3955):g(_0x5f07fa,_0x385810(0x160)+_0x3cb67[_0x385810(0x13f)]);}catch(_0x3135e1){throw _0x267d96(_0x3135e1)&&_0x5f07fa['error'](_0x3135e1['code']+':\x20'+_0x3135e1[_0x385810(0x149)],{'code':_0x385810(0x13e),'exitCode':0x1}),_0x3135e1 instanceof Error&&_0x5f07fa[_0x385810(0x154)](_0x3135e1['message'],{'code':'compile-svg.failed','exitCode':0x1}),_0x3135e1;}});return _0x5f07fa;}function f(_0x62ee54){const _0x3099d0=_0x3293b4;let _0x30e4c2=Number(_0x62ee54);if(!Number[_0x3099d0(0x15f)](_0x30e4c2)||_0x30e4c2<0x1)throw new _0x5a3e01('Expected\x20an\x20integer\x20>=\x201;\x20received\x20\x22'+_0x62ee54+'\x22.');return _0x30e4c2;}function p(_0x370521,_0x341385){const _0x26e89b=_0x3293b4;_0x341385[_0x26e89b(0x158)]===void 0x0&&(_0x341385['add']===!0x0||_0x341385[_0x26e89b(0x13f)]!==void 0x0)&&_0x370521['error']('--add\x20and\x20--out\x20require\x20--page\x20<number>.',{'code':'compile-svg.invalid-input','exitCode':0x1});}function m(_0x1d457b,_0x196417,_0x8b0bd7){const _0x3d93e5=_0x3293b4;let _0x264fdc=_0x1d457b[_0x3d93e5(0x14b)]();for(let _0x2f0aa4 of _0x196417)_0x264fdc['writeErr']?.('warning:\x20'+_0x2f0aa4+'\x0a');for(let _0x636850 of _0x8b0bd7)_0x264fdc['writeErr']?.(_0x3d93e5(0x14c)+_0x636850+'\x0a');(_0x196417[_0x3d93e5(0x138)]>0x0||_0x8b0bd7['length']>0x0)&&_0x264fdc[_0x3d93e5(0x157)]?.(_0x3d93e5(0x162));}function h(_0x4d89cf,_0x50be4b){const _0xe6a377=_0x3293b4;_0x4d89cf[_0xe6a377(0x14b)]()[_0xe6a377(0x13b)]?.(JSON[_0xe6a377(0x14f)](_0x50be4b,null,0x2)+'\x0a');}function g(_0x48926b,_0x5e5b62){const _0x2c1570=_0x3293b4;_0x48926b['configureOutput']()[_0x2c1570(0x13b)]?.(_0x5e5b62+'\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.
|
|
4
|
+
"version": "1.6.1",
|
|
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.6.1"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"commander": "^15.0.0"
|