diff --git a/example/App.vue b/example/App.vue index f1210d1..1cc8e4d 100644 --- a/example/App.vue +++ b/example/App.vue @@ -170,10 +170,6 @@
-

Editor

-
- -
diff --git a/packages/Editor/types/editor.ts b/packages/Editor/types/editor.ts deleted file mode 100644 index e5df423..0000000 --- a/packages/Editor/types/editor.ts +++ /dev/null @@ -1,21 +0,0 @@ -export type Lang = 'json' | 'sql' - -export type Switch = 'on' | 'off' - -export type renderLineHighlight = 'none' | 'line' | 'gutter' | 'all' | undefined - -export type ScrollBarStatus = 'auto' | 'visible' | 'hidden' | undefined - -export interface CustomMonacoOption { - value: string - lang: Lang - fontSize: number - lineNumbers: Switch - renderLineHighlight: renderLineHighlight - scrollbarStatus: ScrollBarStatus - disabled: boolean - wordWrap: Switch - lineHeight: number -} - -export default {} diff --git a/packages/index.ts b/packages/index.ts index f961db5..c04555f 100644 --- a/packages/index.ts +++ b/packages/index.ts @@ -27,7 +27,6 @@ import BreadcrumbItem from './BreadcrumbItem' import Upload from './Upload' import Tags from './Tags' import KeyValueEditor from './KeyValueEditor' -import Editor from './Editor' import Loading from './Loading' import lang from 'element-plus/lib/locale/lang/zh-cn' @@ -68,7 +67,6 @@ const components = [ Upload, Tags, KeyValueEditor, - Editor, ] const plugins = [Loading] @@ -114,7 +112,6 @@ const packages = { Upload, Tags, KeyValueEditor, - Editor, } export const EmqxMessage = Message diff --git a/packages/style/components/editor.scss b/packages/style/components/editor.scss deleted file mode 100644 index 538e3d3..0000000 --- a/packages/style/components/editor.scss +++ /dev/null @@ -1,11 +0,0 @@ -.emqx-editor { - padding: 10px 0px; - border: 1px solid #d7dae1; - border-radius: 8px; -} - -.emqx-editor-view { - height: 100%; - width: 100%; - position: relative; -} diff --git a/packages/style/components/index.scss b/packages/style/components/index.scss index f17bfb9..2b1d748 100644 --- a/packages/style/components/index.scss +++ b/packages/style/components/index.scss @@ -6,7 +6,6 @@ @import "table.scss"; @import "upload.scss"; @import "card.scss"; -@import "editor.scss"; @import "header.scss"; @import "input.scss"; @import "menu-item.scss"; diff --git a/vue.config.js b/vue.config.js index 7d48f72..21e0340 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,6 +1,4 @@ // eslint-disable-next-line @typescript-eslint/no-var-requires -const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin') -// eslint-disable-next-line @typescript-eslint/no-var-requires const CopyPlugin = require('copy-webpack-plugin') let externals = [] @@ -32,13 +30,7 @@ module.exports = { }) }, configureWebpack: { - plugins: [ - new MonacoWebpackPlugin({ - output: 'static/', - languages: ['json', 'sql'], - }), - new CopyPlugin([{ from: 'packages/style', to: 'style' }]), - ], + plugins: [new CopyPlugin([{ from: 'packages/style', to: 'style' }])], externals: externals, }, } diff --git a/yarn.lock b/yarn.lock index 3eb548e..3d17e16 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1028,7 +1028,7 @@ dependencies: "@types/node" "*" -"@types/json-schema@^7.0.3", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6": +"@types/json-schema@^7.0.3", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5": version "7.0.7" resolved "https://registry.npm.taobao.org/@types/json-schema/download/@types/json-schema-7.0.7.tgz?cache=0&sync_timestamp=1613378919536&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fjson-schema%2Fdownload%2F%40types%2Fjson-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" integrity sha1-mKmTUWyFnrDVxMjwmDF6nqaNua0= @@ -1775,7 +1775,7 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: resolved "https://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-3.5.2.tgz?cache=0&sync_timestamp=1615647295573&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv-keywords%2Fdownload%2Fajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha1-MfKdpatuANHC0yms97WSlhTVAU0= -ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.3, ajv@^6.12.4: version "6.12.6" resolved "https://registry.npm.taobao.org/ajv/download/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha1-uvWmLoArB9l3A0WG+MO69a3ybfQ= @@ -2998,7 +2998,7 @@ copy-descriptor@^0.1.0: resolved "https://registry.npm.taobao.org/copy-descriptor/download/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -copy-webpack-plugin@^5.1.1: +copy-webpack-plugin@5.1.2, copy-webpack-plugin@^5.1.1: version "5.1.2" resolved "https://registry.npm.taobao.org/copy-webpack-plugin/download/copy-webpack-plugin-5.1.2.tgz?cache=0&sync_timestamp=1614873498657&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcopy-webpack-plugin%2Fdownload%2Fcopy-webpack-plugin-5.1.2.tgz#8a889e1dcafa6c91c6cd4be1ad158f1d3823bae2" integrity sha1-ioieHcr6bJHGzUvhrRWPHTgjuuI= @@ -3016,19 +3016,6 @@ copy-webpack-plugin@^5.1.1: serialize-javascript "^4.0.0" webpack-log "^2.0.0" -copy-webpack-plugin@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-8.1.0.tgz#0b53170db798ed301439536a02f2868ff63291a0" - integrity sha512-Soiq8kXI2AZkpw3dSp18u6oU2JonC7UKv3UdXsKOmT1A5QT46ku9+6c0Qy29JDbSavQJNN1/eKGpd3QNw+cZWg== - dependencies: - fast-glob "^3.2.5" - glob-parent "^5.1.1" - globby "^11.0.3" - normalize-path "^3.0.0" - p-limit "^3.1.0" - schema-utils "^3.0.0" - serialize-javascript "^5.0.1" - core-js-compat@^3.6.5, core-js-compat@^3.8.1, core-js-compat@^3.9.0: version "3.9.1" resolved "https://registry.npm.taobao.org/core-js-compat/download/core-js-compat-3.9.1.tgz#4e572acfe90aff69d76d8c37759d21a5c59bb455" @@ -4195,7 +4182,7 @@ fast-glob@^2.2.6: merge2 "^1.2.3" micromatch "^3.1.10" -fast-glob@^3.0.3, fast-glob@^3.1.1, fast-glob@^3.2.5: +fast-glob@^3.0.3: version "3.2.5" resolved "https://registry.npm.taobao.org/fast-glob/download/fast-glob-3.2.5.tgz?cache=0&sync_timestamp=1610876645039&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-glob%2Fdownload%2Ffast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661" integrity sha1-eTmvKmVt55pPGQGQPuityqfLlmE= @@ -4645,7 +4632,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@^5.1.1, glob-parent@~5.1.0: +glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0: version "5.1.2" resolved "https://registry.npm.taobao.org/glob-parent/download/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha1-hpgyxYA0/mikCTwX3BXoNA2EAcQ= @@ -4695,18 +4682,6 @@ globby@^10.0.1: merge2 "^1.2.3" slash "^3.0.0" -globby@^11.0.3: - version "11.0.3" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" - integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.1.1" - ignore "^5.1.4" - merge2 "^1.3.0" - slash "^3.0.0" - globby@^6.1.0: version "6.1.0" resolved "https://registry.npm.taobao.org/globby/download/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" @@ -5128,7 +5103,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.npm.taobao.org/ignore/download/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw= -ignore@^5.1.1, ignore@^5.1.4: +ignore@^5.1.1: version "5.1.8" resolved "https://registry.npm.taobao.org/ignore/download/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha1-8VCotQo0KJsz4i9YiavU2AFvDlc= @@ -6400,18 +6375,6 @@ mixin-deep@^1.2.0: dependencies: minimist "^1.2.5" -monaco-editor-webpack-plugin@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/monaco-editor-webpack-plugin/-/monaco-editor-webpack-plugin-3.0.1.tgz#b9bf93314eb2708907c232cfbf359622e7a6d98a" - integrity sha512-Hym4HqWgIpyoi9G0spln/b/7rkDKfYwIOrNzo1fHHMc+MLYSwD1JXHwKSDS77X27ZHfVJsEXbMZYdGhSYuVF0w== - dependencies: - loader-utils "^2.0.0" - -monaco-editor@^0.23.0: - version "0.23.0" - resolved "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.23.0.tgz#24844ba5640c7adb3a2a3ff3b520cf2d7170a6f0" - integrity sha512-q+CP5zMR/aFiMTE9QlIavGyGicKnG2v/H8qVvybLzeFsARM8f6G9fL0sMST2tyVYCwDKkGamZUI6647A0jR/Lg== - move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" @@ -6934,13 +6897,6 @@ p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.1, p-limit@^2.3.0: dependencies: p-try "^2.0.0" -p-limit@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - p-locate@^3.0.0: version "3.0.0" resolved "https://registry.npm.taobao.org/p-locate/download/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -8148,8 +8104,8 @@ rimraf@2.6.3: rimraf@^3.0.0: version "3.0.2" - resolved "https://registry.npm.taobao.org/rimraf/download/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho= + resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" @@ -8262,15 +8218,6 @@ schema-utils@^2.0.0, schema-utils@^2.5.0, schema-utils@^2.6.1, schema-utils@^2.6 ajv "^6.12.4" ajv-keywords "^3.5.2" -schema-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.0.0.tgz#67502f6aa2b66a2d4032b4279a2944978a0913ef" - integrity sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA== - dependencies: - "@types/json-schema" "^7.0.6" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - scss-tokenizer@^0.2.3: version "0.2.3" resolved "https://registry.npm.taobao.org/scss-tokenizer/download/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1" @@ -8349,13 +8296,6 @@ serialize-javascript@^4.0.0: dependencies: randombytes "^2.1.0" -serialize-javascript@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" - integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== - dependencies: - randombytes "^2.1.0" - serve-index@^1.9.1: version "1.9.1" resolved "https://registry.npm.taobao.org/serve-index/download/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" @@ -9957,11 +9897,6 @@ yargs@^16.0.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - yorkie@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/yorkie/download/yorkie-2.0.0.tgz#92411912d435214e12c51c2ae1093e54b6bb83d9"