mirror of
https://github.com/enso-org/enso.git
synced 2024-11-26 17:06:48 +03:00
ebf4cd5c1f
- Remove unnecessary modules - Remove `ts-plugin-namespace-auto-import` as it was a workaround to use the non-conventional `import *` convention - Remove `esbuild-plugin-copy-directories` as it is unuse - Inline modules that are only ever used once - Inline `project-manager-shim` into `gui2` - it is only used during `gui2`'s dev mode - Inline `content-config` into `client` - Flatten `app/ide-desktop/lib/` to `app/ide-desktop/` - Flatten `app/ide-desktop/lib/dashboard/` to `app/dashboard/` # Important Notes - As mentioned above, all remaining modules have been moved up from `app/ide-desktop/lib/` to `app/ide-desktop/`. It's not ideal but I'd rather hold off on moving them anywhere else before we have a consensus on what should go where. - (That is to say, this may not be the final directory structure - but I figure it's fine to get *something* done so that hopefully the rest of the restructuring is simpler.)
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
/// <reference types="vite/client" />
|
|
|
|
declare const PROJECT_MANAGER_URL: string
|
|
declare const YDOC_SERVER_URL: string
|
|
declare const RUNNING_VITEST: boolean
|
|
declare const IS_CLOUD_BUILD: boolean
|
|
|
|
interface Document {
|
|
caretPositionFromPoint(x: number, y: number): { offsetNode: Node; offset: number } | null
|
|
}
|
|
|
|
interface Window {
|
|
fileBrowserApi: FileBrowserApi
|
|
}
|
|
|
|
/** `window.fileBrowserApi` is a context bridge to the main process, when we're running in an
|
|
* Electron context.
|
|
*
|
|
* # Safety
|
|
*
|
|
* We're assuming that the main process has exposed the `fileBrowserApi` context bridge (see
|
|
* `app/client/src/preload.ts` for details), and that it contains the functions defined in this
|
|
* interface.
|
|
*/
|
|
interface FileBrowserApi {
|
|
/**
|
|
* Select path for local file or directory using the system file browser.
|
|
* 'filePath' is same as 'file', but allows picking non-existing files.
|
|
*/
|
|
readonly openFileBrowser: (
|
|
kind: 'file' | 'directory' | 'default' | 'filePath',
|
|
defaultPath?: string,
|
|
) => Promise<string[] | undefined>
|
|
}
|
|
|
|
interface LogEvent {
|
|
(message: string, projectId?: string | null, metadata?: object | null): void
|
|
}
|