diff --git a/apps/app-frontend/package.json b/apps/app-frontend/package.json index cb95264af5..63647f1ad7 100644 --- a/apps/app-frontend/package.json +++ b/apps/app-frontend/package.json @@ -15,6 +15,7 @@ }, "dependencies": { "@dnd-kit/vue": "^0.5.0", + "@floating-ui/vue": "^2.0.1", "@modrinth/api-client": "workspace:^", "@modrinth/assets": "workspace:*", "@modrinth/ui": "workspace:*", @@ -32,9 +33,7 @@ "@tauri-apps/plugin-window-state": "^2.2.2", "@types/three": "^0.172.0", "@vueuse/core": "^11.1.0", - "ace-builds": "^1.43.5", "dayjs": "^1.11.10", - "@floating-ui/vue": "^2.0.1", "fuse.js": "^6.6.2", "intl-messageformat": "^10.7.7", "motion-v": "2.2.1", @@ -46,7 +45,6 @@ "vue-i18n": "^10.0.0", "vue-router": "^4.6.0", "vue-virtual-scroller": "v2.0.0-beta.8", - "vue3-ace-editor": "^2.2.4", "vuedraggable": "^4.1.0" }, "devDependencies": { diff --git a/apps/app-frontend/src/features/settings/syncing/command-history-modal.vue b/apps/app-frontend/src/features/settings/syncing/command-history-modal.vue index 432ba3c75c..ac7098830e 100644 --- a/apps/app-frontend/src/features/settings/syncing/command-history-modal.vue +++ b/apps/app-frontend/src/features/settings/syncing/command-history-modal.vue @@ -2,6 +2,7 @@ import { SaveIcon, XIcon } from '@modrinth/assets' import { Button, + CodeEditor, commonMessages, defineMessages, injectNotificationManager, @@ -9,7 +10,7 @@ import { useVIntl, } from '@modrinth/ui' import { useMutation, useQuery, useQueryClient } from '@tanstack/vue-query' -import { defineAsyncComponent, nextTick, ref } from 'vue' +import { nextTick, ref } from 'vue' import { set_command_history } from '@/helpers/instance' import { commandHistoryQueryOptions, syncedOptionsKeys } from '@/helpers/synced-options' @@ -20,14 +21,6 @@ const queryClient = useQueryClient() const modal = ref | null>(null) const commandHistory = ref('') const historyQuery = useQuery({ ...commandHistoryQueryOptions(), enabled: false }) -const CommandHistoryEditor = defineAsyncComponent(async () => { - const [editor] = await Promise.all([ - import('vue3-ace-editor'), - import('@modrinth/ui/src/utils/ace-theme'), - import('@modrinth/ui/src/utils/ace-mode-mcfunction'), - ]) - return editor.VAceEditor -}) const saveMutation = useMutation({ mutationFn: set_command_history, onSuccess: (history) => { @@ -78,13 +71,11 @@ defineExpose({ show }) max-width="700px" width="700px" > - - - diff --git a/apps/app-frontend/src/main.js b/apps/app-frontend/src/main.js index 9607cfb4fe..5dc85bf62b 100644 --- a/apps/app-frontend/src/main.js +++ b/apps/app-frontend/src/main.js @@ -1,6 +1,6 @@ import 'overlayscrollbars/overlayscrollbars.css' -import { installTooltipDirective } from '@modrinth/ui' +import { installTooltipDirective, useCodeHighlightTheme } from '@modrinth/ui' import { VueQueryPlugin } from '@tanstack/vue-query' import { createApp } from 'vue' @@ -24,6 +24,7 @@ if (import.meta.env.DEV) { app.use(i18nPlugin) app.use(i18nDebugPlugin) installTooltipDirective(app) +useCodeHighlightTheme().start() app.directive('overlay-scrollbars', overlayScrollbarsDirective) async function mount() { diff --git a/apps/frontend/nuxt.config.ts b/apps/frontend/nuxt.config.ts index d8fff05680..aaabd24299 100644 --- a/apps/frontend/nuxt.config.ts +++ b/apps/frontend/nuxt.config.ts @@ -110,6 +110,10 @@ export default defineNuxtConfig({ external: ['cloudflare:workers'], }, }, + worker: { + // The toolbox workers (archives, decompilation) lazily import their dependencies + format: 'es', + }, }, hooks: { async 'build:before'() { diff --git a/apps/frontend/package.json b/apps/frontend/package.json index 6254af7eeb..f34070b381 100644 --- a/apps/frontend/package.json +++ b/apps/frontend/package.json @@ -38,8 +38,10 @@ "wrangler": "^4.115.0" }, "dependencies": { + "@codemirror/autocomplete": "^6.20.0", "@codemirror/commands": "^6.3.2", "@codemirror/language": "^6.9.3", + "@codemirror/state": "^6.5.4", "@codemirror/view": "^6.22.1", "@contentauth/c2pa-web": "^0.13.1", "@floating-ui/vue": "^2.0.1", @@ -58,7 +60,6 @@ "@vue-email/render": "^0.0.9", "@vueuse/core": "^11.1.0", "@zip.js/zip.js": "^2.8.34", - "ace-builds": "^1.36.2", "ansi-to-html": "^0.7.2", "chart.js": "^4.5.1", "dayjs": "^1.11.7", @@ -81,7 +82,6 @@ "vue-confetti-explosion": "^1.0.2", "vue-router": "*", "vue-typed-virtual-list": "^1.0.10", - "vue3-ace-editor": "^2.2.4", "vue3-apexcharts": "^1.5.2", "xss": "^1.0.14" }, diff --git a/apps/frontend/src/components/project-review/conversation-panel.vue b/apps/frontend/src/components/project-review/conversation-panel.vue new file mode 100644 index 0000000000..c06f94b0da --- /dev/null +++ b/apps/frontend/src/components/project-review/conversation-panel.vue @@ -0,0 +1,28 @@ + + + diff --git a/apps/frontend/src/components/project-review/description/index.vue b/apps/frontend/src/components/project-review/description/index.vue index abfcc933af..50c3104616 100644 --- a/apps/frontend/src/components/project-review/description/index.vue +++ b/apps/frontend/src/components/project-review/description/index.vue @@ -1,18 +1,16 @@