🐛 fix(editor): Add Go template editor component and update related schemas

This commit is contained in:
web
2025-08-12 05:47:58 -07:00
parent 296a6c10a3
commit 9d9c3cd7b3
10 changed files with 435 additions and 26 deletions
@@ -5,6 +5,7 @@ import { Button } from '@workspace/ui/components/button';
import { cn } from '@workspace/ui/lib/utils';
import { useSize } from 'ahooks';
import { EyeIcon, EyeOff, FullscreenIcon, MinimizeIcon } from 'lucide-react';
import DraculaTheme from 'monaco-themes/themes/Dracula.json' with { type: 'json' };
import { useEffect, useRef, useState } from 'react';
export interface MonacoEditorProps {
@@ -145,10 +146,11 @@ export function MonacoEditor({
theme='transparentTheme'
beforeMount={(monaco: Monaco) => {
monaco.editor.defineTheme('transparentTheme', {
base: 'vs-dark',
inherit: true,
rules: [],
base: DraculaTheme.base as 'vs' | 'vs-dark' | 'hc-black',
inherit: DraculaTheme.inherit,
rules: DraculaTheme.rules,
colors: {
...DraculaTheme.colors,
'editor.background': '#00000000',
},
});