@guihz/trading-vue-editor-tes 0.0.294 → 0.0.296
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/lib/assets/{parserTccWorker-CYVuZ7Vc.js → parserTccWorker-B8XoJ7sV.js} +1 -1
- package/lib/assets/{scriptsRunWorker-CsBnEaG3.js → scriptsRunWorker-CFjAsyQD.js} +27 -27
- package/lib/components/editor/parseScript/buildInFuncNamespace/box.d.ts +2 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/label.d.ts +2 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/line.d.ts +2 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/linefill.d.ts +2 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/strategy.d.ts +1 -1
- package/lib/components/editor/parseScript/buildInFuncNamespace/string.d.ts +1 -1
- package/lib/components/editor/parseScript/buildInFuncNamespace/table.d.ts +2 -0
- package/lib/components/editor/parseScript/buildInVarNamespace/strategy.d.ts +21 -2
- package/lib/components/editor/parseScript/strategyNamespace/opentrades.d.ts +2 -0
- package/lib/trading-vue-editor.es.packages.js +2479 -2221
- package/lib/trading-vue-editor.umd.packages.mjs +27 -27
- package/package.json +1 -1
@@ -282,6 +282,6 @@ Input files:
|
|
282
282
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,`+Sq(y)}else e.sourceMap.url&&(q.code+=`
|
283
283
|
//# sourceMappingURL=`+e.sourceMap.url)}return e.nameCache&&e.mangle&&(e.mangle.cache&&(e.nameCache.vars=FO(e.mangle.cache)),e.mangle.properties&&e.mangle.properties.cache&&(e.nameCache.props=FO(e.mangle.properties.cache))),m&&m.source_map&&m.source_map.destroy(),r&&(r.end=Date.now(),q.timings={parse:.001*(r.rename-r.parse),rename:.001*(r.compress-r.rename),compress:.001*(r.scope-r.compress),scope:.001*(r.mangle-r.scope),mangle:.001*(r.properties-r.mangle),properties:.001*(r.format-r.properties),format:.001*(r.end-r.format),total:.001*(r.end-r.start)}),q}async function UO(t,e,n){const r=Bq(t,e,n);let i,s;do s=r.next(await i),i=s.value;while(!s.done);return s.value}function VO(t){const e=new l3(t),n=new tp(e);n.removeErrorListeners();const r=new u3(n),i=new D(r);i._interp.predictionMode=m3.SLL,i.removeErrorListeners();const s=new Dq;n.addErrorListener(s),i.addErrorListener(s),i.buildParseTrees=!0;const b=i.program(),z=r.tokens.filter(q=>q.channel===2);return{errors:s.errors,ast:b,comments:z}}async function Cq(t,e,n,r){const{errors:i,ast:s,comments:b}=VO(t+`
|
284
284
|
|
285
|
-
`),z=new $z(r,b,n),q=await z.visit(s);let m=i.splice(0,1);m.length||(m=z.errors);let R="";const y=new r4("_$");let E=e?"":y.preParser(q);
|
285
|
+
`),z=new $z(r,b,n),q=await z.visit(s);let m=i.splice(0,1);m.length||(m=z.errors);let R="";const y=new r4("_$");let E=e?"":y.preParser(q);const C={};if(e&&!m.some(k=>k.type===xe.Error)){const{code:k="",hasLeftVisibleBarTime:h,hasRightVisibleBarTime:A}=y.parser(q)||{};Object.assign(C,{hasLeftVisibleBarTime:h,hasRightVisibleBarTime:A}),E=y.preParseCode;try{R=(await UO(k,{compress:!0,mangle:!0})).code||"";const v={message:O0.indiRunErr,type:xe.Error,startColumn:0,startLineNumber:0,endColumn:0,endLineNumber:0};if(z.hasUseDrawFunc){if(z.scriptType===sr.library)z.exportPositions.length||(v.message=O0.libraryExportErr,m.push(v));else if(z.exportPositions.length){const L=z.exportPositions.map(T=>{const{type:I,...K}=T;return{message:l0(O0.exportUseErr,{type:I}),type:xe.Error,...K}});m.push(...L)}}else switch(z.scriptType){case sr.indicator:m.push(v);break;case sr.strategy:z.hasUseCreateOrderFunc||(v.message=O0.strategyRunErr,m.push(v));break}}catch(d){m.push({message:(d==null?void 0:d.message)||"minify error",type:xe.Error,startColumn:0,startLineNumber:0,endColumn:0,endLineNumber:0})}}return{errors:m,functions:Object.fromEntries(z.userFunctions),variables:Object.fromEntries(z.userVariables),types:Object.fromEntries(z.userTypes),methods:Object.fromEntries(z.userMethods),overloadsFuncs:z.overloadsFuncs,imports:Object.fromEntries(z.imports),enums:Object.fromEntries(z.userEnums),codeStr:R,preParserCode:E,config:C}}async function xq(t,e,n,r){const{ast:i,comments:s}=VO(t+`
|
286
286
|
|
287
287
|
`),b=new $z(r,s,n),z=await b.visit(i),{name:q,index:m}=b.endExport,R=z.findIndex(h=>h.name===q&&h.index===m),y=z.slice(0,R+1),C=new o4("$",e).parser(y)||"",k=await UO(C,{compress:!0,mangle:!0});return{...b.exportLibs,description:b.description,codeStr:k.code||""}}class Dq extends z3{constructor(){super(...arguments);S(this,"errors",[])}syntaxError(n,r,i,s,b){this.errors.push({message:`syntax error: ${b.replace(/expecting.+/,"")}`,type:xe.Error,startColumn:s,startLineNumber:i,endColumn:s,endLineNumber:i})}}wp({parseTcc:Cq,parseLibraryCode:xq})})();
|