x-star-design 0.0.43 → 0.0.45
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.
|
@@ -10,7 +10,7 @@ import { syntaxTree } from '@codemirror/language';
|
|
|
10
10
|
import { linter } from '@codemirror/lint';
|
|
11
11
|
import CodeMirror from '@uiw/react-codemirror';
|
|
12
12
|
import classNames from 'classnames';
|
|
13
|
-
import React, { useMemo } from 'react';
|
|
13
|
+
import React, { useCallback, useMemo } from 'react';
|
|
14
14
|
import { prefix } from "../utils/global";
|
|
15
15
|
import { LangId, Language, Theme, langCompleteOptionsMap, themeMap } from "./define";
|
|
16
16
|
var CodeMirrorWrapper = function CodeMirrorWrapper(_ref) {
|
|
@@ -42,7 +42,7 @@ var CodeMirrorWrapper = function CodeMirrorWrapper(_ref) {
|
|
|
42
42
|
options: options
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
|
-
var regexpLinter =
|
|
45
|
+
var regexpLinter = useCallback(function () {
|
|
46
46
|
return linter(function (view) {
|
|
47
47
|
var diagnostics = [];
|
|
48
48
|
syntaxTree(view.state).cursor().iterate(function (node) {
|
|
@@ -70,24 +70,24 @@ var CodeMirrorWrapper = function CodeMirrorWrapper(_ref) {
|
|
|
70
70
|
override: [function (context) {
|
|
71
71
|
return langCompletions(context, Language.CPP);
|
|
72
72
|
}]
|
|
73
|
-
}), regexpLinter];
|
|
73
|
+
}), regexpLinter()];
|
|
74
74
|
case LangId.PY2:
|
|
75
75
|
case LangId.PY3:
|
|
76
76
|
return [python(), autocompletion({
|
|
77
77
|
override: [function (context) {
|
|
78
78
|
return langCompletions(context, Language.PYTHON);
|
|
79
79
|
}]
|
|
80
|
-
}), regexpLinter];
|
|
80
|
+
}), regexpLinter()];
|
|
81
81
|
case LangId.JAVA:
|
|
82
82
|
return [java(), autocompletion({
|
|
83
83
|
override: [function (context) {
|
|
84
84
|
return langCompletions(context, Language.JAVA);
|
|
85
85
|
}]
|
|
86
|
-
}), regexpLinter];
|
|
86
|
+
}), regexpLinter()];
|
|
87
87
|
default:
|
|
88
88
|
return [];
|
|
89
89
|
}
|
|
90
|
-
}, [lang
|
|
90
|
+
}, [lang]);
|
|
91
91
|
return /*#__PURE__*/React.createElement(CodeMirror, _extends({
|
|
92
92
|
className: classNames(className, "".concat(prefix, "-codeMirror")),
|
|
93
93
|
value: value,
|
package/dist/locales/en_US.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare const _default: {
|
|
|
13
13
|
readonly File_Output_Format: "File I/O Output File";
|
|
14
14
|
readonly File_Input_Output_Format_Tip: "Leave blank for no File I/O";
|
|
15
15
|
readonly Interactive_Library: "Interactive Function Library Filename";
|
|
16
|
-
readonly Interactive_Library_Tip: "Leave blank for no function library";
|
|
16
|
+
readonly Interactive_Library_Tip: "Fill in the compiled file name (without .cpp). Leave blank for no function library";
|
|
17
17
|
readonly Evaluation_Method: "Evaluation Method";
|
|
18
18
|
readonly Single_Point_Data_Testing: "Single point data test";
|
|
19
19
|
readonly SubTask: "SubTask";
|
package/dist/locales/en_US.js
CHANGED
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
File_Output_Format: 'File I/O Output File',
|
|
14
14
|
File_Input_Output_Format_Tip: 'Leave blank for no File I/O',
|
|
15
15
|
Interactive_Library: 'Interactive Function Library Filename',
|
|
16
|
-
Interactive_Library_Tip: 'Leave blank for no function library',
|
|
16
|
+
Interactive_Library_Tip: 'Fill in the compiled file name (without .cpp). Leave blank for no function library',
|
|
17
17
|
Evaluation_Method: 'Evaluation Method',
|
|
18
18
|
Single_Point_Data_Testing: 'Single point data test',
|
|
19
19
|
SubTask: 'SubTask',
|
package/dist/locales/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare const useLocale: <T extends "VisualDataConfig" | "TranslateButton
|
|
|
24
24
|
readonly File_Output_Format: "文件读写输出文件";
|
|
25
25
|
readonly File_Input_Output_Format_Tip: "不填表示不需要文件读写";
|
|
26
26
|
readonly Interactive_Library: "交互题函数库文件名";
|
|
27
|
-
readonly Interactive_Library_Tip: "
|
|
27
|
+
readonly Interactive_Library_Tip: "填写编译后的文件名(不要带.cpp),不填表示不使用函数库";
|
|
28
28
|
readonly Evaluation_Method: "测评方式";
|
|
29
29
|
readonly Single_Point_Data_Testing: "单点数据测试";
|
|
30
30
|
readonly SubTask: "子任务";
|
|
@@ -88,7 +88,7 @@ export declare const useLocale: <T extends "VisualDataConfig" | "TranslateButton
|
|
|
88
88
|
readonly File_Output_Format: "File I/O Output File";
|
|
89
89
|
readonly File_Input_Output_Format_Tip: "Leave blank for no File I/O";
|
|
90
90
|
readonly Interactive_Library: "Interactive Function Library Filename";
|
|
91
|
-
readonly Interactive_Library_Tip: "Leave blank for no function library";
|
|
91
|
+
readonly Interactive_Library_Tip: "Fill in the compiled file name (without .cpp). Leave blank for no function library";
|
|
92
92
|
readonly Evaluation_Method: "Evaluation Method";
|
|
93
93
|
readonly Single_Point_Data_Testing: "Single point data test";
|
|
94
94
|
readonly SubTask: "SubTask";
|
package/dist/locales/zh_CN.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare const _default: {
|
|
|
13
13
|
readonly File_Output_Format: "文件读写输出文件";
|
|
14
14
|
readonly File_Input_Output_Format_Tip: "不填表示不需要文件读写";
|
|
15
15
|
readonly Interactive_Library: "交互题函数库文件名";
|
|
16
|
-
readonly Interactive_Library_Tip: "
|
|
16
|
+
readonly Interactive_Library_Tip: "填写编译后的文件名(不要带.cpp),不填表示不使用函数库";
|
|
17
17
|
readonly Evaluation_Method: "测评方式";
|
|
18
18
|
readonly Single_Point_Data_Testing: "单点数据测试";
|
|
19
19
|
readonly SubTask: "子任务";
|
package/dist/locales/zh_CN.js
CHANGED
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
File_Output_Format: '文件读写输出文件',
|
|
14
14
|
File_Input_Output_Format_Tip: '不填表示不需要文件读写',
|
|
15
15
|
Interactive_Library: '交互题函数库文件名',
|
|
16
|
-
Interactive_Library_Tip: '
|
|
16
|
+
Interactive_Library_Tip: '填写编译后的文件名(不要带.cpp),不填表示不使用函数库',
|
|
17
17
|
Evaluation_Method: '测评方式',
|
|
18
18
|
Single_Point_Data_Testing: '单点数据测试',
|
|
19
19
|
SubTask: '子任务',
|