From 5c28c9b7ea4ac7c0b942f5606c57160311866967 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Wed, 15 Sep 2021 21:44:00 +0800 Subject: [PATCH] refactor: upgrade codemirror version. (#354) * refactor: upgrade codemirror version. * refactor: StaticStorage component. * refactor: upgrade codemirror version. * chore: add editorconfig file. * chore: update editorconfig. --- .editorconfig | 12 + package-lock.json | 489 +++++++++++++++--- package.json | 4 +- src/components/Codemirror/Codemirror.vue | 77 +++ src/styles/global.less | 11 - src/views/interface/ThemeEdit.vue | 173 +++---- .../system/developer/DeveloperOptions.vue | 98 ++-- .../system/developer/tabs/RuntimeLogs.vue | 39 +- .../system/developer/tabs/StaticStorage.vue | 165 +++--- vue.config.js | 3 + yarn.lock | 318 +++++++++++- 11 files changed, 1057 insertions(+), 332 deletions(-) create mode 100644 .editorconfig create mode 100644 src/components/Codemirror/Codemirror.vue diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..53fe0544 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = false +insert_final_newline = true \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index d66e39d8..f2f0b989 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3034,6 +3034,280 @@ "minimist": "^1.2.0" } }, + "@codemirror/autocomplete": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-0.19.3.tgz", + "integrity": "sha512-5juP6hVrHAogzQ0JUTQuibE8j1seqeGNJ98qLUPuliI6kLBg5INS4qvUI1Brqye+wYPFu7UHqrrn13RLh5YSzw==", + "requires": { + "@codemirror/language": "^0.19.0", + "@codemirror/state": "^0.19.0", + "@codemirror/text": "^0.19.2", + "@codemirror/tooltip": "^0.19.0", + "@codemirror/view": "^0.19.0", + "@lezer/common": "^0.15.0" + } + }, + "@codemirror/basic-setup": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@codemirror/basic-setup/-/basic-setup-0.19.0.tgz", + "integrity": "sha512-Yhrf7fIz8+INHWOhpWeRwbs8fpc0KsydX9baD7TyYqniLVWyTi0Hwm52mr0f5O+k4YaJPeHAgT3x9gzDXZIvOw==", + "requires": { + "@codemirror/autocomplete": "^0.19.0", + "@codemirror/closebrackets": "^0.19.0", + "@codemirror/commands": "^0.19.0", + "@codemirror/comment": "^0.19.0", + "@codemirror/fold": "^0.19.0", + "@codemirror/gutter": "^0.19.0", + "@codemirror/highlight": "^0.19.0", + "@codemirror/history": "^0.19.0", + "@codemirror/language": "^0.19.0", + "@codemirror/lint": "^0.19.0", + "@codemirror/matchbrackets": "^0.19.0", + "@codemirror/rectangular-selection": "^0.19.0", + "@codemirror/search": "^0.19.0", + "@codemirror/state": "^0.19.0", + "@codemirror/view": "^0.19.0" + } + }, + "@codemirror/closebrackets": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@codemirror/closebrackets/-/closebrackets-0.19.0.tgz", + "integrity": "sha512-dFWX5OEVYWRNtGaifSbwIAlymnRRjxWMiMbffbAjF7p0zfGHDbdGkiT56q3Xud63h5/tQdSo5dK1iyNTzHz5vg==", + "requires": { + "@codemirror/language": "^0.19.0", + "@codemirror/rangeset": "^0.19.0", + "@codemirror/state": "^0.19.0", + "@codemirror/text": "^0.19.0", + "@codemirror/view": "^0.19.0" + } + }, + "@codemirror/commands": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-0.19.4.tgz", + "integrity": "sha512-EW6ffAIdu7aGWWwEG4xRcKLR+1RXH7hJqMt5mbrxDSc2xAQBgqxIPFglcMeSkC7qqkwPuqv3xavVh1+0gQ0piQ==", + "requires": { + "@codemirror/language": "^0.19.0", + "@codemirror/matchbrackets": "^0.19.0", + "@codemirror/state": "^0.19.2", + "@codemirror/text": "^0.19.0", + "@codemirror/view": "^0.19.0", + "@lezer/common": "^0.15.0" + } + }, + "@codemirror/comment": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@codemirror/comment/-/comment-0.19.0.tgz", + "integrity": "sha512-3hqAd0548fxqOBm4khFMcXVIivX8p0bSlbAuZJ6PNoUn/0wXhxkxowPp0FmFzU2+y37Z+ZQF5cRB5EREWPRIiQ==", + "requires": { + "@codemirror/state": "^0.19.0", + "@codemirror/text": "^0.19.0", + "@codemirror/view": "^0.19.0" + } + }, + "@codemirror/fold": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@codemirror/fold/-/fold-0.19.0.tgz", + "integrity": "sha512-cHbr2hqKe2pMls1Ia1a4IwXly87ljpmvPUKkul6H/Uv9kCwpQLOP3dGMPXbMGm/1hGjBF/0wnc+m2iba9iJBTQ==", + "requires": { + "@codemirror/gutter": "^0.19.0", + "@codemirror/language": "^0.19.0", + "@codemirror/rangeset": "^0.19.0", + "@codemirror/state": "^0.19.0", + "@codemirror/view": "^0.19.0" + } + }, + "@codemirror/gutter": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@codemirror/gutter/-/gutter-0.19.2.tgz", + "integrity": "sha512-xiayxhc9uq1UXiG/r/E3AAYXZt+EtSdgdQXC4nlMHvbfw2EmtryfzGO3HrgasHRyAW8uNCaO9JO4n7mU7rm1rQ==", + "requires": { + "@codemirror/rangeset": "^0.19.0", + "@codemirror/state": "^0.19.0", + "@codemirror/view": "^0.19.0" + } + }, + "@codemirror/highlight": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@codemirror/highlight/-/highlight-0.19.4.tgz", + "integrity": "sha512-M7QfcEJWbC9aMX23UvLjqJlnwxVe9mGVPogSFujIQ4lC2Rocqalkx3NkmNDsNV8Q4RYTVB4+XiRPosq1tIY0Pw==", + "requires": { + "@codemirror/language": "^0.19.0", + "@codemirror/rangeset": "^0.19.0", + "@codemirror/state": "^0.19.0", + "@codemirror/view": "^0.19.0", + "@lezer/common": "^0.15.0", + "style-mod": "^4.0.0" + } + }, + "@codemirror/history": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@codemirror/history/-/history-0.19.0.tgz", + "integrity": "sha512-E0H+lncH66IMDhaND9jgkjE7s0dhYfjCPmS+Ig2Yes9I8+UIEecIdObj8c8HPCFGctGg3fxXqRAw2mdHl2Wouw==", + "requires": { + "@codemirror/state": "^0.19.0", + "@codemirror/view": "^0.19.0" + } + }, + "@codemirror/lang-css": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@codemirror/lang-css/-/lang-css-0.19.1.tgz", + "integrity": "sha512-Eo1B19MNtDPoAeGyExq4vQZ/T0uvRpZ5NzUfHJisNg0TrZ3/JiLlWNJFTT18bQborNOk36GdzL1Fj39+3gH2Lw==", + "requires": { + "@codemirror/autocomplete": "^0.19.0", + "@codemirror/highlight": "^0.19.0", + "@codemirror/language": "^0.19.0", + "@codemirror/state": "^0.19.0", + "@lezer/css": "^0.15.0" + } + }, + "@codemirror/lang-html": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-0.19.1.tgz", + "integrity": "sha512-kQwkplKggcNok6gEVpG7Qx4IDFrwEHd99YWVNiOiRzPF019iSDAUmSv5Eh47yZPjF1VXOnm5FSIzgszzkYdiow==", + "requires": { + "@codemirror/autocomplete": "^0.19.0", + "@codemirror/highlight": "^0.19.0", + "@codemirror/lang-css": "^0.19.0", + "@codemirror/lang-javascript": "^0.19.0", + "@codemirror/language": "^0.19.0", + "@codemirror/state": "^0.19.0", + "@lezer/common": "^0.15.0", + "@lezer/html": "^0.15.0" + } + }, + "@codemirror/lang-java": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@codemirror/lang-java/-/lang-java-0.19.1.tgz", + "integrity": "sha512-yA3kcW2GgY0mC2a9dE+uRxGxPWeykfE/GqEPk4TSmhuU4ndmyDgM5QQP7pgnYSZmv2vKoyf4x7NMg8AF7lKXHQ==", + "requires": { + "@codemirror/highlight": "^0.19.0", + "@codemirror/language": "^0.19.0", + "@lezer/java": "^0.15.0" + } + }, + "@codemirror/lang-javascript": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-0.19.1.tgz", + "integrity": "sha512-fFAP4nkfU36c14K8f6ytVYYeuX/2E7dJ+bD7UCZPWavXYjwdHAgDCJGH84MjhBSh0lMc908We80vyYg1j3MnRQ==", + "requires": { + "@codemirror/autocomplete": "^0.19.0", + "@codemirror/highlight": "^0.19.0", + "@codemirror/language": "^0.19.0", + "@codemirror/lint": "^0.19.0", + "@codemirror/state": "^0.19.0", + "@codemirror/view": "^0.19.0", + "@lezer/javascript": "^0.15.0" + } + }, + "@codemirror/language": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-0.19.3.tgz", + "integrity": "sha512-6vjkRYHRJg/z9wdAk75nU2fQwCJBsh2HpkIjKXIHfzISSgLt5qSDxVhPd8Uu8PD5WMmFFP8tX7I9kdIt873o0A==", + "requires": { + "@codemirror/state": "^0.19.0", + "@codemirror/text": "^0.19.0", + "@codemirror/view": "^0.19.0", + "@lezer/common": "^0.15.5", + "@lezer/lr": "^0.15.0" + } + }, + "@codemirror/lint": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-0.19.0.tgz", + "integrity": "sha512-XjCIVJi2cUNlppwz0eGu0F93uFKJq1t2fupBQlDMr3hLmIxIRWjhvy66+Pw/ziH98XA8meLEGQX29umBAvym4w==", + "requires": { + "@codemirror/panel": "^0.19.0", + "@codemirror/state": "^0.19.0", + "@codemirror/tooltip": "^0.19.0", + "@codemirror/view": "^0.19.0", + "crelt": "^1.0.5" + } + }, + "@codemirror/matchbrackets": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@codemirror/matchbrackets/-/matchbrackets-0.19.1.tgz", + "integrity": "sha512-jBEW2Uu3hWcrrkwkauaikCAE7s5liCwbccFa6rLK6DzwaynOqCKJGyDsbkfrhikofNRc1yh4V3vwUuxt2u4QbA==", + "requires": { + "@codemirror/language": "^0.19.0", + "@codemirror/state": "^0.19.0", + "@codemirror/view": "^0.19.0", + "@lezer/common": "^0.15.0" + } + }, + "@codemirror/panel": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@codemirror/panel/-/panel-0.19.0.tgz", + "integrity": "sha512-LJuu49xnuhaAztlhnLJQ57ddOirSyf8/lnl7twsQUG/05RkxodBZ9F7q8r5AOLqOkaQOy9WySEKX1Ur8lD9Q5w==", + "requires": { + "@codemirror/state": "^0.19.0", + "@codemirror/view": "^0.19.0" + } + }, + "@codemirror/rangeset": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@codemirror/rangeset/-/rangeset-0.19.1.tgz", + "integrity": "sha512-WaKTEw8JB/3QFlQzpdgRoklopcWvG8O/Xp+rxxOfFKYTaeaejpY/tjpyBBg+Ea65Ka3m7+pPp9d5j/oR2rd9NA==", + "requires": { + "@codemirror/state": "^0.19.0" + } + }, + "@codemirror/rectangular-selection": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@codemirror/rectangular-selection/-/rectangular-selection-0.19.0.tgz", + "integrity": "sha512-KdvoEweBgVsOcqdYFEinYGroS028pwUPkO3REzQC7Z/hT1KNqZUlyfoi6WBv3Gzp8b6l8NNA+rLnnYMSHlcGYA==", + "requires": { + "@codemirror/state": "^0.19.0", + "@codemirror/text": "^0.19.0", + "@codemirror/view": "^0.19.0" + } + }, + "@codemirror/search": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-0.19.1.tgz", + "integrity": "sha512-OBjaIvdFwiknmPoc/hFSistUN/hdumz7Wf0SyueL2tTIQ1MZDNnonC07+GEpiF6nTjcY6r+ifC0cf2X3o/FVqQ==", + "requires": { + "@codemirror/panel": "^0.19.0", + "@codemirror/rangeset": "^0.19.0", + "@codemirror/state": "^0.19.0", + "@codemirror/text": "^0.19.0", + "@codemirror/view": "^0.19.0", + "crelt": "^1.0.5" + } + }, + "@codemirror/state": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-0.19.2.tgz", + "integrity": "sha512-dDqCrtkb0c/LYUlvQBLyLfkISEskbZnhvBbcVOF4j2AusJ1ptJ3EGMxBL9G16GP1TOdC1T613gA1J1qc3pbfGQ==", + "requires": { + "@codemirror/text": "^0.19.0" + } + }, + "@codemirror/text": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@codemirror/text/-/text-0.19.3.tgz", + "integrity": "sha512-A0HBPZRwQ72XVMN1tg/pVUnvS5CKboBeHZE7cylYw0ljx9eX+NoYaK7apPSJO/Fwh9XhH9m8Va06EGc11VOzUw==" + }, + "@codemirror/tooltip": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@codemirror/tooltip/-/tooltip-0.19.2.tgz", + "integrity": "sha512-FMMGGLrr62Ck54NEz8yTGpgo8ihobAsC3sbeQg+OpY4jv9dt1yIP5B9LzsIV+TXQB57JZQZxtTqzkhnFq76haw==", + "requires": { + "@codemirror/state": "^0.19.0", + "@codemirror/view": "^0.19.0" + } + }, + "@codemirror/view": { + "version": "0.19.7", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-0.19.7.tgz", + "integrity": "sha512-m9AKO8gec/QnyxR1uq182It0WwauTIaHkdjqtdlKx1IRgknH44SKIJIxwxZt4Y6VDhhivcEbugjoadNy0zR3wQ==", + "requires": { + "@codemirror/rangeset": "^0.19.0", + "@codemirror/state": "^0.19.2", + "@codemirror/text": "^0.19.0", + "style-mod": "^4.0.0", + "w3c-keyname": "^2.2.4" + } + }, "@fullhuman/postcss-purgecss": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@fullhuman/postcss-purgecss/-/postcss-purgecss-2.3.0.tgz", @@ -3370,6 +3644,51 @@ "@types/yargs": "^13.0.0" } }, + "@lezer/common": { + "version": "0.15.5", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-0.15.5.tgz", + "integrity": "sha512-ufcjclusHXGdhp4gSPbPD7sUd38SgOej7m5tAEuG2tNPzqzV0d1vwwLh57R6IwW79ml2mb3tUjAoDfqI7v1HEw==" + }, + "@lezer/css": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/@lezer/css/-/css-0.15.1.tgz", + "integrity": "sha512-ywBytH6Tr12VFx88loNwObrN2uuDTWIgf4tNCHmTu4ClhfY0cYNcyTqxWx62f3XymTfjX4Ms4eimq17MpEVqqQ==", + "requires": { + "@lezer/lr": "^0.15.0" + } + }, + "@lezer/html": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@lezer/html/-/html-0.15.0.tgz", + "integrity": "sha512-ErmgP/Vv0AhYJvs/Ekb9oue4IzBHemKLi7K8tJ0jgS+20Y8FGC9foK6knCXtEHqdPaxVGQH9PVp7gecLnzLd9Q==", + "requires": { + "@lezer/lr": "^0.15.0" + } + }, + "@lezer/java": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@lezer/java/-/java-0.15.0.tgz", + "integrity": "sha512-Od2Ugo93XjLxCIEKlrwJfacmSMd7lEnkVQgBjMsZofjwEKZ2Y2ue6URntMFFiftTlNXbE29vYbweWYluEq+Cdw==", + "requires": { + "@lezer/lr": "^0.15.0" + } + }, + "@lezer/javascript": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-0.15.0.tgz", + "integrity": "sha512-euFjbbyYmxpBls9FyBAKnGLEjaMFqfHvhfueA7M1PitZdieHu8KSblutmcwjpWKIV4eH4uElMZO2cPVe0aFxXA==", + "requires": { + "@lezer/lr": "^0.15.0" + } + }, + "@lezer/lr": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-0.15.2.tgz", + "integrity": "sha512-gkQUkKCAw/zxOiTCGhjctV/C+FPmfwqXscM9EGgcYhUZewkLu2AsEl2Vlcral7xtDU0t6xwakT6Fw5jlMvMX6Q==", + "requires": { + "@lezer/common": "^0.15.0" + } + }, "@mrmlnc/readdir-enhanced": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", @@ -4586,23 +4905,6 @@ "ms": "2.1.2" } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -4633,38 +4935,6 @@ "ansi-regex": "^5.0.0" } }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.5.0", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.5.0.tgz", - "integrity": "sha512-WXh+7AgFxGTgb5QAkQtFeUcHNIEq3PGVQ8WskY5ZiFbWBkOwcCPRs4w/2tVyTbh2q6TVRlO3xfvIukUtjsu62A==", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - }, - "dependencies": { - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - } - } - }, "wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -5413,9 +5683,9 @@ "dev": true }, "axios": { - "version": "0.21.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.2.tgz", - "integrity": "sha512-87otirqUw3e8CzHTMO+/9kh/FSgXt/eVDvipijwDtEuwbkySWZ9SBm6VEubmJ/kLKEoLQV/POhxXFb66bfekfg==", + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "requires": { "follow-redirects": "^1.14.0" }, @@ -7387,11 +7657,6 @@ "q": "^1.1.2" } }, - "codemirror": { - "version": "5.55.0", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.55.0.tgz", - "integrity": "sha512-TumikSANlwiGkdF/Blnu/rqovZ0Y3Jh8yy9TqrPbSM0xxSucq3RgnpVDQ+mD9q6JERJEIT2FMuF/fBGfkhIR/g==" - }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -7919,6 +8184,11 @@ "sha.js": "^2.4.8" } }, + "crelt": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.5.tgz", + "integrity": "sha512-+BO9wPPi+DWTDcNYhr/W90myha8ptzftZT+LwcmUbbok0rcP/fequmFYCw8NMoH7pkAZQzU78b3kYrlua5a9eA==" + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -17179,6 +17449,11 @@ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, + "style-mod": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.0.0.tgz", + "integrity": "sha512-OPhtyEjyyN9x3nhPsu76f52yUGXiZcgvsrFVtvTkyGRQJ0XK+GPc6ov1z+lRpbeabka+MYEQxOYRnt5nF30aMw==" + }, "stylehacks": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz", @@ -18148,21 +18423,13 @@ "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==" }, "vue-clipboard2": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.2.tgz", - "integrity": "sha512-JUllOtw16qO0RF224eqN2kr9n21Xb7nCrbAehiJDTpX8eP00DKcdoYPbaT1dcs0vKou1D6hA42sJIte0Mm71IQ==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz", + "integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==", "requires": { "clipboard": "^2.0.0" } }, - "vue-codemirror-lite": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/vue-codemirror-lite/-/vue-codemirror-lite-1.0.4.tgz", - "integrity": "sha1-SKXNfRfAkUUDyM2dm1a0OOScNBA=", - "requires": { - "codemirror": "^5.22.0" - } - }, "vue-contextmenujs": { "version": "1.3.13", "resolved": "https://registry.npmjs.org/vue-contextmenujs/-/vue-contextmenujs-1.3.13.tgz", @@ -18279,6 +18546,87 @@ } } }, + "vue-loader-v16": { + "version": "npm:vue-loader@16.5.0", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.5.0.tgz", + "integrity": "sha512-WXh+7AgFxGTgb5QAkQtFeUcHNIEq3PGVQ8WskY5ZiFbWBkOwcCPRs4w/2tVyTbh2q6TVRlO3xfvIukUtjsu62A==", + "dev": true, + "optional": true, + "requires": { + "chalk": "^4.1.0", + "hash-sum": "^2.0.0", + "loader-utils": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "optional": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "optional": true + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "optional": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "vue-ls": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/vue-ls/-/vue-ls-3.2.2.tgz", @@ -18358,6 +18706,11 @@ "browser-process-hrtime": "^1.0.0" } }, + "w3c-keyname": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.4.tgz", + "integrity": "sha512-tOhfEwEzFLJzf6d1ZPkYfGj+FWhIpBux9ppoP3rlclw3Z0BZv3N7b7030Z1kYth+6rDuAsXUFr+d0VE6Ed1ikw==" + }, "w3c-xmlserializer": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.1.2.tgz", diff --git a/package.json b/package.json index daf93752..82bc370a 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,9 @@ "test:unit": "vue-cli-service test:unit" }, "dependencies": { + "@codemirror/basic-setup": "^0.19.0", + "@codemirror/lang-html": "^0.19.1", + "@codemirror/lang-java": "^0.19.1", "ant-design-vue": "^1.7.8", "axios": "^0.21.2", "dayjs": "^1.10.7", @@ -36,7 +39,6 @@ "verte": "^0.0.12", "vue": "^2.6.14", "vue-clipboard2": "^0.3.2", - "vue-codemirror-lite": "^1.0.4", "vue-contextmenujs": "^1.3.13", "vue-count-to": "^1.0.13", "vue-dplayer": "0.0.10", diff --git a/src/components/Codemirror/Codemirror.vue b/src/components/Codemirror/Codemirror.vue new file mode 100644 index 00000000..932bdf85 --- /dev/null +++ b/src/components/Codemirror/Codemirror.vue @@ -0,0 +1,77 @@ + + diff --git a/src/styles/global.less b/src/styles/global.less index 01a50b7a..2fcf0aca 100644 --- a/src/styles/global.less +++ b/src/styles/global.less @@ -802,17 +802,6 @@ body { } } -.vue-codemirror-wrap { - .CodeMirror { - height: 700px; - } - - .CodeMirror-gutters { - border-right: 1px solid #fff3f3; - background-color: #ffffff; - } -} - .select-attachment-checkbox { display: block; width: 100%; diff --git a/src/views/interface/ThemeEdit.vue b/src/views/interface/ThemeEdit.vue index d8ec2635..46375680 100644 --- a/src/views/interface/ThemeEdit.vue +++ b/src/views/interface/ThemeEdit.vue @@ -1,37 +1,36 @@