webcontainer-sandbox-react
Version:
A React component library for WebContainer-based code sandboxes
30 lines (29 loc) • 580 B
TypeScript
export interface FileNode {
id: string;
name: string;
fullPath: string;
type: 'file' | 'folder';
content?: string;
children?: Map<string, FileNode>;
parent?: string;
expanded?: boolean;
modified?: boolean;
language?: string;
}
export interface OpenFile {
id: string;
model: any;
modified: boolean;
viewState: any;
}
export interface ContextMenuData {
x: number;
y: number;
targetId: string;
show: boolean;
}
export interface FileChangeEvent {
fileId: string;
content: string;
filePath: string;
}