@guihz/trading-vue-editor-tes 0.0.302 → 0.1.2
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/editor.worker-BxEYBjj-.js +7352 -0
- package/lib/assets/parserTccWorker-DzTqNT47.js +80539 -0
- package/lib/assets/scriptsRunWorker-RM2NRIoU.js +37755 -0
- package/lib/components/diffEditor/index.d.ts +1 -0
- package/lib/components/editor/config/monarchTokens.d.ts +2 -4
- package/lib/components/editor/constants/common.d.ts +38 -0
- package/lib/components/editor/constants/locals.d.ts +1 -0
- package/lib/components/editor/index.d.ts +1 -0
- package/lib/components/editor/tokenizer/utils.d.ts +0 -16
- package/lib/components/editor/type/index.d.ts +32 -1
- package/lib/components/editor/utils/completions.d.ts +3 -1
- package/lib/components/editor/utils/importLibrary.d.ts +2 -160
- package/lib/components/editor/utils/initEditor.d.ts +3 -0
- package/lib/components/editor/utils/parse.d.ts +2 -0
- package/lib/components/editor/utils/parserTccWorker.d.ts +1 -7
- package/lib/components/editor/utils/scriptsRunWorker.d.ts +1 -1
- package/lib/components/editor/utils/signatureHelp.d.ts +2 -0
- package/lib/components/editor/utils/tools.d.ts +6 -0
- package/lib/components/editor/v3/config/monarchTokens.d.ts +3 -0
- package/lib/components/editor/v3/constants/contents_zh.d.ts +6 -0
- package/lib/components/editor/{constants/contents.d.ts → v3/constants/index.d.ts} +1 -5
- package/lib/components/editor/v3/parseScript/buildInConstants.d.ts +179 -0
- package/lib/components/editor/v3/parseScript/buildInFuncNamespace/index.d.ts +9 -0
- package/lib/components/editor/v3/parseScript/buildInFuncNamespace/input.d.ts +43 -0
- package/lib/components/editor/v3/parseScript/buildInFuncNamespace/math.d.ts +50 -0
- package/lib/components/editor/v3/parseScript/buildInFuncNamespace/strategy.d.ts +243 -0
- package/lib/components/editor/v3/parseScript/buildInFuncNamespace/ta.d.ts +102 -0
- package/lib/components/editor/{parseScript → v3/parseScript}/buildInFuncNamespace/timeframe.d.ts +1 -1
- package/lib/components/editor/v3/parseScript/buildInVarNamespace/barstate.d.ts +19 -0
- package/lib/components/editor/v3/parseScript/buildInVarNamespace/index.d.ts +4 -0
- package/lib/components/editor/v3/parseScript/buildInVarNamespace/strategy.d.ts +126 -0
- package/lib/components/editor/v3/parseScript/buildInVarNamespace/syminfo.d.ts +22 -0
- package/lib/components/editor/v3/parseScript/buildInVarNamespace/ta.d.ts +17 -0
- package/lib/components/editor/v3/parseScript/buildInVariables.d.ts +96 -0
- package/lib/components/editor/v3/parseScript/constants.d.ts +119 -0
- package/lib/components/editor/v3/parseScript/enum.d.ts +283 -0
- package/lib/components/editor/v3/parseScript/parseToJs.d.ts +65 -0
- package/lib/components/editor/v3/parseScript/runType.d.ts +119 -0
- package/lib/components/editor/v3/parseScript/strategyNamespace/index.d.ts +2 -0
- package/lib/components/editor/{parseScript → v3/parseScript}/type.d.ts +1 -1
- package/lib/components/editor/v3/parseScript/utils.d.ts +21 -0
- package/lib/components/editor/v3/parseScript/visitorParser.d.ts +321 -0
- package/lib/components/editor/v3/parseScript/visitorUtils.d.ts +25 -0
- package/lib/components/editor/v3/parserTccWorker.d.ts +32 -0
- package/lib/components/editor/v3/scriptsRunWorker.d.ts +11 -0
- package/lib/{tccParser → components/editor/v3/tccParser}/LexerBase.d.ts +1 -1
- package/lib/components/editor/v3/tccParser/tccScriptParserVisitor.d.ts +359 -0
- package/lib/components/editor/v4/config/monarchTokens.d.ts +205 -0
- package/lib/components/editor/v4/constants/contents_zh.d.ts +6 -0
- package/lib/components/editor/v4/constants/index.d.ts +44 -0
- package/lib/components/editor/v4/parseScript/buildInConstants.d.ts +308 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/array.d.ts +84 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/box.d.ts +60 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/errorListener.d.ts +9 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/index.d.ts +17 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/input.d.ts +44 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/label.d.ts +61 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/line.d.ts +62 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/math.d.ts +50 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/strategy.d.ts +244 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/string.d.ts +38 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/ta.d.ts +118 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/table.d.ts +87 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/timeframe.d.ts +22 -0
- package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/barstate.d.ts +1 -1
- package/lib/components/editor/v4/parseScript/buildInVarNamespace/index.d.ts +8 -0
- package/lib/components/editor/v4/parseScript/buildInVarNamespace/strategy.d.ts +126 -0
- package/lib/components/editor/v4/parseScript/buildInVarNamespace/syminfo.d.ts +18 -0
- package/lib/components/editor/v4/parseScript/buildInVarNamespace/ta.d.ts +34 -0
- package/lib/components/editor/{parseScript → v4/parseScript}/constants.d.ts +1 -160
- package/lib/components/editor/v4/parseScript/constantsRun.d.ts +3 -0
- package/lib/components/editor/v4/parseScript/enum.d.ts +282 -0
- package/lib/components/editor/v4/parseScript/parseToJs.d.ts +65 -0
- package/lib/components/editor/v4/parseScript/strategyNamespace/index.d.ts +2 -0
- package/lib/components/editor/v4/parseScript/strategyNamespace/risk.d.ts +22 -0
- package/lib/components/editor/v4/parseScript/type.d.ts +39 -0
- package/lib/components/editor/v4/parseScript/utils.d.ts +21 -0
- package/lib/components/editor/v4/parseScript/visitorParser.d.ts +323 -0
- package/lib/components/editor/v4/parseScript/visitorUtils.d.ts +29 -0
- package/lib/components/editor/v4/parserTccWorker.d.ts +32 -0
- package/lib/components/editor/v4/scriptsRunWorker.d.ts +11 -0
- package/lib/components/editor/v4/tccParser/LexerBase.d.ts +19 -0
- package/lib/components/editor/v4/tccParser/tccScriptParserVisitor.d.ts +401 -0
- package/lib/components/editor/v5/config/monarchTokens.d.ts +205 -0
- package/lib/components/editor/v5/constants/contents_en.d.ts +6 -0
- package/lib/components/editor/{constants → v5/constants}/contents_zh.d.ts +1 -1
- package/lib/components/editor/v5/constants/index.d.ts +41 -0
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/box.d.ts +2 -1
- package/lib/components/editor/v5/parseScript/buildInFuncNamespace/color.d.ts +25 -0
- package/lib/components/editor/v5/parseScript/buildInFuncNamespace/errorListener.d.ts +9 -0
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/label.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/line.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/linefill.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/log.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/map.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/math.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/polyline.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/strategy.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/ta.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/table.d.ts +1 -1
- package/lib/components/editor/v5/parseScript/buildInFuncNamespace/timeframe.d.ts +22 -0
- package/lib/components/editor/v5/parseScript/buildInVarNamespace/barstate.d.ts +22 -0
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/chart.d.ts +1 -1
- package/lib/components/editor/v5/parseScript/buildInVarNamespace/dividends.d.ts +8 -0
- package/lib/components/editor/v5/parseScript/buildInVarNamespace/earnings.d.ts +9 -0
- package/lib/components/editor/v5/parseScript/buildInVarNamespace/session.d.ts +12 -0
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/strategy.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/syminfo.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/ta.d.ts +4 -3
- package/lib/components/editor/v5/parseScript/buildInVarNamespace/timeframe.d.ts +16 -0
- package/lib/components/editor/v5/parseScript/constants.d.ts +124 -0
- package/lib/components/editor/v5/parseScript/constantsRun.d.ts +3 -0
- package/lib/components/editor/{parseScript → v5/parseScript}/parseToJs.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/parseToLibJs.d.ts +1 -1
- package/lib/components/editor/v5/parseScript/strategyNamespace/risk.d.ts +22 -0
- package/lib/components/editor/v5/parseScript/type.d.ts +39 -0
- package/lib/components/editor/{parseScript → v5/parseScript}/userTypeClass.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/utils.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/visitorParser.d.ts +1 -1
- package/lib/components/editor/{parseScript → v5/parseScript}/visitorUtils.d.ts +2 -2
- package/lib/components/editor/v5/parserTccWorker.d.ts +40 -0
- package/lib/components/editor/v5/scriptsRunWorker.d.ts +11 -0
- package/lib/components/editor/v5/tccParser/LexerBase.d.ts +19 -0
- package/lib/{tccParser → components/editor/v5/tccParser}/tccScriptParserVisitor.d.ts +1 -1
- package/lib/components/referenceManual/components/ContentItem.d.ts +2 -0
- package/lib/components/referenceManual/index.d.ts +2 -0
- package/lib/components/referenceManualPage/components/ContentItem.d.ts +1 -0
- package/lib/components/referenceManualPage/components/ManualLeft.d.ts +5 -0
- package/lib/components/referenceManualPage/index.d.ts +2 -0
- package/lib/index-Ce2gRdFk.js +12813 -0
- package/lib/index-CjECfhIW.js +28088 -0
- package/lib/index-S1gW0Mpf.js +59972 -0
- package/lib/monarchTokens-CMDv_iys.js +563 -0
- package/lib/monarchTokens-Cj3v8l0Q.js +526 -0
- package/lib/monarchTokens-CnFYyHnR.js +191 -0
- package/lib/packages/index.d.ts +3 -3
- package/lib/trading-vue-editor.es.packages.js +6344 -66617
- package/lib/trading-vue-editor.umd.packages.mjs +117 -75
- package/lib/utils/tools.d.ts +8 -3
- package/package.json +1 -1
- package/lib/assets/editor.worker-CT5Cb1wO.js +0 -11
- package/lib/assets/parserTccWorker-cjv11J0f.js +0 -279
- package/lib/assets/scriptsRunWorker-ISxcgzMz.js +0 -91
- /package/lib/components/editor/{parseScript → v3/parseScript}/buildInFuncNamespace/errorListener.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v3/parseScript}/constantsRun.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v3/parseScript}/strategyNamespace/risk.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v4/parseScript}/buildInFuncNamespace/color.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/dividends.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/earnings.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/session.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/timeframe.d.ts +0 -0
- /package/lib/components/editor/{constants → v5/constants}/newContents_en.d.ts +0 -0
- /package/lib/components/editor/{constants → v5/constants}/newContents_zh.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInConstants.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/array.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/chartPoint.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/index.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/input.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/matrix.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/runtime.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/string.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/syminfo.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/index.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/enum.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/strategyNamespace/closedtrades.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/strategyNamespace/index.d.ts +0 -0
- /package/lib/components/editor/{parseScript → v5/parseScript}/strategyNamespace/opentrades.d.ts +0 -0
@@ -1,7 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
export declare const LANGAGE_NAME = "
|
3
|
-
export declare const LANGUAGE_MONARCH_TOKENS: languages.IMonarchLanguage;
|
4
|
-
export declare const CONFIGURATION: languages.LanguageConfiguration;
|
1
|
+
import { editor } from 'monaco-editor';
|
2
|
+
export declare const LANGAGE_NAME = "mineScript";
|
5
3
|
export declare const COLORS: {
|
6
4
|
"color-white": string;
|
7
5
|
"color-black": string;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { IKeyValueStr } from "../type";
|
2
|
+
export declare const NOT_SHOW_KEYWORDS: string[];
|
3
|
+
export declare const COMPLETE_KEYS: string[];
|
4
|
+
export declare const HOVER_KEYS: string[];
|
5
|
+
export declare const BUILD_IN_VALUE: IKeyValueStr;
|
6
|
+
export declare const ALL_KINDS: {
|
7
|
+
argument: string;
|
8
|
+
keyword: string;
|
9
|
+
field: string;
|
10
|
+
userFunction: string;
|
11
|
+
builtInFunction: string;
|
12
|
+
library: string;
|
13
|
+
userVariable: string;
|
14
|
+
builtInVariable: string;
|
15
|
+
namespace: string;
|
16
|
+
operator: string;
|
17
|
+
constant: string;
|
18
|
+
annotation: string;
|
19
|
+
userMethod: string;
|
20
|
+
builtinMethod: string;
|
21
|
+
userType: string;
|
22
|
+
builtinType: string;
|
23
|
+
};
|
24
|
+
export declare const DEFAULT_DETIALS: IKeyValueStr;
|
25
|
+
export declare const READY_ONLY_OPTIONS: {
|
26
|
+
domReadOnly: boolean;
|
27
|
+
scrollBeyondLastLine: boolean;
|
28
|
+
readOnly: boolean;
|
29
|
+
minimap: {
|
30
|
+
enabled: boolean;
|
31
|
+
};
|
32
|
+
scrollbar: {
|
33
|
+
vertical: string;
|
34
|
+
horizontal: string;
|
35
|
+
alwaysConsumeMouseWheel: boolean;
|
36
|
+
};
|
37
|
+
contextmenu: boolean;
|
38
|
+
};
|
@@ -2,3 +2,4 @@ export declare const LAST_EDITED_SCRIPT = "tcc_last_edited_script";
|
|
2
2
|
export declare const ORIGINAL_SCRIPT = "tcc_original_script";
|
3
3
|
export declare const CURSOR_POSITION = "tcc_cursor_position";
|
4
4
|
export declare const REMOVE_ACTIONS: string[];
|
5
|
+
export declare const DEFAULT_VERSION = 3;
|
@@ -19,6 +19,7 @@ interface IProps {
|
|
19
19
|
onDeclareConfigChange?: (value: IKeyObjectValue) => void;
|
20
20
|
onActionTrigger?: (actionId: string) => void;
|
21
21
|
onLinkOpen?: (source: string, index?: number) => void;
|
22
|
+
onVersionChange?: (version: number) => void;
|
22
23
|
}
|
23
24
|
export interface IRefs {
|
24
25
|
setOriginalScript: (val: string) => void;
|
@@ -1,21 +1,6 @@
|
|
1
1
|
import { IDocValue, IKeyObjectValue } from '../type';
|
2
|
-
import { Token } from './config';
|
3
|
-
import { IKeys } from '../constants/contents';
|
4
2
|
export declare function mergeToRegExpStr(keys: string[]): string;
|
5
|
-
interface ITokenRules {
|
6
|
-
[key: string]: ITokenRule[];
|
7
|
-
}
|
8
|
-
interface ITokenRule {
|
9
|
-
token?: Token | string | Token[];
|
10
|
-
regex?: string | RegExp;
|
11
|
-
next?: string;
|
12
|
-
merge?: boolean;
|
13
|
-
id?: string;
|
14
|
-
defaultToken?: string | Token;
|
15
|
-
[key: string]: unknown;
|
16
|
-
}
|
17
3
|
export declare function removeArrow(str: string): string;
|
18
|
-
export declare function getTokenRules(fields: IKeys): ITokenRules;
|
19
4
|
export declare class FormatMarkdown {
|
20
5
|
delimiter: string;
|
21
6
|
lineBreak: string;
|
@@ -31,4 +16,3 @@ export declare class FormatMarkdown {
|
|
31
16
|
export declare const formatMarkdown: FormatMarkdown;
|
32
17
|
export declare function markdownHoverImportBuilder(item: IKeyObjectValue): string;
|
33
18
|
export declare function markdownHoverBuilder(items: IDocValue[], currentIndex?: number, isSupport?: boolean): string;
|
34
|
-
export {};
|
@@ -1,15 +1,42 @@
|
|
1
|
-
import { IRange, languages, IMarkdownString
|
1
|
+
import { IRange, languages, IMarkdownString } from 'monaco-editor';
|
2
|
+
interface IBase {
|
3
|
+
startColumn: number;
|
4
|
+
startLineNumber: number;
|
5
|
+
endColumn: number;
|
6
|
+
endLineNumber: number;
|
7
|
+
}
|
8
|
+
export declare enum VMarkerSeverity {
|
9
|
+
Hint = 1,
|
10
|
+
Info = 2,
|
11
|
+
Warning = 4,
|
12
|
+
Error = 8
|
13
|
+
}
|
14
|
+
export interface IPosition {
|
15
|
+
readonly lineNumber: number;
|
16
|
+
readonly column: number;
|
17
|
+
reName?: string;
|
18
|
+
}
|
2
19
|
export interface IBaseItem {
|
3
20
|
label: string;
|
4
21
|
insertText?: string;
|
5
22
|
returnType?: string | string[];
|
6
23
|
constents?: IMarkdownString;
|
7
24
|
}
|
25
|
+
export interface IKeys {
|
26
|
+
[key: string]: string[];
|
27
|
+
}
|
28
|
+
export interface IKeyMaps {
|
29
|
+
[key: string]: Map<string, IDocValue[]>;
|
30
|
+
}
|
8
31
|
export interface ISuggestion extends Omit<languages.CompletionItem, 'range' | 'label'> {
|
9
32
|
label: string;
|
10
33
|
originInsertText?: string;
|
11
34
|
range?: IRange | languages.CompletionItemRanges;
|
12
35
|
}
|
36
|
+
export interface IError extends IBase {
|
37
|
+
message: string;
|
38
|
+
type?: VMarkerSeverity;
|
39
|
+
}
|
13
40
|
export interface IModules {
|
14
41
|
[key: string]: ISuggestion;
|
15
42
|
}
|
@@ -60,6 +87,8 @@ export interface IDocValue {
|
|
60
87
|
isEnumMember?: boolean;
|
61
88
|
value?: string;
|
62
89
|
selfArg?: IArg;
|
90
|
+
disallowedInTemplate?: boolean;
|
91
|
+
expectsTemplate?: boolean;
|
63
92
|
}
|
64
93
|
export interface IDetailedDesc {
|
65
94
|
desc: string[];
|
@@ -82,6 +111,7 @@ export interface IArg {
|
|
82
111
|
required?: boolean;
|
83
112
|
allowedTypeIDs?: string[];
|
84
113
|
displayType?: string;
|
114
|
+
kind?: string;
|
85
115
|
}
|
86
116
|
export interface IImportLibrary {
|
87
117
|
codeStr: string;
|
@@ -90,3 +120,4 @@ export interface IImportLibrary {
|
|
90
120
|
types: IDocValue[];
|
91
121
|
methods: IDocValue[];
|
92
122
|
}
|
123
|
+
export {};
|
@@ -18,6 +18,8 @@ export declare class MyCompletion {
|
|
18
18
|
private _userTypes;
|
19
19
|
private _userEnums;
|
20
20
|
private _nextIsBracket;
|
21
|
+
private _keyMaps;
|
22
|
+
private _snippets;
|
21
23
|
constructor();
|
22
24
|
get methodFuncs(): Map<string, IDocValue[]>;
|
23
25
|
get userFuncs(): Map<string, IDocValue[]>;
|
@@ -25,7 +27,7 @@ export declare class MyCompletion {
|
|
25
27
|
set nextIsBracket(value: boolean);
|
26
28
|
get nextIsBracket(): boolean;
|
27
29
|
get annotationSuggestions(): ISuggestion[];
|
28
|
-
initBuiltinsTrees(): void
|
30
|
+
initBuiltinsTrees(version: number): Promise<void>;
|
29
31
|
getArgSuggestions(key: string): ISuggestion[] | undefined;
|
30
32
|
getSuggestions(key?: string): ISuggestion[] | undefined;
|
31
33
|
private _initUserDefind;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { editor, languages } from "monaco-editor";
|
2
|
-
import {
|
2
|
+
import { IKeyObjectValue } from "../type";
|
3
3
|
declare class ImportLibrary {
|
4
4
|
private _inlayHints;
|
5
5
|
private _editor?;
|
@@ -8,165 +8,7 @@ declare class ImportLibrary {
|
|
8
8
|
constructor();
|
9
9
|
get inlayHints(): languages.InlayHint[];
|
10
10
|
setEditor(editor: editor.IStandaloneCodeEditor): void;
|
11
|
-
setInlayHints(params: IKeyObjectValue): Promise<
|
12
|
-
functions: ({
|
13
|
-
name: string;
|
14
|
-
desc: string[];
|
15
|
-
args: ({
|
16
|
-
name: string;
|
17
|
-
desc: string;
|
18
|
-
required: boolean;
|
19
|
-
allowedTypeIDs: string[];
|
20
|
-
displayType: string;
|
21
|
-
} | {
|
22
|
-
name: string;
|
23
|
-
required: boolean;
|
24
|
-
allowedTypeIDs: string[];
|
25
|
-
displayType: string;
|
26
|
-
desc?: undefined;
|
27
|
-
})[];
|
28
|
-
syntax: string[];
|
29
|
-
hasMemberIndex: boolean;
|
30
|
-
pos: {
|
31
|
-
lineNumber: number;
|
32
|
-
column: number;
|
33
|
-
};
|
34
|
-
isUser: boolean;
|
35
|
-
returnedTypes: string[];
|
36
|
-
returns: string[];
|
37
|
-
index?: undefined;
|
38
|
-
info?: undefined;
|
39
|
-
} | {
|
40
|
-
name: string;
|
41
|
-
args: {
|
42
|
-
name: string;
|
43
|
-
required: boolean;
|
44
|
-
allowedTypeIDs: string[];
|
45
|
-
displayType: string;
|
46
|
-
}[];
|
47
|
-
syntax: string[];
|
48
|
-
hasMemberIndex: boolean;
|
49
|
-
pos: {
|
50
|
-
lineNumber: number;
|
51
|
-
column: number;
|
52
|
-
};
|
53
|
-
isUser: boolean;
|
54
|
-
returnedTypes: string[];
|
55
|
-
index: number;
|
56
|
-
desc?: undefined;
|
57
|
-
returns?: undefined;
|
58
|
-
info?: undefined;
|
59
|
-
} | {
|
60
|
-
name: string;
|
61
|
-
args: {
|
62
|
-
name: string;
|
63
|
-
required: boolean;
|
64
|
-
allowedTypeIDs: string[];
|
65
|
-
displayType: string;
|
66
|
-
}[];
|
67
|
-
returnedTypes: string[];
|
68
|
-
pos: {
|
69
|
-
lineNumber: number;
|
70
|
-
column: number;
|
71
|
-
};
|
72
|
-
syntax: string[];
|
73
|
-
desc?: undefined;
|
74
|
-
hasMemberIndex?: undefined;
|
75
|
-
isUser?: undefined;
|
76
|
-
returns?: undefined;
|
77
|
-
index?: undefined;
|
78
|
-
info?: undefined;
|
79
|
-
} | {
|
80
|
-
name: string;
|
81
|
-
args: {
|
82
|
-
name: string;
|
83
|
-
required: boolean;
|
84
|
-
allowedTypeIDs: string[];
|
85
|
-
displayType: string;
|
86
|
-
}[];
|
87
|
-
returnedTypes: string[];
|
88
|
-
pos: {
|
89
|
-
lineNumber: number;
|
90
|
-
column: number;
|
91
|
-
};
|
92
|
-
info: string;
|
93
|
-
syntax: string[];
|
94
|
-
desc?: undefined;
|
95
|
-
hasMemberIndex?: undefined;
|
96
|
-
isUser?: undefined;
|
97
|
-
returns?: undefined;
|
98
|
-
index?: undefined;
|
99
|
-
})[];
|
100
|
-
methods: ({
|
101
|
-
name: string;
|
102
|
-
args: {
|
103
|
-
name: string;
|
104
|
-
required: boolean;
|
105
|
-
allowedTypeIDs: string[];
|
106
|
-
displayType: string;
|
107
|
-
}[];
|
108
|
-
desc: string[];
|
109
|
-
originalName: string;
|
110
|
-
syntax: string[];
|
111
|
-
returnedTypes: string[];
|
112
|
-
hasMemberIndex: boolean;
|
113
|
-
pos: {
|
114
|
-
lineNumber: number;
|
115
|
-
column: number;
|
116
|
-
};
|
117
|
-
thisType: string[];
|
118
|
-
returns: string[];
|
119
|
-
index?: undefined;
|
120
|
-
} | {
|
121
|
-
name: string;
|
122
|
-
args: {
|
123
|
-
name: string;
|
124
|
-
required: boolean;
|
125
|
-
allowedTypeIDs: string[];
|
126
|
-
displayType: string;
|
127
|
-
}[];
|
128
|
-
originalName: string;
|
129
|
-
syntax: string[];
|
130
|
-
returnedTypes: string[];
|
131
|
-
hasMemberIndex: boolean;
|
132
|
-
pos: {
|
133
|
-
lineNumber: number;
|
134
|
-
column: number;
|
135
|
-
};
|
136
|
-
thisType: string[];
|
137
|
-
index: number;
|
138
|
-
desc?: undefined;
|
139
|
-
returns?: undefined;
|
140
|
-
} | {
|
141
|
-
name: string;
|
142
|
-
args: never[];
|
143
|
-
returnedTypes: string[];
|
144
|
-
thisType: string[];
|
145
|
-
pos: {
|
146
|
-
lineNumber: number;
|
147
|
-
column: number;
|
148
|
-
};
|
149
|
-
syntax: string[];
|
150
|
-
desc?: undefined;
|
151
|
-
originalName?: undefined;
|
152
|
-
hasMemberIndex?: undefined;
|
153
|
-
returns?: undefined;
|
154
|
-
index?: undefined;
|
155
|
-
})[];
|
156
|
-
types: {
|
157
|
-
fields: {
|
158
|
-
name: string;
|
159
|
-
type: string;
|
160
|
-
}[];
|
161
|
-
name: string;
|
162
|
-
pos: {
|
163
|
-
lineNumber: number;
|
164
|
-
column: number;
|
165
|
-
};
|
166
|
-
}[];
|
167
|
-
description: string;
|
168
|
-
codeStr: string;
|
169
|
-
} | undefined>;
|
11
|
+
setInlayHints(params: IKeyObjectValue): Promise<{} | undefined>;
|
170
12
|
deleteInlayHints(name: string): void;
|
171
13
|
clearInlayHints(): void;
|
172
14
|
triggerInlayHints(): void;
|
@@ -9,6 +9,7 @@ export default class InitEditor {
|
|
9
9
|
private _onActionTrigger?;
|
10
10
|
private _onLinkOpen?;
|
11
11
|
private _registerList;
|
12
|
+
private _version;
|
12
13
|
constructor(editor: editor.IStandaloneCodeEditor, monaco: Monaco, onActionTrigger?: (actionId: string) => void);
|
13
14
|
addLinkOpenFunc(onLinkOpen: (source: string, index?: number) => void): void;
|
14
15
|
updateActionTrigger(onActionTrigger?: (actionId: string) => void): void;
|
@@ -24,6 +25,8 @@ export default class InitEditor {
|
|
24
25
|
lineCount: number | undefined;
|
25
26
|
};
|
26
27
|
setEditorLayout(height: number, width?: number): void;
|
28
|
+
getVersion(): number;
|
29
|
+
private updateOptions;
|
27
30
|
private _init;
|
28
31
|
private _onTabSizeChange;
|
29
32
|
private _setCursorPosition;
|
@@ -16,8 +16,10 @@ export declare class Parse {
|
|
16
16
|
private _userEnums;
|
17
17
|
private _imports;
|
18
18
|
private _overloadsFuncs;
|
19
|
+
private _keyMaps;
|
19
20
|
constructor();
|
20
21
|
get overloadsFuncs(): IKeyValue[];
|
22
|
+
onVersionChange(version: number): Promise<void>;
|
21
23
|
setUserDefined(maps: IUserDefined, overloadsFuncs: IKeyValue[]): void;
|
22
24
|
parseLineContentFuncVar(column: number, line: number, model: editor.ITextModel | null, position?: Position): IKeyObjectValue | null | undefined;
|
23
25
|
private _getImportDocVal;
|
@@ -1,7 +1,5 @@
|
|
1
|
-
/// <reference path="../../../../src/vite-env.d.ts" />
|
2
|
-
import { ErrorListener } from "antlr4";
|
3
1
|
import { IKeyObjectValue } from "../type";
|
4
|
-
export declare function parseTcc(program: string, hasTranscoding: boolean, getImportLibraryFunc: (obj: IKeyObjectValue) => IKeyObjectValue, keyObjs: IKeyObjectValue): Promise<{
|
2
|
+
export declare function parseTcc(program: string, hasTranscoding: boolean, getImportLibraryFunc: (obj: IKeyObjectValue) => IKeyObjectValue, keyObjs: IKeyObjectValue, version: number): Promise<{
|
5
3
|
errors: any[];
|
6
4
|
functions: {
|
7
5
|
[k: string]: import("../type").IDocValue[];
|
@@ -34,10 +32,6 @@ export declare function parseLibraryCode(program: string, libTitle: string, getI
|
|
34
32
|
types: import("../type").IDocValue[];
|
35
33
|
enums: import("../type").IDocValue[];
|
36
34
|
}>;
|
37
|
-
export declare class ExprErrorListener extends ErrorListener {
|
38
|
-
errors: any[];
|
39
|
-
syntaxError(_: any, __: any, line: number, column: number, msg: string): void;
|
40
|
-
}
|
41
35
|
export interface IParseWorker {
|
42
36
|
parseTcc: typeof parseTcc;
|
43
37
|
parseLibraryCode: typeof parseLibraryCode;
|
@@ -6,7 +6,7 @@ interface IRunResult {
|
|
6
6
|
cacheData?: any;
|
7
7
|
options?: any;
|
8
8
|
}
|
9
|
-
export declare function runScript(strJs: string, options: IKeyObjectValue, isNew: boolean): Promise<IRunResult>;
|
9
|
+
export declare function runScript(strJs: string, options: IKeyObjectValue, isNew: boolean, version: number): Promise<IRunResult>;
|
10
10
|
export declare function removeScript(id: string): void;
|
11
11
|
export interface IScriptWorker {
|
12
12
|
runScript: typeof runScript;
|
@@ -1,7 +1,9 @@
|
|
1
1
|
export declare class SignatureHelp {
|
2
2
|
private _formatter;
|
3
3
|
private _isMac;
|
4
|
+
private _keyMaps;
|
4
5
|
constructor(userAgent: string);
|
6
|
+
onVersionChange(version: number): Promise<void>;
|
5
7
|
getSignatureHelpValues(funcName: string, args?: string[], startIndex?: number, line?: number): {
|
6
8
|
activeParameter: number;
|
7
9
|
activeSignature: number;
|
@@ -1,3 +1,9 @@
|
|
1
1
|
import { editor } from "monaco-editor";
|
2
|
+
import { IKeyValue } from "../type";
|
2
3
|
export declare function getTypeOriginName(type: string): string;
|
3
4
|
export declare function removeContextMenu(editor: editor.IStandaloneCodeEditor): void;
|
5
|
+
export declare function replaceTemplate(template: string, replacements: IKeyValue): string;
|
6
|
+
export declare function encode(str: string): string;
|
7
|
+
export declare function decode(base64: string): string;
|
8
|
+
export declare function getContents(version?: number): Promise<typeof import("../v3/constants") | undefined>;
|
9
|
+
export declare function getMonarchTokens(version?: number): Promise<typeof import("../v3/config/monarchTokens") | undefined>;
|
@@ -1,14 +1,10 @@
|
|
1
|
-
import { IDocValue, IKeyValueStr } from '
|
2
|
-
interface IContents {
|
3
|
-
[key: string]: IDocValue[];
|
4
|
-
}
|
1
|
+
import { IDocValue, IKeyValueStr } from '../../type';
|
5
2
|
interface IKeyMaps {
|
6
3
|
[key: string]: Map<string, IDocValue[]>;
|
7
4
|
}
|
8
5
|
export interface IKeys {
|
9
6
|
[key: string]: string[];
|
10
7
|
}
|
11
|
-
export declare const ALL_CONTENT: IContents;
|
12
8
|
export declare const SNIPPET_COMPLETIONS: {
|
13
9
|
label: string;
|
14
10
|
insertText: string;
|
@@ -0,0 +1,179 @@
|
|
1
|
+
import { VPlotDisplay, VHlineStyle, VLocation, VPlotStyle, VAdjustment, VBarmergeGaps, VScale, VSession, VShape, VSize, VStrategy, VCommission, VDirection, VOca, VInputType } from './enum';
|
2
|
+
export declare const COLOR_BUILD_IN: {
|
3
|
+
aqua: string;
|
4
|
+
black: string;
|
5
|
+
blue: string;
|
6
|
+
fuchsia: string;
|
7
|
+
gray: string;
|
8
|
+
green: string;
|
9
|
+
lime: string;
|
10
|
+
maroon: string;
|
11
|
+
navy: string;
|
12
|
+
olive: string;
|
13
|
+
orange: string;
|
14
|
+
purple: string;
|
15
|
+
red: string;
|
16
|
+
silver: string;
|
17
|
+
teal: string;
|
18
|
+
white: string;
|
19
|
+
yellow: string;
|
20
|
+
};
|
21
|
+
export declare const CURRENCY_BUILD_IN: {
|
22
|
+
AUD: string;
|
23
|
+
BTC: string;
|
24
|
+
CAD: string;
|
25
|
+
CHF: string;
|
26
|
+
ETH: string;
|
27
|
+
EUR: string;
|
28
|
+
GBP: string;
|
29
|
+
HKD: string;
|
30
|
+
INR: string;
|
31
|
+
JPY: string;
|
32
|
+
KRW: string;
|
33
|
+
MYR: string;
|
34
|
+
NOK: string;
|
35
|
+
NONE: string;
|
36
|
+
NZD: string;
|
37
|
+
RUB: string;
|
38
|
+
SEK: string;
|
39
|
+
SGD: string;
|
40
|
+
TRY: string;
|
41
|
+
USD: string;
|
42
|
+
USDT: string;
|
43
|
+
ZAR: string;
|
44
|
+
};
|
45
|
+
export declare const DISPLAY_BUILD_IN: {
|
46
|
+
all: VPlotDisplay[];
|
47
|
+
data_window: VPlotDisplay[];
|
48
|
+
none: never[];
|
49
|
+
pane: VPlotDisplay[];
|
50
|
+
price_scale: VPlotDisplay[];
|
51
|
+
status_line: VPlotDisplay[];
|
52
|
+
};
|
53
|
+
export declare class BuildInConstants {
|
54
|
+
bool: VInputType;
|
55
|
+
integer: VInputType;
|
56
|
+
float: VInputType;
|
57
|
+
string: VInputType;
|
58
|
+
symbol: VInputType;
|
59
|
+
resolution: VInputType;
|
60
|
+
source: VInputType;
|
61
|
+
session: {
|
62
|
+
session: VInputType;
|
63
|
+
extended: VSession;
|
64
|
+
regular: VSession;
|
65
|
+
};
|
66
|
+
adjustment: {
|
67
|
+
dividends: VAdjustment;
|
68
|
+
none: VAdjustment;
|
69
|
+
splits: VAdjustment;
|
70
|
+
};
|
71
|
+
solid: VHlineStyle;
|
72
|
+
dotted: VHlineStyle;
|
73
|
+
dashed: VHlineStyle;
|
74
|
+
size: {
|
75
|
+
auto: VSize;
|
76
|
+
huge: VSize;
|
77
|
+
large: VSize;
|
78
|
+
normal: VSize;
|
79
|
+
small: VSize;
|
80
|
+
tiny: VSize;
|
81
|
+
};
|
82
|
+
line: VPlotStyle;
|
83
|
+
linebr: VPlotStyle;
|
84
|
+
stepline: VPlotStyle;
|
85
|
+
histogram: VPlotStyle;
|
86
|
+
cross: VPlotStyle;
|
87
|
+
area: VPlotStyle;
|
88
|
+
areabr: VPlotStyle;
|
89
|
+
columns: VPlotStyle;
|
90
|
+
circles: VPlotStyle;
|
91
|
+
sunday: number;
|
92
|
+
monday: number;
|
93
|
+
tuesday: number;
|
94
|
+
wednesday: number;
|
95
|
+
thursday: number;
|
96
|
+
friday: number;
|
97
|
+
saturday: number;
|
98
|
+
shape: {
|
99
|
+
arrowdown: VShape;
|
100
|
+
arrowup: VShape;
|
101
|
+
circle: VShape;
|
102
|
+
cross: VShape;
|
103
|
+
diamond: VShape;
|
104
|
+
flag: VShape;
|
105
|
+
labeldown: VShape;
|
106
|
+
labelup: VShape;
|
107
|
+
square: VShape;
|
108
|
+
triangledown: VShape;
|
109
|
+
triangleup: VShape;
|
110
|
+
xcross: VShape;
|
111
|
+
};
|
112
|
+
location: {
|
113
|
+
abovebar: VLocation;
|
114
|
+
absolute: VLocation;
|
115
|
+
belowbar: VLocation;
|
116
|
+
bottom: VLocation;
|
117
|
+
top: VLocation;
|
118
|
+
};
|
119
|
+
scale: {
|
120
|
+
left: VScale;
|
121
|
+
none: VScale;
|
122
|
+
right: VScale;
|
123
|
+
};
|
124
|
+
strategy: {
|
125
|
+
cash: VStrategy;
|
126
|
+
fixed: VStrategy;
|
127
|
+
percent_of_equity: VStrategy;
|
128
|
+
long: boolean;
|
129
|
+
short: boolean;
|
130
|
+
commission: {
|
131
|
+
cash_per_contract: VCommission;
|
132
|
+
cash_per_order: VCommission;
|
133
|
+
percent: VCommission;
|
134
|
+
};
|
135
|
+
direction: {
|
136
|
+
all: VDirection;
|
137
|
+
long: VDirection;
|
138
|
+
short: VDirection;
|
139
|
+
};
|
140
|
+
oca: {
|
141
|
+
cancel: VOca;
|
142
|
+
none: VOca;
|
143
|
+
reduce: VOca;
|
144
|
+
};
|
145
|
+
};
|
146
|
+
currency: {
|
147
|
+
AUD: string;
|
148
|
+
BTC: string;
|
149
|
+
CAD: string;
|
150
|
+
CHF: string;
|
151
|
+
ETH: string;
|
152
|
+
EUR: string;
|
153
|
+
GBP: string;
|
154
|
+
HKD: string;
|
155
|
+
INR: string;
|
156
|
+
JPY: string;
|
157
|
+
KRW: string;
|
158
|
+
MYR: string;
|
159
|
+
NOK: string;
|
160
|
+
NONE: string;
|
161
|
+
NZD: string;
|
162
|
+
RUB: string;
|
163
|
+
SEK: string;
|
164
|
+
SGD: string;
|
165
|
+
TRY: string;
|
166
|
+
USD: string;
|
167
|
+
USDT: string;
|
168
|
+
ZAR: string;
|
169
|
+
};
|
170
|
+
barmerge: {
|
171
|
+
gaps_off: VBarmergeGaps;
|
172
|
+
gaps_on: VBarmergeGaps;
|
173
|
+
lookahead_off: VBarmergeGaps;
|
174
|
+
lookahead_on: VBarmergeGaps;
|
175
|
+
};
|
176
|
+
true: boolean;
|
177
|
+
false: boolean;
|
178
|
+
constructor();
|
179
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import BuildInMath from "./math";
|
2
|
+
import BuildInTa from "./ta";
|
3
|
+
import BuildInInput from "./input";
|
4
|
+
import BuildInTimeframe from "./timeframe";
|
5
|
+
import Strategy, { IOrder, IStrategy } from './strategy';
|
6
|
+
import Request from './request';
|
7
|
+
export { TccErrorListener } from './errorListener';
|
8
|
+
export { BuildInMath, BuildInTa, BuildInInput, BuildInTimeframe, Strategy, Request };
|
9
|
+
export type { IOrder, IStrategy };
|