From 29b5cca7d9977a805244c6d398db19df9c6d9376 Mon Sep 17 00:00:00 2001 From: Farnabaz Date: Thu, 2 Oct 2025 10:56:13 +0200 Subject: [PATCH 1/7] fix: make sure all parsed trees are minified --- src/module/src/runtime/utils/content.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/module/src/runtime/utils/content.ts b/src/module/src/runtime/utils/content.ts index 59af166b..1966699b 100644 --- a/src/module/src/runtime/utils/content.ts +++ b/src/module/src/runtime/utils/content.ts @@ -4,6 +4,7 @@ import { generateStemFromFsPath } from './collections' import type { MarkdownRoot } from '@nuxt/content' import { omit } from './object' import type { DatabaseItem } from 'nuxt-studio/app' +import { compressTree } from '@nuxt/content/runtime' export function removeReservedKeysFromDocument(document: DatabaseItem) { const result = omit(document, ['id', 'stem', 'extension', '__hash__', 'path', 'body', 'meta']) @@ -35,7 +36,15 @@ export async function generateDocumentFromContent(id: string, fsPath: string, ro // TODO expose document creation logic from content module and use it there const stem = generateStemFromFsPath(fsPath) - const parsed = await parseMarkdown(content) + const parsed = await parseMarkdown(content).then(res => { + if (res.body.type === 'root') { + return { + ...res, + body: compressTree(res.body), + } + } + return res + }) return { id, @@ -50,8 +59,7 @@ export async function generateDocumentFromContent(id: string, fsPath: string, ro ...parsed.data, excerpt: parsed.excerpt, body: { - // TODO: fix MarkdownRoot/MDCRoot conversion in MDC module - ...(parsed.body as unknown as MarkdownRoot), + ...parsed.body, toc: parsed.toc, }, } From a553207c7a08ccae935a579700b2fd5022fee8e2 Mon Sep 17 00:00:00 2001 From: Farnabaz Date: Thu, 2 Oct 2025 10:56:46 +0200 Subject: [PATCH 2/7] fix: re-render page after creating new document to regenerate navigation tree --- src/app/src/composables/useDraftDocuments.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/src/composables/useDraftDocuments.ts b/src/app/src/composables/useDraftDocuments.ts index 7b2982b4..8040db87 100644 --- a/src/app/src/composables/useDraftDocuments.ts +++ b/src/app/src/composables/useDraftDocuments.ts @@ -57,6 +57,8 @@ export const useDraftDocuments = createSharedComposable((host: StudioHost, git: list.value.push(item) await hooks.callHook('studio:draft:document:updated') + // Rerender host app + host.app.requestRerender() return item } From 1de750ffbd298e84e1cfec84cb945de13b15e8d5 Mon Sep 17 00:00:00 2001 From: Farnabaz Date: Thu, 2 Oct 2025 11:10:20 +0200 Subject: [PATCH 3/7] fix: clear error & reload page on studio mount --- src/module/src/runtime/host.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/module/src/runtime/host.ts b/src/module/src/runtime/host.ts index 10efc8c4..43a166d4 100644 --- a/src/module/src/runtime/host.ts +++ b/src/module/src/runtime/host.ts @@ -8,7 +8,7 @@ import type { UseStudioHost, StudioHost, StudioUser, DatabaseItem, MediaItem, Re import type { RouteLocationNormalized, Router } from 'vue-router' import { generateDocumentFromContent } from './utils/content' // @ts-expect-error queryCollection is not defined in .nuxt/imports.d.ts -import { queryCollection, queryCollectionItemSurroundings, queryCollectionNavigation, queryCollectionSearchSections } from '#imports' +import { clearError, queryCollection, queryCollectionItemSurroundings, queryCollectionNavigation, queryCollectionSearchSections } from '#imports' import { collections } from '#content/preview' import { publicAssetsStorage } from '#build/content-studio-public-assets' import { useHostMeta } from './composables/useMeta' @@ -265,7 +265,10 @@ export function useStudioHost(user: StudioUser, repository: Repository): StudioH }, app: { - requestRerender: () => { + requestRerender: async () => { + if (useNuxtApp().payload.error) { + await clearError({ redirect: `?t=${Date.now()}` }) + } useNuxtApp().hooks.callHookParallel('app:data:refresh') }, navigateTo: (path: string) => { From 1d56c405d52b333f48f92e27e034bc080fb0edad Mon Sep 17 00:00:00 2001 From: Farnabaz Date: Thu, 2 Oct 2025 12:32:55 +0200 Subject: [PATCH 4/7] fix(editor): support dark/light theme by inlining themes --- .../components/content/ContentEditorCode.vue | 12 +- src/app/src/utils/monaco/index.ts | 4 + src/app/src/utils/monaco/theme-dark.ts | 1205 +++++++++++++++++ src/app/src/utils/monaco/theme-light.ts | 1203 ++++++++++++++++ 4 files changed, 2418 insertions(+), 6 deletions(-) create mode 100644 src/app/src/utils/monaco/theme-dark.ts create mode 100644 src/app/src/utils/monaco/theme-light.ts diff --git a/src/app/src/components/content/ContentEditorCode.vue b/src/app/src/components/content/ContentEditorCode.vue index cd0e38ea..9b309f26 100644 --- a/src/app/src/components/content/ContentEditorCode.vue +++ b/src/app/src/components/content/ContentEditorCode.vue @@ -48,7 +48,7 @@ onMounted(async () => { // create a Monaco editor instance editor.value = monaco.createEditor(editorRef.value, { - // theme: ui.colorMode.value === 'light' ? 'vs' : 'vs-dark', + theme: ui.colorMode.value === 'light' ? 'vitesse-light' : 'vitesse-dark', lineNumbers: 'off', readOnly: props.readOnly, scrollbar: props.readOnly @@ -92,11 +92,11 @@ onMounted(async () => { editor.value.setModel(monaco.editor.createModel(content.value, 'mdc')) // Set the theme based on the color mode - // watch(ui.colorMode, () => { - // editor.value?.updateOptions({ - // theme: ui.colorMode.value === 'light' ? 'vs' : 'vs-dark', - // }) - // }) + watch(ui.colorMode, () => { + editor.value?.updateOptions({ + theme: ui.colorMode.value === 'light' ? 'vitesse-light' : 'vitesse-dark', + }) + }) }) function setContent(document: DatabasePageItem) { diff --git a/src/app/src/utils/monaco/index.ts b/src/app/src/utils/monaco/index.ts index f6de77b0..b4651e0f 100644 --- a/src/app/src/utils/monaco/index.ts +++ b/src/app/src/utils/monaco/index.ts @@ -1,5 +1,7 @@ import { createSingletonPromise } from '@vueuse/core' import type { editor as Editor } from 'modern-monaco/editor-core' +import themeLight from './theme-light' +import themeDark from './theme-dark' export { setupSuggestion } from './mdc-compilation' export type { editor as Editor } from 'modern-monaco/editor-core' @@ -20,6 +22,8 @@ export const setupMonaco = createSingletonPromise(async () => { } const monaco: Monaco = await init() + monaco.editor.defineTheme('vitesse-light', themeLight) + monaco.editor.defineTheme('vitesse-dark', themeDark) return { monaco, diff --git a/src/app/src/utils/monaco/theme-dark.ts b/src/app/src/utils/monaco/theme-dark.ts new file mode 100644 index 00000000..69172cd5 --- /dev/null +++ b/src/app/src/utils/monaco/theme-dark.ts @@ -0,0 +1,1205 @@ +// https://github.com/antfu/vscode-theme-vitesse/blob/main/themes/vitesse-dark.json +import type { editor as Editor } from 'modern-monaco/editor-core' + +export default { + "name": "Vitesse Dark", + "base": "vs-dark", + "colors": { + "focusBorder": "#00000000", + "foreground": "#dbd7caee", + "descriptionForeground": "#dedcd590", + "errorForeground": "#cb7676", + "textLink.foreground": "#4d9375", + "textLink.activeForeground": "#4d9375", + "textBlockQuote.background": "#121212", + "textBlockQuote.border": "#191919", + "textCodeBlock.background": "#121212", + "textPreformat.foreground": "#d1d5da", + "textSeparator.foreground": "#586069", + "button.background": "#4d9375", + "button.foreground": "#121212", + "button.hoverBackground": "#4d9375", + "checkbox.background": "#181818", + "checkbox.border": "#2f363d", + "dropdown.background": "#121212", + "dropdown.border": "#191919", + "dropdown.foreground": "#dbd7caee", + "dropdown.listBackground": "#181818", + "input.background": "#181818", + "input.border": "#191919", + "input.foreground": "#dbd7caee", + "input.placeholderForeground": "#dedcd590", + "inputOption.activeBackground": "#dedcd550", + "badge.foreground": "#121212", + "badge.background": "#dedcd590", + "progressBar.background": "#4d9375", + "titleBar.activeForeground": "#bfbaaa", + "titleBar.activeBackground": "#121212", + "titleBar.inactiveForeground": "#959da5", + "titleBar.inactiveBackground": "#121212", + "titleBar.border": "#181818", + "activityBar.foreground": "#dbd7caee", + "activityBar.inactiveForeground": "#dedcd550", + "activityBar.background": "#121212", + "activityBarBadge.foreground": "#121212", + "activityBarBadge.background": "#bfbaaa", + "activityBar.activeBorder": "#4d9375", + "activityBar.border": "#191919", + "sideBar.foreground": "#bfbaaa", + "sideBar.background": "#121212", + "sideBar.border": "#191919", + "sideBarTitle.foreground": "#dbd7caee", + "sideBarSectionHeader.foreground": "#dbd7caee", + "sideBarSectionHeader.background": "#121212", + "sideBarSectionHeader.border": "#191919", + "list.hoverForeground": "#dbd7caee", + "list.inactiveSelectionForeground": "#dbd7caee", + "list.activeSelectionForeground": "#dbd7caee", + "list.hoverBackground": "#181818", + "list.inactiveSelectionBackground": "#181818", + "list.activeSelectionBackground": "#181818", + "list.inactiveFocusBackground": "#121212", + "list.focusBackground": "#181818", + "list.highlightForeground": "#4d9375", + "tree.indentGuidesStroke": "#2f363d", + "notificationCenterHeader.foreground": "#959da5", + "notificationCenterHeader.background": "#121212", + "notifications.foreground": "#dbd7caee", + "notifications.background": "#121212", + "notifications.border": "#191919", + "notificationsErrorIcon.foreground": "#cb7676", + "notificationsWarningIcon.foreground": "#d4976c", + "notificationsInfoIcon.foreground": "#6394bf", + "pickerGroup.border": "#191919", + "pickerGroup.foreground": "#dbd7caee", + "quickInput.background": "#121212", + "quickInput.foreground": "#dbd7caee", + "quickInputList.focusBackground": "#181818", + "statusBar.foreground": "#bfbaaa", + "statusBar.background": "#121212", + "statusBar.border": "#191919", + "statusBar.noFolderBackground": "#121212", + "statusBar.debuggingBackground": "#181818", + "statusBar.debuggingForeground": "#bfbaaa", + "statusBarItem.prominentBackground": "#181818", + "editorGroupHeader.tabsBackground": "#121212", + "editorGroupHeader.tabsBorder": "#191919", + "editorGroup.border": "#191919", + "tab.activeForeground": "#dbd7caee", + "tab.inactiveForeground": "#959da5", + "tab.inactiveBackground": "#121212", + "tab.activeBackground": "#121212", + "tab.hoverBackground": "#181818", + "tab.unfocusedHoverBackground": "#121212", + "tab.border": "#191919", + "tab.unfocusedActiveBorderTop": "#191919", + "tab.activeBorder": "#191919", + "tab.unfocusedActiveBorder": "#191919", + "tab.activeBorderTop": "#dedcd590", + "breadcrumb.foreground": "#959da5", + "breadcrumb.focusForeground": "#dbd7caee", + "breadcrumb.background": "#181818", + "breadcrumb.activeSelectionForeground": "#eeeeee18", + "breadcrumbPicker.background": "#121212", + "editor.foreground": "#dbd7caee", + "editor.background": "#121212", + "editorWidget.background": "#121212", + "editor.foldBackground": "#eeeeee10", + "editor.lineHighlightBackground": "#181818", + "editorLineNumber.foreground": "#dedcd550", + "editorLineNumber.activeForeground": "#bfbaaa", + "editorIndentGuide.background": "#ffffff15", + "editorIndentGuide.activeBackground": "#ffffff30", + "editorWhitespace.foreground": "#ffffff15", + "editor.findMatchBackground": "#e6cc7722", + "editor.findMatchHighlightBackground": "#e6cc7744", + "editor.inactiveSelectionBackground": "#eeeeee10", + "editor.selectionBackground": "#eeeeee18", + "editor.selectionHighlightBackground": "#eeeeee10", + "editor.wordHighlightBackground": "#1c6b4805", + "editor.wordHighlightStrongBackground": "#1c6b4810", + "editorBracketMatch.background": "#4d937520", + "diffEditor.insertedTextBackground": "#4d937550", + "diffEditor.removedTextBackground": "#ab595950", + "scrollbar.shadow": "#0000", + "scrollbarSlider.background": "#dedcd510", + "scrollbarSlider.hoverBackground": "#dedcd550", + "scrollbarSlider.activeBackground": "#dedcd550", + "editorOverviewRuler.border": "#111", + "panel.background": "#121212", + "panel.border": "#191919", + "panelTitle.activeBorder": "#4d9375", + "panelTitle.activeForeground": "#dbd7caee", + "panelTitle.inactiveForeground": "#959da5", + "panelInput.border": "#2f363d", + "terminal.foreground": "#dbd7caee", + "terminal.selectionBackground": "#eeeeee18", + "terminal.ansiBrightBlack": "#777777", + "terminal.ansiBrightBlue": "#6394bf", + "terminal.ansiBrightCyan": "#5eaab5", + "terminal.ansiBrightGreen": "#4d9375", + "terminal.ansiBrightMagenta": "#d9739f", + "terminal.ansiBrightRed": "#cb7676", + "terminal.ansiBrightWhite": "#ffffff", + "terminal.ansiBrightYellow": "#e6cc77", + "terminal.ansiBlack": "#393a34", + "terminal.ansiBlue": "#6394bf", + "terminal.ansiCyan": "#5eaab5", + "terminal.ansiGreen": "#4d9375", + "terminal.ansiMagenta": "#d9739f", + "terminal.ansiRed": "#cb7676", + "terminal.ansiWhite": "#dbd7ca", + "terminal.ansiYellow": "#e6cc77", + "gitDecoration.addedResourceForeground": "#4d9375", + "gitDecoration.modifiedResourceForeground": "#6394bf", + "gitDecoration.deletedResourceForeground": "#cb7676", + "gitDecoration.untrackedResourceForeground": "#5eaab5", + "gitDecoration.ignoredResourceForeground": "#dedcd550", + "gitDecoration.conflictingResourceForeground": "#d4976c", + "gitDecoration.submoduleResourceForeground": "#dedcd590", + "editorGutter.modifiedBackground": "#6394bf", + "editorGutter.addedBackground": "#4d9375", + "editorGutter.deletedBackground": "#cb7676", + "editorBracketHighlight.foreground1": "#5eaab5", + "editorBracketHighlight.foreground2": "#4d9375", + "editorBracketHighlight.foreground3": "#d4976c", + "editorBracketHighlight.foreground4": "#d9739f", + "editorBracketHighlight.foreground5": "#e6cc77", + "editorBracketHighlight.foreground6": "#6394bf", + "debugToolBar.background": "#121212", + "editor.stackFrameHighlightBackground": "#a707", + "editor.focusedStackFrameHighlightBackground": "#b808", + "peekViewEditor.matchHighlightBackground": "#ffd33d33", + "peekViewResult.matchHighlightBackground": "#ffd33d33", + "peekViewEditor.background": "#121212", + "peekViewResult.background": "#121212", + "settings.headerForeground": "#dbd7caee", + "settings.modifiedItemIndicator": "#4d9375", + "welcomePage.buttonBackground": "#2f363d", + "welcomePage.buttonHoverBackground": "#444d56", + "problemsErrorIcon.foreground": "#cb7676", + "problemsWarningIcon.foreground": "#d4976c", + "problemsInfoIcon.foreground": "#6394bf", + "editorError.foreground": "#cb7676", + "editorWarning.foreground": "#d4976c", + "editorInfo.foreground": "#6394bf", + "editorHint.foreground": "#4d9375", + "editorGutter.commentRangeForeground": "#dedcd550", + "editorGutter.foldingControlForeground": "#dedcd590", + "editorInlayHint.foreground": "#666666", + "editorInlayHint.background": "#181818", + "editorStickyScroll.background": "#181818", + "editorStickyScrollHover.background": "#181818", + "menu.separatorBackground": "#191919" + }, + "semanticHighlighting": true, + "semanticTokenColors": { + "namespace": "#db889a", + "property": "#b8a965", + "interface": "#5d99a9", + "type": "#5d99a9", + "class": "#6872ab" + }, + "tokenColors": [ + { + "scope": [ + "comment", + "punctuation.definition.comment", + "string.comment" + ], + "settings": { + "foreground": "#758575dd" + } + }, + { + "scope": [ + "delimiter.bracket", + "delimiter", + "invalid.illegal.character-not-allowed-here.html", + "keyword.operator.rest", + "keyword.operator.spread", + "keyword.operator.type.annotation", + "keyword.operator.relational", + "keyword.operator.assignment", + "keyword.operator.type", + "meta.brace", + "meta.tag.block.any.html", + "meta.tag.inline.any.html", + "meta.tag.structure.input.void.html", + "meta.type.annotation", + "meta.embedded.block.github-actions-expression", + "storage.type.function.arrow", + "meta.objectliteral.ts", + "punctuation", + "punctuation.definition.string.begin.html.vue", + "punctuation.definition.string.end.html.vue" + ], + "settings": { + "foreground": "#666666" + } + }, + { + "scope": [ + "constant", + "entity.name.constant", + "variable.language", + "meta.definition.variable" + ], + "settings": { + "foreground": "#c99076" + } + }, + { + "scope": [ + "entity", + "entity.name" + ], + "settings": { + "foreground": "#80a665" + } + }, + { + "scope": "variable.parameter.function", + "settings": { + "foreground": "#dbd7caee" + } + }, + { + "scope": [ + "entity.name.tag", + "tag.html" + ], + "settings": { + "foreground": "#4d9375" + } + }, + { + "scope": "entity.name.function", + "settings": { + "foreground": "#80a665" + } + }, + { + "scope": [ + "keyword", + "storage.type.class.jsdoc", + "punctuation.definition.template-expression" + ], + "settings": { + "foreground": "#4d9375" + } + }, + { + "scope": [ + "storage", + "storage.type", + "support.type.builtin", + "constant.language.undefined", + "constant.language.null", + "constant.language.import-export-all.ts" + ], + "settings": { + "foreground": "#cb7676" + } + }, + { + "scope": [ + "text.html.derivative", + "storage.modifier.package", + "storage.modifier.import", + "storage.type.java" + ], + "settings": { + "foreground": "#dbd7caee" + } + }, + { + "scope": [ + "string", + "string punctuation.section.embedded source", + "attribute.value" + ], + "settings": { + "foreground": "#c98a7d" + } + }, + { + "scope": [ + "punctuation.definition.string" + ], + "settings": { + "foreground": "#c98a7d77" + } + }, + { + "scope": [ + "punctuation.support.type.property-name" + ], + "settings": { + "foreground": "#b8a96577" + } + }, + { + "scope": "support", + "settings": { + "foreground": "#b8a965" + } + }, + { + "scope": [ + "property", + "meta.property-name", + "meta.object-literal.key", + "entity.name.tag.yaml", + "attribute.name" + ], + "settings": { + "foreground": "#b8a965" + } + }, + { + "scope": [ + "entity.other.attribute-name", + "invalid.deprecated.entity.other.attribute-name.html" + ], + "settings": { + "foreground": "#bd976a" + } + }, + { + "scope": [ + "variable", + "identifier" + ], + "settings": { + "foreground": "#bd976a" + } + }, + { + "scope": [ + "support.type.primitive", + "entity.name.type" + ], + "settings": { + "foreground": "#5DA994" + } + }, + { + "scope": "namespace", + "settings": { + "foreground": "#db889a" + } + }, + { + "scope": [ + "keyword.operator", + "keyword.operator.assignment.compound", + "meta.var.expr.ts" + ], + "settings": { + "foreground": "#cb7676" + } + }, + { + "scope": "invalid.broken", + "settings": { + "fontStyle": "italic", + "foreground": "#fdaeb7" + } + }, + { + "scope": "invalid.deprecated", + "settings": { + "fontStyle": "italic", + "foreground": "#fdaeb7" + } + }, + { + "scope": "invalid.illegal", + "settings": { + "fontStyle": "italic", + "foreground": "#fdaeb7" + } + }, + { + "scope": "invalid.unimplemented", + "settings": { + "fontStyle": "italic", + "foreground": "#fdaeb7" + } + }, + { + "scope": "carriage-return", + "settings": { + "fontStyle": "italic underline", + "background": "#f97583", + "foreground": "#24292e", + "content": "^M" + } + }, + { + "scope": "message.error", + "settings": { + "foreground": "#fdaeb7" + } + }, + { + "scope": "string variable", + "settings": { + "foreground": "#c98a7d" + } + }, + { + "scope": [ + "source.regexp", + "string.regexp" + ], + "settings": { + "foreground": "#c4704f" + } + }, + { + "scope": [ + "string.regexp.character-class", + "string.regexp constant.character.escape", + "string.regexp source.ruby.embedded", + "string.regexp string.regexp.arbitrary-repitition" + ], + "settings": { + "foreground": "#c98a7d" + } + }, + { + "scope": "string.regexp constant.character.escape", + "settings": { + "foreground": "#e6cc77" + } + }, + { + "scope": [ + "support.constant" + ], + "settings": { + "foreground": "#c99076" + } + }, + { + "scope": [ + "keyword.operator.quantifier.regexp", + "constant.numeric", + "number" + ], + "settings": { + "foreground": "#4C9A91" + } + }, + { + "scope": [ + "keyword.other.unit" + ], + "settings": { + "foreground": "#cb7676" + } + }, + { + "scope": [ + "constant.language.boolean", + "constant.language" + ], + "settings": { + "foreground": "#4d9375" + } + }, + { + "scope": "meta.module-reference", + "settings": { + "foreground": "#4d9375" + } + }, + { + "scope": "punctuation.definition.list.begin.markdown", + "settings": { + "foreground": "#d4976c" + } + }, + { + "scope": [ + "markup.heading", + "markup.heading entity.name" + ], + "settings": { + "fontStyle": "bold", + "foreground": "#4d9375" + } + }, + { + "scope": "markup.quote", + "settings": { + "foreground": "#5d99a9" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic", + "foreground": "#dbd7caee" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#dbd7caee" + } + }, + { + "scope": "markup.raw", + "settings": { + "foreground": "#4d9375" + } + }, + { + "scope": [ + "markup.deleted", + "meta.diff.header.from-file", + "punctuation.definition.deleted" + ], + "settings": { + "background": "#86181d", + "foreground": "#fdaeb7" + } + }, + { + "scope": [ + "markup.inserted", + "meta.diff.header.to-file", + "punctuation.definition.inserted" + ], + "settings": { + "background": "#144620", + "foreground": "#85e89d" + } + }, + { + "scope": [ + "markup.changed", + "punctuation.definition.changed" + ], + "settings": { + "background": "#c24e00", + "foreground": "#ffab70" + } + }, + { + "scope": [ + "markup.ignored", + "markup.untracked" + ], + "settings": { + "foreground": "#2f363d", + "background": "#79b8ff" + } + }, + { + "scope": "meta.diff.range", + "settings": { + "foreground": "#b392f0", + "fontStyle": "bold" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#79b8ff" + } + }, + { + "scope": "meta.separator", + "settings": { + "fontStyle": "bold", + "foreground": "#79b8ff" + } + }, + { + "scope": "meta.output", + "settings": { + "foreground": "#79b8ff" + } + }, + { + "scope": [ + "brackethighlighter.tag", + "brackethighlighter.curly", + "brackethighlighter.round", + "brackethighlighter.square", + "brackethighlighter.angle", + "brackethighlighter.quote" + ], + "settings": { + "foreground": "#d1d5da" + } + }, + { + "scope": "brackethighlighter.unmatched", + "settings": { + "foreground": "#fdaeb7" + } + }, + { + "scope": [ + "constant.other.reference.link", + "string.other.link", + "punctuation.definition.string.begin.markdown", + "punctuation.definition.string.end.markdown" + ], + "settings": { + "foreground": "#c98a7d" + } + }, + { + "scope": [ + "markup.underline.link.markdown", + "markup.underline.link.image.markdown" + ], + "settings": { + "foreground": "#dedcd590", + "fontStyle": "underline" + } + }, + { + "scope": [ + "type.identifier", + "constant.other.character-class.regexp" + ], + "settings": { + "foreground": "#6872ab" + } + }, + { + "scope": [ + "entity.other.attribute-name.html.vue" + ], + "settings": { + "foreground": "#80a665" + } + }, + { + "scope": [ + "invalid.illegal.unrecognized-tag.html" + ], + "settings": { + "fontStyle": "normal" + } + } + ], + "rules": [ + { + "token": "comment", + "foreground": "758575dd" + }, + { + "token": "punctuation.definition.comment", + "foreground": "758575dd" + }, + { + "token": "string.comment", + "foreground": "758575dd" + }, + { + "token": "delimiter.bracket", + "foreground": "666666" + }, + { + "token": "delimiter", + "foreground": "666666" + }, + { + "token": "invalid.illegal.character-not-allowed-here.html", + "foreground": "666666" + }, + { + "token": "keyword.operator.rest", + "foreground": "666666" + }, + { + "token": "keyword.operator.spread", + "foreground": "666666" + }, + { + "token": "keyword.operator.type.annotation", + "foreground": "666666" + }, + { + "token": "keyword.operator.relational", + "foreground": "666666" + }, + { + "token": "keyword.operator.assignment", + "foreground": "666666" + }, + { + "token": "keyword.operator.type", + "foreground": "666666" + }, + { + "token": "meta.brace", + "foreground": "666666" + }, + { + "token": "meta.tag.block.any.html", + "foreground": "666666" + }, + { + "token": "meta.tag.inline.any.html", + "foreground": "666666" + }, + { + "token": "meta.tag.structure.input.void.html", + "foreground": "666666" + }, + { + "token": "meta.type.annotation", + "foreground": "666666" + }, + { + "token": "meta.embedded.block.github-actions-expression", + "foreground": "666666" + }, + { + "token": "storage.type.function.arrow", + "foreground": "666666" + }, + { + "token": "meta.objectliteral.ts", + "foreground": "666666" + }, + { + "token": "punctuation", + "foreground": "666666" + }, + { + "token": "punctuation.definition.string.begin.html.vue", + "foreground": "666666" + }, + { + "token": "punctuation.definition.string.end.html.vue", + "foreground": "666666" + }, + { + "token": "constant", + "foreground": "c99076" + }, + { + "token": "entity.name.constant", + "foreground": "c99076" + }, + { + "token": "variable.language", + "foreground": "c99076" + }, + { + "token": "meta.definition.variable", + "foreground": "c99076" + }, + { + "token": "entity", + "foreground": "80a665" + }, + { + "token": "entity.name", + "foreground": "80a665" + }, + { + "token": "variable.parameter.function", + "foreground": "dbd7caee" + }, + { + "token": "entity.name.tag", + "foreground": "4d9375" + }, + { + "token": "tag.html", + "foreground": "4d9375" + }, + { + "token": "entity.name.function", + "foreground": "80a665" + }, + { + "token": "keyword", + "foreground": "4d9375" + }, + { + "token": "storage.type.class.jsdoc", + "foreground": "4d9375" + }, + { + "token": "punctuation.definition.template-expression", + "foreground": "4d9375" + }, + { + "token": "storage", + "foreground": "cb7676" + }, + { + "token": "storage.type", + "foreground": "cb7676" + }, + { + "token": "support.type.builtin", + "foreground": "cb7676" + }, + { + "token": "constant.language.undefined", + "foreground": "cb7676" + }, + { + "token": "constant.language.null", + "foreground": "cb7676" + }, + { + "token": "constant.language.import-export-all.ts", + "foreground": "cb7676" + }, + { + "token": "text.html.derivative", + "foreground": "dbd7caee" + }, + { + "token": "storage.modifier.package", + "foreground": "dbd7caee" + }, + { + "token": "storage.modifier.import", + "foreground": "dbd7caee" + }, + { + "token": "storage.type.java", + "foreground": "dbd7caee" + }, + { + "token": "string", + "foreground": "c98a7d" + }, + { + "token": "string punctuation.section.embedded source", + "foreground": "c98a7d" + }, + { + "token": "attribute.value", + "foreground": "c98a7d" + }, + { + "token": "punctuation.definition.string", + "foreground": "c98a7d77" + }, + { + "token": "punctuation.support.type.property-name", + "foreground": "b8a96577" + }, + { + "token": "support", + "foreground": "b8a965" + }, + { + "token": "property", + "foreground": "b8a965" + }, + { + "token": "meta.property-name", + "foreground": "b8a965" + }, + { + "token": "meta.object-literal.key", + "foreground": "b8a965" + }, + { + "token": "entity.name.tag.yaml", + "foreground": "b8a965" + }, + { + "token": "attribute.name", + "foreground": "b8a965" + }, + { + "token": "entity.other.attribute-name", + "foreground": "bd976a" + }, + { + "token": "invalid.deprecated.entity.other.attribute-name.html", + "foreground": "bd976a" + }, + { + "token": "variable", + "foreground": "bd976a" + }, + { + "token": "identifier", + "foreground": "bd976a" + }, + { + "token": "support.type.primitive", + "foreground": "5DA994" + }, + { + "token": "entity.name.type", + "foreground": "5DA994" + }, + { + "token": "namespace", + "foreground": "db889a" + }, + { + "token": "keyword.operator", + "foreground": "cb7676" + }, + { + "token": "keyword.operator.assignment.compound", + "foreground": "cb7676" + }, + { + "token": "meta.var.expr.ts", + "foreground": "cb7676" + }, + { + "token": "invalid.broken", + "foreground": "fdaeb7" + }, + { + "token": "invalid.deprecated", + "foreground": "fdaeb7" + }, + { + "token": "invalid.illegal", + "foreground": "fdaeb7" + }, + { + "token": "invalid.unimplemented", + "foreground": "fdaeb7" + }, + { + "token": "carriage-return", + "foreground": "24292e" + }, + { + "token": "message.error", + "foreground": "fdaeb7" + }, + { + "token": "string variable", + "foreground": "c98a7d" + }, + { + "token": "source.regexp", + "foreground": "c4704f" + }, + { + "token": "string.regexp", + "foreground": "c4704f" + }, + { + "token": "string.regexp.character-class", + "foreground": "c98a7d" + }, + { + "token": "string.regexp constant.character.escape", + "foreground": "c98a7d" + }, + { + "token": "string.regexp source.ruby.embedded", + "foreground": "c98a7d" + }, + { + "token": "string.regexp string.regexp.arbitrary-repitition", + "foreground": "c98a7d" + }, + { + "token": "string.regexp constant.character.escape", + "foreground": "e6cc77" + }, + { + "token": "support.constant", + "foreground": "c99076" + }, + { + "token": "keyword.operator.quantifier.regexp", + "foreground": "4C9A91" + }, + { + "token": "constant.numeric", + "foreground": "4C9A91" + }, + { + "token": "number", + "foreground": "4C9A91" + }, + { + "token": "keyword.other.unit", + "foreground": "cb7676" + }, + { + "token": "constant.language.boolean", + "foreground": "4d9375" + }, + { + "token": "constant.language", + "foreground": "4d9375" + }, + { + "token": "meta.module-reference", + "foreground": "4d9375" + }, + { + "token": "punctuation.definition.list.begin.markdown", + "foreground": "d4976c" + }, + { + "token": "markup.heading", + "foreground": "4d9375" + }, + { + "token": "markup.heading entity.name", + "foreground": "4d9375" + }, + { + "token": "markup.quote", + "foreground": "5d99a9" + }, + { + "token": "markup.italic", + "foreground": "dbd7caee" + }, + { + "token": "markup.bold", + "foreground": "dbd7caee" + }, + { + "token": "markup.raw", + "foreground": "4d9375" + }, + { + "token": "markup.deleted", + "foreground": "fdaeb7" + }, + { + "token": "meta.diff.header.from-file", + "foreground": "fdaeb7" + }, + { + "token": "punctuation.definition.deleted", + "foreground": "fdaeb7" + }, + { + "token": "markup.inserted", + "foreground": "85e89d" + }, + { + "token": "meta.diff.header.to-file", + "foreground": "85e89d" + }, + { + "token": "punctuation.definition.inserted", + "foreground": "85e89d" + }, + { + "token": "markup.changed", + "foreground": "ffab70" + }, + { + "token": "punctuation.definition.changed", + "foreground": "ffab70" + }, + { + "token": "markup.ignored", + "foreground": "2f363d" + }, + { + "token": "markup.untracked", + "foreground": "2f363d" + }, + { + "token": "meta.diff.range", + "foreground": "b392f0" + }, + { + "token": "meta.diff.header", + "foreground": "79b8ff" + }, + { + "token": "meta.separator", + "foreground": "79b8ff" + }, + { + "token": "meta.output", + "foreground": "79b8ff" + }, + { + "token": "brackethighlighter.tag", + "foreground": "d1d5da" + }, + { + "token": "brackethighlighter.curly", + "foreground": "d1d5da" + }, + { + "token": "brackethighlighter.round", + "foreground": "d1d5da" + }, + { + "token": "brackethighlighter.square", + "foreground": "d1d5da" + }, + { + "token": "brackethighlighter.angle", + "foreground": "d1d5da" + }, + { + "token": "brackethighlighter.quote", + "foreground": "d1d5da" + }, + { + "token": "brackethighlighter.unmatched", + "foreground": "fdaeb7" + }, + { + "token": "constant.other.reference.link", + "foreground": "c98a7d" + }, + { + "token": "string.other.link", + "foreground": "c98a7d" + }, + { + "token": "punctuation.definition.string.begin.markdown", + "foreground": "c98a7d" + }, + { + "token": "punctuation.definition.string.end.markdown", + "foreground": "c98a7d" + }, + { + "token": "markup.underline.link.markdown", + "foreground": "dedcd590" + }, + { + "token": "markup.underline.link.image.markdown", + "foreground": "dedcd590" + }, + { + "token": "type.identifier", + "foreground": "6872ab" + }, + { + "token": "constant.other.character-class.regexp", + "foreground": "6872ab" + }, + { + "token": "entity.other.attribute-name.html.vue", + "foreground": "80a665" + }, + { + "token": "invalid.illegal.unrecognized-tag.html" + } + ], + "inherit": false, +} as Editor.IStandaloneThemeData \ No newline at end of file diff --git a/src/app/src/utils/monaco/theme-light.ts b/src/app/src/utils/monaco/theme-light.ts new file mode 100644 index 00000000..b884f59d --- /dev/null +++ b/src/app/src/utils/monaco/theme-light.ts @@ -0,0 +1,1203 @@ +// https://github.com/antfu/vscode-theme-vitesse/blob/main/themes/vitesse-light.json +import type { editor as Editor } from 'modern-monaco/editor-core' + +export default { + "name": "Vitesse Light", + "base": "vs", + "colors": { + "focusBorder": "#00000000", + "foreground": "#393a34", + "descriptionForeground": "#393a3490", + "errorForeground": "#ab5959", + "textLink.foreground": "#1c6b48", + "textLink.activeForeground": "#1c6b48", + "textBlockQuote.background": "#ffffff", + "textBlockQuote.border": "#f0f0f0", + "textCodeBlock.background": "#ffffff", + "textPreformat.foreground": "#586069", + "textSeparator.foreground": "#d1d5da", + "button.background": "#1c6b48", + "button.foreground": "#ffffff", + "button.hoverBackground": "#1c6b48", + "checkbox.background": "#f7f7f7", + "checkbox.border": "#d1d5da", + "dropdown.background": "#ffffff", + "dropdown.border": "#f0f0f0", + "dropdown.foreground": "#393a34", + "dropdown.listBackground": "#f7f7f7", + "input.background": "#f7f7f7", + "input.border": "#f0f0f0", + "input.foreground": "#393a34", + "input.placeholderForeground": "#393a3490", + "inputOption.activeBackground": "#393a3450", + "badge.foreground": "#ffffff", + "badge.background": "#393a3490", + "progressBar.background": "#1c6b48", + "titleBar.activeForeground": "#4e4f47", + "titleBar.activeBackground": "#ffffff", + "titleBar.inactiveForeground": "#6a737d", + "titleBar.inactiveBackground": "#ffffff", + "titleBar.border": "#f7f7f7", + "activityBar.foreground": "#393a34", + "activityBar.inactiveForeground": "#393a3450", + "activityBar.background": "#ffffff", + "activityBarBadge.foreground": "#ffffff", + "activityBarBadge.background": "#4e4f47", + "activityBar.activeBorder": "#1c6b48", + "activityBar.border": "#f0f0f0", + "sideBar.foreground": "#4e4f47", + "sideBar.background": "#ffffff", + "sideBar.border": "#f0f0f0", + "sideBarTitle.foreground": "#393a34", + "sideBarSectionHeader.foreground": "#393a34", + "sideBarSectionHeader.background": "#ffffff", + "sideBarSectionHeader.border": "#f0f0f0", + "list.hoverForeground": "#393a34", + "list.inactiveSelectionForeground": "#393a34", + "list.activeSelectionForeground": "#393a34", + "list.hoverBackground": "#f7f7f7", + "list.inactiveSelectionBackground": "#f7f7f7", + "list.activeSelectionBackground": "#f7f7f7", + "list.inactiveFocusBackground": "#ffffff", + "list.focusBackground": "#f7f7f7", + "list.highlightForeground": "#1c6b48", + "tree.indentGuidesStroke": "#e1e4e8", + "notificationCenterHeader.foreground": "#6a737d", + "notificationCenterHeader.background": "#ffffff", + "notifications.foreground": "#393a34", + "notifications.background": "#ffffff", + "notifications.border": "#f0f0f0", + "notificationsErrorIcon.foreground": "#ab5959", + "notificationsWarningIcon.foreground": "#a65e2b", + "notificationsInfoIcon.foreground": "#296aa3", + "pickerGroup.border": "#f0f0f0", + "pickerGroup.foreground": "#393a34", + "quickInput.background": "#ffffff", + "quickInput.foreground": "#393a34", + "quickInputList.focusBackground": "#f7f7f7", + "statusBar.foreground": "#4e4f47", + "statusBar.background": "#ffffff", + "statusBar.border": "#f0f0f0", + "statusBar.noFolderBackground": "#ffffff", + "statusBar.debuggingBackground": "#f7f7f7", + "statusBar.debuggingForeground": "#4e4f47", + "statusBarItem.prominentBackground": "#f7f7f7", + "editorGroupHeader.tabsBackground": "#ffffff", + "editorGroupHeader.tabsBorder": "#f0f0f0", + "editorGroup.border": "#f0f0f0", + "tab.activeForeground": "#393a34", + "tab.inactiveForeground": "#6a737d", + "tab.inactiveBackground": "#ffffff", + "tab.activeBackground": "#ffffff", + "tab.hoverBackground": "#f7f7f7", + "tab.unfocusedHoverBackground": "#ffffff", + "tab.border": "#f0f0f0", + "tab.unfocusedActiveBorderTop": "#f0f0f0", + "tab.activeBorder": "#f0f0f0", + "tab.unfocusedActiveBorder": "#f0f0f0", + "tab.activeBorderTop": "#393a3490", + "breadcrumb.foreground": "#6a737d", + "breadcrumb.focusForeground": "#393a34", + "breadcrumb.background": "#f7f7f7", + "breadcrumb.activeSelectionForeground": "#22222218", + "breadcrumbPicker.background": "#ffffff", + "editor.foreground": "#393a34", + "editor.background": "#ffffff", + "editorWidget.background": "#ffffff", + "editor.foldBackground": "#22222210", + "editor.lineHighlightBackground": "#f7f7f7", + "editorLineNumber.foreground": "#393a3450", + "editorLineNumber.activeForeground": "#4e4f47", + "editorIndentGuide.background": "#00000015", + "editorIndentGuide.activeBackground": "#00000030", + "editorWhitespace.foreground": "#00000015", + "editor.findMatchBackground": "#e6cc7744", + "editor.findMatchHighlightBackground": "#e6cc7766", + "editor.inactiveSelectionBackground": "#22222210", + "editor.selectionBackground": "#22222218", + "editor.selectionHighlightBackground": "#22222210", + "editor.wordHighlightBackground": "#1c6b4805", + "editor.wordHighlightStrongBackground": "#1c6b4810", + "editorBracketMatch.background": "#1c6b4820", + "diffEditor.insertedTextBackground": "#1c6b4830", + "diffEditor.removedTextBackground": "#ab595940", + "scrollbar.shadow": "#6a737d33", + "scrollbarSlider.background": "#393a3410", + "scrollbarSlider.hoverBackground": "#393a3450", + "scrollbarSlider.activeBackground": "#393a3450", + "editorOverviewRuler.border": "#fff", + "panel.background": "#ffffff", + "panel.border": "#f0f0f0", + "panelTitle.activeBorder": "#1c6b48", + "panelTitle.activeForeground": "#393a34", + "panelTitle.inactiveForeground": "#6a737d", + "panelInput.border": "#e1e4e8", + "terminal.foreground": "#393a34", + "terminal.selectionBackground": "#22222218", + "terminal.ansiBrightBlack": "#aaaaaa", + "terminal.ansiBrightBlue": "#296aa3", + "terminal.ansiBrightCyan": "#2993a3", + "terminal.ansiBrightGreen": "#1e754f", + "terminal.ansiBrightMagenta": "#a13865", + "terminal.ansiBrightRed": "#ab5959", + "terminal.ansiBrightWhite": "#dddddd", + "terminal.ansiBrightYellow": "#bda437", + "terminal.ansiBlack": "#121212", + "terminal.ansiBlue": "#296aa3", + "terminal.ansiCyan": "#2993a3", + "terminal.ansiGreen": "#1e754f", + "terminal.ansiMagenta": "#a13865", + "terminal.ansiRed": "#ab5959", + "terminal.ansiWhite": "#dbd7ca", + "terminal.ansiYellow": "#bda437", + "gitDecoration.addedResourceForeground": "#1e754f", + "gitDecoration.modifiedResourceForeground": "#296aa3", + "gitDecoration.deletedResourceForeground": "#ab5959", + "gitDecoration.untrackedResourceForeground": "#2993a3", + "gitDecoration.ignoredResourceForeground": "#393a3450", + "gitDecoration.conflictingResourceForeground": "#a65e2b", + "gitDecoration.submoduleResourceForeground": "#393a3490", + "editorGutter.modifiedBackground": "#296aa3", + "editorGutter.addedBackground": "#1e754f", + "editorGutter.deletedBackground": "#ab5959", + "editorBracketHighlight.foreground1": "#2993a3", + "editorBracketHighlight.foreground2": "#1e754f", + "editorBracketHighlight.foreground3": "#a65e2b", + "editorBracketHighlight.foreground4": "#a13865", + "editorBracketHighlight.foreground5": "#bda437", + "editorBracketHighlight.foreground6": "#296aa3", + "debugToolBar.background": "#ffffff", + "editor.stackFrameHighlightBackground": "#fffbdd", + "editor.focusedStackFrameHighlightBackground": "#fff5b1", + "peekViewEditor.background": "#ffffff", + "peekViewResult.background": "#ffffff", + "settings.headerForeground": "#393a34", + "settings.modifiedItemIndicator": "#1c6b48", + "welcomePage.buttonBackground": "#f6f8fa", + "welcomePage.buttonHoverBackground": "#e1e4e8", + "problemsErrorIcon.foreground": "#ab5959", + "problemsWarningIcon.foreground": "#a65e2b", + "problemsInfoIcon.foreground": "#296aa3", + "editorError.foreground": "#ab5959", + "editorWarning.foreground": "#a65e2b", + "editorInfo.foreground": "#296aa3", + "editorHint.foreground": "#1e754f", + "editorGutter.commentRangeForeground": "#393a3450", + "editorGutter.foldingControlForeground": "#393a3490", + "editorInlayHint.foreground": "#999999", + "editorInlayHint.background": "#f7f7f7", + "editorStickyScroll.background": "#f7f7f7", + "editorStickyScrollHover.background": "#f7f7f7", + "menu.separatorBackground": "#f0f0f0" + }, + "semanticHighlighting": true, + "semanticTokenColors": { + "namespace": "#b05a78", + "property": "#998418", + "interface": "#2e808f", + "type": "#2e808f", + "class": "#5a6aa6" + }, + "tokenColors": [ + { + "scope": [ + "comment", + "punctuation.definition.comment", + "string.comment" + ], + "settings": { + "foreground": "#a0ada0" + } + }, + { + "scope": [ + "delimiter.bracket", + "delimiter", + "invalid.illegal.character-not-allowed-here.html", + "keyword.operator.rest", + "keyword.operator.spread", + "keyword.operator.type.annotation", + "keyword.operator.relational", + "keyword.operator.assignment", + "keyword.operator.type", + "meta.brace", + "meta.tag.block.any.html", + "meta.tag.inline.any.html", + "meta.tag.structure.input.void.html", + "meta.type.annotation", + "meta.embedded.block.github-actions-expression", + "storage.type.function.arrow", + "meta.objectliteral.ts", + "punctuation", + "punctuation.definition.string.begin.html.vue", + "punctuation.definition.string.end.html.vue" + ], + "settings": { + "foreground": "#999999" + } + }, + { + "scope": [ + "constant", + "entity.name.constant", + "variable.language", + "meta.definition.variable" + ], + "settings": { + "foreground": "#a65e2b" + } + }, + { + "scope": [ + "entity", + "entity.name" + ], + "settings": { + "foreground": "#59873a" + } + }, + { + "scope": "variable.parameter.function", + "settings": { + "foreground": "#393a34" + } + }, + { + "scope": [ + "entity.name.tag", + "tag.html" + ], + "settings": { + "foreground": "#1e754f" + } + }, + { + "scope": "entity.name.function", + "settings": { + "foreground": "#59873a" + } + }, + { + "scope": [ + "keyword", + "storage.type.class.jsdoc", + "punctuation.definition.template-expression" + ], + "settings": { + "foreground": "#1e754f" + } + }, + { + "scope": [ + "storage", + "storage.type", + "support.type.builtin", + "constant.language.undefined", + "constant.language.null", + "constant.language.import-export-all.ts" + ], + "settings": { + "foreground": "#ab5959" + } + }, + { + "scope": [ + "text.html.derivative", + "storage.modifier.package", + "storage.modifier.import", + "storage.type.java" + ], + "settings": { + "foreground": "#393a34" + } + }, + { + "scope": [ + "string", + "string punctuation.section.embedded source", + "attribute.value" + ], + "settings": { + "foreground": "#b56959" + } + }, + { + "scope": [ + "punctuation.definition.string" + ], + "settings": { + "foreground": "#b5695977" + } + }, + { + "scope": [ + "punctuation.support.type.property-name" + ], + "settings": { + "foreground": "#99841877" + } + }, + { + "scope": "support", + "settings": { + "foreground": "#998418" + } + }, + { + "scope": [ + "property", + "meta.property-name", + "meta.object-literal.key", + "entity.name.tag.yaml", + "attribute.name" + ], + "settings": { + "foreground": "#998418" + } + }, + { + "scope": [ + "entity.other.attribute-name", + "invalid.deprecated.entity.other.attribute-name.html" + ], + "settings": { + "foreground": "#b07d48" + } + }, + { + "scope": [ + "variable", + "identifier" + ], + "settings": { + "foreground": "#b07d48" + } + }, + { + "scope": [ + "support.type.primitive", + "entity.name.type" + ], + "settings": { + "foreground": "#2e8f82" + } + }, + { + "scope": "namespace", + "settings": { + "foreground": "#b05a78" + } + }, + { + "scope": [ + "keyword.operator", + "keyword.operator.assignment.compound", + "meta.var.expr.ts" + ], + "settings": { + "foreground": "#ab5959" + } + }, + { + "scope": "invalid.broken", + "settings": { + "fontStyle": "italic", + "foreground": "#b31d28" + } + }, + { + "scope": "invalid.deprecated", + "settings": { + "fontStyle": "italic", + "foreground": "#b31d28" + } + }, + { + "scope": "invalid.illegal", + "settings": { + "fontStyle": "italic", + "foreground": "#b31d28" + } + }, + { + "scope": "invalid.unimplemented", + "settings": { + "fontStyle": "italic", + "foreground": "#b31d28" + } + }, + { + "scope": "carriage-return", + "settings": { + "fontStyle": "italic underline", + "background": "#d73a49", + "foreground": "#fafbfc", + "content": "^M" + } + }, + { + "scope": "message.error", + "settings": { + "foreground": "#b31d28" + } + }, + { + "scope": "string variable", + "settings": { + "foreground": "#b56959" + } + }, + { + "scope": [ + "source.regexp", + "string.regexp" + ], + "settings": { + "foreground": "#ab5e3f" + } + }, + { + "scope": [ + "string.regexp.character-class", + "string.regexp constant.character.escape", + "string.regexp source.ruby.embedded", + "string.regexp string.regexp.arbitrary-repitition" + ], + "settings": { + "foreground": "#b56959" + } + }, + { + "scope": "string.regexp constant.character.escape", + "settings": { + "foreground": "#bda437" + } + }, + { + "scope": [ + "support.constant" + ], + "settings": { + "foreground": "#a65e2b" + } + }, + { + "scope": [ + "keyword.operator.quantifier.regexp", + "constant.numeric", + "number" + ], + "settings": { + "foreground": "#2f798a" + } + }, + { + "scope": [ + "keyword.other.unit" + ], + "settings": { + "foreground": "#ab5959" + } + }, + { + "scope": [ + "constant.language.boolean", + "constant.language" + ], + "settings": { + "foreground": "#1e754f" + } + }, + { + "scope": "meta.module-reference", + "settings": { + "foreground": "#1c6b48" + } + }, + { + "scope": "punctuation.definition.list.begin.markdown", + "settings": { + "foreground": "#a65e2b" + } + }, + { + "scope": [ + "markup.heading", + "markup.heading entity.name" + ], + "settings": { + "fontStyle": "bold", + "foreground": "#1c6b48" + } + }, + { + "scope": "markup.quote", + "settings": { + "foreground": "#2e808f" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic", + "foreground": "#393a34" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#393a34" + } + }, + { + "scope": "markup.raw", + "settings": { + "foreground": "#1c6b48" + } + }, + { + "scope": [ + "markup.deleted", + "meta.diff.header.from-file", + "punctuation.definition.deleted" + ], + "settings": { + "background": "#ffeef0", + "foreground": "#b31d28" + } + }, + { + "scope": [ + "markup.inserted", + "meta.diff.header.to-file", + "punctuation.definition.inserted" + ], + "settings": { + "background": "#f0fff4", + "foreground": "#22863a" + } + }, + { + "scope": [ + "markup.changed", + "punctuation.definition.changed" + ], + "settings": { + "background": "#ffebda", + "foreground": "#e36209" + } + }, + { + "scope": [ + "markup.ignored", + "markup.untracked" + ], + "settings": { + "foreground": "#f6f8fa", + "background": "#005cc5" + } + }, + { + "scope": "meta.diff.range", + "settings": { + "foreground": "#6f42c1", + "fontStyle": "bold" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#005cc5" + } + }, + { + "scope": "meta.separator", + "settings": { + "fontStyle": "bold", + "foreground": "#005cc5" + } + }, + { + "scope": "meta.output", + "settings": { + "foreground": "#005cc5" + } + }, + { + "scope": [ + "brackethighlighter.tag", + "brackethighlighter.curly", + "brackethighlighter.round", + "brackethighlighter.square", + "brackethighlighter.angle", + "brackethighlighter.quote" + ], + "settings": { + "foreground": "#586069" + } + }, + { + "scope": "brackethighlighter.unmatched", + "settings": { + "foreground": "#b31d28" + } + }, + { + "scope": [ + "constant.other.reference.link", + "string.other.link", + "punctuation.definition.string.begin.markdown", + "punctuation.definition.string.end.markdown" + ], + "settings": { + "foreground": "#b56959" + } + }, + { + "scope": [ + "markup.underline.link.markdown", + "markup.underline.link.image.markdown" + ], + "settings": { + "foreground": "#393a3490", + "fontStyle": "underline" + } + }, + { + "scope": [ + "type.identifier", + "constant.other.character-class.regexp" + ], + "settings": { + "foreground": "#5a6aa6" + } + }, + { + "scope": [ + "entity.other.attribute-name.html.vue" + ], + "settings": { + "foreground": "#59873a" + } + }, + { + "scope": [ + "invalid.illegal.unrecognized-tag.html" + ], + "settings": { + "fontStyle": "normal" + } + } + ], + "rules": [ + { + "token": "comment", + "foreground": "a0ada0" + }, + { + "token": "punctuation.definition.comment", + "foreground": "a0ada0" + }, + { + "token": "string.comment", + "foreground": "a0ada0" + }, + { + "token": "delimiter.bracket", + "foreground": "999999" + }, + { + "token": "delimiter", + "foreground": "999999" + }, + { + "token": "invalid.illegal.character-not-allowed-here.html", + "foreground": "999999" + }, + { + "token": "keyword.operator.rest", + "foreground": "999999" + }, + { + "token": "keyword.operator.spread", + "foreground": "999999" + }, + { + "token": "keyword.operator.type.annotation", + "foreground": "999999" + }, + { + "token": "keyword.operator.relational", + "foreground": "999999" + }, + { + "token": "keyword.operator.assignment", + "foreground": "999999" + }, + { + "token": "keyword.operator.type", + "foreground": "999999" + }, + { + "token": "meta.brace", + "foreground": "999999" + }, + { + "token": "meta.tag.block.any.html", + "foreground": "999999" + }, + { + "token": "meta.tag.inline.any.html", + "foreground": "999999" + }, + { + "token": "meta.tag.structure.input.void.html", + "foreground": "999999" + }, + { + "token": "meta.type.annotation", + "foreground": "999999" + }, + { + "token": "meta.embedded.block.github-actions-expression", + "foreground": "999999" + }, + { + "token": "storage.type.function.arrow", + "foreground": "999999" + }, + { + "token": "meta.objectliteral.ts", + "foreground": "999999" + }, + { + "token": "punctuation", + "foreground": "999999" + }, + { + "token": "punctuation.definition.string.begin.html.vue", + "foreground": "999999" + }, + { + "token": "punctuation.definition.string.end.html.vue", + "foreground": "999999" + }, + { + "token": "constant", + "foreground": "a65e2b" + }, + { + "token": "entity.name.constant", + "foreground": "a65e2b" + }, + { + "token": "variable.language", + "foreground": "a65e2b" + }, + { + "token": "meta.definition.variable", + "foreground": "a65e2b" + }, + { + "token": "entity", + "foreground": "59873a" + }, + { + "token": "entity.name", + "foreground": "59873a" + }, + { + "token": "variable.parameter.function", + "foreground": "393a34" + }, + { + "token": "entity.name.tag", + "foreground": "1e754f" + }, + { + "token": "tag.html", + "foreground": "1e754f" + }, + { + "token": "entity.name.function", + "foreground": "59873a" + }, + { + "token": "keyword", + "foreground": "1e754f" + }, + { + "token": "storage.type.class.jsdoc", + "foreground": "1e754f" + }, + { + "token": "punctuation.definition.template-expression", + "foreground": "1e754f" + }, + { + "token": "storage", + "foreground": "ab5959" + }, + { + "token": "storage.type", + "foreground": "ab5959" + }, + { + "token": "support.type.builtin", + "foreground": "ab5959" + }, + { + "token": "constant.language.undefined", + "foreground": "ab5959" + }, + { + "token": "constant.language.null", + "foreground": "ab5959" + }, + { + "token": "constant.language.import-export-all.ts", + "foreground": "ab5959" + }, + { + "token": "text.html.derivative", + "foreground": "393a34" + }, + { + "token": "storage.modifier.package", + "foreground": "393a34" + }, + { + "token": "storage.modifier.import", + "foreground": "393a34" + }, + { + "token": "storage.type.java", + "foreground": "393a34" + }, + { + "token": "string", + "foreground": "b56959" + }, + { + "token": "string punctuation.section.embedded source", + "foreground": "b56959" + }, + { + "token": "attribute.value", + "foreground": "b56959" + }, + { + "token": "punctuation.definition.string", + "foreground": "b5695977" + }, + { + "token": "punctuation.support.type.property-name", + "foreground": "99841877" + }, + { + "token": "support", + "foreground": "998418" + }, + { + "token": "property", + "foreground": "998418" + }, + { + "token": "meta.property-name", + "foreground": "998418" + }, + { + "token": "meta.object-literal.key", + "foreground": "998418" + }, + { + "token": "entity.name.tag.yaml", + "foreground": "998418" + }, + { + "token": "attribute.name", + "foreground": "998418" + }, + { + "token": "entity.other.attribute-name", + "foreground": "b07d48" + }, + { + "token": "invalid.deprecated.entity.other.attribute-name.html", + "foreground": "b07d48" + }, + { + "token": "variable", + "foreground": "b07d48" + }, + { + "token": "identifier", + "foreground": "b07d48" + }, + { + "token": "support.type.primitive", + "foreground": "2e8f82" + }, + { + "token": "entity.name.type", + "foreground": "2e8f82" + }, + { + "token": "namespace", + "foreground": "b05a78" + }, + { + "token": "keyword.operator", + "foreground": "ab5959" + }, + { + "token": "keyword.operator.assignment.compound", + "foreground": "ab5959" + }, + { + "token": "meta.var.expr.ts", + "foreground": "ab5959" + }, + { + "token": "invalid.broken", + "foreground": "b31d28" + }, + { + "token": "invalid.deprecated", + "foreground": "b31d28" + }, + { + "token": "invalid.illegal", + "foreground": "b31d28" + }, + { + "token": "invalid.unimplemented", + "foreground": "b31d28" + }, + { + "token": "carriage-return", + "foreground": "fafbfc" + }, + { + "token": "message.error", + "foreground": "b31d28" + }, + { + "token": "string variable", + "foreground": "b56959" + }, + { + "token": "source.regexp", + "foreground": "ab5e3f" + }, + { + "token": "string.regexp", + "foreground": "ab5e3f" + }, + { + "token": "string.regexp.character-class", + "foreground": "b56959" + }, + { + "token": "string.regexp constant.character.escape", + "foreground": "b56959" + }, + { + "token": "string.regexp source.ruby.embedded", + "foreground": "b56959" + }, + { + "token": "string.regexp string.regexp.arbitrary-repitition", + "foreground": "b56959" + }, + { + "token": "string.regexp constant.character.escape", + "foreground": "bda437" + }, + { + "token": "support.constant", + "foreground": "a65e2b" + }, + { + "token": "keyword.operator.quantifier.regexp", + "foreground": "2f798a" + }, + { + "token": "constant.numeric", + "foreground": "2f798a" + }, + { + "token": "number", + "foreground": "2f798a" + }, + { + "token": "keyword.other.unit", + "foreground": "ab5959" + }, + { + "token": "constant.language.boolean", + "foreground": "1e754f" + }, + { + "token": "constant.language", + "foreground": "1e754f" + }, + { + "token": "meta.module-reference", + "foreground": "1c6b48" + }, + { + "token": "punctuation.definition.list.begin.markdown", + "foreground": "a65e2b" + }, + { + "token": "markup.heading", + "foreground": "1c6b48" + }, + { + "token": "markup.heading entity.name", + "foreground": "1c6b48" + }, + { + "token": "markup.quote", + "foreground": "2e808f" + }, + { + "token": "markup.italic", + "foreground": "393a34" + }, + { + "token": "markup.bold", + "foreground": "393a34" + }, + { + "token": "markup.raw", + "foreground": "1c6b48" + }, + { + "token": "markup.deleted", + "foreground": "b31d28" + }, + { + "token": "meta.diff.header.from-file", + "foreground": "b31d28" + }, + { + "token": "punctuation.definition.deleted", + "foreground": "b31d28" + }, + { + "token": "markup.inserted", + "foreground": "22863a" + }, + { + "token": "meta.diff.header.to-file", + "foreground": "22863a" + }, + { + "token": "punctuation.definition.inserted", + "foreground": "22863a" + }, + { + "token": "markup.changed", + "foreground": "e36209" + }, + { + "token": "punctuation.definition.changed", + "foreground": "e36209" + }, + { + "token": "markup.ignored", + "foreground": "f6f8fa" + }, + { + "token": "markup.untracked", + "foreground": "f6f8fa" + }, + { + "token": "meta.diff.range", + "foreground": "6f42c1" + }, + { + "token": "meta.diff.header", + "foreground": "005cc5" + }, + { + "token": "meta.separator", + "foreground": "005cc5" + }, + { + "token": "meta.output", + "foreground": "005cc5" + }, + { + "token": "brackethighlighter.tag", + "foreground": "586069" + }, + { + "token": "brackethighlighter.curly", + "foreground": "586069" + }, + { + "token": "brackethighlighter.round", + "foreground": "586069" + }, + { + "token": "brackethighlighter.square", + "foreground": "586069" + }, + { + "token": "brackethighlighter.angle", + "foreground": "586069" + }, + { + "token": "brackethighlighter.quote", + "foreground": "586069" + }, + { + "token": "brackethighlighter.unmatched", + "foreground": "b31d28" + }, + { + "token": "constant.other.reference.link", + "foreground": "b56959" + }, + { + "token": "string.other.link", + "foreground": "b56959" + }, + { + "token": "punctuation.definition.string.begin.markdown", + "foreground": "b56959" + }, + { + "token": "punctuation.definition.string.end.markdown", + "foreground": "b56959" + }, + { + "token": "markup.underline.link.markdown", + "foreground": "393a3490" + }, + { + "token": "markup.underline.link.image.markdown", + "foreground": "393a3490" + }, + { + "token": "type.identifier", + "foreground": "5a6aa6" + }, + { + "token": "constant.other.character-class.regexp", + "foreground": "5a6aa6" + }, + { + "token": "entity.other.attribute-name.html.vue", + "foreground": "59873a" + }, + { + "token": "invalid.illegal.unrecognized-tag.html" + } + ], + inherit: false, +} as Editor.IStandaloneThemeData \ No newline at end of file From f88fb4b879fb34103a28f6d68b22edb7b30f3e29 Mon Sep 17 00:00:00 2001 From: Farnabaz Date: Thu, 2 Oct 2025 12:48:44 +0200 Subject: [PATCH 5/7] fix: remove item card placeholder image for better theme support --- src/app/src/components/shared/item/ItemCard.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/src/components/shared/item/ItemCard.vue b/src/app/src/components/shared/item/ItemCard.vue index af17f89e..38447786 100644 --- a/src/app/src/components/shared/item/ItemCard.vue +++ b/src/app/src/components/shared/item/ItemCard.vue @@ -34,7 +34,7 @@ const imageSrc = computed(() => { if (props.item.preview) { return props.item.preview } - return 'https://placehold.co/1920x1080/f9fafc/f9fafc' + return '' }) // ring-(--ui-success) ring-(--ui-info) ring-(--ui-warning) ring-(--ui-error) ring-(--ui-neutral) @@ -53,12 +53,14 @@ const statusRingColor = computed(() => props.item.status ? `ring-(--ui-${COLOR_U >
Card placeholder +
Date: Thu, 2 Oct 2025 13:19:14 +0200 Subject: [PATCH 6/7] feat: compute language based on file extension --- .../components/content/ContentEditorCode.vue | 21 ++++++++++++++++--- src/module/src/runtime/utils/content.ts | 2 +- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/app/src/components/content/ContentEditorCode.vue b/src/app/src/components/content/ContentEditorCode.vue index 9b309f26..7902724f 100644 --- a/src/app/src/components/content/ContentEditorCode.vue +++ b/src/app/src/components/content/ContentEditorCode.vue @@ -1,6 +1,6 @@