@guihz/trading-vue-editor-tes 0.0.302 → 0.1.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/lib/assets/editor.worker-BxEYBjj-.js +7352 -0
- package/lib/assets/parserTccWorker-D5cq4N-Y.js +80540 -0
- package/lib/assets/scriptsRunWorker-CaEvEpNA.js +37748 -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 +1 -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-UdtfRBFV.js +59792 -0
- package/lib/monarchTokens-Cj3v8l0Q.js +526 -0
- package/lib/monarchTokens-CnFYyHnR.js +191 -0
- package/lib/monarchTokens-oh3fO2YY.js +563 -0
- package/lib/packages/index.d.ts +3 -3
- package/lib/trading-vue-editor.es.packages.js +6356 -66629
- package/lib/trading-vue-editor.umd.packages.mjs +117 -75
- package/lib/utils/tools.d.ts +7 -2
- 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
@@ -0,0 +1,563 @@
|
|
1
|
+
import { KEY_LIST as l } from "./index-UdtfRBFV.js";
|
2
|
+
const d = "tccScript", g = {
|
3
|
+
// builtinFunctions: /strategy\.closedtrades\.max_drawdown_percent|strategy\.opentrades\.max_drawdown_percent|strategy\.risk\.max_intraday_filled_orders|strategy\.closedtrades\.max_runup_percent|array\.percentile_linear_interpolation|strategy\.closedtrades\.entry_bar_index|strategy\.opentrades\.max_runup_percent|strategy\.closedtrades\.exit_bar_index|strategy\.closedtrades\.profit_percent|strategy\.closedtrades\.entry_comment|strategy\.opentrades\.entry_bar_index|strategy\.closedtrades\.exit_comment|strategy\.closedtrades\.max_drawdown|strategy\.opentrades\.profit_percent|ta\.percentile_linear_interpolation|strategy\.closedtrades\.entry_price|strategy\.opentrades\.entry_comment|strategy\.closedtrades\.commission|strategy\.closedtrades\.entry_time|strategy\.closedtrades\.exit_price|strategy\.opentrades\.max_drawdown|strategy\.risk\.max_cons_loss_days|strategy\.closedtrades\.exit_time|strategy\.closedtrades\.max_runup|strategy\.opentrades\.entry_price|strategy\.risk\.max_intraday_loss|strategy\.risk\.max_position_size|table\.cell_set_text_font_family|strategy\.closedtrades\.entry_id|strategy\.opentrades\.commission|strategy\.opentrades\.entry_time|array\.binary_search_rightmost|array\.percentile_nearest_rank|strategy\.closedtrades\.exit_id|strategy\.opentrades\.max_runup|array\.binary_search_leftmost|strategy\.closedtrades\.profit|strategy\.opentrades\.entry_id|strategy\.risk\.allow_entry_in|strategy\.convert_to_account|box\.set_bottom_right_point|label\.set_text_font_family|strategy\.closedtrades\.size|strategy\.convert_to_symbol|strategy\.default_entry_qty|strategy\.opentrades\.profit|strategy\.risk\.max_drawdown|ta\.percentile_nearest_rank|table\.cell_set_text_halign|table\.cell_set_text_valign|request\.security_lower_tf|table\.cell_set_text_color|box\.set_text_font_family|strategy\.opentrades\.size|table\.cell_set_text_size|matrix\.is_antisymmetric|box\.set_top_left_point|chart\.point\.from_index|matrix\.is_antidiagonal|table\.cell_set_bgcolor|table\.cell_set_tooltip|table\.set_border_color|table\.set_border_width|timeframe\.from_seconds|chart\.point\.from_time|line\.set_second_point|math\.round_to_mintick|matrix\.elements_count|request\.currency_rate|ta\.pivot_point_levels|table\.cell_set_height|table\.set_frame_color|table\.set_frame_width|box\.set_border_color|box\.set_border_style|box\.set_border_width|line\.set_first_point|matrix\.is_stochastic|matrix\.is_triangular|table\.cell_set_width|timeframe\.in_seconds|array\.binary_search|box\.set_rightbottom|box\.set_text_halign|box\.set_text_valign|color\.from_gradient|label\.set_textalign|label\.set_textcolor|matrix\.eigenvectors|matrix\.is_symmetric|matrix\.swap_columns|strategy\.cancel_all|table\.cell_set_text|array\.new_linefill|array\.sort_indices|box\.set_text_color|linefill\.get_line1|linefill\.get_line2|linefill\.set_color|matrix\.eigenvalues|matrix\.is_diagonal|matrix\.is_identity|strategy\.close_all|table\.set_position|ticker\.pointfigure|array\.lastindexof|array\.percentrank|array\.standardize|box\.set_text_size|box\.set_text_wrap|label\.set_tooltip|matrix\.remove_col|matrix\.remove_row|request\.dividends|request\.financial|table\.merge_cells|table\.set_bgcolor|ticker\.heikinashi|array\.covariance|array\.new_string|chart\.point\.copy|matrix\.is_binary|matrix\.is_square|matrix\.submatrix|matrix\.swap_rows|matrix\.transpose|request\.earnings|request\.economic|request\.security|ticker\.linebreak|timeframe\.change|array\.new_color|array\.new_float|array\.new_label|array\.new_table|box\.set_bgcolor|box\.set_lefttop|chart\.point\.new|chart\.point\.now|input\.text_area|input\.timeframe|label\.set_color|label\.set_point|label\.set_style|line\.set_extend|linefill\.delete|polyline\.delete|str\.format_time|str\.replace_all|strategy\.cancel|ticker\.standard|alertcondition|array\.includes|array\.new_bool|array\.new_line|array\.variance|box\.get_bottom|box\.set_bottom|box\.set_extend|label\.get_text|label\.set_size|label\.set_text|label\.set_xloc|label\.set_yloc|line\.get_price|line\.set_color|line\.set_style|line\.set_width|math\.todegrees|math\.toradians|matrix\.add_col|matrix\.add_row|matrix\.columns|matrix\.is_zero|matrix\.reshape|matrix\.reverse|request\.quandl|request\.splits|str\.startswith|strategy\.close|strategy\.entry|strategy\.order|syminfo\.prefix|syminfo\.ticker|ta\.correlation|ta\.highestbars|ta\.percentrank|ticker\.inherit|array\.indexof|array\.new_box|array\.new_int|array\.reverse|array\.unshift|box\.get_right|box\.set_right|input\.session|line\.set_xloc|matrix\.concat|matrix\.median|max_bars_back|runtime\.error|str\.substring|strategy\.exit|ta\.crossunder|ta\.lowestbars|ta\.supertrend|ticker\.modify|array\.concat|array\.insert|array\.median|array\.remove|box\.get_left|box\.set_left|box\.set_text|input\.source|input\.string|input\.symbol|label\.delete|label\.set_xy|line\.set_xy1|line\.set_xy2|linefill\.new|map\.contains|matrix\.trace|polyline\.new|request\.seed|str\.contains|str\.endswith|str\.tonumber|str\.tostring|ta\.barssince|ta\.crossover|ta\.pivothigh|ta\.valuewhen|table\.delete|ticker\.renko|array\.clear|array\.every|array\.first|array\.range|array\.shift|array\.slice|array\.stdev|box\.get_top|box\.set_top|input\.color|input\.float|input\.price|label\.get_x|label\.get_y|label\.set_x|label\.set_y|line\.delete|line\.get_x1|line\.get_x2|line\.get_y1|line\.get_y2|line\.set_x1|line\.set_x2|line\.set_y1|line\.set_y2|log\.warning|map\.put_all|math\.random|matrix\.copy|matrix\.diff|matrix\.fill|matrix\.kron|matrix\.mode|matrix\.mult|matrix\.pinv|matrix\.rank|matrix\.rows|matrix\.sort|str\.replace|ta\.pivotlow|ta\.variance|table\.clear|ticker\.kagi|array\.copy|array\.fill|array\.from|array\.join|array\.last|array\.mode|array\.push|array\.size|array\.some|array\.sort|box\.delete|dayofmonth|input\.bool|input\.time|label\.copy|map\.remove|map\.values|math\.floor|math\.log10|math\.round|matrix\.avg|matrix\.col|matrix\.det|matrix\.get|matrix\.inv|matrix\.max|matrix\.min|matrix\.new|matrix\.pow|matrix\.row|matrix\.set|matrix\.sum|plotcandle|str\.format|str\.length|ta\.falling|ta\.highest|table\.cell|ticker\.new|time_close|weekofyear|array\.abs|array\.avg|array\.get|array\.max|array\.min|array\.new|array\.pop|array\.set|array\.sum|color\.new|color\.rgb|dayofweek|indicator|input\.int|label\.new|line\.copy|log\.error|map\.clear|math\.acos|math\.asin|math\.atan|input\.enum|math\.ceil|math\.sign|math\.sqrt|plotarrow|plotshape|str\.lower|str\.match|str\.split|str\.upper|ta\.change|ta\.linreg|ta\.lowest|ta\.median|ta\.rising|table\.new|timestamp|barcolor|box\.copy|line\.new|linefill|log\.info|map\.copy|map\.keys|map\.size|math\.abs|math\.avg|math\.cos|math\.exp|math\.log|math\.max|math\.min|math\.pow|math\.sin|math\.sum|math\.tan|plotchar|strategy|ta\.cross|ta\.range|ta\.stdev|ta\.stoch|bgcolor|box\.new|color\.b|color\.g|color\.r|color\.t|library|map\.get|map\.new|map\.put|plotbar|str\.pos|ta\.alma|ta\.macd|ta\.mode|ta\.swma|ta\.vwap|ta\.vwma|fixnan|minute|second|string|ta\.atr|ta\.bbw|ta\.cci|ta\.cmo|ta\.cog|ta\.cum|ta\.dev|ta\.dmi|ta\.ema|ta\.hma|ta\.kcw|ta\.max|ta\.mfi|ta\.min|ta\.mom|ta\.rma|ta\.roc|ta\.rsi|ta\.sar|ta\.sma|ta\.tsi|ta\.wma|ta\.wpr|alert|color|float|hline|input|label|month|ta\.bb|ta\.kc|ta\.tr|table|bool|fill|hour|line|plot|time|year|box|int|na|nz/,
|
4
|
+
builtinFunctions: new RegExp(a(l.functions)),
|
5
|
+
// keywords: /continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to/,
|
6
|
+
keywords: new RegExp(c(l.keywords)),
|
7
|
+
tokenizer: {
|
8
|
+
root: [
|
9
|
+
[/\/\/\s*(?=@)/, "comment", "@comments"],
|
10
|
+
[/\/\/.*(?!@).*/, "comment"],
|
11
|
+
[/\'([^\'\\]|\\.)*$/, "string.invalid"],
|
12
|
+
[/'([^'\\]|\\.)*$/, "string.invalid"],
|
13
|
+
[/\"/, {
|
14
|
+
token: "string",
|
15
|
+
bracket: "@open",
|
16
|
+
next: "@stringDouble"
|
17
|
+
}],
|
18
|
+
[
|
19
|
+
/(type|enum)\s+[a-zA-Z]\w*/,
|
20
|
+
"entity.name.type"
|
21
|
+
],
|
22
|
+
[/'/, {
|
23
|
+
token: "string",
|
24
|
+
bracket: "@open",
|
25
|
+
next: "@stringSingle"
|
26
|
+
}],
|
27
|
+
[/(@builtinFunctions)(?=\s*\(|\s*<.*>)/, {
|
28
|
+
token: "support.function",
|
29
|
+
next: "@template"
|
30
|
+
}],
|
31
|
+
[/@punctuation/, {
|
32
|
+
token: "punctuation.operator",
|
33
|
+
next: "@property"
|
34
|
+
}],
|
35
|
+
[/(varip|var)\b(\s+)((?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)/, [{
|
36
|
+
token: "keyword"
|
37
|
+
}, {
|
38
|
+
token: "source"
|
39
|
+
}, {
|
40
|
+
token: "entity.name.type"
|
41
|
+
}, {
|
42
|
+
token: "paren"
|
43
|
+
}, {
|
44
|
+
token: "source"
|
45
|
+
}, {
|
46
|
+
token: "variable.other"
|
47
|
+
}]],
|
48
|
+
[/\b(?:@builtinTypes)(?=(\s*)[\[|<|(]|(?=\s+(?=[^.=][\w\(]*))|\s*$)/, {
|
49
|
+
token: "support.type",
|
50
|
+
next: "@template"
|
51
|
+
}],
|
52
|
+
[/^(\s*)\b(?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)([\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)(\s+)(\=)/, [{
|
53
|
+
token: "source"
|
54
|
+
}, {
|
55
|
+
token: "entity.name.type"
|
56
|
+
}, {
|
57
|
+
token: "paren"
|
58
|
+
}, {
|
59
|
+
token: "source"
|
60
|
+
}, {
|
61
|
+
token: "variable.other"
|
62
|
+
}, {
|
63
|
+
token: "source"
|
64
|
+
}, {
|
65
|
+
token: "keyword.equals"
|
66
|
+
}]],
|
67
|
+
[/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/, "entity.name.type"],
|
68
|
+
[/import(?=\s+@importName)/, {
|
69
|
+
token: "keyword",
|
70
|
+
next: "@import"
|
71
|
+
}],
|
72
|
+
[/import(?=\s+[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+)/, "keyword"],
|
73
|
+
[/[+-]?\d+\.\d*([eE][\-+]?\d+)?(?!\w+)/, "constant.numeric.float"],
|
74
|
+
[/[+-]?\.\d+([eE][\-+]?\d+)?(?!\w+)/, "constant.numeric.float"],
|
75
|
+
[/([+-]?(\d+))(?!\w+)(?!\w+)/, "constant.numeric.integer"],
|
76
|
+
[/(?:true|false)\b/, "constant.other.boolean"],
|
77
|
+
[/#[0-9a-fA-F]{6,8}\b/, "constant.other.color"],
|
78
|
+
[/\+=|\-=|\*=|\/=|%=|[\/%*+\-]|==|!=|<=|>=|=>|<|>|\?|\:=|\:|\,/, "keyword.operator"],
|
79
|
+
[/\b(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b/, "keyword"],
|
80
|
+
[/^[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/, "entity.name.function"],
|
81
|
+
[/[0-9]+\b/, "constant.numeric.integer"],
|
82
|
+
[/=/, "keyword.equals"],
|
83
|
+
[/\b(?:@builtinVariables)\b(?!\s*=\s*\w+)/, "support.variable"],
|
84
|
+
[/[(|)|\[|\]]/, "paren"],
|
85
|
+
[/[a-zA-Z_][a-zA-Z_0-9]*(?=\s*\()/, {
|
86
|
+
token: "entity.name.method"
|
87
|
+
}],
|
88
|
+
[/\w+\b/, "variable.other"]
|
89
|
+
],
|
90
|
+
comments: [[/@[A-Za-z]+(\s*=\s*)?$/, {
|
91
|
+
token: "comment.annotation",
|
92
|
+
next: "@pop"
|
93
|
+
}], [/@[A-Za-z]+(\s*=\s*)?/, {
|
94
|
+
token: "comment.annotation"
|
95
|
+
}], [/(?!\s*@[A-Za-z]+).+$/, {
|
96
|
+
token: "comment",
|
97
|
+
next: "@pop"
|
98
|
+
}]],
|
99
|
+
stringDouble: [[/[^\\\"]+/, "string"], [/\\./, "string.invalid"], [/\"/, {
|
100
|
+
token: "string.quote",
|
101
|
+
bracket: "@close",
|
102
|
+
next: "@pop"
|
103
|
+
}]],
|
104
|
+
stringSingle: [[/[^\\']+/, "string"], [/\\./, "string.invalid"], [/'/, {
|
105
|
+
token: "string",
|
106
|
+
bracket: "@close",
|
107
|
+
next: "@pop"
|
108
|
+
}]],
|
109
|
+
template: [[/(@builtinTypes)/, {
|
110
|
+
token: "support.type"
|
111
|
+
}], [/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/, "entity.name.type"], [/\(|\)|\[|\]|\=|\>/, {
|
112
|
+
token: "paren",
|
113
|
+
next: "@pop"
|
114
|
+
}], [/(\,)(\s+)/, ["keyword.operator", "source"]], [/(\,)/, {
|
115
|
+
token: "keyword.operator"
|
116
|
+
}], [/([\w.\d$]+)/, {
|
117
|
+
token: "entity.name.type"
|
118
|
+
}], [/(<|>)/, {
|
119
|
+
token: "paren"
|
120
|
+
}], [/\s(?=\w)|$/, {
|
121
|
+
token: "source",
|
122
|
+
next: "@pop"
|
123
|
+
}]],
|
124
|
+
property: [[/@punctuation/, {
|
125
|
+
token: "punctuation.operator"
|
126
|
+
}], [/(@builtinTypes)(?=\s*[(])/, {
|
127
|
+
token: "support.method",
|
128
|
+
next: "@pop"
|
129
|
+
}], [/[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/, {
|
130
|
+
token: "entity.name.method",
|
131
|
+
next: "@pop"
|
132
|
+
}], [/[a-zA-Z0-9_]+/, {
|
133
|
+
token: "variable.other.property",
|
134
|
+
next: "@pop"
|
135
|
+
}], [/@empty/, {
|
136
|
+
token: "source",
|
137
|
+
next: "@pop"
|
138
|
+
}]],
|
139
|
+
import: [[/\s+/, {
|
140
|
+
token: "source"
|
141
|
+
}], [/(@importName)(\s+)(as\b)(\s+)(@importAlias)/, [{
|
142
|
+
token: "entity.name.module"
|
143
|
+
}, {
|
144
|
+
token: "source"
|
145
|
+
}, {
|
146
|
+
token: "keyword"
|
147
|
+
}, {
|
148
|
+
token: "source"
|
149
|
+
}, {
|
150
|
+
token: "entity.name.module.name",
|
151
|
+
next: "@pop"
|
152
|
+
}]], [/@importName/, {
|
153
|
+
token: "entity.name.module",
|
154
|
+
next: "@pop"
|
155
|
+
}]]
|
156
|
+
},
|
157
|
+
// builtinVariables: /strategy\.commission\.cash_per_contract|strategy\.avg_winning_trade_percent|strategy\.avg_winning_trade|strategy\.avg_losing_trade_percent|strategy\.avg_losing_trade|syminfo\.recommendations_sell_strong|syminfo\.recommendations_buy_strong|strategy\.commission\.cash_per_order|strategy\.margin_liquidation_price|strategy\.max_contracts_held_short|strategy\.max_contracts_held_long|syminfo\.shares_outstanding_float|syminfo\.shares_outstanding_total|barstate\.islastconfirmedhistory|earnings\.future_period_end_time|strategy\.max_contracts_held_all|syminfo\.target_price_estimates|strategy\.max_drawdown_percent|syminfo\.recommendations_total|alert\.freq_once_per_bar_close|label\.style_label_lower_right|label\.style_label_upper_right|chart\.right_visible_bar_time|strategy\.grossprofit_percent|strategy\.position_entry_name|syminfo\.recommendations_date|syminfo\.recommendations_hold|syminfo\.recommendations_sell|syminfo\.target_price_average|label\.style_label_lower_left|label\.style_label_upper_left|chart\.left_visible_bar_time|strategy\.openprofit_percent|strategy\.position_avg_price|syminfo\.recommendations_buy|syminfo\.target_price_median|plot\.style_stepline_diamond|strategy\.commission\.percent|session\.isfirstbar_regular|strategy\.grossloss_percent|strategy\.max_runup_percent|strategy\.netprofit_percent|strategy\.percent_of_equity|session\.islastbar_regular|strategy\.account_currency|syminfo\.target_price_date|syminfo\.target_price_high|dividends\.future_pay_date|strategy\.initial_capital|syminfo\.target_price_low|dividends\.future_ex_date|label\.style_label_center|label\.style_text_outline|label\.style_triangledown|strategy\.direction\.short|earnings\.future_revenue|alert\.freq_once_per_bar|dividends\.future_amount|label\.style_label_right|strategy\.direction\.long|strategy\.position_size|barmerge\.lookahead_off|label\.style_label_down|label\.style_label_left|label\.style_triangleup|line\.style_arrow_right|position\.bottom_center|position\.middle_center|strategy\.direction\.all|strategy\.closedtrades|strategy\.max_drawdown|barmerge\.lookahead_on|earnings\.standardized|font\.family_monospace|label\.style_arrowdown|line\.style_arrow_both|line\.style_arrow_left|plot\.style_steplinebr|position\.bottom_right|position\.middle_right|barstate\.isconfirmed|earnings\.future_time|session\.ispostmarket|strategy\.grossprofit|syminfo\.basecurrency|syminfo\.shareholders|timeframe\.isintraday|timeframe\.multiplier|adjustment\.dividends|label\.style_label_up|plot\.style_histogram|position\.bottom_left|position\.middle_left|barstate\.isrealtime|chart\.is_heikinashi|earnings\.future_eps|session\.ispremarket|strategy\.eventrades|strategy\.losstrades|strategy\.openprofit|strategy\.opentrades\.capital_held|strategy\.opentrades|syminfo\.description|timeframe\.isminutes|timeframe\.ismonthly|timeframe\.isseconds|dayofweek\.wednesday|display\.data_window|display\.price_scale|display\.status_line|font\.family_default|label\.style_arrowup|label\.style_diamond|plot\.style_stepline|position\.top_center|strategy\.oca\.cancel|strategy\.oca\.reduce|barstate\.ishistory|chart\.is_linebreak|session\.isfirstbar|strategy\.grossloss|strategy\.max_runup|strategy\.netprofit|strategy\.wintrades|syminfo\.pointvalue|syminfo\.pricescale|syminfo\.volumetype|timeframe\.isweekly|dayofweek\.saturday|dayofweek\.thursday|hline\.style_dashed|hline\.style_dotted|label\.style_circle|label\.style_square|label\.style_xcross|plot\.style_circles|plot\.style_columns|position\.top_right|shape\.triangledown|splits\.denominator|chart\.is_standard|session\.islastbar|syminfo\.employees|timeframe\.isdaily|adjustment\.splits|barmerge\.gaps_off|dayofweek\.tuesday|earnings\.estimate|hline\.style_solid|label\.style_cross|line\.style_dashed|line\.style_dotted|location\.abovebar|location\.absolute|location\.belowbar|plot\.style_areabr|plot\.style_linebr|position\.top_left|strategy\.oca\.none|text\.align_bottom|text\.align_center|barstate\.isfirst|session\.ismarket|syminfo\.currency|syminfo\.industry|syminfo\.tickerid|syminfo\.timezone|timeframe\.period|barmerge\.gaps_on|dayofweek\.friday|dayofweek\.monday|dayofweek\.sunday|label\.style_flag|label\.style_none|line\.style_solid|order\.descending|plot\.style_cross|session\.extended|shape\.triangleup|splits\.numerator|text\.align_right|barstate\.islast|strategy\.equity|syminfo\.country|syminfo\.minmove|syminfo\.mintick|syminfo\.session|time_tradingday|timeframe\.isdwm|adjustment\.none|dividends\.gross|earnings\.actual|location\.bottom|order\.ascending|plot\.style_area|plot\.style_line|session\.regular|shape\.arrowdown|shape\.labeldown|text\.align_left|barstate\.isnew|chart\.bg_color|chart\.fg_color|chart\.is_range|chart\.is_renko|last_bar_index|strategy\.short|syminfo\.prefix|syminfo\.sector|syminfo\.ticker|alert\.freq_all|format\.inherit|format\.mintick|format\.percent|strategy\.fixed|text\.align_top|text\.wrap_auto|text\.wrap_none|xloc\.bar_index|chart\.is_kagi|last_bar_time|strategy\.long|color\.fuchsia|currency\.NONE|currency\.USDT|dividends\.net|format\.volume|shape\.arrowup|shape\.diamond|shape\.labelup|strategy\.cash|xloc\.bar_time|yloc\.abovebar|yloc\.belowbar|chart\.is_pnf|linefill\.all|polyline\.all|syminfo\.root|syminfo\.type|color\.maroon|color\.orange|color\.purple|color\.silver|color\.yellow|currency\.AUD|currency\.BTC|currency\.CAD|currency\.CHF|currency\.ETH|currency\.EUR|currency\.GBP|currency\.HKD|currency\.INR|currency\.JPY|currency\.KRW|currency\.MYR|currency\.NOK|currency\.NZD|currency\.RUB|currency\.SEK|currency\.SGD|currency\.TRY|currency\.USD|currency\.ZAR|display\.none|display\.pane|extend\.right|format\.price|location\.top|shape\.circle|shape\.square|shape\.xcross|color\.black|color\.green|color\.olive|color\.white|display\.all|extend\.both|extend\.left|extend\.none|scale\.right|shape\.cross|size\.normal|dayofmonth|ta\.accdist|time_close|weekofyear|color\.aqua|color\.blue|color\.gray|color\.lime|color\.navy|color\.teal|scale\.left|scale\.none|shape\.flag|size\.large|size\.small|yloc\.price|bar_index|dayofweek|label\.all|table\.all|color\.red|math\.rphi|size\.auto|size\.huge|size\.tiny|line\.all|math\.phi|box\.all|ta\.vwap|ta\.wvad|timenow|math\.pi|minute|second|ta\.iii|ta\.nvi|ta\.obv|ta\.pvi|ta\.pvt|ta\.wad|volume|math\.e|close|hlcc4|month|ohlc4|ta\.tr|false|high|hlc3|hour|open|time|year|true|hl2|low|na/,
|
158
|
+
builtinVariables: new RegExp(c([...l.constants, ...l.variables])),
|
159
|
+
// builtinTypes: /chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map/,
|
160
|
+
builtinTypes: new RegExp(c(l.types)),
|
161
|
+
punctuation: /[.](?![.])/,
|
162
|
+
importName: /[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+/,
|
163
|
+
importAlias: /[a-zA-Z\d\_\u00a1\uffff\/]+/,
|
164
|
+
empty: /^$/
|
165
|
+
};
|
166
|
+
function a(e) {
|
167
|
+
return e.map((t) => t.replace(/<.+>/, "").split(".").join("\\.")).join("|");
|
168
|
+
}
|
169
|
+
function c(e) {
|
170
|
+
return e.map((t) => t.split(".").join("\\.")).join("|");
|
171
|
+
}
|
172
|
+
var r;
|
173
|
+
(function(e) {
|
174
|
+
e[e.None = 0] = "None", e[e.Indent = 1] = "Indent", e[e.IndentOutdent = 2] = "IndentOutdent", e[e.Outdent = 3] = "Outdent";
|
175
|
+
})(r || (r = {}));
|
176
|
+
const u = {
|
177
|
+
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
178
|
+
comments: {
|
179
|
+
lineComment: "//",
|
180
|
+
blockComment: ["/*", "*/"]
|
181
|
+
},
|
182
|
+
brackets: [["(", ")"], ["[", "]"]],
|
183
|
+
folding: {
|
184
|
+
markers: {
|
185
|
+
start: /(\/\/#region)|(\/\/.*{($|\s))/,
|
186
|
+
end: /(\/\/#endregion)|(\/\/.*}($|\s))/
|
187
|
+
}
|
188
|
+
},
|
189
|
+
autoClosingPairs: [{
|
190
|
+
open: "{",
|
191
|
+
close: "}"
|
192
|
+
}, {
|
193
|
+
open: "[",
|
194
|
+
close: "]"
|
195
|
+
}, {
|
196
|
+
open: "(",
|
197
|
+
close: ")"
|
198
|
+
}, {
|
199
|
+
open: '"',
|
200
|
+
close: '"'
|
201
|
+
}, {
|
202
|
+
open: "'",
|
203
|
+
close: "'"
|
204
|
+
}],
|
205
|
+
surroundingPairs: [{
|
206
|
+
open: "{",
|
207
|
+
close: "}"
|
208
|
+
}, {
|
209
|
+
open: "[",
|
210
|
+
close: "]"
|
211
|
+
}, {
|
212
|
+
open: "(",
|
213
|
+
close: ")"
|
214
|
+
}, {
|
215
|
+
open: '"',
|
216
|
+
close: '"'
|
217
|
+
}, {
|
218
|
+
open: "'",
|
219
|
+
close: "'"
|
220
|
+
}, {
|
221
|
+
open: "<",
|
222
|
+
close: ">"
|
223
|
+
}],
|
224
|
+
onEnterRules: [{
|
225
|
+
beforeText: /\)\s*=>\s*$/,
|
226
|
+
action: {
|
227
|
+
indentAction: r.Indent
|
228
|
+
}
|
229
|
+
}, {
|
230
|
+
beforeText: /if\s+.*\s*$/,
|
231
|
+
action: {
|
232
|
+
indentAction: r.Indent
|
233
|
+
}
|
234
|
+
}, {
|
235
|
+
beforeText: /else/,
|
236
|
+
action: {
|
237
|
+
indentAction: r.Indent
|
238
|
+
}
|
239
|
+
}, {
|
240
|
+
beforeText: /for\s+\S+\s*=\s*\S+\s+to\s+\S+(?:\s+by\s+\S+)?\s*$/,
|
241
|
+
action: {
|
242
|
+
indentAction: r.Indent
|
243
|
+
}
|
244
|
+
}, {
|
245
|
+
beforeText: /for\s+(?:\[\S+\s+\S+]|\S+)\s+in\s+\S+\s*$/,
|
246
|
+
action: {
|
247
|
+
indentAction: r.Indent
|
248
|
+
}
|
249
|
+
}, {
|
250
|
+
beforeText: /switch\s+.*\s*$/,
|
251
|
+
action: {
|
252
|
+
indentAction: r.Indent
|
253
|
+
}
|
254
|
+
}, {
|
255
|
+
beforeText: /while\s+.*\s*$/,
|
256
|
+
action: {
|
257
|
+
indentAction: r.Indent
|
258
|
+
}
|
259
|
+
}, {
|
260
|
+
beforeText: /type\s+\w+/,
|
261
|
+
action: {
|
262
|
+
indentAction: r.Indent
|
263
|
+
}
|
264
|
+
}, {
|
265
|
+
beforeText: /enum\s+\w+/,
|
266
|
+
action: {
|
267
|
+
indentAction: r.Indent
|
268
|
+
}
|
269
|
+
}, {
|
270
|
+
beforeText: /^\s*$/,
|
271
|
+
action: {
|
272
|
+
indentAction: r.Outdent
|
273
|
+
}
|
274
|
+
}]
|
275
|
+
}, o = { "color-white": "#ffffff", "color-black": "#000000", "color-transparent": "#00000000", "color-cold-gray-50": "#F8F9FD", "color-cold-gray-100": "#F0F3FA", "color-cold-gray-150": "#E0E3EB", "color-cold-gray-200": "#D1D4DC", "color-cold-gray-250": "#C1C4CD", "color-cold-gray-300": "#B2B5BE", "color-cold-gray-350": "#A3A6AF", "color-cold-gray-400": "#9598A1", "color-cold-gray-450": "#868993", "color-cold-gray-500": "#787B86", "color-cold-gray-550": "#6A6D78", "color-cold-gray-600": "#5D606B", "color-cold-gray-650": "#50535E", "color-cold-gray-700": "#434651", "color-cold-gray-750": "#363A45", "color-cold-gray-800": "#2A2E39", "color-cold-gray-850": "#1E222D", "color-cold-gray-900": "#131722", "color-cold-gray-950": "#0C0E15", "color-ripe-red-50": "#FFEBEC", "color-ripe-red-100": "#FCCBCD", "color-ripe-red-200": "#FAA1A4", "color-ripe-red-300": "#F77C80", "color-ripe-red-400": "#F7525F", "color-ripe-red-500": "#F23645", "color-ripe-red-600": "#CC2F3C", "color-ripe-red-700": "#B22833", "color-ripe-red-800": "#991F29", "color-ripe-red-900": "#801922", "color-ripe-red-a100": "#FF8080", "color-ripe-red-a200": "#FF5252", "color-ripe-red-a400": "#FF3333", "color-ripe-red-a600": "#CC2929", "color-ripe-red-a700": "#802028", "color-ripe-red-a800": "#4D191D", "color-ripe-red-a900": "#331F20", "color-tan-orange-50": "#FFF3E0", "color-tan-orange-100": "#FFE0B2", "color-tan-orange-200": "#FFCC80", "color-tan-orange-300": "#ffb74d", "color-tan-orange-400": "#FFA726", "color-tan-orange-500": "#FF9800", "color-tan-orange-600": "#FB8C00", "color-tan-orange-700": "#F57C00", "color-tan-orange-800": "#EF6C00", "color-tan-orange-900": "#e65100", "color-tan-orange-a200": "#ffab40", "color-tan-orange-a400": "#FF9100", "color-tan-orange-a600": "#CC7014", "color-tan-orange-a700": "#8C541C", "color-tan-orange-a800": "#593A1B", "color-tan-orange-a900": "#33261A", "color-iguana-green-100": "#C8E6C9", "color-iguana-green-200": "#A5D6A7", "color-iguana-green-300": "#81c784", "color-iguana-green-400": "#66BB6A", "color-iguana-green-500": "#4caf50", "color-iguana-green-600": "#43a047", "color-iguana-green-700": "#388e3c", "color-iguana-green-800": "#2E7D32", "color-iguana-green-900": "#1B5E20", "color-iguana-green-a700": "#00c853", "color-banana-yellow-100": "#FFF9C4", "color-banana-yellow-200": "#FFF59D", "color-banana-yellow-300": "#FFF176", "color-banana-yellow-400": "#ffee58", "color-banana-yellow-500": "#ffeb3b", "color-banana-yellow-600": "#fdd835", "color-banana-yellow-700": "#fbc02d", "color-banana-yellow-800": "#f9a825", "color-banana-yellow-900": "#F57F17", "color-banana-yellow-a400": "#ffea00", "color-banana-yellow-a700": "#EEDA01", "color-tv-blue-50": "#E3EFFD", "color-tv-blue-100": "#BBD9FB", "color-tv-blue-200": "#90BFF9", "color-tv-blue-300": "#5B9CF6", "color-tv-blue-400": "#3179F5", "color-tv-blue-500": "#2962FF", "color-tv-blue-600": "#1E53E5", "color-tv-blue-700": "#1848CC", "color-tv-blue-800": "#143EB3", "color-tv-blue-900": "#0C3299", "color-tv-blue-a100": "#82b1ff", "color-tv-blue-a200": "#448aff", "color-tv-blue-a400": "#2979ff", "color-tv-blue-a600": "#2962FF", "color-tv-blue-a700": "#143A87", "color-tv-blue-a800": "#142E61", "color-tv-blue-a900": "#132042", "color-deep-blue-50": "#EDE7F6", "color-deep-blue-100": "#D1C4E9", "color-deep-blue-200": "#B39DDB", "color-deep-blue-300": "#9575cd", "color-deep-blue-400": "#7e57c2", "color-deep-blue-500": "#673ab7", "color-deep-blue-700": "#512da8", "color-deep-blue-800": "#4527A0", "color-deep-blue-900": "#311B92", "color-deep-blue-a100": "#b388ff", "color-deep-blue-a200": "#7C4DFF", "color-deep-blue-a400": "#651FFF", "color-deep-blue-a700": "#6200EA", "color-minty-green-50": "#DAF2EE", "color-minty-green-100": "#ACE5DC", "color-minty-green-200": "#70CCBD", "color-minty-green-300": "#42BDA8", "color-minty-green-400": "#22AB94", "color-minty-green-500": "#089981", "color-minty-green-600": "#06806B", "color-minty-green-700": "#056656", "color-minty-green-800": "#004D40", "color-minty-green-900": "#00332A", "color-minty-green-a400": "#2BD9BC", "color-minty-green-a600": "#24B29B", "color-minty-green-a700": "#1B7667", "color-minty-green-a800": "#10443B", "color-minty-green-a900": "#082621", "color-grapes-purple-50": "#F3E5F5", "color-grapes-purple-100": "#E1BEE7", "color-grapes-purple-200": "#CE93D8", "color-grapes-purple-300": "#ba68c8", "color-grapes-purple-400": "#ab47bc", "color-grapes-purple-500": "#9c27b0", "color-grapes-purple-600": "#8e24aa", "color-grapes-purple-700": "#7b1fa2", "color-grapes-purple-800": "#6A1B9A", "color-grapes-purple-900": "#4A148C", "color-grapes-purple-a100": "#EA80FC", "color-grapes-purple-a200": "#E040FB", "color-grapes-purple-a400": "#D500F9", "color-grapes-purple-a700": "#aa00ff", "color-berry-pink-100": "#F8BBD0", "color-berry-pink-200": "#f48fb1", "color-berry-pink-300": "#f06292", "color-berry-pink-400": "#ec407a", "color-berry-pink-500": "#e91e63", "color-berry-pink-600": "#D81B60", "color-berry-pink-700": "#C2185B", "color-berry-pink-800": "#AD1457", "color-berry-pink-900": "#880E4F", "color-berry-pink-a100": "#ff80ab", "color-berry-pink-a200": "#ff4081", "color-berry-pink-a400": "#f50057", "color-sky-blue-100": "#B2EBF2", "color-sky-blue-200": "#80DEEA", "color-sky-blue-300": "#4dd0e1", "color-sky-blue-400": "#26c6da", "color-sky-blue-500": "#00bcd4", "color-sky-blue-600": "#00acc1", "color-sky-blue-700": "#0097A7", "color-sky-blue-800": "#00838F", "color-sky-blue-900": "#006064", "color-sky-blue-a400": "#00e5ff", "color-sky-blue-a700": "#00B8D4", "color-deep-blue-600": "#5E35B1", "color-forest-green-50": "#DAF2E6", "color-forest-green-100": "#ACE5C9", "color-forest-green-200": "#70CC9E", "color-forest-green-300": "#42BD7F", "color-forest-green-400": "#22AB67", "color-forest-green-500": "#089950", "color-forest-green-600": "#068043", "color-forest-green-700": "#056636", "color-forest-green-800": "#004D27", "color-forest-green-900": "#1A3326", "color-facebook": "#1877F2", "color-deep-facebook": "#1564CA", "color-twitter": "#1DA1F2", "color-deep-twitter": "#188CD3", "color-youtube": "#FF0000", "color-linkedin": "#007BB5", "color-seeking-alpha-brand": "#ff7200" };
|
276
|
+
function n(e, t = 1) {
|
277
|
+
return e + Math.round(255 * Math.min(Math.max(t, 0), 1)).toString(16).toUpperCase().padStart(2, "0");
|
278
|
+
}
|
279
|
+
const p = {
|
280
|
+
base: "vs",
|
281
|
+
inherit: !0,
|
282
|
+
rules: [{
|
283
|
+
token: "comment",
|
284
|
+
foreground: o["color-cold-gray-400"]
|
285
|
+
}, {
|
286
|
+
token: "comment.annotation",
|
287
|
+
fontStyle: "bold"
|
288
|
+
}, {
|
289
|
+
token: "text",
|
290
|
+
foreground: o["color-cold-gray-900"]
|
291
|
+
}, {
|
292
|
+
token: "string",
|
293
|
+
foreground: o["color-iguana-green-700"]
|
294
|
+
}, {
|
295
|
+
token: "constant.numeric",
|
296
|
+
foreground: o["color-banana-yellow-900"]
|
297
|
+
}, {
|
298
|
+
token: "constant.language",
|
299
|
+
foreground: o["color-ripe-red-a600"]
|
300
|
+
}, {
|
301
|
+
token: "constant.other.color",
|
302
|
+
foreground: o["color-ripe-red-a600"]
|
303
|
+
}, {
|
304
|
+
token: "constant.other",
|
305
|
+
foreground: o["color-ripe-red-a600"]
|
306
|
+
}, {
|
307
|
+
token: "support.variable",
|
308
|
+
foreground: o["color-ripe-red-a600"]
|
309
|
+
}, {
|
310
|
+
token: "support.function",
|
311
|
+
foreground: o["color-tv-blue-a600"]
|
312
|
+
}, {
|
313
|
+
token: "support.type",
|
314
|
+
foreground: o["color-minty-green-400"],
|
315
|
+
fontStyle: "bold"
|
316
|
+
}, {
|
317
|
+
token: "entity.name.type",
|
318
|
+
foreground: o["color-minty-green-400"],
|
319
|
+
fontStyle: "bold"
|
320
|
+
}, {
|
321
|
+
token: "support.method",
|
322
|
+
foreground: o["color-tv-blue-a600"]
|
323
|
+
}, {
|
324
|
+
token: "keyword.equals",
|
325
|
+
foreground: o["color-minty-green-400"]
|
326
|
+
}, {
|
327
|
+
token: "keyword.operator",
|
328
|
+
foreground: o["color-minty-green-400"]
|
329
|
+
}, {
|
330
|
+
token: "keyword.other",
|
331
|
+
foreground: o["color-minty-green-400"]
|
332
|
+
}, {
|
333
|
+
token: "keyword",
|
334
|
+
foreground: o["color-minty-green-400"]
|
335
|
+
}, {
|
336
|
+
token: "variable.other",
|
337
|
+
foreground: o["color-cold-gray-800"]
|
338
|
+
}, {
|
339
|
+
token: "variable.other.property",
|
340
|
+
foreground: o["color-cold-gray-800"]
|
341
|
+
}, {
|
342
|
+
token: "paren",
|
343
|
+
foreground: o["color-black"]
|
344
|
+
}, {
|
345
|
+
token: "entity.name.function",
|
346
|
+
foreground: o["color-tv-blue-900"]
|
347
|
+
}, {
|
348
|
+
token: "entity.name.method",
|
349
|
+
foreground: o["color-tv-blue-900"]
|
350
|
+
}, {
|
351
|
+
token: "meta.function-call",
|
352
|
+
foreground: o["color-grapes-purple-600"]
|
353
|
+
}, {
|
354
|
+
token: "entity.name.module.name",
|
355
|
+
foreground: o["color-grapes-purple-600"]
|
356
|
+
}, {
|
357
|
+
token: "entity.name.module",
|
358
|
+
foreground: o["color-tv-blue-a600"]
|
359
|
+
}, {
|
360
|
+
token: "",
|
361
|
+
background: o["color-white"]
|
362
|
+
}],
|
363
|
+
colors: {
|
364
|
+
"editor.foreground": o["color-cold-gray-900"],
|
365
|
+
"editor.background": "#00000000",
|
366
|
+
"editorLineNumber.foreground": o["color-cold-gray-400"],
|
367
|
+
"editorLineNumber.activeForeground": o["color-cold-gray-700"],
|
368
|
+
"editorHoverWidget.background": o["color-white"],
|
369
|
+
"editorHoverWidget.statusBarBackground": o["color-cold-gray-150"],
|
370
|
+
"editorHoverWidget.foreground": o["color-cold-gray-900"],
|
371
|
+
"editorWidget.background": o["color-white"],
|
372
|
+
"editorWidget.foreground": o["color-cold-gray-900"],
|
373
|
+
"editorGutter.background": "#00000000",
|
374
|
+
"editor.foldBackground": n(o["color-cold-gray-200"], 0.5),
|
375
|
+
"editor.lineHighlightBackground": o["color-tv-blue-50"],
|
376
|
+
"editor.lineHighlightBorder": o["color-tv-blue-50"],
|
377
|
+
"editor.rangeHighlightBackground": o["color-tv-blue-100"],
|
378
|
+
"editorBracketMatch.background": o["color-cold-gray-150"],
|
379
|
+
"editor.selectionBackground": o["color-tv-blue-100"],
|
380
|
+
"editor.selectionHighlightBackground": o["color-tv-blue-50"],
|
381
|
+
"editor.findMatchBackground": o["color-tan-orange-100"],
|
382
|
+
"editor.findMatchHighlightBackground": o["color-tan-orange-100"],
|
383
|
+
"editor.findMatchBorder": o["color-tan-orange-500"],
|
384
|
+
"list.foreground": o["color-cold-gray-900"],
|
385
|
+
"list.hoverForeground": o["color-cold-gray-900"],
|
386
|
+
"list.activeSelectionBackground": o["color-tv-blue-500"],
|
387
|
+
"list.hoverBackground": o["color-tv-blue-50"],
|
388
|
+
"list.focusHighlightForeground": o["color-tv-blue-100"],
|
389
|
+
"list.inactiveSelectionBackground": o["color-tv-blue-500"],
|
390
|
+
"keybindingLabel.background": o["color-white"],
|
391
|
+
"keybindingLabel.foreground": o["color-cold-gray-900"],
|
392
|
+
"keybindingLabel.border": o["color-cold-gray-150"],
|
393
|
+
"input.foreground": o["color-cold-gray-900"],
|
394
|
+
"textLink.foreground": o["color-tv-blue-500"],
|
395
|
+
"textLink.activeForeground": o["color-tv-blue-600"],
|
396
|
+
"peekViewEditor.matchHighlightBackground": o["color-tan-orange-100"],
|
397
|
+
"peekViewResult.lineForeground": o["color-cold-gray-900"],
|
398
|
+
"editorMarkerNavigationWarning.background": o["color-banana-yellow-800"],
|
399
|
+
"inputValidation.warningBackground": o["color-banana-yellow-800"],
|
400
|
+
"diffEditor.insertedTextBackground": n(o["color-forest-green-500"], 0.3),
|
401
|
+
"diffEditor.insertedLineBackground": n(o["color-forest-green-500"], 0.15),
|
402
|
+
"diffEditor.removedTextBackground": n(o["color-ripe-red-500"], 0.3),
|
403
|
+
"diffEditor.removedLineBackground": n(o["color-ripe-red-500"], 0.15),
|
404
|
+
"editorInlayHint.background": o["color-cold-gray-150"],
|
405
|
+
"editorInlayHint.foreground": o["color-cold-gray-550"],
|
406
|
+
"editorError.foreground": o["color-ripe-red-500"],
|
407
|
+
"editorWarning.foreground": o["color-tan-orange-500"]
|
408
|
+
}
|
409
|
+
}, s = {
|
410
|
+
base: "vs-dark",
|
411
|
+
inherit: !0,
|
412
|
+
rules: [{
|
413
|
+
token: "comment",
|
414
|
+
foreground: o["color-cold-gray-500"]
|
415
|
+
}, {
|
416
|
+
token: "comment.annotation",
|
417
|
+
fontStyle: "bold"
|
418
|
+
}, {
|
419
|
+
token: "text",
|
420
|
+
foreground: o["color-white"]
|
421
|
+
}, {
|
422
|
+
token: "string",
|
423
|
+
foreground: o["color-iguana-green-700"]
|
424
|
+
}, {
|
425
|
+
token: "constant.numeric",
|
426
|
+
foreground: o["color-banana-yellow-900"]
|
427
|
+
}, {
|
428
|
+
token: "constant.language",
|
429
|
+
foreground: o["color-ripe-red-300"]
|
430
|
+
}, {
|
431
|
+
token: "constant.other.color",
|
432
|
+
foreground: o["color-ripe-red-300"]
|
433
|
+
}, {
|
434
|
+
token: "constant.other",
|
435
|
+
foreground: o["color-ripe-red-300"]
|
436
|
+
}, {
|
437
|
+
token: "support.variable",
|
438
|
+
foreground: o["color-ripe-red-300"]
|
439
|
+
}, {
|
440
|
+
token: "support.function",
|
441
|
+
foreground: o["color-tv-blue-300"]
|
442
|
+
}, {
|
443
|
+
token: "support.method",
|
444
|
+
foreground: o["color-tv-blue-300"]
|
445
|
+
}, {
|
446
|
+
token: "support.type",
|
447
|
+
foreground: o["color-minty-green-300"],
|
448
|
+
fontStyle: "bold"
|
449
|
+
}, {
|
450
|
+
token: "entity.name.type",
|
451
|
+
foreground: o["color-minty-green-300"],
|
452
|
+
fontStyle: "bold"
|
453
|
+
}, {
|
454
|
+
token: "keyword.equals",
|
455
|
+
foreground: o["color-minty-green-300"]
|
456
|
+
}, {
|
457
|
+
token: "keyword.operator",
|
458
|
+
foreground: o["color-minty-green-300"]
|
459
|
+
}, {
|
460
|
+
token: "keyword.other",
|
461
|
+
foreground: o["color-minty-green-300"]
|
462
|
+
}, {
|
463
|
+
token: "keyword",
|
464
|
+
foreground: o["color-minty-green-300"]
|
465
|
+
}, {
|
466
|
+
token: "variable.other",
|
467
|
+
foreground: o["color-cold-gray-200"]
|
468
|
+
}, {
|
469
|
+
token: "variable.other.property",
|
470
|
+
foreground: o["color-cold-gray-200"]
|
471
|
+
}, {
|
472
|
+
token: "paren",
|
473
|
+
foreground: o["color-white"]
|
474
|
+
}, {
|
475
|
+
token: "entity.name.function",
|
476
|
+
foreground: o["color-tv-blue-400"]
|
477
|
+
}, {
|
478
|
+
token: "entity.name.method",
|
479
|
+
foreground: o["color-tv-blue-400"]
|
480
|
+
}, {
|
481
|
+
token: "meta.function-call",
|
482
|
+
foreground: o["color-grapes-purple-300"]
|
483
|
+
}, {
|
484
|
+
token: "entity.name.module.name",
|
485
|
+
foreground: o["color-grapes-purple-300"]
|
486
|
+
}, {
|
487
|
+
token: "entity.name.module",
|
488
|
+
foreground: o["color-tv-blue-300"]
|
489
|
+
}, {
|
490
|
+
token: "",
|
491
|
+
background: o["color-cold-gray-900"]
|
492
|
+
}],
|
493
|
+
colors: {
|
494
|
+
"editor.foreground": o["color-white"],
|
495
|
+
"editor.background": o["color-cold-gray-900"],
|
496
|
+
"editorLineNumber.foreground": o["color-cold-gray-500"],
|
497
|
+
"editorLineNumber.activeForeground": o["color-cold-gray-300"],
|
498
|
+
"editorWidget.background": o["color-cold-gray-850"],
|
499
|
+
"editorHoverWidget.background": o["color-cold-gray-850"],
|
500
|
+
"editorHoverWidget.foreground": o["color-cold-gray-300"],
|
501
|
+
"editorHoverWidget.statusBarBackground": o["color-cold-gray-900"],
|
502
|
+
"editorWidget.foreground": o["color-cold-gray-300"],
|
503
|
+
"editorGutter.background": o["color-cold-gray-900"],
|
504
|
+
"editor.foldBackground": n(o["color-cold-gray-700"], 0.5),
|
505
|
+
"editor.lineHighlightBackground": o["color-tv-blue-a900"],
|
506
|
+
"editor.lineHighlightBorder": o["color-tv-blue-a900"],
|
507
|
+
"editor.rangeHighlightBackground": o["color-tv-blue-a800"],
|
508
|
+
"editorBracketMatch.background": o["color-cold-gray-750"],
|
509
|
+
"editor.selectionBackground": o["color-tv-blue-a800"],
|
510
|
+
"editor.selectionHighlightBackground": o["color-cold-gray-800"],
|
511
|
+
"list.foreground": o["color-cold-gray-350"],
|
512
|
+
"list.hoverForeground": o["color-cold-gray-350"],
|
513
|
+
"list.activeSelectionBackground": o["color-tv-blue-500"],
|
514
|
+
"list.hoverBackground": o["color-tv-blue-900"],
|
515
|
+
"list.focusHighlightForeground": o["color-tv-blue-300"],
|
516
|
+
"list.inactiveSelectionBackground": o["color-tv-blue-500"],
|
517
|
+
"keybindingLabel.background": o["color-cold-gray-800"],
|
518
|
+
"keybindingLabel.foreground": o["color-cold-gray-300"],
|
519
|
+
"keybindingLabel.border": o["color-cold-gray-700"],
|
520
|
+
"input.foreground": o["color-cold-gray-350"],
|
521
|
+
"textLink.foreground": o["color-tv-blue-500"],
|
522
|
+
"textLink.activeForeground": o["color-tv-blue-600"],
|
523
|
+
"peekViewEditor.matchHighlightBackground": o["color-tan-orange-a800"],
|
524
|
+
"peekViewResult.lineForeground": o["color-cold-gray-350"],
|
525
|
+
"diffEditor.insertedTextBackground": n(o["color-iguana-green-a700"], 0.3),
|
526
|
+
"diffEditor.insertedLineBackground": n(o["color-iguana-green-a700"], 0.15),
|
527
|
+
"diffEditor.removedTextBackground": n(o["color-ripe-red-a400"], 0.3),
|
528
|
+
"diffEditor.removedLineBackground": n(o["color-ripe-red-a400"], 0.15),
|
529
|
+
"editorInlayHint.background": o["color-cold-gray-800"],
|
530
|
+
"editorInlayHint.foreground": o["color-cold-gray-400"],
|
531
|
+
"editorError.foreground": o["color-ripe-red-500"],
|
532
|
+
"editorWarning.foreground": o["color-tan-orange-700"]
|
533
|
+
}
|
534
|
+
}, b = /(\\(?:[\\'"]))|(\\$)|("|$)|($)/g, y = /(\\(?:[\\'"]))|(\\$)|('|$)|($)/g, f = {
|
535
|
+
"color.aqua": "#00BCD4",
|
536
|
+
"color.black": "#363A45",
|
537
|
+
"color.blue": "#2962ff",
|
538
|
+
"color.fuchsia": "#E040FB",
|
539
|
+
"color.gray": "#787B86",
|
540
|
+
"color.green": "#4CAF50",
|
541
|
+
"color.lime": "#00E676",
|
542
|
+
"color.maroon": "#880E4F",
|
543
|
+
"color.navy": "#311B92",
|
544
|
+
"color.olive": "#808000",
|
545
|
+
"color.orange": "#FF9800",
|
546
|
+
"color.purple": "#9C27B0",
|
547
|
+
"color.red": "#FF5252",
|
548
|
+
"color.silver": "#B2B5BE",
|
549
|
+
"color.teal": "#00897B",
|
550
|
+
"color.white": "#FFFFFF",
|
551
|
+
"color.yellow": "#FFEB3B"
|
552
|
+
};
|
553
|
+
export {
|
554
|
+
o as COLORS,
|
555
|
+
u as CONFIGURATION,
|
556
|
+
f as DEFAULT_COLORS,
|
557
|
+
d as LANGAGE_NAME,
|
558
|
+
g as LANGUAGE_MONARCH_TOKENS,
|
559
|
+
b as QQSTRING_REG,
|
560
|
+
y as QSTRING_REG,
|
561
|
+
p as VS,
|
562
|
+
s as VS_DARK
|
563
|
+
};
|
package/lib/packages/index.d.ts
CHANGED
@@ -3,9 +3,9 @@ export { default as TradingVueEditor } from '../components/editor/index';
|
|
3
3
|
export { default as TradingVueDiffEditor } from '../components/diffEditor/index';
|
4
4
|
export type { IRefs as IEditorRefs } from '../components/editor/index';
|
5
5
|
export { parseTcc, scriptsRun, removeScript, parseLibrary } from '../components/editor/utils/parserTcc';
|
6
|
-
export type { IError, IPosition } from '../components/editor/
|
7
|
-
export { VMarkerSeverity } from '../components/editor/
|
6
|
+
export type { IError, IPosition } from '../components/editor/type';
|
7
|
+
export { VMarkerSeverity } from '../components/editor/type';
|
8
8
|
export { default as ReferenceManual } from '../components/referenceManual';
|
9
9
|
export { default as ReferenceManualPage } from '../components/referenceManualPage';
|
10
10
|
export { transformCodeToHtml } from '../utils/tools';
|
11
|
-
export { VAdjustment, VAlert, VBarmergeGaps, VCommission, VDirection, VEarnings, VExtend, VFormatType, VHlineStyle, VInputType, VLabelStyle, VLineStyle, VLocation, VOca, VPlotDisplay, VPlotStyle, VRuleType, VScale, VSession, VShape, VSortOrder, VSize, VStrategy, VText, VType, VXloc, VYloc, VPivotType, VPosition, VScriptType, VFont } from '../components/editor/parseScript/enum';
|
11
|
+
export { VAdjustment, VAlert, VBarmergeGaps, VCommission, VDirection, VEarnings, VExtend, VFormatType, VHlineStyle, VInputType, VLabelStyle, VLineStyle, VLocation, VOca, VPlotDisplay, VPlotStyle, VRuleType, VScale, VSession, VShape, VSortOrder, VSize, VStrategy, VText, VType, VXloc, VYloc, VPivotType, VPosition, VScriptType, VFont } from '../components/editor/v5/parseScript/enum';
|