From f62eddb7ad3f9b968aa92d92c308a2fc47ba0c69 Mon Sep 17 00:00:00 2001
From: srl <906239+srliao@users.noreply.github.com>
Date: Thu, 20 Jun 2024 10:29:35 -0400
Subject: [PATCH] fix arle missing docs and syntax highlight (#2185)
---
.../components/src/Editor/mode-gcsim.js | 280 +++++++++---------
ui/packages/components/src/Editor/types.ts | 23 +-
.../docs/reference/characters/arlecchino.md | 44 +++
ui/packages/ui/src/util/mode-gcsim.js | 280 +++++++++---------
4 files changed, 336 insertions(+), 291 deletions(-)
create mode 100644 ui/packages/docs/docs/reference/characters/arlecchino.md
diff --git a/ui/packages/components/src/Editor/mode-gcsim.js b/ui/packages/components/src/Editor/mode-gcsim.js
index ac566bdca2..f4fa2ab14c 100644
--- a/ui/packages/components/src/Editor/mode-gcsim.js
+++ b/ui/packages/components/src/Editor/mode-gcsim.js
@@ -1,27 +1,27 @@
ace.define(
- "ace/mode/doc_comment_highlight_rules",
+ 'ace/mode/doc_comment_highlight_rules',
[
- "require",
- "exports",
- "module",
- "ace/lib/oop",
- "ace/mode/text_highlight_rules",
+ 'require',
+ 'exports',
+ 'module',
+ 'ace/lib/oop',
+ 'ace/mode/text_highlight_rules',
],
function (require, exports, module) {
- "use strict";
- var oop = require("../lib/oop");
+ 'use strict';
+ var oop = require('../lib/oop');
var TextHighlightRules =
- require("./text_highlight_rules").TextHighlightRules;
+ require('./text_highlight_rules').TextHighlightRules;
var DocCommentHighlightRules = function () {
this.$rules = {
start: [
{
- token: "comment.doc.tag",
- regex: "@\\w+(?=\\s|$)",
+ token: 'comment.doc.tag',
+ regex: '@\\w+(?=\\s|$)',
},
DocCommentHighlightRules.getTagRule(),
{
- defaultToken: "comment.doc",
+ defaultToken: 'comment.doc',
caseInsensitive: true,
},
],
@@ -30,44 +30,44 @@ ace.define(
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
DocCommentHighlightRules.getTagRule = function (start) {
return {
- token: "comment.doc.tag.storage.type",
- regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b",
+ token: 'comment.doc.tag.storage.type',
+ regex: '\\b(?:TODO|FIXME|XXX|HACK)\\b',
};
};
DocCommentHighlightRules.getStartRule = function (start) {
return {
- token: "comment.doc", // doc comment
- regex: "\\/\\*(?=\\*)",
+ token: 'comment.doc', // doc comment
+ regex: '\\/\\*(?=\\*)',
next: start,
};
};
DocCommentHighlightRules.getEndRule = function (start) {
return {
- token: "comment.doc", // closing comment
- regex: "\\*\\/",
+ token: 'comment.doc', // closing comment
+ regex: '\\*\\/',
next: start,
};
};
exports.DocCommentHighlightRules = DocCommentHighlightRules;
- }
+ },
);
ace.define(
- "ace/mode/gcsim_highlight_rules",
+ 'ace/mode/gcsim_highlight_rules',
[
- "require",
- "exports",
- "module",
- "ace/lib/oop",
- "ace/mode/doc_comment_highlight_rules",
- "ace/mode/text_highlight_rules",
+ 'require',
+ 'exports',
+ 'module',
+ 'ace/lib/oop',
+ 'ace/mode/doc_comment_highlight_rules',
+ 'ace/mode/text_highlight_rules',
],
function (require, exports, module) {
- var oop = require("../lib/oop");
+ var oop = require('../lib/oop');
var DocCommentHighlightRules =
- require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+ require('./doc_comment_highlight_rules').DocCommentHighlightRules;
var TextHighlightRules =
- require("./text_highlight_rules").TextHighlightRules;
+ require('./text_highlight_rules').TextHighlightRules;
var gcsimHighlightRules = function () {
// var builtinTypes =
// "string|uint8|uint16|uint32|uint64|int8|int16|int32|int64|float32|" +
@@ -76,158 +76,158 @@ ace.define(
// "new|close|cap|copy|panic|panicln|print|println|len|make|delete|real|recover|imag|append";
// var builtinConstants = "nil|true|false|iota";
var gcsimKeywords =
- "let|while|if|else|fn|switch|case|default|break|continue|fallthrough|return|for|" +
- "options|add|char|stats|weapon|set|lvl|refine|cons|talent|count|active|target|particle_threshold|particle_drop_count|resist|energy|hurt";
+ 'let|while|if|else|fn|switch|case|default|break|continue|fallthrough|return|for|' +
+ 'options|add|char|stats|weapon|set|lvl|refine|cons|talent|count|active|target|particle_threshold|particle_drop_count|resist|energy|hurt';
var gcsimAvatars =
- "traveleranemo|travelergeo|travelerelectro|travelerdendro|travelerhydro|travelerpyro|travelercryo|aether-anemo|lumine-anemo|aether-geo|lumine-geo|aether-electro|lumine-electro|aether-dendro|lumine-dendro|aether-hydro|lumine-hydro|aether-pyro|lumine-pyro|aether-cryo|lumine-cryo|aetheranemo|lumineanemo|aethergeo|luminegeo|aetherelectro|lumineelectro|aetherdendro|luminedendro|aetherhydro|luminehydro|aetherpyro|luminepyro|aethercryo|luminecryo|albedo|aloy|amber|barbara|barb|beidou|bennett|charlotte|chongyun|chong|cyno|diluc|diona|eula|fischl|fish|amy|ganyu|hutao|tao|ht|jean|kaedeharakazuha|kazuha|kaz|kaeya|kamisatoayaka|ayaka|kamisatoayato|ayato|keqing|keq|klee|kujousara|kujosara|sara|lisa|mona|ningguang|ning|noelle|qiqi|raidenshogun|raiden|herexcellencythealmightynarukamiogoshogodofthunder|razor|rosaria|rosa|sangonomiyakokomi|kokomi|koko|sayu|sucrose|tartaglia|childe|thoma|venti|xiangling|xl|xianyun|cloudretainer|liuyun|xiao|xingqiu|xq|xinyan|yanfei|yoimiya|yoi|yunjin|zhongli|zhong|zl|gorou|aratakiitto|itto|aratakitheoneandoniitto|shenhe|yae|yaemiko|yelan|kukishinobu|kuki|shikanoinheizou|heizou|tighnari|collei|dori|candace|nilou|kusanali|lesserlordkusanali|nahida|layla|faruzan|faru|wanderer|scaramouche|scara|kunikuzushi|kuni|kabukimono|alhaitham|haitham|baizhu|dehya|yaoyao|mika|kaveh|kirara|lyney|lynette|neuvillette|neuv|chiefjusticeoffontaine|freminet|furina|furinadefontaine|navia|demoiselle|wriothesley|wrio|chevreuse|chev|gaming|chiori|arlecchino|arle";
+ 'traveleranemo|travelergeo|travelerelectro|travelerdendro|travelerhydro|travelerpyro|travelercryo|aether-anemo|lumine-anemo|aether-geo|lumine-geo|aether-electro|lumine-electro|aether-dendro|lumine-dendro|aether-hydro|lumine-hydro|aether-pyro|lumine-pyro|aether-cryo|lumine-cryo|aetheranemo|lumineanemo|aethergeo|luminegeo|aetherelectro|lumineelectro|aetherdendro|luminedendro|aetherhydro|luminehydro|aetherpyro|luminepyro|aethercryo|luminecryo|albedo|aloy|amber|barbara|barb|beidou|bennett|charlotte|chongyun|chong|cyno|diluc|diona|eula|fischl|fish|amy|ganyu|hutao|tao|ht|jean|kaedeharakazuha|kazuha|kaz|kaeya|kamisatoayaka|ayaka|kamisatoayato|ayato|keqing|keq|klee|kujousara|kujosara|sara|lisa|mona|ningguang|ning|noelle|qiqi|raidenshogun|raiden|herexcellencythealmightynarukamiogoshogodofthunder|razor|rosaria|rosa|sangonomiyakokomi|kokomi|koko|sayu|sucrose|tartaglia|childe|thoma|venti|xiangling|xl|xianyun|cloudretainer|liuyun|xiao|xingqiu|xq|xinyan|yanfei|yoimiya|yoi|yunjin|zhongli|zhong|zl|gorou|aratakiitto|itto|aratakitheoneandoniitto|shenhe|yae|yaemiko|yelan|kukishinobu|kuki|shikanoinheizou|heizou|tighnari|collei|dori|candace|nilou|kusanali|lesserlordkusanali|nahida|layla|faruzan|faru|wanderer|scaramouche|scara|kunikuzushi|kuni|kabukimono|alhaitham|haitham|baizhu|dehya|yaoyao|mika|kaveh|kirara|lyney|lynette|neuvillette|neuv|chiefjusticeoffontaine|freminet|furina|furinadefontaine|navia|demoiselle|wriothesley|wrio|chevreuse|chev|gaming|chiori|arlecchino|arle';
var gcsimAbilities =
- "attack|charge|aim|skill|burst|low_plunge|high_plunge|dash|jump|walk|swap";
- var gcsimStats = "hp(?:%)?|atk(?:%)?|def(?:%)?|er|em|cr|cd|heal|phys%";
+ 'attack|charge|aim|skill|burst|low_plunge|high_plunge|dash|jump|walk|swap';
+ var gcsimStats = 'hp(?:%)?|atk(?:%)?|def(?:%)?|er|em|cr|cd|heal|phys%';
var gcsimOthers =
- "interval|every|once|amount|electro(?:%)?|element|resist|pyro(?:%)?|dendro(?:%)?|hydro(?:%)?|geo(?:%)?|anemo(?:%)?|physical|cryo(?:%)?|start_hp(?:%)?|start_energy|pos|radius|freeze_resist";
+ 'interval|every|once|amount|electro(?:%)?|element|resist|pyro(?:%)?|dendro(?:%)?|hydro(?:%)?|geo(?:%)?|anemo(?:%)?|physical|cryo(?:%)?|start_hp(?:%)?|start_energy|pos|radius|freeze_resist';
var gcsimOptions =
- "iteration|duration|swap_delay|workers|hitlag|defhalt|ignore_burst_energy";
+ 'iteration|duration|swap_delay|workers|hitlag|defhalt|ignore_burst_energy';
var keywordMapper = this.createKeywordMapper(
{
keyword: gcsimKeywords,
// "constant.language": builtinConstants,
// "support.function": builtinFunctions,
// "support.type": builtinTypes,
- "support.function": gcsimAbilities,
- "support.class": gcsimOptions,
- "constant.language": gcsimAvatars,
+ 'support.function': gcsimAbilities,
+ 'support.class': gcsimOptions,
+ 'constant.language': gcsimAvatars,
},
- ""
+ '',
);
var stringEscapeRe =
- "\\\\(?:[0-7]{3}|x\\h{2}|u{4}|U\\h{6}|[abfnrtv'\"\\\\])".replace(
+ '\\\\(?:[0-7]{3}|x\\h{2}|u{4}|U\\h{6}|[abfnrtv\'"\\\\])'.replace(
/\\h/g,
- "[a-fA-F\\d]"
+ '[a-fA-F\\d]',
);
this.$rules = {
start: [
{
- token: "comment",
- regex: "\\/\\/.*$",
+ token: 'comment',
+ regex: '\\/\\/.*$',
},
{
- token: "comment",
- regex: "\\#.*$",
+ token: 'comment',
+ regex: '\\#.*$',
},
- DocCommentHighlightRules.getStartRule("doc-start"),
+ DocCommentHighlightRules.getStartRule('doc-start'),
{
- token: "comment.start", // multi line comment
- regex: "\\/\\*",
- next: "comment",
+ token: 'comment.start', // multi line comment
+ regex: '\\/\\*',
+ next: 'comment',
},
{
- token: "string", // single line
+ token: 'string', // single line
regex: /"(?:[^"\\]|\\.)*?"/,
},
{
- token: "string", // raw
- regex: "`",
- next: "bqstring",
+ token: 'string', // raw
+ regex: '`',
+ next: 'bqstring',
},
{
- token: "support.variable",
- regex: gcsimStats + "|" + gcsimOthers,
+ token: 'support.variable',
+ regex: gcsimStats + '|' + gcsimOthers,
},
{
- token: "constant.numeric", // rune
+ token: 'constant.numeric', // rune
regex:
"'(?:[^\\'\uD800-\uDBFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|" +
- stringEscapeRe.replace('"', "") +
+ stringEscapeRe.replace('"', '') +
")'",
},
{
- token: "constant.numeric", // hex
- regex: "0[xX][0-9a-fA-F]+\\b",
+ token: 'constant.numeric', // hex
+ regex: '0[xX][0-9a-fA-F]+\\b',
},
{
- token: "constant.numeric", // float
- regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b",
+ token: 'constant.numeric', // float
+ regex: '[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b',
},
{
- token: ["keyword", "text", "entity.name.function"],
- regex: "(func)(\\s+)([a-zA-Z_$][a-zA-Z0-9_$]*)\\b",
+ token: ['keyword', 'text', 'entity.name.function'],
+ regex: '(func)(\\s+)([a-zA-Z_$][a-zA-Z0-9_$]*)\\b',
},
{
token: function (val) {
- if (val[val.length - 1] == "(") {
+ if (val[val.length - 1] == '(') {
return [
{
- type: keywordMapper(val.slice(0, -1)) || "support.function",
+ type: keywordMapper(val.slice(0, -1)) || 'support.function',
value: val.slice(0, -1),
},
{
- type: "paren.lparen",
+ type: 'paren.lparen',
value: val.slice(-1),
},
];
}
- return keywordMapper(val) || "identifier";
+ return keywordMapper(val) || 'identifier';
},
- regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b\\(?",
+ regex: '[a-zA-Z_$][a-zA-Z0-9_$]*\\b\\(?',
},
{
- token: "keyword.operator",
+ token: 'keyword.operator',
regex:
- "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=",
+ '!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=',
},
{
- token: "punctuation.operator",
- regex: "\\?|\\:|\\,|\\;|\\.",
+ token: 'punctuation.operator',
+ regex: '\\?|\\:|\\,|\\;|\\.',
},
{
- token: "paren.lparen",
- regex: "[[({]",
+ token: 'paren.lparen',
+ regex: '[[({]',
},
{
- token: "paren.rparen",
- regex: "[\\])}]",
+ token: 'paren.rparen',
+ regex: '[\\])}]',
},
{
- token: "text",
- regex: "\\s+",
+ token: 'text',
+ regex: '\\s+',
},
],
comment: [
{
- token: "comment.end",
- regex: "\\*\\/",
- next: "start",
+ token: 'comment.end',
+ regex: '\\*\\/',
+ next: 'start',
},
{
- defaultToken: "comment",
+ defaultToken: 'comment',
},
],
bqstring: [
{
- token: "string",
- regex: "`",
- next: "start",
+ token: 'string',
+ regex: '`',
+ next: 'start',
},
{
- defaultToken: "string",
+ defaultToken: 'string',
},
],
};
- this.embedRules(DocCommentHighlightRules, "doc-", [
- DocCommentHighlightRules.getEndRule("start"),
+ this.embedRules(DocCommentHighlightRules, 'doc-', [
+ DocCommentHighlightRules.getEndRule('start'),
]);
};
oop.inherits(gcsimHighlightRules, TextHighlightRules);
exports.GolangHighlightRules = gcsimHighlightRules;
- }
+ },
);
ace.define(
- "ace/mode/matching_brace_outdent",
- ["require", "exports", "module", "ace/range"],
+ 'ace/mode/matching_brace_outdent',
+ ['require', 'exports', 'module', 'ace/range'],
function (require, exports, module) {
- "use strict";
- var Range = require("../range").Range;
+ 'use strict';
+ var Range = require('../range').Range;
var MatchingBraceOutdent = function () {};
(function () {
this.checkOutdent = function (line, input) {
@@ -252,37 +252,37 @@ ace.define(
};
}).call(MatchingBraceOutdent.prototype);
exports.MatchingBraceOutdent = MatchingBraceOutdent;
- }
+ },
);
ace.define(
- "ace/mode/folding/cstyle",
+ 'ace/mode/folding/cstyle',
[
- "require",
- "exports",
- "module",
- "ace/lib/oop",
- "ace/range",
- "ace/mode/folding/fold_mode",
+ 'require',
+ 'exports',
+ 'module',
+ 'ace/lib/oop',
+ 'ace/range',
+ 'ace/mode/folding/fold_mode',
],
function (require, exports, module) {
- "use strict";
- var oop = require("../../lib/oop");
- var Range = require("../../range").Range;
- var BaseFoldMode = require("./fold_mode").FoldMode;
+ 'use strict';
+ var oop = require('../../lib/oop');
+ var Range = require('../../range').Range;
+ var BaseFoldMode = require('./fold_mode').FoldMode;
var FoldMode = (exports.FoldMode = function (commentRegex) {
if (commentRegex) {
this.foldingStartMarker = new RegExp(
this.foldingStartMarker.source.replace(
/\|[^|]*?$/,
- "|" + commentRegex.start
- )
+ '|' + commentRegex.start,
+ ),
);
this.foldingStopMarker = new RegExp(
this.foldingStopMarker.source.replace(
/\|[^|]*?$/,
- "|" + commentRegex.end
- )
+ '|' + commentRegex.end,
+ ),
);
}
});
@@ -301,17 +301,17 @@ ace.define(
!this.startRegionRe.test(line) &&
!this.tripleStarBlockCommentRe.test(line)
)
- return "";
+ return '';
}
var fw = this._getFoldWidgetBase(session, foldStyle, row);
- if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart
+ if (!fw && this.startRegionRe.test(line)) return 'start'; // lineCommentRegionStart
return fw;
};
this.getFoldWidgetRange = function (
session,
foldStyle,
row,
- forceMultiline
+ forceMultiline,
) {
var line = session.getLine(row);
if (this.startRegionRe.test(line))
@@ -325,11 +325,11 @@ ace.define(
if (range && !range.isMultiLine()) {
if (forceMultiline) {
range = this.getSectionRange(session, row);
- } else if (foldStyle != "all") range = null;
+ } else if (foldStyle != 'all') range = null;
}
return range;
}
- if (foldStyle === "markbegin") return;
+ if (foldStyle === 'markbegin') return;
var match = line.match(this.foldingStopMarker);
if (match) {
var i = match.index + match[0].length;
@@ -351,7 +351,7 @@ ace.define(
var indent = line.search(/\S/);
if (indent === -1) continue;
if (startIndent > indent) break;
- var subRange = this.getFoldWidgetRange(session, "all", row);
+ var subRange = this.getFoldWidgetRange(session, 'all', row);
if (subRange) {
if (subRange.start.row <= startRow) {
break;
@@ -367,7 +367,7 @@ ace.define(
startRow,
startColumn,
endRow,
- session.getLine(endRow).length
+ session.getLine(endRow).length,
);
};
this.getCommentRegionBlock = function (session, line, row) {
@@ -390,29 +390,29 @@ ace.define(
}
};
}).call(FoldMode.prototype);
- }
+ },
);
ace.define(
- "ace/mode/gcsim",
+ 'ace/mode/gcsim',
[
- "require",
- "exports",
- "module",
- "ace/lib/oop",
- "ace/mode/text",
- "ace/mode/gcsim_highlight_rules",
- "ace/mode/matching_brace_outdent",
- "ace/mode/folding/cstyle",
+ 'require',
+ 'exports',
+ 'module',
+ 'ace/lib/oop',
+ 'ace/mode/text',
+ 'ace/mode/gcsim_highlight_rules',
+ 'ace/mode/matching_brace_outdent',
+ 'ace/mode/folding/cstyle',
],
function (require, exports, module) {
- var oop = require("../lib/oop");
- var TextMode = require("./text").Mode;
+ var oop = require('../lib/oop');
+ var TextMode = require('./text').Mode;
var gcsimHighlightRules =
- require("./gcsim_highlight_rules").GolangHighlightRules;
+ require('./gcsim_highlight_rules').GolangHighlightRules;
var MatchingBraceOutdent =
- require("./matching_brace_outdent").MatchingBraceOutdent;
- var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+ require('./matching_brace_outdent').MatchingBraceOutdent;
+ var CStyleFoldMode = require('./folding/cstyle').FoldMode;
var Mode = function () {
this.HighlightRules = gcsimHighlightRules;
this.$outdent = new MatchingBraceOutdent();
@@ -421,17 +421,17 @@ ace.define(
};
oop.inherits(Mode, TextMode);
(function () {
- this.lineCommentStart = "//";
- this.blockComment = { start: "/*", end: "*/" };
+ this.lineCommentStart = '//';
+ this.blockComment = {start: '/*', end: '*/'};
this.getNextLineIndent = function (state, line, tab) {
var indent = this.$getIndent(line);
var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
var tokens = tokenizedLine.tokens;
var endState = tokenizedLine.state;
- if (tokens.length && tokens[tokens.length - 1].type == "comment") {
+ if (tokens.length && tokens[tokens.length - 1].type == 'comment') {
return indent;
}
- if (state == "start") {
+ if (state == 'start') {
var match = line.match(/^.*[\{\(\[]\s*$/);
if (match) {
indent += tab;
@@ -445,14 +445,14 @@ ace.define(
this.autoOutdent = function (state, doc, row) {
this.$outdent.autoOutdent(doc, row);
};
- this.$id = "ace/mode/golang";
+ this.$id = 'ace/mode/golang';
}).call(Mode.prototype);
exports.Mode = Mode;
- }
+ },
);
(function () {
- ace.require(["ace/mode/gcsim"], function (m) {
- if (typeof module == "object" && typeof exports == "object" && module) {
+ ace.require(['ace/mode/gcsim'], function (m) {
+ if (typeof module == 'object' && typeof exports == 'object' && module) {
module.exports = m;
}
});
diff --git a/ui/packages/components/src/Editor/types.ts b/ui/packages/components/src/Editor/types.ts
index d78cdd3771..920e829d69 100644
--- a/ui/packages/components/src/Editor/types.ts
+++ b/ui/packages/components/src/Editor/types.ts
@@ -4,21 +4,22 @@ export interface EditorProps {
}
export interface AceEditorWrapperProps extends EditorProps {
+ maxLines?: number;
fontSize?: number;
theme?: Theme;
}
export const themes = [
- "monokai",
- "github",
- "tomorrow",
- "tomorrow_night",
- "kuroir",
- "twilight",
- "xcode",
- "textmate",
- "solarized_dark",
- "solarized_light",
- "terminal",
+ 'monokai',
+ 'github',
+ 'tomorrow',
+ 'tomorrow_night',
+ 'kuroir',
+ 'twilight',
+ 'xcode',
+ 'textmate',
+ 'solarized_dark',
+ 'solarized_light',
+ 'terminal',
];
export type Theme = (typeof themes)[number];
diff --git a/ui/packages/docs/docs/reference/characters/arlecchino.md b/ui/packages/docs/docs/reference/characters/arlecchino.md
new file mode 100644
index 0000000000..c573145065
--- /dev/null
+++ b/ui/packages/docs/docs/reference/characters/arlecchino.md
@@ -0,0 +1,44 @@
+---
+title: Arlecchino
+---
+
+import HitlagTable from "@site/src/components/Hitlag/HitlagTable";
+import FieldsTable from "@site/src/components/Fields/FieldsTable";
+import ParamsTable from "@site/src/components/Params/ParamsTable";
+import FramesTable from "@site/src/components/Frames/FramesTable";
+import IssuesTable from "@site/src/components/Issues/IssuesTable";
+import AoETable from "@site/src/components/AoE/AoETable";
+import NamesList from "@site/src/components/Names/NamesList";
+import ActionsTable from "@site/src/components/Actions/ActionsTable";
+
+## Frames
+
+
+
+## Hitlag Data
+
+
+
+## AoE Data
+
+
+
+## Known issues
+
+
+
+## Names
+
+
+
+## Legal Actions
+
+
+
+## Params
+
+
+
+## Fields
+
+
diff --git a/ui/packages/ui/src/util/mode-gcsim.js b/ui/packages/ui/src/util/mode-gcsim.js
index dc24f7a934..f4fa2ab14c 100644
--- a/ui/packages/ui/src/util/mode-gcsim.js
+++ b/ui/packages/ui/src/util/mode-gcsim.js
@@ -1,27 +1,27 @@
ace.define(
- "ace/mode/doc_comment_highlight_rules",
+ 'ace/mode/doc_comment_highlight_rules',
[
- "require",
- "exports",
- "module",
- "ace/lib/oop",
- "ace/mode/text_highlight_rules",
+ 'require',
+ 'exports',
+ 'module',
+ 'ace/lib/oop',
+ 'ace/mode/text_highlight_rules',
],
function (require, exports, module) {
- "use strict";
- var oop = require("../lib/oop");
+ 'use strict';
+ var oop = require('../lib/oop');
var TextHighlightRules =
- require("./text_highlight_rules").TextHighlightRules;
+ require('./text_highlight_rules').TextHighlightRules;
var DocCommentHighlightRules = function () {
this.$rules = {
start: [
{
- token: "comment.doc.tag",
- regex: "@\\w+(?=\\s|$)",
+ token: 'comment.doc.tag',
+ regex: '@\\w+(?=\\s|$)',
},
DocCommentHighlightRules.getTagRule(),
{
- defaultToken: "comment.doc",
+ defaultToken: 'comment.doc',
caseInsensitive: true,
},
],
@@ -30,44 +30,44 @@ ace.define(
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
DocCommentHighlightRules.getTagRule = function (start) {
return {
- token: "comment.doc.tag.storage.type",
- regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b",
+ token: 'comment.doc.tag.storage.type',
+ regex: '\\b(?:TODO|FIXME|XXX|HACK)\\b',
};
};
DocCommentHighlightRules.getStartRule = function (start) {
return {
- token: "comment.doc", // doc comment
- regex: "\\/\\*(?=\\*)",
+ token: 'comment.doc', // doc comment
+ regex: '\\/\\*(?=\\*)',
next: start,
};
};
DocCommentHighlightRules.getEndRule = function (start) {
return {
- token: "comment.doc", // closing comment
- regex: "\\*\\/",
+ token: 'comment.doc', // closing comment
+ regex: '\\*\\/',
next: start,
};
};
exports.DocCommentHighlightRules = DocCommentHighlightRules;
- }
+ },
);
ace.define(
- "ace/mode/gcsim_highlight_rules",
+ 'ace/mode/gcsim_highlight_rules',
[
- "require",
- "exports",
- "module",
- "ace/lib/oop",
- "ace/mode/doc_comment_highlight_rules",
- "ace/mode/text_highlight_rules",
+ 'require',
+ 'exports',
+ 'module',
+ 'ace/lib/oop',
+ 'ace/mode/doc_comment_highlight_rules',
+ 'ace/mode/text_highlight_rules',
],
function (require, exports, module) {
- var oop = require("../lib/oop");
+ var oop = require('../lib/oop');
var DocCommentHighlightRules =
- require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+ require('./doc_comment_highlight_rules').DocCommentHighlightRules;
var TextHighlightRules =
- require("./text_highlight_rules").TextHighlightRules;
+ require('./text_highlight_rules').TextHighlightRules;
var gcsimHighlightRules = function () {
// var builtinTypes =
// "string|uint8|uint16|uint32|uint64|int8|int16|int32|int64|float32|" +
@@ -76,158 +76,158 @@ ace.define(
// "new|close|cap|copy|panic|panicln|print|println|len|make|delete|real|recover|imag|append";
// var builtinConstants = "nil|true|false|iota";
var gcsimKeywords =
- "let|while|if|else|fn|switch|case|default|break|continue|fallthrough|return|for|" +
- "options|add|char|stats|weapon|set|lvl|refine|cons|talent|count|active|target|particle_threshold|particle_drop_count|resist|energy|hurt";
+ 'let|while|if|else|fn|switch|case|default|break|continue|fallthrough|return|for|' +
+ 'options|add|char|stats|weapon|set|lvl|refine|cons|talent|count|active|target|particle_threshold|particle_drop_count|resist|energy|hurt';
var gcsimAvatars =
- "traveleranemo|travelergeo|travelerelectro|travelerdendro|travelerhydro|travelerpyro|travelercryo|aether-anemo|lumine-anemo|aether-geo|lumine-geo|aether-electro|lumine-electro|aether-dendro|lumine-dendro|aether-hydro|lumine-hydro|aether-pyro|lumine-pyro|aether-cryo|lumine-cryo|aetheranemo|lumineanemo|aethergeo|luminegeo|aetherelectro|lumineelectro|aetherdendro|luminedendro|aetherhydro|luminehydro|aetherpyro|luminepyro|aethercryo|luminecryo|albedo|aloy|amber|barbara|barb|beidou|bennett|charlotte|chongyun|chong|cyno|diluc|diona|eula|fischl|fish|amy|ganyu|hutao|tao|ht|jean|kaedeharakazuha|kazuha|kaz|kaeya|kamisatoayaka|ayaka|kamisatoayato|ayato|keqing|keq|klee|kujousara|kujosara|sara|lisa|mona|ningguang|ning|noelle|qiqi|raidenshogun|raiden|herexcellencythealmightynarukamiogoshogodofthunder|razor|rosaria|rosa|sangonomiyakokomi|kokomi|koko|sayu|sucrose|tartaglia|childe|thoma|venti|xiangling|xl|xianyun|cloudretainer|liuyun|xiao|xingqiu|xq|xinyan|yanfei|yoimiya|yoi|yunjin|zhongli|zhong|zl|gorou|aratakiitto|itto|aratakitheoneandoniitto|shenhe|yae|yaemiko|yelan|kukishinobu|kuki|shikanoinheizou|heizou|tighnari|collei|dori|candace|nilou|kusanali|lesserlordkusanali|nahida|layla|faruzan|faru|wanderer|scaramouche|scara|kunikuzushi|kuni|kabukimono|alhaitham|haitham|baizhu|dehya|yaoyao|mika|kaveh|kirara|lyney|lynette|neuvillette|neuv|chiefjusticeoffontaine|freminet|furina|furinadefontaine|navia|demoiselle|wriothesley|wrio|chevreuse|chev|gaming|chiori";
+ 'traveleranemo|travelergeo|travelerelectro|travelerdendro|travelerhydro|travelerpyro|travelercryo|aether-anemo|lumine-anemo|aether-geo|lumine-geo|aether-electro|lumine-electro|aether-dendro|lumine-dendro|aether-hydro|lumine-hydro|aether-pyro|lumine-pyro|aether-cryo|lumine-cryo|aetheranemo|lumineanemo|aethergeo|luminegeo|aetherelectro|lumineelectro|aetherdendro|luminedendro|aetherhydro|luminehydro|aetherpyro|luminepyro|aethercryo|luminecryo|albedo|aloy|amber|barbara|barb|beidou|bennett|charlotte|chongyun|chong|cyno|diluc|diona|eula|fischl|fish|amy|ganyu|hutao|tao|ht|jean|kaedeharakazuha|kazuha|kaz|kaeya|kamisatoayaka|ayaka|kamisatoayato|ayato|keqing|keq|klee|kujousara|kujosara|sara|lisa|mona|ningguang|ning|noelle|qiqi|raidenshogun|raiden|herexcellencythealmightynarukamiogoshogodofthunder|razor|rosaria|rosa|sangonomiyakokomi|kokomi|koko|sayu|sucrose|tartaglia|childe|thoma|venti|xiangling|xl|xianyun|cloudretainer|liuyun|xiao|xingqiu|xq|xinyan|yanfei|yoimiya|yoi|yunjin|zhongli|zhong|zl|gorou|aratakiitto|itto|aratakitheoneandoniitto|shenhe|yae|yaemiko|yelan|kukishinobu|kuki|shikanoinheizou|heizou|tighnari|collei|dori|candace|nilou|kusanali|lesserlordkusanali|nahida|layla|faruzan|faru|wanderer|scaramouche|scara|kunikuzushi|kuni|kabukimono|alhaitham|haitham|baizhu|dehya|yaoyao|mika|kaveh|kirara|lyney|lynette|neuvillette|neuv|chiefjusticeoffontaine|freminet|furina|furinadefontaine|navia|demoiselle|wriothesley|wrio|chevreuse|chev|gaming|chiori|arlecchino|arle';
var gcsimAbilities =
- "attack|charge|aim|skill|burst|low_plunge|high_plunge|dash|jump|walk|swap";
- var gcsimStats = "hp(?:%)?|atk(?:%)?|def(?:%)?|er|em|cr|cd|heal|phys%";
+ 'attack|charge|aim|skill|burst|low_plunge|high_plunge|dash|jump|walk|swap';
+ var gcsimStats = 'hp(?:%)?|atk(?:%)?|def(?:%)?|er|em|cr|cd|heal|phys%';
var gcsimOthers =
- "interval|every|once|amount|electro(?:%)?|element|resist|pyro(?:%)?|dendro(?:%)?|hydro(?:%)?|geo(?:%)?|anemo(?:%)?|physical|cryo(?:%)?|start_hp(?:%)?|start_energy|pos|radius|freeze_resist";
+ 'interval|every|once|amount|electro(?:%)?|element|resist|pyro(?:%)?|dendro(?:%)?|hydro(?:%)?|geo(?:%)?|anemo(?:%)?|physical|cryo(?:%)?|start_hp(?:%)?|start_energy|pos|radius|freeze_resist';
var gcsimOptions =
- "iteration|duration|swap_delay|workers|hitlag|defhalt|ignore_burst_energy";
+ 'iteration|duration|swap_delay|workers|hitlag|defhalt|ignore_burst_energy';
var keywordMapper = this.createKeywordMapper(
{
keyword: gcsimKeywords,
// "constant.language": builtinConstants,
// "support.function": builtinFunctions,
// "support.type": builtinTypes,
- "support.function": gcsimAbilities,
- "support.class": gcsimOptions,
- "constant.language": gcsimAvatars,
+ 'support.function': gcsimAbilities,
+ 'support.class': gcsimOptions,
+ 'constant.language': gcsimAvatars,
},
- ""
+ '',
);
var stringEscapeRe =
- "\\\\(?:[0-7]{3}|x\\h{2}|u{4}|U\\h{6}|[abfnrtv'\"\\\\])".replace(
+ '\\\\(?:[0-7]{3}|x\\h{2}|u{4}|U\\h{6}|[abfnrtv\'"\\\\])'.replace(
/\\h/g,
- "[a-fA-F\\d]"
+ '[a-fA-F\\d]',
);
this.$rules = {
start: [
{
- token: "comment",
- regex: "\\/\\/.*$",
+ token: 'comment',
+ regex: '\\/\\/.*$',
},
{
- token: "comment",
- regex: "\\#.*$",
+ token: 'comment',
+ regex: '\\#.*$',
},
- DocCommentHighlightRules.getStartRule("doc-start"),
+ DocCommentHighlightRules.getStartRule('doc-start'),
{
- token: "comment.start", // multi line comment
- regex: "\\/\\*",
- next: "comment",
+ token: 'comment.start', // multi line comment
+ regex: '\\/\\*',
+ next: 'comment',
},
{
- token: "string", // single line
+ token: 'string', // single line
regex: /"(?:[^"\\]|\\.)*?"/,
},
{
- token: "string", // raw
- regex: "`",
- next: "bqstring",
+ token: 'string', // raw
+ regex: '`',
+ next: 'bqstring',
},
{
- token: "support.variable",
- regex: gcsimStats + "|" + gcsimOthers,
+ token: 'support.variable',
+ regex: gcsimStats + '|' + gcsimOthers,
},
{
- token: "constant.numeric", // rune
+ token: 'constant.numeric', // rune
regex:
"'(?:[^\\'\uD800-\uDBFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|" +
- stringEscapeRe.replace('"', "") +
+ stringEscapeRe.replace('"', '') +
")'",
},
{
- token: "constant.numeric", // hex
- regex: "0[xX][0-9a-fA-F]+\\b",
+ token: 'constant.numeric', // hex
+ regex: '0[xX][0-9a-fA-F]+\\b',
},
{
- token: "constant.numeric", // float
- regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b",
+ token: 'constant.numeric', // float
+ regex: '[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b',
},
{
- token: ["keyword", "text", "entity.name.function"],
- regex: "(func)(\\s+)([a-zA-Z_$][a-zA-Z0-9_$]*)\\b",
+ token: ['keyword', 'text', 'entity.name.function'],
+ regex: '(func)(\\s+)([a-zA-Z_$][a-zA-Z0-9_$]*)\\b',
},
{
token: function (val) {
- if (val[val.length - 1] == "(") {
+ if (val[val.length - 1] == '(') {
return [
{
- type: keywordMapper(val.slice(0, -1)) || "support.function",
+ type: keywordMapper(val.slice(0, -1)) || 'support.function',
value: val.slice(0, -1),
},
{
- type: "paren.lparen",
+ type: 'paren.lparen',
value: val.slice(-1),
},
];
}
- return keywordMapper(val) || "identifier";
+ return keywordMapper(val) || 'identifier';
},
- regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b\\(?",
+ regex: '[a-zA-Z_$][a-zA-Z0-9_$]*\\b\\(?',
},
{
- token: "keyword.operator",
+ token: 'keyword.operator',
regex:
- "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=",
+ '!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=',
},
{
- token: "punctuation.operator",
- regex: "\\?|\\:|\\,|\\;|\\.",
+ token: 'punctuation.operator',
+ regex: '\\?|\\:|\\,|\\;|\\.',
},
{
- token: "paren.lparen",
- regex: "[[({]",
+ token: 'paren.lparen',
+ regex: '[[({]',
},
{
- token: "paren.rparen",
- regex: "[\\])}]",
+ token: 'paren.rparen',
+ regex: '[\\])}]',
},
{
- token: "text",
- regex: "\\s+",
+ token: 'text',
+ regex: '\\s+',
},
],
comment: [
{
- token: "comment.end",
- regex: "\\*\\/",
- next: "start",
+ token: 'comment.end',
+ regex: '\\*\\/',
+ next: 'start',
},
{
- defaultToken: "comment",
+ defaultToken: 'comment',
},
],
bqstring: [
{
- token: "string",
- regex: "`",
- next: "start",
+ token: 'string',
+ regex: '`',
+ next: 'start',
},
{
- defaultToken: "string",
+ defaultToken: 'string',
},
],
};
- this.embedRules(DocCommentHighlightRules, "doc-", [
- DocCommentHighlightRules.getEndRule("start"),
+ this.embedRules(DocCommentHighlightRules, 'doc-', [
+ DocCommentHighlightRules.getEndRule('start'),
]);
};
oop.inherits(gcsimHighlightRules, TextHighlightRules);
exports.GolangHighlightRules = gcsimHighlightRules;
- }
+ },
);
ace.define(
- "ace/mode/matching_brace_outdent",
- ["require", "exports", "module", "ace/range"],
+ 'ace/mode/matching_brace_outdent',
+ ['require', 'exports', 'module', 'ace/range'],
function (require, exports, module) {
- "use strict";
- var Range = require("../range").Range;
+ 'use strict';
+ var Range = require('../range').Range;
var MatchingBraceOutdent = function () {};
(function () {
this.checkOutdent = function (line, input) {
@@ -252,37 +252,37 @@ ace.define(
};
}).call(MatchingBraceOutdent.prototype);
exports.MatchingBraceOutdent = MatchingBraceOutdent;
- }
+ },
);
ace.define(
- "ace/mode/folding/cstyle",
+ 'ace/mode/folding/cstyle',
[
- "require",
- "exports",
- "module",
- "ace/lib/oop",
- "ace/range",
- "ace/mode/folding/fold_mode",
+ 'require',
+ 'exports',
+ 'module',
+ 'ace/lib/oop',
+ 'ace/range',
+ 'ace/mode/folding/fold_mode',
],
function (require, exports, module) {
- "use strict";
- var oop = require("../../lib/oop");
- var Range = require("../../range").Range;
- var BaseFoldMode = require("./fold_mode").FoldMode;
+ 'use strict';
+ var oop = require('../../lib/oop');
+ var Range = require('../../range').Range;
+ var BaseFoldMode = require('./fold_mode').FoldMode;
var FoldMode = (exports.FoldMode = function (commentRegex) {
if (commentRegex) {
this.foldingStartMarker = new RegExp(
this.foldingStartMarker.source.replace(
/\|[^|]*?$/,
- "|" + commentRegex.start
- )
+ '|' + commentRegex.start,
+ ),
);
this.foldingStopMarker = new RegExp(
this.foldingStopMarker.source.replace(
/\|[^|]*?$/,
- "|" + commentRegex.end
- )
+ '|' + commentRegex.end,
+ ),
);
}
});
@@ -301,17 +301,17 @@ ace.define(
!this.startRegionRe.test(line) &&
!this.tripleStarBlockCommentRe.test(line)
)
- return "";
+ return '';
}
var fw = this._getFoldWidgetBase(session, foldStyle, row);
- if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart
+ if (!fw && this.startRegionRe.test(line)) return 'start'; // lineCommentRegionStart
return fw;
};
this.getFoldWidgetRange = function (
session,
foldStyle,
row,
- forceMultiline
+ forceMultiline,
) {
var line = session.getLine(row);
if (this.startRegionRe.test(line))
@@ -325,11 +325,11 @@ ace.define(
if (range && !range.isMultiLine()) {
if (forceMultiline) {
range = this.getSectionRange(session, row);
- } else if (foldStyle != "all") range = null;
+ } else if (foldStyle != 'all') range = null;
}
return range;
}
- if (foldStyle === "markbegin") return;
+ if (foldStyle === 'markbegin') return;
var match = line.match(this.foldingStopMarker);
if (match) {
var i = match.index + match[0].length;
@@ -351,7 +351,7 @@ ace.define(
var indent = line.search(/\S/);
if (indent === -1) continue;
if (startIndent > indent) break;
- var subRange = this.getFoldWidgetRange(session, "all", row);
+ var subRange = this.getFoldWidgetRange(session, 'all', row);
if (subRange) {
if (subRange.start.row <= startRow) {
break;
@@ -367,7 +367,7 @@ ace.define(
startRow,
startColumn,
endRow,
- session.getLine(endRow).length
+ session.getLine(endRow).length,
);
};
this.getCommentRegionBlock = function (session, line, row) {
@@ -390,29 +390,29 @@ ace.define(
}
};
}).call(FoldMode.prototype);
- }
+ },
);
ace.define(
- "ace/mode/gcsim",
+ 'ace/mode/gcsim',
[
- "require",
- "exports",
- "module",
- "ace/lib/oop",
- "ace/mode/text",
- "ace/mode/gcsim_highlight_rules",
- "ace/mode/matching_brace_outdent",
- "ace/mode/folding/cstyle",
+ 'require',
+ 'exports',
+ 'module',
+ 'ace/lib/oop',
+ 'ace/mode/text',
+ 'ace/mode/gcsim_highlight_rules',
+ 'ace/mode/matching_brace_outdent',
+ 'ace/mode/folding/cstyle',
],
function (require, exports, module) {
- var oop = require("../lib/oop");
- var TextMode = require("./text").Mode;
+ var oop = require('../lib/oop');
+ var TextMode = require('./text').Mode;
var gcsimHighlightRules =
- require("./gcsim_highlight_rules").GolangHighlightRules;
+ require('./gcsim_highlight_rules').GolangHighlightRules;
var MatchingBraceOutdent =
- require("./matching_brace_outdent").MatchingBraceOutdent;
- var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+ require('./matching_brace_outdent').MatchingBraceOutdent;
+ var CStyleFoldMode = require('./folding/cstyle').FoldMode;
var Mode = function () {
this.HighlightRules = gcsimHighlightRules;
this.$outdent = new MatchingBraceOutdent();
@@ -421,17 +421,17 @@ ace.define(
};
oop.inherits(Mode, TextMode);
(function () {
- this.lineCommentStart = "//";
- this.blockComment = { start: "/*", end: "*/" };
+ this.lineCommentStart = '//';
+ this.blockComment = {start: '/*', end: '*/'};
this.getNextLineIndent = function (state, line, tab) {
var indent = this.$getIndent(line);
var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
var tokens = tokenizedLine.tokens;
var endState = tokenizedLine.state;
- if (tokens.length && tokens[tokens.length - 1].type == "comment") {
+ if (tokens.length && tokens[tokens.length - 1].type == 'comment') {
return indent;
}
- if (state == "start") {
+ if (state == 'start') {
var match = line.match(/^.*[\{\(\[]\s*$/);
if (match) {
indent += tab;
@@ -445,14 +445,14 @@ ace.define(
this.autoOutdent = function (state, doc, row) {
this.$outdent.autoOutdent(doc, row);
};
- this.$id = "ace/mode/golang";
+ this.$id = 'ace/mode/golang';
}).call(Mode.prototype);
exports.Mode = Mode;
- }
+ },
);
(function () {
- ace.require(["ace/mode/gcsim"], function (m) {
- if (typeof module == "object" && typeof exports == "object" && module) {
+ ace.require(['ace/mode/gcsim'], function (m) {
+ if (typeof module == 'object' && typeof exports == 'object' && module) {
module.exports = m;
}
});