@univer-cli/svg-facade-command 1.0.0-beta.2 → 1.0.0-rc.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 _0x3cfba5=_0x25e9;(function(_0x491875,_0x1a32cd){const _0x4adc93=_0x25e9,_0x14f6b6=_0x491875();while(!![]){try{const _0x58349b=-parseInt(_0x4adc93(0x150))/0x1*(parseInt(_0x4adc93(0x14c))/0x2)+-parseInt(_0x4adc93(0x16d))/0x3*(parseInt(_0x4adc93(0x164))/0x4)+parseInt(_0x4adc93(0x169))/0x5*(-parseInt(_0x4adc93(0x14d))/0x6)+-parseInt(_0x4adc93(0x142))/0x7*(parseInt(_0x4adc93(0x163))/0x8)+-parseInt(_0x4adc93(0x152))/0x9*(parseInt(_0x4adc93(0x16a))/0xa)+-parseInt(_0x4adc93(0x166))/0xb*(-parseInt(_0x4adc93(0x159))/0xc)+-parseInt(_0x4adc93(0x156))/0xd*(-parseInt(_0x4adc93(0x170))/0xe);if(_0x58349b===_0x1a32cd)break;else _0x14f6b6['push'](_0x14f6b6['shift']());}catch(_0x1a2012){_0x14f6b6['push'](_0x14f6b6['shift']());}}}(_0x5444,0xdd965));import{readFileSync as _0x2ba72f,writeFileSync as _0x8a3044}from'node:fs';import{dirname as _0x437a18,resolve as _0x4811fe}from'node:path';import{builtinTextMeasurer as _0x4f19f6,compileSvgToFacade as _0x19a57a,isSvgFacadeError as _0x464ea0,wrapSlideScript as _0x4a1bd3}from'@univer-cli/svg-facade';import{Command as _0xc435a,InvalidArgumentError as _0x57ea78}from'commander';var u=_0x3cfba5(0x173);function d(_0x15ef65){const _0x241cd0=_0x3cfba5;let _0x3a2db5=new _0xc435a('compile-svg')[_0x241cd0(0x14f)](_0x241cd0(0x171))[_0x241cd0(0x14a)](_0x241cd0(0x141),_0x241cd0(0x16c))[_0x241cd0(0x167)](_0x241cd0(0x162),'write\x20structured\x20JSON')[_0x241cd0(0x167)](_0x241cd0(0x175),_0x241cd0(0x165))['option'](_0x241cd0(0x146),_0x241cd0(0x15f),f)['option'](_0x241cd0(0x154),_0x241cd0(0x15d))['option']('--out\x20<path>',_0x241cd0(0x16e))['action'](async(_0x3da800,_0xa2322)=>{const _0x70dffc=_0x241cd0;p(_0x3a2db5,_0xa2322);try{let _0x2df2b8=_0x2ba72f(_0x3da800,_0x70dffc(0x157)),_0x1f3bb1=_0xa2322['estimateTextSize']===!0x0,_0x50937f=await _0x19a57a(_0x2df2b8,{'assetResolver':_0x52bbe2=>({'bytes':_0x2ba72f(_0x4811fe(_0x437a18(_0x3da800),_0x52bbe2))}),'textMeasurer':_0x1f3bb1?_0x4f19f6:_0x15ef65[_0x70dffc(0x143)]}),_0x32e62a=_0x1f3bb1?[..._0x50937f['lints'],u]:_0x50937f[_0x70dffc(0x148)],_0x1968e7=_0xa2322[_0x70dffc(0x149)]===!0x0?_0x70dffc(0x149):_0x70dffc(0x176),_0xa4f96=_0xa2322['page']===void 0x0?_0x50937f[_0x70dffc(0x158)]:_0x4a1bd3(_0x50937f[_0x70dffc(0x158)],{'page':_0xa2322[_0x70dffc(0x168)],'mode':_0x1968e7,..._0x50937f['viewport']});if(_0xa2322[_0x70dffc(0x15c)]!==void 0x0&&_0x8a3044(_0xa2322[_0x70dffc(0x15c)],_0xa4f96+'\x0a','utf8'),_0xa2322[_0x70dffc(0x14e)]===!0x0){h(_0x3a2db5,{'code':_0xa4f96,'lints':_0x32e62a,'textMeasure':_0x50937f[_0x70dffc(0x15e)],'viewport':_0x50937f[_0x70dffc(0x15a)],'warnings':_0x50937f['warnings'],..._0xa2322['page']===void 0x0?{}:{'mode':_0x1968e7,'page':_0xa2322[_0x70dffc(0x168)]},..._0xa2322['out']===void 0x0?{}:{'out':_0xa2322[_0x70dffc(0x15c)]}});return;}m(_0x3a2db5,_0x50937f['warnings'],_0x32e62a),_0xa2322['out']===void 0x0?g(_0x3a2db5,_0xa4f96):g(_0x3a2db5,_0x70dffc(0x153)+_0xa2322[_0x70dffc(0x15c)]);}catch(_0x3515a4){throw _0x464ea0(_0x3515a4)&&_0x3a2db5[_0x70dffc(0x160)](_0x3515a4[_0x70dffc(0x158)]+':\x20'+_0x3515a4[_0x70dffc(0x145)],{'code':'compile-svg.failed','exitCode':0x1}),_0x3515a4 instanceof Error&&_0x3a2db5['error'](_0x3515a4[_0x70dffc(0x145)],{'code':_0x70dffc(0x174),'exitCode':0x1}),_0x3515a4;}});return _0x3a2db5;}function f(_0x329725){const _0x4750a6=_0x3cfba5;let _0x25f4e8=Number(_0x329725);if(!Number[_0x4750a6(0x144)](_0x25f4e8)||_0x25f4e8<0x1)throw new _0x57ea78('Expected\x20an\x20integer\x20>=\x201;\x20received\x20\x22'+_0x329725+'\x22.');return _0x25f4e8;}function p(_0x10fd96,_0x4d11c4){const _0xb6922b=_0x3cfba5;_0x4d11c4[_0xb6922b(0x168)]===void 0x0&&(_0x4d11c4['add']===!0x0||_0x4d11c4[_0xb6922b(0x15c)]!==void 0x0)&&_0x10fd96['error'](_0xb6922b(0x147),{'code':_0xb6922b(0x16b),'exitCode':0x1});}function m(_0x22d659,_0x468dbe,_0x231281){const _0x51a05d=_0x3cfba5;let _0x464b88=_0x22d659[_0x51a05d(0x161)]();for(let _0x1b7ed7 of _0x468dbe)_0x464b88[_0x51a05d(0x151)]?.(_0x51a05d(0x16f)+_0x1b7ed7+'\x0a');for(let _0x9fb073 of _0x231281)_0x464b88['writeErr']?.(_0x51a05d(0x172)+_0x9fb073+'\x0a');(_0x468dbe[_0x51a05d(0x15b)]>0x0||_0x231281['length']>0x0)&&_0x464b88[_0x51a05d(0x151)]?.(_0x51a05d(0x14b));}function _0x25e9(_0x56cd24,_0x523b6e){_0x56cd24=_0x56cd24-0x141;const _0x54440=_0x5444();let _0x25e93d=_0x54440[_0x56cd24];return _0x25e93d;}function h(_0x48dd2c,_0x484aa8){const _0x210f86=_0x3cfba5;_0x48dd2c[_0x210f86(0x161)]()[_0x210f86(0x155)]?.(JSON['stringify'](_0x484aa8,null,0x2)+'\x0a');}function g(_0x285fd3,_0x5173ea){const _0x190ff2=_0x3cfba5;_0x285fd3[_0x190ff2(0x161)]()['writeOut']?.(_0x5173ea+'\x0a');}function _0x5444(){const _0x544e6c=['message','--page\x20<number>','--add\x20and\x20--out\x20require\x20--page\x20<number>.','lints','add','argument','warning\x20=\x20unsupported\x20SVG\x20feature\x20degraded;\x20lint\x20=\x20review\x20suggestion,\x20nothing\x20was\x20dropped\x0a','355182HROXsZ','6330360iqWnsK','json','description','10GPAPhN','writeErr','99ZABsyc','generated\x20code:\x20','--add','writeOut','10297963SdaqGf','utf8','code','12pmzHeF','viewport','length','out','overlay\x20onto\x20the\x20target\x20page\x20instead\x20of\x20clearing\x20it\x20first','textMeasure','wrap\x20the\x20result\x20for\x20a\x201-based\x20target\x20Slide\x20page','error','configureOutput','--json','12975736OHoJKb','36VAwPHL','use\x20deterministic\x20text-size\x20estimation\x20instead\x20of\x20the\x20injected\x20measurer','5098951CAhLVk','option','page','5kKUqZw','1278260zTMsox','compile-svg.invalid-input','SVG\x20source\x20file','539469jeFJgM','write\x20generated\x20code\x20to\x20a\x20file','warning:\x20','140rnXJsd','Compile\x20SVG\x20into\x20Univer\x20Slide\x20Facade\x20code','lint:\x20','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','compile-svg.failed','--estimate-text-size','replace','<file.svg>','7kKkXyZ','textMeasurer','isInteger'];_0x5444=function(){return _0x544e6c;};return _0x5444();}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.0-
|
|
4
|
+
"version": "1.0.0-rc.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.0-
|
|
21
|
+
"@univer-cli/svg-facade": "1.0.0-rc.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"commander": "^15.0.0"
|