mirror of
https://github.com/enso-org/enso.git
synced 2024-12-25 08:03:14 +03:00
5995a00958
part of #7954 # Important Notes The workflow is: - `$ npm install` -- just in case - `$ npm --workspace=enso-gui2 run build-ydoc-server-polyglot` -- build the `ydocServer.js` bundle - `$ sbt ydoc-server/assembly` -- build the ydoc server jar - `env POLYGLOT_YDOC_SERVER=true npm --workspace=enso-gui2 run dev` -- run the dev server with the polyglot ydoc server. Providing `POLYGLOT_YDOC_SERVER_DEBUG=true` env variable enables the chrome debugger
31 lines
943 B
TypeScript
31 lines
943 B
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/ide-desktop/lib/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. */
|
|
readonly openFileBrowser: (
|
|
kind: 'file' | 'directory' | 'default',
|
|
) => Promise<string[] | undefined>
|
|
}
|