ngx-monaco-tree
Version:
A tree view based on monaco-editor powered by VSCode.
43 lines (37 loc) • 2.09 kB
TypeScript
import * as _angular_core from '@angular/core';
type MonacoTreeElement = {
name: string;
color?: 'red' | 'yellow' | 'green' | 'gray' | string;
content?: MonacoTreeElement[];
};
type ContextMenuAction = ['new_file' | 'new_directory' | 'delete_file' | 'rename_file', string];
type DragAndDropEvent = {
sourceFile: string;
destinationFile: string;
};
declare class NgxMonacoTreeComponent {
private readonly children;
readonly theme: _angular_core.InputSignal<"vs-dark" | "vs-light">;
readonly tree: _angular_core.InputSignal<MonacoTreeElement[]>;
readonly width: _angular_core.InputSignal<string>;
readonly height: _angular_core.InputSignal<string>;
readonly clickContextMenu: _angular_core.OutputEmitterRef<ContextMenuAction>;
readonly dragDropFile: _angular_core.OutputEmitterRef<DragAndDropEvent>;
readonly currentFile: _angular_core.ModelSignal<string | null>;
handleClickContextMenu(event: ContextMenuAction): void;
handleNewFile(): void;
handleNewDirectory(): void;
handleCollapseAll(): void;
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxMonacoTreeComponent, never>;
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxMonacoTreeComponent, "monaco-tree", never, { "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "tree": { "alias": "tree"; "required": true; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "currentFile": { "alias": "currentFile"; "required": false; "isSignal": true; }; }, { "clickContextMenu": "clickContextMenu"; "dragDropFile": "dragDropFile"; "currentFile": "currentFileChange"; }, never, never, true, never>;
}
interface ContextMenuElementSeparator {
type: 'separator';
}
interface ContextMenuElementText {
type: 'element';
action: () => void;
name: string;
}
export { NgxMonacoTreeComponent };
export type { ContextMenuAction, ContextMenuElementSeparator, ContextMenuElementText, DragAndDropEvent, MonacoTreeElement };