vue-shiki-monaco
Version:
一个封shiki和monaco-editor的Vue组件
31 lines (30 loc) • 996 B
TypeScript
import { BundledLanguage, BundledTheme } from 'shiki';
import { MonacoDiffOptions } from '../../hooks';
import { ContextMenuItem } from '../../hooks/useContextMenu';
export interface MonacoDiffProps {
oldModel: string;
newModel: string;
diffViewType?: MonacoDiffOptions["diffViewType"];
currentLanguage?: BundledLanguage;
currentTheme?: BundledTheme;
languages?: BundledLanguage[];
themes?: BundledTheme[];
height?: string;
showToolbar?: boolean;
autoResize?: boolean;
monacoEditClass?: string;
fileName?: string;
contextMenu?: {
enabled?: boolean;
items?: string[] | "minimal" | "basic" | "full";
customItems?: ContextMenuItem[];
variant?: "classic" | "glass";
};
minimapContextMenu?: {
enabled?: boolean;
items?: string[] | "minimal" | "basic" | "full";
customItems?: ContextMenuItem[];
variant?: "classic" | "glass";
};
teleportTarget?: string | HTMLElement;
}