@univer-cli/svg-facade-command 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- const _0x9cfecc=_0x2f67;(function(_0xd6201c,_0x25de79){const _0x5164de=_0x2f67,_0x41036a=_0xd6201c();while(!![]){try{const _0x2b97c6=-parseInt(_0x5164de(0x1ce))/0x1*(parseInt(_0x5164de(0x1d1))/0x2)+-parseInt(_0x5164de(0x1ca))/0x3*(parseInt(_0x5164de(0x1d9))/0x4)+-parseInt(_0x5164de(0x1c2))/0x5+parseInt(_0x5164de(0x1be))/0x6+parseInt(_0x5164de(0x1e2))/0x7*(-parseInt(_0x5164de(0x1bb))/0x8)+-parseInt(_0x5164de(0x1dc))/0x9+parseInt(_0x5164de(0x1c7))/0xa;if(_0x2b97c6===_0x25de79)break;else _0x41036a['push'](_0x41036a['shift']());}catch(_0x479a2a){_0x41036a['push'](_0x41036a['shift']());}}}(_0xf79d,0xb83de));import{readFileSync as _0x517009,writeFileSync as _0x124859}from'node:fs';function _0x2f67(_0x12d0ec,_0x28ce42){_0x12d0ec=_0x12d0ec-0x1b3;const _0xf79d67=_0xf79d();let _0x2f6727=_0xf79d67[_0x12d0ec];return _0x2f6727;}function _0xf79d(){const _0x4b2951=['3788Movxsz','code','compile-svg.invalid-input','662NpLzrL','write\x20structured\x20JSON','--page\x20<number>','argument','<file.svg>','configureOutput','--json','generated\x20code:\x20','184396cjUxhW','lints','action','6808005bvuFcd','write\x20generated\x20code\x20to\x20a\x20file','page','overlay\x20onto\x20the\x20target\x20page\x20instead\x20of\x20clearing\x20it\x20first','--add\x20and\x20--out\x20require\x20--page\x20<number>.','--estimate-text-size','168OUxGDA','option','message','stringify','--out\x20<path>','compile-svg.failed','error','warning\x20=\x20unsupported\x20SVG\x20feature\x20degraded;\x20lint\x20=\x20review\x20suggestion,\x20nothing\x20was\x20dropped\x0a','writeOut','replace','isInteger','utf8','377928ugftyV','out','--add','836244lTrbnr','compile-svg','length','Expected\x20an\x20integer\x20>=\x201;\x20received\x20\x22','5846165uvUoQL','warnings','description','estimateTextSize','textMeasure','49746690VzvfjH','add','writeErr','3uXHbsl','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','viewport','Compile\x20SVG\x20into\x20Univer\x20Slide\x20Facade\x20code'];_0xf79d=function(){return _0x4b2951;};return _0xf79d();}import{dirname as _0x343c6f,resolve as _0x3f9683}from'node:path';import{builtinTextMeasurer as _0x1cebce,compileSvgToFacade as _0x364a06,isSvgFacadeError as _0x127578,wrapSlideScript as _0x5167ff}from'@univer-cli/svg-facade';import{Command as _0x5a9e00,InvalidArgumentError as _0x248a18}from'commander';var u=_0x9cfecc(0x1cb);function d(_0x5af5c3){const _0x5506cf=_0x9cfecc;let _0x32b261=new _0x5a9e00(_0x5506cf(0x1bf))[_0x5506cf(0x1c4)](_0x5506cf(0x1cd))[_0x5506cf(0x1d4)](_0x5506cf(0x1d5),'SVG\x20source\x20file')['option'](_0x5506cf(0x1d7),_0x5506cf(0x1d2))[_0x5506cf(0x1e3)](_0x5506cf(0x1e1),'use\x20deterministic\x20text-size\x20estimation\x20instead\x20of\x20the\x20injected\x20measurer')['option'](_0x5506cf(0x1d3),'wrap\x20the\x20result\x20for\x20a\x201-based\x20target\x20Slide\x20page',f)[_0x5506cf(0x1e3)](_0x5506cf(0x1bd),_0x5506cf(0x1df))[_0x5506cf(0x1e3)](_0x5506cf(0x1b3),_0x5506cf(0x1dd))[_0x5506cf(0x1db)](async(_0x278668,_0x1becff)=>{const _0xb2a0a2=_0x5506cf;p(_0x32b261,_0x1becff);try{let _0x3b907=_0x517009(_0x278668,_0xb2a0a2(0x1ba)),_0x691e27=_0x1becff[_0xb2a0a2(0x1c5)]===!0x0,_0x152bed=await _0x364a06(_0x3b907,{'assetResolver':_0x29060f=>({'bytes':_0x517009(_0x3f9683(_0x343c6f(_0x278668),_0x29060f))}),'textMeasurer':_0x691e27?_0x1cebce:_0x5af5c3['textMeasurer']}),_0x14a7ea=_0x691e27?[..._0x152bed['lints'],u]:_0x152bed[_0xb2a0a2(0x1da)],_0x1f8d28=_0x1becff[_0xb2a0a2(0x1c8)]===!0x0?_0xb2a0a2(0x1c8):_0xb2a0a2(0x1b8),_0xa747e8=_0x1becff[_0xb2a0a2(0x1de)]===void 0x0?_0x152bed[_0xb2a0a2(0x1cf)]:_0x5167ff(_0x152bed[_0xb2a0a2(0x1cf)],{'page':_0x1becff['page'],'mode':_0x1f8d28,..._0x152bed[_0xb2a0a2(0x1cc)]});if(_0x1becff[_0xb2a0a2(0x1bc)]!==void 0x0&&_0x124859(_0x1becff[_0xb2a0a2(0x1bc)],_0xa747e8+'\x0a',_0xb2a0a2(0x1ba)),_0x1becff['json']===!0x0){h(_0x32b261,{'code':_0xa747e8,'lints':_0x14a7ea,'textMeasure':_0x152bed[_0xb2a0a2(0x1c6)],'viewport':_0x152bed[_0xb2a0a2(0x1cc)],'warnings':_0x152bed[_0xb2a0a2(0x1c3)],..._0x1becff[_0xb2a0a2(0x1de)]===void 0x0?{}:{'mode':_0x1f8d28,'page':_0x1becff['page']},..._0x1becff[_0xb2a0a2(0x1bc)]===void 0x0?{}:{'out':_0x1becff[_0xb2a0a2(0x1bc)]}});return;}m(_0x32b261,_0x152bed[_0xb2a0a2(0x1c3)],_0x14a7ea),_0x1becff['out']===void 0x0?g(_0x32b261,_0xa747e8):g(_0x32b261,_0xb2a0a2(0x1d8)+_0x1becff[_0xb2a0a2(0x1bc)]);}catch(_0x1b4015){throw _0x127578(_0x1b4015)&&_0x32b261[_0xb2a0a2(0x1b5)](_0x1b4015[_0xb2a0a2(0x1cf)]+':\x20'+_0x1b4015['message'],{'code':_0xb2a0a2(0x1b4),'exitCode':0x1}),_0x1b4015 instanceof Error&&_0x32b261[_0xb2a0a2(0x1b5)](_0x1b4015[_0xb2a0a2(0x1e4)],{'code':_0xb2a0a2(0x1b4),'exitCode':0x1}),_0x1b4015;}});return _0x32b261;}function f(_0x294d7c){const _0x191d93=_0x9cfecc;let _0x1023e1=Number(_0x294d7c);if(!Number[_0x191d93(0x1b9)](_0x1023e1)||_0x1023e1<0x1)throw new _0x248a18(_0x191d93(0x1c1)+_0x294d7c+'\x22.');return _0x1023e1;}function p(_0x552ef6,_0x5c69fc){const _0x1f608d=_0x9cfecc;_0x5c69fc[_0x1f608d(0x1de)]===void 0x0&&(_0x5c69fc[_0x1f608d(0x1c8)]===!0x0||_0x5c69fc[_0x1f608d(0x1bc)]!==void 0x0)&&_0x552ef6[_0x1f608d(0x1b5)](_0x1f608d(0x1e0),{'code':_0x1f608d(0x1d0),'exitCode':0x1});}function m(_0x37cd54,_0x82535a,_0x45d543){const _0x2823e0=_0x9cfecc;let _0x50274e=_0x37cd54['configureOutput']();for(let _0x227fd4 of _0x82535a)_0x50274e[_0x2823e0(0x1c9)]?.('warning:\x20'+_0x227fd4+'\x0a');for(let _0x293b4c of _0x45d543)_0x50274e['writeErr']?.('lint:\x20'+_0x293b4c+'\x0a');(_0x82535a[_0x2823e0(0x1c0)]>0x0||_0x45d543[_0x2823e0(0x1c0)]>0x0)&&_0x50274e[_0x2823e0(0x1c9)]?.(_0x2823e0(0x1b6));}function h(_0x4d1b9e,_0x18c53f){const _0x10c2f9=_0x9cfecc;_0x4d1b9e[_0x10c2f9(0x1d6)]()['writeOut']?.(JSON[_0x10c2f9(0x1e5)](_0x18c53f,null,0x2)+'\x0a');}function g(_0x3a5b20,_0x3e4a47){const _0x994860=_0x9cfecc;_0x3a5b20['configureOutput']()[_0x994860(0x1b7)]?.(_0x3e4a47+'\x0a');}export{d as createCompileSvgCommand};
1
+ const _0x1c0cfb=_0xe4c1;function _0xe4c1(_0x3eb718,_0xe800df){_0x3eb718=_0x3eb718-0xbd;const _0x3c26de=_0x3c26();let _0xe4c137=_0x3c26de[_0x3eb718];return _0xe4c137;}(function(_0x18d590,_0x22e5ab){const _0x5aec0e=_0xe4c1,_0x5f177b=_0x18d590();while(!![]){try{const _0x5cac6d=-parseInt(_0x5aec0e(0xde))/0x1+-parseInt(_0x5aec0e(0xeb))/0x2*(parseInt(_0x5aec0e(0xd9))/0x3)+-parseInt(_0x5aec0e(0xcb))/0x4+parseInt(_0x5aec0e(0xed))/0x5*(-parseInt(_0x5aec0e(0xbe))/0x6)+parseInt(_0x5aec0e(0xe4))/0x7+parseInt(_0x5aec0e(0xdc))/0x8+parseInt(_0x5aec0e(0xcf))/0x9;if(_0x5cac6d===_0x22e5ab)break;else _0x5f177b['push'](_0x5f177b['shift']());}catch(_0x265e46){_0x5f177b['push'](_0x5f177b['shift']());}}}(_0x3c26,0x71b4c));import{readFileSync as _0x1c1c3e,writeFileSync as _0x252ace}from'node:fs';import{dirname as _0x2463e2,resolve as _0x162fa6}from'node:path';import{builtinTextMeasurer as _0x465818,compileSvgToFacade as _0x3ca2aa,isSvgFacadeError as _0x5a6c56,wrapSlideScript as _0x27ac7a}from'@univer-cli/svg-facade';import{Command as _0x1d9168,InvalidArgumentError as _0x1a6e4c}from'commander';var u=_0x1c0cfb(0xd6);function d(_0x127b69){const _0x5c4c3f=_0x1c0cfb;let _0x4decfa=new _0x1d9168(_0x5c4c3f(0xdb))[_0x5c4c3f(0xc8)](_0x5c4c3f(0xe2))['argument'](_0x5c4c3f(0xc0),_0x5c4c3f(0xd2))[_0x5c4c3f(0xe9)]('--json',_0x5c4c3f(0xd5))[_0x5c4c3f(0xe9)](_0x5c4c3f(0xee),'use\x20deterministic\x20text-size\x20estimation\x20instead\x20of\x20the\x20injected\x20measurer')[_0x5c4c3f(0xe9)](_0x5c4c3f(0xce),_0x5c4c3f(0xe3),f)[_0x5c4c3f(0xe9)]('--add','overlay\x20onto\x20the\x20target\x20page\x20instead\x20of\x20clearing\x20it\x20first')['option'](_0x5c4c3f(0xe1),_0x5c4c3f(0xdf))['action'](async(_0x330f61,_0x17ba07)=>{const _0x26742c=_0x5c4c3f;p(_0x4decfa,_0x17ba07);try{let _0xdf9974=_0x1c1c3e(_0x330f61,'utf8'),_0x344208=_0x17ba07[_0x26742c(0xec)]===!0x0,_0x2c7687=await _0x3ca2aa(_0xdf9974,{'assetResolver':_0x9566c5=>({'bytes':_0x1c1c3e(_0x162fa6(_0x2463e2(_0x330f61),_0x9566c5))}),'textMeasurer':_0x344208?_0x465818:_0x127b69[_0x26742c(0xe7)]}),_0x23ad48=_0x344208?[..._0x2c7687[_0x26742c(0xcc)],u]:_0x2c7687[_0x26742c(0xcc)],_0x25e6ee=_0x17ba07[_0x26742c(0xbf)]===!0x0?_0x26742c(0xbf):_0x26742c(0xe0),_0x30b638=_0x17ba07[_0x26742c(0xd8)]===void 0x0?_0x2c7687[_0x26742c(0xe8)]:_0x27ac7a(_0x2c7687[_0x26742c(0xe8)],{'page':_0x17ba07[_0x26742c(0xd8)],'mode':_0x25e6ee,..._0x2c7687[_0x26742c(0xbd)]});if(_0x17ba07['out']!==void 0x0&&_0x252ace(_0x17ba07['out'],_0x30b638+'\x0a',_0x26742c(0xe5)),_0x17ba07[_0x26742c(0xc2)]===!0x0){h(_0x4decfa,{'code':_0x30b638,'lints':_0x23ad48,'textMeasure':_0x2c7687[_0x26742c(0xcd)],'viewport':_0x2c7687['viewport'],'warnings':_0x2c7687[_0x26742c(0xd7)],..._0x17ba07[_0x26742c(0xd8)]===void 0x0?{}:{'mode':_0x25e6ee,'page':_0x17ba07[_0x26742c(0xd8)]},..._0x17ba07[_0x26742c(0xc6)]===void 0x0?{}:{'out':_0x17ba07['out']}});return;}m(_0x4decfa,_0x2c7687[_0x26742c(0xd7)],_0x23ad48),_0x17ba07[_0x26742c(0xc6)]===void 0x0?g(_0x4decfa,_0x30b638):g(_0x4decfa,_0x26742c(0xca)+_0x17ba07[_0x26742c(0xc6)]);}catch(_0x4eae51){throw _0x5a6c56(_0x4eae51)&&_0x4decfa[_0x26742c(0xd1)](_0x4eae51[_0x26742c(0xe8)]+':\x20'+_0x4eae51[_0x26742c(0xda)],{'code':'compile-svg.failed','exitCode':0x1}),_0x4eae51 instanceof Error&&_0x4decfa['error'](_0x4eae51[_0x26742c(0xda)],{'code':_0x26742c(0xd3),'exitCode':0x1}),_0x4eae51;}});return _0x4decfa;}function f(_0x3c5f09){const _0x133578=_0x1c0cfb;let _0x4e3a9c=Number(_0x3c5f09);if(!Number[_0x133578(0xc3)](_0x4e3a9c)||_0x4e3a9c<0x1)throw new _0x1a6e4c(_0x133578(0xdd)+_0x3c5f09+'\x22.');return _0x4e3a9c;}function p(_0x14d22f,_0x12c119){const _0x42a7d3=_0x1c0cfb;_0x12c119[_0x42a7d3(0xd8)]===void 0x0&&(_0x12c119[_0x42a7d3(0xbf)]===!0x0||_0x12c119[_0x42a7d3(0xc6)]!==void 0x0)&&_0x14d22f[_0x42a7d3(0xd1)](_0x42a7d3(0xea),{'code':_0x42a7d3(0xc1),'exitCode':0x1});}function m(_0x2775f3,_0x142ce7,_0x5d22f6){const _0xa1587c=_0x1c0cfb;let _0x3df8aa=_0x2775f3[_0xa1587c(0xe6)]();for(let _0xfff77a of _0x142ce7)_0x3df8aa[_0xa1587c(0xd0)]?.(_0xa1587c(0xd4)+_0xfff77a+'\x0a');for(let _0xc176c7 of _0x5d22f6)_0x3df8aa[_0xa1587c(0xd0)]?.('lint:\x20'+_0xc176c7+'\x0a');(_0x142ce7[_0xa1587c(0xc4)]>0x0||_0x5d22f6[_0xa1587c(0xc4)]>0x0)&&_0x3df8aa[_0xa1587c(0xd0)]?.(_0xa1587c(0xc5));}function h(_0x5364c1,_0x54c3d3){const _0x486eff=_0x1c0cfb;_0x5364c1['configureOutput']()['writeOut']?.(JSON[_0x486eff(0xc7)](_0x54c3d3,null,0x2)+'\x0a');}function g(_0x2763ff,_0x68f82f){const _0x1d7227=_0x1c0cfb;_0x2763ff[_0x1d7227(0xe6)]()[_0x1d7227(0xc9)]?.(_0x68f82f+'\x0a');}function _0x3c26(){const _0x1d1dd3=['--estimate-text-size','viewport','18972wgPhAI','add','<file.svg>','compile-svg.invalid-input','json','isInteger','length','warning\x20=\x20unsupported\x20SVG\x20feature\x20degraded;\x20lint\x20=\x20review\x20suggestion,\x20nothing\x20was\x20dropped\x0a','out','stringify','description','writeOut','generated\x20code:\x20','1341128pYACkg','lints','textMeasure','--page\x20<number>','5216139rvtxdk','writeErr','error','SVG\x20source\x20file','compile-svg.failed','warning:\x20','write\x20structured\x20JSON','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','warnings','page','465723ulUOzo','message','compile-svg','1717264WEnXbe','Expected\x20an\x20integer\x20>=\x201;\x20received\x20\x22','171428AQTEgV','write\x20generated\x20code\x20to\x20a\x20file','replace','--out\x20<path>','Compile\x20SVG\x20into\x20Univer\x20Slide\x20Facade\x20code','wrap\x20the\x20result\x20for\x20a\x201-based\x20target\x20Slide\x20page','6030612tlgLap','utf8','configureOutput','textMeasurer','code','option','--add\x20and\x20--out\x20require\x20--page\x20<number>.','2AwODHo','estimateTextSize','835ZKShvs'];_0x3c26=function(){return _0x1d1dd3;};return _0x3c26();}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.3",
4
+ "version": "1.0.4",
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.3"
21
+ "@univer-cli/svg-facade": "1.0.4"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "commander": "^15.0.0"