diff --git a/client/components/codeEditor/codeEditor.jsx b/client/components/codeEditor/codeEditor.jsx index f6c2014c6..137a12deb 100644 --- a/client/components/codeEditor/codeEditor.jsx +++ b/client/components/codeEditor/codeEditor.jsx @@ -16,6 +16,25 @@ import { markdown, markdownLanguage } from "@codemirror/lang-markdown"; import { languages } from "@codemirror/language-data"; import { css } from "@codemirror/lang-css"; import { basicLightHighlightStyle } from "cm6-theme-basic-light"; + +// themes + +import * as themes from "@uiw/codemirror-themes-all"; + +const themeList = Object.entries(themes) + .filter(([name, value]) => Array.isArray(value) && !name.endsWith("Init") && !name.endsWith("Style")) + .map(([name, theme]) => ({ + name, + theme, + })); +console.log(themeList); + +import { Compartment } from "@codemirror/state"; + +const themeCompartment = new Compartment(); + +// custom highlighting + import { HighlightStyle } from "@codemirror/language"; import { syntaxHighlighting } from "@codemirror/language"; @@ -111,7 +130,6 @@ const CodeEditor = forwardRef( const docsRef = useRef({}); const prevTabRef = useRef(tab); - // --- init editor --- const createExtensions = ({ onChange, language, editorTheme }) => { const updateListener = EditorView.updateListener.of((update) => { @@ -154,7 +172,7 @@ const CodeEditor = forwardRef( const languageExtension = language === "css" ? css() : markdown({ base: markdownLanguage, codeLanguages: languages }); - const themeExtension = syntaxHighlighting(basicLightHighlightStyle); + const themeExtension = Array.isArray(themes[editorTheme]) ? themes[editorTheme] : []; return [ history(), @@ -169,7 +187,9 @@ const CodeEditor = forwardRef( keymap.of(foldKeymap), foldGutter(), lineNumbers(), - themeExtension, + + themeCompartment.of(themeExtension), // 👈 key line + syntaxHighlighting(highlightStyle), customHighlightPlugin, syntaxHighlighting(customHighlightStyle), @@ -232,7 +252,19 @@ const CodeEditor = forwardRef( }); } }, [value]); - // --- exposed API --- + + useEffect(() => { //rebuild theme extension on theme change + const view = viewRef.current; + if (!view) return; + + const themeExtension = Array.isArray(themes[editorTheme]) ? themes[editorTheme] : []; + + view.dispatch({ + effects: themeCompartment.reconfigure(themeExtension), + }); + }, [editorTheme]); + + useImperativeHandle(ref, () => ({ getValue: () => viewRef.current.state.doc.toString(), diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx index 304664ff5..2ecab8834 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.jsx +++ b/client/homebrew/editor/snippetbar/snippetbar.jsx @@ -23,7 +23,16 @@ const ThemeSnippets = { V3_Blank : V3_Blank, }; -import EditorThemes from '../../../../build/homebrew/codeMirror/editorThemes.json'; +//import EditorThemes from '../../../../build/homebrew/codeMirror/editorThemes.json'; +import * as themes from '@uiw/codemirror-themes-all'; + +const EditorThemes = Object.entries(themes) + .filter(([name, value]) => + Array.isArray(value) && + !name.endsWith('Init') && + !name.endsWith('Style') + ) + .map(([name]) => name); const execute = function(val, props){ if(_.isFunction(val)) return val(props); diff --git a/package-lock.json b/package-lock.json index 8e92d7ce8..6d8207510 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "@googleapis/drive": "^20.1.0", "@lezer/highlight": "^1.2.3", "@sanity/diff-match-patch": "^3.2.0", + "@uiw/codemirror-themes-all": "^4.25.8", "@vitejs/plugin-react": "^5.1.2", "body-parser": "^2.2.0", "classnames": "^2.5.1", @@ -4890,6 +4891,489 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@uiw/codemirror-theme-abcdef": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-abcdef/-/codemirror-theme-abcdef-4.25.8.tgz", + "integrity": "sha512-oT9Ho+X4Ty2qlpYEc7YjHps2rwqvU2FnhZxngbk2uY/P/83kTS1QNq1DygRgxfp1g2aer7ZQk1pguzDS8GSXtA==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-abyss": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-abyss/-/codemirror-theme-abyss-4.25.8.tgz", + "integrity": "sha512-CXjPQxSv2rnG778B0S9WbTsxelxvrdRqe54Kbl+Y7U725KCu8TUm/toGSvq8YaV5uzoEcOU8NBCcQBZQKu+EZg==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-androidstudio": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-androidstudio/-/codemirror-theme-androidstudio-4.25.8.tgz", + "integrity": "sha512-dKSvP0eF29/7WbIT6vC8Jg625a1+ktUBmDZWQ5HsVhgAk3Jlv3hekKsE4raXH0Hy1Gr+Djz36TGVS7fl/pl+1g==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-andromeda": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-andromeda/-/codemirror-theme-andromeda-4.25.8.tgz", + "integrity": "sha512-qzp0c7+PzaNqtKskvcplkNxNKtB9nRtDTy8kpaKKjcrj6fMpj0hu0yfUxPXhnZCKBwQjtszuCxAcxkuNTkDsFQ==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-atomone": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-atomone/-/codemirror-theme-atomone-4.25.8.tgz", + "integrity": "sha512-gt3uSsI9KWYRku5rMz6opUOtH73A12jX/T9/C70rf7z5jclP5I2OWU1uGzMzE+Zf9gDou6F/HVJqQmVMcD2fKQ==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-aura": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-aura/-/codemirror-theme-aura-4.25.8.tgz", + "integrity": "sha512-FwY++XuhQU/sKZN1AKxDvu44JM0dEBSxUIvR1Wr5p8MpNY0ctHC9Y3yb1pEM4Dysmf98zTVg7wajafHhg6HXZg==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-basic": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-basic/-/codemirror-theme-basic-4.25.8.tgz", + "integrity": "sha512-EvY7I9RoT8HL1IynuL/nndPmCBcrciq3P0RdBabA9fsKJ8ThviJSWxlYY2NziYs0prlEZdorfC8KHfyfWSu/LQ==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-bbedit": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-bbedit/-/codemirror-theme-bbedit-4.25.8.tgz", + "integrity": "sha512-uzU7tiMGtf3j7IjMdNRq7Ewi3SBOG8wM5EILE9CHs2CLpitOxlJMxWUOg59folxVS2Vvnd783CqsBXOEeUpZ9A==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-bespin": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-bespin/-/codemirror-theme-bespin-4.25.8.tgz", + "integrity": "sha512-SHAR/qWYxA6MQYytje8Y9t5Fdp/7o3VA+FFvqoKbqTlZArtS8MelVayri5/zCvpdwet2igl+LvbQZ/zK9jlsTA==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-console": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-console/-/codemirror-theme-console-4.25.8.tgz", + "integrity": "sha512-zypacwtTAAax6QMst+c2BKtQsj6/+or+8lCmxCWcUMAgD2XXwXZlca0jLfCWwg/2jC26sxMRentPYul5/zQL1w==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + } + }, + "node_modules/@uiw/codemirror-theme-copilot": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-copilot/-/codemirror-theme-copilot-4.25.8.tgz", + "integrity": "sha512-gjszhGBwaecw9fNcqIL5hrEQgpQdfEHdu8MU4VIjg6VGnribdeZYMrqs4DiZj1I0e7dNzlb+4AopLzw5RtmJyA==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-darcula": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-darcula/-/codemirror-theme-darcula-4.25.8.tgz", + "integrity": "sha512-oggD67Ag2k4HULP5Hr3GBfoW3KaCprrOgU2TkC3qfLiwRyBdxZ4/8EFPHJFNSiPA5OBPugRn0q1/0eHOf9aDNw==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-dracula": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-dracula/-/codemirror-theme-dracula-4.25.8.tgz", + "integrity": "sha512-1AZSkk6FE+bt/6elp4cm02/yxYyZAxPJ6zk9ZC1P68/g4Haf4vWUuuL1xqOHroI1HlSvrM7cmlnxQFYS+JavEg==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-duotone": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-duotone/-/codemirror-theme-duotone-4.25.8.tgz", + "integrity": "sha512-f6CkWEil087ocEDlnCjSoOIAVsOF7bAMQRWhVBqE51iAD4DbuAxKzHkvEa58i8PrQPohPHUfUS9yTi0n4DY1WQ==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-eclipse": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-eclipse/-/codemirror-theme-eclipse-4.25.8.tgz", + "integrity": "sha512-Un6yA6uJ46Y7MKdTtOkekJsMYCjzK3v7EI/+FDvTgIU9bvil9ZIcuGicP+mKioHyfztyx5TBx3HrbhoC7ybkdQ==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-github": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-github/-/codemirror-theme-github-4.25.8.tgz", + "integrity": "sha512-kTZsf2PmOCHBuudB50BX1kAODmErzks6lxxhbHj76KQ+p4eizu0giowV1LoyY/FCLLqRjIe77tE31hvo8agasg==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-gruvbox-dark": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-gruvbox-dark/-/codemirror-theme-gruvbox-dark-4.25.8.tgz", + "integrity": "sha512-vo3rbo0R1niTg0BumjG6/vYYyxcpLORmcfqHaA2jj3XFvIZEz6xMQyLFsW1iGzU9kUevIEGvWw2CKebwa0UeDA==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-kimbie": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-kimbie/-/codemirror-theme-kimbie-4.25.8.tgz", + "integrity": "sha512-Zy4DSIgDEyW/ctfmnJT6DJ+GPF16a30x4k2i3NaItUuuzA4S64kYlRcekptLUgjRijOFYMZD6IlhrTTM+wRDmA==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-material": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-material/-/codemirror-theme-material-4.25.8.tgz", + "integrity": "sha512-VlSkd2ZgQ9YXkW0x3fPssyngrPVhy6XAx84wWO55yU/VQHGIHxTr1/0gF2eEcKOy4M/7aQ4EtYzAVVJlSvrUoA==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-monokai": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-monokai/-/codemirror-theme-monokai-4.25.8.tgz", + "integrity": "sha512-Y+Vfa23rj95f6iuD4IGYQuSwjdhqVtfw3vGWHX2bcS7/h/m/GdCsdtmMVwuMy+uCwTJAmOdMxPJh8a5E1f6UaQ==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-monokai-dimmed": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-monokai-dimmed/-/codemirror-theme-monokai-dimmed-4.25.8.tgz", + "integrity": "sha512-wTRj/OKnULUhjYMvf/HGfuOA1DDBpLIh+vjBP+/SN/3ZCElKgy2AqVXw86D2JYrb3MeEwIITL2s5CovnZfpjaA==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-noctis-lilac": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-noctis-lilac/-/codemirror-theme-noctis-lilac-4.25.8.tgz", + "integrity": "sha512-ry0yLvGtDrmctDCrq3Dqwk55bBKLEf1ZUcNjxK8M5HKfkCBga18z5n6cQfqizpoEHaM9uvwzaN+7VhJeXOHyZQ==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-nord": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-nord/-/codemirror-theme-nord-4.25.8.tgz", + "integrity": "sha512-acHLqao6dT+4xtTUH1YzdUx1NjNsvNSSYYxrB/S5MaCrmFDRSRqWCjXpFdhR0EEidghm9GzQGyzBhIT+99kuMA==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-okaidia": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-okaidia/-/codemirror-theme-okaidia-4.25.8.tgz", + "integrity": "sha512-zk1kJ+oRLXBPv6sipQz7ILaQc4LLEvRMUCeBynF1RRubcA2/BTKjKE/++QikSLw4ckmniBCqKSv62PcSZWiThQ==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-quietlight": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-quietlight/-/codemirror-theme-quietlight-4.25.8.tgz", + "integrity": "sha512-exClw88eGUgTta8rLRlIJA4sjS6VoHKi1yFsIhqOXMrfgFhMtxNvZdIYPzePv+JsGizRJF/8d8KMMCmBl7i6ag==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-red": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-red/-/codemirror-theme-red-4.25.8.tgz", + "integrity": "sha512-dVhxhR+QO//soEVrVrSnK2OSy/7pxu/P77LFLe1/PwWNmFM3u/OHfPmc4NTo2B/xManT0AhIcO47/SRcCcjHRA==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-solarized": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-solarized/-/codemirror-theme-solarized-4.25.8.tgz", + "integrity": "sha512-/KWcpUx+hXaiWGWCSzpFQiwZ0gXNKTI009t9/uEYmlPJnh0Mc8GZA6rgJH/8xuvqCaf20hGEZaoJr2l36PO0JA==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-sublime": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-sublime/-/codemirror-theme-sublime-4.25.8.tgz", + "integrity": "sha512-OGExIcxt3gYGlPvaXx0DhgVdEFz8nJgMqeVBYJMcB4BlqrYQb+okLyraWoohBvxWf+vj1YbUvyFJi/DDEkIlPQ==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-tokyo-night": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-tokyo-night/-/codemirror-theme-tokyo-night-4.25.8.tgz", + "integrity": "sha512-jADC+TOj8FOSkvqPpw8CYa0IP07WWf12ASg1vtirC74iKcwhZE4a0XzvRnYAKHhxAzpCmw4vivLGK/KJT/as5A==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-tokyo-night-day": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-tokyo-night-day/-/codemirror-theme-tokyo-night-day-4.25.8.tgz", + "integrity": "sha512-FuNoKoF1DNxoWjLObXD51d30Zb+5c8Ki4Av0RtL7SxgGqbIklGmM9UGVqz0PTE+N7EAQOL/W+HQpyunclMtKCQ==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-tokyo-night-storm": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-tokyo-night-storm/-/codemirror-theme-tokyo-night-storm-4.25.8.tgz", + "integrity": "sha512-ktBsbSiJI+Lyy/LV5PupNud82A/LU22aTu00QaV8L2cKfv8Expe45UwS4d+O5ijhAZZPLMgnNkkDEinSslA57Q==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-tomorrow-night-blue": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-tomorrow-night-blue/-/codemirror-theme-tomorrow-night-blue-4.25.8.tgz", + "integrity": "sha512-qMfgfz7bdZsFqR8Xj905kkKEzqxrMBgyJgpBlhs57Cix84N1bN6GdhRcbqlnJJxwFBmB/uFtC+lyiPysqlIUfA==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-vscode": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-vscode/-/codemirror-theme-vscode-4.25.8.tgz", + "integrity": "sha512-J4fNBFBQK1R1VV4nY+gJ4RRzGDUufe3JDtbeZVehjx34OAbqux8GsD08CTMQReyxJr5DHXcQ/eszQKbESP1J6Q==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-white": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-white/-/codemirror-theme-white-4.25.8.tgz", + "integrity": "sha512-BzECjiT18zY1bqdjOmXE9dTHLfZfVJeQ0DHdN/MhV/GU9n6kHv6qh5zB84uBfYtVTcDRBTw8vNiBwH7NYWuzGg==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-theme-xcode": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-xcode/-/codemirror-theme-xcode-4.25.8.tgz", + "integrity": "sha512-x8qlXckT4ZcvSEkxpqwjgu87ZnNBkAGoap03pMNTz/cnRcNY6ZulCXGz7ZQejTOuiWowjmCwjkIGTpEbDj2rzA==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, + "node_modules/@uiw/codemirror-themes": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-themes/-/codemirror-themes-4.25.8.tgz", + "integrity": "sha512-U6ZSO9A+nsN8zvNddtwhxxpi33J9okb4Li9HdhAItApKjYM22IgC8XSpGfs+ABGfsp1u6NhDSfBR9vAh3oTWXg==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + }, + "peerDependencies": { + "@codemirror/language": ">=6.0.0", + "@codemirror/state": ">=6.0.0", + "@codemirror/view": ">=6.0.0" + } + }, + "node_modules/@uiw/codemirror-themes-all": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-themes-all/-/codemirror-themes-all-4.25.8.tgz", + "integrity": "sha512-YacF3Wxkj/T9m8hNjlUfhGK9OzaRsn4wK7G18F5j9HEK02oCw2EnPWxmsrqBY2USounUmYU05OAYtFz1vwrBFw==", + "license": "MIT", + "dependencies": { + "@uiw/codemirror-theme-abcdef": "4.25.8", + "@uiw/codemirror-theme-abyss": "4.25.8", + "@uiw/codemirror-theme-androidstudio": "4.25.8", + "@uiw/codemirror-theme-andromeda": "4.25.8", + "@uiw/codemirror-theme-atomone": "4.25.8", + "@uiw/codemirror-theme-aura": "4.25.8", + "@uiw/codemirror-theme-basic": "4.25.8", + "@uiw/codemirror-theme-bbedit": "4.25.8", + "@uiw/codemirror-theme-bespin": "4.25.8", + "@uiw/codemirror-theme-console": "4.25.8", + "@uiw/codemirror-theme-copilot": "4.25.8", + "@uiw/codemirror-theme-darcula": "4.25.8", + "@uiw/codemirror-theme-dracula": "4.25.8", + "@uiw/codemirror-theme-duotone": "4.25.8", + "@uiw/codemirror-theme-eclipse": "4.25.8", + "@uiw/codemirror-theme-github": "4.25.8", + "@uiw/codemirror-theme-gruvbox-dark": "4.25.8", + "@uiw/codemirror-theme-kimbie": "4.25.8", + "@uiw/codemirror-theme-material": "4.25.8", + "@uiw/codemirror-theme-monokai": "4.25.8", + "@uiw/codemirror-theme-monokai-dimmed": "4.25.8", + "@uiw/codemirror-theme-noctis-lilac": "4.25.8", + "@uiw/codemirror-theme-nord": "4.25.8", + "@uiw/codemirror-theme-okaidia": "4.25.8", + "@uiw/codemirror-theme-quietlight": "4.25.8", + "@uiw/codemirror-theme-red": "4.25.8", + "@uiw/codemirror-theme-solarized": "4.25.8", + "@uiw/codemirror-theme-sublime": "4.25.8", + "@uiw/codemirror-theme-tokyo-night": "4.25.8", + "@uiw/codemirror-theme-tokyo-night-day": "4.25.8", + "@uiw/codemirror-theme-tokyo-night-storm": "4.25.8", + "@uiw/codemirror-theme-tomorrow-night-blue": "4.25.8", + "@uiw/codemirror-theme-vscode": "4.25.8", + "@uiw/codemirror-theme-white": "4.25.8", + "@uiw/codemirror-theme-xcode": "4.25.8", + "@uiw/codemirror-themes": "4.25.8" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, "node_modules/@ungap/structured-clone": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", @@ -10614,22 +11098,6 @@ "url": "https://opencollective.com/mongoose" } }, - "node_modules/mongoose/node_modules/gcp-metadata": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-7.0.1.tgz", - "integrity": "sha512-UcO3kefx6dCcZkgcTGgVOTFb7b1LlQ02hY1omMjjrrBzkajRMCFgYOjs7J71WqnuG1k2b+9ppGL7FsOfhZMQKQ==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "gaxios": "^7.0.0", - "google-logging-utils": "^1.0.0", - "json-bigint": "^1.0.0" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/mongoose/node_modules/mongodb": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-7.1.1.tgz", diff --git a/package.json b/package.json index 1d1668437..70dcbcb4a 100644 --- a/package.json +++ b/package.json @@ -104,6 +104,7 @@ "@googleapis/drive": "^20.1.0", "@lezer/highlight": "^1.2.3", "@sanity/diff-match-patch": "^3.2.0", + "@uiw/codemirror-themes-all": "^4.25.8", "@vitejs/plugin-react": "^5.1.2", "body-parser": "^2.2.0", "classnames": "^2.5.1",