mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
w: upgrade deps
This commit is contained in:
1 parent
47499bdcd6
commit
0824487342
19 files changed
+132
-88
No files matched your search
@@ -220,7 +220,9 @@ export default function (env = {}) {
|
||||
customInterpolateName: beautifyOutputUrl,
|
||||
},
|
||||
}),
|
||||
new webpack.NormalModuleReplacementPlugin(/\/(vscode-)?nls\.js/, require.resolve('../../components/monaco/nls')),
|
||||
new MonacoWebpackPlugin({
|
||||
filename: '[name].[hash:10].worker.js',
|
||||
customLanguages: [{
|
||||
label: 'yaml',
|
||||
entry: require.resolve('@undefined-moe/monaco-yaml/lib/esm/monaco.contribution'),
|
||||
|
||||
@@ -23,7 +23,7 @@ export function registerAction(editor, model, element) {
|
||||
if (element) {
|
||||
editor.addAction({
|
||||
id: 'submit-form',
|
||||
label: 'Use light',
|
||||
label: 'Submit',
|
||||
keybindings: [
|
||||
monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter,
|
||||
monaco.KeyMod.WinCtrl | monaco.KeyCode.Enter,
|
||||
@@ -31,7 +31,7 @@ export function registerAction(editor, model, element) {
|
||||
run: () => $(element).closest('form').submit(),
|
||||
});
|
||||
}
|
||||
editor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyMod.Shift | monaco.KeyCode.KEY_P, () => {
|
||||
editor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyMod.Shift | monaco.KeyCode.KeyP, () => {
|
||||
editor.getAction('editor.action.quickCommand').run();
|
||||
});
|
||||
loadFormatter().then(([loaded, format]) => {
|
||||
@@ -41,7 +41,7 @@ export function registerAction(editor, model, element) {
|
||||
label: 'Format Code',
|
||||
contextMenuOrder: 0,
|
||||
contextMenuGroupId: 'operation',
|
||||
keybindings: [monaco.KeyMod.Alt | monaco.KeyMod.Shift | monaco.KeyCode.KEY_F],
|
||||
keybindings: [monaco.KeyMod.Alt | monaco.KeyMod.Shift | monaco.KeyCode.KeyF],
|
||||
run: () => {
|
||||
if (!['cpp', 'c'].includes(model._languageIdentifier.language)) return;
|
||||
const [success, result] = format(editor.getValue(), `${UserContext.astyleOptions.trim()} mode=c`);
|
||||
@@ -49,7 +49,7 @@ export function registerAction(editor, model, element) {
|
||||
else Notification.warn(result);
|
||||
},
|
||||
});
|
||||
editor.addCommand(monaco.KeyMod.Alt | monaco.KeyMod.Shift | monaco.KeyCode.KEY_F, () => {
|
||||
editor.addCommand(monaco.KeyMod.Alt | monaco.KeyMod.Shift | monaco.KeyCode.KeyF, () => {
|
||||
editor.getAction('hydro.format').run();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/* eslint-disable camelcase */
|
||||
import en_GB from 'monaco-editor-nls/locale/en-gb.json';
|
||||
import zh_CN from 'monaco-editor-nls/locale/zh-hans.json';
|
||||
import zh_TW from 'monaco-editor-nls/locale/zh-hant.json';
|
||||
import ko from 'monaco-editor-nls/locale/ko.json';
|
||||
import i18n from 'vj/utils/i18n';
|
||||
|
||||
function _format(message, args) {
|
||||
let result;
|
||||
if (args.length === 0) {
|
||||
result = message;
|
||||
} else {
|
||||
result = String(message).replace(/\{(\d+)\}/g, (match, rest) => {
|
||||
const index = rest[0];
|
||||
return typeof args[index] !== 'undefined' ? args[index] : match;
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
let CURRENT_LOCALE_DATA = {};
|
||||
|
||||
function find(path, message) {
|
||||
for (const key of Object.keys(CURRENT_LOCALE_DATA)) {
|
||||
if (!CURRENT_LOCALE_DATA[key]) continue;
|
||||
if (CURRENT_LOCALE_DATA[key][path] && en_GB[key][path] === message) {
|
||||
return CURRENT_LOCALE_DATA[key][path];
|
||||
}
|
||||
}
|
||||
for (const key of Object.keys(CURRENT_LOCALE_DATA)) {
|
||||
if (!CURRENT_LOCALE_DATA[key]) continue;
|
||||
if (CURRENT_LOCALE_DATA[key][path]) {
|
||||
return CURRENT_LOCALE_DATA[key][path];
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
export function localize(path, message, ...args) {
|
||||
return _format(find(path.key || path, message), args);
|
||||
}
|
||||
|
||||
export function setLocaleData(data) {
|
||||
CURRENT_LOCALE_DATA = data;
|
||||
}
|
||||
|
||||
export function loadMessageBundle(file) {
|
||||
return localize;
|
||||
}
|
||||
|
||||
export function config(opt) {
|
||||
return loadMessageBundle;
|
||||
}
|
||||
|
||||
const languages = {
|
||||
zh_CN,
|
||||
zh_TW,
|
||||
ko,
|
||||
};
|
||||
if (languages[i18n('timeago_locale')]) setLocaleData(languages[i18n('timeago_locale')]);
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.27.7",
|
||||
"version": "4.27.8",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
@@ -10,10 +10,10 @@
|
||||
"lint": "eslint ."
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blueprintjs/core": "^3.51.3",
|
||||
"@blueprintjs/core": "^3.52.0",
|
||||
"@blueprintjs/icons": "^3.31.0",
|
||||
"@hydrooj/utils": "workspace:*",
|
||||
"@types/jquery": "^3.5.9",
|
||||
"@types/jquery": "^3.5.10",
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"@types/katex": "^0.11.1",
|
||||
"@types/qrcode": "^1.4.1",
|
||||
@@ -31,8 +31,8 @@
|
||||
"echarts": "^5.2.2",
|
||||
"emojis-keywords": "2.0.0",
|
||||
"emojis-list": "2.1.0",
|
||||
"esbuild-loader": "^2.16.0",
|
||||
"eslint": "^8.3.0",
|
||||
"esbuild-loader": "^2.17.0",
|
||||
"eslint": "^8.4.1",
|
||||
"eslint-config-airbnb": "^18.2.1",
|
||||
"eslint-import-resolver-webpack": "^0.13.2",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
@@ -41,10 +41,10 @@
|
||||
"fancy-log": "^1.3.3",
|
||||
"file-loader": "^6.2.0",
|
||||
"friendly-errors-webpack-plugin": "^1.7.0",
|
||||
"graphiql": "^1.5.5",
|
||||
"graphiql": "^1.5.16",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-cli": "^2.3.0",
|
||||
"gulp-iconfont": "^11.0.0",
|
||||
"gulp-iconfont": "^11.0.1",
|
||||
"gulp-if": "^3.0.0",
|
||||
"gulp-plumber": "^1.2.1",
|
||||
"gulp-svgmin": "^3.0.0",
|
||||
@@ -54,8 +54,9 @@
|
||||
"jquery.transit": "^0.9.12",
|
||||
"mini-css-extract-plugin": "^1.6.2",
|
||||
"moment": "^2.29.1",
|
||||
"monaco-editor": "^0.29.1",
|
||||
"monaco-editor-webpack-plugin": "^4.2.0",
|
||||
"monaco-editor": "^0.31.1",
|
||||
"monaco-editor-nls": "^2.0.0",
|
||||
"monaco-editor-webpack-plugin": "^7.0.1",
|
||||
"nanoid": "^3.1.30",
|
||||
"normalize.css": "^8.0.1",
|
||||
"nprogress": "^0.2.0",
|
||||
@@ -74,7 +75,7 @@
|
||||
"redux": "^4.1.2",
|
||||
"redux-logger": "^3.0.6",
|
||||
"redux-promise-middleware": "^6.1.2",
|
||||
"redux-thunk": "^2.4.0",
|
||||
"redux-thunk": "^2.4.1",
|
||||
"rupture": "^0.7.1",
|
||||
"slideout": "^1.0.1",
|
||||
"sockjs-client": "^1.5.2",
|
||||
@@ -89,7 +90,7 @@
|
||||
"through2": "^4.0.2",
|
||||
"timeago-react": "^3.0.4",
|
||||
"timeago.js": "^4.0.2",
|
||||
"vditor": "^3.8.7",
|
||||
"vditor": "^3.8.8",
|
||||
"vinyl-buffer": "^1.0.1",
|
||||
"wastyle": "^0.0.5",
|
||||
"web-streams-polyfill": "^3.2.0",
|
||||
@@ -99,13 +100,13 @@
|
||||
"webpackbar": "^5.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"esbuild": "^0.13.15",
|
||||
"esbuild": "0.14.3",
|
||||
"fs-extra": "^10.0.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"jsesc": "^3.0.2",
|
||||
"katex": "^0.15.1",
|
||||
"lodash": "^4.17.21",
|
||||
"markdown-it": "^12.2.0",
|
||||
"markdown-it": "^12.3.0",
|
||||
"markdown-it-anchor": "^8.4.1",
|
||||
"markdown-it-footnote": "^3.0.3",
|
||||
"markdown-it-imsize": "^2.0.1",
|
||||
|
||||
Reference in new issue
Block a user