import { DragMouseEvent } from '../../../base/browser/mouseEvent.js'; import { URI } from '../../../base/common/uri.js'; import { IBaseTextResourceEditorInput, ITextEditorSelection } from '../../editor/common/editor.js'; export declare const CodeDataTransfers: { EDITORS: string; FILES: string; SYMBOLS: string; }; export interface IDraggedResourceEditorInput extends IBaseTextResourceEditorInput { resource: URI | undefined; /** * A hint that the source of the dragged editor input * might not be the application but some external tool. */ isExternal?: boolean; /** * Whether we probe for the dropped editor to be a workspace * (i.e. code-workspace file or even a folder), allowing to * open it as workspace instead of opening as editor. */ allowWorkspaceOpen?: boolean; } export interface IResourceStat { readonly resource: URI; readonly isDirectory?: boolean; readonly selection?: ITextEditorSelection; } export interface IDragAndDropContributionRegistry { /** * Registers a drag and drop contribution. */ register(contribution: IDragAndDropContribution): void; /** * Returns all registered drag and drop contributions. */ getAll(): IterableIterator; } interface IDragAndDropContribution { readonly dataFormatKey: string; getEditorInputs(data: string): IDraggedResourceEditorInput[]; setData(resources: IResourceStat[], event: DragMouseEvent | DragEvent): void; } export declare const Extensions: { DragAndDropContribution: string; }; /** * A singleton to store transfer data during drag & drop operations that are only valid within the application. */ export declare class LocalSelectionTransfer { private static readonly INSTANCE; private data?; private proto?; private constructor(); static getInstance(): LocalSelectionTransfer; hasData(proto: T): boolean; clearData(proto: T): void; getData(proto: T): T[] | undefined; setData(data: T[], proto: T): void; } /** * A helper to get access to Electrons `webUtils.getPathForFile` function * in a safe way without crashing the application when running in the web. */ export declare function getPathForFile(file: File): string | undefined; export {};