import { JupyterFrontEnd } from '@jupyterlab/application'; import { ICommandPalette } from '@jupyterlab/apputils'; import { IDocumentManager } from '@jupyterlab/docmanager'; import { ITranslator } from '@jupyterlab/translation'; import { IXtralabFileBrowser } from './widget'; /** * Command identifiers exposed by the xtralab browser. We deliberately namespace * these under `xtralab:` rather than reusing the `filebrowser:` ids * because the core `filebrowser:*` commands look up a `FileBrowser` instance * via `IFileBrowserFactory.tracker` — our widget is not a `FileBrowser`, so * those handlers would never see it. */ export declare namespace CommandIDs { const open = "xtralab:open"; const openBrowserTab = "xtralab:open-browser-tab"; const rename = "xtralab:rename"; const del = "xtralab:delete"; const duplicate = "xtralab:duplicate"; const copyPath = "xtralab:copy-path"; const download = "xtralab:download"; const refresh = "xtralab:refresh"; const collapseAll = "xtralab:collapse-all"; const toggleFileFilter = "xtralab:toggle-file-filter"; const createNewDirectory = "xtralab:create-new-directory"; const newLauncher = "xtralab:new-launcher"; const revealPath = "xtralab:reveal-path"; const revealInFileTree = "xtralab:reveal-in-file-tree"; } interface IRegisterCommandsOptions { app: JupyterFrontEnd; browser: IXtralabFileBrowser; docManager: IDocumentManager; palette: ICommandPalette | null; translator: ITranslator | null; } /** * Register every xtralab command on the application command registry, attach * the items to the application context menu, and wire up the dynamic * "Open With" submenu populator. * * @returns A function that detaches the menu items and signal listener. * The commands themselves are owned by the registry for the lifetime of * the plugin. */ export declare function registerCommands(opts: IRegisterCommandsOptions): () => void; /** * The names we register with the toolbar. Kept distinct from * {@link CommandIDs} because the toolbar API uses opaque names rather * than commands. */ export declare namespace ToolbarNames { const newLauncher = "new-launcher"; const newDirectory = "new-directory"; const refresh = "refresh"; const collapseAll = "collapse-all"; const toggleFileFilter = "toggle-file-filter"; } /** * Populate the file browser's toolbar with the buttons that mirror the * default JupyterLab file browser: a "+" launcher button, a new-folder * button, a refresh button, a collapse-all button, and the file filter * toggle. */ export declare function populateToolbar(opts: { app: JupyterFrontEnd; browser: IXtralabFileBrowser; }): void; export {};